From 14382597fc2de5e34277cd3a0b887ac681b754e7 Mon Sep 17 00:00:00 2001 From: Zoe Meers Date: Wed, 28 Aug 2024 15:55:27 +1000 Subject: [PATCH] Commit files for initial upload (#1) --- .gitignore | 109 + README.md | 60 +- R_package/DESCRIPTION | 45 + R_package/LICENSE | 2 + R_package/LICENSE.md | 21 + R_package/NAMESPACE | 70 + R_package/NEWS.md | 289 + R_package/R/bind_audio_data.R | 153 + R_package/R/bind_bar_chart_race_data.R | 292 + R_package/R/bind_bubble_chart_data.R | 57 + R_package/R/bind_calculator_data.R | 51 + R_package/R/bind_cards_data.R | 285 + R_package/R/bind_chord_diagram_data.R | 42 + R_package/R/bind_draw_the_line_data.R | 55 + .../R/bind_election_results_chart_data.R | 70 + R_package/R/bind_gantt_data.R | 63 + R_package/R/bind_gauge_data.R | 99 + R_package/R/bind_hierarchy_data.R | 171 + R_package/R/bind_horserace_data.R | 322 + R_package/R/bind_interactive_svg_data.R | 60 + R_package/R/bind_line_bar_pie_data.R | 196 + R_package/R/bind_marimekko_data.R | 255 + R_package/R/bind_network_graph_data.R | 76 + R_package/R/bind_parliament_chart_data.R | 45 + R_package/R/bind_pictogram_data.R | 89 + R_package/R/bind_quiz_data.R | 104 + R_package/R/bind_radar_data.R | 231 + R_package/R/bind_sankey_data.R | 279 + R_package/R/bind_scatter_data.R | 375 + R_package/R/bind_slope_chart_data.R | 255 + R_package/R/bind_sports_data.R | 315 + R_package/R/bind_sports_race_data.R | 57 + R_package/R/bind_survey_data.R | 200 + R_package/R/bind_svg_annotator_data.R | 60 + R_package/R/bind_table_data.R | 69 + R_package/R/bind_text_annotator_data.R | 39 + R_package/R/bind_timeline_data.R | 273 + R_package/R/bind_tournament_data.R | 309 + R_package/R/bind_word_cloud_data.R | 51 + R_package/R/canva_upload.R | 56 + R_package/R/data.R | 32 + R_package/R/flourish.R | 182 + R_package/R/flourish_charts_utils.R | 154 + R_package/R/set_audio_details.R | 2007 + R_package/R/set_bar_chart_race_details.R | 3328 + R_package/R/set_bubble_chart_details.R | 3227 + R_package/R/set_calculator_details.R | 3873 + R_package/R/set_cards_details.R | 4270 + R_package/R/set_chord_diagram_details.R | 2407 + R_package/R/set_countdown_details.R | 1674 + R_package/R/set_draw_the_line_details.R | 3799 + .../R/set_election_results_chart_details.R | 3365 + R_package/R/set_gantt_details.R | 4657 + R_package/R/set_gauge_details.R | 3999 + R_package/R/set_hierarchy_details.R | 4103 + R_package/R/set_horserace_details.R | 4389 + R_package/R/set_interactive_svg_details.R | 2312 + R_package/R/set_line_bar_pie_details.R | 7727 + R_package/R/set_marimekko_details.R | 5827 + R_package/R/set_network_graph_details.R | 2855 + R_package/R/set_number_ticker_details.R | 1852 + R_package/R/set_parliament_chart_details.R | 2886 + R_package/R/set_photo_slider_details.R | 1646 + R_package/R/set_pictogram_details.R | 4323 + R_package/R/set_quiz_details.R | 1987 + R_package/R/set_radar_details.R | 3886 + R_package/R/set_sankey_details.R | 3569 + R_package/R/set_scatter_details.R | 6611 + R_package/R/set_slope_chart_details.R | 3937 + R_package/R/set_sports_details.R | 3919 + R_package/R/set_sports_race_details.R | 2809 + R_package/R/set_survey_details.R | 3561 + R_package/R/set_svg_annotator_details.R | 2252 + R_package/R/set_table_details.R | 3627 + R_package/R/set_text_annotator_details.R | 1819 + R_package/R/set_timeline_details.R | 4669 + R_package/R/set_tournament_details.R | 2508 + R_package/R/set_word_cloud_details.R | 2789 + R_package/R/sysdata.rda | Bin 0 -> 1093 bytes R_package/README.md | 21 + R_package/cran-comments.md | 7 + .../data-raw/flourish_api_documentation.R | 12 + R_package/data/flourish_api_documentation.rda | Bin 0 -> 1150 bytes R_package/data/gapminder.rda | Bin 0 -> 29993 bytes R_package/inst/README.md | 3 + .../extdata/flourish_api_documentation.csv | 51 + R_package/inst/extdata/gapminder.csv | 1705 + R_package/inst/htmlwidgets/flourish-live.js | 115 + R_package/inst/htmlwidgets/flourish-live.yaml | 6 + .../lib/flourish-live/flourish-live-5.1.0.js | 3379 + .../lib/flourish-live/flourish-live.js.map | 1 + .../lib/flourish-live/flourish.css | 4 + R_package/man/bind_audio_data.Rd | 64 + R_package/man/bind_bar_chart_race_data.Rd | 103 + R_package/man/bind_bubble_chart_data.Rd | 46 + R_package/man/bind_calculator_data.Rd | 46 + R_package/man/bind_cards_data.Rd | 100 + R_package/man/bind_chord_diagram_data.Rd | 37 + R_package/man/bind_draw_the_line_data.Rd | 37 + .../man/bind_election_results_chart_data.Rd | 43 + R_package/man/bind_gantt_data.Rd | 52 + R_package/man/bind_gauge_data.Rd | 46 + R_package/man/bind_hierarchy_data.Rd | 64 + R_package/man/bind_horserace_data.Rd | 112 + R_package/man/bind_interactive_svg_data.Rd | 49 + R_package/man/bind_line_bar_pie_data.Rd | 73 + R_package/man/bind_marimekko_data.Rd | 91 + R_package/man/bind_network_graph_data.Rd | 55 + R_package/man/bind_parliament_chart_data.Rd | 29 + R_package/man/bind_pictogram_data.Rd | 61 + R_package/man/bind_quiz_data.Rd | 73 + R_package/man/bind_radar_data.Rd | 82 + R_package/man/bind_sankey_data.Rd | 100 + R_package/man/bind_scatter_data.Rd | 127 + R_package/man/bind_slope_chart_data.Rd | 91 + R_package/man/bind_sports_data.Rd | 109 + R_package/man/bind_sports_race_data.Rd | 46 + R_package/man/bind_survey_data.Rd | 103 + R_package/man/bind_svg_annotator_data.Rd | 49 + R_package/man/bind_table_data.Rd | 37 + R_package/man/bind_text_annotator_data.Rd | 29 + R_package/man/bind_timeline_data.Rd | 100 + R_package/man/bind_tournament_data.Rd | 109 + R_package/man/bind_word_cloud_data.Rd | 40 + R_package/man/flourish.Rd | 45 + R_package/man/flourish_api_documentation.Rd | 30 + R_package/man/gapminder.Rd | 33 + R_package/man/set_audio_details.Rd | 569 + R_package/man/set_bar_chart_race_details.Rd | 935 + R_package/man/set_bubble_chart_details.Rd | 809 + R_package/man/set_calculator_details.Rd | 1070 + R_package/man/set_cards_details.Rd | 1127 + R_package/man/set_chord_diagram_details.Rd | 644 + R_package/man/set_countdown_details.Rd | 436 + R_package/man/set_draw_the_line_details.Rd | 986 + .../man/set_election_results_chart_details.Rd | 917 + R_package/man/set_gantt_details.Rd | 1199 + R_package/man/set_gauge_details.Rd | 971 + R_package/man/set_hierarchy_details.Rd | 1085 + R_package/man/set_horserace_details.Rd | 1151 + R_package/man/set_interactive_svg_details.Rd | 614 + R_package/man/set_line_bar_pie_details.Rd | 2009 + R_package/man/set_marimekko_details.Rd | 1484 + R_package/man/set_network_graph_details.Rd | 737 + R_package/man/set_number_ticker_details.Rd | 469 + R_package/man/set_parliament_chart_details.Rd | 803 + R_package/man/set_photo_slider_details.Rd | 448 + R_package/man/set_pictogram_details.Rd | 1145 + R_package/man/set_quiz_details.Rd | 569 + R_package/man/set_radar_details.Rd | 1103 + R_package/man/set_sankey_details.Rd | 971 + R_package/man/set_scatter_details.Rd | 1733 + R_package/man/set_slope_chart_details.Rd | 1049 + R_package/man/set_sports_details.Rd | 986 + R_package/man/set_sports_race_details.Rd | 716 + R_package/man/set_survey_details.Rd | 1058 + R_package/man/set_svg_annotator_details.Rd | 569 + R_package/man/set_table_details.Rd | 899 + R_package/man/set_text_annotator_details.Rd | 461 + R_package/man/set_timeline_details.Rd | 1136 + R_package/man/set_tournament_details.Rd | 650 + R_package/man/set_word_cloud_details.Rd | 731 + R_package/tests/testthat.R | 12 + R_package/tests/testthat/test-name.R | 11 + R_package/vignettes/.gitignore | 2 + R_package/vignettes/api_keys.Rmd | 27 + R_package/vignettes/flourish.Rmd | 128 + changelog.md | 290 + python_package/LICENSE.txt | 27 + python_package/MANIFEST.in | 37 + python_package/Pipfile | 22 + python_package/Pipfile.lock | 2237 + python_package/README.md | 63 + python_package/flourishcharts/__init__.py | 9 + python_package/flourishcharts/_utils.py | 118 + python_package/flourishcharts/_version.py | 8 + python_package/flourishcharts/bindings.py | 8250 + .../data/flourish_api_documentation.csv | 58 + .../flourishcharts/data/gapminder.csv | 1705 + .../flourishcharts/datasets/__init__.py | 7 + .../flourishcharts/datasets/gapminder.py | 12 + python_package/flourishcharts/details.py | 123388 +++++++++++++++ python_package/flourishcharts/flourish.py | 179 + .../flourishcharts/flourish_docs/__init__.py | 7 + .../flourishcharts/flourish_docs/reference.py | 14 + .../internal_data/internal_templates.csv | 58 + .../flourishcharts/static/widget.css | 1 + .../flourishcharts/static/widget.js | 2 + .../flourishcharts/tests/__init__.py | 0 .../__pycache__/test_bindings.cpython-39.pyc | Bin 0 -> 1481 bytes .../__pycache__/test_data.cpython-39.pyc | Bin 0 -> 707 bytes .../__pycache__/test_details.cpython-39.pyc | Bin 0 -> 1247 bytes .../flourishcharts/tests/test_bindings.py | 30 + .../flourishcharts/tests/test_data.py | 10 + .../flourishcharts/tests/test_details.py | 20 + python_package/js/widget.css | 0 python_package/js/widget.ts | 40 + python_package/lib/extension.d.ts | 1 + python_package/lib/extension.js | 27 + python_package/lib/extension.js.map | 1 + python_package/lib/flourish.d.ts | 14 + python_package/lib/flourish.js | 51 + python_package/lib/flourish.js.map | 1 + python_package/lib/index.d.ts | 2 + python_package/lib/index.js | 17 + python_package/lib/index.js.map | 1 + python_package/lib/plugin.d.ts | 7 + python_package/lib/plugin.js | 50 + python_package/lib/plugin.js.map | 1 + python_package/lib/version.d.ts | 8 + python_package/lib/version.js | 21 + python_package/lib/version.js.map | 1 + python_package/package-lock.json | 422 + python_package/package.json | 13 + python_package/pyproject.toml | 53 + python_package/pytest.ini | 4 + python_package/setup.cfg | 7 + python_package/setup.py | 73 + python_package/tsconfig.json | 25 + utils/img/alluvial.png | Bin 0 -> 339454 bytes utils/img/canva-circle.svg | 27 + utils/img/canva-dev.svg | 1 + utils/img/canva-flourish.svg | 324 + utils/img/canva-icon.svg | 27 + utils/img/canva-logo.svg | 1 + utils/img/flourish-dev.svg | 1 + utils/img/rbc.png | Bin 0 -> 154803 bytes utils/img/scatter.png | Bin 0 -> 98034 bytes 228 files changed, 306292 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 R_package/DESCRIPTION create mode 100644 R_package/LICENSE create mode 100644 R_package/LICENSE.md create mode 100644 R_package/NAMESPACE create mode 100644 R_package/NEWS.md create mode 100644 R_package/R/bind_audio_data.R create mode 100644 R_package/R/bind_bar_chart_race_data.R create mode 100644 R_package/R/bind_bubble_chart_data.R create mode 100644 R_package/R/bind_calculator_data.R create mode 100644 R_package/R/bind_cards_data.R create mode 100644 R_package/R/bind_chord_diagram_data.R create mode 100644 R_package/R/bind_draw_the_line_data.R create mode 100644 R_package/R/bind_election_results_chart_data.R create mode 100644 R_package/R/bind_gantt_data.R create mode 100644 R_package/R/bind_gauge_data.R create mode 100644 R_package/R/bind_hierarchy_data.R create mode 100644 R_package/R/bind_horserace_data.R create mode 100644 R_package/R/bind_interactive_svg_data.R create mode 100644 R_package/R/bind_line_bar_pie_data.R create mode 100644 R_package/R/bind_marimekko_data.R create mode 100644 R_package/R/bind_network_graph_data.R create mode 100644 R_package/R/bind_parliament_chart_data.R create mode 100644 R_package/R/bind_pictogram_data.R create mode 100644 R_package/R/bind_quiz_data.R create mode 100644 R_package/R/bind_radar_data.R create mode 100644 R_package/R/bind_sankey_data.R create mode 100644 R_package/R/bind_scatter_data.R create mode 100644 R_package/R/bind_slope_chart_data.R create mode 100644 R_package/R/bind_sports_data.R create mode 100644 R_package/R/bind_sports_race_data.R create mode 100644 R_package/R/bind_survey_data.R create mode 100644 R_package/R/bind_svg_annotator_data.R create mode 100644 R_package/R/bind_table_data.R create mode 100644 R_package/R/bind_text_annotator_data.R create mode 100644 R_package/R/bind_timeline_data.R create mode 100644 R_package/R/bind_tournament_data.R create mode 100644 R_package/R/bind_word_cloud_data.R create mode 100644 R_package/R/canva_upload.R create mode 100644 R_package/R/data.R create mode 100644 R_package/R/flourish.R create mode 100644 R_package/R/flourish_charts_utils.R create mode 100644 R_package/R/set_audio_details.R create mode 100644 R_package/R/set_bar_chart_race_details.R create mode 100644 R_package/R/set_bubble_chart_details.R create mode 100644 R_package/R/set_calculator_details.R create mode 100644 R_package/R/set_cards_details.R create mode 100644 R_package/R/set_chord_diagram_details.R create mode 100644 R_package/R/set_countdown_details.R create mode 100644 R_package/R/set_draw_the_line_details.R create mode 100644 R_package/R/set_election_results_chart_details.R create mode 100644 R_package/R/set_gantt_details.R create mode 100644 R_package/R/set_gauge_details.R create mode 100644 R_package/R/set_hierarchy_details.R create mode 100644 R_package/R/set_horserace_details.R create mode 100644 R_package/R/set_interactive_svg_details.R create mode 100644 R_package/R/set_line_bar_pie_details.R create mode 100644 R_package/R/set_marimekko_details.R create mode 100644 R_package/R/set_network_graph_details.R create mode 100644 R_package/R/set_number_ticker_details.R create mode 100644 R_package/R/set_parliament_chart_details.R create mode 100644 R_package/R/set_photo_slider_details.R create mode 100644 R_package/R/set_pictogram_details.R create mode 100644 R_package/R/set_quiz_details.R create mode 100644 R_package/R/set_radar_details.R create mode 100644 R_package/R/set_sankey_details.R create mode 100644 R_package/R/set_scatter_details.R create mode 100644 R_package/R/set_slope_chart_details.R create mode 100644 R_package/R/set_sports_details.R create mode 100644 R_package/R/set_sports_race_details.R create mode 100644 R_package/R/set_survey_details.R create mode 100644 R_package/R/set_svg_annotator_details.R create mode 100644 R_package/R/set_table_details.R create mode 100644 R_package/R/set_text_annotator_details.R create mode 100644 R_package/R/set_timeline_details.R create mode 100644 R_package/R/set_tournament_details.R create mode 100644 R_package/R/set_word_cloud_details.R create mode 100644 R_package/R/sysdata.rda create mode 100644 R_package/README.md create mode 100644 R_package/cran-comments.md create mode 100644 R_package/data-raw/flourish_api_documentation.R create mode 100644 R_package/data/flourish_api_documentation.rda create mode 100644 R_package/data/gapminder.rda create mode 100644 R_package/inst/README.md create mode 100644 R_package/inst/extdata/flourish_api_documentation.csv create mode 100644 R_package/inst/extdata/gapminder.csv create mode 100644 R_package/inst/htmlwidgets/flourish-live.js create mode 100644 R_package/inst/htmlwidgets/flourish-live.yaml create mode 100644 R_package/inst/htmlwidgets/lib/flourish-live/flourish-live-5.1.0.js create mode 100644 R_package/inst/htmlwidgets/lib/flourish-live/flourish-live.js.map create mode 100644 R_package/inst/htmlwidgets/lib/flourish-live/flourish.css create mode 100644 R_package/man/bind_audio_data.Rd create mode 100644 R_package/man/bind_bar_chart_race_data.Rd create mode 100644 R_package/man/bind_bubble_chart_data.Rd create mode 100644 R_package/man/bind_calculator_data.Rd create mode 100644 R_package/man/bind_cards_data.Rd create mode 100644 R_package/man/bind_chord_diagram_data.Rd create mode 100644 R_package/man/bind_draw_the_line_data.Rd create mode 100644 R_package/man/bind_election_results_chart_data.Rd create mode 100644 R_package/man/bind_gantt_data.Rd create mode 100644 R_package/man/bind_gauge_data.Rd create mode 100644 R_package/man/bind_hierarchy_data.Rd create mode 100644 R_package/man/bind_horserace_data.Rd create mode 100644 R_package/man/bind_interactive_svg_data.Rd create mode 100644 R_package/man/bind_line_bar_pie_data.Rd create mode 100644 R_package/man/bind_marimekko_data.Rd create mode 100644 R_package/man/bind_network_graph_data.Rd create mode 100644 R_package/man/bind_parliament_chart_data.Rd create mode 100644 R_package/man/bind_pictogram_data.Rd create mode 100644 R_package/man/bind_quiz_data.Rd create mode 100644 R_package/man/bind_radar_data.Rd create mode 100644 R_package/man/bind_sankey_data.Rd create mode 100644 R_package/man/bind_scatter_data.Rd create mode 100644 R_package/man/bind_slope_chart_data.Rd create mode 100644 R_package/man/bind_sports_data.Rd create mode 100644 R_package/man/bind_sports_race_data.Rd create mode 100644 R_package/man/bind_survey_data.Rd create mode 100644 R_package/man/bind_svg_annotator_data.Rd create mode 100644 R_package/man/bind_table_data.Rd create mode 100644 R_package/man/bind_text_annotator_data.Rd create mode 100644 R_package/man/bind_timeline_data.Rd create mode 100644 R_package/man/bind_tournament_data.Rd create mode 100644 R_package/man/bind_word_cloud_data.Rd create mode 100644 R_package/man/flourish.Rd create mode 100644 R_package/man/flourish_api_documentation.Rd create mode 100644 R_package/man/gapminder.Rd create mode 100644 R_package/man/set_audio_details.Rd create mode 100644 R_package/man/set_bar_chart_race_details.Rd create mode 100644 R_package/man/set_bubble_chart_details.Rd create mode 100644 R_package/man/set_calculator_details.Rd create mode 100644 R_package/man/set_cards_details.Rd create mode 100644 R_package/man/set_chord_diagram_details.Rd create mode 100644 R_package/man/set_countdown_details.Rd create mode 100644 R_package/man/set_draw_the_line_details.Rd create mode 100644 R_package/man/set_election_results_chart_details.Rd create mode 100644 R_package/man/set_gantt_details.Rd create mode 100644 R_package/man/set_gauge_details.Rd create mode 100644 R_package/man/set_hierarchy_details.Rd create mode 100644 R_package/man/set_horserace_details.Rd create mode 100644 R_package/man/set_interactive_svg_details.Rd create mode 100644 R_package/man/set_line_bar_pie_details.Rd create mode 100644 R_package/man/set_marimekko_details.Rd create mode 100644 R_package/man/set_network_graph_details.Rd create mode 100644 R_package/man/set_number_ticker_details.Rd create mode 100644 R_package/man/set_parliament_chart_details.Rd create mode 100644 R_package/man/set_photo_slider_details.Rd create mode 100644 R_package/man/set_pictogram_details.Rd create mode 100644 R_package/man/set_quiz_details.Rd create mode 100644 R_package/man/set_radar_details.Rd create mode 100644 R_package/man/set_sankey_details.Rd create mode 100644 R_package/man/set_scatter_details.Rd create mode 100644 R_package/man/set_slope_chart_details.Rd create mode 100644 R_package/man/set_sports_details.Rd create mode 100644 R_package/man/set_sports_race_details.Rd create mode 100644 R_package/man/set_survey_details.Rd create mode 100644 R_package/man/set_svg_annotator_details.Rd create mode 100644 R_package/man/set_table_details.Rd create mode 100644 R_package/man/set_text_annotator_details.Rd create mode 100644 R_package/man/set_timeline_details.Rd create mode 100644 R_package/man/set_tournament_details.Rd create mode 100644 R_package/man/set_word_cloud_details.Rd create mode 100644 R_package/tests/testthat.R create mode 100644 R_package/tests/testthat/test-name.R create mode 100644 R_package/vignettes/.gitignore create mode 100644 R_package/vignettes/api_keys.Rmd create mode 100644 R_package/vignettes/flourish.Rmd create mode 100644 changelog.md create mode 100644 python_package/LICENSE.txt create mode 100644 python_package/MANIFEST.in create mode 100644 python_package/Pipfile create mode 100644 python_package/Pipfile.lock create mode 100644 python_package/README.md create mode 100644 python_package/flourishcharts/__init__.py create mode 100644 python_package/flourishcharts/_utils.py create mode 100644 python_package/flourishcharts/_version.py create mode 100644 python_package/flourishcharts/bindings.py create mode 100644 python_package/flourishcharts/data/flourish_api_documentation.csv create mode 100644 python_package/flourishcharts/data/gapminder.csv create mode 100644 python_package/flourishcharts/datasets/__init__.py create mode 100644 python_package/flourishcharts/datasets/gapminder.py create mode 100644 python_package/flourishcharts/details.py create mode 100644 python_package/flourishcharts/flourish.py create mode 100644 python_package/flourishcharts/flourish_docs/__init__.py create mode 100644 python_package/flourishcharts/flourish_docs/reference.py create mode 100644 python_package/flourishcharts/internal_data/internal_templates.csv create mode 100644 python_package/flourishcharts/static/widget.css create mode 100644 python_package/flourishcharts/static/widget.js create mode 100644 python_package/flourishcharts/tests/__init__.py create mode 100644 python_package/flourishcharts/tests/__pycache__/test_bindings.cpython-39.pyc create mode 100644 python_package/flourishcharts/tests/__pycache__/test_data.cpython-39.pyc create mode 100644 python_package/flourishcharts/tests/__pycache__/test_details.cpython-39.pyc create mode 100644 python_package/flourishcharts/tests/test_bindings.py create mode 100644 python_package/flourishcharts/tests/test_data.py create mode 100644 python_package/flourishcharts/tests/test_details.py create mode 100644 python_package/js/widget.css create mode 100644 python_package/js/widget.ts create mode 100644 python_package/lib/extension.d.ts create mode 100644 python_package/lib/extension.js create mode 100644 python_package/lib/extension.js.map create mode 100644 python_package/lib/flourish.d.ts create mode 100644 python_package/lib/flourish.js create mode 100644 python_package/lib/flourish.js.map create mode 100644 python_package/lib/index.d.ts create mode 100644 python_package/lib/index.js create mode 100644 python_package/lib/index.js.map create mode 100644 python_package/lib/plugin.d.ts create mode 100644 python_package/lib/plugin.js create mode 100644 python_package/lib/plugin.js.map create mode 100644 python_package/lib/version.d.ts create mode 100644 python_package/lib/version.js create mode 100644 python_package/lib/version.js.map create mode 100644 python_package/package-lock.json create mode 100644 python_package/package.json create mode 100644 python_package/pyproject.toml create mode 100644 python_package/pytest.ini create mode 100644 python_package/setup.cfg create mode 100644 python_package/setup.py create mode 100644 python_package/tsconfig.json create mode 100644 utils/img/alluvial.png create mode 100644 utils/img/canva-circle.svg create mode 100644 utils/img/canva-dev.svg create mode 100644 utils/img/canva-flourish.svg create mode 100644 utils/img/canva-icon.svg create mode 100644 utils/img/canva-logo.svg create mode 100644 utils/img/flourish-dev.svg create mode 100644 utils/img/rbc.png create mode 100644 utils/img/scatter.png diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aaba448 --- /dev/null +++ b/.gitignore @@ -0,0 +1,109 @@ +# Backup files +*.DS_Store +.envrc + +# Editors +.idea +.vscode/ +.editorconfig +*.code-workspace + +# Images +*.png + +# Compiled pystan models +model-*.p + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +ve/ + + + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +# R packaging +.Rproj.user +.Rhistory + +# Java +.classpath +.project +.settings/ + +# Julia +Manifest.toml + +/python_package/node_modules/ + +.env + +Pipfile.lock \ No newline at end of file diff --git a/README.md b/README.md index 24ccb85..a2bd51c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,58 @@ -# flourishcharts -Interactive data visualization Python and R packages for data scientists. +## `flourishcharts`: Flourish in R & Python + +| | | | +| ------------- | ------------- | ------------- | +[![Scatterplot](utils/img/scatter.png)]() | [![Bar chart race](utils/img/rbc.png)]() | [![Sankey diagram](utils/img/alluvial.png)]() | +| | | + +Interactive data visualization for data practitioners. `flourishcharts` allows users to visualize their data +using Flourish charts that are grounded in data storytelling principles. Users can create racing bar & line +charts, as well as other interactive elements commonly found in d3.js graphics, easily in R and Python. +The package relies on an enterprise API provided by Flourish. + +### Python package installation + +You can install to a specific virtual env by using `pipenv`: + +``` +pipenv install flourishcharts +``` + +or to your global Python installation with `pip`: + +``` +python3 -m pip install --upgrade flourishcharts +``` + +### R package installation +Install from CRAN via: + +``` +install.packages("flourishcharts") +``` + +Alternatively, install from GitHub: + +``` +remotes::install_git("canva-public/flourishcharts", subdir="R_package") +``` + +### Key info + +Grab a Flourish API key from [https://app.flourish.studio/settings](https://app.flourish.studio/settings). Store in one of two places, depending on language used: + +* Python: in the `~/.envrc` file for the Python environment or, alternatively, your `~/.zshrc` or `~/.bashrc` file. + +``` +export FLOURISH_API_KEY="..." +``` + +* R: In your `~/.Renviron` file: + +``` +FLOURISH_API_KEY = "..." +``` + +### Any issues? + +Please log an issue in the GitHub repository. diff --git a/R_package/DESCRIPTION b/R_package/DESCRIPTION new file mode 100644 index 0000000..5a58b30 --- /dev/null +++ b/R_package/DESCRIPTION @@ -0,0 +1,45 @@ +Package: flourishcharts +Title: Flourish for R and Python +Version: 1.0.0.0 +Authors@R: c( + person(given = "Zoe", + family = "Meers", + role = c("aut", "cre", "trl", "cph"), + email = "zoe.m@canva.com"), + person(given = "Alex", + family = "Sadleir", + role = c("aut"), + email = "alexs@canva.com"), + person(given = "Luisa", + family = "Bider", + role = c("aut"), + email = "luisa@canva.com") + ) +Description: Interactive data visualization for data practitioners. 'flourishcharts' allows users to visualize their data + using Flourish charts that are grounded in data storytelling principles. Users can create racing bar & line + charts, as well as other interactive elements commonly found in d3 graphics, easily in R and Python. + The package relies on an enterprise API provided by Flourish. +License: MIT + file LICENSE +Encoding: UTF-8 +Language: en +LazyData: true +Roxygen: list(markdown = TRUE) +RoxygenNote: 7.3.2 +Suggests: + testthat (>= 3.2.0), + knitr, + rmarkdown, + reticulate, + tidyr, + here +Config/testthat/edition: 3 +Depends: + R (>= 4.00) +Imports: + htmlwidgets, + htmltools, + jsonlite, + dplyr, + httr, + utils +VignetteBuilder: knitr diff --git a/R_package/LICENSE b/R_package/LICENSE new file mode 100644 index 0000000..915684a --- /dev/null +++ b/R_package/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2024 +COPYRIGHT HOLDER: flourishcharts authors diff --git a/R_package/LICENSE.md b/R_package/LICENSE.md new file mode 100644 index 0000000..1832d9f --- /dev/null +++ b/R_package/LICENSE.md @@ -0,0 +1,21 @@ +# MIT License + +Copyright (c) 2024 flourishcharts authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/R_package/NAMESPACE b/R_package/NAMESPACE new file mode 100644 index 0000000..098ba17 --- /dev/null +++ b/R_package/NAMESPACE @@ -0,0 +1,70 @@ +# Generated by roxygen2: do not edit by hand + +export(bind_audio_data) +export(bind_bar_chart_race_data) +export(bind_bubble_chart_data) +export(bind_calculator_data) +export(bind_cards_data) +export(bind_chord_diagram_data) +export(bind_draw_the_line_data) +export(bind_election_results_chart_data) +export(bind_gantt_data) +export(bind_gauge_data) +export(bind_hierarchy_data) +export(bind_horserace_data) +export(bind_interactive_svg_data) +export(bind_line_bar_pie_data) +export(bind_marimekko_data) +export(bind_network_graph_data) +export(bind_parliament_chart_data) +export(bind_pictogram_data) +export(bind_quiz_data) +export(bind_radar_data) +export(bind_sankey_data) +export(bind_scatter_data) +export(bind_slope_chart_data) +export(bind_sports_data) +export(bind_sports_race_data) +export(bind_survey_data) +export(bind_svg_annotator_data) +export(bind_table_data) +export(bind_text_annotator_data) +export(bind_timeline_data) +export(bind_tournament_data) +export(bind_word_cloud_data) +export(flourish) +export(set_audio_details) +export(set_bar_chart_race_details) +export(set_bubble_chart_details) +export(set_calculator_details) +export(set_cards_details) +export(set_chord_diagram_details) +export(set_countdown_details) +export(set_draw_the_line_details) +export(set_election_results_chart_details) +export(set_gantt_details) +export(set_gauge_details) +export(set_hierarchy_details) +export(set_horserace_details) +export(set_interactive_svg_details) +export(set_line_bar_pie_details) +export(set_marimekko_details) +export(set_network_graph_details) +export(set_number_ticker_details) +export(set_parliament_chart_details) +export(set_photo_slider_details) +export(set_pictogram_details) +export(set_quiz_details) +export(set_radar_details) +export(set_sankey_details) +export(set_scatter_details) +export(set_slope_chart_details) +export(set_sports_details) +export(set_sports_race_details) +export(set_survey_details) +export(set_svg_annotator_details) +export(set_table_details) +export(set_text_annotator_details) +export(set_timeline_details) +export(set_tournament_details) +export(set_word_cloud_details) diff --git a/R_package/NEWS.md b/R_package/NEWS.md new file mode 100644 index 0000000..7f77518 --- /dev/null +++ b/R_package/NEWS.md @@ -0,0 +1,289 @@ +## 2024-08-23: R pkg v1.0.0.0, Python pkg v1.0.0.0 +The package has been renamed to `flourishcharts` and package versions reset to v1.0.0.0. + +## 2024-08-22: R pkg v1.9.17.13, Python pkg v1.9.13.15 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 16.1.1 | 16.1.2 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 3.1.1 | 3.1.2 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/cards | 11.1.1 | 11.1.2 | update | `[bind/set]_cards_[data/details]` | +| @flourish/draw-the-line | 7.1.1 | 7.1.2 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 9.2.1 | 9.2.2 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 9.1.1 | 9.1.2 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/hierarchy | 20.1.3 | 20.1.4 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/line-bar-pie | 32.2.3 | 32.3.2 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 3.1.2 | 3.1.4 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 12.1.1 | 12.1.2 | update | `[bind/set]_network_[data/details]` | +| @flourish/parliament-chart | 8.2.0 | 8.2.1 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/pictogram | 6.1.1 | 6.1.2 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/radar | 4.1.1 | 4.1.2 | update | `[bind/set]_radar_[data/details]` | +| @flourish/scatter | 22.2.1 | 22.2.3 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 13.2.0 | 13.2.1 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 9.1.1 | 9.1.2 | update | `[bind/set]_sports_[data/details]` | +| @flourish/survey | 14.1.1 | 14.1.3 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 17.1.2 | 17.2.1 | update | `[bind/set]_table_[data/details]` | +| @flourish/timeline | 2.1.1 | 2.1.2 | update | `[bind/set]_timeline_[data/details]` | + +## 2024-08-05: R pkg v1.9.16.12, Python pkg v1.9.12.14 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:----------------------|:--------------|:--------------|:---------|:--------------------------------------| +| @flourish/hierarchy | 20.1.2 | 20.1.3 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/marimekko | 3.1.1 | 3.1.2 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/sankey | 10.10.1 | 10.10.2 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/slope-chart | 13.1.2 | 13.2.0 | update | `[bind/set]_slope_[data/details]` | + +## 2024-07-23: R pkg v1.9.15.11, Python pkg v1.9.11.13 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 16.1.0 | 16.1.1 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 3.1.0 | 3.1.1 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/calculator | 1.7.0 | 1.7.1 | update | `[bind/set]_calculator_[data/details]` | +| @flourish/cards | 11.1.0 | 11.1.1 | update | `[bind/set]_cards_[data/details]` | +| @flourish/chord-diagram | 8.6.0 | 8.6.1 | update | `[bind/set]_chord_diagram_[data/details]` | +| @flourish/countdown | 2.7.0 | 2.7.1 | update | `[bind/set]_countdown_[data/details]` | +| @flourish/draw-the-line | 7.1.0 | 7.1.1 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 9.2.0 | 9.2.1 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 9.1.0 | 9.1.1 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/gauge | 1.8.0 | 1.8.1 | update | `[bind/set]_gauge_[data/details]` | +| @flourish/hierarchy | 20.1.0 | 20.1.2 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/horserace | 16.2.0 | 16.2.1 | update | `[bind/set]_horserace_[data/details]` | +| @flourish/interactive-svg | 8.3.0 | 8.3.1 | update | `[bind/set]_interactive_svg_[data/details]` | +| @flourish/line-bar-pie | 32.1.0 | 32.2.3 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 3.1.0 | 3.1.1 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 12.1.0 | 12.1.1 | update | `[bind/set]_network_[data/details]` | +| @flourish/number-ticker | 1.7.0 | 1.7.1 | update | `[bind/set]_number_ticker_[data/details]` | +| @flourish/photo-slider | 4.7.0 | 4.7.1 | update | `[bind/set]_photo_slider_[data/details]` | +| @flourish/pictogram | 6.1.0 | 6.1.1 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/quiz | 7.7.0 | 7.7.1 | update | `[bind/set]_quiz_[data/details]` | +| @flourish/radar | 4.1.0 | 4.1.1 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.10.0 | 10.10.1 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 22.2.0 | 22.2.1 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 13.1.0 | 13.1.2 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 9.1.0 | 9.1.1 | update | `[bind/set]_sports_[data/details]` | +| @flourish/sports-race | 2.6.0 | 2.6.1 | update | `[bind/set]_sports_race_[data/details]` | +| @flourish/survey | 14.1.0 | 14.1.1 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 17.1.0 | 17.1.2 | update | `[bind/set]_table_[data/details]` | +| @flourish/text-annotator | 3.9.0 | 3.9.1 | update | `[bind/set]_text_annotator_[data/details]` | +| @flourish/timeline | 2.1.0 | 2.1.1 | update | `[bind/set]_timeline_[data/details]` | +| @flourish/tournament | 1.7.0 | 1.7.1 | update | `[bind/set]_tournament_[data/details]` | +| @flourish/word-cloud | 3.10.0 | 3.10.1 | update | `[bind/set]_word_cloud_[data/details]` | + +## 2024-07-05: R pkg v1.9.14.10, Python pkg v1.9.10.12 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/audio | 1.5.0 | 1.6.0 | update | `[bind/set]_audio_[data/details]` | +| @flourish/bar-chart-race | 16.0.0 | 16.1.0 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 3.0.0 | 3.1.0 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/calculator | 1.6.0 | 1.7.0 | update | `[bind/set]_calculator_[data/details]` | +| @flourish/cards | 11.0.0 | 11.1.0 | update | `[bind/set]_cards_[data/details]` | +| @flourish/chord-diagram | 8.5.0 | 8.6.0 | update | `[bind/set]_chord_diagram_[data/details]` | +| @flourish/countdown | 2.6.0 | 2.7.0 | update | `[bind/set]_countdown_[data/details]` | +| @flourish/draw-the-line | 7.0.0 | 7.1.0 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 9.0.0 | 9.2.0 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 9.0.0 | 9.1.0 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/gauge | 1.7.0 | 1.8.0 | update | `[bind/set]_gauge_[data/details]` | +| @flourish/hierarchy | 20.0.0 | 20.1.0 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/horserace | 16.1.0 | 16.2.0 | update | `[bind/set]_horserace_[data/details]` | +| @flourish/interactive-svg | 8.2.2 | 8.3.0 | update | `[bind/set]_interactive_svg_[data/details]` | +| @flourish/line-bar-pie | 32.0.0 | 32.1.0 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 3.0.0 | 3.1.0 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 12.0.0 | 12.1.0 | update | `[bind/set]_network_[data/details]` | +| @flourish/number-ticker | 1.6.0 | 1.7.0 | update | `[bind/set]_number_ticker_[data/details]` | +| @flourish/parliament-chart | 8.0.0 | 8.2.0 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/photo-slider | 4.6.0 | 4.7.0 | update | `[bind/set]_photo_slider_[data/details]` | +| @flourish/pictogram | 6.0.0 | 6.1.0 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/quiz | 7.6.0 | 7.7.0 | update | `[bind/set]_quiz_[data/details]` | +| @flourish/radar | 4.0.0 | 4.1.0 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.9.1 | 10.10.0 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 22.0.0 | 22.2.0 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 13.0.0 | 13.1.0 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 9.0.0 | 9.1.0 | update | `[bind/set]_sports_[data/details]` | +| @flourish/sports-race | 2.5.0 | 2.6.0 | update | `[bind/set]_sports_race_[data/details]` | +| @flourish/survey | 14.0.0 | 14.1.0 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 17.0.0 | 17.1.0 | update | `[bind/set]_table_[data/details]` | +| @flourish/text-annotator | 3.8.0 | 3.9.0 | update | `[bind/set]_text_annotator_[data/details]` | +| @flourish/timeline | 2.0.0 | 2.1.0 | update | `[bind/set]_timeline_[data/details]` | +| @flourish/tournament | 1.6.1 | 1.7.0 | update | `[bind/set]_tournament_[data/details]` | +| @flourish/word-cloud | 3.9.1 | 3.10.0 | update | `[bind/set]_word_cloud_[data/details]` | + +## 2024-06-23: R pkg v1.9.13.10, Python pkg v1.9.9.12 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:--------------------------|:--------------|:--------------|:---------|:--------------------------------------------| +| @flourish/audio | | 1.5.0 | add | `[bind/set]_audio_[data/details]` | +| @flourish/calculator | | 1.6.0 | add | `[bind/set]_calculator_[data/details]` | +| @flourish/countdown | | 2.6.0 | add | `[bind/set]_countdown_[data/details]` | +| @flourish/interactive-svg | | 8.2.2 | add | `[bind/set]_interactive_svg_[data/details]` | +| @flourish/number-ticker | | 1.6.0 | add | `[bind/set]_number_ticker_[data/details]` | +| @flourish/photo-slider | | 4.6.0 | add | `[bind/set]_photo_slider_[data/details]` | +| @flourish/svg-annotator | | 6.0.2 | add | `[bind/set]_svg_annotator_[data/details]` | +| @flourish/text-annotator | | 3.8.0 | add | `[bind/set]_text_annotator_[data/details]` | + +## 2024-06-21: R pkg v1.8.13.10, Python pkg v1.8.9.12 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 15.11.1 | 16.0.0 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 2.3.1 | 3.0.0 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/cards | 10.10.1 | 11.0.0 | update | `[bind/set]_cards_[data/details]` | +| @flourish/draw-the-line | 6.5.1 | 7.0.0 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 8.11.1 | 9.0.0 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 8.11.1 | 9.0.0 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/hierarchy | 19.11.1 | 20.0.0 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/line-bar-pie | 31.1.1 | 32.0.0 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 2.6.1 | 3.0.0 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 11.10.1 | 12.0.0 | update | `[bind/set]_network_[data/details]` | +| @flourish/parliament-chart | 7.9.3 | 8.0.0 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/pictogram | 5.6.1 | 6.0.0 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/radar | 3.10.2 | 4.0.0 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.9.0 | 10.9.1 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 21.0.0 | 22.0.0 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 12.12.1 | 13.0.0 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 8.1.1 | 9.0.0 | update | `[bind/set]_sports_[data/details]` | +| @flourish/survey | 13.3.2 | 14.0.0 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 16.7.1 | 17.0.0 | update | `[bind/set]_table_[data/details]` | +| @flourish/timeline | 1.11.1 | 2.0.0 | update | `[bind/set]_timeline_[data/details]` | +| @flourish/tournament | 1.6.0 | 1.6.1 | update | `[bind/set]_tournament_[data/details]` | +| @flourish/word-cloud | 3.9.0 | 3.9.1 | update | `[bind/set]_word_cloud_[data/details]` | + +## 2024-06-05: R pkg v1.7.13.9, Python pkg v1.7.9.11 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------|:--------------|:--------------|:---------|:-----------------------------------------| +| @flourish/line-bar-pie | 31.0.0 | 31.1.1 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/parliament-chart | 7.9.1 | 7.9.3 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/scatter | 20.8.1 | 21.0.0 | update | `[bind/set]_scatter_[data/details]` | + +## 2024-05-23: R pkg v1.6.12.7, Python pkg v1.6.8.9 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 15.10.0 | 15.11.1 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 2.3.0 | 2.3.1 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/cards | 10.9.0 | 10.10.1 | update | `[bind/set]_cards_[data/details]` | +| @flourish/draw-the-line | 6.5.0 | 6.5.1 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 8.10.0 | 8.11.1 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 8.10.0 | 8.11.1 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/hierarchy | 19.10.0 | 19.11.1 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/line-bar-pie | 30.5.0 | 31.0.0 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 2.6.0 | 2.6.1 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 11.10.0 | 11.10.1 | update | `[bind/set]_network_[data/details]` | +| @flourish/parliament-chart | 7.8.0 | 7.9.1 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/pictogram | 5.6.0 | 5.6.1 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/radar | 3.10.0 | 3.10.2 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.8.0 | 10.9.0 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 20.7.0 | 20.8.1 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 12.11.0 | 12.12.1 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 8.0.0 | 8.1.1 | update | `[bind/set]_sports_[data/details]` | +| @flourish/survey | 13.3.1 | 13.3.2 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 16.7.0 | 16.7.1 | update | `[bind/set]_table_[data/details]` | +| @flourish/timeline | 1.11.0 | 1.11.1 | update | `[bind/set]_timeline_[data/details]` | + +## 2024-05-16: R pkg v1.5.11.6, Python pkg v1.5.7.8 + +Increased support for ensuring data types (metadata) work within `canviz`, as well as allowing for conversion of integers before passing integer variables to the JavaScript API (JavaScript does not natively support integers, but R and Python do). + +## 2024-05-09: R pkg v1.5.11.5, Python pkg v1.5.7.6 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:-----------------------|:--------------|:--------------|:---------|:-----------------------------------------| +| @flourish/line-bar-pie | 30.4.0 | 30.5.0 | update | `[bind/set]_line_bar_pie_[data/details]` | + +## 2024-05-07: R pkg v1.5.10.5, Python pkg v1.5.6.6 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 15.9.0 | 15.10.0 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 2.2.0 | 2.3.0 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/cards | 10.8.0 | 10.9.0 | update | `[bind/set]_cards_[data/details]` | +| @flourish/chord-diagram | 8.4.5 | 8.5.0 | update | `[bind/set]_chord_diagram_[data/details]` | +| @flourish/draw-the-line | 6.4.0 | 6.5.0 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 8.9.0 | 8.10.0 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 8.9.0 | 8.10.0 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/gauge | 1.6.4 | 1.7.0 | update | `[bind/set]_gauge_[data/details]` | +| @flourish/hierarchy | 19.9.0 | 19.10.0 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/horserace | 16.0.2 | 16.1.0 | update | `[bind/set]_horserace_[data/details]` | +| @flourish/line-bar-pie | 30.2.2 | 30.4.0 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 2.5.0 | 2.6.0 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 11.9.1 | 11.10.0 | update | `[bind/set]_network_[data/details]` | +| @flourish/parliament-chart | 7.7.1 | 7.8.0 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/pictogram | 5.5.0 | 5.6.0 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/quiz | 7.5.5 | 7.6.0 | update | `[bind/set]_quiz_[data/details]` | +| @flourish/radar | 3.9.0 | 3.10.0 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.7.9 | 10.8.0 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 20.6.0 | 20.7.0 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 12.10.0 | 12.11.0 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 7.2.0 | 8.0.0 | update | `[bind/set]_sports_[data/details]` | +| @flourish/sports-race | 2.4.2 | 2.5.0 | update | `[bind/set]_sports_race_[data/details]` | +| @flourish/survey | 13.2.1 | 13.3.1 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 16.6.0 | 16.7.0 | update | `[bind/set]_table_[data/details]` | +| @flourish/timeline | 1.10.0 | 1.11.0 | update | `[bind/set]_timeline_[data/details]` | +| @flourish/tournament | 1.5.9 | 1.6.0 | update | `[bind/set]_tournament_[data/details]` | +| @flourish/word-cloud | 3.8.7 | 3.9.0 | update | `[bind/set]_word_cloud_[data/details]` | + +## 2024-04-26: R pkg v1.4.9.5, Python pkg v1.4.5.6 + +The `chart.ChartLayoutMixin` subclass has been deprecated and removed from the Python package. The `chart_...()` functions have been removed from the R package. All parameters in these functions can now be found in the respective `set_..._details()` function for each template. + +## 2024-04-26: R pkg v1.2.8.5, Python pkg v1.2.4.6 + +The Flourish Live API was updated to v5.1.0. + +## 2024-04-23: R pkg v0.2.8.5, Python pkg v0.2.4.6 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 15.4.2 | 15.9.0 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 1.6.1 | 2.2.0 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/cards | 10.4.1 | 10.8.0 | update | `[bind/set]_cards_[data/details]` | +| @flourish/chord-diagram | 8.3.2 | 8.4.5 | update | `[bind/set]_chord_diagram_[data/details]` | +| @flourish/draw-the-line | 6.1.1 | 6.4.0 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 8.5.1 | 8.9.0 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 8.5.1 | 8.9.0 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/gauge | 1.4.1 | 1.6.4 | update | `[bind/set]_gauge_[data/details]` | +| @flourish/hierarchy | 19.3.1 | 19.9.0 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/horserace | 15.2.0 | 16.0.2 | update | `[bind/set]_horserace_[data/details]` | +| @flourish/line-bar-pie | 27.6.7 | 30.2.2 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 2.1.2 | 2.5.0 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 11.5.2 | 11.9.1 | update | `[bind/set]_network_[data/details]` | +| @flourish/parliament-chart | 7.4.1 | 7.7.1 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/pictogram | 5.1.1 | 5.5.0 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/quiz | 7.4.1 | 7.5.5 | update | `[bind/set]_quiz_[data/details]` | +| @flourish/radar | 3.4.1 | 3.9.0 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.3.2 | 10.7.9 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 20.2.2 | 20.6.0 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 12.6.1 | 12.10.0 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 6.3.1 | 7.2.0 | update | `[bind/set]_sports_[data/details]` | +| @flourish/sports-race | 2.2.1 | 2.4.2 | update | `[bind/set]_sports_race_[data/details]` | +| @flourish/survey | 12.6.1 | 13.2.1 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 16.3.2 | 16.6.0 | update | `[bind/set]_table_[data/details]` | +| @flourish/timeline | 1.7.1 | 1.10.0 | update | `[bind/set]_timeline_[data/details]` | +| @flourish/tournament | 1.3.1 | 1.5.9 | update | `[bind/set]_tournament_[data/details]` | +| @flourish/word-cloud | 3.5.1 | 3.8.7 | update | `[bind/set]_word_cloud_[data/details]` | + diff --git a/R_package/R/bind_audio_data.R b/R_package/R/bind_audio_data.R new file mode 100644 index 0000000..74a934c --- /dev/null +++ b/R_package/R/bind_audio_data.R @@ -0,0 +1,153 @@ +#' Bind audio data +#' @name bind_audio_data +#' @param data Data. +#' @param url Audio URL. The URL of a publicly readable MP3 file. Suggested data type hints: string. Flourish type hint: column +#' @param title Audio title. Suggested data type hints: string. Flourish type hint: column +#' @param subtitle Audio subtitle. Suggested data type hints: string. Flourish type hint: column +#' @param filter Filter. Suggested data type hints: string, number. Flourish type hint: column +#' @param url_input_format Formats/parses dates, strings, and numbers for the url column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param url_output_format Formats/parses dates, strings, and numbers for the url column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param subtitle_input_format Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param subtitle_output_format Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param title_input_format Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param title_output_format Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_input_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_output_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "audio", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_audio_data(gapminder) +#' ) +#' @export + +bind_audio_data <- function( + ., + data = NULL, + url = NULL, + title = NULL, + subtitle = NULL, + filter = NULL, + url_input_format = NULL, + url_output_format = NULL, + subtitle_input_format = NULL, + subtitle_output_format = NULL, + title_input_format = NULL, + title_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL) { + bindings_error(., "audio") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(url), paste(title), paste(subtitle), paste(filter), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$url <- url + new_list$x$bindings$data$title <- title + new_list$x$bindings$data$subtitle <- subtitle + new_list$x$bindings$data$filter <- filter + + + if (!is.null(url_output_format) && !is.null(url_input_format)) { + if (isTRUE(grepl("^%", url_output_format))) { + new_list$x$metadata$data$url$type <- "datetime" + new_list$x$metadata$data$url$type_id <- paste0("datetime$", url_input_format) + new_list$x$metadata$data$url$output_format_id <- paste0("datetime$", url_output_format) + } else if (isTRUE(grepl("_", url_output_format))) { + new_list$x$metadata$data$url$type <- "number" + new_list$x$metadata$data$url$type_id <- paste0("number$", url_input_format) + new_list$x$metadata$data$url$output_format_id <- paste0("number$", url_output_format) + } else if (isTRUE(!is.na(url_output_format) && isFALSE(grepl("_", url_output_format)) && isFALSE(grepl("^%", url_output_format)))) { + new_list$x$metadata$data$url$type <- "string" + new_list$x$metadata$data$url$type_id <- paste0("string$", url_input_format) + new_list$x$metadata$data$url$output_format_id <- paste0("string$", url_output_format) + } + if (is.na(url_input_format) && !is.na(url_output_format)) { + "[url_input_format] and [url_output_format] must both be defined." + } + if (!is.na(url_input_format) && is.na(url_output_format)) { + "[url_input_format] and [url_output_format] must both be defined." + } + } + + + if (!is.null(title_output_format) && !is.null(title_input_format)) { + if (isTRUE(grepl("^%", title_output_format))) { + new_list$x$metadata$data$title$type <- "datetime" + new_list$x$metadata$data$title$type_id <- paste0("datetime$", title_input_format) + new_list$x$metadata$data$title$output_format_id <- paste0("datetime$", title_output_format) + } else if (isTRUE(grepl("_", title_output_format))) { + new_list$x$metadata$data$title$type <- "number" + new_list$x$metadata$data$title$type_id <- paste0("number$", title_input_format) + new_list$x$metadata$data$title$output_format_id <- paste0("number$", title_output_format) + } else if (isTRUE(!is.na(title_output_format) && isFALSE(grepl("_", title_output_format)) && isFALSE(grepl("^%", title_output_format)))) { + new_list$x$metadata$data$title$type <- "string" + new_list$x$metadata$data$title$type_id <- paste0("string$", title_input_format) + new_list$x$metadata$data$title$output_format_id <- paste0("string$", title_output_format) + } + if (is.na(title_input_format) && !is.na(title_output_format)) { + "[title_input_format] and [title_output_format] must both be defined." + } + if (!is.na(title_input_format) && is.na(title_output_format)) { + "[title_input_format] and [title_output_format] must both be defined." + } + } + + + if (!is.null(subtitle_output_format) && !is.null(subtitle_input_format)) { + if (isTRUE(grepl("^%", subtitle_output_format))) { + new_list$x$metadata$data$subtitle$type <- "datetime" + new_list$x$metadata$data$subtitle$type_id <- paste0("datetime$", subtitle_input_format) + new_list$x$metadata$data$subtitle$output_format_id <- paste0("datetime$", subtitle_output_format) + } else if (isTRUE(grepl("_", subtitle_output_format))) { + new_list$x$metadata$data$subtitle$type <- "number" + new_list$x$metadata$data$subtitle$type_id <- paste0("number$", subtitle_input_format) + new_list$x$metadata$data$subtitle$output_format_id <- paste0("number$", subtitle_output_format) + } else if (isTRUE(!is.na(subtitle_output_format) && isFALSE(grepl("_", subtitle_output_format)) && isFALSE(grepl("^%", subtitle_output_format)))) { + new_list$x$metadata$data$subtitle$type <- "string" + new_list$x$metadata$data$subtitle$type_id <- paste0("string$", subtitle_input_format) + new_list$x$metadata$data$subtitle$output_format_id <- paste0("string$", subtitle_output_format) + } + if (is.na(subtitle_input_format) && !is.na(subtitle_output_format)) { + "[subtitle_input_format] and [subtitle_output_format] must both be defined." + } + if (!is.na(subtitle_input_format) && is.na(subtitle_output_format)) { + "[subtitle_input_format] and [subtitle_output_format] must both be defined." + } + } + + + if (!is.null(filter_output_format) && !is.null(filter_input_format)) { + if (isTRUE(grepl("^%", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "datetime" + new_list$x$metadata$data$filter$type_id <- paste0("datetime$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("datetime$", filter_output_format) + } else if (isTRUE(grepl("_", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "number" + new_list$x$metadata$data$filter$type_id <- paste0("number$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("number$", filter_output_format) + } else if (isTRUE(!is.na(filter_output_format) && isFALSE(grepl("_", filter_output_format)) && isFALSE(grepl("^%", filter_output_format)))) { + new_list$x$metadata$data$filter$type <- "string" + new_list$x$metadata$data$filter$type_id <- paste0("string$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("string$", filter_output_format) + } + if (is.na(filter_input_format) && !is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + if (!is.na(filter_input_format) && is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_bar_chart_race_data.R b/R_package/R/bind_bar_chart_race_data.R new file mode 100644 index 0000000..178c273 --- /dev/null +++ b/R_package/R/bind_bar_chart_race_data.R @@ -0,0 +1,292 @@ +#' Bind bar chart race data +#' @name bind_bar_chart_race_data +#' @param data Data. +#' @param captions_data Captions data. +#' @param label Label. A column containing the names of the bars, e.g. countries or people. Suggested data type hints: string. Flourish type hint: column +#' @param values Values. Multiple columns of numbers, each column representing a point in time Suggested data type hints: number. Flourish type hint: columns +#' @param category Categories. Optional category column to color the bars Make sure the Color mode setting is set to By Category in the Bar colors settings panel. Suggested data type hints: string. Flourish type hint: column +#' @param image Image. Optional column with URLs of images. Suggested data type hints: string. Flourish type hint: column +#' @param captions_from Time to show. Must match the column headers in the main data sheet. Suggested data type hints: string, datetime. Flourish type hint: column +#' @param captions_to Time to hide. Must match the column headers in the main data sheet. Suggested data type hints: string, datetime. Flourish type hint: column +#' @param captions_text Text. Text or HTML to show. Suggested data type hints: string. Flourish type hint: column +#' @param captions_image Image. Image to show. Add an image URL or right-click on a cell to upload an image. Suggested data type hints: string. Flourish type hint: column +#' @param captions_image_input_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_image_output_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_text_input_format Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_text_output_format Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_to_input_format Formats/parses dates, strings, and numbers for the to column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_to_output_format Formats/parses dates, strings, and numbers for the to column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_from_input_format Formats/parses dates, strings, and numbers for the from column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_from_output_format Formats/parses dates, strings, and numbers for the from column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param category_input_format Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param category_output_format Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param image_input_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param image_output_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param label_input_format Formats/parses dates, strings, and numbers for the label column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param label_output_format Formats/parses dates, strings, and numbers for the label column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param values_input_format Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param values_output_format Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "bar_race", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_bar_chart_race_data(gapminder) +#' ) +#' @export + +bind_bar_chart_race_data <- function( + ., + data = NULL, + captions_data = NULL, + label = NULL, + values = NULL, + category = NULL, + image = NULL, + captions_from = NULL, + captions_to = NULL, + captions_text = NULL, + captions_image = NULL, + captions_image_input_format = NULL, + captions_image_output_format = NULL, + captions_text_input_format = NULL, + captions_text_output_format = NULL, + captions_to_input_format = NULL, + captions_to_output_format = NULL, + captions_from_input_format = NULL, + captions_from_output_format = NULL, + category_input_format = NULL, + category_output_format = NULL, + image_input_format = NULL, + image_output_format = NULL, + label_input_format = NULL, + label_output_format = NULL, + values_input_format = NULL, + values_output_format = NULL) { + bindings_error(., "bar_chart_race") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(label), paste(values), paste(category), paste(image), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + if (!is.null(captions_data)) { + columns_captions_data <- c(paste(captions_from), paste(captions_to), paste(captions_text), paste(captions_image), NULL) + columns_captions_data <- columns_captions_data[!sapply(columns_captions_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_captions_data, split = ",", fixed = TRUE), + data = captions_data + ) + int_columns_captions_data <- sapply(captions_data, is.integer) + captions_data[, int_columns_captions_data] <- lapply(captions_data[, int_columns_captions_data], as.character) + } + new_list$x$data$data <- data + new_list$x$data$captions <- captions_data + new_list$x$bindings$data$label <- label + + if (is.null(values)) { + new_list$x$bindings$data$values <- "list" + } else { + new_list$x$bindings$data$values <- values + } + + new_list$x$bindings$data$category <- category + new_list$x$bindings$data$image <- image + new_list$x$bindings$captions$from <- captions_from + new_list$x$bindings$captions$to <- captions_to + new_list$x$bindings$captions$text <- captions_text + new_list$x$bindings$captions$image <- captions_image + + + if (!is.null(label_output_format) && !is.null(label_input_format)) { + if (isTRUE(grepl("^%", label_output_format))) { + new_list$x$metadata$data$label$type <- "datetime" + new_list$x$metadata$data$label$type_id <- paste0("datetime$", label_input_format) + new_list$x$metadata$data$label$output_format_id <- paste0("datetime$", label_output_format) + } else if (isTRUE(grepl("_", label_output_format))) { + new_list$x$metadata$data$label$type <- "number" + new_list$x$metadata$data$label$type_id <- paste0("number$", label_input_format) + new_list$x$metadata$data$label$output_format_id <- paste0("number$", label_output_format) + } else if (isTRUE(!is.na(label_output_format) && isFALSE(grepl("_", label_output_format)) && isFALSE(grepl("^%", label_output_format)))) { + new_list$x$metadata$data$label$type <- "string" + new_list$x$metadata$data$label$type_id <- paste0("string$", label_input_format) + new_list$x$metadata$data$label$output_format_id <- paste0("string$", label_output_format) + } + if (is.na(label_input_format) && !is.na(label_output_format)) { + "[label_input_format] and [label_output_format] must both be defined." + } + if (!is.na(label_input_format) && is.na(label_output_format)) { + "[label_input_format] and [label_output_format] must both be defined." + } + } + + + if (!is.null(values_output_format) && !is.null(values_input_format)) { + if (isTRUE(grepl("^%", values_output_format))) { + new_list$x$metadata$data$values$type <- "datetime" + new_list$x$metadata$data$values$type_id <- paste0("datetime$", values_input_format) + new_list$x$metadata$data$values$output_format_id <- paste0("datetime$", values_output_format) + } else if (isTRUE(grepl("_", values_output_format))) { + new_list$x$metadata$data$values$type <- "number" + new_list$x$metadata$data$values$type_id <- paste0("number$", values_input_format) + new_list$x$metadata$data$values$output_format_id <- paste0("number$", values_output_format) + } else if (isTRUE(!is.na(values_output_format) && isFALSE(grepl("_", values_output_format)) && isFALSE(grepl("^%", values_output_format)))) { + new_list$x$metadata$data$values$type <- "string" + new_list$x$metadata$data$values$type_id <- paste0("string$", values_input_format) + new_list$x$metadata$data$values$output_format_id <- paste0("string$", values_output_format) + } + if (is.na(values_input_format) && !is.na(values_output_format)) { + "[values_input_format] and [values_output_format] must both be defined." + } + if (!is.na(values_input_format) && is.na(values_output_format)) { + "[values_input_format] and [values_output_format] must both be defined." + } + } + + + if (!is.null(category_output_format) && !is.null(category_input_format)) { + if (isTRUE(grepl("^%", category_output_format))) { + new_list$x$metadata$data$category$type <- "datetime" + new_list$x$metadata$data$category$type_id <- paste0("datetime$", category_input_format) + new_list$x$metadata$data$category$output_format_id <- paste0("datetime$", category_output_format) + } else if (isTRUE(grepl("_", category_output_format))) { + new_list$x$metadata$data$category$type <- "number" + new_list$x$metadata$data$category$type_id <- paste0("number$", category_input_format) + new_list$x$metadata$data$category$output_format_id <- paste0("number$", category_output_format) + } else if (isTRUE(!is.na(category_output_format) && isFALSE(grepl("_", category_output_format)) && isFALSE(grepl("^%", category_output_format)))) { + new_list$x$metadata$data$category$type <- "string" + new_list$x$metadata$data$category$type_id <- paste0("string$", category_input_format) + new_list$x$metadata$data$category$output_format_id <- paste0("string$", category_output_format) + } + if (is.na(category_input_format) && !is.na(category_output_format)) { + "[category_input_format] and [category_output_format] must both be defined." + } + if (!is.na(category_input_format) && is.na(category_output_format)) { + "[category_input_format] and [category_output_format] must both be defined." + } + } + + + if (!is.null(image_output_format) && !is.null(image_input_format)) { + if (isTRUE(grepl("^%", image_output_format))) { + new_list$x$metadata$data$image$type <- "datetime" + new_list$x$metadata$data$image$type_id <- paste0("datetime$", image_input_format) + new_list$x$metadata$data$image$output_format_id <- paste0("datetime$", image_output_format) + } else if (isTRUE(grepl("_", image_output_format))) { + new_list$x$metadata$data$image$type <- "number" + new_list$x$metadata$data$image$type_id <- paste0("number$", image_input_format) + new_list$x$metadata$data$image$output_format_id <- paste0("number$", image_output_format) + } else if (isTRUE(!is.na(image_output_format) && isFALSE(grepl("_", image_output_format)) && isFALSE(grepl("^%", image_output_format)))) { + new_list$x$metadata$data$image$type <- "string" + new_list$x$metadata$data$image$type_id <- paste0("string$", image_input_format) + new_list$x$metadata$data$image$output_format_id <- paste0("string$", image_output_format) + } + if (is.na(image_input_format) && !is.na(image_output_format)) { + "[image_input_format] and [image_output_format] must both be defined." + } + if (!is.na(image_input_format) && is.na(image_output_format)) { + "[image_input_format] and [image_output_format] must both be defined." + } + } + + + if (!is.null(captions_from_output_format) && !is.null(captions_from_input_format)) { + if (isTRUE(grepl("^%", captions_from_output_format))) { + new_list$x$metadata$captions$from$type <- "datetime" + new_list$x$metadata$captions$from$type_id <- paste0("datetime$", captions_from_input_format) + new_list$x$metadata$captions$from$output_format_id <- paste0("datetime$", captions_from_output_format) + } else if (isTRUE(grepl("_", captions_from_output_format))) { + new_list$x$metadata$captions$from$type <- "number" + new_list$x$metadata$captions$from$type_id <- paste0("number$", captions_from_input_format) + new_list$x$metadata$captions$from$output_format_id <- paste0("number$", captions_from_output_format) + } else if (isTRUE(!is.na(captions_from_output_format) && isFALSE(grepl("_", captions_from_output_format)) && isFALSE(grepl("^%", captions_from_output_format)))) { + new_list$x$metadata$captions$from$type <- "string" + new_list$x$metadata$captions$from$type_id <- paste0("string$", captions_from_input_format) + new_list$x$metadata$captions$from$output_format_id <- paste0("string$", captions_from_output_format) + } + if (is.na(captions_from_input_format) && !is.na(captions_from_output_format)) { + "[captions_from_input_format] and [captions_from_output_format] must both be defined." + } + if (!is.na(captions_from_input_format) && is.na(captions_from_output_format)) { + "[captions_from_input_format] and [captions_from_output_format] must both be defined." + } + } + + + if (!is.null(captions_to_output_format) && !is.null(captions_to_input_format)) { + if (isTRUE(grepl("^%", captions_to_output_format))) { + new_list$x$metadata$captions$to$type <- "datetime" + new_list$x$metadata$captions$to$type_id <- paste0("datetime$", captions_to_input_format) + new_list$x$metadata$captions$to$output_format_id <- paste0("datetime$", captions_to_output_format) + } else if (isTRUE(grepl("_", captions_to_output_format))) { + new_list$x$metadata$captions$to$type <- "number" + new_list$x$metadata$captions$to$type_id <- paste0("number$", captions_to_input_format) + new_list$x$metadata$captions$to$output_format_id <- paste0("number$", captions_to_output_format) + } else if (isTRUE(!is.na(captions_to_output_format) && isFALSE(grepl("_", captions_to_output_format)) && isFALSE(grepl("^%", captions_to_output_format)))) { + new_list$x$metadata$captions$to$type <- "string" + new_list$x$metadata$captions$to$type_id <- paste0("string$", captions_to_input_format) + new_list$x$metadata$captions$to$output_format_id <- paste0("string$", captions_to_output_format) + } + if (is.na(captions_to_input_format) && !is.na(captions_to_output_format)) { + "[captions_to_input_format] and [captions_to_output_format] must both be defined." + } + if (!is.na(captions_to_input_format) && is.na(captions_to_output_format)) { + "[captions_to_input_format] and [captions_to_output_format] must both be defined." + } + } + + + if (!is.null(captions_text_output_format) && !is.null(captions_text_input_format)) { + if (isTRUE(grepl("^%", captions_text_output_format))) { + new_list$x$metadata$captions$text$type <- "datetime" + new_list$x$metadata$captions$text$type_id <- paste0("datetime$", captions_text_input_format) + new_list$x$metadata$captions$text$output_format_id <- paste0("datetime$", captions_text_output_format) + } else if (isTRUE(grepl("_", captions_text_output_format))) { + new_list$x$metadata$captions$text$type <- "number" + new_list$x$metadata$captions$text$type_id <- paste0("number$", captions_text_input_format) + new_list$x$metadata$captions$text$output_format_id <- paste0("number$", captions_text_output_format) + } else if (isTRUE(!is.na(captions_text_output_format) && isFALSE(grepl("_", captions_text_output_format)) && isFALSE(grepl("^%", captions_text_output_format)))) { + new_list$x$metadata$captions$text$type <- "string" + new_list$x$metadata$captions$text$type_id <- paste0("string$", captions_text_input_format) + new_list$x$metadata$captions$text$output_format_id <- paste0("string$", captions_text_output_format) + } + if (is.na(captions_text_input_format) && !is.na(captions_text_output_format)) { + "[captions_text_input_format] and [captions_text_output_format] must both be defined." + } + if (!is.na(captions_text_input_format) && is.na(captions_text_output_format)) { + "[captions_text_input_format] and [captions_text_output_format] must both be defined." + } + } + + + if (!is.null(captions_image_output_format) && !is.null(captions_image_input_format)) { + if (isTRUE(grepl("^%", captions_image_output_format))) { + new_list$x$metadata$captions$image$type <- "datetime" + new_list$x$metadata$captions$image$type_id <- paste0("datetime$", captions_image_input_format) + new_list$x$metadata$captions$image$output_format_id <- paste0("datetime$", captions_image_output_format) + } else if (isTRUE(grepl("_", captions_image_output_format))) { + new_list$x$metadata$captions$image$type <- "number" + new_list$x$metadata$captions$image$type_id <- paste0("number$", captions_image_input_format) + new_list$x$metadata$captions$image$output_format_id <- paste0("number$", captions_image_output_format) + } else if (isTRUE(!is.na(captions_image_output_format) && isFALSE(grepl("_", captions_image_output_format)) && isFALSE(grepl("^%", captions_image_output_format)))) { + new_list$x$metadata$captions$image$type <- "string" + new_list$x$metadata$captions$image$type_id <- paste0("string$", captions_image_input_format) + new_list$x$metadata$captions$image$output_format_id <- paste0("string$", captions_image_output_format) + } + if (is.na(captions_image_input_format) && !is.na(captions_image_output_format)) { + "[captions_image_input_format] and [captions_image_output_format] must both be defined." + } + if (!is.na(captions_image_input_format) && is.na(captions_image_output_format)) { + "[captions_image_input_format] and [captions_image_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_bubble_chart_data.R b/R_package/R/bind_bubble_chart_data.R new file mode 100644 index 0000000..42d09c3 --- /dev/null +++ b/R_package/R/bind_bubble_chart_data.R @@ -0,0 +1,57 @@ +#' Bind bubble chart data +#' @name bind_bubble_chart_data +#' @param data Data. +#' @param label Label +#' @param color Color by. Used to color the bubbles. Flourish type hint: column +#' @param size Size by. Value for bubble size. Flourish type hint: column +#' @param axis_values Axis values. Values used to plot the bubbles when the bubbles are aligned on an axis. Flourish type hint: column +#' @param image Image. Images for bubbles. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Flourish type hint: columns +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "bubble", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_bubble_chart_data(gapminder) +#' ) +#' @export + +bind_bubble_chart_data <- function( + ., + data = NULL, + label = NULL, + color = NULL, + size = NULL, + axis_values = NULL, + image = NULL, + metadata = NULL) { + bindings_error(., "bubble_chart") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(label), paste(color), paste(size), paste(axis_values), paste(image), paste(metadata), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$label <- label + new_list$x$bindings$data$color <- color + new_list$x$bindings$data$size <- size + new_list$x$bindings$data$axis_values <- axis_values + new_list$x$bindings$data$image <- image + + if (is.null(metadata)) { + new_list$x$bindings$data$metadata <- "list" + } else { + new_list$x$bindings$data$metadata <- metadata + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_calculator_data.R b/R_package/R/bind_calculator_data.R new file mode 100644 index 0000000..f0cbb95 --- /dev/null +++ b/R_package/R/bind_calculator_data.R @@ -0,0 +1,51 @@ +#' Bind calculator data +#' @name bind_calculator_data +#' @param questions_data Questions data. +#' @param question_text Question text. The question text. Flourish type hint: column +#' @param question_type Question type. The type of question. Choose from number input, text input, single response buttons, multi response buttons, dropdown, single date picker, range date picker, multi date picker, rating, single slider or range slider. Leave empty to just display text. Flourish type hint: column +#' @param context_text Question context. Additional information. Flourish type hint: column +#' @param image Image. Question background image. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column +#' @param answers_raw Answers. Answer values separated by "::". Required for single and multi-response buttons, dropdown and rating questions. Rating answers can take optional labels per value noted as "Value >> Label" - for example, "1 >> Bad :: 2 :: 3 >> Good". Number inputs can take range specifications in the format "min: 0 :: max: 50 :: step: 2". Slider inputs can take slider specifications in the format "min: 0 :: max: 100 :: value: 10". Use two comma separated values for range sliders, eg.: "value: 1, 100". See the templates documentation for additional info. Flourish type hint: column +#' @param fallback_value Fallback value. Fallback value to fill the answer input if left empty by the user. Works for all question types but sliders, which will always show the initial value. Flourish type hint: column +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "calculator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_calculator_data(gapminder) +#' ) +#' @export + +bind_calculator_data <- function( + ., + questions_data = NULL, + question_text = NULL, + question_type = NULL, + context_text = NULL, + image = NULL, + answers_raw = NULL, + fallback_value = NULL) { + bindings_error(., "calculator") + + old_list <- . + new_list <- list() + + if (!is.null(questions_data)) { + columns_questions_data <- c(paste(question_text), paste(question_type), paste(context_text), paste(image), paste(answers_raw), paste(fallback_value), NULL) + columns_questions_data <- columns_questions_data[!sapply(columns_questions_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_questions_data, split = ",", fixed = TRUE), + data = questions_data + ) + int_columns_questions_data <- sapply(questions_data, is.integer) + questions_data[, int_columns_questions_data] <- lapply(questions_data[, int_columns_questions_data], as.character) + } + new_list$x$data$questions <- questions_data + new_list$x$bindings$questions$question_text <- question_text + new_list$x$bindings$questions$question_type <- question_type + new_list$x$bindings$questions$context_text <- context_text + new_list$x$bindings$questions$image <- image + new_list$x$bindings$questions$answers_raw <- answers_raw + new_list$x$bindings$questions$fallback_value <- fallback_value + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_cards_data.R b/R_package/R/bind_cards_data.R new file mode 100644 index 0000000..542e118 --- /dev/null +++ b/R_package/R/bind_cards_data.R @@ -0,0 +1,285 @@ +#' Bind cards data +#' @name bind_cards_data +#' @param cards_data Cards data. +#' @param title Title. Suggested data type hints: string. Flourish type hint: column +#' @param image Image. Suggested data type hints: string. Flourish type hint: column +#' @param category Categories. Optional category column to color the cards. Suggested data type hints: string. Flourish type hint: column +#' @param subtitle Subtitle. Suggested data type hints: string. Flourish type hint: column +#' @param text Text. Suggested data type hints: string. Flourish type hint: columns +#' @param audio Audio. Add an audio file to the card, which will play when the card is clicked. This will disable popup behavior. Suggested data type hints: string. Flourish type hint: column +#' @param filter Filter. Suggested data type hints: string, number, datetime. Flourish type hint: column +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panelsSuggested data type hints: string, number, datetime. Flourish type hint: columns +#' @param audio_input_format Formats/parses dates, strings, and numbers for the audio column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param audio_output_format Formats/parses dates, strings, and numbers for the audio column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param category_input_format Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param category_output_format Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_input_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_output_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param image_input_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param image_output_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_input_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_output_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param subtitle_input_format Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param subtitle_output_format Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param text_input_format Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param text_output_format Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param title_input_format Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param title_output_format Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "cards", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_cards_data(gapminder) +#' ) +#' @export + +bind_cards_data <- function( + ., + cards_data = NULL, + title = NULL, + image = NULL, + category = NULL, + subtitle = NULL, + text = NULL, + audio = NULL, + filter = NULL, + metadata = NULL, + audio_input_format = NULL, + audio_output_format = NULL, + category_input_format = NULL, + category_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + image_input_format = NULL, + image_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + subtitle_input_format = NULL, + subtitle_output_format = NULL, + text_input_format = NULL, + text_output_format = NULL, + title_input_format = NULL, + title_output_format = NULL) { + bindings_error(., "cards") + + old_list <- . + new_list <- list() + + if (!is.null(cards_data)) { + columns_cards_data <- c(paste(title), paste(image), paste(category), paste(subtitle), paste(text), paste(audio), paste(filter), paste(metadata), NULL) + columns_cards_data <- columns_cards_data[!sapply(columns_cards_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_cards_data, split = ",", fixed = TRUE), + data = cards_data + ) + int_columns_cards_data <- sapply(cards_data, is.integer) + cards_data[, int_columns_cards_data] <- lapply(cards_data[, int_columns_cards_data], as.character) + } + new_list$x$data$cards <- cards_data + new_list$x$bindings$cards$title <- title + new_list$x$bindings$cards$image <- image + new_list$x$bindings$cards$category <- category + new_list$x$bindings$cards$subtitle <- subtitle + + if (is.null(text)) { + new_list$x$bindings$cards$text <- "list" + } else { + new_list$x$bindings$cards$text <- text + } + + new_list$x$bindings$cards$audio <- audio + new_list$x$bindings$cards$filter <- filter + + if (is.null(metadata)) { + new_list$x$bindings$cards$metadata <- "list" + } else { + new_list$x$bindings$cards$metadata <- metadata + } + + + + if (!is.null(title_output_format) && !is.null(title_input_format)) { + if (isTRUE(grepl("^%", title_output_format))) { + new_list$x$metadata$cards$title$type <- "datetime" + new_list$x$metadata$cards$title$type_id <- paste0("datetime$", title_input_format) + new_list$x$metadata$cards$title$output_format_id <- paste0("datetime$", title_output_format) + } else if (isTRUE(grepl("_", title_output_format))) { + new_list$x$metadata$cards$title$type <- "number" + new_list$x$metadata$cards$title$type_id <- paste0("number$", title_input_format) + new_list$x$metadata$cards$title$output_format_id <- paste0("number$", title_output_format) + } else if (isTRUE(!is.na(title_output_format) && isFALSE(grepl("_", title_output_format)) && isFALSE(grepl("^%", title_output_format)))) { + new_list$x$metadata$cards$title$type <- "string" + new_list$x$metadata$cards$title$type_id <- paste0("string$", title_input_format) + new_list$x$metadata$cards$title$output_format_id <- paste0("string$", title_output_format) + } + if (is.na(title_input_format) && !is.na(title_output_format)) { + "[title_input_format] and [title_output_format] must both be defined." + } + if (!is.na(title_input_format) && is.na(title_output_format)) { + "[title_input_format] and [title_output_format] must both be defined." + } + } + + + if (!is.null(image_output_format) && !is.null(image_input_format)) { + if (isTRUE(grepl("^%", image_output_format))) { + new_list$x$metadata$cards$image$type <- "datetime" + new_list$x$metadata$cards$image$type_id <- paste0("datetime$", image_input_format) + new_list$x$metadata$cards$image$output_format_id <- paste0("datetime$", image_output_format) + } else if (isTRUE(grepl("_", image_output_format))) { + new_list$x$metadata$cards$image$type <- "number" + new_list$x$metadata$cards$image$type_id <- paste0("number$", image_input_format) + new_list$x$metadata$cards$image$output_format_id <- paste0("number$", image_output_format) + } else if (isTRUE(!is.na(image_output_format) && isFALSE(grepl("_", image_output_format)) && isFALSE(grepl("^%", image_output_format)))) { + new_list$x$metadata$cards$image$type <- "string" + new_list$x$metadata$cards$image$type_id <- paste0("string$", image_input_format) + new_list$x$metadata$cards$image$output_format_id <- paste0("string$", image_output_format) + } + if (is.na(image_input_format) && !is.na(image_output_format)) { + "[image_input_format] and [image_output_format] must both be defined." + } + if (!is.na(image_input_format) && is.na(image_output_format)) { + "[image_input_format] and [image_output_format] must both be defined." + } + } + + + if (!is.null(category_output_format) && !is.null(category_input_format)) { + if (isTRUE(grepl("^%", category_output_format))) { + new_list$x$metadata$cards$category$type <- "datetime" + new_list$x$metadata$cards$category$type_id <- paste0("datetime$", category_input_format) + new_list$x$metadata$cards$category$output_format_id <- paste0("datetime$", category_output_format) + } else if (isTRUE(grepl("_", category_output_format))) { + new_list$x$metadata$cards$category$type <- "number" + new_list$x$metadata$cards$category$type_id <- paste0("number$", category_input_format) + new_list$x$metadata$cards$category$output_format_id <- paste0("number$", category_output_format) + } else if (isTRUE(!is.na(category_output_format) && isFALSE(grepl("_", category_output_format)) && isFALSE(grepl("^%", category_output_format)))) { + new_list$x$metadata$cards$category$type <- "string" + new_list$x$metadata$cards$category$type_id <- paste0("string$", category_input_format) + new_list$x$metadata$cards$category$output_format_id <- paste0("string$", category_output_format) + } + if (is.na(category_input_format) && !is.na(category_output_format)) { + "[category_input_format] and [category_output_format] must both be defined." + } + if (!is.na(category_input_format) && is.na(category_output_format)) { + "[category_input_format] and [category_output_format] must both be defined." + } + } + + + if (!is.null(subtitle_output_format) && !is.null(subtitle_input_format)) { + if (isTRUE(grepl("^%", subtitle_output_format))) { + new_list$x$metadata$cards$subtitle$type <- "datetime" + new_list$x$metadata$cards$subtitle$type_id <- paste0("datetime$", subtitle_input_format) + new_list$x$metadata$cards$subtitle$output_format_id <- paste0("datetime$", subtitle_output_format) + } else if (isTRUE(grepl("_", subtitle_output_format))) { + new_list$x$metadata$cards$subtitle$type <- "number" + new_list$x$metadata$cards$subtitle$type_id <- paste0("number$", subtitle_input_format) + new_list$x$metadata$cards$subtitle$output_format_id <- paste0("number$", subtitle_output_format) + } else if (isTRUE(!is.na(subtitle_output_format) && isFALSE(grepl("_", subtitle_output_format)) && isFALSE(grepl("^%", subtitle_output_format)))) { + new_list$x$metadata$cards$subtitle$type <- "string" + new_list$x$metadata$cards$subtitle$type_id <- paste0("string$", subtitle_input_format) + new_list$x$metadata$cards$subtitle$output_format_id <- paste0("string$", subtitle_output_format) + } + if (is.na(subtitle_input_format) && !is.na(subtitle_output_format)) { + "[subtitle_input_format] and [subtitle_output_format] must both be defined." + } + if (!is.na(subtitle_input_format) && is.na(subtitle_output_format)) { + "[subtitle_input_format] and [subtitle_output_format] must both be defined." + } + } + + + if (!is.null(text_output_format) && !is.null(text_input_format)) { + if (isTRUE(grepl("^%", text_output_format))) { + new_list$x$metadata$cards$text$type <- "datetime" + new_list$x$metadata$cards$text$type_id <- paste0("datetime$", text_input_format) + new_list$x$metadata$cards$text$output_format_id <- paste0("datetime$", text_output_format) + } else if (isTRUE(grepl("_", text_output_format))) { + new_list$x$metadata$cards$text$type <- "number" + new_list$x$metadata$cards$text$type_id <- paste0("number$", text_input_format) + new_list$x$metadata$cards$text$output_format_id <- paste0("number$", text_output_format) + } else if (isTRUE(!is.na(text_output_format) && isFALSE(grepl("_", text_output_format)) && isFALSE(grepl("^%", text_output_format)))) { + new_list$x$metadata$cards$text$type <- "string" + new_list$x$metadata$cards$text$type_id <- paste0("string$", text_input_format) + new_list$x$metadata$cards$text$output_format_id <- paste0("string$", text_output_format) + } + if (is.na(text_input_format) && !is.na(text_output_format)) { + "[text_input_format] and [text_output_format] must both be defined." + } + if (!is.na(text_input_format) && is.na(text_output_format)) { + "[text_input_format] and [text_output_format] must both be defined." + } + } + + + if (!is.null(audio_output_format) && !is.null(audio_input_format)) { + if (isTRUE(grepl("^%", audio_output_format))) { + new_list$x$metadata$cards$audio$type <- "datetime" + new_list$x$metadata$cards$audio$type_id <- paste0("datetime$", audio_input_format) + new_list$x$metadata$cards$audio$output_format_id <- paste0("datetime$", audio_output_format) + } else if (isTRUE(grepl("_", audio_output_format))) { + new_list$x$metadata$cards$audio$type <- "number" + new_list$x$metadata$cards$audio$type_id <- paste0("number$", audio_input_format) + new_list$x$metadata$cards$audio$output_format_id <- paste0("number$", audio_output_format) + } else if (isTRUE(!is.na(audio_output_format) && isFALSE(grepl("_", audio_output_format)) && isFALSE(grepl("^%", audio_output_format)))) { + new_list$x$metadata$cards$audio$type <- "string" + new_list$x$metadata$cards$audio$type_id <- paste0("string$", audio_input_format) + new_list$x$metadata$cards$audio$output_format_id <- paste0("string$", audio_output_format) + } + if (is.na(audio_input_format) && !is.na(audio_output_format)) { + "[audio_input_format] and [audio_output_format] must both be defined." + } + if (!is.na(audio_input_format) && is.na(audio_output_format)) { + "[audio_input_format] and [audio_output_format] must both be defined." + } + } + + + if (!is.null(filter_output_format) && !is.null(filter_input_format)) { + if (isTRUE(grepl("^%", filter_output_format))) { + new_list$x$metadata$cards$filter$type <- "datetime" + new_list$x$metadata$cards$filter$type_id <- paste0("datetime$", filter_input_format) + new_list$x$metadata$cards$filter$output_format_id <- paste0("datetime$", filter_output_format) + } else if (isTRUE(grepl("_", filter_output_format))) { + new_list$x$metadata$cards$filter$type <- "number" + new_list$x$metadata$cards$filter$type_id <- paste0("number$", filter_input_format) + new_list$x$metadata$cards$filter$output_format_id <- paste0("number$", filter_output_format) + } else if (isTRUE(!is.na(filter_output_format) && isFALSE(grepl("_", filter_output_format)) && isFALSE(grepl("^%", filter_output_format)))) { + new_list$x$metadata$cards$filter$type <- "string" + new_list$x$metadata$cards$filter$type_id <- paste0("string$", filter_input_format) + new_list$x$metadata$cards$filter$output_format_id <- paste0("string$", filter_output_format) + } + if (is.na(filter_input_format) && !is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + if (!is.na(filter_input_format) && is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + } + + + if (!is.null(metadata_output_format) && !is.null(metadata_input_format)) { + if (isTRUE(grepl("^%", metadata_output_format))) { + new_list$x$metadata$cards$metadata$type <- "datetime" + new_list$x$metadata$cards$metadata$type_id <- paste0("datetime$", metadata_input_format) + new_list$x$metadata$cards$metadata$output_format_id <- paste0("datetime$", metadata_output_format) + } else if (isTRUE(grepl("_", metadata_output_format))) { + new_list$x$metadata$cards$metadata$type <- "number" + new_list$x$metadata$cards$metadata$type_id <- paste0("number$", metadata_input_format) + new_list$x$metadata$cards$metadata$output_format_id <- paste0("number$", metadata_output_format) + } else if (isTRUE(!is.na(metadata_output_format) && isFALSE(grepl("_", metadata_output_format)) && isFALSE(grepl("^%", metadata_output_format)))) { + new_list$x$metadata$cards$metadata$type <- "string" + new_list$x$metadata$cards$metadata$type_id <- paste0("string$", metadata_input_format) + new_list$x$metadata$cards$metadata$output_format_id <- paste0("string$", metadata_output_format) + } + if (is.na(metadata_input_format) && !is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + if (!is.na(metadata_input_format) && is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_chord_diagram_data.R b/R_package/R/bind_chord_diagram_data.R new file mode 100644 index 0000000..ab3f19a --- /dev/null +++ b/R_package/R/bind_chord_diagram_data.R @@ -0,0 +1,42 @@ +#' Bind chord diagram data +#' @name bind_chord_diagram_data +#' @param connections_data Connections data. +#' @param source Source +#' @param target Target +#' @param value Value. A number specifying the size of the flow. Flourish type hint: column +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "chord_diagram", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_chord_diagram_data(gapminder) +#' ) +#' @export + +bind_chord_diagram_data <- function( + ., + connections_data = NULL, + source = NULL, + target = NULL, + value = NULL) { + bindings_error(., "chord_diagram") + + old_list <- . + new_list <- list() + + if (!is.null(connections_data)) { + columns_connections_data <- c(paste(source), paste(target), paste(value), NULL) + columns_connections_data <- columns_connections_data[!sapply(columns_connections_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_connections_data, split = ",", fixed = TRUE), + data = connections_data + ) + int_columns_connections_data <- sapply(connections_data, is.integer) + connections_data[, int_columns_connections_data] <- lapply(connections_data[, int_columns_connections_data], as.character) + } + new_list$x$data$connections <- connections_data + new_list$x$bindings$connections$source <- source + new_list$x$bindings$connections$target <- target + new_list$x$bindings$connections$value <- value + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_draw_the_line_data.R b/R_package/R/bind_draw_the_line_data.R new file mode 100644 index 0000000..43d71bf --- /dev/null +++ b/R_package/R/bind_draw_the_line_data.R @@ -0,0 +1,55 @@ +#' Bind draw the line chart data +#' @name bind_draw_the_line_data +#' @param data Data. +#' @param x Time (x axis). Labels for the X axis. Flourish type hint: column +#' @param lines_reveal Lines reveal +#' @param lines_fixed Lines fixed +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "draw_the_line", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_draw_the_line_data(gapminder) +#' ) +#' @export + + +bind_draw_the_line_data <- function( + ., + data = NULL, + x = NULL, + lines_reveal = NULL, + lines_fixed = NULL) { + bindings_error(., "draw_the_line") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(x), paste(lines_reveal), paste(lines_fixed), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$x <- x + + if (is.null(lines_reveal)) { + new_list$x$bindings$data$lines_reveal <- "list" + } else { + new_list$x$bindings$data$lines_reveal <- lines_reveal + } + + + if (is.null(lines_fixed)) { + new_list$x$bindings$data$lines_fixed <- "list" + } else { + new_list$x$bindings$data$lines_fixed <- lines_fixed + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_election_results_chart_data.R b/R_package/R/bind_election_results_chart_data.R new file mode 100644 index 0000000..5118e99 --- /dev/null +++ b/R_package/R/bind_election_results_chart_data.R @@ -0,0 +1,70 @@ +#' Bind election results chart data +#' @name bind_election_results_chart_data +#' @param values_now_data Values now data. +#' @param values_historical_data Values historical data. +#' @param values_now_name Region name. The name of the data series (eg. voting district). Flourish type hint: column +#' @param values_now_values Results by party. One column per party, with party names as header rows. Flourish type hint: columns +#' @param values_historical_name Region name. The name of the data series (eg. voting district). Flourish type hint: column +#' @param values_historical_values Results by party. One column per party, with party names as header rows. Flourish type hint: columns +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "election_results", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_election_results_chart_data(gapminder) +#' ) +#' @export +#' +bind_election_results_chart_data <- function( + ., + values_now_data = NULL, + values_historical_data = NULL, + values_now_name = NULL, + values_now_values = NULL, + values_historical_name = NULL, + values_historical_values = NULL) { + bindings_error(., "election_results_chart") + + old_list <- . + new_list <- list() + + if (!is.null(values_now_data)) { + columns_values_now_data <- c(paste(values_now_name), paste(values_now_values), NULL) + columns_values_now_data <- columns_values_now_data[!sapply(columns_values_now_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_values_now_data, split = ",", fixed = TRUE), + data = values_now_data + ) + int_columns_values_now_data <- sapply(values_now_data, is.integer) + values_now_data[, int_columns_values_now_data] <- lapply(values_now_data[, int_columns_values_now_data], as.character) + } + if (!is.null(values_historical_data)) { + columns_values_historical_data <- c(paste(values_historical_name), paste(values_historical_values), NULL) + columns_values_historical_data <- columns_values_historical_data[!sapply(columns_values_historical_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_values_historical_data, split = ",", fixed = TRUE), + data = values_historical_data + ) + int_columns_values_historical_data <- sapply(values_historical_data, is.integer) + values_historical_data[, int_columns_values_historical_data] <- lapply(values_historical_data[, int_columns_values_historical_data], as.character) + } + new_list$x$data$values_now <- values_now_data + new_list$x$data$values_historical <- values_historical_data + new_list$x$bindings$values_now$name <- values_now_name + + if (is.null(values_now_values)) { + new_list$x$bindings$values_now$values <- "list" + } else { + new_list$x$bindings$values_now$values <- values_now_values + } + + new_list$x$bindings$values_historical$name <- values_historical_name + + if (is.null(values_historical_values)) { + new_list$x$bindings$values_historical$values <- "list" + } else { + new_list$x$bindings$values_historical$values <- values_historical_values + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_gantt_data.R b/R_package/R/bind_gantt_data.R new file mode 100644 index 0000000..b6c17d7 --- /dev/null +++ b/R_package/R/bind_gantt_data.R @@ -0,0 +1,63 @@ +#' Bind gantt chart data +#' @name bind_gantt_data +#' @param gantt_data Gantt data. +#' @param start_date Start date +#' @param end_date End date. The end date or time of the event. If working with days, the end date should be the first day after the end date. So if your event stretches from 1/1. and ends on the 5/1. your end date should be 6/1. This will mean your Gantt bar will stretch across the last day of your project or task. Flourish type hint: column +#' @param task Task +#' @param grouping Group. Select a categorical column to combine bars into groups on the Y axis. Flourish type hint: column +#' @param color Color category. Select a categorical column; each unique value in the column will become a color. Flourish type hint: column +#' @param progress Progress. Requires a number column with values between 0 and 1, representing the progress from 0 to 100%. Flourish type hint: column +#' @param filter Filter. If set, creates a filter menu or time slider. Flourish type hint: column +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panelsFlourish type hint: columns +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "gantt", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_gantt_data(gapminder) +#' ) +#' @export + +bind_gantt_data <- function( + ., + gantt_data = NULL, + start_date = NULL, + end_date = NULL, + task = NULL, + grouping = NULL, + color = NULL, + progress = NULL, + filter = NULL, + metadata = NULL) { + bindings_error(., "gantt") + + old_list <- . + new_list <- list() + + if (!is.null(gantt_data)) { + columns_gantt_data <- c(paste(start_date), paste(end_date), paste(task), paste(grouping), paste(color), paste(progress), paste(filter), paste(metadata), NULL) + columns_gantt_data <- columns_gantt_data[!sapply(columns_gantt_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_gantt_data, split = ",", fixed = TRUE), + data = gantt_data + ) + int_columns_gantt_data <- sapply(gantt_data, is.integer) + gantt_data[, int_columns_gantt_data] <- lapply(gantt_data[, int_columns_gantt_data], as.character) + } + new_list$x$data$gantt <- gantt_data + new_list$x$bindings$gantt$start_date <- start_date + new_list$x$bindings$gantt$end_date <- end_date + new_list$x$bindings$gantt$task <- task + new_list$x$bindings$gantt$grouping <- grouping + new_list$x$bindings$gantt$color <- color + new_list$x$bindings$gantt$progress <- progress + new_list$x$bindings$gantt$filter <- filter + + if (is.null(metadata)) { + new_list$x$bindings$gantt$metadata <- "list" + } else { + new_list$x$bindings$gantt$metadata <- metadata + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_gauge_data.R b/R_package/R/bind_gauge_data.R new file mode 100644 index 0000000..f42e652 --- /dev/null +++ b/R_package/R/bind_gauge_data.R @@ -0,0 +1,99 @@ +#' Bind gauge data +#' @name bind_gauge_data +#' @param data Data. +#' @param name Name +#' @param value Value. One or more columns of numbers. Flourish type hint: columns +#' @param name_input_format Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param name_output_format Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param value_input_format Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param value_output_format Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "gauge", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_gauge_data(gapminder) +#' ) +#' @export + +bind_gauge_data <- function( + ., + data = NULL, + name = NULL, + value = NULL, + name_input_format = NULL, + name_output_format = NULL, + value_input_format = NULL, + value_output_format = NULL) { + bindings_error(., "gauge") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(name), paste(value), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$name <- name + + if (is.null(value)) { + new_list$x$bindings$data$value <- "list" + } else { + new_list$x$bindings$data$value <- value + } + + + + if (!is.null(name_output_format) && !is.null(name_input_format)) { + if (isTRUE(grepl("^%", name_output_format))) { + new_list$x$metadata$data$name$type <- "datetime" + new_list$x$metadata$data$name$type_id <- paste0("datetime$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("datetime$", name_output_format) + } else if (isTRUE(grepl("_", name_output_format))) { + new_list$x$metadata$data$name$type <- "number" + new_list$x$metadata$data$name$type_id <- paste0("number$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("number$", name_output_format) + } else if (isTRUE(!is.na(name_output_format) && isFALSE(grepl("_", name_output_format)) && isFALSE(grepl("^%", name_output_format)))) { + new_list$x$metadata$data$name$type <- "string" + new_list$x$metadata$data$name$type_id <- paste0("string$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("string$", name_output_format) + } + if (is.na(name_input_format) && !is.na(name_output_format)) { + "[name_input_format] and [name_output_format] must both be defined." + } + if (!is.na(name_input_format) && is.na(name_output_format)) { + "[name_input_format] and [name_output_format] must both be defined." + } + } + + + if (!is.null(value_output_format) && !is.null(value_input_format)) { + if (isTRUE(grepl("^%", value_output_format))) { + new_list$x$metadata$data$value$type <- "datetime" + new_list$x$metadata$data$value$type_id <- paste0("datetime$", value_input_format) + new_list$x$metadata$data$value$output_format_id <- paste0("datetime$", value_output_format) + } else if (isTRUE(grepl("_", value_output_format))) { + new_list$x$metadata$data$value$type <- "number" + new_list$x$metadata$data$value$type_id <- paste0("number$", value_input_format) + new_list$x$metadata$data$value$output_format_id <- paste0("number$", value_output_format) + } else if (isTRUE(!is.na(value_output_format) && isFALSE(grepl("_", value_output_format)) && isFALSE(grepl("^%", value_output_format)))) { + new_list$x$metadata$data$value$type <- "string" + new_list$x$metadata$data$value$type_id <- paste0("string$", value_input_format) + new_list$x$metadata$data$value$output_format_id <- paste0("string$", value_output_format) + } + if (is.na(value_input_format) && !is.na(value_output_format)) { + "[value_input_format] and [value_output_format] must both be defined." + } + if (!is.na(value_input_format) && is.na(value_output_format)) { + "[value_input_format] and [value_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_hierarchy_data.R b/R_package/R/bind_hierarchy_data.R new file mode 100644 index 0000000..d619e55 --- /dev/null +++ b/R_package/R/bind_hierarchy_data.R @@ -0,0 +1,171 @@ +#' Bind hierarchy data +#' @name bind_hierarchy_data +#' @param data Data. +#' @param nest_columns Categories/nesting. Choose one or more categorical columns to nest by. The data is nested in the same order as the chosen columns (e.g. C, B is different from B, C). Suggested data type hints: string. Flourish type hint: columns +#' @param size_columns Size by. Optionally choose one or more numeric columns to size by. If more than one is chosen, a dropdown will appear in the visualization which lets the user choose. Rows with negative values are excluded. Suggested data type hints: number. Flourish type hint: columns +#' @param filter Filter. Optionally choose a categorical column to filter by. Suggested data type hints: string, number, datetime. Flourish type hint: column +#' @param popup_metadata Info for popups. One or more columns of information (text, image URLs , embedded charts etc) to include in popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns +#' @param nest_columns_input_format Formats/parses dates, strings, and numbers for the nest_columns column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param nest_columns_output_format Formats/parses dates, strings, and numbers for the nest_columns column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_input_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_output_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param popup_metadata_input_format Formats/parses dates, strings, and numbers for the popup_metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param popup_metadata_output_format Formats/parses dates, strings, and numbers for the popup_metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param size_columns_input_format Formats/parses dates, strings, and numbers for the size_columns column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param size_columns_output_format Formats/parses dates, strings, and numbers for the size_columns column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "treemap", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_hierarchy_data(gapminder) +#' ) +#' @export + +bind_hierarchy_data <- function( + ., + data = NULL, + nest_columns = NULL, + size_columns = NULL, + filter = NULL, + popup_metadata = NULL, + nest_columns_input_format = NULL, + nest_columns_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + popup_metadata_input_format = NULL, + popup_metadata_output_format = NULL, + size_columns_input_format = NULL, + size_columns_output_format = NULL) { + bindings_error(., "hierarchy") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(nest_columns), paste(size_columns), paste(filter), paste(popup_metadata), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + + if (is.null(nest_columns)) { + new_list$x$bindings$data$nest_columns <- "list" + } else { + new_list$x$bindings$data$nest_columns <- nest_columns + } + + + if (is.null(size_columns)) { + new_list$x$bindings$data$size_columns <- "list" + } else { + new_list$x$bindings$data$size_columns <- size_columns + } + + new_list$x$bindings$data$filter <- filter + + if (is.null(popup_metadata)) { + new_list$x$bindings$data$popup_metadata <- "list" + } else { + new_list$x$bindings$data$popup_metadata <- popup_metadata + } + + + + if (!is.null(nest_columns_output_format) && !is.null(nest_columns_input_format)) { + if (isTRUE(grepl("^%", nest_columns_output_format))) { + new_list$x$metadata$data$nest_columns$type <- "datetime" + new_list$x$metadata$data$nest_columns$type_id <- paste0("datetime$", nest_columns_input_format) + new_list$x$metadata$data$nest_columns$output_format_id <- paste0("datetime$", nest_columns_output_format) + } else if (isTRUE(grepl("_", nest_columns_output_format))) { + new_list$x$metadata$data$nest_columns$type <- "number" + new_list$x$metadata$data$nest_columns$type_id <- paste0("number$", nest_columns_input_format) + new_list$x$metadata$data$nest_columns$output_format_id <- paste0("number$", nest_columns_output_format) + } else if (isTRUE(!is.na(nest_columns_output_format) && isFALSE(grepl("_", nest_columns_output_format)) && isFALSE(grepl("^%", nest_columns_output_format)))) { + new_list$x$metadata$data$nest_columns$type <- "string" + new_list$x$metadata$data$nest_columns$type_id <- paste0("string$", nest_columns_input_format) + new_list$x$metadata$data$nest_columns$output_format_id <- paste0("string$", nest_columns_output_format) + } + if (is.na(nest_columns_input_format) && !is.na(nest_columns_output_format)) { + "[nest_columns_input_format] and [nest_columns_output_format] must both be defined." + } + if (!is.na(nest_columns_input_format) && is.na(nest_columns_output_format)) { + "[nest_columns_input_format] and [nest_columns_output_format] must both be defined." + } + } + + + if (!is.null(size_columns_output_format) && !is.null(size_columns_input_format)) { + if (isTRUE(grepl("^%", size_columns_output_format))) { + new_list$x$metadata$data$size_columns$type <- "datetime" + new_list$x$metadata$data$size_columns$type_id <- paste0("datetime$", size_columns_input_format) + new_list$x$metadata$data$size_columns$output_format_id <- paste0("datetime$", size_columns_output_format) + } else if (isTRUE(grepl("_", size_columns_output_format))) { + new_list$x$metadata$data$size_columns$type <- "number" + new_list$x$metadata$data$size_columns$type_id <- paste0("number$", size_columns_input_format) + new_list$x$metadata$data$size_columns$output_format_id <- paste0("number$", size_columns_output_format) + } else if (isTRUE(!is.na(size_columns_output_format) && isFALSE(grepl("_", size_columns_output_format)) && isFALSE(grepl("^%", size_columns_output_format)))) { + new_list$x$metadata$data$size_columns$type <- "string" + new_list$x$metadata$data$size_columns$type_id <- paste0("string$", size_columns_input_format) + new_list$x$metadata$data$size_columns$output_format_id <- paste0("string$", size_columns_output_format) + } + if (is.na(size_columns_input_format) && !is.na(size_columns_output_format)) { + "[size_columns_input_format] and [size_columns_output_format] must both be defined." + } + if (!is.na(size_columns_input_format) && is.na(size_columns_output_format)) { + "[size_columns_input_format] and [size_columns_output_format] must both be defined." + } + } + + + if (!is.null(filter_output_format) && !is.null(filter_input_format)) { + if (isTRUE(grepl("^%", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "datetime" + new_list$x$metadata$data$filter$type_id <- paste0("datetime$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("datetime$", filter_output_format) + } else if (isTRUE(grepl("_", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "number" + new_list$x$metadata$data$filter$type_id <- paste0("number$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("number$", filter_output_format) + } else if (isTRUE(!is.na(filter_output_format) && isFALSE(grepl("_", filter_output_format)) && isFALSE(grepl("^%", filter_output_format)))) { + new_list$x$metadata$data$filter$type <- "string" + new_list$x$metadata$data$filter$type_id <- paste0("string$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("string$", filter_output_format) + } + if (is.na(filter_input_format) && !is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + if (!is.na(filter_input_format) && is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + } + + + if (!is.null(popup_metadata_output_format) && !is.null(popup_metadata_input_format)) { + if (isTRUE(grepl("^%", popup_metadata_output_format))) { + new_list$x$metadata$data$popup_metadata$type <- "datetime" + new_list$x$metadata$data$popup_metadata$type_id <- paste0("datetime$", popup_metadata_input_format) + new_list$x$metadata$data$popup_metadata$output_format_id <- paste0("datetime$", popup_metadata_output_format) + } else if (isTRUE(grepl("_", popup_metadata_output_format))) { + new_list$x$metadata$data$popup_metadata$type <- "number" + new_list$x$metadata$data$popup_metadata$type_id <- paste0("number$", popup_metadata_input_format) + new_list$x$metadata$data$popup_metadata$output_format_id <- paste0("number$", popup_metadata_output_format) + } else if (isTRUE(!is.na(popup_metadata_output_format) && isFALSE(grepl("_", popup_metadata_output_format)) && isFALSE(grepl("^%", popup_metadata_output_format)))) { + new_list$x$metadata$data$popup_metadata$type <- "string" + new_list$x$metadata$data$popup_metadata$type_id <- paste0("string$", popup_metadata_input_format) + new_list$x$metadata$data$popup_metadata$output_format_id <- paste0("string$", popup_metadata_output_format) + } + if (is.na(popup_metadata_input_format) && !is.na(popup_metadata_output_format)) { + "[popup_metadata_input_format] and [popup_metadata_output_format] must both be defined." + } + if (!is.na(popup_metadata_input_format) && is.na(popup_metadata_output_format)) { + "[popup_metadata_input_format] and [popup_metadata_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_horserace_data.R b/R_package/R/bind_horserace_data.R new file mode 100644 index 0000000..f7ea80c --- /dev/null +++ b/R_package/R/bind_horserace_data.R @@ -0,0 +1,322 @@ +#' Bind line chart race data +#' @name bind_horserace_data +#' @param horserace_data Horserace data. +#' @param captions_data Captions data. +#' @param horserace_name Label. The name of each entrant. Suggested data type hints: string. Flourish type hint: column +#' @param horserace_stages Values. Raw scores, which will be automatically converted to ranks. Column names will be used to populate the X axis of the chart. Suggested data type hints: number. Flourish type hint: columns +#' @param horserace_category Color by. Select a column to color the lines by. If omitted, colors will be assigned per name. Suggested data type hints: string. Flourish type hint: column +#' @param horserace_pic Image. Add an image URL or right-click on a cell to upload an image. Suggested data type hints: string. Flourish type hint: column +#' @param horserace_filter Filter. Hide/show entrants based on the values in this column. Suggested data type hints: string, number, datetime. Flourish type hint: column +#' @param captions_from Stage to show. Must match the column headers in the main datasheet. Suggested data type hints: string. Flourish type hint: column +#' @param captions_to Stage to hide. Must match the column headers in the main datasheet. Suggested data type hints: string. Flourish type hint: column +#' @param captions_text Text. Text or HTML to show. Suggested data type hints: string. Flourish type hint: column +#' @param captions_image Image. Image to show. Suggested data type hints: string. Flourish type hint: column +#' @param captions_image_input_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_image_output_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_to_input_format Formats/parses dates, strings, and numbers for the to column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_to_output_format Formats/parses dates, strings, and numbers for the to column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_from_input_format Formats/parses dates, strings, and numbers for the from column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_from_output_format Formats/parses dates, strings, and numbers for the from column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_text_input_format Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param captions_text_output_format Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param horserace_category_input_format Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param horserace_category_output_format Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param horserace_filter_input_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param horserace_filter_output_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param horserace_pic_input_format Formats/parses dates, strings, and numbers for the pic column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param horserace_pic_output_format Formats/parses dates, strings, and numbers for the pic column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param horserace_name_input_format Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param horserace_name_output_format Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param horserace_stages_input_format Formats/parses dates, strings, and numbers for the stages column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param horserace_stages_output_format Formats/parses dates, strings, and numbers for the stages column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "horserace", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_horserace_data(gapminder) +#' ) +#' @export + +bind_horserace_data <- function( + ., + horserace_data = NULL, + captions_data = NULL, + horserace_name = NULL, + horserace_stages = NULL, + horserace_category = NULL, + horserace_pic = NULL, + horserace_filter = NULL, + captions_from = NULL, + captions_to = NULL, + captions_text = NULL, + captions_image = NULL, + captions_image_input_format = NULL, + captions_image_output_format = NULL, + captions_to_input_format = NULL, + captions_to_output_format = NULL, + captions_from_input_format = NULL, + captions_from_output_format = NULL, + captions_text_input_format = NULL, + captions_text_output_format = NULL, + horserace_category_input_format = NULL, + horserace_category_output_format = NULL, + horserace_filter_input_format = NULL, + horserace_filter_output_format = NULL, + horserace_pic_input_format = NULL, + horserace_pic_output_format = NULL, + horserace_name_input_format = NULL, + horserace_name_output_format = NULL, + horserace_stages_input_format = NULL, + horserace_stages_output_format = NULL) { + bindings_error(., "horserace") + + old_list <- . + new_list <- list() + + if (!is.null(horserace_data)) { + columns_horserace_data <- c(paste(horserace_name), paste(horserace_stages), paste(horserace_category), paste(horserace_pic), paste(horserace_filter), NULL) + columns_horserace_data <- columns_horserace_data[!sapply(columns_horserace_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_horserace_data, split = ",", fixed = TRUE), + data = horserace_data + ) + int_columns_horserace_data <- sapply(horserace_data, is.integer) + horserace_data[, int_columns_horserace_data] <- lapply(horserace_data[, int_columns_horserace_data], as.character) + } + if (!is.null(captions_data)) { + columns_captions_data <- c(paste(captions_from), paste(captions_to), paste(captions_text), paste(captions_image), NULL) + columns_captions_data <- columns_captions_data[!sapply(columns_captions_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_captions_data, split = ",", fixed = TRUE), + data = captions_data + ) + int_columns_captions_data <- sapply(captions_data, is.integer) + captions_data[, int_columns_captions_data] <- lapply(captions_data[, int_columns_captions_data], as.character) + } + new_list$x$data$horserace <- horserace_data + new_list$x$data$captions <- captions_data + new_list$x$bindings$horserace$name <- horserace_name + + if (is.null(horserace_stages)) { + new_list$x$bindings$horserace$stages <- "list" + } else { + new_list$x$bindings$horserace$stages <- horserace_stages + } + + new_list$x$bindings$horserace$category <- horserace_category + new_list$x$bindings$horserace$pic <- horserace_pic + new_list$x$bindings$horserace$filter <- horserace_filter + new_list$x$bindings$captions$from <- captions_from + new_list$x$bindings$captions$to <- captions_to + new_list$x$bindings$captions$text <- captions_text + new_list$x$bindings$captions$image <- captions_image + + + if (!is.null(horserace_name_output_format) && !is.null(horserace_name_input_format)) { + if (isTRUE(grepl("^%", horserace_name_output_format))) { + new_list$x$metadata$horserace$name$type <- "datetime" + new_list$x$metadata$horserace$name$type_id <- paste0("datetime$", horserace_name_input_format) + new_list$x$metadata$horserace$name$output_format_id <- paste0("datetime$", horserace_name_output_format) + } else if (isTRUE(grepl("_", horserace_name_output_format))) { + new_list$x$metadata$horserace$name$type <- "number" + new_list$x$metadata$horserace$name$type_id <- paste0("number$", horserace_name_input_format) + new_list$x$metadata$horserace$name$output_format_id <- paste0("number$", horserace_name_output_format) + } else if (isTRUE(!is.na(horserace_name_output_format) && isFALSE(grepl("_", horserace_name_output_format)) && isFALSE(grepl("^%", horserace_name_output_format)))) { + new_list$x$metadata$horserace$name$type <- "string" + new_list$x$metadata$horserace$name$type_id <- paste0("string$", horserace_name_input_format) + new_list$x$metadata$horserace$name$output_format_id <- paste0("string$", horserace_name_output_format) + } + if (is.na(horserace_name_input_format) && !is.na(horserace_name_output_format)) { + "[horserace_name_input_format] and [horserace_name_output_format] must both be defined." + } + if (!is.na(horserace_name_input_format) && is.na(horserace_name_output_format)) { + "[horserace_name_input_format] and [horserace_name_output_format] must both be defined." + } + } + + + if (!is.null(horserace_stages_output_format) && !is.null(horserace_stages_input_format)) { + if (isTRUE(grepl("^%", horserace_stages_output_format))) { + new_list$x$metadata$horserace$stages$type <- "datetime" + new_list$x$metadata$horserace$stages$type_id <- paste0("datetime$", horserace_stages_input_format) + new_list$x$metadata$horserace$stages$output_format_id <- paste0("datetime$", horserace_stages_output_format) + } else if (isTRUE(grepl("_", horserace_stages_output_format))) { + new_list$x$metadata$horserace$stages$type <- "number" + new_list$x$metadata$horserace$stages$type_id <- paste0("number$", horserace_stages_input_format) + new_list$x$metadata$horserace$stages$output_format_id <- paste0("number$", horserace_stages_output_format) + } else if (isTRUE(!is.na(horserace_stages_output_format) && isFALSE(grepl("_", horserace_stages_output_format)) && isFALSE(grepl("^%", horserace_stages_output_format)))) { + new_list$x$metadata$horserace$stages$type <- "string" + new_list$x$metadata$horserace$stages$type_id <- paste0("string$", horserace_stages_input_format) + new_list$x$metadata$horserace$stages$output_format_id <- paste0("string$", horserace_stages_output_format) + } + if (is.na(horserace_stages_input_format) && !is.na(horserace_stages_output_format)) { + "[horserace_stages_input_format] and [horserace_stages_output_format] must both be defined." + } + if (!is.na(horserace_stages_input_format) && is.na(horserace_stages_output_format)) { + "[horserace_stages_input_format] and [horserace_stages_output_format] must both be defined." + } + } + + + if (!is.null(horserace_category_output_format) && !is.null(horserace_category_input_format)) { + if (isTRUE(grepl("^%", horserace_category_output_format))) { + new_list$x$metadata$horserace$category$type <- "datetime" + new_list$x$metadata$horserace$category$type_id <- paste0("datetime$", horserace_category_input_format) + new_list$x$metadata$horserace$category$output_format_id <- paste0("datetime$", horserace_category_output_format) + } else if (isTRUE(grepl("_", horserace_category_output_format))) { + new_list$x$metadata$horserace$category$type <- "number" + new_list$x$metadata$horserace$category$type_id <- paste0("number$", horserace_category_input_format) + new_list$x$metadata$horserace$category$output_format_id <- paste0("number$", horserace_category_output_format) + } else if (isTRUE(!is.na(horserace_category_output_format) && isFALSE(grepl("_", horserace_category_output_format)) && isFALSE(grepl("^%", horserace_category_output_format)))) { + new_list$x$metadata$horserace$category$type <- "string" + new_list$x$metadata$horserace$category$type_id <- paste0("string$", horserace_category_input_format) + new_list$x$metadata$horserace$category$output_format_id <- paste0("string$", horserace_category_output_format) + } + if (is.na(horserace_category_input_format) && !is.na(horserace_category_output_format)) { + "[horserace_category_input_format] and [horserace_category_output_format] must both be defined." + } + if (!is.na(horserace_category_input_format) && is.na(horserace_category_output_format)) { + "[horserace_category_input_format] and [horserace_category_output_format] must both be defined." + } + } + + + if (!is.null(horserace_pic_output_format) && !is.null(horserace_pic_input_format)) { + if (isTRUE(grepl("^%", horserace_pic_output_format))) { + new_list$x$metadata$horserace$pic$type <- "datetime" + new_list$x$metadata$horserace$pic$type_id <- paste0("datetime$", horserace_pic_input_format) + new_list$x$metadata$horserace$pic$output_format_id <- paste0("datetime$", horserace_pic_output_format) + } else if (isTRUE(grepl("_", horserace_pic_output_format))) { + new_list$x$metadata$horserace$pic$type <- "number" + new_list$x$metadata$horserace$pic$type_id <- paste0("number$", horserace_pic_input_format) + new_list$x$metadata$horserace$pic$output_format_id <- paste0("number$", horserace_pic_output_format) + } else if (isTRUE(!is.na(horserace_pic_output_format) && isFALSE(grepl("_", horserace_pic_output_format)) && isFALSE(grepl("^%", horserace_pic_output_format)))) { + new_list$x$metadata$horserace$pic$type <- "string" + new_list$x$metadata$horserace$pic$type_id <- paste0("string$", horserace_pic_input_format) + new_list$x$metadata$horserace$pic$output_format_id <- paste0("string$", horserace_pic_output_format) + } + if (is.na(horserace_pic_input_format) && !is.na(horserace_pic_output_format)) { + "[horserace_pic_input_format] and [horserace_pic_output_format] must both be defined." + } + if (!is.na(horserace_pic_input_format) && is.na(horserace_pic_output_format)) { + "[horserace_pic_input_format] and [horserace_pic_output_format] must both be defined." + } + } + + + if (!is.null(horserace_filter_output_format) && !is.null(horserace_filter_input_format)) { + if (isTRUE(grepl("^%", horserace_filter_output_format))) { + new_list$x$metadata$horserace$filter$type <- "datetime" + new_list$x$metadata$horserace$filter$type_id <- paste0("datetime$", horserace_filter_input_format) + new_list$x$metadata$horserace$filter$output_format_id <- paste0("datetime$", horserace_filter_output_format) + } else if (isTRUE(grepl("_", horserace_filter_output_format))) { + new_list$x$metadata$horserace$filter$type <- "number" + new_list$x$metadata$horserace$filter$type_id <- paste0("number$", horserace_filter_input_format) + new_list$x$metadata$horserace$filter$output_format_id <- paste0("number$", horserace_filter_output_format) + } else if (isTRUE(!is.na(horserace_filter_output_format) && isFALSE(grepl("_", horserace_filter_output_format)) && isFALSE(grepl("^%", horserace_filter_output_format)))) { + new_list$x$metadata$horserace$filter$type <- "string" + new_list$x$metadata$horserace$filter$type_id <- paste0("string$", horserace_filter_input_format) + new_list$x$metadata$horserace$filter$output_format_id <- paste0("string$", horserace_filter_output_format) + } + if (is.na(horserace_filter_input_format) && !is.na(horserace_filter_output_format)) { + "[horserace_filter_input_format] and [horserace_filter_output_format] must both be defined." + } + if (!is.na(horserace_filter_input_format) && is.na(horserace_filter_output_format)) { + "[horserace_filter_input_format] and [horserace_filter_output_format] must both be defined." + } + } + + + if (!is.null(captions_from_output_format) && !is.null(captions_from_input_format)) { + if (isTRUE(grepl("^%", captions_from_output_format))) { + new_list$x$metadata$captions$from$type <- "datetime" + new_list$x$metadata$captions$from$type_id <- paste0("datetime$", captions_from_input_format) + new_list$x$metadata$captions$from$output_format_id <- paste0("datetime$", captions_from_output_format) + } else if (isTRUE(grepl("_", captions_from_output_format))) { + new_list$x$metadata$captions$from$type <- "number" + new_list$x$metadata$captions$from$type_id <- paste0("number$", captions_from_input_format) + new_list$x$metadata$captions$from$output_format_id <- paste0("number$", captions_from_output_format) + } else if (isTRUE(!is.na(captions_from_output_format) && isFALSE(grepl("_", captions_from_output_format)) && isFALSE(grepl("^%", captions_from_output_format)))) { + new_list$x$metadata$captions$from$type <- "string" + new_list$x$metadata$captions$from$type_id <- paste0("string$", captions_from_input_format) + new_list$x$metadata$captions$from$output_format_id <- paste0("string$", captions_from_output_format) + } + if (is.na(captions_from_input_format) && !is.na(captions_from_output_format)) { + "[captions_from_input_format] and [captions_from_output_format] must both be defined." + } + if (!is.na(captions_from_input_format) && is.na(captions_from_output_format)) { + "[captions_from_input_format] and [captions_from_output_format] must both be defined." + } + } + + + if (!is.null(captions_to_output_format) && !is.null(captions_to_input_format)) { + if (isTRUE(grepl("^%", captions_to_output_format))) { + new_list$x$metadata$captions$to$type <- "datetime" + new_list$x$metadata$captions$to$type_id <- paste0("datetime$", captions_to_input_format) + new_list$x$metadata$captions$to$output_format_id <- paste0("datetime$", captions_to_output_format) + } else if (isTRUE(grepl("_", captions_to_output_format))) { + new_list$x$metadata$captions$to$type <- "number" + new_list$x$metadata$captions$to$type_id <- paste0("number$", captions_to_input_format) + new_list$x$metadata$captions$to$output_format_id <- paste0("number$", captions_to_output_format) + } else if (isTRUE(!is.na(captions_to_output_format) && isFALSE(grepl("_", captions_to_output_format)) && isFALSE(grepl("^%", captions_to_output_format)))) { + new_list$x$metadata$captions$to$type <- "string" + new_list$x$metadata$captions$to$type_id <- paste0("string$", captions_to_input_format) + new_list$x$metadata$captions$to$output_format_id <- paste0("string$", captions_to_output_format) + } + if (is.na(captions_to_input_format) && !is.na(captions_to_output_format)) { + "[captions_to_input_format] and [captions_to_output_format] must both be defined." + } + if (!is.na(captions_to_input_format) && is.na(captions_to_output_format)) { + "[captions_to_input_format] and [captions_to_output_format] must both be defined." + } + } + + + if (!is.null(captions_text_output_format) && !is.null(captions_text_input_format)) { + if (isTRUE(grepl("^%", captions_text_output_format))) { + new_list$x$metadata$captions$text$type <- "datetime" + new_list$x$metadata$captions$text$type_id <- paste0("datetime$", captions_text_input_format) + new_list$x$metadata$captions$text$output_format_id <- paste0("datetime$", captions_text_output_format) + } else if (isTRUE(grepl("_", captions_text_output_format))) { + new_list$x$metadata$captions$text$type <- "number" + new_list$x$metadata$captions$text$type_id <- paste0("number$", captions_text_input_format) + new_list$x$metadata$captions$text$output_format_id <- paste0("number$", captions_text_output_format) + } else if (isTRUE(!is.na(captions_text_output_format) && isFALSE(grepl("_", captions_text_output_format)) && isFALSE(grepl("^%", captions_text_output_format)))) { + new_list$x$metadata$captions$text$type <- "string" + new_list$x$metadata$captions$text$type_id <- paste0("string$", captions_text_input_format) + new_list$x$metadata$captions$text$output_format_id <- paste0("string$", captions_text_output_format) + } + if (is.na(captions_text_input_format) && !is.na(captions_text_output_format)) { + "[captions_text_input_format] and [captions_text_output_format] must both be defined." + } + if (!is.na(captions_text_input_format) && is.na(captions_text_output_format)) { + "[captions_text_input_format] and [captions_text_output_format] must both be defined." + } + } + + + if (!is.null(captions_image_output_format) && !is.null(captions_image_input_format)) { + if (isTRUE(grepl("^%", captions_image_output_format))) { + new_list$x$metadata$captions$image$type <- "datetime" + new_list$x$metadata$captions$image$type_id <- paste0("datetime$", captions_image_input_format) + new_list$x$metadata$captions$image$output_format_id <- paste0("datetime$", captions_image_output_format) + } else if (isTRUE(grepl("_", captions_image_output_format))) { + new_list$x$metadata$captions$image$type <- "number" + new_list$x$metadata$captions$image$type_id <- paste0("number$", captions_image_input_format) + new_list$x$metadata$captions$image$output_format_id <- paste0("number$", captions_image_output_format) + } else if (isTRUE(!is.na(captions_image_output_format) && isFALSE(grepl("_", captions_image_output_format)) && isFALSE(grepl("^%", captions_image_output_format)))) { + new_list$x$metadata$captions$image$type <- "string" + new_list$x$metadata$captions$image$type_id <- paste0("string$", captions_image_input_format) + new_list$x$metadata$captions$image$output_format_id <- paste0("string$", captions_image_output_format) + } + if (is.na(captions_image_input_format) && !is.na(captions_image_output_format)) { + "[captions_image_input_format] and [captions_image_output_format] must both be defined." + } + if (!is.na(captions_image_input_format) && is.na(captions_image_output_format)) { + "[captions_image_input_format] and [captions_image_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_interactive_svg_data.R b/R_package/R/bind_interactive_svg_data.R new file mode 100644 index 0000000..8f39447 --- /dev/null +++ b/R_package/R/bind_interactive_svg_data.R @@ -0,0 +1,60 @@ +#' Bind interactive svg data +#' @name bind_interactive_svg_data +#' @param data Data. +#' @param id ID. A column of IDs of elements in the uploaded SVG file. Flourish type hint: column +#' @param reveal_id Reveal layer. A column to reveal when layer is clicked. Flourish type hint: column +#' @param h3 Heading 1. A column containing the main header. Flourish type hint: column +#' @param h4 Heading 2. A column containing a secondary header. Flourish type hint: column +#' @param content Content. A column containing text or HTML to display. Flourish type hint: column +#' @param link Link. A URL that can be opened when a layer is clicked. Any reveal layers or popups will be overridden. Flourish type hint: column +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Flourish type hint: columns +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "interactive_svg", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_interactive_svg_data(gapminder) +#' ) +#' @export + +bind_interactive_svg_data <- function( + ., + data = NULL, + id = NULL, + reveal_id = NULL, + h3 = NULL, + h4 = NULL, + content = NULL, + link = NULL, + metadata = NULL) { + bindings_error(., "interactive_svg") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(id), paste(reveal_id), paste(h3), paste(h4), paste(content), paste(link), paste(metadata), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$id <- id + new_list$x$bindings$data$reveal_id <- reveal_id + new_list$x$bindings$data$h3 <- h3 + new_list$x$bindings$data$h4 <- h4 + new_list$x$bindings$data$content <- content + new_list$x$bindings$data$link <- link + + if (is.null(metadata)) { + new_list$x$bindings$data$metadata <- "list" + } else { + new_list$x$bindings$data$metadata <- metadata + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_line_bar_pie_data.R b/R_package/R/bind_line_bar_pie_data.R new file mode 100644 index 0000000..9c28f57 --- /dev/null +++ b/R_package/R/bind_line_bar_pie_data.R @@ -0,0 +1,196 @@ +#' Bind line, bar and pie charts data +#' @name bind_line_bar_pie_data +#' @param data Data. +#' @param label Labels/time. A column of names, numbers or datetimes. Suggested data type hints: string, datetime, number. Flourish type hint: column +#' @param value Values. One or more columns of numbers. The Preferred output format of the first column is used to format values. Suggested data type hints: number. Flourish type hint: columns +#' @param facet Charts grid. If specified and Grid of charts view is on, creates a separate mini chart for each value found in the column. Suggested data type hints: string. Flourish type hint: column +#' @param filter Row filter. Use this column to create a user-facing row control. To create a column filter, use the Series filter option in the settings panel instead. Suggested data type hints: string, datetime, number. Flourish type hint: column +#' @param metadata Info for custom popups. One or more columns of information (text, image URLs , embedded charts etc) to include in custom popups and panels Suggested data type hints: string, datetime, number. Flourish type hint: columns +#' @param facet_input_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param facet_output_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_input_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_output_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param label_input_format Formats/parses dates, strings, and numbers for the label column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param label_output_format Formats/parses dates, strings, and numbers for the label column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_input_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_output_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param value_input_format Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param value_output_format Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "line", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_line_bar_pie_data(gapminder) +#' ) +#' @export + + +bind_line_bar_pie_data <- function( + ., + data = NULL, + label = NULL, + value = NULL, + facet = NULL, + filter = NULL, + metadata = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + label_input_format = NULL, + label_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + value_input_format = NULL, + value_output_format = NULL) { + bindings_error(., "line_bar_pie") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(label), paste(value), paste(facet), paste(filter), paste(metadata), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$label <- label + + if (is.null(value)) { + new_list$x$bindings$data$value <- "list" + } else { + new_list$x$bindings$data$value <- value + } + + new_list$x$bindings$data$facet <- facet + new_list$x$bindings$data$filter <- filter + + if (is.null(metadata)) { + new_list$x$bindings$data$metadata <- "list" + } else { + new_list$x$bindings$data$metadata <- metadata + } + + + + if (!is.null(label_output_format) && !is.null(label_input_format)) { + if (isTRUE(grepl("^%", label_output_format))) { + new_list$x$metadata$data$label$type <- "datetime" + new_list$x$metadata$data$label$type_id <- paste0("datetime$", label_input_format) + new_list$x$metadata$data$label$output_format_id <- paste0("datetime$", label_output_format) + } else if (isTRUE(grepl("_", label_output_format))) { + new_list$x$metadata$data$label$type <- "number" + new_list$x$metadata$data$label$type_id <- paste0("number$", label_input_format) + new_list$x$metadata$data$label$output_format_id <- paste0("number$", label_output_format) + } else if (isTRUE(!is.na(label_output_format) && isFALSE(grepl("_", label_output_format)) && isFALSE(grepl("^%", label_output_format)))) { + new_list$x$metadata$data$label$type <- "string" + new_list$x$metadata$data$label$type_id <- paste0("string$", label_input_format) + new_list$x$metadata$data$label$output_format_id <- paste0("string$", label_output_format) + } + if (is.na(label_input_format) && !is.na(label_output_format)) { + "[label_input_format] and [label_output_format] must both be defined." + } + if (!is.na(label_input_format) && is.na(label_output_format)) { + "[label_input_format] and [label_output_format] must both be defined." + } + } + + + if (!is.null(value_output_format) && !is.null(value_input_format)) { + if (isTRUE(grepl("^%", value_output_format))) { + new_list$x$metadata$data$value$type <- "datetime" + new_list$x$metadata$data$value$type_id <- paste0("datetime$", value_input_format) + new_list$x$metadata$data$value$output_format_id <- paste0("datetime$", value_output_format) + } else if (isTRUE(grepl("_", value_output_format))) { + new_list$x$metadata$data$value$type <- "number" + new_list$x$metadata$data$value$type_id <- paste0("number$", value_input_format) + new_list$x$metadata$data$value$output_format_id <- paste0("number$", value_output_format) + } else if (isTRUE(!is.na(value_output_format) && isFALSE(grepl("_", value_output_format)) && isFALSE(grepl("^%", value_output_format)))) { + new_list$x$metadata$data$value$type <- "string" + new_list$x$metadata$data$value$type_id <- paste0("string$", value_input_format) + new_list$x$metadata$data$value$output_format_id <- paste0("string$", value_output_format) + } + if (is.na(value_input_format) && !is.na(value_output_format)) { + "[value_input_format] and [value_output_format] must both be defined." + } + if (!is.na(value_input_format) && is.na(value_output_format)) { + "[value_input_format] and [value_output_format] must both be defined." + } + } + + + if (!is.null(facet_output_format) && !is.null(facet_input_format)) { + if (isTRUE(grepl("^%", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "datetime" + new_list$x$metadata$data$facet$type_id <- paste0("datetime$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("datetime$", facet_output_format) + } else if (isTRUE(grepl("_", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "number" + new_list$x$metadata$data$facet$type_id <- paste0("number$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("number$", facet_output_format) + } else if (isTRUE(!is.na(facet_output_format) && isFALSE(grepl("_", facet_output_format)) && isFALSE(grepl("^%", facet_output_format)))) { + new_list$x$metadata$data$facet$type <- "string" + new_list$x$metadata$data$facet$type_id <- paste0("string$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("string$", facet_output_format) + } + if (is.na(facet_input_format) && !is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + if (!is.na(facet_input_format) && is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + } + + + if (!is.null(filter_output_format) && !is.null(filter_input_format)) { + if (isTRUE(grepl("^%", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "datetime" + new_list$x$metadata$data$filter$type_id <- paste0("datetime$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("datetime$", filter_output_format) + } else if (isTRUE(grepl("_", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "number" + new_list$x$metadata$data$filter$type_id <- paste0("number$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("number$", filter_output_format) + } else if (isTRUE(!is.na(filter_output_format) && isFALSE(grepl("_", filter_output_format)) && isFALSE(grepl("^%", filter_output_format)))) { + new_list$x$metadata$data$filter$type <- "string" + new_list$x$metadata$data$filter$type_id <- paste0("string$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("string$", filter_output_format) + } + if (is.na(filter_input_format) && !is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + if (!is.na(filter_input_format) && is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + } + + + if (!is.null(metadata_output_format) && !is.null(metadata_input_format)) { + if (isTRUE(grepl("^%", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "datetime" + new_list$x$metadata$data$metadata$type_id <- paste0("datetime$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("datetime$", metadata_output_format) + } else if (isTRUE(grepl("_", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "number" + new_list$x$metadata$data$metadata$type_id <- paste0("number$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("number$", metadata_output_format) + } else if (isTRUE(!is.na(metadata_output_format) && isFALSE(grepl("_", metadata_output_format)) && isFALSE(grepl("^%", metadata_output_format)))) { + new_list$x$metadata$data$metadata$type <- "string" + new_list$x$metadata$data$metadata$type_id <- paste0("string$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("string$", metadata_output_format) + } + if (is.na(metadata_input_format) && !is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + if (!is.na(metadata_input_format) && is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_marimekko_data.R b/R_package/R/bind_marimekko_data.R new file mode 100644 index 0000000..860ffd6 --- /dev/null +++ b/R_package/R/bind_marimekko_data.R @@ -0,0 +1,255 @@ +#' Bind marimekko data +#' @name bind_marimekko_data +#' @param data Data. +#' @param name Name +#' @param unstacked_value Unstacked value +#' @param stacked_values Secondary metric. One or more numeric columns. Each column will form a segment of a stacked bar. Flourish type hint: columns +#' @param facet Facet +#' @param category Color category. Suggested data type hints: string. Flourish type hint: column +#' @param filter Filter by. (Optional) Choose a categorical column to filter by. A dropdown will appear in the visualization. Suggested data type hints: string, number, datetime. Flourish type hint: column +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Suggested data type hints: number, string, datetime. Flourish type hint: columns +#' @param category_input_format Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param category_output_format Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_input_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_output_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param facet_input_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param facet_output_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_input_format Formats/parses dates, strings, and numbers for the metadata column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_output_format Formats/parses dates, strings, and numbers for the metadata column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param name_input_format Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param name_output_format Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param unstacked_value_input_format Formats/parses dates, strings, and numbers for the unstacked_value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param unstacked_value_output_format Formats/parses dates, strings, and numbers for the unstacked_value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param stacked_values_input_format Formats/parses dates, strings, and numbers for the stacked_values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param stacked_values_output_format Formats/parses dates, strings, and numbers for the stacked_values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "marimekko", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_marimekko_data(gapminder) +#' ) +#' @export + +bind_marimekko_data <- function( + ., + data = NULL, + name = NULL, + unstacked_value = NULL, + stacked_values = NULL, + facet = NULL, + category = NULL, + filter = NULL, + metadata = NULL, + category_input_format = NULL, + category_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + name_input_format = NULL, + name_output_format = NULL, + unstacked_value_input_format = NULL, + unstacked_value_output_format = NULL, + stacked_values_input_format = NULL, + stacked_values_output_format = NULL) { + bindings_error(., "marimekko") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(name), paste(unstacked_value), paste(stacked_values), paste(facet), paste(category), paste(filter), paste(metadata), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$name <- name + new_list$x$bindings$data$unstacked_value <- unstacked_value + + if (is.null(stacked_values)) { + new_list$x$bindings$data$stacked_values <- "list" + } else { + new_list$x$bindings$data$stacked_values <- stacked_values + } + + new_list$x$bindings$data$facet <- facet + new_list$x$bindings$data$category <- category + new_list$x$bindings$data$filter <- filter + + if (is.null(metadata)) { + new_list$x$bindings$data$metadata <- "list" + } else { + new_list$x$bindings$data$metadata <- metadata + } + + + + if (!is.null(name_output_format) && !is.null(name_input_format)) { + if (isTRUE(grepl("^%", name_output_format))) { + new_list$x$metadata$data$name$type <- "datetime" + new_list$x$metadata$data$name$type_id <- paste0("datetime$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("datetime$", name_output_format) + } else if (isTRUE(grepl("_", name_output_format))) { + new_list$x$metadata$data$name$type <- "number" + new_list$x$metadata$data$name$type_id <- paste0("number$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("number$", name_output_format) + } else if (isTRUE(!is.na(name_output_format) && isFALSE(grepl("_", name_output_format)) && isFALSE(grepl("^%", name_output_format)))) { + new_list$x$metadata$data$name$type <- "string" + new_list$x$metadata$data$name$type_id <- paste0("string$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("string$", name_output_format) + } + if (is.na(name_input_format) && !is.na(name_output_format)) { + "[name_input_format] and [name_output_format] must both be defined." + } + if (!is.na(name_input_format) && is.na(name_output_format)) { + "[name_input_format] and [name_output_format] must both be defined." + } + } + + + if (!is.null(unstacked_value_output_format) && !is.null(unstacked_value_input_format)) { + if (isTRUE(grepl("^%", unstacked_value_output_format))) { + new_list$x$metadata$data$unstacked_value$type <- "datetime" + new_list$x$metadata$data$unstacked_value$type_id <- paste0("datetime$", unstacked_value_input_format) + new_list$x$metadata$data$unstacked_value$output_format_id <- paste0("datetime$", unstacked_value_output_format) + } else if (isTRUE(grepl("_", unstacked_value_output_format))) { + new_list$x$metadata$data$unstacked_value$type <- "number" + new_list$x$metadata$data$unstacked_value$type_id <- paste0("number$", unstacked_value_input_format) + new_list$x$metadata$data$unstacked_value$output_format_id <- paste0("number$", unstacked_value_output_format) + } else if (isTRUE(!is.na(unstacked_value_output_format) && isFALSE(grepl("_", unstacked_value_output_format)) && isFALSE(grepl("^%", unstacked_value_output_format)))) { + new_list$x$metadata$data$unstacked_value$type <- "string" + new_list$x$metadata$data$unstacked_value$type_id <- paste0("string$", unstacked_value_input_format) + new_list$x$metadata$data$unstacked_value$output_format_id <- paste0("string$", unstacked_value_output_format) + } + if (is.na(unstacked_value_input_format) && !is.na(unstacked_value_output_format)) { + "[unstacked_value_input_format] and [unstacked_value_output_format] must both be defined." + } + if (!is.na(unstacked_value_input_format) && is.na(unstacked_value_output_format)) { + "[unstacked_value_input_format] and [unstacked_value_output_format] must both be defined." + } + } + + + if (!is.null(stacked_values_output_format) && !is.null(stacked_values_input_format)) { + if (isTRUE(grepl("^%", stacked_values_output_format))) { + new_list$x$metadata$data$stacked_values$type <- "datetime" + new_list$x$metadata$data$stacked_values$type_id <- paste0("datetime$", stacked_values_input_format) + new_list$x$metadata$data$stacked_values$output_format_id <- paste0("datetime$", stacked_values_output_format) + } else if (isTRUE(grepl("_", stacked_values_output_format))) { + new_list$x$metadata$data$stacked_values$type <- "number" + new_list$x$metadata$data$stacked_values$type_id <- paste0("number$", stacked_values_input_format) + new_list$x$metadata$data$stacked_values$output_format_id <- paste0("number$", stacked_values_output_format) + } else if (isTRUE(!is.na(stacked_values_output_format) && isFALSE(grepl("_", stacked_values_output_format)) && isFALSE(grepl("^%", stacked_values_output_format)))) { + new_list$x$metadata$data$stacked_values$type <- "string" + new_list$x$metadata$data$stacked_values$type_id <- paste0("string$", stacked_values_input_format) + new_list$x$metadata$data$stacked_values$output_format_id <- paste0("string$", stacked_values_output_format) + } + if (is.na(stacked_values_input_format) && !is.na(stacked_values_output_format)) { + "[stacked_values_input_format] and [stacked_values_output_format] must both be defined." + } + if (!is.na(stacked_values_input_format) && is.na(stacked_values_output_format)) { + "[stacked_values_input_format] and [stacked_values_output_format] must both be defined." + } + } + + + if (!is.null(facet_output_format) && !is.null(facet_input_format)) { + if (isTRUE(grepl("^%", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "datetime" + new_list$x$metadata$data$facet$type_id <- paste0("datetime$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("datetime$", facet_output_format) + } else if (isTRUE(grepl("_", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "number" + new_list$x$metadata$data$facet$type_id <- paste0("number$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("number$", facet_output_format) + } else if (isTRUE(!is.na(facet_output_format) && isFALSE(grepl("_", facet_output_format)) && isFALSE(grepl("^%", facet_output_format)))) { + new_list$x$metadata$data$facet$type <- "string" + new_list$x$metadata$data$facet$type_id <- paste0("string$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("string$", facet_output_format) + } + if (is.na(facet_input_format) && !is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + if (!is.na(facet_input_format) && is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + } + + + if (!is.null(category_output_format) && !is.null(category_input_format)) { + if (isTRUE(grepl("^%", category_output_format))) { + new_list$x$metadata$data$category$type <- "datetime" + new_list$x$metadata$data$category$type_id <- paste0("datetime$", category_input_format) + new_list$x$metadata$data$category$output_format_id <- paste0("datetime$", category_output_format) + } else if (isTRUE(grepl("_", category_output_format))) { + new_list$x$metadata$data$category$type <- "number" + new_list$x$metadata$data$category$type_id <- paste0("number$", category_input_format) + new_list$x$metadata$data$category$output_format_id <- paste0("number$", category_output_format) + } else if (isTRUE(!is.na(category_output_format) && isFALSE(grepl("_", category_output_format)) && isFALSE(grepl("^%", category_output_format)))) { + new_list$x$metadata$data$category$type <- "string" + new_list$x$metadata$data$category$type_id <- paste0("string$", category_input_format) + new_list$x$metadata$data$category$output_format_id <- paste0("string$", category_output_format) + } + if (is.na(category_input_format) && !is.na(category_output_format)) { + "[category_input_format] and [category_output_format] must both be defined." + } + if (!is.na(category_input_format) && is.na(category_output_format)) { + "[category_input_format] and [category_output_format] must both be defined." + } + } + + + if (!is.null(filter_output_format) && !is.null(filter_input_format)) { + if (isTRUE(grepl("^%", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "datetime" + new_list$x$metadata$data$filter$type_id <- paste0("datetime$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("datetime$", filter_output_format) + } else if (isTRUE(grepl("_", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "number" + new_list$x$metadata$data$filter$type_id <- paste0("number$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("number$", filter_output_format) + } else if (isTRUE(!is.na(filter_output_format) && isFALSE(grepl("_", filter_output_format)) && isFALSE(grepl("^%", filter_output_format)))) { + new_list$x$metadata$data$filter$type <- "string" + new_list$x$metadata$data$filter$type_id <- paste0("string$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("string$", filter_output_format) + } + if (is.na(filter_input_format) && !is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + if (!is.na(filter_input_format) && is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + } + + + if (!is.null(metadata_output_format) && !is.null(metadata_input_format)) { + if (isTRUE(grepl("^%", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "datetime" + new_list$x$metadata$data$metadata$type_id <- paste0("datetime$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("datetime$", metadata_output_format) + } else if (isTRUE(grepl("_", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "number" + new_list$x$metadata$data$metadata$type_id <- paste0("number$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("number$", metadata_output_format) + } else if (isTRUE(!is.na(metadata_output_format) && isFALSE(grepl("_", metadata_output_format)) && isFALSE(grepl("^%", metadata_output_format)))) { + new_list$x$metadata$data$metadata$type <- "string" + new_list$x$metadata$data$metadata$type_id <- paste0("string$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("string$", metadata_output_format) + } + if (is.na(metadata_input_format) && !is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + if (!is.na(metadata_input_format) && is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_network_graph_data.R b/R_package/R/bind_network_graph_data.R new file mode 100644 index 0000000..0e1ac76 --- /dev/null +++ b/R_package/R/bind_network_graph_data.R @@ -0,0 +1,76 @@ +#' Bind network graph data +#' @name bind_network_graph_data +#' @param links_data Links data. +#' @param nodes_data Nodes data. +#' @param links_source Links source +#' @param links_target Links target +#' @param links_value Size by. A numerical value used to set the thickness of the links. Flourish type hint: column +#' @param nodes_id ID. A unique identifier for each point in the network. If not specified, point information will be extracted from the links sheet. Flourish type hint: column +#' @param nodes_group Color by. A group to which the point belongs. If set, can be used to color the points. Ignored if ID not set. Flourish type hint: column +#' @param nodes_size Size by. A numerical value used to size the points. Ignored if ID not set. Flourish type hint: column +#' @param nodes_image Image. An image to go into the circle. Flourish type hint: column +#' @param nodes_metadata Info for popups. One or more columns of information (text, image URLs , embedded charts etc) to include in popups and panels Ignored if ID not set. Flourish type hint: columns +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "network", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_network_graph_data(gapminder) +#' ) +#' @export + +bind_network_graph_data <- function( + ., + links_data = NULL, + nodes_data = NULL, + links_source = NULL, + links_target = NULL, + links_value = NULL, + nodes_id = NULL, + nodes_group = NULL, + nodes_size = NULL, + nodes_image = NULL, + nodes_metadata = NULL) { + bindings_error(., "network_graph") + + old_list <- . + new_list <- list() + + if (!is.null(links_data)) { + columns_links_data <- c(paste(links_source), paste(links_target), paste(links_value), NULL) + columns_links_data <- columns_links_data[!sapply(columns_links_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_links_data, split = ",", fixed = TRUE), + data = links_data + ) + int_columns_links_data <- sapply(links_data, is.integer) + links_data[, int_columns_links_data] <- lapply(links_data[, int_columns_links_data], as.character) + } + if (!is.null(nodes_data)) { + columns_nodes_data <- c(paste(nodes_id), paste(nodes_group), paste(nodes_size), paste(nodes_image), paste(nodes_metadata), NULL) + columns_nodes_data <- columns_nodes_data[!sapply(columns_nodes_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_nodes_data, split = ",", fixed = TRUE), + data = nodes_data + ) + int_columns_nodes_data <- sapply(nodes_data, is.integer) + nodes_data[, int_columns_nodes_data] <- lapply(nodes_data[, int_columns_nodes_data], as.character) + } + new_list$x$data$links <- links_data + new_list$x$data$nodes <- nodes_data + new_list$x$bindings$links$source <- links_source + new_list$x$bindings$links$target <- links_target + new_list$x$bindings$links$value <- links_value + new_list$x$bindings$nodes$id <- nodes_id + new_list$x$bindings$nodes$group <- nodes_group + new_list$x$bindings$nodes$size <- nodes_size + new_list$x$bindings$nodes$image <- nodes_image + + if (is.null(nodes_metadata)) { + new_list$x$bindings$nodes$metadata <- "list" + } else { + new_list$x$bindings$nodes$metadata <- nodes_metadata + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_parliament_chart_data.R b/R_package/R/bind_parliament_chart_data.R new file mode 100644 index 0000000..7991b66 --- /dev/null +++ b/R_package/R/bind_parliament_chart_data.R @@ -0,0 +1,45 @@ +#' Bind parliament chart data +#' @name bind_parliament_chart_data +#' @param data Data. +#' @param party Party +#' @param seats Seats. This should point to the column with election data. Flourish type hint: columns +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "parliament", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_parliament_chart_data(gapminder) +#' ) +#' @export + +bind_parliament_chart_data <- function( + ., + data = NULL, + party = NULL, + seats = NULL) { + bindings_error(., "parliament_chart") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(party), paste(seats), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$party <- party + + if (is.null(seats)) { + new_list$x$bindings$data$seats <- "list" + } else { + new_list$x$bindings$data$seats <- seats + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_pictogram_data.R b/R_package/R/bind_pictogram_data.R new file mode 100644 index 0000000..2ba36d6 --- /dev/null +++ b/R_package/R/bind_pictogram_data.R @@ -0,0 +1,89 @@ +#' Bind pictogram data +#' @name bind_pictogram_data +#' @param data Data. +#' @param icons_data Icons data. +#' @param main_category Main category. The (categorical) column that defines the categories along the main axis. Flourish type hint: column +#' @param sub_category Subcategory. The (categorical) column that defines the categories within each bar. Flourish type hint: column +#' @param values Values. (Optional) Choose the numeric columns to determine the size of each bar. If more than 1 is chosen, a dropdown will appear in the visualization, which lets the user choose. Flourish type hint: columns +#' @param icon_id Icon ID. IDs for joining icons in the Icons datasheet. Must contain IDs that match Icon ID values in Icons Set to the same column as the Main category or Subcategory. Flourish type hint: column +#' @param color Color. The (categorical) column which determines the icon color. Set to the same column as the Main category or Subcategory. Flourish type hint: column +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Flourish type hint: columns +#' @param icons_id Icon ID. Unique ID for joining icon path strings. Must contain IDs that match the Icon ID values in DataFlourish type hint: column +#' @param icons_path_string Icon. Icon path string (e.g. "M10,10 l80,0 l0,80 l-80,0 z") or the name of a built-in icon (e.g. "female"). Flourish type hint: column +#' @param icons_width Icon width. Icon width (in pixels). Flourish type hint: column +#' @param icons_height Icon height. Icon height (in pixels). Flourish type hint: column +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "pictogram", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_pictogram_data(gapminder) +#' ) +#' @export + + +bind_pictogram_data <- function( + ., + data = NULL, + icons_data = NULL, + main_category = NULL, + sub_category = NULL, + values = NULL, + icon_id = NULL, + color = NULL, + metadata = NULL, + icons_id = NULL, + icons_path_string = NULL, + icons_width = NULL, + icons_height = NULL) { + bindings_error(., "pictogram") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(main_category), paste(sub_category), paste(values), paste(icon_id), paste(color), paste(metadata), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + if (!is.null(icons_data)) { + columns_icons_data <- c(paste(icons_id), paste(icons_path_string), paste(icons_width), paste(icons_height), NULL) + columns_icons_data <- columns_icons_data[!sapply(columns_icons_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_icons_data, split = ",", fixed = TRUE), + data = icons_data + ) + int_columns_icons_data <- sapply(icons_data, is.integer) + icons_data[, int_columns_icons_data] <- lapply(icons_data[, int_columns_icons_data], as.character) + } + new_list$x$data$data <- data + new_list$x$data$icons <- icons_data + new_list$x$bindings$data$main_category <- main_category + new_list$x$bindings$data$sub_category <- sub_category + + if (is.null(values)) { + new_list$x$bindings$data$values <- "list" + } else { + new_list$x$bindings$data$values <- values + } + + new_list$x$bindings$data$icon_id <- icon_id + new_list$x$bindings$data$color <- color + + if (is.null(metadata)) { + new_list$x$bindings$data$metadata <- "list" + } else { + new_list$x$bindings$data$metadata <- metadata + } + + new_list$x$bindings$icons$id <- icons_id + new_list$x$bindings$icons$path_string <- icons_path_string + new_list$x$bindings$icons$width <- icons_width + new_list$x$bindings$icons$height <- icons_height + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_quiz_data.R b/R_package/R/bind_quiz_data.R new file mode 100644 index 0000000..af726b1 --- /dev/null +++ b/R_package/R/bind_quiz_data.R @@ -0,0 +1,104 @@ +#' Bind quiz data +#' @name bind_quiz_data +#' @param questions_data Questions data. +#' @param scores_data Scores data. +#' @param results_data Results data. +#' @param questions_text Text. Question text. Flourish type hint: column +#' @param questions_explanation Explanation. A short text explanation accompanying the question. Flourish type hint: column +#' @param questions_input_type Input type. Type of answer input, choose between slider or multiple choice Flourish type hint: column +#' @param questions_answers Answers. The correct answer to the question. The score will be decided by the difference between this answer and your input. Its possible to select multiple columns with answers; this will create a dropdown list above the quiz where you can select which answer to compare to. Flourish type hint: columns +#' @param questions_suffix Slider input suffix. Add a suffix after the value, eg. "%" or "people" (only for slider input type). Flourish type hint: column +#' @param questions_choices Multiple choice options. Options to show in multiple choice questions. Divide using "::" (eg. "Cat :: Dog :: Sheep :: Badger"). Flourish type hint: column +#' @param scores_question Question. Question that the answer belongs to. Flourish type hint: column +#' @param scores_range Answer. The answer to the question. This can be text for multiple choice questions. For slider answers, you can use numbers or number ranges, values could be "0-10" or "4" or "*" to select all answers. You can also add multiple rows with score ranges per question; the more specific scores will take priority (e.g. it will choose "4" over "0-10" over "*"). Flourish type hint: column +#' @param scores_explanation Text. Text to show after answering question. Flourish type hint: column +#' @param scores_media Media. Picture to show after answering question. Flourish type hint: column +#' @param results_range Points range. A range of points youre targeting. You can use numbers or number ranges, values could be "0-10" or "4" or "*" to select all answers. You can also add multiple rows with score ranges per question; the more specific scores will take priority (e.g. it will choose "4" over "0-10" over "*"). Flourish type hint: column +#' @param results_text Results text +#' @param results_media Media. An image to show with the result. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "quiz", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_quiz_data(gapminder) +#' ) +#' @export + +bind_quiz_data <- function( + ., + questions_data = NULL, + scores_data = NULL, + results_data = NULL, + questions_text = NULL, + questions_explanation = NULL, + questions_input_type = NULL, + questions_answers = NULL, + questions_suffix = NULL, + questions_choices = NULL, + scores_question = NULL, + scores_range = NULL, + scores_explanation = NULL, + scores_media = NULL, + results_range = NULL, + results_text = NULL, + results_media = NULL) { + bindings_error(., "quiz") + + old_list <- . + new_list <- list() + + if (!is.null(questions_data)) { + columns_questions_data <- c(paste(questions_text), paste(questions_explanation), paste(questions_input_type), paste(questions_answers), paste(questions_suffix), paste(questions_choices), NULL) + columns_questions_data <- columns_questions_data[!sapply(columns_questions_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_questions_data, split = ",", fixed = TRUE), + data = questions_data + ) + int_columns_questions_data <- sapply(questions_data, is.integer) + questions_data[, int_columns_questions_data] <- lapply(questions_data[, int_columns_questions_data], as.character) + } + if (!is.null(scores_data)) { + columns_scores_data <- c(paste(scores_question), paste(scores_range), paste(scores_explanation), paste(scores_media), NULL) + columns_scores_data <- columns_scores_data[!sapply(columns_scores_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_scores_data, split = ",", fixed = TRUE), + data = scores_data + ) + int_columns_scores_data <- sapply(scores_data, is.integer) + scores_data[, int_columns_scores_data] <- lapply(scores_data[, int_columns_scores_data], as.character) + } + if (!is.null(results_data)) { + columns_results_data <- c(paste(results_range), paste(results_text), paste(results_media), NULL) + columns_results_data <- columns_results_data[!sapply(columns_results_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_results_data, split = ",", fixed = TRUE), + data = results_data + ) + int_columns_results_data <- sapply(results_data, is.integer) + results_data[, int_columns_results_data] <- lapply(results_data[, int_columns_results_data], as.character) + } + new_list$x$data$questions <- questions_data + new_list$x$data$scores <- scores_data + new_list$x$data$results <- results_data + new_list$x$bindings$questions$text <- questions_text + new_list$x$bindings$questions$explanation <- questions_explanation + new_list$x$bindings$questions$input_type <- questions_input_type + + if (is.null(questions_answers)) { + new_list$x$bindings$questions$answers <- "list" + } else { + new_list$x$bindings$questions$answers <- questions_answers + } + + new_list$x$bindings$questions$suffix <- questions_suffix + new_list$x$bindings$questions$choices <- questions_choices + new_list$x$bindings$scores$question <- scores_question + new_list$x$bindings$scores$range <- scores_range + new_list$x$bindings$scores$explanation <- scores_explanation + new_list$x$bindings$scores$media <- scores_media + new_list$x$bindings$results$range <- results_range + new_list$x$bindings$results$text <- results_text + new_list$x$bindings$results$media <- results_media + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_radar_data.R b/R_package/R/bind_radar_data.R new file mode 100644 index 0000000..68b5824 --- /dev/null +++ b/R_package/R/bind_radar_data.R @@ -0,0 +1,231 @@ +#' Bind radar chart data +#' @name bind_radar_data +#' @param data Data. +#' @param name Name. A text column containing a name for each radar. Suggested data type hints: string. Flourish type hint: column +#' @param values Values. Select three or more numerical columns. Suggested data type hints: number. Flourish type hint: columns +#' @param filter Filter. If set, creates a filter menu or time slider. Suggested data type hints: string, number, datetime. Flourish type hint: column +#' @param color_category Color category. Add a category to color by If empty, the name column will be used for colors. Suggested data type hints: string. Flourish type hint: column +#' @param facet Grid of charts (facet). Create one column for each grouping you want to allow. Suggested data type hints: string. Flourish type hint: columns +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Suggested data type hints: string, datetime, number. Flourish type hint: columns +#' @param color_category_input_format Formats/parses dates, strings, and numbers for the color_category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param color_category_output_format Formats/parses dates, strings, and numbers for the color_category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_input_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_output_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param facet_input_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param facet_output_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_input_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_output_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param name_input_format Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param name_output_format Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param values_input_format Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param values_output_format Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "radar", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_radar_data(gapminder) +#' ) +#' @export + +bind_radar_data <- function( + ., + data = NULL, + name = NULL, + values = NULL, + filter = NULL, + color_category = NULL, + facet = NULL, + metadata = NULL, + color_category_input_format = NULL, + color_category_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + name_input_format = NULL, + name_output_format = NULL, + values_input_format = NULL, + values_output_format = NULL) { + bindings_error(., "radar") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(name), paste(values), paste(filter), paste(color_category), paste(facet), paste(metadata), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$name <- name + + if (is.null(values)) { + new_list$x$bindings$data$values <- "list" + } else { + new_list$x$bindings$data$values <- values + } + + new_list$x$bindings$data$filter <- filter + new_list$x$bindings$data$color_category <- color_category + + if (is.null(facet)) { + new_list$x$bindings$data$facet <- "list" + } else { + new_list$x$bindings$data$facet <- facet + } + + + if (is.null(metadata)) { + new_list$x$bindings$data$metadata <- "list" + } else { + new_list$x$bindings$data$metadata <- metadata + } + + + + if (!is.null(name_output_format) && !is.null(name_input_format)) { + if (isTRUE(grepl("^%", name_output_format))) { + new_list$x$metadata$data$name$type <- "datetime" + new_list$x$metadata$data$name$type_id <- paste0("datetime$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("datetime$", name_output_format) + } else if (isTRUE(grepl("_", name_output_format))) { + new_list$x$metadata$data$name$type <- "number" + new_list$x$metadata$data$name$type_id <- paste0("number$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("number$", name_output_format) + } else if (isTRUE(!is.na(name_output_format) && isFALSE(grepl("_", name_output_format)) && isFALSE(grepl("^%", name_output_format)))) { + new_list$x$metadata$data$name$type <- "string" + new_list$x$metadata$data$name$type_id <- paste0("string$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("string$", name_output_format) + } + if (is.na(name_input_format) && !is.na(name_output_format)) { + "[name_input_format] and [name_output_format] must both be defined." + } + if (!is.na(name_input_format) && is.na(name_output_format)) { + "[name_input_format] and [name_output_format] must both be defined." + } + } + + + if (!is.null(values_output_format) && !is.null(values_input_format)) { + if (isTRUE(grepl("^%", values_output_format))) { + new_list$x$metadata$data$values$type <- "datetime" + new_list$x$metadata$data$values$type_id <- paste0("datetime$", values_input_format) + new_list$x$metadata$data$values$output_format_id <- paste0("datetime$", values_output_format) + } else if (isTRUE(grepl("_", values_output_format))) { + new_list$x$metadata$data$values$type <- "number" + new_list$x$metadata$data$values$type_id <- paste0("number$", values_input_format) + new_list$x$metadata$data$values$output_format_id <- paste0("number$", values_output_format) + } else if (isTRUE(!is.na(values_output_format) && isFALSE(grepl("_", values_output_format)) && isFALSE(grepl("^%", values_output_format)))) { + new_list$x$metadata$data$values$type <- "string" + new_list$x$metadata$data$values$type_id <- paste0("string$", values_input_format) + new_list$x$metadata$data$values$output_format_id <- paste0("string$", values_output_format) + } + if (is.na(values_input_format) && !is.na(values_output_format)) { + "[values_input_format] and [values_output_format] must both be defined." + } + if (!is.na(values_input_format) && is.na(values_output_format)) { + "[values_input_format] and [values_output_format] must both be defined." + } + } + + + if (!is.null(filter_output_format) && !is.null(filter_input_format)) { + if (isTRUE(grepl("^%", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "datetime" + new_list$x$metadata$data$filter$type_id <- paste0("datetime$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("datetime$", filter_output_format) + } else if (isTRUE(grepl("_", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "number" + new_list$x$metadata$data$filter$type_id <- paste0("number$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("number$", filter_output_format) + } else if (isTRUE(!is.na(filter_output_format) && isFALSE(grepl("_", filter_output_format)) && isFALSE(grepl("^%", filter_output_format)))) { + new_list$x$metadata$data$filter$type <- "string" + new_list$x$metadata$data$filter$type_id <- paste0("string$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("string$", filter_output_format) + } + if (is.na(filter_input_format) && !is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + if (!is.na(filter_input_format) && is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + } + + + if (!is.null(color_category_output_format) && !is.null(color_category_input_format)) { + if (isTRUE(grepl("^%", color_category_output_format))) { + new_list$x$metadata$data$color_category$type <- "datetime" + new_list$x$metadata$data$color_category$type_id <- paste0("datetime$", color_category_input_format) + new_list$x$metadata$data$color_category$output_format_id <- paste0("datetime$", color_category_output_format) + } else if (isTRUE(grepl("_", color_category_output_format))) { + new_list$x$metadata$data$color_category$type <- "number" + new_list$x$metadata$data$color_category$type_id <- paste0("number$", color_category_input_format) + new_list$x$metadata$data$color_category$output_format_id <- paste0("number$", color_category_output_format) + } else if (isTRUE(!is.na(color_category_output_format) && isFALSE(grepl("_", color_category_output_format)) && isFALSE(grepl("^%", color_category_output_format)))) { + new_list$x$metadata$data$color_category$type <- "string" + new_list$x$metadata$data$color_category$type_id <- paste0("string$", color_category_input_format) + new_list$x$metadata$data$color_category$output_format_id <- paste0("string$", color_category_output_format) + } + if (is.na(color_category_input_format) && !is.na(color_category_output_format)) { + "[color_category_input_format] and [color_category_output_format] must both be defined." + } + if (!is.na(color_category_input_format) && is.na(color_category_output_format)) { + "[color_category_input_format] and [color_category_output_format] must both be defined." + } + } + + + if (!is.null(facet_output_format) && !is.null(facet_input_format)) { + if (isTRUE(grepl("^%", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "datetime" + new_list$x$metadata$data$facet$type_id <- paste0("datetime$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("datetime$", facet_output_format) + } else if (isTRUE(grepl("_", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "number" + new_list$x$metadata$data$facet$type_id <- paste0("number$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("number$", facet_output_format) + } else if (isTRUE(!is.na(facet_output_format) && isFALSE(grepl("_", facet_output_format)) && isFALSE(grepl("^%", facet_output_format)))) { + new_list$x$metadata$data$facet$type <- "string" + new_list$x$metadata$data$facet$type_id <- paste0("string$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("string$", facet_output_format) + } + if (is.na(facet_input_format) && !is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + if (!is.na(facet_input_format) && is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + } + + + if (!is.null(metadata_output_format) && !is.null(metadata_input_format)) { + if (isTRUE(grepl("^%", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "datetime" + new_list$x$metadata$data$metadata$type_id <- paste0("datetime$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("datetime$", metadata_output_format) + } else if (isTRUE(grepl("_", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "number" + new_list$x$metadata$data$metadata$type_id <- paste0("number$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("number$", metadata_output_format) + } else if (isTRUE(!is.na(metadata_output_format) && isFALSE(grepl("_", metadata_output_format)) && isFALSE(grepl("^%", metadata_output_format)))) { + new_list$x$metadata$data$metadata$type <- "string" + new_list$x$metadata$data$metadata$type_id <- paste0("string$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("string$", metadata_output_format) + } + if (is.na(metadata_input_format) && !is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + if (!is.na(metadata_input_format) && is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_sankey_data.R b/R_package/R/bind_sankey_data.R new file mode 100644 index 0000000..ceb05f8 --- /dev/null +++ b/R_package/R/bind_sankey_data.R @@ -0,0 +1,279 @@ +#' Bind sankey diagram data +#' @name bind_sankey_data +#' @param data Data. +#' @param source Source. Suggested data type hints: string. Flourish type hint: column +#' @param target Target. Suggested data type hints: string. Flourish type hint: column +#' @param value Value of link. A numerical value used to set the thickness of the links. Suggested data type hints: number. Flourish type hint: column +#' @param filter Filter. Suggested data type hints: string, number, datetime. Flourish type hint: column +#' @param facet Grid of charts. Suggested data type hints: string. Flourish type hint: column +#' @param step_from Step from. An integer(whole number) used to indicate where a link starts from (used only in Alluvial mode). Suggested data type hints: number. Flourish type hint: column +#' @param step_to Step to. An integer(whole number) used to indicate where a link goes to (used only in Alluvial mode). Suggested data type hints: number. Flourish type hint: column +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Suggested data type hints: number, datetime, string. Flourish type hint: columns +#' @param filter_input_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_output_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param facet_input_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param facet_output_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_input_format Formats/parses dates, strings, and numbers for the metadata column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_output_format Formats/parses dates, strings, and numbers for the metadata column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param source_input_format Formats/parses dates, strings, and numbers for the source column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param source_output_format Formats/parses dates, strings, and numbers for the source column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param step_from_input_format Formats/parses dates, strings, and numbers for the step_from column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param step_from_output_format Formats/parses dates, strings, and numbers for the step_from column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param step_to_input_format Formats/parses dates, strings, and numbers for the step_to column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param step_to_output_format Formats/parses dates, strings, and numbers for the step_to column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param target_input_format Formats/parses dates, strings, and numbers for the target column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param target_output_format Formats/parses dates, strings, and numbers for the target column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param value_input_format Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param value_output_format Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "sankey", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_sankey_data(gapminder) +#' ) +#' @export + +bind_sankey_data <- function( + ., + data = NULL, + source = NULL, + target = NULL, + value = NULL, + filter = NULL, + facet = NULL, + step_from = NULL, + step_to = NULL, + metadata = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + source_input_format = NULL, + source_output_format = NULL, + step_from_input_format = NULL, + step_from_output_format = NULL, + step_to_input_format = NULL, + step_to_output_format = NULL, + target_input_format = NULL, + target_output_format = NULL, + value_input_format = NULL, + value_output_format = NULL) { + bindings_error(., "sankey") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(source), paste(target), paste(value), paste(filter), paste(facet), paste(step_from), paste(step_to), paste(metadata), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$source <- source + new_list$x$bindings$data$target <- target + new_list$x$bindings$data$value <- value + new_list$x$bindings$data$filter <- filter + new_list$x$bindings$data$facet <- facet + new_list$x$bindings$data$step_from <- step_from + new_list$x$bindings$data$step_to <- step_to + + if (is.null(metadata)) { + new_list$x$bindings$data$metadata <- "list" + } else { + new_list$x$bindings$data$metadata <- metadata + } + + + + if (!is.null(source_output_format) && !is.null(source_input_format)) { + if (isTRUE(grepl("^%", source_output_format))) { + new_list$x$metadata$data$source$type <- "datetime" + new_list$x$metadata$data$source$type_id <- paste0("datetime$", source_input_format) + new_list$x$metadata$data$source$output_format_id <- paste0("datetime$", source_output_format) + } else if (isTRUE(grepl("_", source_output_format))) { + new_list$x$metadata$data$source$type <- "number" + new_list$x$metadata$data$source$type_id <- paste0("number$", source_input_format) + new_list$x$metadata$data$source$output_format_id <- paste0("number$", source_output_format) + } else if (isTRUE(!is.na(source_output_format) && isFALSE(grepl("_", source_output_format)) && isFALSE(grepl("^%", source_output_format)))) { + new_list$x$metadata$data$source$type <- "string" + new_list$x$metadata$data$source$type_id <- paste0("string$", source_input_format) + new_list$x$metadata$data$source$output_format_id <- paste0("string$", source_output_format) + } + if (is.na(source_input_format) && !is.na(source_output_format)) { + "[source_input_format] and [source_output_format] must both be defined." + } + if (!is.na(source_input_format) && is.na(source_output_format)) { + "[source_input_format] and [source_output_format] must both be defined." + } + } + + + if (!is.null(target_output_format) && !is.null(target_input_format)) { + if (isTRUE(grepl("^%", target_output_format))) { + new_list$x$metadata$data$target$type <- "datetime" + new_list$x$metadata$data$target$type_id <- paste0("datetime$", target_input_format) + new_list$x$metadata$data$target$output_format_id <- paste0("datetime$", target_output_format) + } else if (isTRUE(grepl("_", target_output_format))) { + new_list$x$metadata$data$target$type <- "number" + new_list$x$metadata$data$target$type_id <- paste0("number$", target_input_format) + new_list$x$metadata$data$target$output_format_id <- paste0("number$", target_output_format) + } else if (isTRUE(!is.na(target_output_format) && isFALSE(grepl("_", target_output_format)) && isFALSE(grepl("^%", target_output_format)))) { + new_list$x$metadata$data$target$type <- "string" + new_list$x$metadata$data$target$type_id <- paste0("string$", target_input_format) + new_list$x$metadata$data$target$output_format_id <- paste0("string$", target_output_format) + } + if (is.na(target_input_format) && !is.na(target_output_format)) { + "[target_input_format] and [target_output_format] must both be defined." + } + if (!is.na(target_input_format) && is.na(target_output_format)) { + "[target_input_format] and [target_output_format] must both be defined." + } + } + + + if (!is.null(value_output_format) && !is.null(value_input_format)) { + if (isTRUE(grepl("^%", value_output_format))) { + new_list$x$metadata$data$value$type <- "datetime" + new_list$x$metadata$data$value$type_id <- paste0("datetime$", value_input_format) + new_list$x$metadata$data$value$output_format_id <- paste0("datetime$", value_output_format) + } else if (isTRUE(grepl("_", value_output_format))) { + new_list$x$metadata$data$value$type <- "number" + new_list$x$metadata$data$value$type_id <- paste0("number$", value_input_format) + new_list$x$metadata$data$value$output_format_id <- paste0("number$", value_output_format) + } else if (isTRUE(!is.na(value_output_format) && isFALSE(grepl("_", value_output_format)) && isFALSE(grepl("^%", value_output_format)))) { + new_list$x$metadata$data$value$type <- "string" + new_list$x$metadata$data$value$type_id <- paste0("string$", value_input_format) + new_list$x$metadata$data$value$output_format_id <- paste0("string$", value_output_format) + } + if (is.na(value_input_format) && !is.na(value_output_format)) { + "[value_input_format] and [value_output_format] must both be defined." + } + if (!is.na(value_input_format) && is.na(value_output_format)) { + "[value_input_format] and [value_output_format] must both be defined." + } + } + + + if (!is.null(filter_output_format) && !is.null(filter_input_format)) { + if (isTRUE(grepl("^%", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "datetime" + new_list$x$metadata$data$filter$type_id <- paste0("datetime$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("datetime$", filter_output_format) + } else if (isTRUE(grepl("_", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "number" + new_list$x$metadata$data$filter$type_id <- paste0("number$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("number$", filter_output_format) + } else if (isTRUE(!is.na(filter_output_format) && isFALSE(grepl("_", filter_output_format)) && isFALSE(grepl("^%", filter_output_format)))) { + new_list$x$metadata$data$filter$type <- "string" + new_list$x$metadata$data$filter$type_id <- paste0("string$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("string$", filter_output_format) + } + if (is.na(filter_input_format) && !is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + if (!is.na(filter_input_format) && is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + } + + + if (!is.null(facet_output_format) && !is.null(facet_input_format)) { + if (isTRUE(grepl("^%", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "datetime" + new_list$x$metadata$data$facet$type_id <- paste0("datetime$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("datetime$", facet_output_format) + } else if (isTRUE(grepl("_", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "number" + new_list$x$metadata$data$facet$type_id <- paste0("number$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("number$", facet_output_format) + } else if (isTRUE(!is.na(facet_output_format) && isFALSE(grepl("_", facet_output_format)) && isFALSE(grepl("^%", facet_output_format)))) { + new_list$x$metadata$data$facet$type <- "string" + new_list$x$metadata$data$facet$type_id <- paste0("string$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("string$", facet_output_format) + } + if (is.na(facet_input_format) && !is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + if (!is.na(facet_input_format) && is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + } + + + if (!is.null(step_from_output_format) && !is.null(step_from_input_format)) { + if (isTRUE(grepl("^%", step_from_output_format))) { + new_list$x$metadata$data$step_from$type <- "datetime" + new_list$x$metadata$data$step_from$type_id <- paste0("datetime$", step_from_input_format) + new_list$x$metadata$data$step_from$output_format_id <- paste0("datetime$", step_from_output_format) + } else if (isTRUE(grepl("_", step_from_output_format))) { + new_list$x$metadata$data$step_from$type <- "number" + new_list$x$metadata$data$step_from$type_id <- paste0("number$", step_from_input_format) + new_list$x$metadata$data$step_from$output_format_id <- paste0("number$", step_from_output_format) + } else if (isTRUE(!is.na(step_from_output_format) && isFALSE(grepl("_", step_from_output_format)) && isFALSE(grepl("^%", step_from_output_format)))) { + new_list$x$metadata$data$step_from$type <- "string" + new_list$x$metadata$data$step_from$type_id <- paste0("string$", step_from_input_format) + new_list$x$metadata$data$step_from$output_format_id <- paste0("string$", step_from_output_format) + } + if (is.na(step_from_input_format) && !is.na(step_from_output_format)) { + "[step_from_input_format] and [step_from_output_format] must both be defined." + } + if (!is.na(step_from_input_format) && is.na(step_from_output_format)) { + "[step_from_input_format] and [step_from_output_format] must both be defined." + } + } + + + if (!is.null(step_to_output_format) && !is.null(step_to_input_format)) { + if (isTRUE(grepl("^%", step_to_output_format))) { + new_list$x$metadata$data$step_to$type <- "datetime" + new_list$x$metadata$data$step_to$type_id <- paste0("datetime$", step_to_input_format) + new_list$x$metadata$data$step_to$output_format_id <- paste0("datetime$", step_to_output_format) + } else if (isTRUE(grepl("_", step_to_output_format))) { + new_list$x$metadata$data$step_to$type <- "number" + new_list$x$metadata$data$step_to$type_id <- paste0("number$", step_to_input_format) + new_list$x$metadata$data$step_to$output_format_id <- paste0("number$", step_to_output_format) + } else if (isTRUE(!is.na(step_to_output_format) && isFALSE(grepl("_", step_to_output_format)) && isFALSE(grepl("^%", step_to_output_format)))) { + new_list$x$metadata$data$step_to$type <- "string" + new_list$x$metadata$data$step_to$type_id <- paste0("string$", step_to_input_format) + new_list$x$metadata$data$step_to$output_format_id <- paste0("string$", step_to_output_format) + } + if (is.na(step_to_input_format) && !is.na(step_to_output_format)) { + "[step_to_input_format] and [step_to_output_format] must both be defined." + } + if (!is.na(step_to_input_format) && is.na(step_to_output_format)) { + "[step_to_input_format] and [step_to_output_format] must both be defined." + } + } + + + if (!is.null(metadata_output_format) && !is.null(metadata_input_format)) { + if (isTRUE(grepl("^%", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "datetime" + new_list$x$metadata$data$metadata$type_id <- paste0("datetime$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("datetime$", metadata_output_format) + } else if (isTRUE(grepl("_", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "number" + new_list$x$metadata$data$metadata$type_id <- paste0("number$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("number$", metadata_output_format) + } else if (isTRUE(!is.na(metadata_output_format) && isFALSE(grepl("_", metadata_output_format)) && isFALSE(grepl("^%", metadata_output_format)))) { + new_list$x$metadata$data$metadata$type <- "string" + new_list$x$metadata$data$metadata$type_id <- paste0("string$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("string$", metadata_output_format) + } + if (is.na(metadata_input_format) && !is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + if (!is.na(metadata_input_format) && is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_scatter_data.R b/R_package/R/bind_scatter_data.R new file mode 100644 index 0000000..cc35695 --- /dev/null +++ b/R_package/R/bind_scatter_data.R @@ -0,0 +1,375 @@ +#' Bind scatter data +#' @name bind_scatter_data +#' @param data Data. +#' @param x X values. Suggested data type hints: number, string, datetime. Flourish type hint: column +#' @param y Y values. Suggested data type hints: number, string, datetime. Flourish type hint: column +#' @param name Name. Select multiple columns if required to make a unique name. Suggested data type hints: string. Flourish type hint: columns +#' @param color Color. Colors the dots based on numbers or categories. Suggested data type hints: string, number. Flourish type hint: column +#' @param size Size. Sizes the dots based on the numbers. Suggested data type hints: number, string. Flourish type hint: column +#' @param shape Shape. Sets the shape of the dots based on numbers or categories. Suggested data type hints: string. Flourish type hint: column +#' @param facet Grid of charts (facet). Creates a mini chart for each value in the selected column. Suggested data type hints: string. Flourish type hint: column +#' @param slider Time. Creates a time slider and connects/animates dots with the same name. Suggested data type hints: datetime, string, number. Flourish type hint: column +#' @param series Series (connect with line). Group dots into series based on the contents of a column. Suggested data type hints: string. Flourish type hint: column +#' @param filter Filter control. Creates a control based on the contents of any column. Suggested data type hints: string, number, datetime. Flourish type hint: column +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panelsSuggested data type hints: string, number, datetime. Flourish type hint: columns +#' @param color_input_format Formats/parses dates, strings, and numbers for the color column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param color_output_format Formats/parses dates, strings, and numbers for the color column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_input_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_output_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param facet_input_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param facet_output_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_input_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_output_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param name_input_format Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param name_output_format Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param series_input_format Formats/parses dates, strings, and numbers for the series column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param series_output_format Formats/parses dates, strings, and numbers for the series column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param shape_input_format Formats/parses dates, strings, and numbers for the shape column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param shape_output_format Formats/parses dates, strings, and numbers for the shape column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param size_input_format Formats/parses dates, strings, and numbers for the size column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param size_output_format Formats/parses dates, strings, and numbers for the size column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param slider_input_format Formats/parses dates, strings, and numbers for the slider column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param slider_output_format Formats/parses dates, strings, and numbers for the slider column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param x_input_format Formats/parses dates, strings, and numbers for the x column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param x_output_format Formats/parses dates, strings, and numbers for the x column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param y_input_format Formats/parses dates, strings, and numbers for the y column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param y_output_format Formats/parses dates, strings, and numbers for the y column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "scatter", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_scatter_data(gapminder) +#' ) +#' @export + +bind_scatter_data <- function( + ., + data = NULL, + x = NULL, + y = NULL, + name = NULL, + color = NULL, + size = NULL, + shape = NULL, + facet = NULL, + slider = NULL, + series = NULL, + filter = NULL, + metadata = NULL, + color_input_format = NULL, + color_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + name_input_format = NULL, + name_output_format = NULL, + series_input_format = NULL, + series_output_format = NULL, + shape_input_format = NULL, + shape_output_format = NULL, + size_input_format = NULL, + size_output_format = NULL, + slider_input_format = NULL, + slider_output_format = NULL, + x_input_format = NULL, + x_output_format = NULL, + y_input_format = NULL, + y_output_format = NULL) { + bindings_error(., "scatter") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(x), paste(y), paste(name), paste(color), paste(size), paste(shape), paste(facet), paste(slider), paste(series), paste(filter), paste(metadata), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$x <- x + new_list$x$bindings$data$y <- y + + if (is.null(name)) { + new_list$x$bindings$data$name <- "list" + } else { + new_list$x$bindings$data$name <- name + } + + new_list$x$bindings$data$color <- color + new_list$x$bindings$data$size <- size + new_list$x$bindings$data$shape <- shape + new_list$x$bindings$data$facet <- facet + new_list$x$bindings$data$slider <- slider + new_list$x$bindings$data$series <- series + new_list$x$bindings$data$filter <- filter + + if (is.null(metadata)) { + new_list$x$bindings$data$metadata <- "list" + } else { + new_list$x$bindings$data$metadata <- metadata + } + + + + if (!is.null(x_output_format) && !is.null(x_input_format)) { + if (isTRUE(grepl("^%", x_output_format))) { + new_list$x$metadata$data$x$type <- "datetime" + new_list$x$metadata$data$x$type_id <- paste0("datetime$", x_input_format) + new_list$x$metadata$data$x$output_format_id <- paste0("datetime$", x_output_format) + } else if (isTRUE(grepl("_", x_output_format))) { + new_list$x$metadata$data$x$type <- "number" + new_list$x$metadata$data$x$type_id <- paste0("number$", x_input_format) + new_list$x$metadata$data$x$output_format_id <- paste0("number$", x_output_format) + } else if (isTRUE(!is.na(x_output_format) && isFALSE(grepl("_", x_output_format)) && isFALSE(grepl("^%", x_output_format)))) { + new_list$x$metadata$data$x$type <- "string" + new_list$x$metadata$data$x$type_id <- paste0("string$", x_input_format) + new_list$x$metadata$data$x$output_format_id <- paste0("string$", x_output_format) + } + if (is.na(x_input_format) && !is.na(x_output_format)) { + "[x_input_format] and [x_output_format] must both be defined." + } + if (!is.na(x_input_format) && is.na(x_output_format)) { + "[x_input_format] and [x_output_format] must both be defined." + } + } + + + if (!is.null(y_output_format) && !is.null(y_input_format)) { + if (isTRUE(grepl("^%", y_output_format))) { + new_list$x$metadata$data$y$type <- "datetime" + new_list$x$metadata$data$y$type_id <- paste0("datetime$", y_input_format) + new_list$x$metadata$data$y$output_format_id <- paste0("datetime$", y_output_format) + } else if (isTRUE(grepl("_", y_output_format))) { + new_list$x$metadata$data$y$type <- "number" + new_list$x$metadata$data$y$type_id <- paste0("number$", y_input_format) + new_list$x$metadata$data$y$output_format_id <- paste0("number$", y_output_format) + } else if (isTRUE(!is.na(y_output_format) && isFALSE(grepl("_", y_output_format)) && isFALSE(grepl("^%", y_output_format)))) { + new_list$x$metadata$data$y$type <- "string" + new_list$x$metadata$data$y$type_id <- paste0("string$", y_input_format) + new_list$x$metadata$data$y$output_format_id <- paste0("string$", y_output_format) + } + if (is.na(y_input_format) && !is.na(y_output_format)) { + "[y_input_format] and [y_output_format] must both be defined." + } + if (!is.na(y_input_format) && is.na(y_output_format)) { + "[y_input_format] and [y_output_format] must both be defined." + } + } + + + if (!is.null(name_output_format) && !is.null(name_input_format)) { + if (isTRUE(grepl("^%", name_output_format))) { + new_list$x$metadata$data$name$type <- "datetime" + new_list$x$metadata$data$name$type_id <- paste0("datetime$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("datetime$", name_output_format) + } else if (isTRUE(grepl("_", name_output_format))) { + new_list$x$metadata$data$name$type <- "number" + new_list$x$metadata$data$name$type_id <- paste0("number$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("number$", name_output_format) + } else if (isTRUE(!is.na(name_output_format) && isFALSE(grepl("_", name_output_format)) && isFALSE(grepl("^%", name_output_format)))) { + new_list$x$metadata$data$name$type <- "string" + new_list$x$metadata$data$name$type_id <- paste0("string$", name_input_format) + new_list$x$metadata$data$name$output_format_id <- paste0("string$", name_output_format) + } + if (is.na(name_input_format) && !is.na(name_output_format)) { + "[name_input_format] and [name_output_format] must both be defined." + } + if (!is.na(name_input_format) && is.na(name_output_format)) { + "[name_input_format] and [name_output_format] must both be defined." + } + } + + + if (!is.null(color_output_format) && !is.null(color_input_format)) { + if (isTRUE(grepl("^%", color_output_format))) { + new_list$x$metadata$data$color$type <- "datetime" + new_list$x$metadata$data$color$type_id <- paste0("datetime$", color_input_format) + new_list$x$metadata$data$color$output_format_id <- paste0("datetime$", color_output_format) + } else if (isTRUE(grepl("_", color_output_format))) { + new_list$x$metadata$data$color$type <- "number" + new_list$x$metadata$data$color$type_id <- paste0("number$", color_input_format) + new_list$x$metadata$data$color$output_format_id <- paste0("number$", color_output_format) + } else if (isTRUE(!is.na(color_output_format) && isFALSE(grepl("_", color_output_format)) && isFALSE(grepl("^%", color_output_format)))) { + new_list$x$metadata$data$color$type <- "string" + new_list$x$metadata$data$color$type_id <- paste0("string$", color_input_format) + new_list$x$metadata$data$color$output_format_id <- paste0("string$", color_output_format) + } + if (is.na(color_input_format) && !is.na(color_output_format)) { + "[color_input_format] and [color_output_format] must both be defined." + } + if (!is.na(color_input_format) && is.na(color_output_format)) { + "[color_input_format] and [color_output_format] must both be defined." + } + } + + + if (!is.null(size_output_format) && !is.null(size_input_format)) { + if (isTRUE(grepl("^%", size_output_format))) { + new_list$x$metadata$data$size$type <- "datetime" + new_list$x$metadata$data$size$type_id <- paste0("datetime$", size_input_format) + new_list$x$metadata$data$size$output_format_id <- paste0("datetime$", size_output_format) + } else if (isTRUE(grepl("_", size_output_format))) { + new_list$x$metadata$data$size$type <- "number" + new_list$x$metadata$data$size$type_id <- paste0("number$", size_input_format) + new_list$x$metadata$data$size$output_format_id <- paste0("number$", size_output_format) + } else if (isTRUE(!is.na(size_output_format) && isFALSE(grepl("_", size_output_format)) && isFALSE(grepl("^%", size_output_format)))) { + new_list$x$metadata$data$size$type <- "string" + new_list$x$metadata$data$size$type_id <- paste0("string$", size_input_format) + new_list$x$metadata$data$size$output_format_id <- paste0("string$", size_output_format) + } + if (is.na(size_input_format) && !is.na(size_output_format)) { + "[size_input_format] and [size_output_format] must both be defined." + } + if (!is.na(size_input_format) && is.na(size_output_format)) { + "[size_input_format] and [size_output_format] must both be defined." + } + } + + + if (!is.null(shape_output_format) && !is.null(shape_input_format)) { + if (isTRUE(grepl("^%", shape_output_format))) { + new_list$x$metadata$data$shape$type <- "datetime" + new_list$x$metadata$data$shape$type_id <- paste0("datetime$", shape_input_format) + new_list$x$metadata$data$shape$output_format_id <- paste0("datetime$", shape_output_format) + } else if (isTRUE(grepl("_", shape_output_format))) { + new_list$x$metadata$data$shape$type <- "number" + new_list$x$metadata$data$shape$type_id <- paste0("number$", shape_input_format) + new_list$x$metadata$data$shape$output_format_id <- paste0("number$", shape_output_format) + } else if (isTRUE(!is.na(shape_output_format) && isFALSE(grepl("_", shape_output_format)) && isFALSE(grepl("^%", shape_output_format)))) { + new_list$x$metadata$data$shape$type <- "string" + new_list$x$metadata$data$shape$type_id <- paste0("string$", shape_input_format) + new_list$x$metadata$data$shape$output_format_id <- paste0("string$", shape_output_format) + } + if (is.na(shape_input_format) && !is.na(shape_output_format)) { + "[shape_input_format] and [shape_output_format] must both be defined." + } + if (!is.na(shape_input_format) && is.na(shape_output_format)) { + "[shape_input_format] and [shape_output_format] must both be defined." + } + } + + + if (!is.null(facet_output_format) && !is.null(facet_input_format)) { + if (isTRUE(grepl("^%", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "datetime" + new_list$x$metadata$data$facet$type_id <- paste0("datetime$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("datetime$", facet_output_format) + } else if (isTRUE(grepl("_", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "number" + new_list$x$metadata$data$facet$type_id <- paste0("number$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("number$", facet_output_format) + } else if (isTRUE(!is.na(facet_output_format) && isFALSE(grepl("_", facet_output_format)) && isFALSE(grepl("^%", facet_output_format)))) { + new_list$x$metadata$data$facet$type <- "string" + new_list$x$metadata$data$facet$type_id <- paste0("string$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("string$", facet_output_format) + } + if (is.na(facet_input_format) && !is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + if (!is.na(facet_input_format) && is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + } + + + if (!is.null(slider_output_format) && !is.null(slider_input_format)) { + if (isTRUE(grepl("^%", slider_output_format))) { + new_list$x$metadata$data$slider$type <- "datetime" + new_list$x$metadata$data$slider$type_id <- paste0("datetime$", slider_input_format) + new_list$x$metadata$data$slider$output_format_id <- paste0("datetime$", slider_output_format) + } else if (isTRUE(grepl("_", slider_output_format))) { + new_list$x$metadata$data$slider$type <- "number" + new_list$x$metadata$data$slider$type_id <- paste0("number$", slider_input_format) + new_list$x$metadata$data$slider$output_format_id <- paste0("number$", slider_output_format) + } else if (isTRUE(!is.na(slider_output_format) && isFALSE(grepl("_", slider_output_format)) && isFALSE(grepl("^%", slider_output_format)))) { + new_list$x$metadata$data$slider$type <- "string" + new_list$x$metadata$data$slider$type_id <- paste0("string$", slider_input_format) + new_list$x$metadata$data$slider$output_format_id <- paste0("string$", slider_output_format) + } + if (is.na(slider_input_format) && !is.na(slider_output_format)) { + "[slider_input_format] and [slider_output_format] must both be defined." + } + if (!is.na(slider_input_format) && is.na(slider_output_format)) { + "[slider_input_format] and [slider_output_format] must both be defined." + } + } + + + if (!is.null(series_output_format) && !is.null(series_input_format)) { + if (isTRUE(grepl("^%", series_output_format))) { + new_list$x$metadata$data$series$type <- "datetime" + new_list$x$metadata$data$series$type_id <- paste0("datetime$", series_input_format) + new_list$x$metadata$data$series$output_format_id <- paste0("datetime$", series_output_format) + } else if (isTRUE(grepl("_", series_output_format))) { + new_list$x$metadata$data$series$type <- "number" + new_list$x$metadata$data$series$type_id <- paste0("number$", series_input_format) + new_list$x$metadata$data$series$output_format_id <- paste0("number$", series_output_format) + } else if (isTRUE(!is.na(series_output_format) && isFALSE(grepl("_", series_output_format)) && isFALSE(grepl("^%", series_output_format)))) { + new_list$x$metadata$data$series$type <- "string" + new_list$x$metadata$data$series$type_id <- paste0("string$", series_input_format) + new_list$x$metadata$data$series$output_format_id <- paste0("string$", series_output_format) + } + if (is.na(series_input_format) && !is.na(series_output_format)) { + "[series_input_format] and [series_output_format] must both be defined." + } + if (!is.na(series_input_format) && is.na(series_output_format)) { + "[series_input_format] and [series_output_format] must both be defined." + } + } + + + if (!is.null(filter_output_format) && !is.null(filter_input_format)) { + if (isTRUE(grepl("^%", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "datetime" + new_list$x$metadata$data$filter$type_id <- paste0("datetime$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("datetime$", filter_output_format) + } else if (isTRUE(grepl("_", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "number" + new_list$x$metadata$data$filter$type_id <- paste0("number$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("number$", filter_output_format) + } else if (isTRUE(!is.na(filter_output_format) && isFALSE(grepl("_", filter_output_format)) && isFALSE(grepl("^%", filter_output_format)))) { + new_list$x$metadata$data$filter$type <- "string" + new_list$x$metadata$data$filter$type_id <- paste0("string$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("string$", filter_output_format) + } + if (is.na(filter_input_format) && !is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + if (!is.na(filter_input_format) && is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + } + + + if (!is.null(metadata_output_format) && !is.null(metadata_input_format)) { + if (isTRUE(grepl("^%", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "datetime" + new_list$x$metadata$data$metadata$type_id <- paste0("datetime$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("datetime$", metadata_output_format) + } else if (isTRUE(grepl("_", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "number" + new_list$x$metadata$data$metadata$type_id <- paste0("number$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("number$", metadata_output_format) + } else if (isTRUE(!is.na(metadata_output_format) && isFALSE(grepl("_", metadata_output_format)) && isFALSE(grepl("^%", metadata_output_format)))) { + new_list$x$metadata$data$metadata$type <- "string" + new_list$x$metadata$data$metadata$type_id <- paste0("string$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("string$", metadata_output_format) + } + if (is.na(metadata_input_format) && !is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + if (!is.na(metadata_input_format) && is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_slope_chart_data.R b/R_package/R/bind_slope_chart_data.R new file mode 100644 index 0000000..a4853a1 --- /dev/null +++ b/R_package/R/bind_slope_chart_data.R @@ -0,0 +1,255 @@ +#' Bind slope chart data +#' @name bind_slope_chart_data +#' @param data Data. +#' @param id Name. The name of the data series (eg. voting district, data mode). Flourish type hint: column +#' @param values Values. Values for that data series (eg. % of votes). Flourish type hint: column +#' @param line_thickness Line thickness. Values for the thickness of line. Flourish type hint: column +#' @param filter Filter. Suggested data type hints: string, number, datetime. Flourish type hint: column +#' @param color_category Color category +#' @param facet Facet +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns +#' @param color_category_input_format Formats/parses dates, strings, and numbers for the color_category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param color_category_output_format Formats/parses dates, strings, and numbers for the color_category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_input_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_output_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param facet_input_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param facet_output_format Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_input_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_output_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param line_thickness_input_format Formats/parses dates, strings, and numbers for the line_thickness column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param line_thickness_output_format Formats/parses dates, strings, and numbers for the line_thickness column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param id_input_format Formats/parses dates, strings, and numbers for the id column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param id_output_format Formats/parses dates, strings, and numbers for the id column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param values_input_format Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param values_output_format Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "slope", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_slope_chart_data(gapminder) +#' ) +#' @export + +bind_slope_chart_data <- function( + ., + data = NULL, + id = NULL, + values = NULL, + line_thickness = NULL, + filter = NULL, + color_category = NULL, + facet = NULL, + metadata = NULL, + color_category_input_format = NULL, + color_category_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + line_thickness_input_format = NULL, + line_thickness_output_format = NULL, + id_input_format = NULL, + id_output_format = NULL, + values_input_format = NULL, + values_output_format = NULL) { + bindings_error(., "slope_chart") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(id), paste(values), paste(line_thickness), paste(filter), paste(color_category), paste(facet), paste(metadata), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$id <- id + + if (is.null(values)) { + new_list$x$bindings$data$values <- "list" + } else { + new_list$x$bindings$data$values <- values + } + + new_list$x$bindings$data$line_thickness <- line_thickness + new_list$x$bindings$data$filter <- filter + new_list$x$bindings$data$color_category <- color_category + new_list$x$bindings$data$facet <- facet + + if (is.null(metadata)) { + new_list$x$bindings$data$metadata <- "list" + } else { + new_list$x$bindings$data$metadata <- metadata + } + + + + if (!is.null(id_output_format) && !is.null(id_input_format)) { + if (isTRUE(grepl("^%", id_output_format))) { + new_list$x$metadata$data$id$type <- "datetime" + new_list$x$metadata$data$id$type_id <- paste0("datetime$", id_input_format) + new_list$x$metadata$data$id$output_format_id <- paste0("datetime$", id_output_format) + } else if (isTRUE(grepl("_", id_output_format))) { + new_list$x$metadata$data$id$type <- "number" + new_list$x$metadata$data$id$type_id <- paste0("number$", id_input_format) + new_list$x$metadata$data$id$output_format_id <- paste0("number$", id_output_format) + } else if (isTRUE(!is.na(id_output_format) && isFALSE(grepl("_", id_output_format)) && isFALSE(grepl("^%", id_output_format)))) { + new_list$x$metadata$data$id$type <- "string" + new_list$x$metadata$data$id$type_id <- paste0("string$", id_input_format) + new_list$x$metadata$data$id$output_format_id <- paste0("string$", id_output_format) + } + if (is.na(id_input_format) && !is.na(id_output_format)) { + "[id_input_format] and [id_output_format] must both be defined." + } + if (!is.na(id_input_format) && is.na(id_output_format)) { + "[id_input_format] and [id_output_format] must both be defined." + } + } + + + if (!is.null(values_output_format) && !is.null(values_input_format)) { + if (isTRUE(grepl("^%", values_output_format))) { + new_list$x$metadata$data$values$type <- "datetime" + new_list$x$metadata$data$values$type_id <- paste0("datetime$", values_input_format) + new_list$x$metadata$data$values$output_format_id <- paste0("datetime$", values_output_format) + } else if (isTRUE(grepl("_", values_output_format))) { + new_list$x$metadata$data$values$type <- "number" + new_list$x$metadata$data$values$type_id <- paste0("number$", values_input_format) + new_list$x$metadata$data$values$output_format_id <- paste0("number$", values_output_format) + } else if (isTRUE(!is.na(values_output_format) && isFALSE(grepl("_", values_output_format)) && isFALSE(grepl("^%", values_output_format)))) { + new_list$x$metadata$data$values$type <- "string" + new_list$x$metadata$data$values$type_id <- paste0("string$", values_input_format) + new_list$x$metadata$data$values$output_format_id <- paste0("string$", values_output_format) + } + if (is.na(values_input_format) && !is.na(values_output_format)) { + "[values_input_format] and [values_output_format] must both be defined." + } + if (!is.na(values_input_format) && is.na(values_output_format)) { + "[values_input_format] and [values_output_format] must both be defined." + } + } + + + if (!is.null(line_thickness_output_format) && !is.null(line_thickness_input_format)) { + if (isTRUE(grepl("^%", line_thickness_output_format))) { + new_list$x$metadata$data$line_thickness$type <- "datetime" + new_list$x$metadata$data$line_thickness$type_id <- paste0("datetime$", line_thickness_input_format) + new_list$x$metadata$data$line_thickness$output_format_id <- paste0("datetime$", line_thickness_output_format) + } else if (isTRUE(grepl("_", line_thickness_output_format))) { + new_list$x$metadata$data$line_thickness$type <- "number" + new_list$x$metadata$data$line_thickness$type_id <- paste0("number$", line_thickness_input_format) + new_list$x$metadata$data$line_thickness$output_format_id <- paste0("number$", line_thickness_output_format) + } else if (isTRUE(!is.na(line_thickness_output_format) && isFALSE(grepl("_", line_thickness_output_format)) && isFALSE(grepl("^%", line_thickness_output_format)))) { + new_list$x$metadata$data$line_thickness$type <- "string" + new_list$x$metadata$data$line_thickness$type_id <- paste0("string$", line_thickness_input_format) + new_list$x$metadata$data$line_thickness$output_format_id <- paste0("string$", line_thickness_output_format) + } + if (is.na(line_thickness_input_format) && !is.na(line_thickness_output_format)) { + "[line_thickness_input_format] and [line_thickness_output_format] must both be defined." + } + if (!is.na(line_thickness_input_format) && is.na(line_thickness_output_format)) { + "[line_thickness_input_format] and [line_thickness_output_format] must both be defined." + } + } + + + if (!is.null(filter_output_format) && !is.null(filter_input_format)) { + if (isTRUE(grepl("^%", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "datetime" + new_list$x$metadata$data$filter$type_id <- paste0("datetime$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("datetime$", filter_output_format) + } else if (isTRUE(grepl("_", filter_output_format))) { + new_list$x$metadata$data$filter$type <- "number" + new_list$x$metadata$data$filter$type_id <- paste0("number$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("number$", filter_output_format) + } else if (isTRUE(!is.na(filter_output_format) && isFALSE(grepl("_", filter_output_format)) && isFALSE(grepl("^%", filter_output_format)))) { + new_list$x$metadata$data$filter$type <- "string" + new_list$x$metadata$data$filter$type_id <- paste0("string$", filter_input_format) + new_list$x$metadata$data$filter$output_format_id <- paste0("string$", filter_output_format) + } + if (is.na(filter_input_format) && !is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + if (!is.na(filter_input_format) && is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + } + + + if (!is.null(color_category_output_format) && !is.null(color_category_input_format)) { + if (isTRUE(grepl("^%", color_category_output_format))) { + new_list$x$metadata$data$color_category$type <- "datetime" + new_list$x$metadata$data$color_category$type_id <- paste0("datetime$", color_category_input_format) + new_list$x$metadata$data$color_category$output_format_id <- paste0("datetime$", color_category_output_format) + } else if (isTRUE(grepl("_", color_category_output_format))) { + new_list$x$metadata$data$color_category$type <- "number" + new_list$x$metadata$data$color_category$type_id <- paste0("number$", color_category_input_format) + new_list$x$metadata$data$color_category$output_format_id <- paste0("number$", color_category_output_format) + } else if (isTRUE(!is.na(color_category_output_format) && isFALSE(grepl("_", color_category_output_format)) && isFALSE(grepl("^%", color_category_output_format)))) { + new_list$x$metadata$data$color_category$type <- "string" + new_list$x$metadata$data$color_category$type_id <- paste0("string$", color_category_input_format) + new_list$x$metadata$data$color_category$output_format_id <- paste0("string$", color_category_output_format) + } + if (is.na(color_category_input_format) && !is.na(color_category_output_format)) { + "[color_category_input_format] and [color_category_output_format] must both be defined." + } + if (!is.na(color_category_input_format) && is.na(color_category_output_format)) { + "[color_category_input_format] and [color_category_output_format] must both be defined." + } + } + + + if (!is.null(facet_output_format) && !is.null(facet_input_format)) { + if (isTRUE(grepl("^%", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "datetime" + new_list$x$metadata$data$facet$type_id <- paste0("datetime$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("datetime$", facet_output_format) + } else if (isTRUE(grepl("_", facet_output_format))) { + new_list$x$metadata$data$facet$type <- "number" + new_list$x$metadata$data$facet$type_id <- paste0("number$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("number$", facet_output_format) + } else if (isTRUE(!is.na(facet_output_format) && isFALSE(grepl("_", facet_output_format)) && isFALSE(grepl("^%", facet_output_format)))) { + new_list$x$metadata$data$facet$type <- "string" + new_list$x$metadata$data$facet$type_id <- paste0("string$", facet_input_format) + new_list$x$metadata$data$facet$output_format_id <- paste0("string$", facet_output_format) + } + if (is.na(facet_input_format) && !is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + if (!is.na(facet_input_format) && is.na(facet_output_format)) { + "[facet_input_format] and [facet_output_format] must both be defined." + } + } + + + if (!is.null(metadata_output_format) && !is.null(metadata_input_format)) { + if (isTRUE(grepl("^%", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "datetime" + new_list$x$metadata$data$metadata$type_id <- paste0("datetime$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("datetime$", metadata_output_format) + } else if (isTRUE(grepl("_", metadata_output_format))) { + new_list$x$metadata$data$metadata$type <- "number" + new_list$x$metadata$data$metadata$type_id <- paste0("number$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("number$", metadata_output_format) + } else if (isTRUE(!is.na(metadata_output_format) && isFALSE(grepl("_", metadata_output_format)) && isFALSE(grepl("^%", metadata_output_format)))) { + new_list$x$metadata$data$metadata$type <- "string" + new_list$x$metadata$data$metadata$type_id <- paste0("string$", metadata_input_format) + new_list$x$metadata$data$metadata$output_format_id <- paste0("string$", metadata_output_format) + } + if (is.na(metadata_input_format) && !is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + if (!is.na(metadata_input_format) && is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_sports_data.R b/R_package/R/bind_sports_data.R new file mode 100644 index 0000000..801ab97 --- /dev/null +++ b/R_package/R/bind_sports_data.R @@ -0,0 +1,315 @@ +#' Bind sports data +#' @name bind_sports_data +#' @param positions_data Positions data. +#' @param info Name. A name to include on a label and/or popup. Suggested data type hints: string, number. Flourish type hint: columns +#' @param color Color by. An optional category column to color the dots by. For example if you have two different teams. Suggested data type hints: string. Flourish type hint: column +#' @param size Size by. An optional numeric column to size the dots. Suggested data type hints: number. Flourish type hint: column +#' @param squad_number Squad numbers. An optional squad number to appear within the dot. Suggested data type hints: number, string. Flourish type hint: column +#' @param position_x X position. Use this to column to set the X position of a dot on the pitch when creating shot charts. This column is ignored when the setting Position points by is set to FormationSuggested data type hints: number. Flourish type hint: column +#' @param position_y Y position. Use this to column to set the Y position of a dot on the pitch when creating shot charts. This column is ignored when the setting Position points by is set to FormationSuggested data type hints: number. Flourish type hint: column +#' @param filter Filter by. Setting a column here will add a control to the visualization to filter the dots. For example you could filter by team. Suggested data type hints: string, number. Flourish type hint: column +#' @param photo Image. Add an image to appear in the circles. To add an image, right click on a cell and click upload file Its also possible to add a image URL. Suggested data type hints: string. Flourish type hint: column +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns +#' @param color_input_format Formats/parses dates, strings, and numbers for the color column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param color_output_format Formats/parses dates, strings, and numbers for the color column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_input_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param filter_output_format Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param photo_input_format Formats/parses dates, strings, and numbers for the photo column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param photo_output_format Formats/parses dates, strings, and numbers for the photo column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_input_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_output_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param info_input_format Formats/parses dates, strings, and numbers for the info column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param info_output_format Formats/parses dates, strings, and numbers for the info column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param size_input_format Formats/parses dates, strings, and numbers for the size column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param size_output_format Formats/parses dates, strings, and numbers for the size column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param squad_number_input_format Formats/parses dates, strings, and numbers for the squad_number column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param squad_number_output_format Formats/parses dates, strings, and numbers for the squad_number column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param position_x_input_format Formats/parses dates, strings, and numbers for the position_x column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param position_x_output_format Formats/parses dates, strings, and numbers for the position_x column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param position_y_input_format Formats/parses dates, strings, and numbers for the position_y column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param position_y_output_format Formats/parses dates, strings, and numbers for the position_y column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "sports", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_sports_data(gapminder) +#' ) +#' @export + +bind_sports_data <- function( + ., + positions_data = NULL, + info = NULL, + color = NULL, + size = NULL, + squad_number = NULL, + position_x = NULL, + position_y = NULL, + filter = NULL, + photo = NULL, + metadata = NULL, + color_input_format = NULL, + color_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + photo_input_format = NULL, + photo_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + info_input_format = NULL, + info_output_format = NULL, + size_input_format = NULL, + size_output_format = NULL, + squad_number_input_format = NULL, + squad_number_output_format = NULL, + position_x_input_format = NULL, + position_x_output_format = NULL, + position_y_input_format = NULL, + position_y_output_format = NULL) { + bindings_error(., "sports") + + old_list <- . + new_list <- list() + + if (!is.null(positions_data)) { + columns_positions_data <- c(paste(info), paste(color), paste(size), paste(squad_number), paste(position_x), paste(position_y), paste(filter), paste(photo), paste(metadata), NULL) + columns_positions_data <- columns_positions_data[!sapply(columns_positions_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_positions_data, split = ",", fixed = TRUE), + data = positions_data + ) + int_columns_positions_data <- sapply(positions_data, is.integer) + positions_data[, int_columns_positions_data] <- lapply(positions_data[, int_columns_positions_data], as.character) + } + new_list$x$data$positions <- positions_data + + if (is.null(info)) { + new_list$x$bindings$positions$info <- "list" + } else { + new_list$x$bindings$positions$info <- info + } + + new_list$x$bindings$positions$color <- color + new_list$x$bindings$positions$size <- size + new_list$x$bindings$positions$squad_number <- squad_number + new_list$x$bindings$positions$position_x <- position_x + new_list$x$bindings$positions$position_y <- position_y + new_list$x$bindings$positions$filter <- filter + new_list$x$bindings$positions$photo <- photo + + if (is.null(metadata)) { + new_list$x$bindings$positions$metadata <- "list" + } else { + new_list$x$bindings$positions$metadata <- metadata + } + + + + if (!is.null(info_output_format) && !is.null(info_input_format)) { + if (isTRUE(grepl("^%", info_output_format))) { + new_list$x$metadata$positions$info$type <- "datetime" + new_list$x$metadata$positions$info$type_id <- paste0("datetime$", info_input_format) + new_list$x$metadata$positions$info$output_format_id <- paste0("datetime$", info_output_format) + } else if (isTRUE(grepl("_", info_output_format))) { + new_list$x$metadata$positions$info$type <- "number" + new_list$x$metadata$positions$info$type_id <- paste0("number$", info_input_format) + new_list$x$metadata$positions$info$output_format_id <- paste0("number$", info_output_format) + } else if (isTRUE(!is.na(info_output_format) && isFALSE(grepl("_", info_output_format)) && isFALSE(grepl("^%", info_output_format)))) { + new_list$x$metadata$positions$info$type <- "string" + new_list$x$metadata$positions$info$type_id <- paste0("string$", info_input_format) + new_list$x$metadata$positions$info$output_format_id <- paste0("string$", info_output_format) + } + if (is.na(info_input_format) && !is.na(info_output_format)) { + "[info_input_format] and [info_output_format] must both be defined." + } + if (!is.na(info_input_format) && is.na(info_output_format)) { + "[info_input_format] and [info_output_format] must both be defined." + } + } + + + if (!is.null(color_output_format) && !is.null(color_input_format)) { + if (isTRUE(grepl("^%", color_output_format))) { + new_list$x$metadata$positions$color$type <- "datetime" + new_list$x$metadata$positions$color$type_id <- paste0("datetime$", color_input_format) + new_list$x$metadata$positions$color$output_format_id <- paste0("datetime$", color_output_format) + } else if (isTRUE(grepl("_", color_output_format))) { + new_list$x$metadata$positions$color$type <- "number" + new_list$x$metadata$positions$color$type_id <- paste0("number$", color_input_format) + new_list$x$metadata$positions$color$output_format_id <- paste0("number$", color_output_format) + } else if (isTRUE(!is.na(color_output_format) && isFALSE(grepl("_", color_output_format)) && isFALSE(grepl("^%", color_output_format)))) { + new_list$x$metadata$positions$color$type <- "string" + new_list$x$metadata$positions$color$type_id <- paste0("string$", color_input_format) + new_list$x$metadata$positions$color$output_format_id <- paste0("string$", color_output_format) + } + if (is.na(color_input_format) && !is.na(color_output_format)) { + "[color_input_format] and [color_output_format] must both be defined." + } + if (!is.na(color_input_format) && is.na(color_output_format)) { + "[color_input_format] and [color_output_format] must both be defined." + } + } + + + if (!is.null(size_output_format) && !is.null(size_input_format)) { + if (isTRUE(grepl("^%", size_output_format))) { + new_list$x$metadata$positions$size$type <- "datetime" + new_list$x$metadata$positions$size$type_id <- paste0("datetime$", size_input_format) + new_list$x$metadata$positions$size$output_format_id <- paste0("datetime$", size_output_format) + } else if (isTRUE(grepl("_", size_output_format))) { + new_list$x$metadata$positions$size$type <- "number" + new_list$x$metadata$positions$size$type_id <- paste0("number$", size_input_format) + new_list$x$metadata$positions$size$output_format_id <- paste0("number$", size_output_format) + } else if (isTRUE(!is.na(size_output_format) && isFALSE(grepl("_", size_output_format)) && isFALSE(grepl("^%", size_output_format)))) { + new_list$x$metadata$positions$size$type <- "string" + new_list$x$metadata$positions$size$type_id <- paste0("string$", size_input_format) + new_list$x$metadata$positions$size$output_format_id <- paste0("string$", size_output_format) + } + if (is.na(size_input_format) && !is.na(size_output_format)) { + "[size_input_format] and [size_output_format] must both be defined." + } + if (!is.na(size_input_format) && is.na(size_output_format)) { + "[size_input_format] and [size_output_format] must both be defined." + } + } + + + if (!is.null(squad_number_output_format) && !is.null(squad_number_input_format)) { + if (isTRUE(grepl("^%", squad_number_output_format))) { + new_list$x$metadata$positions$squad_number$type <- "datetime" + new_list$x$metadata$positions$squad_number$type_id <- paste0("datetime$", squad_number_input_format) + new_list$x$metadata$positions$squad_number$output_format_id <- paste0("datetime$", squad_number_output_format) + } else if (isTRUE(grepl("_", squad_number_output_format))) { + new_list$x$metadata$positions$squad_number$type <- "number" + new_list$x$metadata$positions$squad_number$type_id <- paste0("number$", squad_number_input_format) + new_list$x$metadata$positions$squad_number$output_format_id <- paste0("number$", squad_number_output_format) + } else if (isTRUE(!is.na(squad_number_output_format) && isFALSE(grepl("_", squad_number_output_format)) && isFALSE(grepl("^%", squad_number_output_format)))) { + new_list$x$metadata$positions$squad_number$type <- "string" + new_list$x$metadata$positions$squad_number$type_id <- paste0("string$", squad_number_input_format) + new_list$x$metadata$positions$squad_number$output_format_id <- paste0("string$", squad_number_output_format) + } + if (is.na(squad_number_input_format) && !is.na(squad_number_output_format)) { + "[squad_number_input_format] and [squad_number_output_format] must both be defined." + } + if (!is.na(squad_number_input_format) && is.na(squad_number_output_format)) { + "[squad_number_input_format] and [squad_number_output_format] must both be defined." + } + } + + + if (!is.null(position_x_output_format) && !is.null(position_x_input_format)) { + if (isTRUE(grepl("^%", position_x_output_format))) { + new_list$x$metadata$positions$position_x$type <- "datetime" + new_list$x$metadata$positions$position_x$type_id <- paste0("datetime$", position_x_input_format) + new_list$x$metadata$positions$position_x$output_format_id <- paste0("datetime$", position_x_output_format) + } else if (isTRUE(grepl("_", position_x_output_format))) { + new_list$x$metadata$positions$position_x$type <- "number" + new_list$x$metadata$positions$position_x$type_id <- paste0("number$", position_x_input_format) + new_list$x$metadata$positions$position_x$output_format_id <- paste0("number$", position_x_output_format) + } else if (isTRUE(!is.na(position_x_output_format) && isFALSE(grepl("_", position_x_output_format)) && isFALSE(grepl("^%", position_x_output_format)))) { + new_list$x$metadata$positions$position_x$type <- "string" + new_list$x$metadata$positions$position_x$type_id <- paste0("string$", position_x_input_format) + new_list$x$metadata$positions$position_x$output_format_id <- paste0("string$", position_x_output_format) + } + if (is.na(position_x_input_format) && !is.na(position_x_output_format)) { + "[position_x_input_format] and [position_x_output_format] must both be defined." + } + if (!is.na(position_x_input_format) && is.na(position_x_output_format)) { + "[position_x_input_format] and [position_x_output_format] must both be defined." + } + } + + + if (!is.null(position_y_output_format) && !is.null(position_y_input_format)) { + if (isTRUE(grepl("^%", position_y_output_format))) { + new_list$x$metadata$positions$position_y$type <- "datetime" + new_list$x$metadata$positions$position_y$type_id <- paste0("datetime$", position_y_input_format) + new_list$x$metadata$positions$position_y$output_format_id <- paste0("datetime$", position_y_output_format) + } else if (isTRUE(grepl("_", position_y_output_format))) { + new_list$x$metadata$positions$position_y$type <- "number" + new_list$x$metadata$positions$position_y$type_id <- paste0("number$", position_y_input_format) + new_list$x$metadata$positions$position_y$output_format_id <- paste0("number$", position_y_output_format) + } else if (isTRUE(!is.na(position_y_output_format) && isFALSE(grepl("_", position_y_output_format)) && isFALSE(grepl("^%", position_y_output_format)))) { + new_list$x$metadata$positions$position_y$type <- "string" + new_list$x$metadata$positions$position_y$type_id <- paste0("string$", position_y_input_format) + new_list$x$metadata$positions$position_y$output_format_id <- paste0("string$", position_y_output_format) + } + if (is.na(position_y_input_format) && !is.na(position_y_output_format)) { + "[position_y_input_format] and [position_y_output_format] must both be defined." + } + if (!is.na(position_y_input_format) && is.na(position_y_output_format)) { + "[position_y_input_format] and [position_y_output_format] must both be defined." + } + } + + + if (!is.null(filter_output_format) && !is.null(filter_input_format)) { + if (isTRUE(grepl("^%", filter_output_format))) { + new_list$x$metadata$positions$filter$type <- "datetime" + new_list$x$metadata$positions$filter$type_id <- paste0("datetime$", filter_input_format) + new_list$x$metadata$positions$filter$output_format_id <- paste0("datetime$", filter_output_format) + } else if (isTRUE(grepl("_", filter_output_format))) { + new_list$x$metadata$positions$filter$type <- "number" + new_list$x$metadata$positions$filter$type_id <- paste0("number$", filter_input_format) + new_list$x$metadata$positions$filter$output_format_id <- paste0("number$", filter_output_format) + } else if (isTRUE(!is.na(filter_output_format) && isFALSE(grepl("_", filter_output_format)) && isFALSE(grepl("^%", filter_output_format)))) { + new_list$x$metadata$positions$filter$type <- "string" + new_list$x$metadata$positions$filter$type_id <- paste0("string$", filter_input_format) + new_list$x$metadata$positions$filter$output_format_id <- paste0("string$", filter_output_format) + } + if (is.na(filter_input_format) && !is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + if (!is.na(filter_input_format) && is.na(filter_output_format)) { + "[filter_input_format] and [filter_output_format] must both be defined." + } + } + + + if (!is.null(photo_output_format) && !is.null(photo_input_format)) { + if (isTRUE(grepl("^%", photo_output_format))) { + new_list$x$metadata$positions$photo$type <- "datetime" + new_list$x$metadata$positions$photo$type_id <- paste0("datetime$", photo_input_format) + new_list$x$metadata$positions$photo$output_format_id <- paste0("datetime$", photo_output_format) + } else if (isTRUE(grepl("_", photo_output_format))) { + new_list$x$metadata$positions$photo$type <- "number" + new_list$x$metadata$positions$photo$type_id <- paste0("number$", photo_input_format) + new_list$x$metadata$positions$photo$output_format_id <- paste0("number$", photo_output_format) + } else if (isTRUE(!is.na(photo_output_format) && isFALSE(grepl("_", photo_output_format)) && isFALSE(grepl("^%", photo_output_format)))) { + new_list$x$metadata$positions$photo$type <- "string" + new_list$x$metadata$positions$photo$type_id <- paste0("string$", photo_input_format) + new_list$x$metadata$positions$photo$output_format_id <- paste0("string$", photo_output_format) + } + if (is.na(photo_input_format) && !is.na(photo_output_format)) { + "[photo_input_format] and [photo_output_format] must both be defined." + } + if (!is.na(photo_input_format) && is.na(photo_output_format)) { + "[photo_input_format] and [photo_output_format] must both be defined." + } + } + + + if (!is.null(metadata_output_format) && !is.null(metadata_input_format)) { + if (isTRUE(grepl("^%", metadata_output_format))) { + new_list$x$metadata$positions$metadata$type <- "datetime" + new_list$x$metadata$positions$metadata$type_id <- paste0("datetime$", metadata_input_format) + new_list$x$metadata$positions$metadata$output_format_id <- paste0("datetime$", metadata_output_format) + } else if (isTRUE(grepl("_", metadata_output_format))) { + new_list$x$metadata$positions$metadata$type <- "number" + new_list$x$metadata$positions$metadata$type_id <- paste0("number$", metadata_input_format) + new_list$x$metadata$positions$metadata$output_format_id <- paste0("number$", metadata_output_format) + } else if (isTRUE(!is.na(metadata_output_format) && isFALSE(grepl("_", metadata_output_format)) && isFALSE(grepl("^%", metadata_output_format)))) { + new_list$x$metadata$positions$metadata$type <- "string" + new_list$x$metadata$positions$metadata$type_id <- paste0("string$", metadata_input_format) + new_list$x$metadata$positions$metadata$output_format_id <- paste0("string$", metadata_output_format) + } + if (is.na(metadata_input_format) && !is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + if (!is.na(metadata_input_format) && is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_sports_race_data.R b/R_package/R/bind_sports_race_data.R new file mode 100644 index 0000000..7809b19 --- /dev/null +++ b/R_package/R/bind_sports_race_data.R @@ -0,0 +1,57 @@ +#' Bind sports race data +#' @name bind_sports_race_data +#' @param data Data. +#' @param name Name. Name of competitor. Flourish type hint: column +#' @param times Times. One or more columns of numbers, representing splits or laps, or a whole race. Flourish type hint: columns +#' @param start_image Start image. The image to use at the start of the race. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column +#' @param race_image Racing image. The image to use while a participant is racing. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column +#' @param finish_image Finish image. The image to use when the participant has finished the race. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column +#' @param color_category Color category. Add a category to color participants by. If empty, the name column will be used for colors. Flourish type hint: column +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "sports_race", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_sports_race_data(gapminder) +#' ) +#' @export + +bind_sports_race_data <- function( + ., + data = NULL, + name = NULL, + times = NULL, + start_image = NULL, + race_image = NULL, + finish_image = NULL, + color_category = NULL) { + bindings_error(., "sports_race") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(name), paste(times), paste(start_image), paste(race_image), paste(finish_image), paste(color_category), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$name <- name + + if (is.null(times)) { + new_list$x$bindings$data$times <- "list" + } else { + new_list$x$bindings$data$times <- times + } + + new_list$x$bindings$data$start_image <- start_image + new_list$x$bindings$data$race_image <- race_image + new_list$x$bindings$data$finish_image <- finish_image + new_list$x$bindings$data$color_category <- color_category + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_survey_data.R b/R_package/R/bind_survey_data.R new file mode 100644 index 0000000..b244b57 --- /dev/null +++ b/R_package/R/bind_survey_data.R @@ -0,0 +1,200 @@ +#' Bind survey data +#' @name bind_survey_data +#' @param questions_data Questions data. The main data sheet. Each row in this table will become a dot in the graphic.. +#' @param order_data Order data. Groups by default appear in size or alphabetical order. You can override these with the "Group order" sheet.. +#' @param labels_data Labels data. Allows you to change how any phrase in the main data sheet is displayed in the graphic. Useful for shortening long questions, translating, etc.. +#' @param colors_data Colors data. Use this extra table if you want to specify specific colors in the context of specific questions. E.g. to make a red to green scale from "strongly diagree" to "strongly agree".. +#' @param places_data Places data. A table of places found in the geographic columns of the main data sheet, each with latitude and longitude to plot it on the map. +#' @param answer_groups_data Answer groups data. Grouped questions, in the form "Which of the following apply?", are made by combining mutiple yes/no columns in the main data sheet.. +#' @param questions_categorical Categorical columns. Each of these columns appears in the Group by, Shade by and Compare dropdowns. Flourish type hint: columns +#' @param questions_continuous Continuous columns. Must contain numbers. Each of these columns appears in the Size by dropdown. Flourish type hint: columns +#' @param questions_geo Geographic columns. Must contain place names matching those specified in the Places sheet. Set to blank to disable the map mode. Flourish type hint: columns +#' @param questions_label Label. A column containing text (e.g. names or emoji) to write on the dots. Not recommended for datasets with more than a few hundred dots. Flourish type hint: column +#' @param questions_column_filter Slider or menu. Add a time slider or menu to filter the data based on the contents of a single column. Flourish type hint: column +#' @param questions_id Unique name/ID. Specify to allow animations between multiple occurrences of the same person or thing e.g. when using a time slider. Flourish type hint: column +#' @param questions_metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panelsFlourish type hint: columns +#' @param order_categories Order of answers. Use one column for each question or metric. Put the column header from the main data sheet at the top (e.g. "Do you agree?"), followed by the answers in the order you want (e.g. "disagree", "neutral", "agree"). Flourish type hint: columns +#' @param labels_label Label. A column containing phrases from the main data sheet. Flourish type hint: column +#' @param labels_replacement Replacement. A column containing the phrase to display. Flourish type hint: column +#' @param colors_question Question. The column header (e.g. a survey question) exactly as it appears in the main data sheet. Flourish type hint: column +#' @param colors_answer Answer. Use one column for each question or metric. Put the column header from the main datasheet at the top (e.g. "Do you agree?"), followed by the answers in the order you want (e.g. "disagree", "neutral", "agree"). Flourish type hint: column +#' @param colors_color Color. A color name (e.g. orange, red) or code (e.g. #ff3300, #ff0000). Flourish type hint: column +#' @param places_latitude Latitude. A column of latitude values. Flourish type hint: column +#' @param places_longitude Longitude. A column of longitude values. Flourish type hint: column +#' @param places_names Names. One or more columns of place names matching those in the main data sheet. Flourish type hint: columns +#' @param answer_groups_group Group name. This column will contain the name of the grouped question Flourish type hint: column +#' @param answer_groups_question Question. A question that matches exactly one of the questions in the datasheet. Flourish type hint: column +#' @param answer_groups_display_as Display answer as. This will be the new text for the question. Flourish type hint: column +#' @param answer_groups_affirmative_answers Answers to include. The respondent is included in the group if their answer to the question is one of the answers listed in these columns. Flourish type hint: columns +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "survey", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_survey_data(gapminder) +#' ) +#' @export + +bind_survey_data <- function( + ., + questions_data = NULL, + order_data = NULL, + labels_data = NULL, + colors_data = NULL, + places_data = NULL, + answer_groups_data = NULL, + questions_categorical = NULL, + questions_continuous = NULL, + questions_geo = NULL, + questions_label = NULL, + questions_column_filter = NULL, + questions_id = NULL, + questions_metadata = NULL, + order_categories = NULL, + labels_label = NULL, + labels_replacement = NULL, + colors_question = NULL, + colors_answer = NULL, + colors_color = NULL, + places_latitude = NULL, + places_longitude = NULL, + places_names = NULL, + answer_groups_group = NULL, + answer_groups_question = NULL, + answer_groups_display_as = NULL, + answer_groups_affirmative_answers = NULL) { + bindings_error(., "survey") + + old_list <- . + new_list <- list() + + if (!is.null(questions_data)) { + columns_questions_data <- c(paste(questions_categorical), paste(questions_continuous), paste(questions_geo), paste(questions_label), paste(questions_column_filter), paste(questions_id), paste(questions_metadata), NULL) + columns_questions_data <- columns_questions_data[!sapply(columns_questions_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_questions_data, split = ",", fixed = TRUE), + data = questions_data + ) + int_columns_questions_data <- sapply(questions_data, is.integer) + questions_data[, int_columns_questions_data] <- lapply(questions_data[, int_columns_questions_data], as.character) + } + if (!is.null(order_data)) { + columns_order_data <- c(paste(order_categories), NULL) + columns_order_data <- columns_order_data[!sapply(columns_order_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_order_data, split = ",", fixed = TRUE), + data = order_data + ) + int_columns_order_data <- sapply(order_data, is.integer) + order_data[, int_columns_order_data] <- lapply(order_data[, int_columns_order_data], as.character) + } + if (!is.null(labels_data)) { + columns_labels_data <- c(paste(labels_label), paste(labels_replacement), NULL) + columns_labels_data <- columns_labels_data[!sapply(columns_labels_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_labels_data, split = ",", fixed = TRUE), + data = labels_data + ) + int_columns_labels_data <- sapply(labels_data, is.integer) + labels_data[, int_columns_labels_data] <- lapply(labels_data[, int_columns_labels_data], as.character) + } + if (!is.null(colors_data)) { + columns_colors_data <- c(paste(colors_question), paste(colors_answer), paste(colors_color), NULL) + columns_colors_data <- columns_colors_data[!sapply(columns_colors_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_colors_data, split = ",", fixed = TRUE), + data = colors_data + ) + int_columns_colors_data <- sapply(colors_data, is.integer) + colors_data[, int_columns_colors_data] <- lapply(colors_data[, int_columns_colors_data], as.character) + } + if (!is.null(places_data)) { + columns_places_data <- c(paste(places_latitude), paste(places_longitude), paste(places_names), NULL) + columns_places_data <- columns_places_data[!sapply(columns_places_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_places_data, split = ",", fixed = TRUE), + data = places_data + ) + int_columns_places_data <- sapply(places_data, is.integer) + places_data[, int_columns_places_data] <- lapply(places_data[, int_columns_places_data], as.character) + } + if (!is.null(answer_groups_data)) { + columns_answer_groups_data <- c(paste(answer_groups_group), paste(answer_groups_question), paste(answer_groups_display_as), paste(answer_groups_affirmative_answers), NULL) + columns_answer_groups_data <- columns_answer_groups_data[!sapply(columns_answer_groups_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_answer_groups_data, split = ",", fixed = TRUE), + data = answer_groups_data + ) + int_columns_answer_groups_data <- sapply(answer_groups_data, is.integer) + answer_groups_data[, int_columns_answer_groups_data] <- lapply(answer_groups_data[, int_columns_answer_groups_data], as.character) + } + new_list$x$data$questions <- questions_data + new_list$x$data$order <- order_data + new_list$x$data$labels <- labels_data + new_list$x$data$colors <- colors_data + new_list$x$data$places <- places_data + new_list$x$data$answer_groups <- answer_groups_data + + if (is.null(questions_categorical)) { + new_list$x$bindings$questions$categorical <- "list" + } else { + new_list$x$bindings$questions$categorical <- questions_categorical + } + + + if (is.null(questions_continuous)) { + new_list$x$bindings$questions$continuous <- "list" + } else { + new_list$x$bindings$questions$continuous <- questions_continuous + } + + + if (is.null(questions_geo)) { + new_list$x$bindings$questions$geo <- "list" + } else { + new_list$x$bindings$questions$geo <- questions_geo + } + + new_list$x$bindings$questions$label <- questions_label + new_list$x$bindings$questions$column_filter <- questions_column_filter + new_list$x$bindings$questions$id <- questions_id + + if (is.null(questions_metadata)) { + new_list$x$bindings$questions$metadata <- "list" + } else { + new_list$x$bindings$questions$metadata <- questions_metadata + } + + + if (is.null(order_categories)) { + new_list$x$bindings$order$categories <- "list" + } else { + new_list$x$bindings$order$categories <- order_categories + } + + new_list$x$bindings$labels$label <- labels_label + new_list$x$bindings$labels$replacement <- labels_replacement + new_list$x$bindings$colors$question <- colors_question + new_list$x$bindings$colors$answer <- colors_answer + new_list$x$bindings$colors$color <- colors_color + new_list$x$bindings$places$latitude <- places_latitude + new_list$x$bindings$places$longitude <- places_longitude + + if (is.null(places_names)) { + new_list$x$bindings$places$names <- "list" + } else { + new_list$x$bindings$places$names <- places_names + } + + new_list$x$bindings$answer_groups$group <- answer_groups_group + new_list$x$bindings$answer_groups$question <- answer_groups_question + new_list$x$bindings$answer_groups$display_as <- answer_groups_display_as + + if (is.null(answer_groups_affirmative_answers)) { + new_list$x$bindings$answer_groups$affirmative_answers <- "list" + } else { + new_list$x$bindings$answer_groups$affirmative_answers <- answer_groups_affirmative_answers + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_svg_annotator_data.R b/R_package/R/bind_svg_annotator_data.R new file mode 100644 index 0000000..d2e37c2 --- /dev/null +++ b/R_package/R/bind_svg_annotator_data.R @@ -0,0 +1,60 @@ +#' Bind svg annotator data +#' @name bind_svg_annotator_data +#' @param data Data. +#' @param id ID. A column of IDs of elements in the uploaded SVG file. Flourish type hint: column +#' @param reveal_id Reveal layer. A column to reveal when layer is clicked. Flourish type hint: column +#' @param h1 Heading 1. A column containing the main header. Flourish type hint: column +#' @param h2 Heading 2. A column containing a secondary header. Flourish type hint: column +#' @param content Content. A column containing text or HTML to display. Flourish type hint: column +#' @param link Link. A URL that can be opened when a layer is clicked. Any reveal layers or popups will be overridden. Flourish type hint: column +#' @param metadata Info for popups. One or more columns to display in popups and panels. Flourish type hint: columns +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "svg_annotator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_svg_annotator_data(gapminder) +#' ) +#' @export + +bind_svg_annotator_data <- function( + ., + data = NULL, + id = NULL, + reveal_id = NULL, + h1 = NULL, + h2 = NULL, + content = NULL, + link = NULL, + metadata = NULL) { + bindings_error(., "svg_annotator") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(id), paste(reveal_id), paste(h1), paste(h2), paste(content), paste(link), paste(metadata), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$id <- id + new_list$x$bindings$data$reveal_id <- reveal_id + new_list$x$bindings$data$h1 <- h1 + new_list$x$bindings$data$h2 <- h2 + new_list$x$bindings$data$content <- content + new_list$x$bindings$data$link <- link + + if (is.null(metadata)) { + new_list$x$bindings$data$metadata <- "list" + } else { + new_list$x$bindings$data$metadata <- metadata + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_table_data.R b/R_package/R/bind_table_data.R new file mode 100644 index 0000000..e0b0eed --- /dev/null +++ b/R_package/R/bind_table_data.R @@ -0,0 +1,69 @@ +#' Bind table data +#' @name bind_table_data +#' @param rows_data Rows data. +#' @param columns Table values. The cell contents can by styled with html or markdown To style with markdown first make sure the Cell text styling setting in the Table section of the editor is on To add an image, right click on a cell and click Upload fileSuggested data type hints: string, number, datetime. Flourish type hint: columns +#' @param columns_input_format Formats/parses dates, strings, and numbers for the columns column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param columns_output_format Formats/parses dates, strings, and numbers for the columns column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "table", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_table_data(gapminder) +#' ) +#' @export + +bind_table_data <- function( + ., + rows_data = NULL, + columns = NULL, + columns_input_format = NULL, + columns_output_format = NULL) { + bindings_error(., "table") + + old_list <- . + new_list <- list() + + if (!is.null(rows_data)) { + columns_rows_data <- c(paste(columns), NULL) + columns_rows_data <- columns_rows_data[!sapply(columns_rows_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_rows_data, split = ",", fixed = TRUE), + data = rows_data + ) + int_columns_rows_data <- sapply(rows_data, is.integer) + rows_data[, int_columns_rows_data] <- lapply(rows_data[, int_columns_rows_data], as.character) + } + new_list$x$data$rows <- rows_data + + if (is.null(columns)) { + new_list$x$bindings$rows$columns <- "list" + } else { + new_list$x$bindings$rows$columns <- columns + } + + + + if (!is.null(columns_output_format) && !is.null(columns_input_format)) { + if (isTRUE(grepl("^%", columns_output_format))) { + new_list$x$metadata$rows$columns$type <- "datetime" + new_list$x$metadata$rows$columns$type_id <- paste0("datetime$", columns_input_format) + new_list$x$metadata$rows$columns$output_format_id <- paste0("datetime$", columns_output_format) + } else if (isTRUE(grepl("_", columns_output_format))) { + new_list$x$metadata$rows$columns$type <- "number" + new_list$x$metadata$rows$columns$type_id <- paste0("number$", columns_input_format) + new_list$x$metadata$rows$columns$output_format_id <- paste0("number$", columns_output_format) + } else if (isTRUE(!is.na(columns_output_format) && isFALSE(grepl("_", columns_output_format)) && isFALSE(grepl("^%", columns_output_format)))) { + new_list$x$metadata$rows$columns$type <- "string" + new_list$x$metadata$rows$columns$type_id <- paste0("string$", columns_input_format) + new_list$x$metadata$rows$columns$output_format_id <- paste0("string$", columns_output_format) + } + if (is.na(columns_input_format) && !is.na(columns_output_format)) { + "[columns_input_format] and [columns_output_format] must both be defined." + } + if (!is.na(columns_input_format) && is.na(columns_output_format)) { + "[columns_input_format] and [columns_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_text_annotator_data.R b/R_package/R/bind_text_annotator_data.R new file mode 100644 index 0000000..9b6f46c --- /dev/null +++ b/R_package/R/bind_text_annotator_data.R @@ -0,0 +1,39 @@ +#' Bind text annotator data +#' @name bind_text_annotator_data +#' @param data Data. +#' @param text Text. The piece of text you want to highlight. Note that text is case and space sensitive. Flourish type hint: column +#' @param note Annotation. The annotation content. Flourish type hint: column +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "text_annotator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_text_annotator_data(gapminder) +#' ) +#' @export + +bind_text_annotator_data <- function( + ., + data = NULL, + text = NULL, + note = NULL) { + bindings_error(., "text_annotator") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(text), paste(note), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$text <- text + new_list$x$bindings$data$note <- note + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_timeline_data.R b/R_package/R/bind_timeline_data.R new file mode 100644 index 0000000..ed07ee0 --- /dev/null +++ b/R_package/R/bind_timeline_data.R @@ -0,0 +1,273 @@ +#' Bind timeline data +#' @name bind_timeline_data +#' @param data Data. +#' @param time_start Time start +#' @param time_end End time. Sets the duration of the event in time scale mode. Flourish type hint: column +#' @param category Category +#' @param title Title. Title of the content. Suggested data type hints: string, number, datetime. Flourish type hint: column +#' @param subtitle Subtitle. Subtitle of the content. Suggested data type hints: string, number, datetime. Flourish type hint: column +#' @param text Text. Text to display inside the data point. Flourish type hint: column +#' @param image Image. Main image for the event. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column +#' @param background Background image. Background image for the event. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column +#' @param background_input_format Formats/parses dates, strings, and numbers for the background column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param background_output_format Formats/parses dates, strings, and numbers for the background column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param category_input_format Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param category_output_format Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param time_end_input_format Formats/parses dates, strings, and numbers for the time_end column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param time_end_output_format Formats/parses dates, strings, and numbers for the time_end column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param image_input_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param image_output_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param time_start_input_format Formats/parses dates, strings, and numbers for the time_start column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param time_start_output_format Formats/parses dates, strings, and numbers for the time_start column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param subtitle_input_format Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param subtitle_output_format Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param text_input_format Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param text_output_format Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param title_input_format Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param title_output_format Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "timeline", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_timeline_data(gapminder) +#' ) +#' @export + +bind_timeline_data <- function( + ., + data = NULL, + time_start = NULL, + time_end = NULL, + category = NULL, + title = NULL, + subtitle = NULL, + text = NULL, + image = NULL, + background = NULL, + background_input_format = NULL, + background_output_format = NULL, + category_input_format = NULL, + category_output_format = NULL, + time_end_input_format = NULL, + time_end_output_format = NULL, + image_input_format = NULL, + image_output_format = NULL, + time_start_input_format = NULL, + time_start_output_format = NULL, + subtitle_input_format = NULL, + subtitle_output_format = NULL, + text_input_format = NULL, + text_output_format = NULL, + title_input_format = NULL, + title_output_format = NULL) { + bindings_error(., "timeline") + + old_list <- . + new_list <- list() + + if (!is.null(data)) { + columns_data <- c(paste(time_start), paste(time_end), paste(category), paste(title), paste(subtitle), paste(text), paste(image), paste(background), NULL) + columns_data <- columns_data[!sapply(columns_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_data, split = ",", fixed = TRUE), + data = data + ) + int_columns_data <- sapply(data, is.integer) + data[, int_columns_data] <- lapply(data[, int_columns_data], as.character) + } + new_list$x$data$data <- data + new_list$x$bindings$data$time_start <- time_start + new_list$x$bindings$data$time_end <- time_end + new_list$x$bindings$data$category <- category + new_list$x$bindings$data$title <- title + new_list$x$bindings$data$subtitle <- subtitle + new_list$x$bindings$data$text <- text + new_list$x$bindings$data$image <- image + new_list$x$bindings$data$background <- background + + + if (!is.null(time_start_output_format) && !is.null(time_start_input_format)) { + if (isTRUE(grepl("^%", time_start_output_format))) { + new_list$x$metadata$data$time_start$type <- "datetime" + new_list$x$metadata$data$time_start$type_id <- paste0("datetime$", time_start_input_format) + new_list$x$metadata$data$time_start$output_format_id <- paste0("datetime$", time_start_output_format) + } else if (isTRUE(grepl("_", time_start_output_format))) { + new_list$x$metadata$data$time_start$type <- "number" + new_list$x$metadata$data$time_start$type_id <- paste0("number$", time_start_input_format) + new_list$x$metadata$data$time_start$output_format_id <- paste0("number$", time_start_output_format) + } else if (isTRUE(!is.na(time_start_output_format) && isFALSE(grepl("_", time_start_output_format)) && isFALSE(grepl("^%", time_start_output_format)))) { + new_list$x$metadata$data$time_start$type <- "string" + new_list$x$metadata$data$time_start$type_id <- paste0("string$", time_start_input_format) + new_list$x$metadata$data$time_start$output_format_id <- paste0("string$", time_start_output_format) + } + if (is.na(time_start_input_format) && !is.na(time_start_output_format)) { + "[time_start_input_format] and [time_start_output_format] must both be defined." + } + if (!is.na(time_start_input_format) && is.na(time_start_output_format)) { + "[time_start_input_format] and [time_start_output_format] must both be defined." + } + } + + + if (!is.null(time_end_output_format) && !is.null(time_end_input_format)) { + if (isTRUE(grepl("^%", time_end_output_format))) { + new_list$x$metadata$data$time_end$type <- "datetime" + new_list$x$metadata$data$time_end$type_id <- paste0("datetime$", time_end_input_format) + new_list$x$metadata$data$time_end$output_format_id <- paste0("datetime$", time_end_output_format) + } else if (isTRUE(grepl("_", time_end_output_format))) { + new_list$x$metadata$data$time_end$type <- "number" + new_list$x$metadata$data$time_end$type_id <- paste0("number$", time_end_input_format) + new_list$x$metadata$data$time_end$output_format_id <- paste0("number$", time_end_output_format) + } else if (isTRUE(!is.na(time_end_output_format) && isFALSE(grepl("_", time_end_output_format)) && isFALSE(grepl("^%", time_end_output_format)))) { + new_list$x$metadata$data$time_end$type <- "string" + new_list$x$metadata$data$time_end$type_id <- paste0("string$", time_end_input_format) + new_list$x$metadata$data$time_end$output_format_id <- paste0("string$", time_end_output_format) + } + if (is.na(time_end_input_format) && !is.na(time_end_output_format)) { + "[time_end_input_format] and [time_end_output_format] must both be defined." + } + if (!is.na(time_end_input_format) && is.na(time_end_output_format)) { + "[time_end_input_format] and [time_end_output_format] must both be defined." + } + } + + + if (!is.null(category_output_format) && !is.null(category_input_format)) { + if (isTRUE(grepl("^%", category_output_format))) { + new_list$x$metadata$data$category$type <- "datetime" + new_list$x$metadata$data$category$type_id <- paste0("datetime$", category_input_format) + new_list$x$metadata$data$category$output_format_id <- paste0("datetime$", category_output_format) + } else if (isTRUE(grepl("_", category_output_format))) { + new_list$x$metadata$data$category$type <- "number" + new_list$x$metadata$data$category$type_id <- paste0("number$", category_input_format) + new_list$x$metadata$data$category$output_format_id <- paste0("number$", category_output_format) + } else if (isTRUE(!is.na(category_output_format) && isFALSE(grepl("_", category_output_format)) && isFALSE(grepl("^%", category_output_format)))) { + new_list$x$metadata$data$category$type <- "string" + new_list$x$metadata$data$category$type_id <- paste0("string$", category_input_format) + new_list$x$metadata$data$category$output_format_id <- paste0("string$", category_output_format) + } + if (is.na(category_input_format) && !is.na(category_output_format)) { + "[category_input_format] and [category_output_format] must both be defined." + } + if (!is.na(category_input_format) && is.na(category_output_format)) { + "[category_input_format] and [category_output_format] must both be defined." + } + } + + + if (!is.null(title_output_format) && !is.null(title_input_format)) { + if (isTRUE(grepl("^%", title_output_format))) { + new_list$x$metadata$data$title$type <- "datetime" + new_list$x$metadata$data$title$type_id <- paste0("datetime$", title_input_format) + new_list$x$metadata$data$title$output_format_id <- paste0("datetime$", title_output_format) + } else if (isTRUE(grepl("_", title_output_format))) { + new_list$x$metadata$data$title$type <- "number" + new_list$x$metadata$data$title$type_id <- paste0("number$", title_input_format) + new_list$x$metadata$data$title$output_format_id <- paste0("number$", title_output_format) + } else if (isTRUE(!is.na(title_output_format) && isFALSE(grepl("_", title_output_format)) && isFALSE(grepl("^%", title_output_format)))) { + new_list$x$metadata$data$title$type <- "string" + new_list$x$metadata$data$title$type_id <- paste0("string$", title_input_format) + new_list$x$metadata$data$title$output_format_id <- paste0("string$", title_output_format) + } + if (is.na(title_input_format) && !is.na(title_output_format)) { + "[title_input_format] and [title_output_format] must both be defined." + } + if (!is.na(title_input_format) && is.na(title_output_format)) { + "[title_input_format] and [title_output_format] must both be defined." + } + } + + + if (!is.null(subtitle_output_format) && !is.null(subtitle_input_format)) { + if (isTRUE(grepl("^%", subtitle_output_format))) { + new_list$x$metadata$data$subtitle$type <- "datetime" + new_list$x$metadata$data$subtitle$type_id <- paste0("datetime$", subtitle_input_format) + new_list$x$metadata$data$subtitle$output_format_id <- paste0("datetime$", subtitle_output_format) + } else if (isTRUE(grepl("_", subtitle_output_format))) { + new_list$x$metadata$data$subtitle$type <- "number" + new_list$x$metadata$data$subtitle$type_id <- paste0("number$", subtitle_input_format) + new_list$x$metadata$data$subtitle$output_format_id <- paste0("number$", subtitle_output_format) + } else if (isTRUE(!is.na(subtitle_output_format) && isFALSE(grepl("_", subtitle_output_format)) && isFALSE(grepl("^%", subtitle_output_format)))) { + new_list$x$metadata$data$subtitle$type <- "string" + new_list$x$metadata$data$subtitle$type_id <- paste0("string$", subtitle_input_format) + new_list$x$metadata$data$subtitle$output_format_id <- paste0("string$", subtitle_output_format) + } + if (is.na(subtitle_input_format) && !is.na(subtitle_output_format)) { + "[subtitle_input_format] and [subtitle_output_format] must both be defined." + } + if (!is.na(subtitle_input_format) && is.na(subtitle_output_format)) { + "[subtitle_input_format] and [subtitle_output_format] must both be defined." + } + } + + + if (!is.null(text_output_format) && !is.null(text_input_format)) { + if (isTRUE(grepl("^%", text_output_format))) { + new_list$x$metadata$data$text$type <- "datetime" + new_list$x$metadata$data$text$type_id <- paste0("datetime$", text_input_format) + new_list$x$metadata$data$text$output_format_id <- paste0("datetime$", text_output_format) + } else if (isTRUE(grepl("_", text_output_format))) { + new_list$x$metadata$data$text$type <- "number" + new_list$x$metadata$data$text$type_id <- paste0("number$", text_input_format) + new_list$x$metadata$data$text$output_format_id <- paste0("number$", text_output_format) + } else if (isTRUE(!is.na(text_output_format) && isFALSE(grepl("_", text_output_format)) && isFALSE(grepl("^%", text_output_format)))) { + new_list$x$metadata$data$text$type <- "string" + new_list$x$metadata$data$text$type_id <- paste0("string$", text_input_format) + new_list$x$metadata$data$text$output_format_id <- paste0("string$", text_output_format) + } + if (is.na(text_input_format) && !is.na(text_output_format)) { + "[text_input_format] and [text_output_format] must both be defined." + } + if (!is.na(text_input_format) && is.na(text_output_format)) { + "[text_input_format] and [text_output_format] must both be defined." + } + } + + + if (!is.null(image_output_format) && !is.null(image_input_format)) { + if (isTRUE(grepl("^%", image_output_format))) { + new_list$x$metadata$data$image$type <- "datetime" + new_list$x$metadata$data$image$type_id <- paste0("datetime$", image_input_format) + new_list$x$metadata$data$image$output_format_id <- paste0("datetime$", image_output_format) + } else if (isTRUE(grepl("_", image_output_format))) { + new_list$x$metadata$data$image$type <- "number" + new_list$x$metadata$data$image$type_id <- paste0("number$", image_input_format) + new_list$x$metadata$data$image$output_format_id <- paste0("number$", image_output_format) + } else if (isTRUE(!is.na(image_output_format) && isFALSE(grepl("_", image_output_format)) && isFALSE(grepl("^%", image_output_format)))) { + new_list$x$metadata$data$image$type <- "string" + new_list$x$metadata$data$image$type_id <- paste0("string$", image_input_format) + new_list$x$metadata$data$image$output_format_id <- paste0("string$", image_output_format) + } + if (is.na(image_input_format) && !is.na(image_output_format)) { + "[image_input_format] and [image_output_format] must both be defined." + } + if (!is.na(image_input_format) && is.na(image_output_format)) { + "[image_input_format] and [image_output_format] must both be defined." + } + } + + + if (!is.null(background_output_format) && !is.null(background_input_format)) { + if (isTRUE(grepl("^%", background_output_format))) { + new_list$x$metadata$data$background$type <- "datetime" + new_list$x$metadata$data$background$type_id <- paste0("datetime$", background_input_format) + new_list$x$metadata$data$background$output_format_id <- paste0("datetime$", background_output_format) + } else if (isTRUE(grepl("_", background_output_format))) { + new_list$x$metadata$data$background$type <- "number" + new_list$x$metadata$data$background$type_id <- paste0("number$", background_input_format) + new_list$x$metadata$data$background$output_format_id <- paste0("number$", background_output_format) + } else if (isTRUE(!is.na(background_output_format) && isFALSE(grepl("_", background_output_format)) && isFALSE(grepl("^%", background_output_format)))) { + new_list$x$metadata$data$background$type <- "string" + new_list$x$metadata$data$background$type_id <- paste0("string$", background_input_format) + new_list$x$metadata$data$background$output_format_id <- paste0("string$", background_output_format) + } + if (is.na(background_input_format) && !is.na(background_output_format)) { + "[background_input_format] and [background_output_format] must both be defined." + } + if (!is.na(background_input_format) && is.na(background_output_format)) { + "[background_input_format] and [background_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_tournament_data.R b/R_package/R/bind_tournament_data.R new file mode 100644 index 0000000..7d42b55 --- /dev/null +++ b/R_package/R/bind_tournament_data.R @@ -0,0 +1,309 @@ +#' Bind tournament data +#' @name bind_tournament_data +#' @param matches_data Matches data. teams. +#' @param round Stage. The stage of the tournament, for example "Round of 16" or "Semifinals". Flourish type hint: column +#' @param team_a Participant A. The first participant or team in this match. Flourish type hint: column +#' @param team_b Participant B. The second participant or team in this match. Flourish type hint: column +#' @param winner Winner. The winning participant or team in this match. Must match the name of either Participant A or Participant B. If left blank, the template will assume that the match is upcoming. Flourish type hint: column +#' @param score_a Participant A score. The score of Participant A in this match. Will appear along with the participants name in the box. Suggested data type hints: string, number. Flourish type hint: column +#' @param score_b Participant B score. The score of Participant B in this match. Will appear along with the participants name in the box. Suggested data type hints: string, number. Flourish type hint: column +#' @param metadata Info for popups. One or more columns of information (text, image URLs , embedded charts etc) to include in popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns +#' @param id ID. Participant ID. Should match a participants name from the Matches sheet. Flourish type hint: column +#' @param image Image. Image to render in the participant box. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column +#' @param metadata_input_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param metadata_output_format Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param team_a_input_format Formats/parses dates, strings, and numbers for the team_a column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param team_a_output_format Formats/parses dates, strings, and numbers for the team_a column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param score_a_input_format Formats/parses dates, strings, and numbers for the score_a column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param score_a_output_format Formats/parses dates, strings, and numbers for the score_a column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param team_b_input_format Formats/parses dates, strings, and numbers for the team_b column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param team_b_output_format Formats/parses dates, strings, and numbers for the team_b column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param score_b_input_format Formats/parses dates, strings, and numbers for the score_b column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param score_b_output_format Formats/parses dates, strings, and numbers for the score_b column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param round_input_format Formats/parses dates, strings, and numbers for the round column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param round_output_format Formats/parses dates, strings, and numbers for the round column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param winner_input_format Formats/parses dates, strings, and numbers for the winner column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param winner_output_format Formats/parses dates, strings, and numbers for the winner column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param id_input_format Formats/parses dates, strings, and numbers for the id column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param id_output_format Formats/parses dates, strings, and numbers for the id column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param image_input_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param image_output_format Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "tournament", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_tournament_data(gapminder) +#' ) +#' @export + +bind_tournament_data <- function( + ., + matches_data = NULL, + round = NULL, + team_a = NULL, + team_b = NULL, + winner = NULL, + score_a = NULL, + score_b = NULL, + metadata = NULL, + id = NULL, + image = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + team_a_input_format = NULL, + team_a_output_format = NULL, + score_a_input_format = NULL, + score_a_output_format = NULL, + team_b_input_format = NULL, + team_b_output_format = NULL, + score_b_input_format = NULL, + score_b_output_format = NULL, + round_input_format = NULL, + round_output_format = NULL, + winner_input_format = NULL, + winner_output_format = NULL, + id_input_format = NULL, + id_output_format = NULL, + image_input_format = NULL, + image_output_format = NULL) { + bindings_error(., "tournament") + + old_list <- . + new_list <- list() + + if (!is.null(matches_data)) { + columns_matches_data <- c(paste(round), paste(team_a), paste(team_b), paste(winner), paste(score_a), paste(score_b), paste(metadata), NULL) + columns_matches_data <- columns_matches_data[!sapply(columns_matches_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_matches_data, split = ",", fixed = TRUE), + data = matches_data + ) + int_columns_matches_data <- sapply(matches_data, is.integer) + matches_data[, int_columns_matches_data] <- lapply(matches_data[, int_columns_matches_data], as.character) + } + new_list$x$data$matches <- matches_data + new_list$x$bindings$matches$round <- round + new_list$x$bindings$matches$team_a <- team_a + new_list$x$bindings$matches$team_b <- team_b + new_list$x$bindings$matches$winner <- winner + new_list$x$bindings$matches$score_a <- score_a + new_list$x$bindings$matches$score_b <- score_b + + if (is.null(metadata)) { + new_list$x$bindings$matches$metadata <- "list" + } else { + new_list$x$bindings$matches$metadata <- metadata + } + + new_list$x$bindings$teams$id <- id + new_list$x$bindings$teams$image <- image + + + if (!is.null(round_output_format) && !is.null(round_input_format)) { + if (isTRUE(grepl("^%", round_output_format))) { + new_list$x$metadata$matches$round$type <- "datetime" + new_list$x$metadata$matches$round$type_id <- paste0("datetime$", round_input_format) + new_list$x$metadata$matches$round$output_format_id <- paste0("datetime$", round_output_format) + } else if (isTRUE(grepl("_", round_output_format))) { + new_list$x$metadata$matches$round$type <- "number" + new_list$x$metadata$matches$round$type_id <- paste0("number$", round_input_format) + new_list$x$metadata$matches$round$output_format_id <- paste0("number$", round_output_format) + } else if (isTRUE(!is.na(round_output_format) && isFALSE(grepl("_", round_output_format)) && isFALSE(grepl("^%", round_output_format)))) { + new_list$x$metadata$matches$round$type <- "string" + new_list$x$metadata$matches$round$type_id <- paste0("string$", round_input_format) + new_list$x$metadata$matches$round$output_format_id <- paste0("string$", round_output_format) + } + if (is.na(round_input_format) && !is.na(round_output_format)) { + "[round_input_format] and [round_output_format] must both be defined." + } + if (!is.na(round_input_format) && is.na(round_output_format)) { + "[round_input_format] and [round_output_format] must both be defined." + } + } + + + if (!is.null(team_a_output_format) && !is.null(team_a_input_format)) { + if (isTRUE(grepl("^%", team_a_output_format))) { + new_list$x$metadata$matches$team_a$type <- "datetime" + new_list$x$metadata$matches$team_a$type_id <- paste0("datetime$", team_a_input_format) + new_list$x$metadata$matches$team_a$output_format_id <- paste0("datetime$", team_a_output_format) + } else if (isTRUE(grepl("_", team_a_output_format))) { + new_list$x$metadata$matches$team_a$type <- "number" + new_list$x$metadata$matches$team_a$type_id <- paste0("number$", team_a_input_format) + new_list$x$metadata$matches$team_a$output_format_id <- paste0("number$", team_a_output_format) + } else if (isTRUE(!is.na(team_a_output_format) && isFALSE(grepl("_", team_a_output_format)) && isFALSE(grepl("^%", team_a_output_format)))) { + new_list$x$metadata$matches$team_a$type <- "string" + new_list$x$metadata$matches$team_a$type_id <- paste0("string$", team_a_input_format) + new_list$x$metadata$matches$team_a$output_format_id <- paste0("string$", team_a_output_format) + } + if (is.na(team_a_input_format) && !is.na(team_a_output_format)) { + "[team_a_input_format] and [team_a_output_format] must both be defined." + } + if (!is.na(team_a_input_format) && is.na(team_a_output_format)) { + "[team_a_input_format] and [team_a_output_format] must both be defined." + } + } + + + if (!is.null(team_b_output_format) && !is.null(team_b_input_format)) { + if (isTRUE(grepl("^%", team_b_output_format))) { + new_list$x$metadata$matches$team_b$type <- "datetime" + new_list$x$metadata$matches$team_b$type_id <- paste0("datetime$", team_b_input_format) + new_list$x$metadata$matches$team_b$output_format_id <- paste0("datetime$", team_b_output_format) + } else if (isTRUE(grepl("_", team_b_output_format))) { + new_list$x$metadata$matches$team_b$type <- "number" + new_list$x$metadata$matches$team_b$type_id <- paste0("number$", team_b_input_format) + new_list$x$metadata$matches$team_b$output_format_id <- paste0("number$", team_b_output_format) + } else if (isTRUE(!is.na(team_b_output_format) && isFALSE(grepl("_", team_b_output_format)) && isFALSE(grepl("^%", team_b_output_format)))) { + new_list$x$metadata$matches$team_b$type <- "string" + new_list$x$metadata$matches$team_b$type_id <- paste0("string$", team_b_input_format) + new_list$x$metadata$matches$team_b$output_format_id <- paste0("string$", team_b_output_format) + } + if (is.na(team_b_input_format) && !is.na(team_b_output_format)) { + "[team_b_input_format] and [team_b_output_format] must both be defined." + } + if (!is.na(team_b_input_format) && is.na(team_b_output_format)) { + "[team_b_input_format] and [team_b_output_format] must both be defined." + } + } + + + if (!is.null(winner_output_format) && !is.null(winner_input_format)) { + if (isTRUE(grepl("^%", winner_output_format))) { + new_list$x$metadata$matches$winner$type <- "datetime" + new_list$x$metadata$matches$winner$type_id <- paste0("datetime$", winner_input_format) + new_list$x$metadata$matches$winner$output_format_id <- paste0("datetime$", winner_output_format) + } else if (isTRUE(grepl("_", winner_output_format))) { + new_list$x$metadata$matches$winner$type <- "number" + new_list$x$metadata$matches$winner$type_id <- paste0("number$", winner_input_format) + new_list$x$metadata$matches$winner$output_format_id <- paste0("number$", winner_output_format) + } else if (isTRUE(!is.na(winner_output_format) && isFALSE(grepl("_", winner_output_format)) && isFALSE(grepl("^%", winner_output_format)))) { + new_list$x$metadata$matches$winner$type <- "string" + new_list$x$metadata$matches$winner$type_id <- paste0("string$", winner_input_format) + new_list$x$metadata$matches$winner$output_format_id <- paste0("string$", winner_output_format) + } + if (is.na(winner_input_format) && !is.na(winner_output_format)) { + "[winner_input_format] and [winner_output_format] must both be defined." + } + if (!is.na(winner_input_format) && is.na(winner_output_format)) { + "[winner_input_format] and [winner_output_format] must both be defined." + } + } + + + if (!is.null(score_a_output_format) && !is.null(score_a_input_format)) { + if (isTRUE(grepl("^%", score_a_output_format))) { + new_list$x$metadata$matches$score_a$type <- "datetime" + new_list$x$metadata$matches$score_a$type_id <- paste0("datetime$", score_a_input_format) + new_list$x$metadata$matches$score_a$output_format_id <- paste0("datetime$", score_a_output_format) + } else if (isTRUE(grepl("_", score_a_output_format))) { + new_list$x$metadata$matches$score_a$type <- "number" + new_list$x$metadata$matches$score_a$type_id <- paste0("number$", score_a_input_format) + new_list$x$metadata$matches$score_a$output_format_id <- paste0("number$", score_a_output_format) + } else if (isTRUE(!is.na(score_a_output_format) && isFALSE(grepl("_", score_a_output_format)) && isFALSE(grepl("^%", score_a_output_format)))) { + new_list$x$metadata$matches$score_a$type <- "string" + new_list$x$metadata$matches$score_a$type_id <- paste0("string$", score_a_input_format) + new_list$x$metadata$matches$score_a$output_format_id <- paste0("string$", score_a_output_format) + } + if (is.na(score_a_input_format) && !is.na(score_a_output_format)) { + "[score_a_input_format] and [score_a_output_format] must both be defined." + } + if (!is.na(score_a_input_format) && is.na(score_a_output_format)) { + "[score_a_input_format] and [score_a_output_format] must both be defined." + } + } + + + if (!is.null(score_b_output_format) && !is.null(score_b_input_format)) { + if (isTRUE(grepl("^%", score_b_output_format))) { + new_list$x$metadata$matches$score_b$type <- "datetime" + new_list$x$metadata$matches$score_b$type_id <- paste0("datetime$", score_b_input_format) + new_list$x$metadata$matches$score_b$output_format_id <- paste0("datetime$", score_b_output_format) + } else if (isTRUE(grepl("_", score_b_output_format))) { + new_list$x$metadata$matches$score_b$type <- "number" + new_list$x$metadata$matches$score_b$type_id <- paste0("number$", score_b_input_format) + new_list$x$metadata$matches$score_b$output_format_id <- paste0("number$", score_b_output_format) + } else if (isTRUE(!is.na(score_b_output_format) && isFALSE(grepl("_", score_b_output_format)) && isFALSE(grepl("^%", score_b_output_format)))) { + new_list$x$metadata$matches$score_b$type <- "string" + new_list$x$metadata$matches$score_b$type_id <- paste0("string$", score_b_input_format) + new_list$x$metadata$matches$score_b$output_format_id <- paste0("string$", score_b_output_format) + } + if (is.na(score_b_input_format) && !is.na(score_b_output_format)) { + "[score_b_input_format] and [score_b_output_format] must both be defined." + } + if (!is.na(score_b_input_format) && is.na(score_b_output_format)) { + "[score_b_input_format] and [score_b_output_format] must both be defined." + } + } + + + if (!is.null(metadata_output_format) && !is.null(metadata_input_format)) { + if (isTRUE(grepl("^%", metadata_output_format))) { + new_list$x$metadata$matches$metadata$type <- "datetime" + new_list$x$metadata$matches$metadata$type_id <- paste0("datetime$", metadata_input_format) + new_list$x$metadata$matches$metadata$output_format_id <- paste0("datetime$", metadata_output_format) + } else if (isTRUE(grepl("_", metadata_output_format))) { + new_list$x$metadata$matches$metadata$type <- "number" + new_list$x$metadata$matches$metadata$type_id <- paste0("number$", metadata_input_format) + new_list$x$metadata$matches$metadata$output_format_id <- paste0("number$", metadata_output_format) + } else if (isTRUE(!is.na(metadata_output_format) && isFALSE(grepl("_", metadata_output_format)) && isFALSE(grepl("^%", metadata_output_format)))) { + new_list$x$metadata$matches$metadata$type <- "string" + new_list$x$metadata$matches$metadata$type_id <- paste0("string$", metadata_input_format) + new_list$x$metadata$matches$metadata$output_format_id <- paste0("string$", metadata_output_format) + } + if (is.na(metadata_input_format) && !is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + if (!is.na(metadata_input_format) && is.na(metadata_output_format)) { + "[metadata_input_format] and [metadata_output_format] must both be defined." + } + } + + + if (!is.null(id_output_format) && !is.null(id_input_format)) { + if (isTRUE(grepl("^%", id_output_format))) { + new_list$x$metadata$teams$id$type <- "datetime" + new_list$x$metadata$teams$id$type_id <- paste0("datetime$", id_input_format) + new_list$x$metadata$teams$id$output_format_id <- paste0("datetime$", id_output_format) + } else if (isTRUE(grepl("_", id_output_format))) { + new_list$x$metadata$teams$id$type <- "number" + new_list$x$metadata$teams$id$type_id <- paste0("number$", id_input_format) + new_list$x$metadata$teams$id$output_format_id <- paste0("number$", id_output_format) + } else if (isTRUE(!is.na(id_output_format) && isFALSE(grepl("_", id_output_format)) && isFALSE(grepl("^%", id_output_format)))) { + new_list$x$metadata$teams$id$type <- "string" + new_list$x$metadata$teams$id$type_id <- paste0("string$", id_input_format) + new_list$x$metadata$teams$id$output_format_id <- paste0("string$", id_output_format) + } + if (is.na(id_input_format) && !is.na(id_output_format)) { + "[id_input_format] and [id_output_format] must both be defined." + } + if (!is.na(id_input_format) && is.na(id_output_format)) { + "[id_input_format] and [id_output_format] must both be defined." + } + } + + + if (!is.null(image_output_format) && !is.null(image_input_format)) { + if (isTRUE(grepl("^%", image_output_format))) { + new_list$x$metadata$teams$image$type <- "datetime" + new_list$x$metadata$teams$image$type_id <- paste0("datetime$", image_input_format) + new_list$x$metadata$teams$image$output_format_id <- paste0("datetime$", image_output_format) + } else if (isTRUE(grepl("_", image_output_format))) { + new_list$x$metadata$teams$image$type <- "number" + new_list$x$metadata$teams$image$type_id <- paste0("number$", image_input_format) + new_list$x$metadata$teams$image$output_format_id <- paste0("number$", image_output_format) + } else if (isTRUE(!is.na(image_output_format) && isFALSE(grepl("_", image_output_format)) && isFALSE(grepl("^%", image_output_format)))) { + new_list$x$metadata$teams$image$type <- "string" + new_list$x$metadata$teams$image$type_id <- paste0("string$", image_input_format) + new_list$x$metadata$teams$image$output_format_id <- paste0("string$", image_output_format) + } + if (is.na(image_input_format) && !is.na(image_output_format)) { + "[image_input_format] and [image_output_format] must both be defined." + } + if (!is.na(image_input_format) && is.na(image_output_format)) { + "[image_input_format] and [image_output_format] must both be defined." + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/bind_word_cloud_data.R b/R_package/R/bind_word_cloud_data.R new file mode 100644 index 0000000..6c8879e --- /dev/null +++ b/R_package/R/bind_word_cloud_data.R @@ -0,0 +1,51 @@ +#' Bind word cloud data +#' @name bind_word_cloud_data +#' @param words_data Words data. +#' @param word Word +#' @param value Value +#' @param category Category +#' @param metadata Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Flourish type hint: columns +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "word_cloud", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_word_cloud_data(gapminder) +#' ) +#' @export + +bind_word_cloud_data <- function( + ., + words_data = NULL, + word = NULL, + value = NULL, + category = NULL, + metadata = NULL) { + bindings_error(., "word_cloud") + + old_list <- . + new_list <- list() + + if (!is.null(words_data)) { + columns_words_data <- c(paste(word), paste(value), paste(category), paste(metadata), NULL) + columns_words_data <- columns_words_data[!sapply(columns_words_data, is.null)] + spelling_check_column_names( + strings = strsplit(columns_words_data, split = ",", fixed = TRUE), + data = words_data + ) + int_columns_words_data <- sapply(words_data, is.integer) + words_data[, int_columns_words_data] <- lapply(words_data[, int_columns_words_data], as.character) + } + new_list$x$data$words <- words_data + new_list$x$bindings$words$word <- word + new_list$x$bindings$words$value <- value + new_list$x$bindings$words$category <- category + + if (is.null(metadata)) { + new_list$x$bindings$words$metadata <- "list" + } else { + new_list$x$bindings$words$metadata <- metadata + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/canva_upload.R b/R_package/R/canva_upload.R new file mode 100644 index 0000000..f8c2c2c --- /dev/null +++ b/R_package/R/canva_upload.R @@ -0,0 +1,56 @@ +#' Set up function for uploading graphs to canva.com. Only available for internal use. +#' @name canva_upload +#' @param graph Plot object. +#' @param name File name or description to appear in Canva's object panel. +#' @param live_update_id An ID or string (set by the user) to update an existing flourishcharts graph in Canva that also has the same ID. +#' @param api_key API key - grab from the flourishcharts content app on canva.com +#' @param width default width of plot in pixels +#' @param height default height of plot in pixels +#' @return A string stating whether the upload to canva.com was successful. +#' @examples +#' try( +#' chart <- flourish( +#' chart_type = "scatter", api_key = Sys.getenv("FLOURISH_API_KEY") +#' ) |> +#' bind_scatter_data( +#' data = subset(gapminder, year == 2007), +#' y = "gdpPercap", x = "lifeExp" +#' ) +#' canva_upload( +#' graph = chart, name = "Scatterplot - gapminder 2007" +#' ) +#' ) +#' @noRd +canva_upload <- function(graph, + name = NULL, + live_update_id = NULL, + api_key = Sys.getenv("FLOURISH_CHARTS_API_KEY"), + width = "640", + height = "640") { + local_file <- tempfile(fileext = paste0(".json"), tmpdir = "~") + graph$x <- graph$x[-which(sapply(graph$x, is.null))] + write(jsonlite::toJSON(graph$x, auto_unbox = T), file = local_file) + + b <- httr::POST( + url = paste0("https://canviz.canva-corp.com/upload"), + body = list( + name = name, + external_id = live_update_id, + file = httr::upload_file( + path = local_file, + type = "application/json" + ), + width = width, + height = height + ), + httr::add_headers(Authorization = api_key) + ) + + + file_path <- b$request$fields$file$path + if (file.exists(file_path)) { + file.remove(file_path) + } + + flourish_charts_api_warning_continue(b) +} diff --git a/R_package/R/data.R b/R_package/R/data.R new file mode 100644 index 0000000..ba082f5 --- /dev/null +++ b/R_package/R/data.R @@ -0,0 +1,32 @@ +#' Flourish template API documentation +#' +#' A data set containing template metadata about Flourish graphs +#' +#' @format A data frame with 57 rows and 3 columns: +#' \describe{ +#' \item{template_name}{Template name. Found in API documentation: \url{https://app.flourish.studio/@flourish}. } +#' \item{chart_type}{Chart type. One template may have multiple chart types.} +#' \item{url}{URL for template API documentation.} +#' } +#' @return A data frame +#' @examples flourish_api_documentation +#' @source \url{https://flourish.studio/index.html} +"flourish_api_documentation" + +#' Gapminder data +#' +#' A data set containing Gapminder data used for vignettes +#' +#' @format A data frame with 1704 rows and 6 columns: +#' \describe{ +#' \item{country}{Country name.} +#' \item{continent}{Continent name.} +#' \item{year}{Year data was collected.} +#' \item{lifeExp}{Life expectancy.} +#' \item{pop}{Population size.} +#' \item{gdpPercap}{GDP per capita.} +#' } +#' @return A data frame +#' @examples gapminder +#' @source \url{https://www.gapminder.org/} +"gapminder" diff --git a/R_package/R/flourish.R b/R_package/R/flourish.R new file mode 100644 index 0000000..2f6f008 --- /dev/null +++ b/R_package/R/flourish.R @@ -0,0 +1,182 @@ +#' Plot a Flourish graph. +#' +#' Create a graph using Flourish's API (https://developers.flourish.studio/api/introduction/). +#' @name flourish +#' @param chart_type Required - a chart type string for each graph in Flourish's library. Preferred usage compared to `template_id` and `template_version`. +#' @param base_visualisation_id Optional - provide the numerical ID of an existing public (published) Flourish visualisation to reference it's configuration +#' @param template_id Optional - the Flourish template ID, found at https://app.flourish.studio/@flourish. Use if you cannot use `chart_type`. +#' @param template_version_number Optional - the template's version number. Also found at https://app.flourish.studio/@flourish. Use if you cannot use `chart_type`. +#' @param chart_description Optional - a screen-reader description. A text alternative to the visual content that will only be visible to screen-readers, e.g. “The line chart shows China consistently higher than the other countries since 1990”. Do no replicate your title, since that will also be read by screenreaders. +#' @param api_key Required - our API key which can be generated within your profile account. Defaults to Sys.getenv("FLOURISH_API_KEY"). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish( +#' chart_type = "scatter", api_key = Sys.getenv("FLOURISH_API_KEY") +#' ) |> +#' bind_scatter_data( +#' data = subset(gapminder, year == 2007), +#' y = "gdpPercap", x = "lifeExp" +#' ) +#' ) +#' @export + +flourish <- function(chart_type = NULL, + chart_description = NULL, + base_visualisation_id = NULL, + template_id = NULL, + template_version_number = NULL, + api_key = Sys.getenv("FLOURISH_API_KEY")) { + api_version <- "5.1.0" + templates_chart_type_data <- templates_private[templates_private$chart_type == chart_type, ] + if (!is.null(base_visualisation_id)) { + base_visualisation_data_format <- "object" + # download the base visualisation's configuration to get template_id/version to setup the iframe + base_visualisation_url <- sprintf("https://public.flourish.studio/visualisation/%d/visualisation-object.json", base_visualisation_id) + resp <- httr::GET(base_visualisation_url) + if (resp$status_code == 403) { + stop(paste("Access denied accessing base visualisation ", base_visualisation_url, " - please ensure it is published for public use")) + } + jsonRespParsed <- httr::content(resp, as = "parsed") + template_id <- jsonRespParsed$template + template_version <- jsonRespParsed$version + # The Flourish Live API now supports array of objects, so let's convert them as it's just easier to work with data frames in R: + # loop through datasets (there might be multiple, depending on template) + for (i in seq_along(jsonRespParsed$data)) { + # Convert the list of lists to a data frame + df <- as.data.frame(do.call(rbind, jsonRespParsed$data[[i]])) + # Assign the modified data frame back to the original list + jsonRespParsed$data[[i]] <- df + } + for (i in seq_along(jsonRespParsed$data)) { + list_element <- jsonRespParsed$metadata[[i]] + for (col_name in names(jsonRespParsed$data[[i]])) { + if (list_element[[col_name]]$type == "string") { + jsonRespParsed$data[[i]][[col_name]][jsonRespParsed$data[[i]][[col_name]] == "NA"] <- "" + jsonRespParsed$data[[i]][[col_name]] <- as.character(jsonRespParsed$data[[i]][[col_name]]) + } else if (list_element[[col_name]]$type == "number") { + jsonRespParsed$data[[i]][[col_name]][jsonRespParsed$data[[i]][[col_name]] == "NA"] <- "" + jsonRespParsed$data[[i]][[col_name]] <- suppressWarnings(as.numeric(jsonRespParsed$data[[i]][[col_name]])) + } else if (list_element[[col_name]]$type == "datetime") { + jsonRespParsed$data[[i]][[col_name]][jsonRespParsed$data[[i]][[col_name]] == "NA"] <- "" + jsonRespParsed$data[[i]][[col_name]] <- as.character(jsonRespParsed$data[[i]][[col_name]]) + } + } + } + if (jsonRespParsed$template %in% c("@flourish/line-bar-pie", "@flourish/hierarchy")) { + base_viz_chart_type <- base_coalesce_chart_type(jsonRespParsed$template, jsonRespParsed$state$chart_type, jsonRespParsed$state$hierarchy_layout) + } else { + base_viz_chart_type <- chart_type + } + base_bindings <- jsonRespParsed$bindings + base_data <- jsonRespParsed$data + base_state <- jsonRespParsed$state + base_metadata <- jsonRespParsed$metadata + } else { + base_bindings <- NULL + base_data <- NULL + base_state <- NULL + base_metadata <- NULL + base_visualisation_data_format <- NULL + } + + if (!is.null(chart_type) && nrow(templates_chart_type_data) > 0) { + template_id <- templates_chart_type_data$template_id + template_version <- templates_chart_type_data$template_version + base_viz_chart_type <- templates_chart_type_data$chart_type + if (!is.null(base_visualisation_id)) { + base_viz_chart_type <- NULL + } + } else if (is.null(chart_type) && is.null(base_visualisation_id) && is.null(template_id)) { + stop("Error: please enter a chart type, template ID and version number, or the base visualisation ID of an existing published Flourish graph, if available.") + } else if (!is.null(base_visualisation_id)) { + template_id <- jsonRespParsed$template + template_version <- jsonRespParsed$version + } else if (is.null(chart_type) && !is.null(template_id) && !is.null(template_version_number)) { + template_id <- template_id + template_version <- template_version_number + } else if (!is.null(chart_type) && !is.null(template_id) && !is.null(template_version_number)) { + stop("Error: specify only a chart type or a template ID and version number.") + } else if (!is.null(template_id) && is.null(template_version_number)) { + stop("Error: please specify a template version number.") + } else if (is.null(template_id) && !is.null(template_version_number)) { + stop("Error: please specify a template ID or a chart type.") + } else if (!is.null(chart_type) && nrow(templates_chart_type_data) < 1) { + stop("Error: your chart type string is not an exact match with Flourish's available graphs.") + } else if (grepl("(^map_.*$)|(^globe_.*)", chart_type)) { + stop("Error: we do not currently support visualizing map templates via the chart type parameter.") + } + + # generate an ID for the div + random_string <- c( + sample(LETTERS, 5, replace = TRUE), + sample(0:9, 9, replace = TRUE), + sample(LETTERS, 7, replace = TRUE) + ) + random_string_value <- paste0(random_string, collapse = "") + + elementId <- sprintf( + "htmlwidget-%s", + random_string_value + ) + chartId <- sprintf( + "chart-%s", + random_string_value + ) + if (isTRUE(knitr::is_html_output())) { + iframe_src <- paste0("https://flourish-api.com/api/v1/live/template?api_key=", api_key, "&template=", template_id, "&api_version=", api_version, "&version=", template_version) + iframe_height <- "575px" + } else { + iframe_src <- paste0("https://flourish-api.com/api/v1/live/template?api_key=", api_key, "&template=", template_id, "&api_version=", api_version, "&version=", template_version) + iframe_height <- "100%" + } + + # forward options using x + x <- list( + chart_id = chartId, + template = template_id, + version = template_version, + api_key = api_key, + chart_type = base_viz_chart_type, + state = c(flourish_default_layout(chart_description), + chart_type = base_viz_chart_type, + hierarchy_layout = base_viz_chart_type + ), + elementId = paste0("#", elementId), + data = NULL, + base_visualisation_id = base_visualisation_id, + base_state = dplyr::coalesce(base_state, flourish_default_layout(chart_description)), + base_bindings = base_bindings, + base_data = base_data, + base_metadata = base_metadata, + base_visualisation_data_format = base_visualisation_data_format + ) + + # create widget + htmlwidgets::prependContent( + htmlwidgets::createWidget( + name = "flourish-live", + elementId = elementId, + x, + package = "flourishcharts", + sizingPolicy = htmlwidgets::sizingPolicy( + viewer.padding = 0, + viewer.fill = TRUE, + browser.fill = TRUE, + viewer.defaultWidth = "100%", + knitr.defaultWidth = "100%" + ) + ), + htmltools::tags$iframe( + id = chartId, + width = "100%", + height = iframe_height, + seamless = "seamless", + scrolling = "no", + frameborder = "2", + title = "Interactive or visual content", + sandbox = "allow-same-origin allow-forms allow-scripts allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation", + src = iframe_src + ) + ) +} diff --git a/R_package/R/flourish_charts_utils.R b/R_package/R/flourish_charts_utils.R new file mode 100644 index 0000000..e69de5e --- /dev/null +++ b/R_package/R/flourish_charts_utils.R @@ -0,0 +1,154 @@ +#' flourishcharts API warning +#' @param post_call The HTTR POST call to the API +#' @noRd +flourish_charts_api_warning <- function(post_call) { + post_call_message <- httr::http_status(post_call)[["message"]] + post_call_content <- httr::content(post_call, "text") + post_call_error <- httr::http_error(post_call) + post_call_ct <- post_call$headers$`content-type` + + if (isTRUE(post_call_error) && post_call_ct == "text/html; charset=UTF-8") { + return(paste0(post_call_message, ". We currently do not support HTML uploads to Canva.")) + } else if (isTRUE(post_call_error) && post_call_ct != "text/html; charset=UTF-8") { + return(paste0(post_call_message, ". Your image file cannot be uploaded. Please try again.")) + } else if (isFALSE(post_call_error)) { + return(paste0("Success! Please go to canva.com / canva.cn and open the flourishcharts Canva content app.")) + } +} + + +#' flourishcharts API warning continue +#' @param x HTTR POST call +#' @noRd +flourish_charts_api_warning_continue <- function(x) { + withCallingHandlers( + expr = flourish_charts_api_warning(x), + warning = function(w) { + if (inherits(x = w)) { + utils::str(w) + tryInvokeRestart("muffleWarning") + return(flourish_charts_api_warning(x)) + } + } + ) +} + + +#' Check that the data binding strings match the columns in the data frame +#' @param strings Strings to match +#' @param data Dataset to match +#' @noRd + +check_col_names_in_data <- function(strings = NULL, + data = NULL, + data_name = NULL) { + function_args <- list() + function_args$data <- data + function_args$strings <- strings + result <- all(function_args$strings %in% colnames(function_args$data)) + if (isFALSE(result)) { + warning(paste0("Your data binding columns do not match the column names in the `", data_name, "` dataset used in this graph. Please double check your spelling.")) + } +} + + +#' Spelling check column names. +#' @param strings Strings +#' @param data Data frame +#' @noRd + +spelling_check_column_names <- function(strings, + data) { + strings <- strings + + data_name <- deparse(substitute(data)) + + if (!is.null(data)) { + check_col_names_in_data( + strings = strings, + data = data, + data_name = data_name + ) + } +} + +# Internal functions for Flourish. +# Ideally, not visible to end-user. + +#' Deep merge two lists +#' @param list1 First list +#' @param list2 Second list +#' @noRd + +deep_merge <- function(list1, list2) { + return(utils::modifyList(list1, list2[intersect(names(list2), names(list1))])) + rm(list1) + rm(list2) +} + +#' Default layout for a Flourish graph +#' @param chart_description Set chart description for screenreader +#' @param ... Set additional layout parameters +#' @noRd + +flourish_default_layout <- function(chart_description = NULL, + ...) { + x <- list() + + # accessibility + if (is.null(chart_description)) { + x$layout$screenreader_hide_primary <- TRUE + } else if (!is.null(chart_description)) { + x$layout$screenreader_hide_primary <- FALSE + x$layout$screenreader_text_primary <- chart_description + } + + return(x) +} + +#' Base coalesce helper function +#' @noRd +base_coalesce_chart_type <- function(template_version, chart_type_1 = NULL, chart_type_2 = NULL) { + if (isTRUE(is.null(chart_type_1) && template_version == "@flourish/line-bar-pie")) { + chart_type_1 <- "line" + } + if (isTRUE(is.null(chart_type_2) && template_version == "@flourish/hierarchy")) { + chart_type_2 <- "treemap" + } + apply(cbind(chart_type_1, chart_type_2), 1, function(x) { + x[which(!is.na(x))[1]] + }) +} + +#' Base coalesce helper function +#' @noRd +base_coalesce <- function(...) { + apply(cbind(...), 1, function(x) { + x[which(!is.na(x))[1]] + }) +} + +#' Bindings error function +#' @param chart Flourish chart +#' @param template_function Template function name +#' @description Throw an error if the user attempts to apply the wrong binding function for a chart template. +#' @noRd + +bindings_error <- function(chart, template_function) { + if (chart$x$template != paste0("@flourish/", gsub("_", "-", template_function)) && !is.null(chart$x$template)) { + stop(paste0("`bind_", template_function, "_data()` is not supported for this chart template: ", chart$x$template)) + } +} + + +#' Details error function +#' @param chart Flourish chart +#' @param template_function Template function name +#' @description Throw an error if the user attempts to apply the wrong details function for a chart template. +#' @noRd + +details_error <- function(chart, template_function) { + if (chart$x$template != paste0("@flourish/", gsub("_", "-", template_function)) && !is.null(chart$x$template)) { + stop(paste0("`set_", template_function, "_details()` is not supported for this chart template: ", chart$x$template)) + } +} diff --git a/R_package/R/set_audio_details.R b/R_package/R/set_audio_details.R new file mode 100644 index 0000000..d7dad13 --- /dev/null +++ b/R_package/R/set_audio_details.R @@ -0,0 +1,2007 @@ +#' Set audio chart details +#' @name set_audio_details +#' @param audio_player_button_color Background. Flourish type hint: color, defaults to `NULL` +#' @param audio_player_button_icon_color Icons. Flourish type hint: color, defaults to `NULL` +#' @param audio_player_button_size Size. In rems, a multiple of base font size. Flourish type hint: number, defaults to `NULL` +#' @param audio_player_button_roundness Roundness. Flourish type hint: number, defaults to `NULL` +#' @param audio_player_progress_color Color. Flourish type hint: color, defaults to `NULL` +#' @param audio_player_progress_bg_color Background. Flourish type hint: color, defaults to `NULL` +#' @param audio_player_progress_height Height. In rems, a multiple of base font size. Flourish type hint: number, defaults to `NULL` +#' @param audio_player_progress_width Width (%). Flourish type hint: number, defaults to `NULL` +#' @param audio_player_width Width. In rems, a multiple of base font size. Leave blank to fill the available space. Flourish type hint: number, defaults to `NULL` +#' @param audio_player_margin_top_bottom Space. Spacing above and below the player. In rems, a multiple of base font size. Flourish type hint: number, defaults to `NULL` +#' @param audio_player_show_text_styling Show text styles. Flourish type hint: boolean, defaults to `NULL` +#' @param audio_player_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param audio_player_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param audio_player_title_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param audio_player_subtitle_size Size. Flourish type hint: number, defaults to `NULL` +#' @param audio_player_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param audio_player_subtitle_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param audio_player_time_size Size. Flourish type hint: number, defaults to `NULL` +#' @param audio_player_time_color Color. Flourish type hint: color, defaults to `NULL` +#' @param audio_player_time_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param audio_player_link_color Color. Where links are present (added by wrapping text in <a> tags in the datasheet) this setting changes their text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "audio", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_audio_data(gapminder) |> +#' set_audio_details() +#' ) +#' @export + +set_audio_details <- function( + ., + audio_player_button_color = NULL, + audio_player_button_icon_color = NULL, + audio_player_button_size = NULL, + audio_player_button_roundness = NULL, + audio_player_progress_color = NULL, + audio_player_progress_bg_color = NULL, + audio_player_progress_height = NULL, + audio_player_progress_width = NULL, + audio_player_width = NULL, + audio_player_margin_top_bottom = NULL, + audio_player_show_text_styling = NULL, + audio_player_title_size = NULL, + audio_player_title_color = NULL, + audio_player_title_weight = NULL, + audio_player_subtitle_size = NULL, + audio_player_subtitle_color = NULL, + audio_player_subtitle_weight = NULL, + audio_player_time_size = NULL, + audio_player_time_color = NULL, + audio_player_time_weight = NULL, + audio_player_link_color = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "audio") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/audio")) { + stop("`set_audio_details()` is not supported for this chart type.") + } + new_list$x$state$audio_player$button_color <- audio_player_button_color + new_list$x$state$audio_player$button_icon_color <- audio_player_button_icon_color + new_list$x$state$audio_player$button_size <- audio_player_button_size + new_list$x$state$audio_player$button_roundness <- audio_player_button_roundness + new_list$x$state$audio_player$progress_color <- audio_player_progress_color + new_list$x$state$audio_player$progress_bg_color <- audio_player_progress_bg_color + new_list$x$state$audio_player$progress_height <- audio_player_progress_height + new_list$x$state$audio_player$progress_width <- audio_player_progress_width + new_list$x$state$audio_player$width <- audio_player_width + new_list$x$state$audio_player$margin_top_bottom <- audio_player_margin_top_bottom + new_list$x$state$audio_player$show_text_styling <- audio_player_show_text_styling + new_list$x$state$audio_player$title_size <- audio_player_title_size + new_list$x$state$audio_player$title_color <- audio_player_title_color + list_audio_player_title_weight <- c("normal", "bold", NULL) + if (!is.null(audio_player_title_weight)) { + if (!audio_player_title_weight %in% list_audio_player_title_weight) { + stop("`audio_player_title_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && audio_player_title_weight %in% names(named_list)) { + if (is.logical(audio_player_title_weight)) { + audio_player_title_weight <- as.character(audio_player_title_weight) + } + named_list_value <- unname(named_list[audio_player_title_weight])[[1]] + new_list$x$state$audio_player$title_weight <- named_list_value + } + } + } + } + new_list$x$state$audio_player$subtitle_size <- audio_player_subtitle_size + new_list$x$state$audio_player$subtitle_color <- audio_player_subtitle_color + list_audio_player_subtitle_weight <- c("normal", "bold", NULL) + if (!is.null(audio_player_subtitle_weight)) { + if (!audio_player_subtitle_weight %in% list_audio_player_subtitle_weight) { + stop("`audio_player_subtitle_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && audio_player_subtitle_weight %in% names(named_list)) { + if (is.logical(audio_player_subtitle_weight)) { + audio_player_subtitle_weight <- as.character(audio_player_subtitle_weight) + } + named_list_value <- unname(named_list[audio_player_subtitle_weight])[[1]] + new_list$x$state$audio_player$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$audio_player$time_size <- audio_player_time_size + new_list$x$state$audio_player$time_color <- audio_player_time_color + list_audio_player_time_weight <- c("normal", "bold", NULL) + if (!is.null(audio_player_time_weight)) { + if (!audio_player_time_weight %in% list_audio_player_time_weight) { + stop("`audio_player_time_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && audio_player_time_weight %in% names(named_list)) { + if (is.logical(audio_player_time_weight)) { + audio_player_time_weight <- as.character(audio_player_time_weight) + } + named_list_value <- unname(named_list[audio_player_time_weight])[[1]] + new_list$x$state$audio_player$time_weight <- named_list_value + } + } + } + } + new_list$x$state$audio_player$link_color <- audio_player_link_color + list_chart_filter_controls_control_type <- c("dropdown", "buttons", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$filter_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$filter_control$control_styles <- chart_filter_controls_control_styles + new_list$x$state$filter_control$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$filter_control$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$filter_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$filter_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$filter_control$slider_width <- chart_filter_controls_slider_width + new_list$x$state$filter_control$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$filter_control$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$filter_control$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$filter_control$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$filter_control$sort <- named_list_value + } + } + } + } + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_bar_chart_race_details.R b/R_package/R/set_bar_chart_race_details.R new file mode 100644 index 0000000..9450ddc --- /dev/null +++ b/R_package/R/set_bar_chart_race_details.R @@ -0,0 +1,3328 @@ +#' Set bar chart race chart details +#' @name set_bar_chart_race_details +#' @param column_chart Chart style. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param number_of_bars No. bars. Flourish type hint: number, defaults to `NULL` +#' @param bar_margin Spacing (Percentage). Spacing as a percentage of bar width. For example at "50" the bar height will equal bar spacing. Flourish type hint: number, defaults to `NULL` +#' @param sort_enabled Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param sort_ascending Sort mode. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param bars_advanced Show advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param height_mode Bar height. Choices: fill_space, specified. Flourish type hint: string, defaults to `NULL` +#' @param bar_height Height. Height of the bar; expressed as a multiple of the base font size to make it responsive. Flourish type hint: number, defaults to `NULL` +#' @param bar_min_value Hide bars below value. This will hide all bars that have a value below the number specified in this setting. Flourish type hint: number, defaults to `NULL` +#' @param bar_empty_spaces When not enough bars. Choices: `TRUE`, `FALSE`. If enabled, the chart and bars will remain the same size as more bars enter the race. Flourish type hint: boolean, defaults to `NULL` +#' @param color_mode Color mode. Choices: category, bar, single. Whether to color by category (if you have a category column set in the datasheet), by each individual bar, or give every bar the same color. Flourish type hint: string, defaults to `NULL` +#' @param color_single Single color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Color overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param color_single_overrides Color overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param bar_opacity Bar opacity. Flourish type hint: number, defaults to `NULL` +#' @param label_max_size Max size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param label_mode Labels mode. Choices: bars, axis. Flourish type hint: string, defaults to `NULL` +#' @param label_color_in Color. Flourish type hint: color, defaults to `NULL` +#' @param label_axis_width Space. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param show_value Show values. Flourish type hint: boolean, defaults to `NULL` +#' @param label_color_out Color. Flourish type hint: color, defaults to `NULL` +#' @param padding_right Space. Flourish type hint: number, defaults to `NULL` +#' @param image_height Height. As a percentage of bar height. Flourish type hint: number, defaults to `NULL` +#' @param image_width Width. As a percentage of bar height. Flourish type hint: number, defaults to `NULL` +#' @param image_margin_right Margin right. As a percentage of bar height. Use a negative value to get images to show to the right of the barFlourish type hint: number, defaults to `NULL` +#' @param image_scale Image sizing. Choices: fill, fit, stretch. Flourish type hint: string, defaults to `NULL` +#' @param image_circle Shape. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param counter Show current time. Flourish type hint: boolean, defaults to `NULL` +#' @param counter_font_size Size (percentage of screen). Flourish type hint: number, defaults to `NULL` +#' @param counter_color Color. Flourish type hint: color, defaults to `NULL` +#' @param counter_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param totaliser Show total. Shows the sum of all the values in the datasheet for the current time, including any bars not currently visible in the chart. Flourish type hint: boolean, defaults to `NULL` +#' @param totaliser_font_size Size (percentage of screen). Flourish type hint: number, defaults to `NULL` +#' @param totaliser_color Color. Flourish type hint: color, defaults to `NULL` +#' @param totaliser_label Label. Flourish type hint: string, defaults to `NULL` +#' @param caption_background_color Background. Flourish type hint: color, defaults to `NULL` +#' @param caption_border_color Border. Flourish type hint: color, defaults to `NULL` +#' @param caption_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param caption_padding Padding. In rems multiples of the base font size. Flourish type hint: number, defaults to `NULL` +#' @param caption_text_align Align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param caption_position Position. Choices: top-left, center-left, bottom-left, top-right, center-right, bottom-right, top-center, center-center, bottom-center. Flourish type hint: string, defaults to `NULL` +#' @param caption_font_size Font size. In rems multiples of the base font size. Flourish type hint: number, defaults to `NULL` +#' @param caption_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param caption_mode Content mode. Choices: text_legend, html. In Text with colors mode, any phrases matching category names will be automatically colored. In HTML mode, no colors will be applied, but you can include any HTML in the datasheet to add images, etc. Flourish type hint: string, defaults to `NULL` +#' @param caption_image_width Width. As a percentage of the caption container width. Flourish type hint: number, defaults to `NULL` +#' @param caption_image_position Position. Choices: column, column-reverse, row, row-reverse. Flourish type hint: string, defaults to `NULL` +#' @param caption_space_between Space between. Space between the image and text in rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param sort_control Show sort control. Flourish type hint: boolean, defaults to `NULL` +#' @param sort_descending_text “Highest” label. Flourish type hint: string, defaults to `NULL` +#' @param sort_ascending_text “Lowest” label. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param text_legend Choices: auto, custom, off. Flourish type hint: string, defaults to `NULL` +#' @param text_legend_title Title. Flourish type hint: boolean, defaults to `NULL` +#' @param text_legend_subtitle Subtitle. Flourish type hint: boolean, defaults to `NULL` +#' @param text_legend_caption Captions. Flourish type hint: boolean, defaults to `NULL` +#' @param text_legend_bold Bold. If checked, always use bold for colored items. Flourish type hint: boolean, defaults to `NULL` +#' @param axis_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param axis_font_size Text size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param axis_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param axis_gridline_dash Line dash. Flourish type hint: number, defaults to `NULL` +#' @param scale_type Type. Choices: auto, auto_fixed, manual. The dynamic scale type sets a dynamix X axis that will animate with the chart. The fixed or custom scale type sets a fixed maximum value on the X axis. Flourish type hint: string, defaults to `NULL` +#' @param scale_min Min range. The axis will go from zero to this value, then be dynamic. Flourish type hint: number, defaults to `NULL` +#' @param scale_max Max. Flourish type hint: number, defaults to `NULL` +#' @param annotations_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param annotations_content Annotations. One line per annotation. Syntax Annotation text :: Value on X axis Example Winner :: 250 Majority :: 200. Flourish type hint: text, defaults to `NULL` +#' @param annotations_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param annotations_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param annotations_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param annotations_line_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param annotations_line_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param annotations_line_width Width. Flourish type hint: number, defaults to `NULL` +#' @param annotations_line_dash Dash. Flourish type hint: number, defaults to `NULL` +#' @param annotations_align Align. Choices: start, middle, end. Flourish type hint: string, defaults to `NULL` +#' @param annotations_offset Offset. Choices: above, on, below. Offset text mode. Flourish type hint: string, defaults to `NULL` +#' @param chart_timeline_controls_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_style Style. Choices: timeline, button. Flourish type hint: string, defaults to `NULL` +#' @param chart_timeline_controls_graph Show chart. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_play_on_load Play on load. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_loop Loop timeline. When turned on, the timeline will return to the beginning once complete. Otherwise, it will stop when it reaches the end. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_duration Timeline duration. Total duration of the timeline during normal playback in seconds. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_duration_tween Time jump duration. Duration of transitions between different points in time on the timeline. This is the transition you see in the story player when switching between slides with a different time on the timeline (in seconds). Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_duration_wait_at_end Pause before loop. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_axes_custom_enabled Axis settings. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_color_axes Axes color. Flourish type hint: color, defaults to `NULL` +#' @param chart_timeline_controls_axis_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_date_format_display X axis date format. Choices:, %Y-%m-%dT%H:%M:%S.%LZ, %Y-%m-%d, %m/%d/%Y, %d/%m/%Y, %d-%b-%y, %m/%Y, %b %Y, %b %y, %B %d, %d %b, %Y, %B, %b, %A, %a, %H:%M:%S, %I:%M %p, %H:%M. Flourish type hint: string, defaults to `NULL` +#' @param chart_timeline_controls_axis_nice_x Clean X axis. Rounds out the X axis so that its start and end values are nice, round dates. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_axis_nice_y Clean Y axis. Rounds out the Y axis so that its start and end values are nice, round numbers. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_scrubber_snap Snap when scrubbing. When turned on, you can only jump to values that are supplied in the dataset and nothing in between. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_scrubber_snap_paused Snap when paused. Activate to snap the timeline to the closest interval when non animating. This is useful for ensuring the data visible in the visualization always reflects the data you have supplied. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_layout_settings Layout settings. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_margin_right Space between button and timeline. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_scrubber_height Scrubber height. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_margin_right_button Space between button and text. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_graph_settings Chart settings. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_color_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_timeline_controls_graph_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_curve Curved lines. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_playback_styling Play button settings. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_button_color Button color. Flourish type hint: color, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_button_size Button size. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_icon_color Icon color. Flourish type hint: color, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_icon_size Icon size. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_label_size Label size. Flourish type hint: number, defaults to `NULL` +#' @param animation_duration Bar swap duration. Animation duration of the bars swapping, in seconds. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param blank_cells How to handle blank/invalid cells. Choices: interpolate, last_valid, zero, remove. Interpolate fills the gaps between the last and next valid values. Use last valid will use the last number for the bar. Treat as zero will set the value of the blank cell to zero. Remove bar will remove the bar for any blank/invalid cells. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "bar_race", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_bar_chart_race_data(gapminder) |> +#' set_bar_chart_race_details() +#' ) +#' @export + +set_bar_chart_race_details <- function( + ., + column_chart = NULL, + number_of_bars = NULL, + bar_margin = NULL, + sort_enabled = NULL, + sort_ascending = NULL, + bars_advanced = NULL, + height_mode = NULL, + bar_height = NULL, + bar_min_value = NULL, + bar_empty_spaces = NULL, + color_mode = NULL, + color_single = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + color_single_overrides = NULL, + bar_opacity = NULL, + label_max_size = NULL, + label_mode = NULL, + label_color_in = NULL, + label_axis_width = NULL, + show_value = NULL, + label_color_out = NULL, + padding_right = NULL, + image_height = NULL, + image_width = NULL, + image_margin_right = NULL, + image_scale = NULL, + image_circle = NULL, + counter = NULL, + counter_font_size = NULL, + counter_color = NULL, + counter_line_height = NULL, + totaliser = NULL, + totaliser_font_size = NULL, + totaliser_color = NULL, + totaliser_label = NULL, + caption_background_color = NULL, + caption_border_color = NULL, + caption_opacity = NULL, + caption_padding = NULL, + caption_text_align = NULL, + caption_position = NULL, + caption_font_size = NULL, + caption_text_color = NULL, + caption_mode = NULL, + caption_image_width = NULL, + caption_image_position = NULL, + caption_space_between = NULL, + sort_control = NULL, + sort_descending_text = NULL, + sort_ascending_text = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + text_legend = NULL, + text_legend_title = NULL, + text_legend_subtitle = NULL, + text_legend_caption = NULL, + text_legend_bold = NULL, + axis_text_color = NULL, + axis_font_size = NULL, + axis_color = NULL, + axis_gridline_dash = NULL, + scale_type = NULL, + scale_min = NULL, + scale_max = NULL, + annotations_enabled = NULL, + annotations_content = NULL, + annotations_text_color = NULL, + annotations_text_size = NULL, + annotations_text_weight = NULL, + annotations_line_color = NULL, + annotations_line_opacity = NULL, + annotations_line_width = NULL, + annotations_line_dash = NULL, + annotations_align = NULL, + annotations_offset = NULL, + chart_timeline_controls_enabled = NULL, + chart_timeline_controls_style = NULL, + chart_timeline_controls_graph = NULL, + chart_timeline_controls_play_on_load = NULL, + chart_timeline_controls_loop = NULL, + chart_timeline_controls_duration = NULL, + chart_timeline_controls_duration_tween = NULL, + chart_timeline_controls_duration_wait_at_end = NULL, + chart_timeline_controls_axes_custom_enabled = NULL, + chart_timeline_controls_color_axes = NULL, + chart_timeline_controls_axis_font_size = NULL, + chart_timeline_controls_date_format_display = NULL, + chart_timeline_controls_axis_nice_x = NULL, + chart_timeline_controls_axis_nice_y = NULL, + chart_timeline_controls_scrubber_snap = NULL, + chart_timeline_controls_scrubber_snap_paused = NULL, + chart_timeline_controls_layout_settings = NULL, + chart_timeline_controls_margin_top = NULL, + chart_timeline_controls_margin_left = NULL, + chart_timeline_controls_margin_bottom = NULL, + chart_timeline_controls_margin_right = NULL, + chart_timeline_controls_playback_button_margin_right = NULL, + chart_timeline_controls_scrubber_height = NULL, + chart_timeline_controls_playback_button_margin_right_button = NULL, + chart_timeline_controls_graph_settings = NULL, + chart_timeline_controls_color_background = NULL, + chart_timeline_controls_graph_height = NULL, + chart_timeline_controls_curve = NULL, + chart_timeline_controls_playback_styling = NULL, + chart_timeline_controls_playback_button_button_color = NULL, + chart_timeline_controls_playback_button_button_size = NULL, + chart_timeline_controls_playback_button_icon_color = NULL, + chart_timeline_controls_playback_button_icon_size = NULL, + chart_timeline_controls_playback_button_label_size = NULL, + animation_duration = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + blank_cells = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "bar_chart_race") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/bar-chart-race")) { + stop("`set_bar_chart_race_details()` is not supported for this chart type.") + } + list_column_chart <- c(FALSE, TRUE, NULL) + if (!is.null(column_chart)) { + if (!column_chart %in% list_column_chart) { + stop("`column_chart` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && column_chart %in% names(named_list)) { + if (is.logical(column_chart)) { + column_chart <- as.character(column_chart) + } + named_list_value <- unname(named_list[column_chart])[[1]] + new_list$x$state$column_chart <- named_list_value + } + } + } + } + new_list$x$state$number_of_bars <- number_of_bars + new_list$x$state$bar_margin <- bar_margin + list_sort_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(sort_enabled)) { + if (!sort_enabled %in% list_sort_enabled) { + stop("`sort_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && sort_enabled %in% names(named_list)) { + if (is.logical(sort_enabled)) { + sort_enabled <- as.character(sort_enabled) + } + named_list_value <- unname(named_list[sort_enabled])[[1]] + new_list$x$state$sort_enabled <- named_list_value + } + } + } + } + list_sort_ascending <- c(FALSE, TRUE, NULL) + if (!is.null(sort_ascending)) { + if (!sort_ascending %in% list_sort_ascending) { + stop("`sort_ascending` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && sort_ascending %in% names(named_list)) { + if (is.logical(sort_ascending)) { + sort_ascending <- as.character(sort_ascending) + } + named_list_value <- unname(named_list[sort_ascending])[[1]] + new_list$x$state$sort_ascending <- named_list_value + } + } + } + } + new_list$x$state$bars_advanced <- bars_advanced + list_height_mode <- c("fill_space", "specified", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('fill_space', 'specified')") + } else { + if (length(jsonlite::fromJSON('{"fill_space": "fill_space", "specified": "specified"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fill_space": "fill_space", "specified": "specified"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + new_list$x$state$bar_height <- bar_height + new_list$x$state$bar_min_value <- bar_min_value + list_bar_empty_spaces <- c(TRUE, FALSE, NULL) + if (!is.null(bar_empty_spaces)) { + if (!bar_empty_spaces %in% list_bar_empty_spaces) { + stop("`bar_empty_spaces` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && bar_empty_spaces %in% names(named_list)) { + if (is.logical(bar_empty_spaces)) { + bar_empty_spaces <- as.character(bar_empty_spaces) + } + named_list_value <- unname(named_list[bar_empty_spaces])[[1]] + new_list$x$state$bar_empty_spaces <- named_list_value + } + } + } + } + list_color_mode <- c("category", "bar", "single", NULL) + if (!is.null(color_mode)) { + if (!color_mode %in% list_color_mode) { + stop("`color_mode` must be one of: c('category', 'bar', 'single')") + } else { + if (length(jsonlite::fromJSON('{"category": "category", "bar": "bar", "single": "single"}')) > 1) { + named_list <- jsonlite::fromJSON('{"category": "category", "bar": "bar", "single": "single"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && color_mode %in% names(named_list)) { + if (is.logical(color_mode)) { + color_mode <- as.character(color_mode) + } + named_list_value <- unname(named_list[color_mode])[[1]] + new_list$x$state$color_mode <- named_list_value + } + } + } + } + new_list$x$state$color_single <- color_single + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + if (length(color_single_overrides) > 1) { + new_list$x$state$color_single_overrides <- paste(color_single_overrides, collapse = "\n") + } else { + new_list$x$state$color_single_overrides <- color_single_overrides + } + + new_list$x$state$bar_opacity <- bar_opacity + new_list$x$state$label_max_size <- label_max_size + list_label_mode <- c("bars", "axis", NULL) + if (!is.null(label_mode)) { + if (!label_mode %in% list_label_mode) { + stop("`label_mode` must be one of: c('bars', 'axis')") + } else { + if (length(jsonlite::fromJSON('{"bars": "bars", "axis": "axis"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bars": "bars", "axis": "axis"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_mode %in% names(named_list)) { + if (is.logical(label_mode)) { + label_mode <- as.character(label_mode) + } + named_list_value <- unname(named_list[label_mode])[[1]] + new_list$x$state$label_mode <- named_list_value + } + } + } + } + new_list$x$state$label_color_in <- label_color_in + new_list$x$state$label_axis_width <- label_axis_width + new_list$x$state$show_value <- show_value + new_list$x$state$label_color_out <- label_color_out + new_list$x$state$padding_right <- padding_right + new_list$x$state$image_height <- image_height + new_list$x$state$image_width <- image_width + new_list$x$state$image_margin_right <- image_margin_right + list_image_scale <- c("fill", "fit", "stretch", NULL) + if (!is.null(image_scale)) { + if (!image_scale %in% list_image_scale) { + stop("`image_scale` must be one of: c('fill', 'fit', 'stretch')") + } else { + if (length(jsonlite::fromJSON('{"fill": "fill", "fit": "fit", "stretch": "stretch"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fill": "fill", "fit": "fit", "stretch": "stretch"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_scale %in% names(named_list)) { + if (is.logical(image_scale)) { + image_scale <- as.character(image_scale) + } + named_list_value <- unname(named_list[image_scale])[[1]] + new_list$x$state$image_scale <- named_list_value + } + } + } + } + list_image_circle <- c(FALSE, TRUE, NULL) + if (!is.null(image_circle)) { + if (!image_circle %in% list_image_circle) { + stop("`image_circle` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_circle %in% names(named_list)) { + if (is.logical(image_circle)) { + image_circle <- as.character(image_circle) + } + named_list_value <- unname(named_list[image_circle])[[1]] + new_list$x$state$image_circle <- named_list_value + } + } + } + } + new_list$x$state$counter <- counter + new_list$x$state$counter_font_size <- counter_font_size + new_list$x$state$counter_color <- counter_color + new_list$x$state$counter_line_height <- counter_line_height + new_list$x$state$totaliser <- totaliser + new_list$x$state$totaliser_font_size <- totaliser_font_size + new_list$x$state$totaliser_color <- totaliser_color + new_list$x$state$totaliser_label <- totaliser_label + new_list$x$state$caption_background_color <- caption_background_color + new_list$x$state$caption_border_color <- caption_border_color + new_list$x$state$caption_opacity <- caption_opacity + new_list$x$state$caption_padding <- caption_padding + list_caption_text_align <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(caption_text_align)) { + if (!caption_text_align %in% list_caption_text_align) { + stop("`caption_text_align` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && caption_text_align %in% names(named_list)) { + if (is.logical(caption_text_align)) { + caption_text_align <- as.character(caption_text_align) + } + named_list_value <- unname(named_list[caption_text_align])[[1]] + new_list$x$state$caption_text_align <- named_list_value + } + } + } + } + list_caption_position <- c("top-left", "center-left", "bottom-left", "top-right", "center-right", "bottom-right", "top-center", "center-center", "bottom-center", NULL) + if (!is.null(caption_position)) { + if (!caption_position %in% list_caption_position) { + stop("`caption_position` must be one of: c('top-left', 'center-left', 'bottom-left', 'top-right', 'center-right', 'bottom-right', 'top-center', 'center-center', 'bottom-center')") + } else { + if (length(jsonlite::fromJSON('{"top-left": "top-left", "center-left": "center-left", "bottom-left": "bottom-left", "top-right": "top-right", "center-right": "center-right", "bottom-right": "bottom-right", "top-center": "top-center", "center-center": "center-center", "bottom-center": "bottom-center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top-left": "top-left", "center-left": "center-left", "bottom-left": "bottom-left", "top-right": "top-right", "center-right": "center-right", "bottom-right": "bottom-right", "top-center": "top-center", "center-center": "center-center", "bottom-center": "bottom-center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && caption_position %in% names(named_list)) { + if (is.logical(caption_position)) { + caption_position <- as.character(caption_position) + } + named_list_value <- unname(named_list[caption_position])[[1]] + new_list$x$state$caption_position <- named_list_value + } + } + } + } + new_list$x$state$caption_font_size <- caption_font_size + new_list$x$state$caption_text_color <- caption_text_color + list_caption_mode <- c("text_legend", "html", NULL) + if (!is.null(caption_mode)) { + if (!caption_mode %in% list_caption_mode) { + stop("`caption_mode` must be one of: c('text_legend', 'html')") + } else { + if (length(jsonlite::fromJSON('{"text_legend": "text_legend", "html": "html"}')) > 1) { + named_list <- jsonlite::fromJSON('{"text_legend": "text_legend", "html": "html"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && caption_mode %in% names(named_list)) { + if (is.logical(caption_mode)) { + caption_mode <- as.character(caption_mode) + } + named_list_value <- unname(named_list[caption_mode])[[1]] + new_list$x$state$caption_mode <- named_list_value + } + } + } + } + new_list$x$state$caption_image_width <- caption_image_width + list_caption_image_position <- c("column", "column-reverse", "row", "row-reverse", NULL) + if (!is.null(caption_image_position)) { + if (!caption_image_position %in% list_caption_image_position) { + stop("`caption_image_position` must be one of: c('column', 'column-reverse', 'row', 'row-reverse')") + } else { + if (length(jsonlite::fromJSON('{"column": "column", "column-reverse": "column-reverse", "row": "row", "row-reverse": "row-reverse"}')) > 1) { + named_list <- jsonlite::fromJSON('{"column": "column", "column-reverse": "column-reverse", "row": "row", "row-reverse": "row-reverse"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && caption_image_position %in% names(named_list)) { + if (is.logical(caption_image_position)) { + caption_image_position <- as.character(caption_image_position) + } + named_list_value <- unname(named_list[caption_image_position])[[1]] + new_list$x$state$caption_image_position <- named_list_value + } + } + } + } + new_list$x$state$caption_space_between <- caption_space_between + new_list$x$state$sort_control <- sort_control + new_list$x$state$sort_descending_text <- sort_descending_text + new_list$x$state$sort_ascending_text <- sort_ascending_text + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_text_legend <- c("auto", "custom", "off", NULL) + if (!is.null(text_legend)) { + if (!text_legend %in% list_text_legend) { + stop("`text_legend` must be one of: c('auto', 'custom', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && text_legend %in% names(named_list)) { + if (is.logical(text_legend)) { + text_legend <- as.character(text_legend) + } + named_list_value <- unname(named_list[text_legend])[[1]] + new_list$x$state$text_legend <- named_list_value + } + } + } + } + new_list$x$state$text_legend_title <- text_legend_title + new_list$x$state$text_legend_subtitle <- text_legend_subtitle + new_list$x$state$text_legend_caption <- text_legend_caption + new_list$x$state$text_legend_bold <- text_legend_bold + new_list$x$state$axis_text_color <- axis_text_color + new_list$x$state$axis_font_size <- axis_font_size + new_list$x$state$axis_color <- axis_color + new_list$x$state$axis_gridline_dash <- axis_gridline_dash + list_scale_type <- c("auto", "auto_fixed", "manual", NULL) + if (!is.null(scale_type)) { + if (!scale_type %in% list_scale_type) { + stop("`scale_type` must be one of: c('auto', 'auto_fixed', 'manual')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "auto_fixed": "auto_fixed", "manual": "manual"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "auto_fixed": "auto_fixed", "manual": "manual"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && scale_type %in% names(named_list)) { + if (is.logical(scale_type)) { + scale_type <- as.character(scale_type) + } + named_list_value <- unname(named_list[scale_type])[[1]] + new_list$x$state$scale_type <- named_list_value + } + } + } + } + new_list$x$state$scale_min <- scale_min + new_list$x$state$scale_max <- scale_max + list_annotations_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(annotations_enabled)) { + if (!annotations_enabled %in% list_annotations_enabled) { + stop("`annotations_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && annotations_enabled %in% names(named_list)) { + if (is.logical(annotations_enabled)) { + annotations_enabled <- as.character(annotations_enabled) + } + named_list_value <- unname(named_list[annotations_enabled])[[1]] + new_list$x$state$annotations_enabled <- named_list_value + } + } + } + } + if (length(annotations_content) > 1) { + new_list$x$state$annotations_content <- paste(annotations_content, collapse = "\n") + } else { + new_list$x$state$annotations_content <- annotations_content + } + + new_list$x$state$annotations_text_color <- annotations_text_color + new_list$x$state$annotations_text_size <- annotations_text_size + list_annotations_text_weight <- c("bold", "normal", NULL) + if (!is.null(annotations_text_weight)) { + if (!annotations_text_weight %in% list_annotations_text_weight) { + stop("`annotations_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && annotations_text_weight %in% names(named_list)) { + if (is.logical(annotations_text_weight)) { + annotations_text_weight <- as.character(annotations_text_weight) + } + named_list_value <- unname(named_list[annotations_text_weight])[[1]] + new_list$x$state$annotations_text_weight <- named_list_value + } + } + } + } + new_list$x$state$annotations_line_color <- annotations_line_color + new_list$x$state$annotations_line_opacity <- annotations_line_opacity + new_list$x$state$annotations_line_width <- annotations_line_width + new_list$x$state$annotations_line_dash <- annotations_line_dash + list_annotations_align <- c("start", "middle", "end", NULL) + if (!is.null(annotations_align)) { + if (!annotations_align %in% list_annotations_align) { + stop("`annotations_align` must be one of: c('start', 'middle', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "middle": "middle", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "middle": "middle", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && annotations_align %in% names(named_list)) { + if (is.logical(annotations_align)) { + annotations_align <- as.character(annotations_align) + } + named_list_value <- unname(named_list[annotations_align])[[1]] + new_list$x$state$annotations_align <- named_list_value + } + } + } + } + list_annotations_offset <- c("above", "on", "below", NULL) + if (!is.null(annotations_offset)) { + if (!annotations_offset %in% list_annotations_offset) { + stop("`annotations_offset` must be one of: c('above', 'on', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "on": "on", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "on": "on", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && annotations_offset %in% names(named_list)) { + if (is.logical(annotations_offset)) { + annotations_offset <- as.character(annotations_offset) + } + named_list_value <- unname(named_list[annotations_offset])[[1]] + new_list$x$state$annotations_offset <- named_list_value + } + } + } + } + list_chart_timeline_controls_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_timeline_controls_enabled)) { + if (!chart_timeline_controls_enabled %in% list_chart_timeline_controls_enabled) { + stop("`chart_timeline_controls_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_timeline_controls_enabled %in% names(named_list)) { + if (is.logical(chart_timeline_controls_enabled)) { + chart_timeline_controls_enabled <- as.character(chart_timeline_controls_enabled) + } + named_list_value <- unname(named_list[chart_timeline_controls_enabled])[[1]] + new_list$x$state$timeline$enabled <- named_list_value + } + } + } + } + list_chart_timeline_controls_style <- c("timeline", "button", NULL) + if (!is.null(chart_timeline_controls_style)) { + if (!chart_timeline_controls_style %in% list_chart_timeline_controls_style) { + stop("`chart_timeline_controls_style` must be one of: c('timeline', 'button')") + } else { + if (length(jsonlite::fromJSON('{"timeline": "timeline", "button": "button"}')) > 1) { + named_list <- jsonlite::fromJSON('{"timeline": "timeline", "button": "button"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_timeline_controls_style %in% names(named_list)) { + if (is.logical(chart_timeline_controls_style)) { + chart_timeline_controls_style <- as.character(chart_timeline_controls_style) + } + named_list_value <- unname(named_list[chart_timeline_controls_style])[[1]] + new_list$x$state$timeline$style <- named_list_value + } + } + } + } + list_chart_timeline_controls_graph <- c(TRUE, FALSE, NULL) + if (!is.null(chart_timeline_controls_graph)) { + if (!chart_timeline_controls_graph %in% list_chart_timeline_controls_graph) { + stop("`chart_timeline_controls_graph` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_timeline_controls_graph %in% names(named_list)) { + if (is.logical(chart_timeline_controls_graph)) { + chart_timeline_controls_graph <- as.character(chart_timeline_controls_graph) + } + named_list_value <- unname(named_list[chart_timeline_controls_graph])[[1]] + new_list$x$state$timeline$graph <- named_list_value + } + } + } + } + new_list$x$state$timeline$play_on_load <- chart_timeline_controls_play_on_load + new_list$x$state$timeline$loop <- chart_timeline_controls_loop + new_list$x$state$timeline$duration <- chart_timeline_controls_duration + new_list$x$state$timeline$duration_tween <- chart_timeline_controls_duration_tween + new_list$x$state$timeline$duration_wait_at_end <- chart_timeline_controls_duration_wait_at_end + new_list$x$state$timeline$axes_custom_enabled <- chart_timeline_controls_axes_custom_enabled + new_list$x$state$timeline$color_axes <- chart_timeline_controls_color_axes + new_list$x$state$timeline$axis_font_size <- chart_timeline_controls_axis_font_size + list_chart_timeline_controls_date_format_display <- c("", "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d", "%m/%d/%Y", "%d/%m/%Y", "%d-%b-%y", "%m/%Y", "%b %Y", "%b %y", "%B %d", "%d %b", "%Y", "%B", "%b", "%A", "%a", "%H:%M:%S", "%I:%M %p", "%H:%M", NULL) + if (!is.null(chart_timeline_controls_date_format_display)) { + if (!chart_timeline_controls_date_format_display %in% list_chart_timeline_controls_date_format_display) { + stop("`chart_timeline_controls_date_format_display` must be one of: c('', '%Y-%m-%dT%H:%M:%S.%LZ', '%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%d-%b-%y', '%m/%Y', '%b %Y', '%b %y', '%B %d', '%d %b', '%Y', '%B', '%b', '%A', '%a', '%H:%M:%S', '%I:%M %p', '%H:%M')") + } else { + if (length(jsonlite::fromJSON('{"": "", "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d": "%Y-%m-%d", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%d-%b-%y": "%d-%b-%y", "%m/%Y": "%m/%Y", "%b %Y": "%b %Y", "%b %y": "%b %y", "%B %d": "%B %d", "%d %b": "%d %b", "%Y": "%Y", "%B": "%B", "%b": "%b", "%A": "%A", "%a": "%a", "%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M"}')) > 1) { + named_list <- jsonlite::fromJSON('{"": "", "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d": "%Y-%m-%d", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%d-%b-%y": "%d-%b-%y", "%m/%Y": "%m/%Y", "%b %Y": "%b %Y", "%b %y": "%b %y", "%B %d": "%B %d", "%d %b": "%d %b", "%Y": "%Y", "%B": "%B", "%b": "%b", "%A": "%A", "%a": "%a", "%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_timeline_controls_date_format_display %in% names(named_list)) { + if (is.logical(chart_timeline_controls_date_format_display)) { + chart_timeline_controls_date_format_display <- as.character(chart_timeline_controls_date_format_display) + } + named_list_value <- unname(named_list[chart_timeline_controls_date_format_display])[[1]] + new_list$x$state$timeline$date_format_display <- named_list_value + } + } + } + } + new_list$x$state$timeline$axis_nice_x <- chart_timeline_controls_axis_nice_x + new_list$x$state$timeline$axis_nice_y <- chart_timeline_controls_axis_nice_y + new_list$x$state$timeline$scrubber_snap <- chart_timeline_controls_scrubber_snap + new_list$x$state$timeline$scrubber_snap_paused <- chart_timeline_controls_scrubber_snap_paused + new_list$x$state$timeline$layout_settings <- chart_timeline_controls_layout_settings + new_list$x$state$timeline$margin$top <- chart_timeline_controls_margin_top + new_list$x$state$timeline$margin$left <- chart_timeline_controls_margin_left + new_list$x$state$timeline$margin$bottom <- chart_timeline_controls_margin_bottom + new_list$x$state$timeline$margin$right <- chart_timeline_controls_margin_right + new_list$x$state$timeline$playback_button$margin_right <- chart_timeline_controls_playback_button_margin_right + new_list$x$state$timeline$scrubber_height <- chart_timeline_controls_scrubber_height + new_list$x$state$timeline$playback_button$margin_right_button <- chart_timeline_controls_playback_button_margin_right_button + new_list$x$state$timeline$graph_settings <- chart_timeline_controls_graph_settings + new_list$x$state$timeline$color_background <- chart_timeline_controls_color_background + new_list$x$state$timeline$graph_height <- chart_timeline_controls_graph_height + new_list$x$state$timeline$curve <- chart_timeline_controls_curve + new_list$x$state$timeline$playback_styling <- chart_timeline_controls_playback_styling + new_list$x$state$timeline$playback_button$button_color <- chart_timeline_controls_playback_button_button_color + new_list$x$state$timeline$playback_button$button_size <- chart_timeline_controls_playback_button_button_size + new_list$x$state$timeline$playback_button$icon_color <- chart_timeline_controls_playback_button_icon_color + new_list$x$state$timeline$playback_button$icon_size <- chart_timeline_controls_playback_button_icon_size + new_list$x$state$timeline$playback_button$label_size <- chart_timeline_controls_playback_button_label_size + new_list$x$state$animation_duration <- animation_duration + new_list$x$state$formatting$prefix <- chart_number_date_format_prefix + new_list$x$state$formatting$suffix <- chart_number_date_format_suffix + new_list$x$state$formatting$n_dec <- chart_number_date_format_n_dec + new_list$x$state$formatting$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$formatting$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$formatting$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$formatting$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$formatting$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$formatting$transform <- named_list_value + } + } + } + } + new_list$x$state$formatting$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$formatting$exponentiate_constant <- chart_number_date_format_exponentiate_constant + list_blank_cells <- c("interpolate", "last_valid", "zero", "remove", NULL) + if (!is.null(blank_cells)) { + if (!blank_cells %in% list_blank_cells) { + stop("`blank_cells` must be one of: c('interpolate', 'last_valid', 'zero', 'remove')") + } else { + if (length(jsonlite::fromJSON('{"interpolate": "interpolate", "last_valid": "last_valid", "zero": "zero", "remove": "remove"}')) > 1) { + named_list <- jsonlite::fromJSON('{"interpolate": "interpolate", "last_valid": "last_valid", "zero": "zero", "remove": "remove"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && blank_cells %in% names(named_list)) { + if (is.logical(blank_cells)) { + blank_cells <- as.character(blank_cells) + } + named_list_value <- unname(named_list[blank_cells])[[1]] + new_list$x$state$blank_cells <- named_list_value + } + } + } + } + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_bubble_chart_details.R b/R_package/R/set_bubble_chart_details.R new file mode 100644 index 0000000..04a49b3 --- /dev/null +++ b/R_package/R/set_bubble_chart_details.R @@ -0,0 +1,3227 @@ +#' Set bubble chart chart details +#' @name set_bubble_chart_details +#' @param bubble_alignment Alignment of bubbles. Choices: center, axis. Flourish type hint: string, defaults to `NULL` +#' @param margin_bubbles Space between bubbles. Flourish type hint: number, defaults to `NULL` +#' @param animation_duration Animation duration. in seconds. Flourish type hint: number, defaults to `NULL` +#' @param height_mode Height mode. Choices: fill_space, aspect. Fill space: the graphic will fill the container (which by default will be the the standard Flourish responsive chart size) Aspect ratio: sets the aspect of the chart. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to `NULL` +#' @param aspect_ratio Aspect (desktop). Height of the plot as a proportion of its width, between 0 and 1. Flourish type hint: number, defaults to `NULL` +#' @param aspect_ratio_mobile Aspect (mobile). Height of the plot as a proportion of its width, between 0 and 1. Flourish type hint: number, defaults to `NULL` +#' @param aspect_ratio_breakpoint Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to `NULL` +#' @param circle_background_color Color. Default color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param circle_background_border Border. Flourish type hint: number, defaults to `NULL` +#' @param image_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param label_font_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param label_font_style Style. Choices: normal, italic. Flourish type hint: string, defaults to `NULL` +#' @param label_font_case Case. Choices:, uppercase. Flourish type hint: string, defaults to `NULL` +#' @param label_font_color Color. Defaults to contrast coloring when no image is set. Flourish type hint: color, defaults to `NULL` +#' @param label_shadow Text shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param enable_highlighting Enable highlighting. Flourish type hint: boolean, defaults to `NULL` +#' @param selected_bubbles Highlight bubbles. To highlight bubbles, write the name of each bubble on a new line. You can also create a story and highlight/unhighlight by clicking. Flourish type hint: text, defaults to `NULL` +#' @param opacity_highlighted Opacity of highlighted bubble. Flourish type hint: number, defaults to `NULL` +#' @param opacity_not_highlighted Opacity of all other bubbles. Flourish type hint: number, defaults to `NULL` +#' @param highlight_pictures Show pictures only on highlighted bubbles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param show_legend_axis Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param axis_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param axis_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_size_legend_show_legend Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_size_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_size_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_size_legend_shape_fill Shape fill. Flourish type hint: color, defaults to `NULL` +#' @param chart_size_legend_shape_stroke Shape stroke. Hint: set to same value as fill for no stroke. Flourish type hint: color, defaults to `NULL` +#' @param chart_size_legend_clip_height Max height. Maximum height of shape ( relative to root font size ). Flourish type hint: number, defaults to `NULL` +#' @param chart_size_legend_small_symbol_size Small/large proportion. Proportion of the smallest symbols value compared to the biggest symbols value. 0.5 means its half the value of the big symbol. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_localization_input_decimal_separator Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_output_separators Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "bubble", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_bubble_chart_data(gapminder) |> +#' set_bubble_chart_details() +#' ) +#' @export + +set_bubble_chart_details <- function( + ., + bubble_alignment = NULL, + margin_bubbles = NULL, + animation_duration = NULL, + height_mode = NULL, + aspect_ratio = NULL, + aspect_ratio_mobile = NULL, + aspect_ratio_breakpoint = NULL, + circle_background_color = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + circle_background_border = NULL, + image_opacity = NULL, + label_font_weight = NULL, + label_font_style = NULL, + label_font_case = NULL, + label_font_color = NULL, + label_shadow = NULL, + enable_highlighting = NULL, + selected_bubbles = NULL, + opacity_highlighted = NULL, + opacity_not_highlighted = NULL, + highlight_pictures = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + show_legend_axis = NULL, + axis_legend_title_mode = NULL, + axis_legend_title = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_size_legend_show_legend = NULL, + chart_size_legend_title_mode = NULL, + chart_size_legend_title = NULL, + chart_size_legend_shape_fill = NULL, + chart_size_legend_shape_stroke = NULL, + chart_size_legend_clip_height = NULL, + chart_size_legend_small_symbol_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "bubble_chart") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/bubble-chart")) { + stop("`set_bubble_chart_details()` is not supported for this chart type.") + } + list_bubble_alignment <- c("center", "axis", NULL) + if (!is.null(bubble_alignment)) { + if (!bubble_alignment %in% list_bubble_alignment) { + stop("`bubble_alignment` must be one of: c('center', 'axis')") + } else { + if (length(jsonlite::fromJSON('{"center": "center", "axis": "axis"}')) > 1) { + named_list <- jsonlite::fromJSON('{"center": "center", "axis": "axis"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && bubble_alignment %in% names(named_list)) { + if (is.logical(bubble_alignment)) { + bubble_alignment <- as.character(bubble_alignment) + } + named_list_value <- unname(named_list[bubble_alignment])[[1]] + new_list$x$state$bubble_alignment <- named_list_value + } + } + } + } + new_list$x$state$margin_bubbles <- margin_bubbles + new_list$x$state$animation_duration <- animation_duration + list_height_mode <- c("fill_space", "aspect", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('fill_space', 'aspect')") + } else { + if (length(jsonlite::fromJSON('{"fill_space": "fill_space", "aspect": "aspect"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fill_space": "fill_space", "aspect": "aspect"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + new_list$x$state$aspect_ratio <- aspect_ratio + new_list$x$state$aspect_ratio_mobile <- aspect_ratio_mobile + new_list$x$state$aspect_ratio_breakpoint <- aspect_ratio_breakpoint + new_list$x$state$circle_background_color <- circle_background_color + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$circle_background_border <- circle_background_border + new_list$x$state$image_opacity <- image_opacity + list_label_font_weight <- c("normal", "bold", NULL) + if (!is.null(label_font_weight)) { + if (!label_font_weight %in% list_label_font_weight) { + stop("`label_font_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_font_weight %in% names(named_list)) { + if (is.logical(label_font_weight)) { + label_font_weight <- as.character(label_font_weight) + } + named_list_value <- unname(named_list[label_font_weight])[[1]] + new_list$x$state$label_font_weight <- named_list_value + } + } + } + } + list_label_font_style <- c("normal", "italic", NULL) + if (!is.null(label_font_style)) { + if (!label_font_style %in% list_label_font_style) { + stop("`label_font_style` must be one of: c('normal', 'italic')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_font_style %in% names(named_list)) { + if (is.logical(label_font_style)) { + label_font_style <- as.character(label_font_style) + } + named_list_value <- unname(named_list[label_font_style])[[1]] + new_list$x$state$label_font_style <- named_list_value + } + } + } + } + list_label_font_case <- c("", "uppercase", NULL) + if (!is.null(label_font_case)) { + if (!label_font_case %in% list_label_font_case) { + stop("`label_font_case` must be one of: c('', 'uppercase')") + } else { + if (length(jsonlite::fromJSON('{"": "", "uppercase": "uppercase"}')) > 1) { + named_list <- jsonlite::fromJSON('{"": "", "uppercase": "uppercase"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_font_case %in% names(named_list)) { + if (is.logical(label_font_case)) { + label_font_case <- as.character(label_font_case) + } + named_list_value <- unname(named_list[label_font_case])[[1]] + new_list$x$state$label_font_case <- named_list_value + } + } + } + } + new_list$x$state$label_font_color <- label_font_color + new_list$x$state$label_shadow <- label_shadow + new_list$x$state$enable_highlighting <- enable_highlighting + if (length(selected_bubbles) > 1) { + new_list$x$state$selected_bubbles <- paste(selected_bubbles, collapse = "\n") + } else { + new_list$x$state$selected_bubbles <- selected_bubbles + } + + new_list$x$state$opacity_highlighted <- opacity_highlighted + new_list$x$state$opacity_not_highlighted <- opacity_not_highlighted + new_list$x$state$highlight_pictures <- highlight_pictures + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_show_legend_axis <- c(TRUE, FALSE, NULL) + if (!is.null(show_legend_axis)) { + if (!show_legend_axis %in% list_show_legend_axis) { + stop("`show_legend_axis` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && show_legend_axis %in% names(named_list)) { + if (is.logical(show_legend_axis)) { + show_legend_axis <- as.character(show_legend_axis) + } + named_list_value <- unname(named_list[show_legend_axis])[[1]] + new_list$x$state$show_legend_axis <- named_list_value + } + } + } + } + list_axis_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(axis_legend_title_mode)) { + if (!axis_legend_title_mode %in% list_axis_legend_title_mode) { + stop("`axis_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && axis_legend_title_mode %in% names(named_list)) { + if (is.logical(axis_legend_title_mode)) { + axis_legend_title_mode <- as.character(axis_legend_title_mode) + } + named_list_value <- unname(named_list[axis_legend_title_mode])[[1]] + new_list$x$state$axis_legend_title_mode <- named_list_value + } + } + } + } + new_list$x$state$axis_legend_title <- axis_legend_title + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_chart_size_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_size_legend_show_legend)) { + if (!chart_size_legend_show_legend %in% list_chart_size_legend_show_legend) { + stop("`chart_size_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_size_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_size_legend_show_legend)) { + chart_size_legend_show_legend <- as.character(chart_size_legend_show_legend) + } + named_list_value <- unname(named_list[chart_size_legend_show_legend])[[1]] + new_list$x$state$legend_size$show_legend <- named_list_value + } + } + } + } + list_chart_size_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_size_legend_title_mode)) { + if (!chart_size_legend_title_mode %in% list_chart_size_legend_title_mode) { + stop("`chart_size_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_size_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_size_legend_title_mode)) { + chart_size_legend_title_mode <- as.character(chart_size_legend_title_mode) + } + named_list_value <- unname(named_list[chart_size_legend_title_mode])[[1]] + new_list$x$state$legend_size$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_size$title <- chart_size_legend_title + new_list$x$state$legend_size$shape_fill <- chart_size_legend_shape_fill + new_list$x$state$legend_size$shape_stroke <- chart_size_legend_shape_stroke + new_list$x$state$legend_size$clip_height <- chart_size_legend_clip_height + new_list$x$state$legend_size$small_symbol_size <- chart_size_legend_small_symbol_size + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + list_chart_number_localization_input_decimal_separator <- c(".", ",", NULL) + if (!is.null(chart_number_localization_input_decimal_separator)) { + if (!chart_number_localization_input_decimal_separator %in% list_chart_number_localization_input_decimal_separator) { + stop("`chart_number_localization_input_decimal_separator` must be one of: c('.', ',')") + } else { + if (length(jsonlite::fromJSON('{".": ".", ",": ","}')) > 1) { + named_list <- jsonlite::fromJSON('{".": ".", ",": ","}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_input_decimal_separator %in% names(named_list)) { + if (is.logical(chart_number_localization_input_decimal_separator)) { + chart_number_localization_input_decimal_separator <- as.character(chart_number_localization_input_decimal_separator) + } + named_list_value <- unname(named_list[chart_number_localization_input_decimal_separator])[[1]] + new_list$x$state$localization$input_decimal_separator <- named_list_value + } + } + } + } + list_chart_number_localization_output_separators <- c(",.", ".,", ".", ",", " .", " ,", NULL) + if (!is.null(chart_number_localization_output_separators)) { + if (!chart_number_localization_output_separators %in% list_chart_number_localization_output_separators) { + stop("`chart_number_localization_output_separators` must be one of: c(',.', '.,', '.', ',', ' .', ' ,')") + } else { + if (length(jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}')) > 1) { + named_list <- jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_output_separators %in% names(named_list)) { + if (is.logical(chart_number_localization_output_separators)) { + chart_number_localization_output_separators <- as.character(chart_number_localization_output_separators) + } + named_list_value <- unname(named_list[chart_number_localization_output_separators])[[1]] + new_list$x$state$localization$output_separators <- named_list_value + } + } + } + } + new_list$x$state$size_by_format$prefix <- chart_number_date_format_prefix + new_list$x$state$size_by_format$suffix <- chart_number_date_format_suffix + new_list$x$state$size_by_format$n_dec <- chart_number_date_format_n_dec + new_list$x$state$size_by_format$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$size_by_format$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$size_by_format$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$size_by_format$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$size_by_format$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$size_by_format$transform <- named_list_value + } + } + } + } + new_list$x$state$size_by_format$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$size_by_format$exponentiate_constant <- chart_number_date_format_exponentiate_constant + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_calculator_details.R b/R_package/R/set_calculator_details.R new file mode 100644 index 0000000..6b5d2da --- /dev/null +++ b/R_package/R/set_calculator_details.R @@ -0,0 +1,3873 @@ +#' Set calculator chart details +#' @name set_calculator_details +#' @param question_flow Question flow. Choices: vertical, horizontal. Flourish type hint: string, defaults to `NULL` +#' @param design_border_type Border. Choices: border-bottom, border. Flourish type hint: string, defaults to `NULL` +#' @param design_border_color Border color. Flourish type hint: color, defaults to `NULL` +#' @param design_background Background. The background color of the cards. If not set, the background color in Layout is used. Flourish type hint: color, defaults to `NULL` +#' @param design_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param design_align_horizontal Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param design_align_vertical Position. Choices: start, center, flex-end. Set the vertical text position if the window height is fixed and the text doesnt stretch across the full vertical card space. Flourish type hint: string, defaults to `NULL` +#' @param design_max_width Max width (%). Flourish type hint: number, defaults to `NULL` +#' @param design_margin_vertical Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_padding_vertical Vertical padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_padding_horizontal Horizontal padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param design_border_style Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param design_border_radius Roundness. Flourish type hint: number, defaults to `NULL` +#' @param design_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param design_shadow_color Shadow color. Shadow color as an RGBA value (red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). Flourish type hint: string, defaults to `NULL` +#' @param result_variables Variables. Define variables to use in the Result field below. Set one variable per line in the format name = value Values can be: Numbers Text (single quotes for spaces) Question references like q_2 with the number representing the row number of each question in the Questions datasheet Previously defined variables (if wrapped into square brackets ) which will resolve to the answered value Excel functions, e.g., a = SUM(q_2, q_3) Flourish type hint: text, defaults to `NULL` +#' @param result_input Result. Here you can compose your result view You have access to all variables you created above as well as all "q_" variables by referencing them in double curly braces like for example: `{{ my_variable }}` or `{{ q_6 }}` Flourish type hint: html, defaults to `NULL` +#' @param result_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param result_font_size Text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param result_font_size_custom Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param result_font_color Color. Flourish type hint: color, defaults to `NULL` +#' @param result_font_weight Text weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param result_font_style Text style. Choices: normal, italic. Flourish type hint: string, defaults to `NULL` +#' @param result_border_type Border. Choices: border-bottom, border. Flourish type hint: string, defaults to `NULL` +#' @param result_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param result_border_style Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param result_border_color Border color. Flourish type hint: color, defaults to `NULL` +#' @param result_bg_type Background. Choices: color, image. Flourish type hint: string, defaults to `NULL` +#' @param result_bg_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param result_bg_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param result_bg_image_size Image size. Choices: auto, cover, contain. Flourish type hint: string, defaults to `NULL` +#' @param design_question_font_size Text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param design_question_font_size_custom Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param design_question_font_color Color. The text color used for your questions. If not set, the text color in Layout is used. Flourish type hint: color, defaults to `NULL` +#' @param design_question_font_weight Text weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param design_question_font_style Text style. Choices: normal, italic. Flourish type hint: string, defaults to `NULL` +#' @param design_question_margin_vertical Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_question_margin_horizontal Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_question_padding Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_context_font_size Text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param design_context_font_size_custom Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param design_context_font_color Color. The text color used for your question context. If not set, the text color in Layout is used. Flourish type hint: color, defaults to `NULL` +#' @param design_context_font_weight Text weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param design_context_font_style Text style. Choices: normal, italic. Flourish type hint: string, defaults to `NULL` +#' @param design_context_margin_vertical Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_context_margin_horizontal Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_question_bg_color Background color. The background color for your questions and context. To change the background color of the whole question card, go to the General design settings. Flourish type hint: color, defaults to `NULL` +#' @param design_question_bg_opacity Background opacity. The opacity of the question background color. Flourish type hint: number, defaults to `NULL` +#' @param design_question_border_radius Roundness. The roundness of the question background container. Flourish type hint: number, defaults to `NULL` +#' @param design_answer_margin_vertical Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_answer_margin_horizontal Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param input_color Color. Flourish type hint: color, defaults to `NULL` +#' @param input_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param input_width Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param number_input_placeholder Number input placeholder. Flourish type hint: string, defaults to `NULL` +#' @param text_input_placeholder Text input placeholder. Flourish type hint: string, defaults to `NULL` +#' @param input_input_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param input_border_color Border color. Flourish type hint: color, defaults to `NULL` +#' @param input_border_radius Roundness. Flourish type hint: number, defaults to `NULL` +#' @param input_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param input_border_style Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param input_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param input_margin Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param input_padding Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param button_font_size Text size. Choices: 1, 1.2, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param button_font_size_custom Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param button_border_style Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param button_container_width Button group width (%). The width of the button group as a percentage of the card width. Flourish type hint: number, defaults to `NULL` +#' @param button_justify_content Align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param button_margin Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param button_padding_factor Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param dropdown_font_size Text size. Choices: 1, 1.2, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param dropdown_font_size_custom Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param dropdown_placeholder Placeholder. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param dropdown_padding_factor Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param dropdown_border_style Border look. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param dropdown_font_weight Text weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param dropdown_font_style Text style. Choices: normal, italic. Flourish type hint: string, defaults to `NULL` +#' @param dropdown_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param dropdown_shadow_color Shadow color. Flourish type hint: string, defaults to `NULL` +#' @param date_format Format. Choices: y-m-d, d/m/_y, d/m/y, j/n/_y, j/n/y, d-m-_y, d-m-y, j-n-_y, j-n-y, d.m._y, d.m.y, j.n._y, j.n.y, m/d/_y, m/d/y, n/j/_y, n/j/y, m-d-_y, m-d-y, n-j-_y, n-j-y, m j, _y, f j, _y. Flourish type hint: string, defaults to `NULL` +#' @param date_input_placeholder Placeholder. Flourish type hint: string, defaults to `NULL` +#' @param date_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param date_width Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param date_margin Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param date_padding Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param date_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param date_border_style Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param date_border_color Border color. Flourish type hint: color, defaults to `NULL` +#' @param date_border_radius Roundness. Flourish type hint: number, defaults to `NULL` +#' @param date_align Text alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param date_calendar_position_vertical Calendar vertical position. Choices: auto, above, below. Flourish type hint: string, defaults to `NULL` +#' @param date_calendar_position_horizontal Calendar horizontal position. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param rating_icon_type Choices: star, circle, check. Flourish type hint: string, defaults to `NULL` +#' @param rating_icon_fill_base Base fill color. Flourish type hint: color, defaults to `NULL` +#' @param rating_icon_stroke_base Base stroke color. Flourish type hint: color, defaults to `NULL` +#' @param rating_icon_fill_active Active fill color. Flourish type hint: color, defaults to `NULL` +#' @param rating_icon_stroke_active Active stroke color. Flourish type hint: color, defaults to `NULL` +#' @param rating_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param rating_icon_width Width. Flourish type hint: number, defaults to `NULL` +#' @param rating_icon_height Height. Flourish type hint: number, defaults to `NULL` +#' @param rating_icon_margin Vertical margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param rating_icon_stroke_width Stroke width (px). Flourish type hint: number, defaults to `NULL` +#' @param rating_container_width Rating group width (%). The width of the rating group as a percentage of the card width. Flourish type hint: number, defaults to `NULL` +#' @param rating_wrap_margin_vertical Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param rating_wrap_margin_horizontal Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param rating_wrap_padding_vertical Vertical padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param rating_wrap_padding_horizontal Horizontal padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param rating_label_width Width. Flourish type hint: number, defaults to `NULL` +#' @param rating_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param rating_label_position Position. Choices: above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_slider_filter_controls_handle_color Handle color. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_filter_controls_track_active_color Track active color. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_filter_controls_track_base_color Track background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_filter_controls_handle_size Handle size. percentage of track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_ticks Range ticks. Display the minimum and the maximum of the range at the left and right. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_slider_filter_controls_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_slider_filter_controls_container_width Track width (%). The width of the track as a percentage of the card width. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_wrap_margin_vertical Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_wrap_margin_horizontal Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_track_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_track_border_radius Roundness. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_track_border_color Border color. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_filter_controls_track_border_width Border width. The width of the border around the card, in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_handle_shape Shape. Choices: rectangle, circle. Flourish type hint: string, defaults to `NULL` +#' @param chart_slider_filter_controls_handle_width Width. % of Size (the handle height). Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_handle_border_color Stroke color. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_filter_controls_handle_border_width Stroke width. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_handle_border_radius Roundness. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_handle_box_shadow Box shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_slider_filter_controls_tooltips Tooltip. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_slider_filter_controls_tooltip_background Tooltip background. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_slider_filter_controls_tick_color Tick color. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_filter_controls_tick_padding Tick padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_tick_number_padding Number padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param submit_comment_text Submit label. Flourish type hint: text, defaults to `NULL` +#' @param submit_button_text Submit button text. Flourish type hint: string, defaults to `NULL` +#' @param submit_bg_type Background. Choices: color, image. Flourish type hint: string, defaults to `NULL` +#' @param submit_bg_color Color. Flourish type hint: color, defaults to `NULL` +#' @param submit_bg_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param submit_border Border. Flourish type hint: boolean, defaults to `NULL` +#' @param submit_bg_image_size Image size. Choices: auto, cover, contain. Flourish type hint: string, defaults to `NULL` +#' @param submit_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param submit_comment_font_size Label size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param submit_comment_font_size_custom Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param submit_comment_font_weight Text weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param submit_comment_font_style Text style. Choices: normal, italic. Flourish type hint: string, defaults to `NULL` +#' @param submit_flex_direction Label position. Choices: column, column-reverse. Flourish type hint: string, defaults to `NULL` +#' @param submit_comment_font_color Label color. Flourish type hint: color, defaults to `NULL` +#' @param submit_comment_margin Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param submit_button_font_size Button text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param submit_button_font_size_custom Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param submit_button_font_weight Button text weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param submit_button_font_style Text style. Choices: normal, italic. Flourish type hint: string, defaults to `NULL` +#' @param submit_button_margin Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param submit_button_padding_factor Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param submit_button_box_shadow Hover shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param submit_button_use_default_styles Use answer button styles. Flourish type hint: boolean, defaults to `NULL` +#' @param submit_button_bg_color Background. Flourish type hint: color, defaults to `NULL` +#' @param submit_button_bg_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param submit_button_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param submit_button_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param submit_button_border_style Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param submit_button_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param submit_button_border_width Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param submit_button_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param submit_button_border_radius Roundness. Flourish type hint: number, defaults to `NULL` +#' @param design_controls_position Position. Choices: top_left, top_centre, top_right, bottom_left, bottom_centre, bottom_right. Flourish type hint: string, defaults to `NULL` +#' @param design_controls_button_symbol_back Back button. Flourish type hint: string, defaults to `NULL` +#' @param design_controls_button_symbol_forward Forward button. Flourish type hint: string, defaults to `NULL` +#' @param design_controls_button_font_color Color. Flourish type hint: color, defaults to `NULL` +#' @param design_controls_button_font_size Size. Flourish type hint: number, defaults to `NULL` +#' @param design_controls_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param design_controls_button_margin Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_controls_button_padding_factor Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_controls_button_bg_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param design_controls_button_bg_opacity Background opacity. Flourish type hint: number, defaults to `NULL` +#' @param design_controls_button_font_weight Text weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param design_controls_button_font_style Text style. Choices: normal, italic. Flourish type hint: string, defaults to `NULL` +#' @param design_controls_button_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param design_controls_button_border_style Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param design_controls_button_border_color Border color. Flourish type hint: color, defaults to `NULL` +#' @param design_controls_button_border_radius Roundness. Flourish type hint: number, defaults to `NULL` +#' @param design_progress_show Show progress bar. Flourish type hint: boolean, defaults to `NULL` +#' @param design_progress_position Position. Choices: top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param design_progress_height Height. Flourish type hint: number, defaults to `NULL` +#' @param design_progress_margin Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param design_progress_bg_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param design_progress_bg_opacity Background opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_localization_input_decimal_separator Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_output_separators Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to `NULL` +#' @param external_write_enabled Store result data externally. Flourish type hint: boolean, defaults to `NULL` +#' @param external_write_endpoint Storage endpoint. Your external database, store, API or web app endpoint to post data to. If you were to use Google Sheets to store your data, please check the External write docs for integration help. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "calculator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_calculator_data(gapminder) |> +#' set_calculator_details() +#' ) +#' @export + +set_calculator_details <- function( + ., + question_flow = NULL, + design_border_type = NULL, + design_border_color = NULL, + design_background = NULL, + design_advanced = NULL, + design_align_horizontal = NULL, + design_align_vertical = NULL, + design_max_width = NULL, + design_margin_vertical = NULL, + design_padding_vertical = NULL, + design_padding_horizontal = NULL, + design_border_width = NULL, + design_border_style = NULL, + design_border_radius = NULL, + design_shadow = NULL, + design_shadow_color = NULL, + result_variables = NULL, + result_input = NULL, + result_advanced = NULL, + result_font_size = NULL, + result_font_size_custom = NULL, + result_font_color = NULL, + result_font_weight = NULL, + result_font_style = NULL, + result_border_type = NULL, + result_border_width = NULL, + result_border_style = NULL, + result_border_color = NULL, + result_bg_type = NULL, + result_bg_color = NULL, + result_bg_image_src = NULL, + result_bg_image_size = NULL, + design_question_font_size = NULL, + design_question_font_size_custom = NULL, + design_question_font_color = NULL, + design_question_font_weight = NULL, + design_question_font_style = NULL, + design_question_margin_vertical = NULL, + design_question_margin_horizontal = NULL, + design_question_padding = NULL, + design_context_font_size = NULL, + design_context_font_size_custom = NULL, + design_context_font_color = NULL, + design_context_font_weight = NULL, + design_context_font_style = NULL, + design_context_margin_vertical = NULL, + design_context_margin_horizontal = NULL, + design_question_bg_color = NULL, + design_question_bg_opacity = NULL, + design_question_border_radius = NULL, + design_answer_margin_vertical = NULL, + design_answer_margin_horizontal = NULL, + input_color = NULL, + input_background_color = NULL, + input_width = NULL, + number_input_placeholder = NULL, + text_input_placeholder = NULL, + input_input_advanced = NULL, + input_border_color = NULL, + input_border_radius = NULL, + input_border_width = NULL, + input_border_style = NULL, + input_align = NULL, + input_margin = NULL, + input_padding = NULL, + button_font_size = NULL, + button_font_size_custom = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + button_border_style = NULL, + button_container_width = NULL, + button_justify_content = NULL, + button_margin = NULL, + button_padding_factor = NULL, + dropdown_font_size = NULL, + dropdown_font_size_custom = NULL, + dropdown_placeholder = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + dropdown_padding_factor = NULL, + dropdown_border_style = NULL, + dropdown_font_weight = NULL, + dropdown_font_style = NULL, + dropdown_shadow = NULL, + dropdown_shadow_color = NULL, + date_format = NULL, + date_input_placeholder = NULL, + date_advanced = NULL, + date_width = NULL, + date_margin = NULL, + date_padding = NULL, + date_border_width = NULL, + date_border_style = NULL, + date_border_color = NULL, + date_border_radius = NULL, + date_align = NULL, + date_calendar_position_vertical = NULL, + date_calendar_position_horizontal = NULL, + rating_icon_type = NULL, + rating_icon_fill_base = NULL, + rating_icon_stroke_base = NULL, + rating_icon_fill_active = NULL, + rating_icon_stroke_active = NULL, + rating_advanced = NULL, + rating_icon_width = NULL, + rating_icon_height = NULL, + rating_icon_margin = NULL, + rating_icon_stroke_width = NULL, + rating_container_width = NULL, + rating_wrap_margin_vertical = NULL, + rating_wrap_margin_horizontal = NULL, + rating_wrap_padding_vertical = NULL, + rating_wrap_padding_horizontal = NULL, + rating_label_width = NULL, + rating_label_color = NULL, + rating_label_position = NULL, + chart_slider_filter_controls_handle_color = NULL, + chart_slider_filter_controls_track_active_color = NULL, + chart_slider_filter_controls_track_base_color = NULL, + chart_slider_filter_controls_handle_size = NULL, + chart_slider_filter_controls_ticks = NULL, + chart_slider_filter_controls_advanced = NULL, + chart_slider_filter_controls_container_width = NULL, + chart_slider_filter_controls_wrap_margin_vertical = NULL, + chart_slider_filter_controls_wrap_margin_horizontal = NULL, + chart_slider_filter_controls_track_height = NULL, + chart_slider_filter_controls_track_border_radius = NULL, + chart_slider_filter_controls_track_border_color = NULL, + chart_slider_filter_controls_track_border_width = NULL, + chart_slider_filter_controls_handle_shape = NULL, + chart_slider_filter_controls_handle_width = NULL, + chart_slider_filter_controls_handle_border_color = NULL, + chart_slider_filter_controls_handle_border_width = NULL, + chart_slider_filter_controls_handle_border_radius = NULL, + chart_slider_filter_controls_handle_box_shadow = NULL, + chart_slider_filter_controls_tooltips = NULL, + chart_slider_filter_controls_tooltip_background = NULL, + chart_slider_filter_controls_tick_color = NULL, + chart_slider_filter_controls_tick_padding = NULL, + chart_slider_filter_controls_tick_number_padding = NULL, + submit_comment_text = NULL, + submit_button_text = NULL, + submit_bg_type = NULL, + submit_bg_color = NULL, + submit_bg_image_src = NULL, + submit_border = NULL, + submit_bg_image_size = NULL, + submit_advanced = NULL, + submit_comment_font_size = NULL, + submit_comment_font_size_custom = NULL, + submit_comment_font_weight = NULL, + submit_comment_font_style = NULL, + submit_flex_direction = NULL, + submit_comment_font_color = NULL, + submit_comment_margin = NULL, + submit_button_font_size = NULL, + submit_button_font_size_custom = NULL, + submit_button_font_weight = NULL, + submit_button_font_style = NULL, + submit_button_margin = NULL, + submit_button_padding_factor = NULL, + submit_button_box_shadow = NULL, + submit_button_use_default_styles = NULL, + submit_button_bg_color = NULL, + submit_button_bg_color_hover = NULL, + submit_button_font_color = NULL, + submit_button_font_color_hover = NULL, + submit_button_border_style = NULL, + submit_button_border_color = NULL, + submit_button_border_width = NULL, + submit_button_border_transparency = NULL, + submit_button_border_radius = NULL, + design_controls_position = NULL, + design_controls_button_symbol_back = NULL, + design_controls_button_symbol_forward = NULL, + design_controls_button_font_color = NULL, + design_controls_button_font_size = NULL, + design_controls_advanced = NULL, + design_controls_button_margin = NULL, + design_controls_button_padding_factor = NULL, + design_controls_button_bg_color = NULL, + design_controls_button_bg_opacity = NULL, + design_controls_button_font_weight = NULL, + design_controls_button_font_style = NULL, + design_controls_button_border_width = NULL, + design_controls_button_border_style = NULL, + design_controls_button_border_color = NULL, + design_controls_button_border_radius = NULL, + design_progress_show = NULL, + design_progress_position = NULL, + design_progress_height = NULL, + design_progress_margin = NULL, + design_progress_bg_color = NULL, + design_progress_bg_opacity = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + external_write_enabled = NULL, + external_write_endpoint = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "calculator") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/calculator")) { + stop("`set_calculator_details()` is not supported for this chart type.") + } + list_question_flow <- c("vertical", "horizontal", NULL) + if (!is.null(question_flow)) { + if (!question_flow %in% list_question_flow) { + stop("`question_flow` must be one of: c('vertical', 'horizontal')") + } else { + if (length(jsonlite::fromJSON('{"vertical": "vertical", "horizontal": "horizontal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"vertical": "vertical", "horizontal": "horizontal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && question_flow %in% names(named_list)) { + if (is.logical(question_flow)) { + question_flow <- as.character(question_flow) + } + named_list_value <- unname(named_list[question_flow])[[1]] + new_list$x$state$question_flow <- named_list_value + } + } + } + } + list_design_border_type <- c("border-bottom", "border", NULL) + if (!is.null(design_border_type)) { + if (!design_border_type %in% list_design_border_type) { + stop("`design_border_type` must be one of: c('border-bottom', 'border')") + } else { + if (length(jsonlite::fromJSON('{"border-bottom": "border-bottom", "border": "border"}')) > 1) { + named_list <- jsonlite::fromJSON('{"border-bottom": "border-bottom", "border": "border"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_border_type %in% names(named_list)) { + if (is.logical(design_border_type)) { + design_border_type <- as.character(design_border_type) + } + named_list_value <- unname(named_list[design_border_type])[[1]] + new_list$x$state$design$border_type <- named_list_value + } + } + } + } + new_list$x$state$design$border_color <- design_border_color + new_list$x$state$design$background <- design_background + new_list$x$state$design$advanced <- design_advanced + list_design_align_horizontal <- c("start", "center", "end", NULL) + if (!is.null(design_align_horizontal)) { + if (!design_align_horizontal %in% list_design_align_horizontal) { + stop("`design_align_horizontal` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_align_horizontal %in% names(named_list)) { + if (is.logical(design_align_horizontal)) { + design_align_horizontal <- as.character(design_align_horizontal) + } + named_list_value <- unname(named_list[design_align_horizontal])[[1]] + new_list$x$state$design$align_horizontal <- named_list_value + } + } + } + } + list_design_align_vertical <- c("start", "center", "flex-end", NULL) + if (!is.null(design_align_vertical)) { + if (!design_align_vertical %in% list_design_align_vertical) { + stop("`design_align_vertical` must be one of: c('start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_align_vertical %in% names(named_list)) { + if (is.logical(design_align_vertical)) { + design_align_vertical <- as.character(design_align_vertical) + } + named_list_value <- unname(named_list[design_align_vertical])[[1]] + new_list$x$state$design$align_vertical <- named_list_value + } + } + } + } + new_list$x$state$design$max_width <- design_max_width + new_list$x$state$design$margin_vertical <- design_margin_vertical + new_list$x$state$design$padding_vertical <- design_padding_vertical + new_list$x$state$design$padding_horizontal <- design_padding_horizontal + new_list$x$state$design$border_width <- design_border_width + list_design_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(design_border_style)) { + if (!design_border_style %in% list_design_border_style) { + stop("`design_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_border_style %in% names(named_list)) { + if (is.logical(design_border_style)) { + design_border_style <- as.character(design_border_style) + } + named_list_value <- unname(named_list[design_border_style])[[1]] + new_list$x$state$design$border_style <- named_list_value + } + } + } + } + new_list$x$state$design$border_radius <- design_border_radius + new_list$x$state$design$shadow <- design_shadow + new_list$x$state$design$shadow_color <- design_shadow_color + if (length(result_variables) > 1) { + new_list$x$state$result$variables <- paste(result_variables, collapse = "\n") + } else { + new_list$x$state$result$variables <- result_variables + } + + if (length(result_input) > 1) { + new_list$x$state$result$input <- paste(result_input, collapse = "\n") + } else { + new_list$x$state$result$input <- result_input + } + + new_list$x$state$result$advanced <- result_advanced + list_result_font_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(result_font_size)) { + if (!result_font_size %in% list_result_font_size) { + stop("`result_font_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && result_font_size %in% names(named_list)) { + if (is.logical(result_font_size)) { + result_font_size <- as.character(result_font_size) + } + named_list_value <- unname(named_list[result_font_size])[[1]] + new_list$x$state$result$font_size <- named_list_value + } + } + } + } + new_list$x$state$result$font_size_custom <- result_font_size_custom + new_list$x$state$result$font_color <- result_font_color + list_result_font_weight <- c("normal", "bold", NULL) + if (!is.null(result_font_weight)) { + if (!result_font_weight %in% list_result_font_weight) { + stop("`result_font_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && result_font_weight %in% names(named_list)) { + if (is.logical(result_font_weight)) { + result_font_weight <- as.character(result_font_weight) + } + named_list_value <- unname(named_list[result_font_weight])[[1]] + new_list$x$state$result$font_weight <- named_list_value + } + } + } + } + list_result_font_style <- c("normal", "italic", NULL) + if (!is.null(result_font_style)) { + if (!result_font_style %in% list_result_font_style) { + stop("`result_font_style` must be one of: c('normal', 'italic')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && result_font_style %in% names(named_list)) { + if (is.logical(result_font_style)) { + result_font_style <- as.character(result_font_style) + } + named_list_value <- unname(named_list[result_font_style])[[1]] + new_list$x$state$result$font_style <- named_list_value + } + } + } + } + list_result_border_type <- c("border-bottom", "border", NULL) + if (!is.null(result_border_type)) { + if (!result_border_type %in% list_result_border_type) { + stop("`result_border_type` must be one of: c('border-bottom', 'border')") + } else { + if (length(jsonlite::fromJSON('{"border-bottom": "border-bottom", "border": "border"}')) > 1) { + named_list <- jsonlite::fromJSON('{"border-bottom": "border-bottom", "border": "border"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && result_border_type %in% names(named_list)) { + if (is.logical(result_border_type)) { + result_border_type <- as.character(result_border_type) + } + named_list_value <- unname(named_list[result_border_type])[[1]] + new_list$x$state$result$border_type <- named_list_value + } + } + } + } + new_list$x$state$result$border_width <- result_border_width + list_result_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(result_border_style)) { + if (!result_border_style %in% list_result_border_style) { + stop("`result_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && result_border_style %in% names(named_list)) { + if (is.logical(result_border_style)) { + result_border_style <- as.character(result_border_style) + } + named_list_value <- unname(named_list[result_border_style])[[1]] + new_list$x$state$result$border_style <- named_list_value + } + } + } + } + new_list$x$state$result$border_color <- result_border_color + list_result_bg_type <- c("color", "image", NULL) + if (!is.null(result_bg_type)) { + if (!result_bg_type %in% list_result_bg_type) { + stop("`result_bg_type` must be one of: c('color', 'image')") + } else { + if (length(jsonlite::fromJSON('{"color": "color", "image": "image"}')) > 1) { + named_list <- jsonlite::fromJSON('{"color": "color", "image": "image"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && result_bg_type %in% names(named_list)) { + if (is.logical(result_bg_type)) { + result_bg_type <- as.character(result_bg_type) + } + named_list_value <- unname(named_list[result_bg_type])[[1]] + new_list$x$state$result$bg_type <- named_list_value + } + } + } + } + new_list$x$state$result$bg_color <- result_bg_color + new_list$x$state$result$bg_image_src <- result_bg_image_src + list_result_bg_image_size <- c("auto", "cover", "contain", NULL) + if (!is.null(result_bg_image_size)) { + if (!result_bg_image_size %in% list_result_bg_image_size) { + stop("`result_bg_image_size` must be one of: c('auto', 'cover', 'contain')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "cover": "cover", "contain": "contain"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "cover": "cover", "contain": "contain"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && result_bg_image_size %in% names(named_list)) { + if (is.logical(result_bg_image_size)) { + result_bg_image_size <- as.character(result_bg_image_size) + } + named_list_value <- unname(named_list[result_bg_image_size])[[1]] + new_list$x$state$result$bg_image_size <- named_list_value + } + } + } + } + list_design_question_font_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(design_question_font_size)) { + if (!design_question_font_size %in% list_design_question_font_size) { + stop("`design_question_font_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_question_font_size %in% names(named_list)) { + if (is.logical(design_question_font_size)) { + design_question_font_size <- as.character(design_question_font_size) + } + named_list_value <- unname(named_list[design_question_font_size])[[1]] + new_list$x$state$design$question$font_size <- named_list_value + } + } + } + } + new_list$x$state$design$question$font_size_custom <- design_question_font_size_custom + new_list$x$state$design$question$font_color <- design_question_font_color + list_design_question_font_weight <- c("normal", "bold", NULL) + if (!is.null(design_question_font_weight)) { + if (!design_question_font_weight %in% list_design_question_font_weight) { + stop("`design_question_font_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_question_font_weight %in% names(named_list)) { + if (is.logical(design_question_font_weight)) { + design_question_font_weight <- as.character(design_question_font_weight) + } + named_list_value <- unname(named_list[design_question_font_weight])[[1]] + new_list$x$state$design$question$font_weight <- named_list_value + } + } + } + } + list_design_question_font_style <- c("normal", "italic", NULL) + if (!is.null(design_question_font_style)) { + if (!design_question_font_style %in% list_design_question_font_style) { + stop("`design_question_font_style` must be one of: c('normal', 'italic')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_question_font_style %in% names(named_list)) { + if (is.logical(design_question_font_style)) { + design_question_font_style <- as.character(design_question_font_style) + } + named_list_value <- unname(named_list[design_question_font_style])[[1]] + new_list$x$state$design$question$font_style <- named_list_value + } + } + } + } + new_list$x$state$design$question$margin_vertical <- design_question_margin_vertical + new_list$x$state$design$question$margin_horizontal <- design_question_margin_horizontal + new_list$x$state$design$question$padding <- design_question_padding + list_design_context_font_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(design_context_font_size)) { + if (!design_context_font_size %in% list_design_context_font_size) { + stop("`design_context_font_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_context_font_size %in% names(named_list)) { + if (is.logical(design_context_font_size)) { + design_context_font_size <- as.character(design_context_font_size) + } + named_list_value <- unname(named_list[design_context_font_size])[[1]] + new_list$x$state$design$context$font_size <- named_list_value + } + } + } + } + new_list$x$state$design$context$font_size_custom <- design_context_font_size_custom + new_list$x$state$design$context$font_color <- design_context_font_color + list_design_context_font_weight <- c("normal", "bold", NULL) + if (!is.null(design_context_font_weight)) { + if (!design_context_font_weight %in% list_design_context_font_weight) { + stop("`design_context_font_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_context_font_weight %in% names(named_list)) { + if (is.logical(design_context_font_weight)) { + design_context_font_weight <- as.character(design_context_font_weight) + } + named_list_value <- unname(named_list[design_context_font_weight])[[1]] + new_list$x$state$design$context$font_weight <- named_list_value + } + } + } + } + list_design_context_font_style <- c("normal", "italic", NULL) + if (!is.null(design_context_font_style)) { + if (!design_context_font_style %in% list_design_context_font_style) { + stop("`design_context_font_style` must be one of: c('normal', 'italic')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_context_font_style %in% names(named_list)) { + if (is.logical(design_context_font_style)) { + design_context_font_style <- as.character(design_context_font_style) + } + named_list_value <- unname(named_list[design_context_font_style])[[1]] + new_list$x$state$design$context$font_style <- named_list_value + } + } + } + } + new_list$x$state$design$context$margin_vertical <- design_context_margin_vertical + new_list$x$state$design$context$margin_horizontal <- design_context_margin_horizontal + new_list$x$state$design$question$bg_color <- design_question_bg_color + new_list$x$state$design$question$bg_opacity <- design_question_bg_opacity + new_list$x$state$design$question$border_radius <- design_question_border_radius + new_list$x$state$design$answer$margin_vertical <- design_answer_margin_vertical + new_list$x$state$design$answer$margin_horizontal <- design_answer_margin_horizontal + new_list$x$state$input$color <- input_color + new_list$x$state$input$background_color <- input_background_color + new_list$x$state$input$width <- input_width + new_list$x$state$number$input_placeholder <- number_input_placeholder + new_list$x$state$text$input_placeholder <- text_input_placeholder + new_list$x$state$input$input_advanced <- input_input_advanced + new_list$x$state$input$border_color <- input_border_color + new_list$x$state$input$border_radius <- input_border_radius + new_list$x$state$input$border_width <- input_border_width + list_input_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(input_border_style)) { + if (!input_border_style %in% list_input_border_style) { + stop("`input_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && input_border_style %in% names(named_list)) { + if (is.logical(input_border_style)) { + input_border_style <- as.character(input_border_style) + } + named_list_value <- unname(named_list[input_border_style])[[1]] + new_list$x$state$input$border_style <- named_list_value + } + } + } + } + list_input_align <- c("start", "center", "end", NULL) + if (!is.null(input_align)) { + if (!input_align %in% list_input_align) { + stop("`input_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && input_align %in% names(named_list)) { + if (is.logical(input_align)) { + input_align <- as.character(input_align) + } + named_list_value <- unname(named_list[input_align])[[1]] + new_list$x$state$input$align <- named_list_value + } + } + } + } + new_list$x$state$input$margin <- input_margin + new_list$x$state$input$padding <- input_padding + list_button_font_size <- c("1", "1.2", "1.6", "custom", NULL) + if (!is.null(button_font_size)) { + if (!button_font_size %in% list_button_font_size) { + stop("`button_font_size` must be one of: c('1', '1.2', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1": "1", "1.2": "1.2", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1": "1", "1.2": "1.2", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && button_font_size %in% names(named_list)) { + if (is.logical(button_font_size)) { + button_font_size <- as.character(button_font_size) + } + named_list_value <- unname(named_list[button_font_size])[[1]] + new_list$x$state$button$font_size <- named_list_value + } + } + } + } + new_list$x$state$button$font_size_custom <- button_font_size_custom + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + list_button_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(button_border_style)) { + if (!button_border_style %in% list_button_border_style) { + stop("`button_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && button_border_style %in% names(named_list)) { + if (is.logical(button_border_style)) { + button_border_style <- as.character(button_border_style) + } + named_list_value <- unname(named_list[button_border_style])[[1]] + new_list$x$state$button$border_style <- named_list_value + } + } + } + } + new_list$x$state$button$container_width <- button_container_width + list_button_justify_content <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(button_justify_content)) { + if (!button_justify_content %in% list_button_justify_content) { + stop("`button_justify_content` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && button_justify_content %in% names(named_list)) { + if (is.logical(button_justify_content)) { + button_justify_content <- as.character(button_justify_content) + } + named_list_value <- unname(named_list[button_justify_content])[[1]] + new_list$x$state$button$justify_content <- named_list_value + } + } + } + } + new_list$x$state$button$margin <- button_margin + new_list$x$state$button$padding_factor <- button_padding_factor + list_dropdown_font_size <- c("1", "1.2", "1.6", "custom", NULL) + if (!is.null(dropdown_font_size)) { + if (!dropdown_font_size %in% list_dropdown_font_size) { + stop("`dropdown_font_size` must be one of: c('1', '1.2', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1": "1", "1.2": "1.2", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1": "1", "1.2": "1.2", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && dropdown_font_size %in% names(named_list)) { + if (is.logical(dropdown_font_size)) { + dropdown_font_size <- as.character(dropdown_font_size) + } + named_list_value <- unname(named_list[dropdown_font_size])[[1]] + new_list$x$state$dropdown$font_size <- named_list_value + } + } + } + } + new_list$x$state$dropdown$font_size_custom <- dropdown_font_size_custom + new_list$x$state$dropdown$placeholder <- dropdown_placeholder + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$dropdown$padding_factor <- dropdown_padding_factor + list_dropdown_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(dropdown_border_style)) { + if (!dropdown_border_style %in% list_dropdown_border_style) { + stop("`dropdown_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && dropdown_border_style %in% names(named_list)) { + if (is.logical(dropdown_border_style)) { + dropdown_border_style <- as.character(dropdown_border_style) + } + named_list_value <- unname(named_list[dropdown_border_style])[[1]] + new_list$x$state$dropdown$border_style <- named_list_value + } + } + } + } + list_dropdown_font_weight <- c("normal", "bold", NULL) + if (!is.null(dropdown_font_weight)) { + if (!dropdown_font_weight %in% list_dropdown_font_weight) { + stop("`dropdown_font_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && dropdown_font_weight %in% names(named_list)) { + if (is.logical(dropdown_font_weight)) { + dropdown_font_weight <- as.character(dropdown_font_weight) + } + named_list_value <- unname(named_list[dropdown_font_weight])[[1]] + new_list$x$state$dropdown$font_weight <- named_list_value + } + } + } + } + list_dropdown_font_style <- c("normal", "italic", NULL) + if (!is.null(dropdown_font_style)) { + if (!dropdown_font_style %in% list_dropdown_font_style) { + stop("`dropdown_font_style` must be one of: c('normal', 'italic')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && dropdown_font_style %in% names(named_list)) { + if (is.logical(dropdown_font_style)) { + dropdown_font_style <- as.character(dropdown_font_style) + } + named_list_value <- unname(named_list[dropdown_font_style])[[1]] + new_list$x$state$dropdown$font_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown$shadow <- dropdown_shadow + new_list$x$state$dropdown$shadow_color <- dropdown_shadow_color + list_date_format <- c("y-m-d", "d/m/_y", "d/m/y", "j/n/_y", "j/n/y", "d-m-_y", "d-m-y", "j-n-_y", "j-n-y", "d.m._y", "d.m.y", "j.n._y", "j.n.y", "m/d/_y", "m/d/y", "n/j/_y", "n/j/y", "m-d-_y", "m-d-y", "n-j-_y", "n-j-y", "m j, _y", "f j, _y", NULL) + if (!is.null(date_format)) { + if (!date_format %in% list_date_format) { + stop("`date_format` must be one of: c('y-m-d', 'd/m/_y', 'd/m/y', 'j/n/_y', 'j/n/y', 'd-m-_y', 'd-m-y', 'j-n-_y', 'j-n-y', 'd.m._y', 'd.m.y', 'j.n._y', 'j.n.y', 'm/d/_y', 'm/d/y', 'n/j/_y', 'n/j/y', 'm-d-_y', 'm-d-y', 'n-j-_y', 'n-j-y', 'm j, _y', 'f j, _y')") + } else { + if (length(jsonlite::fromJSON('{"y-m-d": "Y-m-d", "d/m/_y": "d/m/Y", "d/m/y": "d/m/y", "j/n/_y": "j/n/Y", "j/n/y": "j/n/y", "d-m-_y": "d-m-Y", "d-m-y": "d-m-y", "j-n-_y": "j-n-Y", "j-n-y": "j-n-y", "d.m._y": "d.m.Y", "d.m.y": "d.m.y", "j.n._y": "j.n.Y", "j.n.y": "j.n.y", "m/d/_y": "m/d/Y", "m/d/y": "m/d/y", "n/j/_y": "n/j/Y", "n/j/y": "n/j/y", "m-d-_y": "m-d-Y", "m-d-y": "m-d-y", "n-j-_y": "n-j-Y", "n-j-y": "n-j-y", "m j, _y": "M j, Y", "f j, _y": "F j, Y"}')) > 1) { + named_list <- jsonlite::fromJSON('{"y-m-d": "Y-m-d", "d/m/_y": "d/m/Y", "d/m/y": "d/m/y", "j/n/_y": "j/n/Y", "j/n/y": "j/n/y", "d-m-_y": "d-m-Y", "d-m-y": "d-m-y", "j-n-_y": "j-n-Y", "j-n-y": "j-n-y", "d.m._y": "d.m.Y", "d.m.y": "d.m.y", "j.n._y": "j.n.Y", "j.n.y": "j.n.y", "m/d/_y": "m/d/Y", "m/d/y": "m/d/y", "n/j/_y": "n/j/Y", "n/j/y": "n/j/y", "m-d-_y": "m-d-Y", "m-d-y": "m-d-y", "n-j-_y": "n-j-Y", "n-j-y": "n-j-y", "m j, _y": "M j, Y", "f j, _y": "F j, Y"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && date_format %in% names(named_list)) { + if (is.logical(date_format)) { + date_format <- as.character(date_format) + } + named_list_value <- unname(named_list[date_format])[[1]] + new_list$x$state$date$format <- named_list_value + } + } + } + } + new_list$x$state$date$input_placeholder <- date_input_placeholder + new_list$x$state$date$advanced <- date_advanced + new_list$x$state$date$width <- date_width + new_list$x$state$date$margin <- date_margin + new_list$x$state$date$padding <- date_padding + new_list$x$state$date$border_width <- date_border_width + list_date_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(date_border_style)) { + if (!date_border_style %in% list_date_border_style) { + stop("`date_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && date_border_style %in% names(named_list)) { + if (is.logical(date_border_style)) { + date_border_style <- as.character(date_border_style) + } + named_list_value <- unname(named_list[date_border_style])[[1]] + new_list$x$state$date$border_style <- named_list_value + } + } + } + } + new_list$x$state$date$border_color <- date_border_color + new_list$x$state$date$border_radius <- date_border_radius + list_date_align <- c("start", "center", "end", NULL) + if (!is.null(date_align)) { + if (!date_align %in% list_date_align) { + stop("`date_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && date_align %in% names(named_list)) { + if (is.logical(date_align)) { + date_align <- as.character(date_align) + } + named_list_value <- unname(named_list[date_align])[[1]] + new_list$x$state$date$align <- named_list_value + } + } + } + } + list_date_calendar_position_vertical <- c("auto", "above", "below", NULL) + if (!is.null(date_calendar_position_vertical)) { + if (!date_calendar_position_vertical %in% list_date_calendar_position_vertical) { + stop("`date_calendar_position_vertical` must be one of: c('auto', 'above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && date_calendar_position_vertical %in% names(named_list)) { + if (is.logical(date_calendar_position_vertical)) { + date_calendar_position_vertical <- as.character(date_calendar_position_vertical) + } + named_list_value <- unname(named_list[date_calendar_position_vertical])[[1]] + new_list$x$state$date$calendar_position$vertical <- named_list_value + } + } + } + } + list_date_calendar_position_horizontal <- c("left", "center", "right", NULL) + if (!is.null(date_calendar_position_horizontal)) { + if (!date_calendar_position_horizontal %in% list_date_calendar_position_horizontal) { + stop("`date_calendar_position_horizontal` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && date_calendar_position_horizontal %in% names(named_list)) { + if (is.logical(date_calendar_position_horizontal)) { + date_calendar_position_horizontal <- as.character(date_calendar_position_horizontal) + } + named_list_value <- unname(named_list[date_calendar_position_horizontal])[[1]] + new_list$x$state$date$calendar_position$horizontal <- named_list_value + } + } + } + } + list_rating_icon_type <- c("star", "circle", "check", NULL) + if (!is.null(rating_icon_type)) { + if (!rating_icon_type %in% list_rating_icon_type) { + stop("`rating_icon_type` must be one of: c('star', 'circle', 'check')") + } else { + if (length(jsonlite::fromJSON('{"star": "star", "circle": "circle", "check": "check"}')) > 1) { + named_list <- jsonlite::fromJSON('{"star": "star", "circle": "circle", "check": "check"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && rating_icon_type %in% names(named_list)) { + if (is.logical(rating_icon_type)) { + rating_icon_type <- as.character(rating_icon_type) + } + named_list_value <- unname(named_list[rating_icon_type])[[1]] + new_list$x$state$rating$icon_type <- named_list_value + } + } + } + } + new_list$x$state$rating$icon_fill_base <- rating_icon_fill_base + new_list$x$state$rating$icon_stroke_base <- rating_icon_stroke_base + new_list$x$state$rating$icon_fill_active <- rating_icon_fill_active + new_list$x$state$rating$icon_stroke_active <- rating_icon_stroke_active + new_list$x$state$rating$advanced <- rating_advanced + new_list$x$state$rating$icon_width <- rating_icon_width + new_list$x$state$rating$icon_height <- rating_icon_height + new_list$x$state$rating$icon_margin <- rating_icon_margin + new_list$x$state$rating$icon_stroke_width <- rating_icon_stroke_width + new_list$x$state$rating$container_width <- rating_container_width + new_list$x$state$rating$wrap_margin_vertical <- rating_wrap_margin_vertical + new_list$x$state$rating$wrap_margin_horizontal <- rating_wrap_margin_horizontal + new_list$x$state$rating$wrap_padding_vertical <- rating_wrap_padding_vertical + new_list$x$state$rating$wrap_padding_horizontal <- rating_wrap_padding_horizontal + new_list$x$state$rating$label_width <- rating_label_width + new_list$x$state$rating$label_color <- rating_label_color + list_rating_label_position <- c("above", "below", NULL) + if (!is.null(rating_label_position)) { + if (!rating_label_position %in% list_rating_label_position) { + stop("`rating_label_position` must be one of: c('above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && rating_label_position %in% names(named_list)) { + if (is.logical(rating_label_position)) { + rating_label_position <- as.character(rating_label_position) + } + named_list_value <- unname(named_list[rating_label_position])[[1]] + new_list$x$state$rating$label_position <- named_list_value + } + } + } + } + new_list$x$state$slider$handle_color <- chart_slider_filter_controls_handle_color + new_list$x$state$slider$track_active_color <- chart_slider_filter_controls_track_active_color + new_list$x$state$slider$track_base_color <- chart_slider_filter_controls_track_base_color + new_list$x$state$slider$handle_size <- chart_slider_filter_controls_handle_size + new_list$x$state$slider$ticks <- chart_slider_filter_controls_ticks + new_list$x$state$slider$advanced <- chart_slider_filter_controls_advanced + new_list$x$state$slider$container_width <- chart_slider_filter_controls_container_width + new_list$x$state$slider$wrap_margin_vertical <- chart_slider_filter_controls_wrap_margin_vertical + new_list$x$state$slider$wrap_margin_horizontal <- chart_slider_filter_controls_wrap_margin_horizontal + new_list$x$state$slider$track_height <- chart_slider_filter_controls_track_height + new_list$x$state$slider$track_border_radius <- chart_slider_filter_controls_track_border_radius + new_list$x$state$slider$track_border_color <- chart_slider_filter_controls_track_border_color + new_list$x$state$slider$track_border_width <- chart_slider_filter_controls_track_border_width + list_chart_slider_filter_controls_handle_shape <- c("rectangle", "circle", NULL) + if (!is.null(chart_slider_filter_controls_handle_shape)) { + if (!chart_slider_filter_controls_handle_shape %in% list_chart_slider_filter_controls_handle_shape) { + stop("`chart_slider_filter_controls_handle_shape` must be one of: c('rectangle', 'circle')") + } else { + if (length(jsonlite::fromJSON('{"rectangle": "rectangle", "circle": "circle"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rectangle": "rectangle", "circle": "circle"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_slider_filter_controls_handle_shape %in% names(named_list)) { + if (is.logical(chart_slider_filter_controls_handle_shape)) { + chart_slider_filter_controls_handle_shape <- as.character(chart_slider_filter_controls_handle_shape) + } + named_list_value <- unname(named_list[chart_slider_filter_controls_handle_shape])[[1]] + new_list$x$state$slider$handle_shape <- named_list_value + } + } + } + } + new_list$x$state$slider$handle_width <- chart_slider_filter_controls_handle_width + new_list$x$state$slider$handle_border_color <- chart_slider_filter_controls_handle_border_color + new_list$x$state$slider$handle_border_width <- chart_slider_filter_controls_handle_border_width + new_list$x$state$slider$handle_border_radius <- chart_slider_filter_controls_handle_border_radius + new_list$x$state$slider$handle_box_shadow <- chart_slider_filter_controls_handle_box_shadow + new_list$x$state$slider$tooltips <- chart_slider_filter_controls_tooltips + new_list$x$state$slider$tooltip_background <- chart_slider_filter_controls_tooltip_background + new_list$x$state$slider$tick_color <- chart_slider_filter_controls_tick_color + new_list$x$state$slider$tick_padding <- chart_slider_filter_controls_tick_padding + new_list$x$state$slider$tick_number_padding <- chart_slider_filter_controls_tick_number_padding + if (length(submit_comment_text) > 1) { + new_list$x$state$submit$comment$text <- paste(submit_comment_text, collapse = "\n") + } else { + new_list$x$state$submit$comment$text <- submit_comment_text + } + + new_list$x$state$submit$button$text <- submit_button_text + list_submit_bg_type <- c("color", "image", NULL) + if (!is.null(submit_bg_type)) { + if (!submit_bg_type %in% list_submit_bg_type) { + stop("`submit_bg_type` must be one of: c('color', 'image')") + } else { + if (length(jsonlite::fromJSON('{"color": "color", "image": "image"}')) > 1) { + named_list <- jsonlite::fromJSON('{"color": "color", "image": "image"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && submit_bg_type %in% names(named_list)) { + if (is.logical(submit_bg_type)) { + submit_bg_type <- as.character(submit_bg_type) + } + named_list_value <- unname(named_list[submit_bg_type])[[1]] + new_list$x$state$submit$bg_type <- named_list_value + } + } + } + } + new_list$x$state$submit$bg_color <- submit_bg_color + new_list$x$state$submit$bg_image_src <- submit_bg_image_src + new_list$x$state$submit$border <- submit_border + list_submit_bg_image_size <- c("auto", "cover", "contain", NULL) + if (!is.null(submit_bg_image_size)) { + if (!submit_bg_image_size %in% list_submit_bg_image_size) { + stop("`submit_bg_image_size` must be one of: c('auto', 'cover', 'contain')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "cover": "cover", "contain": "contain"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "cover": "cover", "contain": "contain"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && submit_bg_image_size %in% names(named_list)) { + if (is.logical(submit_bg_image_size)) { + submit_bg_image_size <- as.character(submit_bg_image_size) + } + named_list_value <- unname(named_list[submit_bg_image_size])[[1]] + new_list$x$state$submit$bg_image_size <- named_list_value + } + } + } + } + new_list$x$state$submit$advanced <- submit_advanced + list_submit_comment_font_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(submit_comment_font_size)) { + if (!submit_comment_font_size %in% list_submit_comment_font_size) { + stop("`submit_comment_font_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && submit_comment_font_size %in% names(named_list)) { + if (is.logical(submit_comment_font_size)) { + submit_comment_font_size <- as.character(submit_comment_font_size) + } + named_list_value <- unname(named_list[submit_comment_font_size])[[1]] + new_list$x$state$submit$comment$font_size <- named_list_value + } + } + } + } + new_list$x$state$submit$comment$font_size_custom <- submit_comment_font_size_custom + list_submit_comment_font_weight <- c("normal", "bold", NULL) + if (!is.null(submit_comment_font_weight)) { + if (!submit_comment_font_weight %in% list_submit_comment_font_weight) { + stop("`submit_comment_font_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && submit_comment_font_weight %in% names(named_list)) { + if (is.logical(submit_comment_font_weight)) { + submit_comment_font_weight <- as.character(submit_comment_font_weight) + } + named_list_value <- unname(named_list[submit_comment_font_weight])[[1]] + new_list$x$state$submit$comment$font_weight <- named_list_value + } + } + } + } + list_submit_comment_font_style <- c("normal", "italic", NULL) + if (!is.null(submit_comment_font_style)) { + if (!submit_comment_font_style %in% list_submit_comment_font_style) { + stop("`submit_comment_font_style` must be one of: c('normal', 'italic')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && submit_comment_font_style %in% names(named_list)) { + if (is.logical(submit_comment_font_style)) { + submit_comment_font_style <- as.character(submit_comment_font_style) + } + named_list_value <- unname(named_list[submit_comment_font_style])[[1]] + new_list$x$state$submit$comment$font_style <- named_list_value + } + } + } + } + list_submit_flex_direction <- c("column", "column-reverse", NULL) + if (!is.null(submit_flex_direction)) { + if (!submit_flex_direction %in% list_submit_flex_direction) { + stop("`submit_flex_direction` must be one of: c('column', 'column-reverse')") + } else { + if (length(jsonlite::fromJSON('{"column": "column", "column-reverse": "column-reverse"}')) > 1) { + named_list <- jsonlite::fromJSON('{"column": "column", "column-reverse": "column-reverse"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && submit_flex_direction %in% names(named_list)) { + if (is.logical(submit_flex_direction)) { + submit_flex_direction <- as.character(submit_flex_direction) + } + named_list_value <- unname(named_list[submit_flex_direction])[[1]] + new_list$x$state$submit$flex_direction <- named_list_value + } + } + } + } + new_list$x$state$submit$comment$font_color <- submit_comment_font_color + new_list$x$state$submit$comment$margin <- submit_comment_margin + list_submit_button_font_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(submit_button_font_size)) { + if (!submit_button_font_size %in% list_submit_button_font_size) { + stop("`submit_button_font_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && submit_button_font_size %in% names(named_list)) { + if (is.logical(submit_button_font_size)) { + submit_button_font_size <- as.character(submit_button_font_size) + } + named_list_value <- unname(named_list[submit_button_font_size])[[1]] + new_list$x$state$submit$button$font_size <- named_list_value + } + } + } + } + new_list$x$state$submit$button$font_size_custom <- submit_button_font_size_custom + list_submit_button_font_weight <- c("normal", "bold", NULL) + if (!is.null(submit_button_font_weight)) { + if (!submit_button_font_weight %in% list_submit_button_font_weight) { + stop("`submit_button_font_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && submit_button_font_weight %in% names(named_list)) { + if (is.logical(submit_button_font_weight)) { + submit_button_font_weight <- as.character(submit_button_font_weight) + } + named_list_value <- unname(named_list[submit_button_font_weight])[[1]] + new_list$x$state$submit$button$font_weight <- named_list_value + } + } + } + } + list_submit_button_font_style <- c("normal", "italic", NULL) + if (!is.null(submit_button_font_style)) { + if (!submit_button_font_style %in% list_submit_button_font_style) { + stop("`submit_button_font_style` must be one of: c('normal', 'italic')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && submit_button_font_style %in% names(named_list)) { + if (is.logical(submit_button_font_style)) { + submit_button_font_style <- as.character(submit_button_font_style) + } + named_list_value <- unname(named_list[submit_button_font_style])[[1]] + new_list$x$state$submit$button$font_style <- named_list_value + } + } + } + } + new_list$x$state$submit$button$margin <- submit_button_margin + new_list$x$state$submit$button$padding_factor <- submit_button_padding_factor + new_list$x$state$submit$button$box_shadow <- submit_button_box_shadow + new_list$x$state$submit$button$use_default_styles <- submit_button_use_default_styles + new_list$x$state$submit$button$bg_color <- submit_button_bg_color + new_list$x$state$submit$button$bg_color_hover <- submit_button_bg_color_hover + new_list$x$state$submit$button$font_color <- submit_button_font_color + new_list$x$state$submit$button$font_color_hover <- submit_button_font_color_hover + list_submit_button_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(submit_button_border_style)) { + if (!submit_button_border_style %in% list_submit_button_border_style) { + stop("`submit_button_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && submit_button_border_style %in% names(named_list)) { + if (is.logical(submit_button_border_style)) { + submit_button_border_style <- as.character(submit_button_border_style) + } + named_list_value <- unname(named_list[submit_button_border_style])[[1]] + new_list$x$state$submit$button$border_style <- named_list_value + } + } + } + } + new_list$x$state$submit$button$border_color <- submit_button_border_color + new_list$x$state$submit$button$border_width <- submit_button_border_width + new_list$x$state$submit$button$border_transparency <- submit_button_border_transparency + new_list$x$state$submit$button$border_radius <- submit_button_border_radius + list_design_controls_position <- c("top_left", "top_centre", "top_right", "bottom_left", "bottom_centre", "bottom_right", NULL) + if (!is.null(design_controls_position)) { + if (!design_controls_position %in% list_design_controls_position) { + stop("`design_controls_position` must be one of: c('top_left', 'top_centre', 'top_right', 'bottom_left', 'bottom_centre', 'bottom_right')") + } else { + if (length(jsonlite::fromJSON('{"top_left": "top_left", "top_centre": "top_centre", "top_right": "top_right", "bottom_left": "bottom_left", "bottom_centre": "bottom_centre", "bottom_right": "bottom_right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top_left": "top_left", "top_centre": "top_centre", "top_right": "top_right", "bottom_left": "bottom_left", "bottom_centre": "bottom_centre", "bottom_right": "bottom_right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_controls_position %in% names(named_list)) { + if (is.logical(design_controls_position)) { + design_controls_position <- as.character(design_controls_position) + } + named_list_value <- unname(named_list[design_controls_position])[[1]] + new_list$x$state$design$controls$position <- named_list_value + } + } + } + } + new_list$x$state$design$controls$button$symbol_back <- design_controls_button_symbol_back + new_list$x$state$design$controls$button$symbol_forward <- design_controls_button_symbol_forward + new_list$x$state$design$controls$button$font_color <- design_controls_button_font_color + new_list$x$state$design$controls$button$font_size <- design_controls_button_font_size + new_list$x$state$design$controls$advanced <- design_controls_advanced + new_list$x$state$design$controls$button$margin <- design_controls_button_margin + new_list$x$state$design$controls$button$padding_factor <- design_controls_button_padding_factor + new_list$x$state$design$controls$button$bg_color <- design_controls_button_bg_color + new_list$x$state$design$controls$button$bg_opacity <- design_controls_button_bg_opacity + list_design_controls_button_font_weight <- c("normal", "bold", NULL) + if (!is.null(design_controls_button_font_weight)) { + if (!design_controls_button_font_weight %in% list_design_controls_button_font_weight) { + stop("`design_controls_button_font_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_controls_button_font_weight %in% names(named_list)) { + if (is.logical(design_controls_button_font_weight)) { + design_controls_button_font_weight <- as.character(design_controls_button_font_weight) + } + named_list_value <- unname(named_list[design_controls_button_font_weight])[[1]] + new_list$x$state$design$controls$button$font_weight <- named_list_value + } + } + } + } + list_design_controls_button_font_style <- c("normal", "italic", NULL) + if (!is.null(design_controls_button_font_style)) { + if (!design_controls_button_font_style %in% list_design_controls_button_font_style) { + stop("`design_controls_button_font_style` must be one of: c('normal', 'italic')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "italic": "italic"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_controls_button_font_style %in% names(named_list)) { + if (is.logical(design_controls_button_font_style)) { + design_controls_button_font_style <- as.character(design_controls_button_font_style) + } + named_list_value <- unname(named_list[design_controls_button_font_style])[[1]] + new_list$x$state$design$controls$button$font_style <- named_list_value + } + } + } + } + new_list$x$state$design$controls$button$border_width <- design_controls_button_border_width + list_design_controls_button_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(design_controls_button_border_style)) { + if (!design_controls_button_border_style %in% list_design_controls_button_border_style) { + stop("`design_controls_button_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_controls_button_border_style %in% names(named_list)) { + if (is.logical(design_controls_button_border_style)) { + design_controls_button_border_style <- as.character(design_controls_button_border_style) + } + named_list_value <- unname(named_list[design_controls_button_border_style])[[1]] + new_list$x$state$design$controls$button$border_style <- named_list_value + } + } + } + } + new_list$x$state$design$controls$button$border_color <- design_controls_button_border_color + new_list$x$state$design$controls$button$border_radius <- design_controls_button_border_radius + new_list$x$state$design$progress$show <- design_progress_show + list_design_progress_position <- c("top", "bottom", NULL) + if (!is.null(design_progress_position)) { + if (!design_progress_position %in% list_design_progress_position) { + stop("`design_progress_position` must be one of: c('top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && design_progress_position %in% names(named_list)) { + if (is.logical(design_progress_position)) { + design_progress_position <- as.character(design_progress_position) + } + named_list_value <- unname(named_list[design_progress_position])[[1]] + new_list$x$state$design$progress$position <- named_list_value + } + } + } + } + new_list$x$state$design$progress$height <- design_progress_height + new_list$x$state$design$progress$margin <- design_progress_margin + new_list$x$state$design$progress$bg_color <- design_progress_bg_color + new_list$x$state$design$progress$bg_opacity <- design_progress_bg_opacity + new_list$x$state$number_format$prefix <- chart_number_date_format_prefix + new_list$x$state$number_format$suffix <- chart_number_date_format_suffix + new_list$x$state$number_format$n_dec <- chart_number_date_format_n_dec + new_list$x$state$number_format$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$number_format$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$number_format$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$number_format$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$number_format$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$number_format$transform <- named_list_value + } + } + } + } + new_list$x$state$number_format$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$number_format$exponentiate_constant <- chart_number_date_format_exponentiate_constant + list_chart_number_localization_input_decimal_separator <- c(".", ",", NULL) + if (!is.null(chart_number_localization_input_decimal_separator)) { + if (!chart_number_localization_input_decimal_separator %in% list_chart_number_localization_input_decimal_separator) { + stop("`chart_number_localization_input_decimal_separator` must be one of: c('.', ',')") + } else { + if (length(jsonlite::fromJSON('{".": ".", ",": ","}')) > 1) { + named_list <- jsonlite::fromJSON('{".": ".", ",": ","}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_input_decimal_separator %in% names(named_list)) { + if (is.logical(chart_number_localization_input_decimal_separator)) { + chart_number_localization_input_decimal_separator <- as.character(chart_number_localization_input_decimal_separator) + } + named_list_value <- unname(named_list[chart_number_localization_input_decimal_separator])[[1]] + new_list$x$state$localization$input_decimal_separator <- named_list_value + } + } + } + } + list_chart_number_localization_output_separators <- c(",.", ".,", ".", ",", " .", " ,", NULL) + if (!is.null(chart_number_localization_output_separators)) { + if (!chart_number_localization_output_separators %in% list_chart_number_localization_output_separators) { + stop("`chart_number_localization_output_separators` must be one of: c(',.', '.,', '.', ',', ' .', ' ,')") + } else { + if (length(jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}')) > 1) { + named_list <- jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_output_separators %in% names(named_list)) { + if (is.logical(chart_number_localization_output_separators)) { + chart_number_localization_output_separators <- as.character(chart_number_localization_output_separators) + } + named_list_value <- unname(named_list[chart_number_localization_output_separators])[[1]] + new_list$x$state$localization$output_separators <- named_list_value + } + } + } + } + new_list$x$state$external_write$enabled <- external_write_enabled + new_list$x$state$external_write$endpoint <- external_write_endpoint + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_cards_details.R b/R_package/R/set_cards_details.R new file mode 100644 index 0000000..40da48d --- /dev/null +++ b/R_package/R/set_cards_details.R @@ -0,0 +1,4270 @@ +#' Set cards chart details +#' @name set_cards_details +#' @param mode View mode. Choices: grid, carousel. Flourish type hint: string, defaults to `NULL` +#' @param carousel_channel_background Channel color. Flourish type hint: color, defaults to `NULL` +#' @param carousel_bar_background Bar color. Flourish type hint: color, defaults to `NULL` +#' @param carousel_channel_height Channel height. Flourish type hint: number, defaults to `NULL` +#' @param autoplay_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param autoplay_duration Duration. Flourish type hint: number, defaults to `NULL` +#' @param autoplay_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param autoplay_pause_when Pause on interaction. Choices: never, hover, popup, hover_popup. Flourish type hint: string, defaults to `NULL` +#' @param autoplay_btn_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param autoplay_btn_position Position. Choices: top_left, top_right, bottom_left, bottom_right. Flourish type hint: string, defaults to `NULL` +#' @param autoplay_btn_size Size. Flourish type hint: number, defaults to `NULL` +#' @param autoplay_btn_background Background. Flourish type hint: color, defaults to `NULL` +#' @param autoplay_btn_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param autoplay_btn_color Icon. Flourish type hint: color, defaults to `NULL` +#' @param card_layout Card layout. Choices: portrait, landscape, absolute. Flourish type hint: string, defaults to `NULL` +#' @param card_order Card structure. Choices: stack-default, stack-2, stack-3, stack-4. Flourish type hint: string, defaults to `NULL` +#' @param card_width_portrait Width. Flourish type hint: number, defaults to `NULL` +#' @param card_width_landscape Width. Flourish type hint: number, defaults to `NULL` +#' @param card_width_stretch Stretch cards to fill. Flourish type hint: boolean, defaults to `NULL` +#' @param card_width_stretch_percent Stretch. How much the cards are allowed to scale up to fill the space, in %. When too much stretch would be required, cards are scaled down to add a column to the grid. Flourish type hint: number, defaults to `NULL` +#' @param card_padding_top Top. Flourish type hint: number, defaults to `NULL` +#' @param card_padding_right Right. Flourish type hint: number, defaults to `NULL` +#' @param card_padding_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param card_padding_left Left. Flourish type hint: number, defaults to `NULL` +#' @param card_horizontal_margin Horizontal. Flourish type hint: number, defaults to `NULL` +#' @param card_vertical_margin Vertical. Flourish type hint: number, defaults to `NULL` +#' @param card_border_color Border color. Flourish type hint: color, defaults to `NULL` +#' @param card_border_width Weight. Flourish type hint: number, defaults to `NULL` +#' @param card_shape Shape. Choices: circle, square. Flourish type hint: string, defaults to `NULL` +#' @param card_radius Roundness. Flourish type hint: number, defaults to `NULL` +#' @param card_shadow Shadow behind card. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param card_shadow_color Color. Flourish type hint: color, defaults to `NULL` +#' @param card_shadow_blur Blur. Flourish type hint: number, defaults to `NULL` +#' @param template_customise Customize card HTML. Flourish type hint: boolean, defaults to `NULL` +#' @param template_simple_custom Custom HTML. Custom HTML can be used for flippable cards, text on hover, embedded Flourish charts, etc. Refer to columns using `{{column_name}}` If a column name has spaces, wrap in square brackets, like `{{column name}}` If a column includes HTML, prevent escaping HTML by wrapping in triple curly brackets. For example: `{{{column_name}}}` Use handlebar syntax for conditions, etc. Flourish type hint: html, defaults to `NULL` +#' @param content_vertical_align Vertical position. Choices: center, flex-start, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param content_horizontal_padding Horizontal space. Flourish type hint: number, defaults to `NULL` +#' @param title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param title_fontsize Font size. Flourish type hint: number, defaults to `NULL` +#' @param title_weight Weight. Choices: italic, normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param title_advanced Advanced settings. Flourish type hint: boolean, defaults to `NULL` +#' @param title_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param title_space_above Space above. Flourish type hint: number, defaults to `NULL` +#' @param title_space_below Space below. Flourish type hint: number, defaults to `NULL` +#' @param title_lineheight Line height. Flourish type hint: number, defaults to `NULL` +#' @param title_minheight Min height. Flourish type hint: number, defaults to `NULL` +#' @param title_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param subtitle_fontsize Font size. Flourish type hint: number, defaults to `NULL` +#' @param subtitle_weight Weight. Choices: italic, normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param subtitle_advanced Advanced settings. Flourish type hint: boolean, defaults to `NULL` +#' @param subtitle_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param subtitle_space_above Space above. Flourish type hint: number, defaults to `NULL` +#' @param subtitle_space_below Space below. Flourish type hint: number, defaults to `NULL` +#' @param subtitle_lineheight Line height. Flourish type hint: number, defaults to `NULL` +#' @param subtitle_minheight Min height. Flourish type hint: number, defaults to `NULL` +#' @param subtitle_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param text_fontsize Font size. Flourish type hint: number, defaults to `NULL` +#' @param text_weight Weight. Choices: italic, normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param text_advanced Advanced settings. Flourish type hint: boolean, defaults to `NULL` +#' @param text_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param text_space_between Space between. Flourish type hint: number, defaults to `NULL` +#' @param text_lineheight Line height. Flourish type hint: number, defaults to `NULL` +#' @param text_minheight Min height. Flourish type hint: number, defaults to `NULL` +#' @param text_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param text_column_names Column names. Choices: `TRUE`, `FALSE`. To add column names before text entries. Flourish type hint: boolean, defaults to `NULL` +#' @param text_column_separator Column separator. Choices: :, -, `
`, other. Choose a separator between column names and text entries. Flourish type hint: string, defaults to `NULL` +#' @param text_column_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param text_column_separator_custom Other. Flourish type hint: string, defaults to `NULL` +#' @param image_width_portrait Width. As a percentage of the cards width. Flourish type hint: number, defaults to `NULL` +#' @param image_width_landscape Width. As a percentage of the cards width. Flourish type hint: number, defaults to `NULL` +#' @param image_aspect_ratio Aspect ratio. As a multiplier of the images width. For example: a value of 2, means the image height is 2 times the image width. Flourish type hint: number, defaults to `NULL` +#' @param image_sizing Image sizing. Choices: cover, contain. Flourish type hint: string, defaults to `NULL` +#' @param image_horizontal_margin Horizontal. As a percentage of the cards width. Flourish type hint: number, defaults to `NULL` +#' @param image_vertical_margin Vertical. As a percentage of the cards width. Flourish type hint: number, defaults to `NULL` +#' @param card_space_between Space between image and text. Flourish type hint: number, defaults to `NULL` +#' @param image_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param image_border_width Weight. Flourish type hint: number, defaults to `NULL` +#' @param image_shape Shape. Choices: circle, square. Flourish type hint: string, defaults to `NULL` +#' @param image_radius Roundness. Flourish type hint: number, defaults to `NULL` +#' @param image_styling Advanced image styling. Flourish type hint: boolean, defaults to `NULL` +#' @param image_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param image_contrast Contrast. Flourish type hint: number, defaults to `NULL` +#' @param image_brightness Brightness. Flourish type hint: number, defaults to `NULL` +#' @param image_blend_mode Blend mode. Choices: normal, lighten, darken, overlay, screen, multiply. Flourish type hint: string, defaults to `NULL` +#' @param image_blackwhite Black and white. Flourish type hint: boolean, defaults to `NULL` +#' @param image_missing Missing images. Choices: hide, icon. What to show when theres a missing image. Flourish type hint: string, defaults to `NULL` +#' @param image_missing_icon Missing icon. Flourish type hint: url, defaults to `NULL` +#' @param card_background_mode Card. Choices: transparent, fixed. Flourish type hint: string, defaults to `NULL` +#' @param card_background_color Color. Flourish type hint: color, defaults to `NULL` +#' @param card_background_mode_category Card. Choices: data, transparent, fixed. Choose Data if you want to base the color on the Categories column in your dataset. Flourish type hint: string, defaults to `NULL` +#' @param card_background_color_category Color. Flourish type hint: color, defaults to `NULL` +#' @param image_background_mode Image. Choices: transparent, fixed. Flourish type hint: string, defaults to `NULL` +#' @param image_background_color Color. Flourish type hint: color, defaults to `NULL` +#' @param image_background_mode_category Image. Choices: data, transparent, fixed. Choose Data if you want to base the color on the Categories column in your dataset. Flourish type hint: string, defaults to `NULL` +#' @param image_background_color_category Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param legend_filter_mode Filter on click. Choices: none, single, multi. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_controls_spacing Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_show_all Include "All". Flourish type hint: boolean, defaults to `NULL` +#' @param filter_show_all_text “All” label. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param audio_click Click while playing should:. Choices: replay, stop, pause. Flourish type hint: string, defaults to `NULL` +#' @param audio_animation Animate while playing audio. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_enabled Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_whitelist Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "cards", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_cards_data(gapminder) |> +#' set_cards_details() +#' ) +#' @export + +set_cards_details <- function( + ., + mode = NULL, + carousel_channel_background = NULL, + carousel_bar_background = NULL, + carousel_channel_height = NULL, + autoplay_enabled = NULL, + autoplay_duration = NULL, + autoplay_loop = NULL, + autoplay_pause_when = NULL, + autoplay_btn_visible = NULL, + autoplay_btn_position = NULL, + autoplay_btn_size = NULL, + autoplay_btn_background = NULL, + autoplay_btn_opacity = NULL, + autoplay_btn_color = NULL, + card_layout = NULL, + card_order = NULL, + card_width_portrait = NULL, + card_width_landscape = NULL, + card_width_stretch = NULL, + card_width_stretch_percent = NULL, + card_padding_top = NULL, + card_padding_right = NULL, + card_padding_bottom = NULL, + card_padding_left = NULL, + card_horizontal_margin = NULL, + card_vertical_margin = NULL, + card_border_color = NULL, + card_border_width = NULL, + card_shape = NULL, + card_radius = NULL, + card_shadow = NULL, + card_shadow_color = NULL, + card_shadow_blur = NULL, + template_customise = NULL, + template_simple_custom = NULL, + content_vertical_align = NULL, + content_horizontal_padding = NULL, + title_color = NULL, + title_fontsize = NULL, + title_weight = NULL, + title_advanced = NULL, + title_opacity = NULL, + title_space_above = NULL, + title_space_below = NULL, + title_lineheight = NULL, + title_minheight = NULL, + title_align = NULL, + subtitle_color = NULL, + subtitle_fontsize = NULL, + subtitle_weight = NULL, + subtitle_advanced = NULL, + subtitle_opacity = NULL, + subtitle_space_above = NULL, + subtitle_space_below = NULL, + subtitle_lineheight = NULL, + subtitle_minheight = NULL, + subtitle_align = NULL, + text_color = NULL, + text_fontsize = NULL, + text_weight = NULL, + text_advanced = NULL, + text_opacity = NULL, + text_space_between = NULL, + text_lineheight = NULL, + text_minheight = NULL, + text_align = NULL, + text_column_names = NULL, + text_column_separator = NULL, + text_column_weight = NULL, + text_column_separator_custom = NULL, + image_width_portrait = NULL, + image_width_landscape = NULL, + image_aspect_ratio = NULL, + image_sizing = NULL, + image_horizontal_margin = NULL, + image_vertical_margin = NULL, + card_space_between = NULL, + image_border_color = NULL, + image_border_width = NULL, + image_shape = NULL, + image_radius = NULL, + image_styling = NULL, + image_opacity = NULL, + image_contrast = NULL, + image_brightness = NULL, + image_blend_mode = NULL, + image_blackwhite = NULL, + image_missing = NULL, + image_missing_icon = NULL, + card_background_mode = NULL, + card_background_color = NULL, + card_background_mode_category = NULL, + card_background_color_category = NULL, + image_background_mode = NULL, + image_background_color = NULL, + image_background_mode_category = NULL, + image_background_color_category = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_filter_mode = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_show_all = NULL, + filter_show_all_text = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + audio_click = NULL, + audio_animation = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL) { + details_error(., "cards") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/cards")) { + stop("`set_cards_details()` is not supported for this chart type.") + } + list_mode <- c("grid", "carousel", NULL) + if (!is.null(mode)) { + if (!mode %in% list_mode) { + stop("`mode` must be one of: c('grid', 'carousel')") + } else { + if (length(jsonlite::fromJSON('{"grid": "grid", "carousel": "carousel"}')) > 1) { + named_list <- jsonlite::fromJSON('{"grid": "grid", "carousel": "carousel"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && mode %in% names(named_list)) { + if (is.logical(mode)) { + mode <- as.character(mode) + } + named_list_value <- unname(named_list[mode])[[1]] + new_list$x$state$mode <- named_list_value + } + } + } + } + new_list$x$state$carousel_channel_background <- carousel_channel_background + new_list$x$state$carousel_bar_background <- carousel_bar_background + new_list$x$state$carousel_channel_height <- carousel_channel_height + list_autoplay_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(autoplay_enabled)) { + if (!autoplay_enabled %in% list_autoplay_enabled) { + stop("`autoplay_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && autoplay_enabled %in% names(named_list)) { + if (is.logical(autoplay_enabled)) { + autoplay_enabled <- as.character(autoplay_enabled) + } + named_list_value <- unname(named_list[autoplay_enabled])[[1]] + new_list$x$state$autoplay_enabled <- named_list_value + } + } + } + } + new_list$x$state$autoplay_duration <- autoplay_duration + new_list$x$state$autoplay_loop <- autoplay_loop + list_autoplay_pause_when <- c("never", "hover", "popup", "hover_popup", NULL) + if (!is.null(autoplay_pause_when)) { + if (!autoplay_pause_when %in% list_autoplay_pause_when) { + stop("`autoplay_pause_when` must be one of: c('never', 'hover', 'popup', 'hover_popup')") + } else { + if (length(jsonlite::fromJSON('{"never": "never", "hover": "hover", "popup": "popup", "hover_popup": "hover_popup"}')) > 1) { + named_list <- jsonlite::fromJSON('{"never": "never", "hover": "hover", "popup": "popup", "hover_popup": "hover_popup"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && autoplay_pause_when %in% names(named_list)) { + if (is.logical(autoplay_pause_when)) { + autoplay_pause_when <- as.character(autoplay_pause_when) + } + named_list_value <- unname(named_list[autoplay_pause_when])[[1]] + new_list$x$state$autoplay_pause_when <- named_list_value + } + } + } + } + list_autoplay_btn_visible <- c(TRUE, FALSE, NULL) + if (!is.null(autoplay_btn_visible)) { + if (!autoplay_btn_visible %in% list_autoplay_btn_visible) { + stop("`autoplay_btn_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && autoplay_btn_visible %in% names(named_list)) { + if (is.logical(autoplay_btn_visible)) { + autoplay_btn_visible <- as.character(autoplay_btn_visible) + } + named_list_value <- unname(named_list[autoplay_btn_visible])[[1]] + new_list$x$state$autoplay_btn_visible <- named_list_value + } + } + } + } + list_autoplay_btn_position <- c("top_left", "top_right", "bottom_left", "bottom_right", NULL) + if (!is.null(autoplay_btn_position)) { + if (!autoplay_btn_position %in% list_autoplay_btn_position) { + stop("`autoplay_btn_position` must be one of: c('top_left', 'top_right', 'bottom_left', 'bottom_right')") + } else { + if (length(jsonlite::fromJSON('{"top_left": "top_left", "top_right": "top_right", "bottom_left": "bottom_left", "bottom_right": "bottom_right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top_left": "top_left", "top_right": "top_right", "bottom_left": "bottom_left", "bottom_right": "bottom_right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && autoplay_btn_position %in% names(named_list)) { + if (is.logical(autoplay_btn_position)) { + autoplay_btn_position <- as.character(autoplay_btn_position) + } + named_list_value <- unname(named_list[autoplay_btn_position])[[1]] + new_list$x$state$autoplay_btn_position <- named_list_value + } + } + } + } + new_list$x$state$autoplay_btn_size <- autoplay_btn_size + new_list$x$state$autoplay_btn_background <- autoplay_btn_background + new_list$x$state$autoplay_btn_opacity <- autoplay_btn_opacity + new_list$x$state$autoplay_btn_color <- autoplay_btn_color + list_card_layout <- c("portrait", "landscape", "absolute", NULL) + if (!is.null(card_layout)) { + if (!card_layout %in% list_card_layout) { + stop("`card_layout` must be one of: c('portrait', 'landscape', 'absolute')") + } else { + if (length(jsonlite::fromJSON('{"portrait": "portrait", "landscape": "landscape", "absolute": "absolute"}')) > 1) { + named_list <- jsonlite::fromJSON('{"portrait": "portrait", "landscape": "landscape", "absolute": "absolute"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && card_layout %in% names(named_list)) { + if (is.logical(card_layout)) { + card_layout <- as.character(card_layout) + } + named_list_value <- unname(named_list[card_layout])[[1]] + new_list$x$state$card_layout <- named_list_value + } + } + } + } + list_card_order <- c("stack-default", "stack-2", "stack-3", "stack-4", NULL) + if (!is.null(card_order)) { + if (!card_order %in% list_card_order) { + stop("`card_order` must be one of: c('stack-default', 'stack-2', 'stack-3', 'stack-4')") + } else { + if (length(jsonlite::fromJSON('{"stack-default": "stack-default", "stack-2": "stack-2", "stack-3": "stack-3", "stack-4": "stack-4"}')) > 1) { + named_list <- jsonlite::fromJSON('{"stack-default": "stack-default", "stack-2": "stack-2", "stack-3": "stack-3", "stack-4": "stack-4"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && card_order %in% names(named_list)) { + if (is.logical(card_order)) { + card_order <- as.character(card_order) + } + named_list_value <- unname(named_list[card_order])[[1]] + new_list$x$state$card_order <- named_list_value + } + } + } + } + new_list$x$state$card_width_portrait <- card_width_portrait + new_list$x$state$card_width_landscape <- card_width_landscape + new_list$x$state$card_width_stretch <- card_width_stretch + new_list$x$state$card_width_stretch_percent <- card_width_stretch_percent + new_list$x$state$card_padding_top <- card_padding_top + new_list$x$state$card_padding_right <- card_padding_right + new_list$x$state$card_padding_bottom <- card_padding_bottom + new_list$x$state$card_padding_left <- card_padding_left + new_list$x$state$card_horizontal_margin <- card_horizontal_margin + new_list$x$state$card_vertical_margin <- card_vertical_margin + new_list$x$state$card_border_color <- card_border_color + new_list$x$state$card_border_width <- card_border_width + list_card_shape <- c("circle", "square", NULL) + if (!is.null(card_shape)) { + if (!card_shape %in% list_card_shape) { + stop("`card_shape` must be one of: c('circle', 'square')") + } else { + if (length(jsonlite::fromJSON('{"circle": "circle", "square": "square"}')) > 1) { + named_list <- jsonlite::fromJSON('{"circle": "circle", "square": "square"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && card_shape %in% names(named_list)) { + if (is.logical(card_shape)) { + card_shape <- as.character(card_shape) + } + named_list_value <- unname(named_list[card_shape])[[1]] + new_list$x$state$card_shape <- named_list_value + } + } + } + } + new_list$x$state$card_radius <- card_radius + list_card_shadow <- c(TRUE, FALSE, NULL) + if (!is.null(card_shadow)) { + if (!card_shadow %in% list_card_shadow) { + stop("`card_shadow` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && card_shadow %in% names(named_list)) { + if (is.logical(card_shadow)) { + card_shadow <- as.character(card_shadow) + } + named_list_value <- unname(named_list[card_shadow])[[1]] + new_list$x$state$card_shadow <- named_list_value + } + } + } + } + new_list$x$state$card_shadow_color <- card_shadow_color + new_list$x$state$card_shadow_blur <- card_shadow_blur + new_list$x$state$template_customise <- template_customise + if (length(template_simple_custom) > 1) { + new_list$x$state$template_simple_custom <- paste(template_simple_custom, collapse = "\n") + } else { + new_list$x$state$template_simple_custom <- template_simple_custom + } + + list_content_vertical_align <- c("center", "flex-start", "flex-end", NULL) + if (!is.null(content_vertical_align)) { + if (!content_vertical_align %in% list_content_vertical_align) { + stop("`content_vertical_align` must be one of: c('center', 'flex-start', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"center": "center", "flex-start": "flex-start", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"center": "center", "flex-start": "flex-start", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_vertical_align %in% names(named_list)) { + if (is.logical(content_vertical_align)) { + content_vertical_align <- as.character(content_vertical_align) + } + named_list_value <- unname(named_list[content_vertical_align])[[1]] + new_list$x$state$content_vertical_align <- named_list_value + } + } + } + } + new_list$x$state$content_horizontal_padding <- content_horizontal_padding + new_list$x$state$title_color <- title_color + new_list$x$state$title_fontsize <- title_fontsize + list_title_weight <- c("italic", "normal", "bold", NULL) + if (!is.null(title_weight)) { + if (!title_weight %in% list_title_weight) { + stop("`title_weight` must be one of: c('italic', 'normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"italic": "italic", "normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"italic": "italic", "normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && title_weight %in% names(named_list)) { + if (is.logical(title_weight)) { + title_weight <- as.character(title_weight) + } + named_list_value <- unname(named_list[title_weight])[[1]] + new_list$x$state$title_weight <- named_list_value + } + } + } + } + new_list$x$state$title_advanced <- title_advanced + new_list$x$state$title_opacity <- title_opacity + new_list$x$state$title_space_above <- title_space_above + new_list$x$state$title_space_below <- title_space_below + new_list$x$state$title_lineheight <- title_lineheight + new_list$x$state$title_minheight <- title_minheight + list_title_align <- c("start", "center", "end", NULL) + if (!is.null(title_align)) { + if (!title_align %in% list_title_align) { + stop("`title_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && title_align %in% names(named_list)) { + if (is.logical(title_align)) { + title_align <- as.character(title_align) + } + named_list_value <- unname(named_list[title_align])[[1]] + new_list$x$state$title_align <- named_list_value + } + } + } + } + new_list$x$state$subtitle_color <- subtitle_color + new_list$x$state$subtitle_fontsize <- subtitle_fontsize + list_subtitle_weight <- c("italic", "normal", "bold", NULL) + if (!is.null(subtitle_weight)) { + if (!subtitle_weight %in% list_subtitle_weight) { + stop("`subtitle_weight` must be one of: c('italic', 'normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"italic": "italic", "normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"italic": "italic", "normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && subtitle_weight %in% names(named_list)) { + if (is.logical(subtitle_weight)) { + subtitle_weight <- as.character(subtitle_weight) + } + named_list_value <- unname(named_list[subtitle_weight])[[1]] + new_list$x$state$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$subtitle_advanced <- subtitle_advanced + new_list$x$state$subtitle_opacity <- subtitle_opacity + new_list$x$state$subtitle_space_above <- subtitle_space_above + new_list$x$state$subtitle_space_below <- subtitle_space_below + new_list$x$state$subtitle_lineheight <- subtitle_lineheight + new_list$x$state$subtitle_minheight <- subtitle_minheight + list_subtitle_align <- c("start", "center", "end", NULL) + if (!is.null(subtitle_align)) { + if (!subtitle_align %in% list_subtitle_align) { + stop("`subtitle_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && subtitle_align %in% names(named_list)) { + if (is.logical(subtitle_align)) { + subtitle_align <- as.character(subtitle_align) + } + named_list_value <- unname(named_list[subtitle_align])[[1]] + new_list$x$state$subtitle_align <- named_list_value + } + } + } + } + new_list$x$state$text_color <- text_color + new_list$x$state$text_fontsize <- text_fontsize + list_text_weight <- c("italic", "normal", "bold", NULL) + if (!is.null(text_weight)) { + if (!text_weight %in% list_text_weight) { + stop("`text_weight` must be one of: c('italic', 'normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"italic": "italic", "normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"italic": "italic", "normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && text_weight %in% names(named_list)) { + if (is.logical(text_weight)) { + text_weight <- as.character(text_weight) + } + named_list_value <- unname(named_list[text_weight])[[1]] + new_list$x$state$text_weight <- named_list_value + } + } + } + } + new_list$x$state$text_advanced <- text_advanced + new_list$x$state$text_opacity <- text_opacity + new_list$x$state$text_space_between <- text_space_between + new_list$x$state$text_lineheight <- text_lineheight + new_list$x$state$text_minheight <- text_minheight + list_text_align <- c("start", "center", "end", NULL) + if (!is.null(text_align)) { + if (!text_align %in% list_text_align) { + stop("`text_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && text_align %in% names(named_list)) { + if (is.logical(text_align)) { + text_align <- as.character(text_align) + } + named_list_value <- unname(named_list[text_align])[[1]] + new_list$x$state$text_align <- named_list_value + } + } + } + } + list_text_column_names <- c(TRUE, FALSE, NULL) + if (!is.null(text_column_names)) { + if (!text_column_names %in% list_text_column_names) { + stop("`text_column_names` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && text_column_names %in% names(named_list)) { + if (is.logical(text_column_names)) { + text_column_names <- as.character(text_column_names) + } + named_list_value <- unname(named_list[text_column_names])[[1]] + new_list$x$state$text_column_names <- named_list_value + } + } + } + } + list_text_column_separator <- c(": ", " - ", "
", "other", NULL) + if (!is.null(text_column_separator)) { + if (!text_column_separator %in% list_text_column_separator) { + stop("`text_column_separator` must be one of: c(': ', ' - ', '
', 'other')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " - ": " - ", "
": "
", "other": "other"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " - ": " - ", "
": "
", "other": "other"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && text_column_separator %in% names(named_list)) { + if (is.logical(text_column_separator)) { + text_column_separator <- as.character(text_column_separator) + } + named_list_value <- unname(named_list[text_column_separator])[[1]] + new_list$x$state$text_column_separator <- named_list_value + } + } + } + } + list_text_column_weight <- c("bold", "normal", NULL) + if (!is.null(text_column_weight)) { + if (!text_column_weight %in% list_text_column_weight) { + stop("`text_column_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && text_column_weight %in% names(named_list)) { + if (is.logical(text_column_weight)) { + text_column_weight <- as.character(text_column_weight) + } + named_list_value <- unname(named_list[text_column_weight])[[1]] + new_list$x$state$text_column_weight <- named_list_value + } + } + } + } + new_list$x$state$text_column_separator_custom <- text_column_separator_custom + new_list$x$state$image_width_portrait <- image_width_portrait + new_list$x$state$image_width_landscape <- image_width_landscape + new_list$x$state$image_aspect_ratio <- image_aspect_ratio + list_image_sizing <- c("cover", "contain", NULL) + if (!is.null(image_sizing)) { + if (!image_sizing %in% list_image_sizing) { + stop("`image_sizing` must be one of: c('cover', 'contain')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_sizing %in% names(named_list)) { + if (is.logical(image_sizing)) { + image_sizing <- as.character(image_sizing) + } + named_list_value <- unname(named_list[image_sizing])[[1]] + new_list$x$state$image_sizing <- named_list_value + } + } + } + } + new_list$x$state$image_horizontal_margin <- image_horizontal_margin + new_list$x$state$image_vertical_margin <- image_vertical_margin + new_list$x$state$card_space_between <- card_space_between + new_list$x$state$image_border_color <- image_border_color + new_list$x$state$image_border_width <- image_border_width + list_image_shape <- c("circle", "square", NULL) + if (!is.null(image_shape)) { + if (!image_shape %in% list_image_shape) { + stop("`image_shape` must be one of: c('circle', 'square')") + } else { + if (length(jsonlite::fromJSON('{"circle": "circle", "square": "square"}')) > 1) { + named_list <- jsonlite::fromJSON('{"circle": "circle", "square": "square"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_shape %in% names(named_list)) { + if (is.logical(image_shape)) { + image_shape <- as.character(image_shape) + } + named_list_value <- unname(named_list[image_shape])[[1]] + new_list$x$state$image_shape <- named_list_value + } + } + } + } + new_list$x$state$image_radius <- image_radius + new_list$x$state$image_styling <- image_styling + new_list$x$state$image_opacity <- image_opacity + new_list$x$state$image_contrast <- image_contrast + new_list$x$state$image_brightness <- image_brightness + list_image_blend_mode <- c("normal", "lighten", "darken", "overlay", "screen", "multiply", NULL) + if (!is.null(image_blend_mode)) { + if (!image_blend_mode %in% list_image_blend_mode) { + stop("`image_blend_mode` must be one of: c('normal', 'lighten', 'darken', 'overlay', 'screen', 'multiply')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "lighten": "lighten", "darken": "darken", "overlay": "overlay", "screen": "screen", "multiply": "multiply"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "lighten": "lighten", "darken": "darken", "overlay": "overlay", "screen": "screen", "multiply": "multiply"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_blend_mode %in% names(named_list)) { + if (is.logical(image_blend_mode)) { + image_blend_mode <- as.character(image_blend_mode) + } + named_list_value <- unname(named_list[image_blend_mode])[[1]] + new_list$x$state$image_blend_mode <- named_list_value + } + } + } + } + new_list$x$state$image_blackwhite <- image_blackwhite + list_image_missing <- c("hide", "icon", NULL) + if (!is.null(image_missing)) { + if (!image_missing %in% list_image_missing) { + stop("`image_missing` must be one of: c('hide', 'icon')") + } else { + if (length(jsonlite::fromJSON('{"hide": "hide", "icon": "icon"}')) > 1) { + named_list <- jsonlite::fromJSON('{"hide": "hide", "icon": "icon"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_missing %in% names(named_list)) { + if (is.logical(image_missing)) { + image_missing <- as.character(image_missing) + } + named_list_value <- unname(named_list[image_missing])[[1]] + new_list$x$state$image_missing <- named_list_value + } + } + } + } + new_list$x$state$image_missing_icon <- image_missing_icon + list_card_background_mode <- c("transparent", "fixed", NULL) + if (!is.null(card_background_mode)) { + if (!card_background_mode %in% list_card_background_mode) { + stop("`card_background_mode` must be one of: c('transparent', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"transparent": "transparent", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"transparent": "transparent", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && card_background_mode %in% names(named_list)) { + if (is.logical(card_background_mode)) { + card_background_mode <- as.character(card_background_mode) + } + named_list_value <- unname(named_list[card_background_mode])[[1]] + new_list$x$state$card_background_mode <- named_list_value + } + } + } + } + new_list$x$state$card_background_color <- card_background_color + list_card_background_mode_category <- c("data", "transparent", "fixed", NULL) + if (!is.null(card_background_mode_category)) { + if (!card_background_mode_category %in% list_card_background_mode_category) { + stop("`card_background_mode_category` must be one of: c('data', 'transparent', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "transparent": "transparent", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "transparent": "transparent", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && card_background_mode_category %in% names(named_list)) { + if (is.logical(card_background_mode_category)) { + card_background_mode_category <- as.character(card_background_mode_category) + } + named_list_value <- unname(named_list[card_background_mode_category])[[1]] + new_list$x$state$card_background_mode_category <- named_list_value + } + } + } + } + new_list$x$state$card_background_color_category <- card_background_color_category + list_image_background_mode <- c("transparent", "fixed", NULL) + if (!is.null(image_background_mode)) { + if (!image_background_mode %in% list_image_background_mode) { + stop("`image_background_mode` must be one of: c('transparent', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"transparent": "transparent", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"transparent": "transparent", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_background_mode %in% names(named_list)) { + if (is.logical(image_background_mode)) { + image_background_mode <- as.character(image_background_mode) + } + named_list_value <- unname(named_list[image_background_mode])[[1]] + new_list$x$state$image_background_mode <- named_list_value + } + } + } + } + new_list$x$state$image_background_color <- image_background_color + list_image_background_mode_category <- c("data", "transparent", "fixed", NULL) + if (!is.null(image_background_mode_category)) { + if (!image_background_mode_category %in% list_image_background_mode_category) { + stop("`image_background_mode_category` must be one of: c('data', 'transparent', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "transparent": "transparent", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "transparent": "transparent", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_background_mode_category %in% names(named_list)) { + if (is.logical(image_background_mode_category)) { + image_background_mode_category <- as.character(image_background_mode_category) + } + named_list_value <- unname(named_list[image_background_mode_category])[[1]] + new_list$x$state$image_background_mode_category <- named_list_value + } + } + } + } + new_list$x$state$image_background_color_category <- image_background_color_category + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popups$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popups$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popups$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popups$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popups$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popups$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popups$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popups$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popups$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popups$popup_width <- chart_popup_popup_width + new_list$x$state$popups$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popups$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popups$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popups$popup_background <- chart_popup_popup_background + new_list$x$state$popups$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popups$popup_padding <- chart_popup_popup_padding + new_list$x$state$popups$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popups$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popups$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popups$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popups$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popups$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popups$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popups$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popups$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popups$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popups$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popups$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popups$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popups$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popups$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popups$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popups$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popups$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popups$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popups$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popups$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popups$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popups$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popups$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popups$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popups$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popups$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popups$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popups$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popups$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popups$panel_background <- chart_popup_panel_background + new_list$x$state$popups$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popups$panel_padding <- chart_popup_panel_padding + new_list$x$state$popups$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popups$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popups$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popups$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popups$panel_shadow <- chart_popup_panel_shadow + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_legend_filter_mode <- c("none", "single", "multi", NULL) + if (!is.null(legend_filter_mode)) { + if (!legend_filter_mode %in% list_legend_filter_mode) { + stop("`legend_filter_mode` must be one of: c('none', 'single', 'multi')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "single": "single", "multi": "multi"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "single": "single", "multi": "multi"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_filter_mode %in% names(named_list)) { + if (is.logical(legend_filter_mode)) { + legend_filter_mode <- as.character(legend_filter_mode) + } + named_list_value <- unname(named_list[legend_filter_mode])[[1]] + new_list$x$state$legend_filter_mode <- named_list_value + } + } + } + } + list_chart_filter_controls_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_filter_controls_container_alignment)) { + if (!chart_filter_controls_container_alignment %in% list_chart_filter_controls_container_alignment) { + stop("`chart_filter_controls_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_container_alignment %in% names(named_list)) { + if (is.logical(chart_filter_controls_container_alignment)) { + chart_filter_controls_container_alignment <- as.character(chart_filter_controls_container_alignment) + } + named_list_value <- unname(named_list[chart_filter_controls_container_alignment])[[1]] + new_list$x$state$controls_container$alignment <- named_list_value + } + } + } + } + new_list$x$state$controls_container$controls_spacing <- chart_filter_controls_container_controls_spacing + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$filter_controls$control_type <- named_list_value + } + } + } + } + new_list$x$state$filter_controls$control_styles <- chart_filter_controls_control_styles + new_list$x$state$filter_controls$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$filter_controls$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$filter_controls$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_controls$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$filter_controls$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_controls$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$filter_controls$slider_width <- chart_filter_controls_slider_width + new_list$x$state$filter_controls$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$filter_controls$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$filter_controls$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$filter_controls$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$filter_controls$sort <- named_list_value + } + } + } + } + new_list$x$state$filter_show_all <- filter_show_all + new_list$x$state$filter_show_all_text <- filter_show_all_text + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$slider_style$track_color <- chart_slider_control_style_track_color + new_list$x$state$slider_style$font_color <- chart_slider_control_style_font_color + new_list$x$state$slider_style$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$slider_style$play_color <- chart_slider_control_style_play_color + new_list$x$state$slider_style$track_height <- chart_slider_control_style_track_height + new_list$x$state$slider_style$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$slider_style$play_button <- chart_slider_control_style_play_button + list_audio_click <- c("replay", "stop", "pause", NULL) + if (!is.null(audio_click)) { + if (!audio_click %in% list_audio_click) { + stop("`audio_click` must be one of: c('replay', 'stop', 'pause')") + } else { + if (length(jsonlite::fromJSON('{"replay": "replay", "stop": "stop", "pause": "pause"}')) > 1) { + named_list <- jsonlite::fromJSON('{"replay": "replay", "stop": "stop", "pause": "pause"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && audio_click %in% names(named_list)) { + if (is.logical(audio_click)) { + audio_click <- as.character(audio_click) + } + named_list_value <- unname(named_list[audio_click])[[1]] + new_list$x$state$audio_click <- named_list_value + } + } + } + } + new_list$x$state$audio_animation <- audio_animation + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + new_list$x$state$url_state$enabled <- chart_url_settings_enabled + if (length(chart_url_settings_whitelist) > 1) { + new_list$x$state$url_state$whitelist <- paste(chart_url_settings_whitelist, collapse = "\n") + } else { + new_list$x$state$url_state$whitelist <- chart_url_settings_whitelist + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_chord_diagram_details.R b/R_package/R/set_chord_diagram_details.R new file mode 100644 index 0000000..36501a5 --- /dev/null +++ b/R_package/R/set_chord_diagram_details.R @@ -0,0 +1,2407 @@ +#' Set chord diagram chart details +#' @name set_chord_diagram_details +#' @param opacity_default Default opacity. Opacity for the default view. Flourish type hint: number, defaults to `NULL` +#' @param opacity_focused Focused opacity. Opacity for the selected and/or hovered chords. Flourish type hint: number, defaults to `NULL` +#' @param opacity_defocused Defocused opacity. Opacity for the background chords when one is in focus. Flourish type hint: number, defaults to `NULL` +#' @param selected_chords Highlight chords. You can highlight all of an arcs chords by typing the name of the arc. Alternatively, you can highlight individual chords by typing the name of the two arcs that it connects using the format: Arc 1 >> Arc 2 If you wanted to highlight all chords from "Arc 3" and any chords between "Arc 1" and "Arc 2" you would write: Arc 3 Arc 1 >> Arc 2 If you wish to highlight/unhighlight in the story editor you can do so by clicking on chords. Flourish type hint: text, defaults to `NULL` +#' @param use_mouseover_label Show chord values on hover. Flourish type hint: boolean, defaults to `NULL` +#' @param show_selected_label Keep chord values on click. Flourish type hint: boolean, defaults to `NULL` +#' @param chord_labels_reponsive Label text size. Choices: `TRUE`, `FALSE`. Auto changes the label size based on the window size, subject to the specified min and max. Flourish type hint: boolean, defaults to `NULL` +#' @param chord_label_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chord_label_font_size_min Min size. Flourish type hint: number, defaults to `NULL` +#' @param chord_label_font_size_max Max size. Flourish type hint: number, defaults to `NULL` +#' @param show_chord_stroke Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chord_stroke_color Stroke color. Flourish type hint: color, defaults to `NULL` +#' @param chord_stroke_opacity Stroke opacity. Flourish type hint: number, defaults to `NULL` +#' @param arc_thickness Thickness. As a percentage of the radius. Flourish type hint: number, defaults to `NULL` +#' @param arc_spacing Space below. As a percentage of the radius. Flourish type hint: number, defaults to `NULL` +#' @param pad_angle Space between. In degrees. Flourish type hint: number, defaults to `NULL` +#' @param label_alignment Alignment. Choices: along_arcs, 90_rotated. Flourish type hint: string, defaults to `NULL` +#' @param label_responsive Label text size. Choices: `TRUE`, `FALSE`. Auto changes the label size based on the window size, subject to the specified min and max. Flourish type hint: boolean, defaults to `NULL` +#' @param label_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param label_font_size_min Min size. Flourish type hint: number, defaults to `NULL` +#' @param label_font_size_max Max size. Flourish type hint: number, defaults to `NULL` +#' @param label_color Label color. Flourish type hint: color, defaults to `NULL` +#' @param use_label_color_arc Make the arc label color the same as the arc color. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param gradient_type Chord color mode. Choices: linear_gradient, largest_end, smallest_end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_show_popups Popups. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_is_custom Popup contents. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_custom_template Popup content. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_show_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_style_popups Custom styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_text_color Text colour. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_text_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_fill_color Fill colour. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_border_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param popup_type Position. Choices: directional, non_directional. Flourish type hint: string, defaults to `NULL` +#' @param popup_content Popup description. Add a title or a discription to help explain your tooltip. Flourish type hint: text, defaults to `NULL` +#' @param animation_speed Animation duration. The duration, in seconds, of transitions for example between two slides in a story Flourish type hint: number, defaults to `NULL` +#' @param chart_number_localization_input_decimal_separator Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_output_separators Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to `NULL` +#' @param chart_label_number_date_format_prefix Prefix. Text to place in front of number. Flourish type hint: string, defaults to `NULL` +#' @param chart_label_number_date_format_suffix Suffix. Text to place after number. Flourish type hint: string, defaults to `NULL` +#' @param chart_label_number_date_format_n_dec Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_label_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_label_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_label_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_label_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_label_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_label_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_label_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_label_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_scale Chart scale. Flourish type hint: number, defaults to `NULL` +#' @param allow_resize Allow embeds to resize. Checking this option allows the visualization to resize so the chord diagram is always a square without white space to the sides or top/bottom. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "chord_diagram", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_chord_diagram_data(gapminder) |> +#' set_chord_diagram_details() +#' ) +#' @export + +set_chord_diagram_details <- function( + ., + opacity_default = NULL, + opacity_focused = NULL, + opacity_defocused = NULL, + selected_chords = NULL, + use_mouseover_label = NULL, + show_selected_label = NULL, + chord_labels_reponsive = NULL, + chord_label_font_size = NULL, + chord_label_font_size_min = NULL, + chord_label_font_size_max = NULL, + show_chord_stroke = NULL, + chord_stroke_color = NULL, + chord_stroke_opacity = NULL, + arc_thickness = NULL, + arc_spacing = NULL, + pad_angle = NULL, + label_alignment = NULL, + label_responsive = NULL, + label_font_size = NULL, + label_font_size_min = NULL, + label_font_size_max = NULL, + label_color = NULL, + use_label_color_arc = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + gradient_type = NULL, + chart_popup_show_popups = NULL, + chart_popup_is_custom = NULL, + chart_popup_custom_template = NULL, + chart_popup_show_pointer = NULL, + chart_popup_show_shadow = NULL, + chart_popup_style_popups = NULL, + chart_popup_text_color = NULL, + chart_popup_align = NULL, + chart_popup_text_size = NULL, + chart_popup_fill_color = NULL, + chart_popup_opacity = NULL, + chart_popup_padding = NULL, + chart_popup_border_radius = NULL, + chart_popup_max_width = NULL, + popup_type = NULL, + popup_content = NULL, + animation_speed = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_label_number_date_format_prefix = NULL, + chart_label_number_date_format_suffix = NULL, + chart_label_number_date_format_n_dec = NULL, + chart_label_number_date_format_advanced = NULL, + chart_label_number_date_format_negative_sign = NULL, + chart_label_number_date_format_strip_zeros = NULL, + chart_label_number_date_format_strip_separator = NULL, + chart_label_number_date_format_transform_labels = NULL, + chart_label_number_date_format_transform = NULL, + chart_label_number_date_format_multiply_divide_constant = NULL, + chart_label_number_date_format_exponentiate_constant = NULL, + chart_scale = NULL, + allow_resize = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "chord_diagram") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/chord-diagram")) { + stop("`set_chord_diagram_details()` is not supported for this chart type.") + } + new_list$x$state$opacity_default <- opacity_default + new_list$x$state$opacity_focused <- opacity_focused + new_list$x$state$opacity_defocused <- opacity_defocused + if (length(selected_chords) > 1) { + new_list$x$state$selected_chords <- paste(selected_chords, collapse = "\n") + } else { + new_list$x$state$selected_chords <- selected_chords + } + + new_list$x$state$use_mouseover_label <- use_mouseover_label + new_list$x$state$show_selected_label <- show_selected_label + list_chord_labels_reponsive <- c(TRUE, FALSE, NULL) + if (!is.null(chord_labels_reponsive)) { + if (!chord_labels_reponsive %in% list_chord_labels_reponsive) { + stop("`chord_labels_reponsive` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chord_labels_reponsive %in% names(named_list)) { + if (is.logical(chord_labels_reponsive)) { + chord_labels_reponsive <- as.character(chord_labels_reponsive) + } + named_list_value <- unname(named_list[chord_labels_reponsive])[[1]] + new_list$x$state$chord_labels_reponsive <- named_list_value + } + } + } + } + new_list$x$state$chord_label_font_size <- chord_label_font_size + new_list$x$state$chord_label_font_size_min <- chord_label_font_size_min + new_list$x$state$chord_label_font_size_max <- chord_label_font_size_max + list_show_chord_stroke <- c(TRUE, FALSE, NULL) + if (!is.null(show_chord_stroke)) { + if (!show_chord_stroke %in% list_show_chord_stroke) { + stop("`show_chord_stroke` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && show_chord_stroke %in% names(named_list)) { + if (is.logical(show_chord_stroke)) { + show_chord_stroke <- as.character(show_chord_stroke) + } + named_list_value <- unname(named_list[show_chord_stroke])[[1]] + new_list$x$state$show_chord_stroke <- named_list_value + } + } + } + } + new_list$x$state$chord_stroke_color <- chord_stroke_color + new_list$x$state$chord_stroke_opacity <- chord_stroke_opacity + new_list$x$state$arc_thickness <- arc_thickness + new_list$x$state$arc_spacing <- arc_spacing + new_list$x$state$pad_angle <- pad_angle + list_label_alignment <- c("along_arcs", "90_rotated", NULL) + if (!is.null(label_alignment)) { + if (!label_alignment %in% list_label_alignment) { + stop("`label_alignment` must be one of: c('along_arcs', '90_rotated')") + } else { + if (length(jsonlite::fromJSON('{"along_arcs": "along_arcs", "90_rotated": "90_rotated"}')) > 1) { + named_list <- jsonlite::fromJSON('{"along_arcs": "along_arcs", "90_rotated": "90_rotated"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_alignment %in% names(named_list)) { + if (is.logical(label_alignment)) { + label_alignment <- as.character(label_alignment) + } + named_list_value <- unname(named_list[label_alignment])[[1]] + new_list$x$state$label_alignment <- named_list_value + } + } + } + } + list_label_responsive <- c(TRUE, FALSE, NULL) + if (!is.null(label_responsive)) { + if (!label_responsive %in% list_label_responsive) { + stop("`label_responsive` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_responsive %in% names(named_list)) { + if (is.logical(label_responsive)) { + label_responsive <- as.character(label_responsive) + } + named_list_value <- unname(named_list[label_responsive])[[1]] + new_list$x$state$label_responsive <- named_list_value + } + } + } + } + new_list$x$state$label_font_size <- label_font_size + new_list$x$state$label_font_size_min <- label_font_size_min + new_list$x$state$label_font_size_max <- label_font_size_max + new_list$x$state$label_color <- label_color + new_list$x$state$use_label_color_arc <- use_label_color_arc + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + list_gradient_type <- c("linear_gradient", "largest_end", "smallest_end", NULL) + if (!is.null(gradient_type)) { + if (!gradient_type %in% list_gradient_type) { + stop("`gradient_type` must be one of: c('linear_gradient', 'largest_end', 'smallest_end')") + } else { + if (length(jsonlite::fromJSON('{"linear_gradient": "linear_gradient", "largest_end": "largest_end", "smallest_end": "smallest_end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear_gradient": "linear_gradient", "largest_end": "largest_end", "smallest_end": "smallest_end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gradient_type %in% names(named_list)) { + if (is.logical(gradient_type)) { + gradient_type <- as.character(gradient_type) + } + named_list_value <- unname(named_list[gradient_type])[[1]] + new_list$x$state$gradient_type <- named_list_value + } + } + } + } + list_chart_popup_show_popups <- c(TRUE, FALSE, NULL) + if (!is.null(chart_popup_show_popups)) { + if (!chart_popup_show_popups %in% list_chart_popup_show_popups) { + stop("`chart_popup_show_popups` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_show_popups %in% names(named_list)) { + if (is.logical(chart_popup_show_popups)) { + chart_popup_show_popups <- as.character(chart_popup_show_popups) + } + named_list_value <- unname(named_list[chart_popup_show_popups])[[1]] + new_list$x$state$popup$show_popups <- named_list_value + } + } + } + } + list_chart_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_is_custom)) { + if (!chart_popup_is_custom %in% list_chart_popup_is_custom) { + stop("`chart_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_is_custom)) { + chart_popup_is_custom <- as.character(chart_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_is_custom])[[1]] + new_list$x$state$popup$is_custom <- named_list_value + } + } + } + } + if (length(chart_popup_custom_template) > 1) { + new_list$x$state$popup$custom_template <- paste(chart_popup_custom_template, collapse = "\n") + } else { + new_list$x$state$popup$custom_template <- chart_popup_custom_template + } + + new_list$x$state$popup$show_pointer <- chart_popup_show_pointer + new_list$x$state$popup$show_shadow <- chart_popup_show_shadow + new_list$x$state$popup$style_popups <- chart_popup_style_popups + new_list$x$state$popup$text_color <- chart_popup_text_color + list_chart_popup_align <- c("left", "center", "right", NULL) + if (!is.null(chart_popup_align)) { + if (!chart_popup_align %in% list_chart_popup_align) { + stop("`chart_popup_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_align)) { + chart_popup_align <- as.character(chart_popup_align) + } + named_list_value <- unname(named_list[chart_popup_align])[[1]] + new_list$x$state$popup$align <- named_list_value + } + } + } + } + new_list$x$state$popup$text_size <- chart_popup_text_size + new_list$x$state$popup$fill_color <- chart_popup_fill_color + new_list$x$state$popup$opacity <- chart_popup_opacity + new_list$x$state$popup$padding <- chart_popup_padding + new_list$x$state$popup$border_radius <- chart_popup_border_radius + new_list$x$state$popup$max_width <- chart_popup_max_width + list_popup_type <- c("directional", "non_directional", NULL) + if (!is.null(popup_type)) { + if (!popup_type %in% list_popup_type) { + stop("`popup_type` must be one of: c('directional', 'non_directional')") + } else { + if (length(jsonlite::fromJSON('{"directional": "directional", "non_directional": "non_directional"}')) > 1) { + named_list <- jsonlite::fromJSON('{"directional": "directional", "non_directional": "non_directional"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && popup_type %in% names(named_list)) { + if (is.logical(popup_type)) { + popup_type <- as.character(popup_type) + } + named_list_value <- unname(named_list[popup_type])[[1]] + new_list$x$state$popup_type <- named_list_value + } + } + } + } + if (length(popup_content) > 1) { + new_list$x$state$popup_content <- paste(popup_content, collapse = "\n") + } else { + new_list$x$state$popup_content <- popup_content + } + + new_list$x$state$animation_speed <- animation_speed + list_chart_number_localization_input_decimal_separator <- c(".", ",", NULL) + if (!is.null(chart_number_localization_input_decimal_separator)) { + if (!chart_number_localization_input_decimal_separator %in% list_chart_number_localization_input_decimal_separator) { + stop("`chart_number_localization_input_decimal_separator` must be one of: c('.', ',')") + } else { + if (length(jsonlite::fromJSON('{".": ".", ",": ","}')) > 1) { + named_list <- jsonlite::fromJSON('{".": ".", ",": ","}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_input_decimal_separator %in% names(named_list)) { + if (is.logical(chart_number_localization_input_decimal_separator)) { + chart_number_localization_input_decimal_separator <- as.character(chart_number_localization_input_decimal_separator) + } + named_list_value <- unname(named_list[chart_number_localization_input_decimal_separator])[[1]] + new_list$x$state$localization$input_decimal_separator <- named_list_value + } + } + } + } + list_chart_number_localization_output_separators <- c(",.", ".,", ".", ",", " .", " ,", NULL) + if (!is.null(chart_number_localization_output_separators)) { + if (!chart_number_localization_output_separators %in% list_chart_number_localization_output_separators) { + stop("`chart_number_localization_output_separators` must be one of: c(',.', '.,', '.', ',', ' .', ' ,')") + } else { + if (length(jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}')) > 1) { + named_list <- jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_output_separators %in% names(named_list)) { + if (is.logical(chart_number_localization_output_separators)) { + chart_number_localization_output_separators <- as.character(chart_number_localization_output_separators) + } + named_list_value <- unname(named_list[chart_number_localization_output_separators])[[1]] + new_list$x$state$localization$output_separators <- named_list_value + } + } + } + } + new_list$x$state$label_format$prefix <- chart_label_number_date_format_prefix + new_list$x$state$label_format$suffix <- chart_label_number_date_format_suffix + new_list$x$state$label_format$n_dec <- chart_label_number_date_format_n_dec + new_list$x$state$label_format$advanced <- chart_label_number_date_format_advanced + list_chart_label_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_label_number_date_format_negative_sign)) { + if (!chart_label_number_date_format_negative_sign %in% list_chart_label_number_date_format_negative_sign) { + stop("`chart_label_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_label_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_label_number_date_format_negative_sign)) { + chart_label_number_date_format_negative_sign <- as.character(chart_label_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_label_number_date_format_negative_sign])[[1]] + new_list$x$state$label_format$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$label_format$strip_zeros <- chart_label_number_date_format_strip_zeros + new_list$x$state$label_format$strip_separator <- chart_label_number_date_format_strip_separator + new_list$x$state$label_format$transform_labels <- chart_label_number_date_format_transform_labels + list_chart_label_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_label_number_date_format_transform)) { + if (!chart_label_number_date_format_transform %in% list_chart_label_number_date_format_transform) { + stop("`chart_label_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_label_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_label_number_date_format_transform)) { + chart_label_number_date_format_transform <- as.character(chart_label_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_label_number_date_format_transform])[[1]] + new_list$x$state$label_format$transform <- named_list_value + } + } + } + } + new_list$x$state$label_format$multiply_divide_constant <- chart_label_number_date_format_multiply_divide_constant + new_list$x$state$label_format$exponentiate_constant <- chart_label_number_date_format_exponentiate_constant + new_list$x$state$chart_scale <- chart_scale + new_list$x$state$allow_resize <- allow_resize + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_countdown_details.R b/R_package/R/set_countdown_details.R new file mode 100644 index 0000000..41bc2a6 --- /dev/null +++ b/R_package/R/set_countdown_details.R @@ -0,0 +1,1674 @@ +#' Set countdown chart details +#' @name set_countdown_details +#' @param date_day Day. Flourish type hint: number, defaults to `NULL` +#' @param date_month Month. Flourish type hint: number, defaults to `NULL` +#' @param date_year Year. If your date is in the future, the tool will count down to it If its in the past, the tool will count up, showing the number of days that have passed since the date. Flourish type hint: number, defaults to `NULL` +#' @param date_hour Hour. 0 to 23. Flourish type hint: number, defaults to `NULL` +#' @param date_minute Minute. Flourish type hint: number, defaults to `NULL` +#' @param date_second Second. Flourish type hint: number, defaults to `NULL` +#' @param before_content_mode Text mode. Choices: auto, custom. Displays while counting down to the specified time/date. Flourish type hint: string, defaults to `NULL` +#' @param before_content_custom Custom text before date/time reached. Can include any text or HTML Use `{{d}}` for days, `{{h}}` for hours, `{{m}}` for minutes and `{{s}}` for seconds. Flourish type hint: text, defaults to `NULL` +#' @param after_content_mode Text mode. Choices: auto, custom. Displays while counting upwards after the specified time/date. Flourish type hint: string, defaults to `NULL` +#' @param after_content_custom Custom text after date/time reached. Can include any text or HTML Use `{{d}}` for days, `{{h}}` for hours, `{{m}}` for minutes and `{{s}}` for seconds. Flourish type hint: text, defaults to `NULL` +#' @param countdown_size Size. Measured in vw (percentage of view window). This makes sure the countdown always scales with the page. Flourish type hint: number, defaults to `NULL` +#' @param countdown_color Color. Flourish type hint: color, defaults to `NULL` +#' @param countdown_weight Weight. Choices: 400, 600. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "countdown", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' set_countdown_details() +#' ) +#' @export + +set_countdown_details <- function( + ., + date_day = NULL, + date_month = NULL, + date_year = NULL, + date_hour = NULL, + date_minute = NULL, + date_second = NULL, + before_content_mode = NULL, + before_content_custom = NULL, + after_content_mode = NULL, + after_content_custom = NULL, + countdown_size = NULL, + countdown_color = NULL, + countdown_weight = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "countdown") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/countdown")) { + stop("`set_countdown_details()` is not supported for this chart type.") + } + new_list$x$state$date$day <- date_day + new_list$x$state$date$month <- date_month + new_list$x$state$date$year <- date_year + new_list$x$state$date$hour <- date_hour + new_list$x$state$date$minute <- date_minute + new_list$x$state$date$second <- date_second + list_before_content_mode <- c("auto", "custom", NULL) + if (!is.null(before_content_mode)) { + if (!before_content_mode %in% list_before_content_mode) { + stop("`before_content_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && before_content_mode %in% names(named_list)) { + if (is.logical(before_content_mode)) { + before_content_mode <- as.character(before_content_mode) + } + named_list_value <- unname(named_list[before_content_mode])[[1]] + new_list$x$state$before_content_mode <- named_list_value + } + } + } + } + if (length(before_content_custom) > 1) { + new_list$x$state$before_content_custom <- paste(before_content_custom, collapse = "\n") + } else { + new_list$x$state$before_content_custom <- before_content_custom + } + + list_after_content_mode <- c("auto", "custom", NULL) + if (!is.null(after_content_mode)) { + if (!after_content_mode %in% list_after_content_mode) { + stop("`after_content_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && after_content_mode %in% names(named_list)) { + if (is.logical(after_content_mode)) { + after_content_mode <- as.character(after_content_mode) + } + named_list_value <- unname(named_list[after_content_mode])[[1]] + new_list$x$state$after_content_mode <- named_list_value + } + } + } + } + if (length(after_content_custom) > 1) { + new_list$x$state$after_content_custom <- paste(after_content_custom, collapse = "\n") + } else { + new_list$x$state$after_content_custom <- after_content_custom + } + + new_list$x$state$countdown_size <- countdown_size + new_list$x$state$countdown_color <- countdown_color + list_countdown_weight <- c("400", "600", NULL) + if (!is.null(countdown_weight)) { + if (!countdown_weight %in% list_countdown_weight) { + stop("`countdown_weight` must be one of: c('400', '600')") + } else { + if (length(jsonlite::fromJSON('{"400": "400", "600": "600"}')) > 1) { + named_list <- jsonlite::fromJSON('{"400": "400", "600": "600"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && countdown_weight %in% names(named_list)) { + if (is.logical(countdown_weight)) { + countdown_weight <- as.character(countdown_weight) + } + named_list_value <- unname(named_list[countdown_weight])[[1]] + new_list$x$state$countdown_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_draw_the_line_details.R b/R_package/R/set_draw_the_line_details.R new file mode 100644 index 0000000..bfff9ed --- /dev/null +++ b/R_package/R/set_draw_the_line_details.R @@ -0,0 +1,3799 @@ +#' Set draw the line chart chart details +#' @name set_draw_the_line_details +#' @param guess_lines_start Percent to reveal. What percentage of the line to show before a user starts drawing. Flourish type hint: number, defaults to `NULL` +#' @param guess_lines_width Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param guess_lines_dot_radius Dot radius. Flourish type hint: number, defaults to `NULL` +#' @param guess_lines_dash Drawing dash size. Only applies to the drawn section of the line. Set to zero for a solid line. Flourish type hint: number, defaults to `NULL` +#' @param fixed_lines_width Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param fixed_lines_dot_radius Dot radius. Flourish type hint: number, defaults to `NULL` +#' @param line_curve Live curve. Choices: linear, step, curve. Flourish type hint: string, defaults to `NULL` +#' @param guess_lines_panel_position Position. Choices: top, middle, bottom. Flourish type hint: string, defaults to `NULL` +#' @param message_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param message_background Background. Flourish type hint: color, defaults to `NULL` +#' @param message_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param message_color Font color. Flourish type hint: color, defaults to `NULL` +#' @param message_font_size Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param message_border Border color. Flourish type hint: color, defaults to `NULL` +#' @param message_border_width Border width. In pixels. Flourish type hint: number, defaults to `NULL` +#' @param message_border_radius Border radius. In rems, a multiple of the panels font size. Flourish type hint: number, defaults to `NULL` +#' @param message_shadow Drop shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param guess_lines_message_text Text. Include `{{LINE}}` to show the lines name, in color. Flourish type hint: string, defaults to `NULL` +#' @param scores_3_min % error. Specified as the maximum percentage error allowed, relative to the total Y axis. Flourish type hint: number, defaults to `NULL` +#' @param scores_3_text Text. Use `{{DIFF}}` to show the average gap from the users guess to the real data point. Flourish type hint: string, defaults to `NULL` +#' @param scores_2_min % error. Specified as the maximum percentage error allowed, relative to the total Y axis. Flourish type hint: number, defaults to `NULL` +#' @param scores_2_text Text. Flourish type hint: string, defaults to `NULL` +#' @param scores_1_min % error. Specified as the maximum percentage error allowed, relative to the total Y axis. Flourish type hint: number, defaults to `NULL` +#' @param scores_1_text Text. Flourish type hint: string, defaults to `NULL` +#' @param scores_0_text Text. Flourish type hint: string, defaults to `NULL` +#' @param guess_lines_submit_text Text. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to `NULL` +#' @param submit_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param submit_background Background. Flourish type hint: color, defaults to `NULL` +#' @param submit_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param submit_color Font color. Flourish type hint: color, defaults to `NULL` +#' @param submit_font_size Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param submit_border Border colour. Flourish type hint: color, defaults to `NULL` +#' @param submit_border_width Border width. In pixels. Flourish type hint: number, defaults to `NULL` +#' @param submit_border_radius Border radius. In ems a multiple of the panels font size. Flourish type hint: number, defaults to `NULL` +#' @param submit_shadow Drop shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_axis_position Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_y_axis_position Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_zero_axis Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_position Position. Choices: default, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_side Tick side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_axis_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_zero_axis Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_title_position Position. Choices: side, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_position Position. Choices: default, above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_side Side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_background_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_background_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_background_background_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_background_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_background_background_image_size Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to `NULL` +#' @param chart_background_background_image_position Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to `NULL` +#' @param datetime_input_format Format in data sheet. Choices: auto, %Y-%m-%dT%H:%M:%S.%LZ, %Y-%m-%d, %m/%d/%Y, %d/%m/%Y, %d-%b-%y, %m/%Y, %m/%y, %b %Y, %b %y, %B %d, %d %b, %Y, %y, %B, %b, %H:%M:%S, %I:%M %p, %H:%M. The date/time format in the datasheet. Leave as Auto for Flourish to make a best guess. If it isnt in the list, you can enter a custom format using d3-time-format syntax. See NPM d3-data-format for details. Flourish type hint: string, defaults to `NULL` +#' @param date_format Display format. Choices: auto, %Y-%m-%dT%H:%M:%S.%LZ, %Y-%m-%d, %m/%d/%Y, %d/%m/%Y, %d-%b-%y, %m/%Y, %m/%y, %b %Y, %b %y, %B %d, %d %b, %Y, %y, %B, %b, %A, %a, %H:%M:%S, %I:%M %p, %H:%M. The date/time format to show in the graphic. If it isnt in the list, you can enter a custom format using d3-time-format syntax. See NPM d3-data-format for details. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_input_decimal_separator Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_output_separators Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "draw_the_line", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_draw_the_line_data(gapminder) |> +#' set_draw_the_line_details() +#' ) +#' @export + +set_draw_the_line_details <- function( + ., + guess_lines_start = NULL, + guess_lines_width = NULL, + guess_lines_dot_radius = NULL, + guess_lines_dash = NULL, + fixed_lines_width = NULL, + fixed_lines_dot_radius = NULL, + line_curve = NULL, + guess_lines_panel_position = NULL, + message_styling = NULL, + message_background = NULL, + message_opacity = NULL, + message_color = NULL, + message_font_size = NULL, + message_border = NULL, + message_border_width = NULL, + message_border_radius = NULL, + message_shadow = NULL, + guess_lines_message_text = NULL, + scores_3_min = NULL, + scores_3_text = NULL, + scores_2_min = NULL, + scores_2_text = NULL, + scores_1_min = NULL, + scores_1_text = NULL, + scores_0_text = NULL, + guess_lines_submit_text = NULL, + submit_styling = NULL, + submit_background = NULL, + submit_opacity = NULL, + submit_color = NULL, + submit_font_size = NULL, + submit_border = NULL, + submit_border_width = NULL, + submit_border_radius = NULL, + submit_shadow = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + chart_background_background_color_enabled = NULL, + chart_background_background_image_enabled = NULL, + chart_background_background_color = NULL, + chart_background_background_image_src = NULL, + chart_background_background_image_size = NULL, + chart_background_background_image_position = NULL, + datetime_input_format = NULL, + date_format = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "draw_the_line") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/draw-the-line")) { + stop("`set_draw_the_line_details()` is not supported for this chart type.") + } + new_list$x$state$guess_lines_start <- guess_lines_start + new_list$x$state$guess_lines_width <- guess_lines_width + new_list$x$state$guess_lines_dot_radius <- guess_lines_dot_radius + new_list$x$state$guess_lines_dash <- guess_lines_dash + new_list$x$state$fixed_lines_width <- fixed_lines_width + new_list$x$state$fixed_lines_dot_radius <- fixed_lines_dot_radius + list_line_curve <- c("linear", "step", "curve", NULL) + if (!is.null(line_curve)) { + if (!line_curve %in% list_line_curve) { + stop("`line_curve` must be one of: c('linear', 'step', 'curve')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "step": "step", "curve": "curve"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "step": "step", "curve": "curve"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && line_curve %in% names(named_list)) { + if (is.logical(line_curve)) { + line_curve <- as.character(line_curve) + } + named_list_value <- unname(named_list[line_curve])[[1]] + new_list$x$state$line_curve <- named_list_value + } + } + } + } + list_guess_lines_panel_position <- c("top", "middle", "bottom", NULL) + if (!is.null(guess_lines_panel_position)) { + if (!guess_lines_panel_position %in% list_guess_lines_panel_position) { + stop("`guess_lines_panel_position` must be one of: c('top', 'middle', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "middle": "middle", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "middle": "middle", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && guess_lines_panel_position %in% names(named_list)) { + if (is.logical(guess_lines_panel_position)) { + guess_lines_panel_position <- as.character(guess_lines_panel_position) + } + named_list_value <- unname(named_list[guess_lines_panel_position])[[1]] + new_list$x$state$guess_lines_panel_position <- named_list_value + } + } + } + } + new_list$x$state$message_styling <- message_styling + new_list$x$state$message_background <- message_background + new_list$x$state$message_opacity <- message_opacity + new_list$x$state$message_color <- message_color + new_list$x$state$message_font_size <- message_font_size + new_list$x$state$message_border <- message_border + new_list$x$state$message_border_width <- message_border_width + new_list$x$state$message_border_radius <- message_border_radius + new_list$x$state$message_shadow <- message_shadow + new_list$x$state$guess_lines_message_text <- guess_lines_message_text + new_list$x$state$scores_3_min <- scores_3_min + new_list$x$state$scores_3_text <- scores_3_text + new_list$x$state$scores_2_min <- scores_2_min + new_list$x$state$scores_2_text <- scores_2_text + new_list$x$state$scores_1_min <- scores_1_min + new_list$x$state$scores_1_text <- scores_1_text + new_list$x$state$scores_0_text <- scores_0_text + new_list$x$state$guess_lines_submit_text <- guess_lines_submit_text + new_list$x$state$submit_styling <- submit_styling + new_list$x$state$submit_background <- submit_background + new_list$x$state$submit_opacity <- submit_opacity + new_list$x$state$submit_color <- submit_color + new_list$x$state$submit_font_size <- submit_font_size + new_list$x$state$submit_border <- submit_border + new_list$x$state$submit_border_width <- submit_border_width + new_list$x$state$submit_border_radius <- submit_border_radius + new_list$x$state$submit_shadow <- submit_shadow + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_chart_x_axis_axis_position <- c("bottom", "float-below", "float-above", "top", "off", NULL) + if (!is.null(chart_x_axis_axis_position)) { + if (!chart_x_axis_axis_position %in% list_chart_x_axis_axis_position) { + stop("`chart_x_axis_axis_position` must be one of: c('bottom', 'float-below', 'float-above', 'top', 'off')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_axis_position %in% names(named_list)) { + if (is.logical(chart_x_axis_axis_position)) { + chart_x_axis_axis_position <- as.character(chart_x_axis_axis_position) + } + named_list_value <- unname(named_list[chart_x_axis_axis_position])[[1]] + new_list$x$state$x$axis_position <- named_list_value + } + } + } + } + new_list$x$state$x$y_axis_position <- chart_x_axis_y_axis_position + list_chart_x_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_x_axis_numeric_scale_type)) { + if (!chart_x_axis_numeric_scale_type %in% list_chart_x_axis_numeric_scale_type) { + stop("`chart_x_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_x_axis_numeric_scale_type)) { + chart_x_axis_numeric_scale_type <- as.character(chart_x_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_x_axis_numeric_scale_type])[[1]] + new_list$x$state$x$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$x$linear_min <- chart_x_axis_linear_min + new_list$x$state$x$linear_max <- chart_x_axis_linear_max + new_list$x$state$x$log_min <- chart_x_axis_log_min + new_list$x$state$x$log_max <- chart_x_axis_log_max + new_list$x$state$x$datetime_min <- chart_x_axis_datetime_min + new_list$x$state$x$datetime_max <- chart_x_axis_datetime_max + new_list$x$state$x$flip <- chart_x_axis_flip + new_list$x$state$x$show_scale_settings <- chart_x_axis_show_scale_settings + list_chart_x_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_nice)) { + if (!chart_x_axis_nice %in% list_chart_x_axis_nice) { + stop("`chart_x_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_nice %in% names(named_list)) { + if (is.logical(chart_x_axis_nice)) { + chart_x_axis_nice <- as.character(chart_x_axis_nice) + } + named_list_value <- unname(named_list[chart_x_axis_nice])[[1]] + new_list$x$state$x$nice <- named_list_value + } + } + } + } + list_chart_x_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_x_axis_zero_axis)) { + if (!chart_x_axis_zero_axis %in% list_chart_x_axis_zero_axis) { + stop("`chart_x_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_x_axis_zero_axis)) { + chart_x_axis_zero_axis <- as.character(chart_x_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_x_axis_zero_axis])[[1]] + new_list$x$state$x$zero_axis <- named_list_value + } + } + } + } + list_chart_x_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_x_axis_title_mode)) { + if (!chart_x_axis_title_mode %in% list_chart_x_axis_title_mode) { + stop("`chart_x_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_title_mode)) { + chart_x_axis_title_mode <- as.character(chart_x_axis_title_mode) + } + named_list_value <- unname(named_list[chart_x_axis_title_mode])[[1]] + new_list$x$state$x$title_mode <- named_list_value + } + } + } + } + new_list$x$state$x$title <- chart_x_axis_title + new_list$x$state$x$title_styling <- chart_x_axis_title_styling + list_chart_x_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_title_weight)) { + if (!chart_x_axis_title_weight %in% list_chart_x_axis_title_weight) { + stop("`chart_x_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_title_weight)) { + chart_x_axis_title_weight <- as.character(chart_x_axis_title_weight) + } + named_list_value <- unname(named_list[chart_x_axis_title_weight])[[1]] + new_list$x$state$x$title_weight <- named_list_value + } + } + } + } + new_list$x$state$x$title_color <- chart_x_axis_title_color + new_list$x$state$x$title_size <- chart_x_axis_title_size + new_list$x$state$x$title_padding <- chart_x_axis_title_padding + list_chart_x_axis_tick_label_position <- c("default", "left", "right", NULL) + if (!is.null(chart_x_axis_tick_label_position)) { + if (!chart_x_axis_tick_label_position %in% list_chart_x_axis_tick_label_position) { + stop("`chart_x_axis_tick_label_position` must be one of: c('default', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_position)) { + chart_x_axis_tick_label_position <- as.character(chart_x_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_position])[[1]] + new_list$x$state$x$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_styling <- chart_x_axis_tick_label_styling + new_list$x$state$x$tick_label_size <- chart_x_axis_tick_label_size + new_list$x$state$x$tick_label_color <- chart_x_axis_tick_label_color + new_list$x$state$x$tick_padding <- chart_x_axis_tick_padding + list_chart_x_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_x_axis_tick_label_angle)) { + if (!chart_x_axis_tick_label_angle %in% list_chart_x_axis_tick_label_angle) { + stop("`chart_x_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_angle)) { + chart_x_axis_tick_label_angle <- as.character(chart_x_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_angle])[[1]] + new_list$x$state$x$tick_label_angle <- named_list_value + } + } + } + } + list_chart_x_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_tick_label_weight)) { + if (!chart_x_axis_tick_label_weight %in% list_chart_x_axis_tick_label_weight) { + stop("`chart_x_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_weight)) { + chart_x_axis_tick_label_weight <- as.character(chart_x_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_weight])[[1]] + new_list$x$state$x$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_max_lines <- chart_x_axis_tick_label_max_lines + new_list$x$state$x$tick_label_line_height <- chart_x_axis_tick_label_line_height + list_chart_x_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_x_axis_tick_label_space_mode)) { + if (!chart_x_axis_tick_label_space_mode %in% list_chart_x_axis_tick_label_space_mode) { + stop("`chart_x_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_space_mode)) { + chart_x_axis_tick_label_space_mode <- as.character(chart_x_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_space_mode])[[1]] + new_list$x$state$x$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_space <- chart_x_axis_tick_label_space + list_chart_x_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_x_axis_tick_mode)) { + if (!chart_x_axis_tick_mode %in% list_chart_x_axis_tick_mode) { + stop("`chart_x_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_mode)) { + chart_x_axis_tick_mode <- as.character(chart_x_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_mode])[[1]] + new_list$x$state$x$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_number <- chart_x_axis_tick_number + if (length(chart_x_axis_tick_custom) > 1) { + new_list$x$state$x$tick_custom <- paste(chart_x_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$x$tick_custom <- chart_x_axis_tick_custom + } + + new_list$x$state$x$line_and_tick_color <- chart_x_axis_line_and_tick_color + new_list$x$state$x$line_and_tick_width <- chart_x_axis_line_and_tick_width + new_list$x$state$x$tick_length <- chart_x_axis_tick_length + list_chart_x_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_x_axis_tick_side)) { + if (!chart_x_axis_tick_side %in% list_chart_x_axis_tick_side) { + stop("`chart_x_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_side)) { + chart_x_axis_tick_side <- as.character(chart_x_axis_tick_side) + } + named_list_value <- unname(named_list[chart_x_axis_tick_side])[[1]] + new_list$x$state$x$tick_side <- named_list_value + } + } + } + } + new_list$x$state$x$line_visible <- chart_x_axis_line_visible + new_list$x$state$x$edge_padding <- chart_x_axis_edge_padding + list_chart_x_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_gridlines_visible)) { + if (!chart_x_axis_gridlines_visible %in% list_chart_x_axis_gridlines_visible) { + stop("`chart_x_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_x_axis_gridlines_visible)) { + chart_x_axis_gridlines_visible <- as.character(chart_x_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_x_axis_gridlines_visible])[[1]] + new_list$x$state$x$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$x$gridlines_styling <- chart_x_axis_gridlines_styling + new_list$x$state$x$gridline_color <- chart_x_axis_gridline_color + list_chart_x_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_x_axis_gridline_style)) { + if (!chart_x_axis_gridline_style %in% list_chart_x_axis_gridline_style) { + stop("`chart_x_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_x_axis_gridline_style)) { + chart_x_axis_gridline_style <- as.character(chart_x_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_x_axis_gridline_style])[[1]] + new_list$x$state$x$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$x$gridline_width <- chart_x_axis_gridline_width + new_list$x$state$x$gridline_category_dividers <- chart_x_axis_gridline_category_dividers + new_list$x$state$x$gridline_category_dividers_extend <- chart_x_axis_gridline_category_dividers_extend + list_chart_y_axis_axis_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_axis_visible)) { + if (!chart_y_axis_axis_visible %in% list_chart_y_axis_axis_visible) { + stop("`chart_y_axis_axis_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_axis_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_axis_visible)) { + chart_y_axis_axis_visible <- as.character(chart_y_axis_axis_visible) + } + named_list_value <- unname(named_list[chart_y_axis_axis_visible])[[1]] + new_list$x$state$y$axis_visible <- named_list_value + } + } + } + } + list_chart_y_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_y_axis_numeric_scale_type)) { + if (!chart_y_axis_numeric_scale_type %in% list_chart_y_axis_numeric_scale_type) { + stop("`chart_y_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_y_axis_numeric_scale_type)) { + chart_y_axis_numeric_scale_type <- as.character(chart_y_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_y_axis_numeric_scale_type])[[1]] + new_list$x$state$y$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$y$linear_min <- chart_y_axis_linear_min + new_list$x$state$y$linear_max <- chart_y_axis_linear_max + new_list$x$state$y$log_min <- chart_y_axis_log_min + new_list$x$state$y$log_max <- chart_y_axis_log_max + new_list$x$state$y$datetime_min <- chart_y_axis_datetime_min + new_list$x$state$y$datetime_max <- chart_y_axis_datetime_max + new_list$x$state$y$flip <- chart_y_axis_flip + new_list$x$state$y$show_scale_settings <- chart_y_axis_show_scale_settings + list_chart_y_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_nice)) { + if (!chart_y_axis_nice %in% list_chart_y_axis_nice) { + stop("`chart_y_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_nice %in% names(named_list)) { + if (is.logical(chart_y_axis_nice)) { + chart_y_axis_nice <- as.character(chart_y_axis_nice) + } + named_list_value <- unname(named_list[chart_y_axis_nice])[[1]] + new_list$x$state$y$nice <- named_list_value + } + } + } + } + list_chart_y_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_y_axis_zero_axis)) { + if (!chart_y_axis_zero_axis %in% list_chart_y_axis_zero_axis) { + stop("`chart_y_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_y_axis_zero_axis)) { + chart_y_axis_zero_axis <- as.character(chart_y_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_y_axis_zero_axis])[[1]] + new_list$x$state$y$zero_axis <- named_list_value + } + } + } + } + list_chart_y_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_y_axis_title_mode)) { + if (!chart_y_axis_title_mode %in% list_chart_y_axis_title_mode) { + stop("`chart_y_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_title_mode)) { + chart_y_axis_title_mode <- as.character(chart_y_axis_title_mode) + } + named_list_value <- unname(named_list[chart_y_axis_title_mode])[[1]] + new_list$x$state$y$title_mode <- named_list_value + } + } + } + } + new_list$x$state$y$title <- chart_y_axis_title + new_list$x$state$y$title_styling <- chart_y_axis_title_styling + list_chart_y_axis_title_position <- c("side", "end", NULL) + if (!is.null(chart_y_axis_title_position)) { + if (!chart_y_axis_title_position %in% list_chart_y_axis_title_position) { + stop("`chart_y_axis_title_position` must be one of: c('side', 'end')") + } else { + if (length(jsonlite::fromJSON('{"side": "side", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"side": "side", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_position %in% names(named_list)) { + if (is.logical(chart_y_axis_title_position)) { + chart_y_axis_title_position <- as.character(chart_y_axis_title_position) + } + named_list_value <- unname(named_list[chart_y_axis_title_position])[[1]] + new_list$x$state$y$title_position <- named_list_value + } + } + } + } + list_chart_y_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_title_weight)) { + if (!chart_y_axis_title_weight %in% list_chart_y_axis_title_weight) { + stop("`chart_y_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_title_weight)) { + chart_y_axis_title_weight <- as.character(chart_y_axis_title_weight) + } + named_list_value <- unname(named_list[chart_y_axis_title_weight])[[1]] + new_list$x$state$y$title_weight <- named_list_value + } + } + } + } + new_list$x$state$y$title_color <- chart_y_axis_title_color + new_list$x$state$y$title_size <- chart_y_axis_title_size + new_list$x$state$y$title_padding <- chart_y_axis_title_padding + list_chart_y_axis_tick_label_position <- c("default", "above", "below", NULL) + if (!is.null(chart_y_axis_tick_label_position)) { + if (!chart_y_axis_tick_label_position %in% list_chart_y_axis_tick_label_position) { + stop("`chart_y_axis_tick_label_position` must be one of: c('default', 'above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_position)) { + chart_y_axis_tick_label_position <- as.character(chart_y_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_position])[[1]] + new_list$x$state$y$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_styling <- chart_y_axis_tick_label_styling + new_list$x$state$y$tick_label_size <- chart_y_axis_tick_label_size + new_list$x$state$y$tick_label_color <- chart_y_axis_tick_label_color + new_list$x$state$y$tick_padding <- chart_y_axis_tick_padding + list_chart_y_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_y_axis_tick_label_angle)) { + if (!chart_y_axis_tick_label_angle %in% list_chart_y_axis_tick_label_angle) { + stop("`chart_y_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_angle)) { + chart_y_axis_tick_label_angle <- as.character(chart_y_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_angle])[[1]] + new_list$x$state$y$tick_label_angle <- named_list_value + } + } + } + } + list_chart_y_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_tick_label_weight)) { + if (!chart_y_axis_tick_label_weight %in% list_chart_y_axis_tick_label_weight) { + stop("`chart_y_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_weight)) { + chart_y_axis_tick_label_weight <- as.character(chart_y_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_weight])[[1]] + new_list$x$state$y$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_max_lines <- chart_y_axis_tick_label_max_lines + new_list$x$state$y$tick_label_line_height <- chart_y_axis_tick_label_line_height + list_chart_y_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_y_axis_tick_label_space_mode)) { + if (!chart_y_axis_tick_label_space_mode %in% list_chart_y_axis_tick_label_space_mode) { + stop("`chart_y_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_space_mode)) { + chart_y_axis_tick_label_space_mode <- as.character(chart_y_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_space_mode])[[1]] + new_list$x$state$y$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_space <- chart_y_axis_tick_label_space + list_chart_y_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_y_axis_tick_mode)) { + if (!chart_y_axis_tick_mode %in% list_chart_y_axis_tick_mode) { + stop("`chart_y_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_mode)) { + chart_y_axis_tick_mode <- as.character(chart_y_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_mode])[[1]] + new_list$x$state$y$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_number <- chart_y_axis_tick_number + if (length(chart_y_axis_tick_custom) > 1) { + new_list$x$state$y$tick_custom <- paste(chart_y_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$y$tick_custom <- chart_y_axis_tick_custom + } + + new_list$x$state$y$line_and_tick_color <- chart_y_axis_line_and_tick_color + new_list$x$state$y$line_and_tick_width <- chart_y_axis_line_and_tick_width + new_list$x$state$y$tick_length <- chart_y_axis_tick_length + list_chart_y_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_y_axis_tick_side)) { + if (!chart_y_axis_tick_side %in% list_chart_y_axis_tick_side) { + stop("`chart_y_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_side)) { + chart_y_axis_tick_side <- as.character(chart_y_axis_tick_side) + } + named_list_value <- unname(named_list[chart_y_axis_tick_side])[[1]] + new_list$x$state$y$tick_side <- named_list_value + } + } + } + } + new_list$x$state$y$line_visible <- chart_y_axis_line_visible + new_list$x$state$y$edge_padding <- chart_y_axis_edge_padding + list_chart_y_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_gridlines_visible)) { + if (!chart_y_axis_gridlines_visible %in% list_chart_y_axis_gridlines_visible) { + stop("`chart_y_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_gridlines_visible)) { + chart_y_axis_gridlines_visible <- as.character(chart_y_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_y_axis_gridlines_visible])[[1]] + new_list$x$state$y$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$y$gridlines_styling <- chart_y_axis_gridlines_styling + new_list$x$state$y$gridline_color <- chart_y_axis_gridline_color + list_chart_y_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_y_axis_gridline_style)) { + if (!chart_y_axis_gridline_style %in% list_chart_y_axis_gridline_style) { + stop("`chart_y_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_y_axis_gridline_style)) { + chart_y_axis_gridline_style <- as.character(chart_y_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_y_axis_gridline_style])[[1]] + new_list$x$state$y$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$y$gridline_width <- chart_y_axis_gridline_width + new_list$x$state$y$gridline_category_dividers <- chart_y_axis_gridline_category_dividers + new_list$x$state$y$gridline_category_dividers_extend <- chart_y_axis_gridline_category_dividers_extend + list_chart_background_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_background_background_color_enabled)) { + if (!chart_background_background_color_enabled %in% list_chart_background_background_color_enabled) { + stop("`chart_background_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_background_background_color_enabled)) { + chart_background_background_color_enabled <- as.character(chart_background_background_color_enabled) + } + named_list_value <- unname(named_list[chart_background_background_color_enabled])[[1]] + new_list$x$state$background$background_color_enabled <- named_list_value + } + } + } + } + list_chart_background_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_background_background_image_enabled)) { + if (!chart_background_background_image_enabled %in% list_chart_background_background_image_enabled) { + stop("`chart_background_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_background_background_image_enabled)) { + chart_background_background_image_enabled <- as.character(chart_background_background_image_enabled) + } + named_list_value <- unname(named_list[chart_background_background_image_enabled])[[1]] + new_list$x$state$background$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$background$background_color <- chart_background_background_color + new_list$x$state$background$background_image_src <- chart_background_background_image_src + list_chart_background_background_image_size <- c("stretch", "slice", "meet", NULL) + if (!is.null(chart_background_background_image_size)) { + if (!chart_background_background_image_size %in% list_chart_background_background_image_size) { + stop("`chart_background_background_image_size` must be one of: c('stretch', 'slice', 'meet')") + } else { + if (length(jsonlite::fromJSON('{"stretch": "stretch", "slice": "slice", "meet": "meet"}')) > 1) { + named_list <- jsonlite::fromJSON('{"stretch": "stretch", "slice": "slice", "meet": "meet"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_size %in% names(named_list)) { + if (is.logical(chart_background_background_image_size)) { + chart_background_background_image_size <- as.character(chart_background_background_image_size) + } + named_list_value <- unname(named_list[chart_background_background_image_size])[[1]] + new_list$x$state$background$background_image_size <- named_list_value + } + } + } + } + list_chart_background_background_image_position <- c("x_min_y_min", "x_mid_y_min", "x_max_y_min", "x_max_y_mid", "x_mid_y_mid", "x_min_y_max", "x_mid_y_max", "x_max_y_max", NULL) + if (!is.null(chart_background_background_image_position)) { + if (!chart_background_background_image_position %in% list_chart_background_background_image_position) { + stop("`chart_background_background_image_position` must be one of: c('x_min_y_min', 'x_mid_y_min', 'x_max_y_min', 'x_max_y_mid', 'x_mid_y_mid', 'x_min_y_max', 'x_mid_y_max', 'x_max_y_max')") + } else { + if (length(jsonlite::fromJSON('{"x_min_y_min": "xMinYMin", "x_mid_y_min": "xMidYMin", "x_max_y_min": "xMaxYMin", "x_max_y_mid": "xMaxYMid", "x_mid_y_mid": "xMidYMid", "x_min_y_max": "xMinYMax", "x_mid_y_max": "xMidYMax", "x_max_y_max": "xMaxYMax"}')) > 1) { + named_list <- jsonlite::fromJSON('{"x_min_y_min": "xMinYMin", "x_mid_y_min": "xMidYMin", "x_max_y_min": "xMaxYMin", "x_max_y_mid": "xMaxYMid", "x_mid_y_mid": "xMidYMid", "x_min_y_max": "xMinYMax", "x_mid_y_max": "xMidYMax", "x_max_y_max": "xMaxYMax"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_position %in% names(named_list)) { + if (is.logical(chart_background_background_image_position)) { + chart_background_background_image_position <- as.character(chart_background_background_image_position) + } + named_list_value <- unname(named_list[chart_background_background_image_position])[[1]] + new_list$x$state$background$background_image_position <- named_list_value + } + } + } + } + list_datetime_input_format <- c("auto", "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d", "%m/%d/%Y", "%d/%m/%Y", "%d-%b-%y", "%m/%Y", "%m/%y", "%b %Y", "%b %y", "%B %d", "%d %b", "%Y", "%y", "%B", "%b", "%H:%M:%S", "%I:%M %p", "%H:%M", NULL) + if (!is.null(datetime_input_format)) { + if (!datetime_input_format %in% list_datetime_input_format) { + stop("`datetime_input_format` must be one of: c('auto', '%Y-%m-%dT%H:%M:%S.%LZ', '%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%d-%b-%y', '%m/%Y', '%m/%y', '%b %Y', '%b %y', '%B %d', '%d %b', '%Y', '%y', '%B', '%b', '%H:%M:%S', '%I:%M %p', '%H:%M')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d": "%Y-%m-%d", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%d-%b-%y": "%d-%b-%y", "%m/%Y": "%m/%Y", "%m/%y": "%m/%y", "%b %Y": "%b %Y", "%b %y": "%b %y", "%B %d": "%B %d", "%d %b": "%d %b", "%Y": "%Y", "%y": "%y", "%B": "%B", "%b": "%b", "%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d": "%Y-%m-%d", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%d-%b-%y": "%d-%b-%y", "%m/%Y": "%m/%Y", "%m/%y": "%m/%y", "%b %Y": "%b %Y", "%b %y": "%b %y", "%B %d": "%B %d", "%d %b": "%d %b", "%Y": "%Y", "%y": "%y", "%B": "%B", "%b": "%b", "%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && datetime_input_format %in% names(named_list)) { + if (is.logical(datetime_input_format)) { + datetime_input_format <- as.character(datetime_input_format) + } + named_list_value <- unname(named_list[datetime_input_format])[[1]] + new_list$x$state$datetime_input_format <- named_list_value + } + } + } + } + list_date_format <- c("auto", "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d", "%m/%d/%Y", "%d/%m/%Y", "%d-%b-%y", "%m/%Y", "%m/%y", "%b %Y", "%b %y", "%B %d", "%d %b", "%Y", "%y", "%B", "%b", "%A", "%a", "%H:%M:%S", "%I:%M %p", "%H:%M", NULL) + if (!is.null(date_format)) { + if (!date_format %in% list_date_format) { + stop("`date_format` must be one of: c('auto', '%Y-%m-%dT%H:%M:%S.%LZ', '%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%d-%b-%y', '%m/%Y', '%m/%y', '%b %Y', '%b %y', '%B %d', '%d %b', '%Y', '%y', '%B', '%b', '%A', '%a', '%H:%M:%S', '%I:%M %p', '%H:%M')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d": "%Y-%m-%d", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%d-%b-%y": "%d-%b-%y", "%m/%Y": "%m/%Y", "%m/%y": "%m/%y", "%b %Y": "%b %Y", "%b %y": "%b %y", "%B %d": "%B %d", "%d %b": "%d %b", "%Y": "%Y", "\u2019%y": "\u2019%y", "%B": "%B", "%b": "%b", "%A": "%A", "%a": "%a", "%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d": "%Y-%m-%d", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%d-%b-%y": "%d-%b-%y", "%m/%Y": "%m/%Y", "%m/%y": "%m/%y", "%b %Y": "%b %Y", "%b %y": "%b %y", "%B %d": "%B %d", "%d %b": "%d %b", "%Y": "%Y", "\u2019%y": "\u2019%y", "%B": "%B", "%b": "%b", "%A": "%A", "%a": "%a", "%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && date_format %in% names(named_list)) { + if (is.logical(date_format)) { + date_format <- as.character(date_format) + } + named_list_value <- unname(named_list[date_format])[[1]] + new_list$x$state$date_format <- named_list_value + } + } + } + } + list_chart_number_localization_input_decimal_separator <- c(".", ",", NULL) + if (!is.null(chart_number_localization_input_decimal_separator)) { + if (!chart_number_localization_input_decimal_separator %in% list_chart_number_localization_input_decimal_separator) { + stop("`chart_number_localization_input_decimal_separator` must be one of: c('.', ',')") + } else { + if (length(jsonlite::fromJSON('{".": ".", ",": ","}')) > 1) { + named_list <- jsonlite::fromJSON('{".": ".", ",": ","}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_input_decimal_separator %in% names(named_list)) { + if (is.logical(chart_number_localization_input_decimal_separator)) { + chart_number_localization_input_decimal_separator <- as.character(chart_number_localization_input_decimal_separator) + } + named_list_value <- unname(named_list[chart_number_localization_input_decimal_separator])[[1]] + new_list$x$state$localization$input_decimal_separator <- named_list_value + } + } + } + } + list_chart_number_localization_output_separators <- c(",.", ".,", ".", ",", " .", " ,", NULL) + if (!is.null(chart_number_localization_output_separators)) { + if (!chart_number_localization_output_separators %in% list_chart_number_localization_output_separators) { + stop("`chart_number_localization_output_separators` must be one of: c(',.', '.,', '.', ',', ' .', ' ,')") + } else { + if (length(jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}')) > 1) { + named_list <- jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_output_separators %in% names(named_list)) { + if (is.logical(chart_number_localization_output_separators)) { + chart_number_localization_output_separators <- as.character(chart_number_localization_output_separators) + } + named_list_value <- unname(named_list[chart_number_localization_output_separators])[[1]] + new_list$x$state$localization$output_separators <- named_list_value + } + } + } + } + new_list$x$state$formatter$prefix <- chart_number_date_format_prefix + new_list$x$state$formatter$suffix <- chart_number_date_format_suffix + new_list$x$state$formatter$n_dec <- chart_number_date_format_n_dec + new_list$x$state$formatter$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$formatter$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$formatter$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$formatter$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$formatter$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$formatter$transform <- named_list_value + } + } + } + } + new_list$x$state$formatter$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$formatter$exponentiate_constant <- chart_number_date_format_exponentiate_constant + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_election_results_chart_details.R b/R_package/R/set_election_results_chart_details.R new file mode 100644 index 0000000..fd8c3a2 --- /dev/null +++ b/R_package/R/set_election_results_chart_details.R @@ -0,0 +1,3365 @@ +#' Set election results chart chart details +#' @name set_election_results_chart_details +#' @param bar_height Height. Flourish type hint: number, defaults to `NULL` +#' @param bar_background Background. Background color of part of chart thats not filled with data (ie. when filtering parties). Flourish type hint: color, defaults to `NULL` +#' @param show_party_name Show party name. Flourish type hint: boolean, defaults to `NULL` +#' @param label_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param label_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param use_custom_scale Scale type. Choices: `FALSE`, `TRUE`. On default, will use the sum of all data points as the max value. Enable this setting to use a custom value. Flourish type hint: boolean, defaults to `NULL` +#' @param custom_scale_max Max value for scale. This will set the maximum value of the scale. Eg. the total amount of seats to be won in an election. Flourish type hint: number, defaults to `NULL` +#' @param middle_line_position Position. Flourish type hint: number, defaults to `NULL` +#' @param middle_line_content Text. Flourish type hint: string, defaults to `NULL` +#' @param middle_line_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param middle_line_dashoffset Dash width and offset. Length of dashes and spaces seperated by a comma for example, 2,2. Measured in pixels. Flourish type hint: string, defaults to `NULL` +#' @param middle_line_width Thickness. Flourish type hint: number, defaults to `NULL` +#' @param middle_line_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_controls_spacing Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param legend_position Position. Choices: below, above. Flourish type hint: string, defaults to `NULL` +#' @param hide_empty_legend_items Hide zero-valued entries. Flourish type hint: boolean, defaults to `NULL` +#' @param placeholder_text No data placeholder text. Placeholder text if there is no data. Flourish type hint: string, defaults to `NULL` +#' @param subtitle_text Text below results. Flourish type hint: string, defaults to `NULL` +#' @param value_change_abbreviation Value change abbreviation. A suffix used to describe the change since the previous election. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. You can use various keywords to add informtion to custom popups. These include: `{{PARTY}}` : name of the party `{{CURRENT}}` : current value `{{HISTORICAL}}` : historical value `{{CHANGE}}` : change between the current and historical values Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. You can use various keywords to add informtion to custom popups. These include: `{{PARTY}}` : name of the party `{{CURRENT}}` : current value `{{HISTORICAL}}` : historical value `{{CHANGE}}` : change between the current and historical values Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_label_number_date_format_prefix Prefix. Text to place in front of number. Flourish type hint: string, defaults to `NULL` +#' @param chart_label_number_date_format_suffix Suffix. Text to place after number. Flourish type hint: string, defaults to `NULL` +#' @param chart_label_number_date_format_n_dec Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_label_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_label_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_label_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_label_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_label_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_label_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_label_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_label_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param label_suffix Historical label suffix. Suffix used to compare current and historical results. For example, "%" when data measures vote shares, or "seats" when data measures seats won. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_input_decimal_separator Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_output_separators Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_enabled Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_whitelist Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "election_results", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_election_results_chart_data(gapminder) |> +#' set_election_results_chart_details() +#' ) +#' @export + +set_election_results_chart_details <- function( + ., + bar_height = NULL, + bar_background = NULL, + show_party_name = NULL, + label_font_size = NULL, + label_font_color = NULL, + use_custom_scale = NULL, + custom_scale_max = NULL, + middle_line_position = NULL, + middle_line_content = NULL, + middle_line_text_color = NULL, + middle_line_dashoffset = NULL, + middle_line_width = NULL, + middle_line_color = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + legend_position = NULL, + hide_empty_legend_items = NULL, + placeholder_text = NULL, + subtitle_text = NULL, + value_change_abbreviation = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_label_number_date_format_prefix = NULL, + chart_label_number_date_format_suffix = NULL, + chart_label_number_date_format_n_dec = NULL, + chart_label_number_date_format_advanced = NULL, + chart_label_number_date_format_negative_sign = NULL, + chart_label_number_date_format_strip_zeros = NULL, + chart_label_number_date_format_strip_separator = NULL, + chart_label_number_date_format_transform_labels = NULL, + chart_label_number_date_format_transform = NULL, + chart_label_number_date_format_multiply_divide_constant = NULL, + chart_label_number_date_format_exponentiate_constant = NULL, + label_suffix = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL) { + details_error(., "election_results_chart") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/election-results-chart")) { + stop("`set_election_results_chart_details()` is not supported for this chart type.") + } + new_list$x$state$bar_height <- bar_height + new_list$x$state$bar_background <- bar_background + new_list$x$state$show_party_name <- show_party_name + new_list$x$state$label_font_size <- label_font_size + new_list$x$state$label_font_color <- label_font_color + list_use_custom_scale <- c(FALSE, TRUE, NULL) + if (!is.null(use_custom_scale)) { + if (!use_custom_scale %in% list_use_custom_scale) { + stop("`use_custom_scale` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && use_custom_scale %in% names(named_list)) { + if (is.logical(use_custom_scale)) { + use_custom_scale <- as.character(use_custom_scale) + } + named_list_value <- unname(named_list[use_custom_scale])[[1]] + new_list$x$state$use_custom_scale <- named_list_value + } + } + } + } + new_list$x$state$custom_scale_max <- custom_scale_max + new_list$x$state$middle_line_position <- middle_line_position + new_list$x$state$middle_line_content <- middle_line_content + new_list$x$state$middle_line_text_color <- middle_line_text_color + new_list$x$state$middle_line_dashoffset <- middle_line_dashoffset + new_list$x$state$middle_line_width <- middle_line_width + new_list$x$state$middle_line_color <- middle_line_color + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$filter_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$filter_control$control_styles <- chart_filter_controls_control_styles + new_list$x$state$filter_control$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$filter_control$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$filter_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$filter_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$filter_control$slider_width <- chart_filter_controls_slider_width + new_list$x$state$filter_control$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$filter_control$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$filter_control$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$filter_control$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$filter_control$sort <- named_list_value + } + } + } + } + list_chart_filter_controls_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_filter_controls_container_alignment)) { + if (!chart_filter_controls_container_alignment %in% list_chart_filter_controls_container_alignment) { + stop("`chart_filter_controls_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_container_alignment %in% names(named_list)) { + if (is.logical(chart_filter_controls_container_alignment)) { + chart_filter_controls_container_alignment <- as.character(chart_filter_controls_container_alignment) + } + named_list_value <- unname(named_list[chart_filter_controls_container_alignment])[[1]] + new_list$x$state$controls_container$alignment <- named_list_value + } + } + } + } + new_list$x$state$controls_container$controls_spacing <- chart_filter_controls_container_controls_spacing + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$slider_style$track_color <- chart_slider_control_style_track_color + new_list$x$state$slider_style$font_color <- chart_slider_control_style_font_color + new_list$x$state$slider_style$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$slider_style$play_color <- chart_slider_control_style_play_color + new_list$x$state$slider_style$track_height <- chart_slider_control_style_track_height + new_list$x$state$slider_style$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$slider_style$play_button <- chart_slider_control_style_play_button + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_legend_position <- c("below", "above", NULL) + if (!is.null(legend_position)) { + if (!legend_position %in% list_legend_position) { + stop("`legend_position` must be one of: c('below', 'above')") + } else { + if (length(jsonlite::fromJSON('{"below": "below", "above": "above"}')) > 1) { + named_list <- jsonlite::fromJSON('{"below": "below", "above": "above"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_position %in% names(named_list)) { + if (is.logical(legend_position)) { + legend_position <- as.character(legend_position) + } + named_list_value <- unname(named_list[legend_position])[[1]] + new_list$x$state$legend_position <- named_list_value + } + } + } + } + new_list$x$state$hide_empty_legend_items <- hide_empty_legend_items + new_list$x$state$placeholder_text <- placeholder_text + new_list$x$state$subtitle_text <- subtitle_text + new_list$x$state$value_change_abbreviation <- value_change_abbreviation + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + new_list$x$state$label_format$prefix <- chart_label_number_date_format_prefix + new_list$x$state$label_format$suffix <- chart_label_number_date_format_suffix + new_list$x$state$label_format$n_dec <- chart_label_number_date_format_n_dec + new_list$x$state$label_format$advanced <- chart_label_number_date_format_advanced + list_chart_label_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_label_number_date_format_negative_sign)) { + if (!chart_label_number_date_format_negative_sign %in% list_chart_label_number_date_format_negative_sign) { + stop("`chart_label_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_label_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_label_number_date_format_negative_sign)) { + chart_label_number_date_format_negative_sign <- as.character(chart_label_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_label_number_date_format_negative_sign])[[1]] + new_list$x$state$label_format$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$label_format$strip_zeros <- chart_label_number_date_format_strip_zeros + new_list$x$state$label_format$strip_separator <- chart_label_number_date_format_strip_separator + new_list$x$state$label_format$transform_labels <- chart_label_number_date_format_transform_labels + list_chart_label_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_label_number_date_format_transform)) { + if (!chart_label_number_date_format_transform %in% list_chart_label_number_date_format_transform) { + stop("`chart_label_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_label_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_label_number_date_format_transform)) { + chart_label_number_date_format_transform <- as.character(chart_label_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_label_number_date_format_transform])[[1]] + new_list$x$state$label_format$transform <- named_list_value + } + } + } + } + new_list$x$state$label_format$multiply_divide_constant <- chart_label_number_date_format_multiply_divide_constant + new_list$x$state$label_format$exponentiate_constant <- chart_label_number_date_format_exponentiate_constant + new_list$x$state$label_suffix <- label_suffix + list_chart_number_localization_input_decimal_separator <- c(".", ",", NULL) + if (!is.null(chart_number_localization_input_decimal_separator)) { + if (!chart_number_localization_input_decimal_separator %in% list_chart_number_localization_input_decimal_separator) { + stop("`chart_number_localization_input_decimal_separator` must be one of: c('.', ',')") + } else { + if (length(jsonlite::fromJSON('{".": ".", ",": ","}')) > 1) { + named_list <- jsonlite::fromJSON('{".": ".", ",": ","}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_input_decimal_separator %in% names(named_list)) { + if (is.logical(chart_number_localization_input_decimal_separator)) { + chart_number_localization_input_decimal_separator <- as.character(chart_number_localization_input_decimal_separator) + } + named_list_value <- unname(named_list[chart_number_localization_input_decimal_separator])[[1]] + new_list$x$state$localization$input_decimal_separator <- named_list_value + } + } + } + } + list_chart_number_localization_output_separators <- c(",.", ".,", ".", ",", " .", " ,", NULL) + if (!is.null(chart_number_localization_output_separators)) { + if (!chart_number_localization_output_separators %in% list_chart_number_localization_output_separators) { + stop("`chart_number_localization_output_separators` must be one of: c(',.', '.,', '.', ',', ' .', ' ,')") + } else { + if (length(jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}')) > 1) { + named_list <- jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_output_separators %in% names(named_list)) { + if (is.logical(chart_number_localization_output_separators)) { + chart_number_localization_output_separators <- as.character(chart_number_localization_output_separators) + } + named_list_value <- unname(named_list[chart_number_localization_output_separators])[[1]] + new_list$x$state$localization$output_separators <- named_list_value + } + } + } + } + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + new_list$x$state$url_state$enabled <- chart_url_settings_enabled + if (length(chart_url_settings_whitelist) > 1) { + new_list$x$state$url_state$whitelist <- paste(chart_url_settings_whitelist, collapse = "\n") + } else { + new_list$x$state$url_state$whitelist <- chart_url_settings_whitelist + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_gantt_details.R b/R_package/R/set_gantt_details.R new file mode 100644 index 0000000..59a8362 --- /dev/null +++ b/R_package/R/set_gantt_details.R @@ -0,0 +1,4657 @@ +#' Set gantt chart chart details +#' @name set_gantt_details +#' @param gantt_height Height. Choose the height of each bar in rems (i.e. it will scale up and down in relation to screen size). Flourish type hint: number, defaults to `NULL` +#' @param gantt_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param border_radius Roundness. Flourish type hint: number, defaults to `NULL` +#' @param border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param border_color Border color. Flourish type hint: color, defaults to `NULL` +#' @param gantt_progress Show progress. Choices: `TRUE`, `FALSE`. If enabled, each bar will be filled with an overlay relating to the value supplied in the Progress column. Flourish type hint: boolean, defaults to `NULL` +#' @param gantt_text Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param gantt_font_size Size. Flourish type hint: number, defaults to `NULL` +#' @param gantt_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param gantt_font_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param missing_value_label Label for missing values. If a bar dosent have a category, the legend will show the placeholder value.. Flourish type hint: string, defaults to `NULL` +#' @param scale_type Scale type. Choices: categorical, numeric. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param color_single Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_background_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_background_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_background_panels Area. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_axis_position Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_y_axis_position Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_zero_axis Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_position Position. Choices: default, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_side Tick side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param date_format Format in data sheet. Choices: auto, %Y-%m-%dT%H:%M:%S.%LZ, %Y-%m-%d, %m/%d/%Y, %d/%m/%Y, %d-%b-%y, %m/%Y, %b %Y, %b %y, %B %d, %d %b, %Y, %B, %b, %A, %a, %H:%M:%S, %I:%M %p, %H:%M. The date/time format in your datasheet. If it isnt in the list, you can enter a custom format using d3-time-format syntax. See npm - d3 time format for details. Flourish type hint: string, defaults to `NULL` +#' @param format_locale Date and time locale. Choices: none, ady, af-_n_a, af-_z_a, af, ak, ar-_m_a, ar-_s_a, hy-_a_m, ay-_b_o, eu-_e_s, be-_b_y, bn-_b_d, bn-_i_n, bn, bs-_b_a, my, ck-_u_s, zh-_c_n, zh-_s_g, zh-_hans, zh-_h_k, zh-_t_w, zh-_hant, zh, gx-_g_r, nl-_b_e, nl-_n_l, nl, en-_a_u, en-_c_a, en-_i_n, en-_i_e, en@pirate, en-_z_a, en-_g_b, en-_u_d, en-_u_s, en, eo-_e_o, et-_e_e, fo-_f_o, fi-_f_i, fr-_b_e, fr-_c_a, fr-_f_r, fr-_c_h, fr, fy-_n_l, ff, gl-_e_s, ka-_g_e, de-_a_t, de-_d_e, de-_c_h, de, el-_g_r, el, gn-_p_y, gu-_i_n, ht, is-_i_s, is, ga-_i_e, ga, jv-_i_d, kab, kn-_i_n, kn, cak, kk-_k_z, tlh, ko-_k_r, ko, ku-_t_r, fb-_l_t, li-_n_l, dsb, lb, mk-_m_k, mk, mai, mg-_m_g, mn-_m_n, se-_n_o, nn-_n_o, no, oc, or-_i_n, ps-_a_f, i_r, pt-_b_r, pt-_p_t, pt, pa-_i_n, pa, qu-_p_e, rm-_c_h, sa-_i_n, sr-_r_s, sr, si-_l_k, sk-_s_k, sk, so-_s_o, es-_a_r, es-_c_l, es-_c_o, es-_e_c, es-_m_x, es-_n_i, es-_e_s, es-_u_s, es-_v_e, es, su, sw-_k_e, sw, tt-_r_u, th-_t_h, th, hsb, xh-_z_a, yi-_d_e, yi, zu-_z_a. The regional date/time format ( date locale ). You can specify each part of the format in the fields below. Flourish type hint: string, defaults to `NULL` +#' @param format_weekday Weekday. Choices: none, narrow, short, long. Flourish type hint: string, defaults to `NULL` +#' @param format_year Year. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to `NULL` +#' @param format_month Month. Choices: none, numeric, 2-digit, narrow, short, long. Flourish type hint: string, defaults to `NULL` +#' @param format_day Day. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to `NULL` +#' @param format_hour Hour. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to `NULL` +#' @param format_minute Minute. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to `NULL` +#' @param y_font_size Size. Flourish type hint: number, defaults to `NULL` +#' @param y_font_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param y_font_fill Color. Flourish type hint: color, defaults to `NULL` +#' @param y_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param y_text_dx Horizontal padding. Flourish type hint: number, defaults to `NULL` +#' @param y_text_dy Vertical padding. Flourish type hint: number, defaults to `NULL` +#' @param y_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param y_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_control_all Name for "All". Leave blank to not include an "All" option. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_controls_spacing Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_show_legend Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_continous_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_color_band_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_continous_legend_color_band_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_continous_legend_color_band_radius Roundness. The radius of the corners of the color band (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_continous_legend_binned_label_mode Binned label mode. Choices: thresholds, centers, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_binned_label_custom Custom bin labels. List numeric values, separated by semi-colons. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_legend_min Legend min. Flourish type hint: number, defaults to `NULL` +#' @param chart_continous_legend_additional_min_label Custom min label. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_legend_max Legend max. Flourish type hint: number, defaults to `NULL` +#' @param chart_continous_legend_additional_max_label Custom max label. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_x_enabled Show highlights on the x axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_x_lines One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example, `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_x_line_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_line_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_line_dash Dash. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_areas One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_x_area_color Area. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_area_opacity Area opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_area_texture Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_vertical Vertical. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_x_label_y_position Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_x_position X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_font_weight Font weight. Choices: regular, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_shadow_color Shadow. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_shadow_enabled Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_y_enabled Show highlights on the y axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_y_lines One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example: `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_y_line_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_line_width line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_line_dash Dash. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_areas One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_y_area_color Area. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_area_opacity Area opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_area_texture Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_x_position X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_y_position Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_font_weight Font weight. Choices: regular, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_shadow_color Shadow. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_shadow_enabled Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param animation_duration Animation duration. The duration, in seconds, of transitions for example, on load of visualization or between two slides in a story Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "gantt", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_gantt_data(gapminder) |> +#' set_gantt_details() +#' ) +#' @export + +set_gantt_details <- function( + ., + gantt_height = NULL, + gantt_padding = NULL, + border_radius = NULL, + border_width = NULL, + border_color = NULL, + gantt_progress = NULL, + gantt_text = NULL, + gantt_font_size = NULL, + gantt_text_color = NULL, + gantt_font_weight = NULL, + missing_value_label = NULL, + scale_type = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + color_single = NULL, + chart_background_color = NULL, + chart_background_opacity = NULL, + chart_background_panels = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + date_format = NULL, + format_locale = NULL, + format_weekday = NULL, + format_year = NULL, + format_month = NULL, + format_day = NULL, + format_hour = NULL, + format_minute = NULL, + y_font_size = NULL, + y_font_weight = NULL, + y_font_fill = NULL, + y_max_width = NULL, + y_text_dx = NULL, + y_text_dy = NULL, + y_gridline_color = NULL, + y_gridline_width = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_control_all = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_continous_legend_show_legend = NULL, + chart_continous_legend_title_mode = NULL, + chart_continous_legend_title = NULL, + chart_continous_legend_color_band_width = NULL, + chart_continous_legend_color_band_height = NULL, + chart_continous_legend_color_band_radius = NULL, + chart_continous_legend_binned_label_mode = NULL, + chart_continous_legend_binned_label_custom = NULL, + chart_continous_legend_legend_min = NULL, + chart_continous_legend_additional_min_label = NULL, + chart_continous_legend_legend_max = NULL, + chart_continous_legend_additional_max_label = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_axes_highlights_x_enabled = NULL, + chart_axes_highlights_x_lines = NULL, + chart_axes_highlights_x_line_color = NULL, + chart_axes_highlights_x_line_width = NULL, + chart_axes_highlights_x_line_dash = NULL, + chart_axes_highlights_x_areas = NULL, + chart_axes_highlights_x_area_color = NULL, + chart_axes_highlights_x_area_opacity = NULL, + chart_axes_highlights_x_area_texture = NULL, + chart_axes_highlights_x_label_vertical = NULL, + chart_axes_highlights_x_label_y_position = NULL, + chart_axes_highlights_x_label_x_position = NULL, + chart_axes_highlights_x_label_max_width = NULL, + chart_axes_highlights_x_font_size = NULL, + chart_axes_highlights_x_font_weight = NULL, + chart_axes_highlights_x_label_color = NULL, + chart_axes_highlights_x_shadow_color = NULL, + chart_axes_highlights_x_shadow_enabled = NULL, + chart_axes_highlights_y_enabled = NULL, + chart_axes_highlights_y_lines = NULL, + chart_axes_highlights_y_line_color = NULL, + chart_axes_highlights_y_line_width = NULL, + chart_axes_highlights_y_line_dash = NULL, + chart_axes_highlights_y_areas = NULL, + chart_axes_highlights_y_area_color = NULL, + chart_axes_highlights_y_area_opacity = NULL, + chart_axes_highlights_y_area_texture = NULL, + chart_axes_highlights_y_label_x_position = NULL, + chart_axes_highlights_y_label_y_position = NULL, + chart_axes_highlights_y_label_max_width = NULL, + chart_axes_highlights_y_font_size = NULL, + chart_axes_highlights_y_font_weight = NULL, + chart_axes_highlights_y_label_color = NULL, + chart_axes_highlights_y_shadow_color = NULL, + chart_axes_highlights_y_shadow_enabled = NULL, + animation_duration = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "gantt") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/gantt")) { + stop("`set_gantt_details()` is not supported for this chart type.") + } + new_list$x$state$gantt_height <- gantt_height + new_list$x$state$gantt_padding <- gantt_padding + new_list$x$state$border_radius <- border_radius + new_list$x$state$border_width <- border_width + new_list$x$state$border_color <- border_color + list_gantt_progress <- c(TRUE, FALSE, NULL) + if (!is.null(gantt_progress)) { + if (!gantt_progress %in% list_gantt_progress) { + stop("`gantt_progress` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gantt_progress %in% names(named_list)) { + if (is.logical(gantt_progress)) { + gantt_progress <- as.character(gantt_progress) + } + named_list_value <- unname(named_list[gantt_progress])[[1]] + new_list$x$state$gantt_progress <- named_list_value + } + } + } + } + list_gantt_text <- c(TRUE, FALSE, NULL) + if (!is.null(gantt_text)) { + if (!gantt_text %in% list_gantt_text) { + stop("`gantt_text` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gantt_text %in% names(named_list)) { + if (is.logical(gantt_text)) { + gantt_text <- as.character(gantt_text) + } + named_list_value <- unname(named_list[gantt_text])[[1]] + new_list$x$state$gantt_text <- named_list_value + } + } + } + } + new_list$x$state$gantt_font_size <- gantt_font_size + new_list$x$state$gantt_text_color <- gantt_text_color + list_gantt_font_weight <- c("bold", "normal", NULL) + if (!is.null(gantt_font_weight)) { + if (!gantt_font_weight %in% list_gantt_font_weight) { + stop("`gantt_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gantt_font_weight %in% names(named_list)) { + if (is.logical(gantt_font_weight)) { + gantt_font_weight <- as.character(gantt_font_weight) + } + named_list_value <- unname(named_list[gantt_font_weight])[[1]] + new_list$x$state$gantt_font_weight <- named_list_value + } + } + } + } + new_list$x$state$missing_value_label <- missing_value_label + list_scale_type <- c("categorical", "numeric", NULL) + if (!is.null(scale_type)) { + if (!scale_type %in% list_scale_type) { + stop("`scale_type` must be one of: c('categorical', 'numeric')") + } else { + if (length(jsonlite::fromJSON('{"categorical": "categorical", "numeric": "numeric"}')) > 1) { + named_list <- jsonlite::fromJSON('{"categorical": "categorical", "numeric": "numeric"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && scale_type %in% names(named_list)) { + if (is.logical(scale_type)) { + scale_type <- as.character(scale_type) + } + named_list_value <- unname(named_list[scale_type])[[1]] + new_list$x$state$scale_type <- named_list_value + } + } + } + } + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$color_single <- color_single + new_list$x$state$chart_bg$color <- chart_background_color + new_list$x$state$chart_bg$opacity <- chart_background_opacity + list_chart_background_panels <- c(FALSE, TRUE, NULL) + if (!is.null(chart_background_panels)) { + if (!chart_background_panels %in% list_chart_background_panels) { + stop("`chart_background_panels` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_panels %in% names(named_list)) { + if (is.logical(chart_background_panels)) { + chart_background_panels <- as.character(chart_background_panels) + } + named_list_value <- unname(named_list[chart_background_panels])[[1]] + new_list$x$state$chart_bg$panels <- named_list_value + } + } + } + } + list_chart_x_axis_axis_position <- c("bottom", "float-below", "float-above", "top", "off", NULL) + if (!is.null(chart_x_axis_axis_position)) { + if (!chart_x_axis_axis_position %in% list_chart_x_axis_axis_position) { + stop("`chart_x_axis_axis_position` must be one of: c('bottom', 'float-below', 'float-above', 'top', 'off')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_axis_position %in% names(named_list)) { + if (is.logical(chart_x_axis_axis_position)) { + chart_x_axis_axis_position <- as.character(chart_x_axis_axis_position) + } + named_list_value <- unname(named_list[chart_x_axis_axis_position])[[1]] + new_list$x$state$x$axis_position <- named_list_value + } + } + } + } + new_list$x$state$x$y_axis_position <- chart_x_axis_y_axis_position + list_chart_x_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_x_axis_numeric_scale_type)) { + if (!chart_x_axis_numeric_scale_type %in% list_chart_x_axis_numeric_scale_type) { + stop("`chart_x_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_x_axis_numeric_scale_type)) { + chart_x_axis_numeric_scale_type <- as.character(chart_x_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_x_axis_numeric_scale_type])[[1]] + new_list$x$state$x$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$x$linear_min <- chart_x_axis_linear_min + new_list$x$state$x$linear_max <- chart_x_axis_linear_max + new_list$x$state$x$log_min <- chart_x_axis_log_min + new_list$x$state$x$log_max <- chart_x_axis_log_max + new_list$x$state$x$datetime_min <- chart_x_axis_datetime_min + new_list$x$state$x$datetime_max <- chart_x_axis_datetime_max + new_list$x$state$x$flip <- chart_x_axis_flip + new_list$x$state$x$show_scale_settings <- chart_x_axis_show_scale_settings + list_chart_x_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_nice)) { + if (!chart_x_axis_nice %in% list_chart_x_axis_nice) { + stop("`chart_x_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_nice %in% names(named_list)) { + if (is.logical(chart_x_axis_nice)) { + chart_x_axis_nice <- as.character(chart_x_axis_nice) + } + named_list_value <- unname(named_list[chart_x_axis_nice])[[1]] + new_list$x$state$x$nice <- named_list_value + } + } + } + } + list_chart_x_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_x_axis_zero_axis)) { + if (!chart_x_axis_zero_axis %in% list_chart_x_axis_zero_axis) { + stop("`chart_x_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_x_axis_zero_axis)) { + chart_x_axis_zero_axis <- as.character(chart_x_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_x_axis_zero_axis])[[1]] + new_list$x$state$x$zero_axis <- named_list_value + } + } + } + } + list_chart_x_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_x_axis_title_mode)) { + if (!chart_x_axis_title_mode %in% list_chart_x_axis_title_mode) { + stop("`chart_x_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_title_mode)) { + chart_x_axis_title_mode <- as.character(chart_x_axis_title_mode) + } + named_list_value <- unname(named_list[chart_x_axis_title_mode])[[1]] + new_list$x$state$x$title_mode <- named_list_value + } + } + } + } + new_list$x$state$x$title <- chart_x_axis_title + new_list$x$state$x$title_styling <- chart_x_axis_title_styling + list_chart_x_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_title_weight)) { + if (!chart_x_axis_title_weight %in% list_chart_x_axis_title_weight) { + stop("`chart_x_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_title_weight)) { + chart_x_axis_title_weight <- as.character(chart_x_axis_title_weight) + } + named_list_value <- unname(named_list[chart_x_axis_title_weight])[[1]] + new_list$x$state$x$title_weight <- named_list_value + } + } + } + } + new_list$x$state$x$title_color <- chart_x_axis_title_color + new_list$x$state$x$title_size <- chart_x_axis_title_size + new_list$x$state$x$title_padding <- chart_x_axis_title_padding + list_chart_x_axis_tick_label_position <- c("default", "left", "right", NULL) + if (!is.null(chart_x_axis_tick_label_position)) { + if (!chart_x_axis_tick_label_position %in% list_chart_x_axis_tick_label_position) { + stop("`chart_x_axis_tick_label_position` must be one of: c('default', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_position)) { + chart_x_axis_tick_label_position <- as.character(chart_x_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_position])[[1]] + new_list$x$state$x$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_styling <- chart_x_axis_tick_label_styling + new_list$x$state$x$tick_label_size <- chart_x_axis_tick_label_size + new_list$x$state$x$tick_label_color <- chart_x_axis_tick_label_color + new_list$x$state$x$tick_padding <- chart_x_axis_tick_padding + list_chart_x_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_x_axis_tick_label_angle)) { + if (!chart_x_axis_tick_label_angle %in% list_chart_x_axis_tick_label_angle) { + stop("`chart_x_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_angle)) { + chart_x_axis_tick_label_angle <- as.character(chart_x_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_angle])[[1]] + new_list$x$state$x$tick_label_angle <- named_list_value + } + } + } + } + list_chart_x_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_tick_label_weight)) { + if (!chart_x_axis_tick_label_weight %in% list_chart_x_axis_tick_label_weight) { + stop("`chart_x_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_weight)) { + chart_x_axis_tick_label_weight <- as.character(chart_x_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_weight])[[1]] + new_list$x$state$x$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_max_lines <- chart_x_axis_tick_label_max_lines + new_list$x$state$x$tick_label_line_height <- chart_x_axis_tick_label_line_height + list_chart_x_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_x_axis_tick_label_space_mode)) { + if (!chart_x_axis_tick_label_space_mode %in% list_chart_x_axis_tick_label_space_mode) { + stop("`chart_x_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_space_mode)) { + chart_x_axis_tick_label_space_mode <- as.character(chart_x_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_space_mode])[[1]] + new_list$x$state$x$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_space <- chart_x_axis_tick_label_space + list_chart_x_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_x_axis_tick_mode)) { + if (!chart_x_axis_tick_mode %in% list_chart_x_axis_tick_mode) { + stop("`chart_x_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_mode)) { + chart_x_axis_tick_mode <- as.character(chart_x_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_mode])[[1]] + new_list$x$state$x$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_number <- chart_x_axis_tick_number + if (length(chart_x_axis_tick_custom) > 1) { + new_list$x$state$x$tick_custom <- paste(chart_x_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$x$tick_custom <- chart_x_axis_tick_custom + } + + new_list$x$state$x$line_and_tick_color <- chart_x_axis_line_and_tick_color + new_list$x$state$x$line_and_tick_width <- chart_x_axis_line_and_tick_width + new_list$x$state$x$tick_length <- chart_x_axis_tick_length + list_chart_x_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_x_axis_tick_side)) { + if (!chart_x_axis_tick_side %in% list_chart_x_axis_tick_side) { + stop("`chart_x_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_side)) { + chart_x_axis_tick_side <- as.character(chart_x_axis_tick_side) + } + named_list_value <- unname(named_list[chart_x_axis_tick_side])[[1]] + new_list$x$state$x$tick_side <- named_list_value + } + } + } + } + new_list$x$state$x$line_visible <- chart_x_axis_line_visible + new_list$x$state$x$edge_padding <- chart_x_axis_edge_padding + list_chart_x_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_gridlines_visible)) { + if (!chart_x_axis_gridlines_visible %in% list_chart_x_axis_gridlines_visible) { + stop("`chart_x_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_x_axis_gridlines_visible)) { + chart_x_axis_gridlines_visible <- as.character(chart_x_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_x_axis_gridlines_visible])[[1]] + new_list$x$state$x$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$x$gridlines_styling <- chart_x_axis_gridlines_styling + new_list$x$state$x$gridline_color <- chart_x_axis_gridline_color + list_chart_x_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_x_axis_gridline_style)) { + if (!chart_x_axis_gridline_style %in% list_chart_x_axis_gridline_style) { + stop("`chart_x_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_x_axis_gridline_style)) { + chart_x_axis_gridline_style <- as.character(chart_x_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_x_axis_gridline_style])[[1]] + new_list$x$state$x$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$x$gridline_width <- chart_x_axis_gridline_width + new_list$x$state$x$gridline_category_dividers <- chart_x_axis_gridline_category_dividers + new_list$x$state$x$gridline_category_dividers_extend <- chart_x_axis_gridline_category_dividers_extend + list_date_format <- c("auto", "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d", "%m/%d/%Y", "%d/%m/%Y", "%d-%b-%y", "%m/%Y", "%b %Y", "%b %y", "%B %d", "%d %b", "%Y", "%B", "%b", "%A", "%a", "%H:%M:%S", "%I:%M %p", "%H:%M", NULL) + if (!is.null(date_format)) { + if (!date_format %in% list_date_format) { + stop("`date_format` must be one of: c('auto', '%Y-%m-%dT%H:%M:%S.%LZ', '%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%d-%b-%y', '%m/%Y', '%b %Y', '%b %y', '%B %d', '%d %b', '%Y', '%B', '%b', '%A', '%a', '%H:%M:%S', '%I:%M %p', '%H:%M')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d": "%Y-%m-%d", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%d-%b-%y": "%d-%b-%y", "%m/%Y": "%m/%Y", "%b %Y": "%b %Y", "%b %y": "%b %y", "%B %d": "%B %d", "%d %b": "%d %b", "%Y": "%Y", "%B": "%B", "%b": "%b", "%A": "%A", "%a": "%a", "%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d": "%Y-%m-%d", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%d-%b-%y": "%d-%b-%y", "%m/%Y": "%m/%Y", "%b %Y": "%b %Y", "%b %y": "%b %y", "%B %d": "%B %d", "%d %b": "%d %b", "%Y": "%Y", "%B": "%B", "%b": "%b", "%A": "%A", "%a": "%a", "%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && date_format %in% names(named_list)) { + if (is.logical(date_format)) { + date_format <- as.character(date_format) + } + named_list_value <- unname(named_list[date_format])[[1]] + new_list$x$state$date_format <- named_list_value + } + } + } + } + list_format_locale <- c("none", "ady", "af-_n_a", "af-_z_a", "af", "ak", "ar-_m_a", "ar-_s_a", "hy-_a_m", "ay-_b_o", "eu-_e_s", "be-_b_y", "bn-_b_d", "bn-_i_n", "bn", "bs-_b_a", "my", "ck-_u_s", "zh-_c_n", "zh-_s_g", "zh-_hans", "zh-_h_k", "zh-_t_w", "zh-_hant", "zh", "gx-_g_r", "nl-_b_e", "nl-_n_l", "nl", "en-_a_u", "en-_c_a", "en-_i_n", "en-_i_e", "en@pirate", "en-_z_a", "en-_g_b", "en-_u_d", "en-_u_s", "en", "eo-_e_o", "et-_e_e", "fo-_f_o", "fi-_f_i", "fr-_b_e", "fr-_c_a", "fr-_f_r", "fr-_c_h", "fr", "fy-_n_l", "ff", "gl-_e_s", "ka-_g_e", "de-_a_t", "de-_d_e", "de-_c_h", "de", "el-_g_r", "el", "gn-_p_y", "gu-_i_n", "ht", "is-_i_s", "is", "ga-_i_e", "ga", "jv-_i_d", "kab", "kn-_i_n", "kn", "cak", "kk-_k_z", "tlh", "ko-_k_r", "ko", "ku-_t_r", "fb-_l_t", "li-_n_l", "dsb", "lb", "mk-_m_k", "mk", "mai", "mg-_m_g", "mn-_m_n", "se-_n_o", "nn-_n_o", "no", "oc", "or-_i_n", "ps-_a_f", "i_r", "pt-_b_r", "pt-_p_t", "pt", "pa-_i_n", "pa", "qu-_p_e", "rm-_c_h", "sa-_i_n", "sr-_r_s", "sr", "si-_l_k", "sk-_s_k", "sk", "so-_s_o", "es-_a_r", "es-_c_l", "es-_c_o", "es-_e_c", "es-_m_x", "es-_n_i", "es-_e_s", "es-_u_s", "es-_v_e", "es", "su", "sw-_k_e", "sw", "tt-_r_u", "th-_t_h", "th", "hsb", "xh-_z_a", "yi-_d_e", "yi", "zu-_z_a", NULL) + if (!is.null(format_locale)) { + if (!format_locale %in% list_format_locale) { + stop("`format_locale` must be one of: c('none', 'ady', 'af-_n_a', 'af-_z_a', 'af', 'ak', 'ar-_m_a', 'ar-_s_a', 'hy-_a_m', 'ay-_b_o', 'eu-_e_s', 'be-_b_y', 'bn-_b_d', 'bn-_i_n', 'bn', 'bs-_b_a', 'my', 'ck-_u_s', 'zh-_c_n', 'zh-_s_g', 'zh-_hans', 'zh-_h_k', 'zh-_t_w', 'zh-_hant', 'zh', 'gx-_g_r', 'nl-_b_e', 'nl-_n_l', 'nl', 'en-_a_u', 'en-_c_a', 'en-_i_n', 'en-_i_e', 'en@pirate', 'en-_z_a', 'en-_g_b', 'en-_u_d', 'en-_u_s', 'en', 'eo-_e_o', 'et-_e_e', 'fo-_f_o', 'fi-_f_i', 'fr-_b_e', 'fr-_c_a', 'fr-_f_r', 'fr-_c_h', 'fr', 'fy-_n_l', 'ff', 'gl-_e_s', 'ka-_g_e', 'de-_a_t', 'de-_d_e', 'de-_c_h', 'de', 'el-_g_r', 'el', 'gn-_p_y', 'gu-_i_n', 'ht', 'is-_i_s', 'is', 'ga-_i_e', 'ga', 'jv-_i_d', 'kab', 'kn-_i_n', 'kn', 'cak', 'kk-_k_z', 'tlh', 'ko-_k_r', 'ko', 'ku-_t_r', 'fb-_l_t', 'li-_n_l', 'dsb', 'lb', 'mk-_m_k', 'mk', 'mai', 'mg-_m_g', 'mn-_m_n', 'se-_n_o', 'nn-_n_o', 'no', 'oc', 'or-_i_n', 'ps-_a_f', 'i_r', 'pt-_b_r', 'pt-_p_t', 'pt', 'pa-_i_n', 'pa', 'qu-_p_e', 'rm-_c_h', 'sa-_i_n', 'sr-_r_s', 'sr', 'si-_l_k', 'sk-_s_k', 'sk', 'so-_s_o', 'es-_a_r', 'es-_c_l', 'es-_c_o', 'es-_e_c', 'es-_m_x', 'es-_n_i', 'es-_e_s', 'es-_u_s', 'es-_v_e', 'es', 'su', 'sw-_k_e', 'sw', 'tt-_r_u', 'th-_t_h', 'th', 'hsb', 'xh-_z_a', 'yi-_d_e', 'yi', 'zu-_z_a')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "ady": "ady", "af-_n_a": "af-NA", "af-_z_a": "af-ZA", "af": "af", "ak": "ak", "ar-_m_a": "ar-MA", "ar-_s_a": "ar-SA", "hy-_a_m": "hy-AM", "ay-_b_o": "ay-BO", "eu-_e_s": "eu-ES", "be-_b_y": "be-BY", "bn-_b_d": "bn-BD", "bn-_i_n": "bn-IN", "bn": "bn", "bs-_b_a": "bs-BA", "my": "my", "ck-_u_s": "ck-US", "zh-_c_n": "zh-CN", "zh-_s_g": "zh-SG", "zh-_hans": "zh-Hans", "zh-_h_k": "zh-HK", "zh-_t_w": "zh-TW", "zh-_hant": "zh-Hant", "zh": "zh", "gx-_g_r": "gx-GR", "nl-_b_e": "nl-BE", "nl-_n_l": "nl-NL", "nl": "nl", "en-_a_u": "en-AU", "en-_c_a": "en-CA", "en-_i_n": "en-IN", "en-_i_e": "en-IE", "en@pirate": "en@pirate", "en-_z_a": "en-ZA", "en-_g_b": "en-GB", "en-_u_d": "en-UD", "en-_u_s": "en-US", "en": "en", "eo-_e_o": "eo-EO", "et-_e_e": "et-EE", "fo-_f_o": "fo-FO", "fi-_f_i": "fi-FI", "fr-_b_e": "fr-BE", "fr-_c_a": "fr-CA", "fr-_f_r": "fr-FR", "fr-_c_h": "fr-CH", "fr": "fr", "fy-_n_l": "fy-NL", "ff": "ff", "gl-_e_s": "gl-ES", "ka-_g_e": "ka-GE", "de-_a_t": "de-AT", "de-_d_e": "de-DE", "de-_c_h": "de-CH", "de": "de", "el-_g_r": "el-GR", "el": "el", "gn-_p_y": "gn-PY", "gu-_i_n": "gu-IN", "ht": "ht", "is-_i_s": "is-IS", "is": "is", "ga-_i_e": "ga-IE", "ga": "ga", "jv-_i_d": "jv-ID", "kab": "kab", "kn-_i_n": "kn-IN", "kn": "kn", "cak": "cak", "kk-_k_z": "kk-KZ", "tlh": "tlh", "ko-_k_r": "ko-KR", "ko": "ko", "ku-_t_r": "ku-TR", "fb-_l_t": "fb-LT", "li-_n_l": "li-NL", "dsb": "dsb", "lb": "lb", "mk-_m_k": "mk-MK", "mk": "mk", "mai": "mai", "mg-_m_g": "mg-MG", "mn-_m_n": "mn-MN", "se-_n_o": "se-NO", "nn-_n_o": "nn-NO", "no": "no", "oc": "oc", "or-_i_n": "or-IN", "ps-_a_f": "ps-AF", "i_r": "fa-IR", "pt-_b_r": "pt-BR", "pt-_p_t": "pt-PT", "pt": "pt", "pa-_i_n": "pa-IN", "pa": "pa", "qu-_p_e": "qu-PE", "rm-_c_h": "rm-CH", "sa-_i_n": "sa-IN", "sr-_r_s": "sr-RS", "sr": "sr", "si-_l_k": "si-LK", "sk-_s_k": "sk-SK", "sk": "sk", "so-_s_o": "so-SO", "es-_a_r": "es-AR", "es-_c_l": "es-CL", "es-_c_o": "es-CO", "es-_e_c": "es-EC", "es-_m_x": "es-MX", "es-_n_i": "es-NI", "es-_e_s": "es-ES", "es-_u_s": "es-US", "es-_v_e": "es-VE", "es": "es", "su": "su", "sw-_k_e": "sw-KE", "sw": "sw", "tt-_r_u": "tt-RU", "th-_t_h": "th-TH", "th": "th", "hsb": "hsb", "xh-_z_a": "xh-ZA", "yi-_d_e": "yi-DE", "yi": "yi", "zu-_z_a": "zu-ZA"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "ady": "ady", "af-_n_a": "af-NA", "af-_z_a": "af-ZA", "af": "af", "ak": "ak", "ar-_m_a": "ar-MA", "ar-_s_a": "ar-SA", "hy-_a_m": "hy-AM", "ay-_b_o": "ay-BO", "eu-_e_s": "eu-ES", "be-_b_y": "be-BY", "bn-_b_d": "bn-BD", "bn-_i_n": "bn-IN", "bn": "bn", "bs-_b_a": "bs-BA", "my": "my", "ck-_u_s": "ck-US", "zh-_c_n": "zh-CN", "zh-_s_g": "zh-SG", "zh-_hans": "zh-Hans", "zh-_h_k": "zh-HK", "zh-_t_w": "zh-TW", "zh-_hant": "zh-Hant", "zh": "zh", "gx-_g_r": "gx-GR", "nl-_b_e": "nl-BE", "nl-_n_l": "nl-NL", "nl": "nl", "en-_a_u": "en-AU", "en-_c_a": "en-CA", "en-_i_n": "en-IN", "en-_i_e": "en-IE", "en@pirate": "en@pirate", "en-_z_a": "en-ZA", "en-_g_b": "en-GB", "en-_u_d": "en-UD", "en-_u_s": "en-US", "en": "en", "eo-_e_o": "eo-EO", "et-_e_e": "et-EE", "fo-_f_o": "fo-FO", "fi-_f_i": "fi-FI", "fr-_b_e": "fr-BE", "fr-_c_a": "fr-CA", "fr-_f_r": "fr-FR", "fr-_c_h": "fr-CH", "fr": "fr", "fy-_n_l": "fy-NL", "ff": "ff", "gl-_e_s": "gl-ES", "ka-_g_e": "ka-GE", "de-_a_t": "de-AT", "de-_d_e": "de-DE", "de-_c_h": "de-CH", "de": "de", "el-_g_r": "el-GR", "el": "el", "gn-_p_y": "gn-PY", "gu-_i_n": "gu-IN", "ht": "ht", "is-_i_s": "is-IS", "is": "is", "ga-_i_e": "ga-IE", "ga": "ga", "jv-_i_d": "jv-ID", "kab": "kab", "kn-_i_n": "kn-IN", "kn": "kn", "cak": "cak", "kk-_k_z": "kk-KZ", "tlh": "tlh", "ko-_k_r": "ko-KR", "ko": "ko", "ku-_t_r": "ku-TR", "fb-_l_t": "fb-LT", "li-_n_l": "li-NL", "dsb": "dsb", "lb": "lb", "mk-_m_k": "mk-MK", "mk": "mk", "mai": "mai", "mg-_m_g": "mg-MG", "mn-_m_n": "mn-MN", "se-_n_o": "se-NO", "nn-_n_o": "nn-NO", "no": "no", "oc": "oc", "or-_i_n": "or-IN", "ps-_a_f": "ps-AF", "i_r": "fa-IR", "pt-_b_r": "pt-BR", "pt-_p_t": "pt-PT", "pt": "pt", "pa-_i_n": "pa-IN", "pa": "pa", "qu-_p_e": "qu-PE", "rm-_c_h": "rm-CH", "sa-_i_n": "sa-IN", "sr-_r_s": "sr-RS", "sr": "sr", "si-_l_k": "si-LK", "sk-_s_k": "sk-SK", "sk": "sk", "so-_s_o": "so-SO", "es-_a_r": "es-AR", "es-_c_l": "es-CL", "es-_c_o": "es-CO", "es-_e_c": "es-EC", "es-_m_x": "es-MX", "es-_n_i": "es-NI", "es-_e_s": "es-ES", "es-_u_s": "es-US", "es-_v_e": "es-VE", "es": "es", "su": "su", "sw-_k_e": "sw-KE", "sw": "sw", "tt-_r_u": "tt-RU", "th-_t_h": "th-TH", "th": "th", "hsb": "hsb", "xh-_z_a": "xh-ZA", "yi-_d_e": "yi-DE", "yi": "yi", "zu-_z_a": "zu-ZA"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && format_locale %in% names(named_list)) { + if (is.logical(format_locale)) { + format_locale <- as.character(format_locale) + } + named_list_value <- unname(named_list[format_locale])[[1]] + new_list$x$state$format_locale <- named_list_value + } + } + } + } + list_format_weekday <- c("none", "narrow", "short", "long", NULL) + if (!is.null(format_weekday)) { + if (!format_weekday %in% list_format_weekday) { + stop("`format_weekday` must be one of: c('none', 'narrow', 'short', 'long')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "narrow": "narrow", "short": "short", "long": "long"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "narrow": "narrow", "short": "short", "long": "long"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && format_weekday %in% names(named_list)) { + if (is.logical(format_weekday)) { + format_weekday <- as.character(format_weekday) + } + named_list_value <- unname(named_list[format_weekday])[[1]] + new_list$x$state$format_weekday <- named_list_value + } + } + } + } + list_format_year <- c("none", "numeric", "2-digit", NULL) + if (!is.null(format_year)) { + if (!format_year %in% list_format_year) { + stop("`format_year` must be one of: c('none', 'numeric', '2-digit')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "numeric": "numeric", "2-digit": "2-digit"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "numeric": "numeric", "2-digit": "2-digit"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && format_year %in% names(named_list)) { + if (is.logical(format_year)) { + format_year <- as.character(format_year) + } + named_list_value <- unname(named_list[format_year])[[1]] + new_list$x$state$format_year <- named_list_value + } + } + } + } + list_format_month <- c("none", "numeric", "2-digit", "narrow", "short", "long", NULL) + if (!is.null(format_month)) { + if (!format_month %in% list_format_month) { + stop("`format_month` must be one of: c('none', 'numeric', '2-digit', 'narrow', 'short', 'long')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "numeric": "numeric", "2-digit": "2-digit", "narrow": "narrow", "short": "short", "long": "long"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "numeric": "numeric", "2-digit": "2-digit", "narrow": "narrow", "short": "short", "long": "long"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && format_month %in% names(named_list)) { + if (is.logical(format_month)) { + format_month <- as.character(format_month) + } + named_list_value <- unname(named_list[format_month])[[1]] + new_list$x$state$format_month <- named_list_value + } + } + } + } + list_format_day <- c("none", "numeric", "2-digit", NULL) + if (!is.null(format_day)) { + if (!format_day %in% list_format_day) { + stop("`format_day` must be one of: c('none', 'numeric', '2-digit')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "numeric": "numeric", "2-digit": "2-digit"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "numeric": "numeric", "2-digit": "2-digit"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && format_day %in% names(named_list)) { + if (is.logical(format_day)) { + format_day <- as.character(format_day) + } + named_list_value <- unname(named_list[format_day])[[1]] + new_list$x$state$format_day <- named_list_value + } + } + } + } + list_format_hour <- c("none", "numeric", "2-digit", NULL) + if (!is.null(format_hour)) { + if (!format_hour %in% list_format_hour) { + stop("`format_hour` must be one of: c('none', 'numeric', '2-digit')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "numeric": "numeric", "2-digit": "2-digit"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "numeric": "numeric", "2-digit": "2-digit"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && format_hour %in% names(named_list)) { + if (is.logical(format_hour)) { + format_hour <- as.character(format_hour) + } + named_list_value <- unname(named_list[format_hour])[[1]] + new_list$x$state$format_hour <- named_list_value + } + } + } + } + list_format_minute <- c("none", "numeric", "2-digit", NULL) + if (!is.null(format_minute)) { + if (!format_minute %in% list_format_minute) { + stop("`format_minute` must be one of: c('none', 'numeric', '2-digit')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "numeric": "numeric", "2-digit": "2-digit"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "numeric": "numeric", "2-digit": "2-digit"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && format_minute %in% names(named_list)) { + if (is.logical(format_minute)) { + format_minute <- as.character(format_minute) + } + named_list_value <- unname(named_list[format_minute])[[1]] + new_list$x$state$format_minute <- named_list_value + } + } + } + } + new_list$x$state$y_font_size <- y_font_size + list_y_font_weight <- c("bold", "normal", NULL) + if (!is.null(y_font_weight)) { + if (!y_font_weight %in% list_y_font_weight) { + stop("`y_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && y_font_weight %in% names(named_list)) { + if (is.logical(y_font_weight)) { + y_font_weight <- as.character(y_font_weight) + } + named_list_value <- unname(named_list[y_font_weight])[[1]] + new_list$x$state$y_font_weight <- named_list_value + } + } + } + } + new_list$x$state$y_font_fill <- y_font_fill + new_list$x$state$y_max_width <- y_max_width + new_list$x$state$y_text_dx <- y_text_dx + new_list$x$state$y_text_dy <- y_text_dy + new_list$x$state$y_gridline_color <- y_gridline_color + new_list$x$state$y_gridline_width <- y_gridline_width + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$filter_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$filter_control$control_styles <- chart_filter_controls_control_styles + new_list$x$state$filter_control$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$filter_control$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$filter_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$filter_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$filter_control$slider_width <- chart_filter_controls_slider_width + new_list$x$state$filter_control$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$filter_control$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$filter_control$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$filter_control$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$filter_control$sort <- named_list_value + } + } + } + } + new_list$x$state$filter_control_all <- filter_control_all + new_list$x$state$style_controls$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$style_controls$font_weight <- named_list_value + } + } + } + } + new_list$x$state$style_controls$height <- chart_controls_style_height + new_list$x$state$style_button$background <- chart_button_control_style_background + new_list$x$state$style_button$background_selected <- chart_button_control_style_background_selected + new_list$x$state$style_button$background_hover <- chart_button_control_style_background_hover + new_list$x$state$style_button$font_color <- chart_button_control_style_font_color + new_list$x$state$style_button$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$style_button$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$style_button$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$style_button$border_width <- chart_button_control_style_border_width + new_list$x$state$style_button$border_color <- chart_button_control_style_border_color + new_list$x$state$style_button$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$style_button$border_radius <- chart_button_control_style_border_radius + new_list$x$state$style_dropdown$background <- chart_dropdown_control_style_background + new_list$x$state$style_dropdown$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$style_dropdown$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$style_dropdown$border_style <- named_list_value + } + } + } + } + new_list$x$state$style_dropdown$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$style_dropdown$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$style_dropdown$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$style_dropdown$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$style_slider$track_color <- chart_slider_control_style_track_color + new_list$x$state$style_slider$font_color <- chart_slider_control_style_font_color + new_list$x$state$style_slider$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$style_slider$play_color <- chart_slider_control_style_play_color + new_list$x$state$style_slider$track_height <- chart_slider_control_style_track_height + new_list$x$state$style_slider$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$style_slider$play_button <- chart_slider_control_style_play_button + list_chart_filter_controls_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_filter_controls_container_alignment)) { + if (!chart_filter_controls_container_alignment %in% list_chart_filter_controls_container_alignment) { + stop("`chart_filter_controls_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_container_alignment %in% names(named_list)) { + if (is.logical(chart_filter_controls_container_alignment)) { + chart_filter_controls_container_alignment <- as.character(chart_filter_controls_container_alignment) + } + named_list_value <- unname(named_list[chart_filter_controls_container_alignment])[[1]] + new_list$x$state$controls_container$alignment <- named_list_value + } + } + } + } + new_list$x$state$controls_container$controls_spacing <- chart_filter_controls_container_controls_spacing + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_chart_continous_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_continous_legend_show_legend)) { + if (!chart_continous_legend_show_legend %in% list_chart_continous_legend_show_legend) { + stop("`chart_continous_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_continous_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_continous_legend_show_legend)) { + chart_continous_legend_show_legend <- as.character(chart_continous_legend_show_legend) + } + named_list_value <- unname(named_list[chart_continous_legend_show_legend])[[1]] + new_list$x$state$legend_continuous$show_legend <- named_list_value + } + } + } + } + list_chart_continous_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_continous_legend_title_mode)) { + if (!chart_continous_legend_title_mode %in% list_chart_continous_legend_title_mode) { + stop("`chart_continous_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_continous_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_continous_legend_title_mode)) { + chart_continous_legend_title_mode <- as.character(chart_continous_legend_title_mode) + } + named_list_value <- unname(named_list[chart_continous_legend_title_mode])[[1]] + new_list$x$state$legend_continuous$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_continuous$title <- chart_continous_legend_title + new_list$x$state$legend_continuous$color_band_width <- chart_continous_legend_color_band_width + new_list$x$state$legend_continuous$color_band_height <- chart_continous_legend_color_band_height + new_list$x$state$legend_continuous$color_band_radius <- chart_continous_legend_color_band_radius + list_chart_continous_legend_binned_label_mode <- c("thresholds", "centers", "custom", NULL) + if (!is.null(chart_continous_legend_binned_label_mode)) { + if (!chart_continous_legend_binned_label_mode %in% list_chart_continous_legend_binned_label_mode) { + stop("`chart_continous_legend_binned_label_mode` must be one of: c('thresholds', 'centers', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"thresholds": "thresholds", "centers": "centers", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"thresholds": "thresholds", "centers": "centers", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_continous_legend_binned_label_mode %in% names(named_list)) { + if (is.logical(chart_continous_legend_binned_label_mode)) { + chart_continous_legend_binned_label_mode <- as.character(chart_continous_legend_binned_label_mode) + } + named_list_value <- unname(named_list[chart_continous_legend_binned_label_mode])[[1]] + new_list$x$state$legend_continuous$binned_label_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_continuous$binned_label_custom <- chart_continous_legend_binned_label_custom + new_list$x$state$legend_continuous$legend_min <- chart_continous_legend_legend_min + new_list$x$state$legend_continuous$additional_min_label <- chart_continous_legend_additional_min_label + new_list$x$state$legend_continuous$legend_max <- chart_continous_legend_legend_max + new_list$x$state$legend_continuous$additional_max_label <- chart_continous_legend_additional_max_label + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + new_list$x$state$axes_highlights$x_enabled <- chart_axes_highlights_x_enabled + if (length(chart_axes_highlights_x_lines) > 1) { + new_list$x$state$axes_highlights$x_lines <- paste(chart_axes_highlights_x_lines, collapse = "\n") + } else { + new_list$x$state$axes_highlights$x_lines <- chart_axes_highlights_x_lines + } + + new_list$x$state$axes_highlights$x_line_color <- chart_axes_highlights_x_line_color + new_list$x$state$axes_highlights$x_line_width <- chart_axes_highlights_x_line_width + new_list$x$state$axes_highlights$x_line_dash <- chart_axes_highlights_x_line_dash + if (length(chart_axes_highlights_x_areas) > 1) { + new_list$x$state$axes_highlights$x_areas <- paste(chart_axes_highlights_x_areas, collapse = "\n") + } else { + new_list$x$state$axes_highlights$x_areas <- chart_axes_highlights_x_areas + } + + new_list$x$state$axes_highlights$x_area_color <- chart_axes_highlights_x_area_color + new_list$x$state$axes_highlights$x_area_opacity <- chart_axes_highlights_x_area_opacity + list_chart_axes_highlights_x_area_texture <- c("none", "pattern-diagonal", "pattern-grid", "pattern-dots", NULL) + if (!is.null(chart_axes_highlights_x_area_texture)) { + if (!chart_axes_highlights_x_area_texture %in% list_chart_axes_highlights_x_area_texture) { + stop("`chart_axes_highlights_x_area_texture` must be one of: c('none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_area_texture %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_area_texture)) { + chart_axes_highlights_x_area_texture <- as.character(chart_axes_highlights_x_area_texture) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_area_texture])[[1]] + new_list$x$state$axes_highlights$x_area_texture <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_vertical <- chart_axes_highlights_x_label_vertical + list_chart_axes_highlights_x_label_y_position <- c("bottom", "middle", "top", NULL) + if (!is.null(chart_axes_highlights_x_label_y_position)) { + if (!chart_axes_highlights_x_label_y_position %in% list_chart_axes_highlights_x_label_y_position) { + stop("`chart_axes_highlights_x_label_y_position` must be one of: c('bottom', 'middle', 'top')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "middle": "middle", "top": "top"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "middle": "middle", "top": "top"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_label_y_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_label_y_position)) { + chart_axes_highlights_x_label_y_position <- as.character(chart_axes_highlights_x_label_y_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_label_y_position])[[1]] + new_list$x$state$axes_highlights$x_label_y_position <- named_list_value + } + } + } + } + list_chart_axes_highlights_x_label_x_position <- c("left", "middle", "right", NULL) + if (!is.null(chart_axes_highlights_x_label_x_position)) { + if (!chart_axes_highlights_x_label_x_position %in% list_chart_axes_highlights_x_label_x_position) { + stop("`chart_axes_highlights_x_label_x_position` must be one of: c('left', 'middle', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_label_x_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_label_x_position)) { + chart_axes_highlights_x_label_x_position <- as.character(chart_axes_highlights_x_label_x_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_label_x_position])[[1]] + new_list$x$state$axes_highlights$x_label_x_position <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_max_width <- chart_axes_highlights_x_label_max_width + new_list$x$state$axes_highlights$x_font_size <- chart_axes_highlights_x_font_size + list_chart_axes_highlights_x_font_weight <- c("regular", "bold", NULL) + if (!is.null(chart_axes_highlights_x_font_weight)) { + if (!chart_axes_highlights_x_font_weight %in% list_chart_axes_highlights_x_font_weight) { + stop("`chart_axes_highlights_x_font_weight` must be one of: c('regular', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_font_weight %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_font_weight)) { + chart_axes_highlights_x_font_weight <- as.character(chart_axes_highlights_x_font_weight) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_font_weight])[[1]] + new_list$x$state$axes_highlights$x_font_weight <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_color <- chart_axes_highlights_x_label_color + new_list$x$state$axes_highlights$x_shadow_color <- chart_axes_highlights_x_shadow_color + new_list$x$state$axes_highlights$x_shadow_enabled <- chart_axes_highlights_x_shadow_enabled + new_list$x$state$axes_highlights$y_enabled <- chart_axes_highlights_y_enabled + if (length(chart_axes_highlights_y_lines) > 1) { + new_list$x$state$axes_highlights$y_lines <- paste(chart_axes_highlights_y_lines, collapse = "\n") + } else { + new_list$x$state$axes_highlights$y_lines <- chart_axes_highlights_y_lines + } + + new_list$x$state$axes_highlights$y_line_color <- chart_axes_highlights_y_line_color + new_list$x$state$axes_highlights$y_line_width <- chart_axes_highlights_y_line_width + new_list$x$state$axes_highlights$y_line_dash <- chart_axes_highlights_y_line_dash + if (length(chart_axes_highlights_y_areas) > 1) { + new_list$x$state$axes_highlights$y_areas <- paste(chart_axes_highlights_y_areas, collapse = "\n") + } else { + new_list$x$state$axes_highlights$y_areas <- chart_axes_highlights_y_areas + } + + new_list$x$state$axes_highlights$y_area_color <- chart_axes_highlights_y_area_color + new_list$x$state$axes_highlights$y_area_opacity <- chart_axes_highlights_y_area_opacity + list_chart_axes_highlights_y_area_texture <- c("none", "pattern-diagonal", "pattern-grid", "pattern-dots", NULL) + if (!is.null(chart_axes_highlights_y_area_texture)) { + if (!chart_axes_highlights_y_area_texture %in% list_chart_axes_highlights_y_area_texture) { + stop("`chart_axes_highlights_y_area_texture` must be one of: c('none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_area_texture %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_area_texture)) { + chart_axes_highlights_y_area_texture <- as.character(chart_axes_highlights_y_area_texture) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_area_texture])[[1]] + new_list$x$state$axes_highlights$y_area_texture <- named_list_value + } + } + } + } + list_chart_axes_highlights_y_label_x_position <- c("left", "middle", "right", NULL) + if (!is.null(chart_axes_highlights_y_label_x_position)) { + if (!chart_axes_highlights_y_label_x_position %in% list_chart_axes_highlights_y_label_x_position) { + stop("`chart_axes_highlights_y_label_x_position` must be one of: c('left', 'middle', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_label_x_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_label_x_position)) { + chart_axes_highlights_y_label_x_position <- as.character(chart_axes_highlights_y_label_x_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_label_x_position])[[1]] + new_list$x$state$axes_highlights$y_label_x_position <- named_list_value + } + } + } + } + list_chart_axes_highlights_y_label_y_position <- c("above", "middle", "below", NULL) + if (!is.null(chart_axes_highlights_y_label_y_position)) { + if (!chart_axes_highlights_y_label_y_position %in% list_chart_axes_highlights_y_label_y_position) { + stop("`chart_axes_highlights_y_label_y_position` must be one of: c('above', 'middle', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "middle": "middle", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "middle": "middle", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_label_y_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_label_y_position)) { + chart_axes_highlights_y_label_y_position <- as.character(chart_axes_highlights_y_label_y_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_label_y_position])[[1]] + new_list$x$state$axes_highlights$y_label_y_position <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$y_label_max_width <- chart_axes_highlights_y_label_max_width + new_list$x$state$axes_highlights$y_font_size <- chart_axes_highlights_y_font_size + list_chart_axes_highlights_y_font_weight <- c("regular", "bold", NULL) + if (!is.null(chart_axes_highlights_y_font_weight)) { + if (!chart_axes_highlights_y_font_weight %in% list_chart_axes_highlights_y_font_weight) { + stop("`chart_axes_highlights_y_font_weight` must be one of: c('regular', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_font_weight %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_font_weight)) { + chart_axes_highlights_y_font_weight <- as.character(chart_axes_highlights_y_font_weight) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_font_weight])[[1]] + new_list$x$state$axes_highlights$y_font_weight <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$y_label_color <- chart_axes_highlights_y_label_color + new_list$x$state$axes_highlights$y_shadow_color <- chart_axes_highlights_y_shadow_color + new_list$x$state$axes_highlights$y_shadow_enabled <- chart_axes_highlights_y_shadow_enabled + new_list$x$state$animation_duration <- animation_duration + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_gauge_details.R b/R_package/R/set_gauge_details.R new file mode 100644 index 0000000..c8e6d90 --- /dev/null +++ b/R_package/R/set_gauge_details.R @@ -0,0 +1,3999 @@ +#' Set gauge chart details +#' @name set_gauge_details +#' @param gauge_radial_extent Shape. Choices: 90, 180, 270, custom. Flourish type hint: string, defaults to `NULL` +#' @param gauge_radial_extent_custom Angle. Flourish type hint: number, defaults to `NULL` +#' @param gauge_width Inner radius. Choices: 1, 0.75, 0.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param gauge_width_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param gauge_scale_domain Range. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param gauge_scale_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param gauge_scale_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param gauge_color Color. Flourish type hint: color, defaults to `NULL` +#' @param gauge_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param gauge_border_color Border. Flourish type hint: color, defaults to `NULL` +#' @param gauge_border_size Border size. Flourish type hint: number, defaults to `NULL` +#' @param height_mode Height mode. Choices: auto, standard, aspect. Auto: sets the height based on the chart type, data and width. Standard: default Flourish responsive sizing. Aspect ratio: sets the aspect of each plot. This setting is ignored when embedded in a fixed-height context, such as a simple Iframe embedFlourish type hint: string, defaults to `NULL` +#' @param aspect_ratio Aspect ratio. Choices: 0.75, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param aspect_ratio_custom Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param add_aspect_ratio_mobile Mobile aspect ratio. Choices: disabled, enabled. Flourish type hint: string, defaults to `NULL` +#' @param breakpoint Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to `NULL` +#' @param aspect_ratio_mobile Mobile aspect ratio. Choices: 0.75, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param aspect_ratio_mobile_custom Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_columns_fixed Grid mode. Choices: `FALSE`, `TRUE`. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_columns Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width Min gauge width. Determines the minimum size (in pixels) at which each gauge will appear. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width_fixed Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_custom_grid Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_custom_positions Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to `NULL` +#' @param chart_facet_max_width Max gauge width. Determines the maximum size (in pixels) at which each gauge will appear. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_w Horizontal margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_h Vertical margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_animation On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_titles Show titles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_title_align Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_size Size. Relative to the width of the chart. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_unit Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_padding_top Space above. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_padding_bottom Space below. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_bg Background. Choices: none, full, text. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_bg_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_bg_padding Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to `NULL` +#' @param segment_width Size. Choices: 0.1, 0.2, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param segment_width_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param segment_number Number. Choices: auto, fixed, custom. Flourish type hint: string, defaults to `NULL` +#' @param segment_fixed_number Number. Flourish type hint: number, defaults to `NULL` +#' @param segment_custom Two values per line in the following format 0 :: 5. Flourish type hint: text, defaults to `NULL` +#' @param segment_labels One label per line. If the number of segments is Fixed, labels will be added to each segment according to the order they appear in the gauge. If the number of segments is Custom, labels will be added to each segment according to the order in the custom segments have been inputted. Flourish type hint: text, defaults to `NULL` +#' @param segment_label_size Size. Choices: auto, 0.8, 1, 1.2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to `NULL` +#' @param segment_label_size_custom Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param segment_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param segment_label_rotation Rotation. Choices: none, ring. Flourish type hint: string, defaults to `NULL` +#' @param segment_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param segment_label_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param color_type Choices: categorical, numeric. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param ticks_mode Mode. Choices: none, auto, number, custom. Flourish type hint: string, defaults to `NULL` +#' @param ticks_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param ticks_custom One tick value per line. Flourish type hint: text, defaults to `NULL` +#' @param ticks_width Width. Flourish type hint: number, defaults to `NULL` +#' @param ticks_color Color. Flourish type hint: color, defaults to `NULL` +#' @param ticks_length Size. Choices: 0.1, 0.2, 0.3, custom. Flourish type hint: string, defaults to `NULL` +#' @param ticks_length_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param ticks_animation Animation. Choices: disabled, enabled. Flourish type hint: string, defaults to `NULL` +#' @param ticks_animation_duration Duration. The duration, in seconds, of the transitions for example, between two slides in a story Flourish type hint: number, defaults to `NULL` +#' @param intermediate_ticks Intermediate ticks. Choices: off, on. Flourish type hint: string, defaults to `NULL` +#' @param intermediate_ticks_number Number. Approximate number of intermediate ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param intermediate_ticks_width Size. As a proportion of the tick size. Flourish type hint: number, defaults to `NULL` +#' @param ticks_direction Direction. Choices: inwards, outwards. Flourish type hint: string, defaults to `NULL` +#' @param label_position Position. Choices: inside, outside. Flourish type hint: string, defaults to `NULL` +#' @param ticks_label_padding Space. Flourish type hint: number, defaults to `NULL` +#' @param ticks_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param label_rotation Rotation. Choices: none, auto, ring. Flourish type hint: string, defaults to `NULL` +#' @param label_flip Auto flip. Automatically flip when labels become less legible. Flourish type hint: boolean, defaults to `NULL` +#' @param ticks_label_size Size. Choices: 1, 1.5, 2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to `NULL` +#' @param ticks_label_size_custom Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param ticks_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param needle_size Size. Choices: 0.03, 0.06, 0.09, custom. Flourish type hint: string, defaults to `NULL` +#' @param needle_size_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param needle_hand_length Length. Choices: 0.5, 0.75, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param needle_hand_length_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param needle_color Color. Choices: gauge, custom. Flourish type hint: string, defaults to `NULL` +#' @param needle_color_custom Flourish type hint: color, defaults to `NULL` +#' @param needle_centre_size Size. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param needle_centre_size_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param needle_centre_stroke_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param needle_centre_stroke Border color. Flourish type hint: color, defaults to `NULL` +#' @param needle_animation Animation. Choices: disabled, enabled. Flourish type hint: string, defaults to `NULL` +#' @param needle_animation_duration Duration. The duration, in seconds, of the transitions for example, between two slides in a story Flourish type hint: number, defaults to `NULL` +#' @param jitter Amplitude. Choices: none, low, medium, high. Sets how much the gauge needle moves when it animates up and down. To turn off the animation click NoneFlourish type hint: string, defaults to `NULL` +#' @param jitter_speed Speed. Flourish type hint: number, defaults to `NULL` +#' @param gauge_text_align Alignment. Choices: start, middle, end. Flourish type hint: string, defaults to `NULL` +#' @param gauge_text_position Position. Choices: above, below, split. Flourish type hint: string, defaults to `NULL` +#' @param gauge_text_position_flip Flip order. Flourish type hint: boolean, defaults to `NULL` +#' @param gauge_name_size Size. Choices: 1, 1.5, 2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to `NULL` +#' @param gauge_name_size_custom Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param gauge_name_styling Change styling. Flourish type hint: boolean, defaults to `NULL` +#' @param gauge_name_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param gauge_name_color Color. Choices: gauge, custom. Flourish type hint: string, defaults to `NULL` +#' @param gauge_name_color_custom Flourish type hint: color, defaults to `NULL` +#' @param gauge_name_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param gauge_name_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param gauge_name_space_below Space below. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param gauge_name_space_below_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param gauge_value_size Size. Choices: 1, 1.5, 2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to `NULL` +#' @param gauge_value_size_custom Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param gauge_value_styling Change styling. Flourish type hint: boolean, defaults to `NULL` +#' @param gauge_value_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param gauge_value_color Color. Choices: gauge, custom. Flourish type hint: string, defaults to `NULL` +#' @param gauge_value_color_custom Flourish type hint: color, defaults to `NULL` +#' @param gauge_value_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param gauge_value_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param gauge_value_space_below Space below. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param gauge_value_space_below_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_controls_spacing Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "gauge", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_gauge_data(gapminder) |> +#' set_gauge_details() +#' ) +#' @export + +set_gauge_details <- function( + ., + gauge_radial_extent = NULL, + gauge_radial_extent_custom = NULL, + gauge_width = NULL, + gauge_width_custom = NULL, + gauge_scale_domain = NULL, + gauge_scale_domain_min = NULL, + gauge_scale_domain_max = NULL, + gauge_color = NULL, + gauge_opacity = NULL, + gauge_border_color = NULL, + gauge_border_size = NULL, + height_mode = NULL, + aspect_ratio = NULL, + aspect_ratio_custom = NULL, + add_aspect_ratio_mobile = NULL, + breakpoint = NULL, + aspect_ratio_mobile = NULL, + aspect_ratio_mobile_custom = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + segment_width = NULL, + segment_width_custom = NULL, + segment_number = NULL, + segment_fixed_number = NULL, + segment_custom = NULL, + segment_labels = NULL, + segment_label_size = NULL, + segment_label_size_custom = NULL, + segment_label_weight = NULL, + segment_label_rotation = NULL, + segment_label_color = NULL, + segment_label_padding = NULL, + color_type = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + ticks_mode = NULL, + ticks_number = NULL, + ticks_custom = NULL, + ticks_width = NULL, + ticks_color = NULL, + ticks_length = NULL, + ticks_length_custom = NULL, + ticks_animation = NULL, + ticks_animation_duration = NULL, + intermediate_ticks = NULL, + intermediate_ticks_number = NULL, + intermediate_ticks_width = NULL, + ticks_direction = NULL, + label_position = NULL, + ticks_label_padding = NULL, + ticks_label_color = NULL, + label_rotation = NULL, + label_flip = NULL, + ticks_label_size = NULL, + ticks_label_size_custom = NULL, + ticks_label_weight = NULL, + needle_size = NULL, + needle_size_custom = NULL, + needle_hand_length = NULL, + needle_hand_length_custom = NULL, + needle_color = NULL, + needle_color_custom = NULL, + needle_centre_size = NULL, + needle_centre_size_custom = NULL, + needle_centre_stroke_width = NULL, + needle_centre_stroke = NULL, + needle_animation = NULL, + needle_animation_duration = NULL, + jitter = NULL, + jitter_speed = NULL, + gauge_text_align = NULL, + gauge_text_position = NULL, + gauge_text_position_flip = NULL, + gauge_name_size = NULL, + gauge_name_size_custom = NULL, + gauge_name_styling = NULL, + gauge_name_weight = NULL, + gauge_name_color = NULL, + gauge_name_color_custom = NULL, + gauge_name_space_above = NULL, + gauge_name_space_above_custom = NULL, + gauge_name_space_below = NULL, + gauge_name_space_below_custom = NULL, + gauge_value_size = NULL, + gauge_value_size_custom = NULL, + gauge_value_styling = NULL, + gauge_value_weight = NULL, + gauge_value_color = NULL, + gauge_value_color_custom = NULL, + gauge_value_space_above = NULL, + gauge_value_space_above_custom = NULL, + gauge_value_space_below = NULL, + gauge_value_space_below_custom = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "gauge") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/gauge")) { + stop("`set_gauge_details()` is not supported for this chart type.") + } + list_gauge_radial_extent <- c("90", "180", "270", "custom", NULL) + if (!is.null(gauge_radial_extent)) { + if (!gauge_radial_extent %in% list_gauge_radial_extent) { + stop("`gauge_radial_extent` must be one of: c('90', '180', '270', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"90": "90", "180": "180", "270": "270", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"90": "90", "180": "180", "270": "270", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_radial_extent %in% names(named_list)) { + if (is.logical(gauge_radial_extent)) { + gauge_radial_extent <- as.character(gauge_radial_extent) + } + named_list_value <- unname(named_list[gauge_radial_extent])[[1]] + new_list$x$state$gauge_radial_extent <- named_list_value + } + } + } + } + new_list$x$state$gauge_radial_extent_custom <- gauge_radial_extent_custom + list_gauge_width <- c("1", "0.75", "0.5", "custom", NULL) + if (!is.null(gauge_width)) { + if (!gauge_width %in% list_gauge_width) { + stop("`gauge_width` must be one of: c('1', '0.75', '0.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1": "1", "0.75": "0.75", "0.5": "0.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1": "1", "0.75": "0.75", "0.5": "0.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_width %in% names(named_list)) { + if (is.logical(gauge_width)) { + gauge_width <- as.character(gauge_width) + } + named_list_value <- unname(named_list[gauge_width])[[1]] + new_list$x$state$gauge_width <- named_list_value + } + } + } + } + new_list$x$state$gauge_width_custom <- gauge_width_custom + list_gauge_scale_domain <- c("auto", "custom", NULL) + if (!is.null(gauge_scale_domain)) { + if (!gauge_scale_domain %in% list_gauge_scale_domain) { + stop("`gauge_scale_domain` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_scale_domain %in% names(named_list)) { + if (is.logical(gauge_scale_domain)) { + gauge_scale_domain <- as.character(gauge_scale_domain) + } + named_list_value <- unname(named_list[gauge_scale_domain])[[1]] + new_list$x$state$gauge_scale_domain <- named_list_value + } + } + } + } + new_list$x$state$gauge_scale_domain_min <- gauge_scale_domain_min + new_list$x$state$gauge_scale_domain_max <- gauge_scale_domain_max + new_list$x$state$gauge_color <- gauge_color + new_list$x$state$gauge_opacity <- gauge_opacity + new_list$x$state$gauge_border_color <- gauge_border_color + new_list$x$state$gauge_border_size <- gauge_border_size + list_height_mode <- c("auto", "standard", "aspect", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('auto', 'standard', 'aspect')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "standard": "standard", "aspect": "aspect"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "standard": "standard", "aspect": "aspect"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + list_aspect_ratio <- c("0.75", "1", "1.5", "custom", NULL) + if (!is.null(aspect_ratio)) { + if (!aspect_ratio %in% list_aspect_ratio) { + stop("`aspect_ratio` must be one of: c('0.75', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.75": "0.75", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.75": "0.75", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && aspect_ratio %in% names(named_list)) { + if (is.logical(aspect_ratio)) { + aspect_ratio <- as.character(aspect_ratio) + } + named_list_value <- unname(named_list[aspect_ratio])[[1]] + new_list$x$state$aspect_ratio <- named_list_value + } + } + } + } + new_list$x$state$aspect_ratio_custom <- aspect_ratio_custom + list_add_aspect_ratio_mobile <- c("disabled", "enabled", NULL) + if (!is.null(add_aspect_ratio_mobile)) { + if (!add_aspect_ratio_mobile %in% list_add_aspect_ratio_mobile) { + stop("`add_aspect_ratio_mobile` must be one of: c('disabled', 'enabled')") + } else { + if (length(jsonlite::fromJSON('{"disabled": "disabled", "enabled": "enabled"}')) > 1) { + named_list <- jsonlite::fromJSON('{"disabled": "disabled", "enabled": "enabled"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && add_aspect_ratio_mobile %in% names(named_list)) { + if (is.logical(add_aspect_ratio_mobile)) { + add_aspect_ratio_mobile <- as.character(add_aspect_ratio_mobile) + } + named_list_value <- unname(named_list[add_aspect_ratio_mobile])[[1]] + new_list$x$state$add_aspect_ratio_mobile <- named_list_value + } + } + } + } + new_list$x$state$breakpoint <- breakpoint + list_aspect_ratio_mobile <- c("0.75", "1", "1.5", "custom", NULL) + if (!is.null(aspect_ratio_mobile)) { + if (!aspect_ratio_mobile %in% list_aspect_ratio_mobile) { + stop("`aspect_ratio_mobile` must be one of: c('0.75', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.75": "0.75", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.75": "0.75", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && aspect_ratio_mobile %in% names(named_list)) { + if (is.logical(aspect_ratio_mobile)) { + aspect_ratio_mobile <- as.character(aspect_ratio_mobile) + } + named_list_value <- unname(named_list[aspect_ratio_mobile])[[1]] + new_list$x$state$aspect_ratio_mobile <- named_list_value + } + } + } + } + new_list$x$state$aspect_ratio_mobile_custom <- aspect_ratio_mobile_custom + list_chart_facet_columns_fixed <- c(FALSE, TRUE, NULL) + if (!is.null(chart_facet_columns_fixed)) { + if (!chart_facet_columns_fixed %in% list_chart_facet_columns_fixed) { + stop("`chart_facet_columns_fixed` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_columns_fixed %in% names(named_list)) { + if (is.logical(chart_facet_columns_fixed)) { + chart_facet_columns_fixed <- as.character(chart_facet_columns_fixed) + } + named_list_value <- unname(named_list[chart_facet_columns_fixed])[[1]] + new_list$x$state$facets$columns_fixed <- named_list_value + } + } + } + } + new_list$x$state$facets$columns <- chart_facet_columns + new_list$x$state$facets$min_width <- chart_facet_min_width + new_list$x$state$facets$min_width_fixed <- chart_facet_min_width_fixed + new_list$x$state$facets$custom_grid <- chart_facet_custom_grid + if (length(chart_facet_custom_positions) > 1) { + new_list$x$state$facets$custom_positions <- paste(chart_facet_custom_positions, collapse = "\n") + } else { + new_list$x$state$facets$custom_positions <- chart_facet_custom_positions + } + + new_list$x$state$facets$max_width <- chart_facet_max_width + new_list$x$state$facets$gutter_w <- chart_facet_gutter_w + new_list$x$state$facets$gutter_h <- chart_facet_gutter_h + list_chart_facet_animation <- c("auto", "name", "reuse", NULL) + if (!is.null(chart_facet_animation)) { + if (!chart_facet_animation %in% list_chart_facet_animation) { + stop("`chart_facet_animation` must be one of: c('auto', 'name', 'reuse')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_animation %in% names(named_list)) { + if (is.logical(chart_facet_animation)) { + chart_facet_animation <- as.character(chart_facet_animation) + } + named_list_value <- unname(named_list[chart_facet_animation])[[1]] + new_list$x$state$facets$animation <- named_list_value + } + } + } + } + new_list$x$state$facets$titles <- chart_facet_titles + list_chart_facet_title_align <- c("auto", "left", "center", "right", NULL) + if (!is.null(chart_facet_title_align)) { + if (!chart_facet_title_align %in% list_chart_facet_title_align) { + stop("`chart_facet_title_align` must be one of: c('auto', 'left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_align %in% names(named_list)) { + if (is.logical(chart_facet_title_align)) { + chart_facet_title_align <- as.character(chart_facet_title_align) + } + named_list_value <- unname(named_list[chart_facet_title_align])[[1]] + new_list$x$state$facets$title_align <- named_list_value + } + } + } + } + new_list$x$state$facets$title_size <- chart_facet_title_size + list_chart_facet_title_unit <- c("rem", "facet", NULL) + if (!is.null(chart_facet_title_unit)) { + if (!chart_facet_title_unit %in% list_chart_facet_title_unit) { + stop("`chart_facet_title_unit` must be one of: c('rem', 'facet')") + } else { + if (length(jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_unit %in% names(named_list)) { + if (is.logical(chart_facet_title_unit)) { + chart_facet_title_unit <- as.character(chart_facet_title_unit) + } + named_list_value <- unname(named_list[chart_facet_title_unit])[[1]] + new_list$x$state$facets$title_unit <- named_list_value + } + } + } + } + new_list$x$state$facets$title_color <- chart_facet_title_color + new_list$x$state$facets$title_padding_top <- chart_facet_title_padding_top + new_list$x$state$facets$title_padding_bottom <- chart_facet_title_padding_bottom + list_chart_facet_title_bg <- c("none", "full", "text", NULL) + if (!is.null(chart_facet_title_bg)) { + if (!chart_facet_title_bg %in% list_chart_facet_title_bg) { + stop("`chart_facet_title_bg` must be one of: c('none', 'full', 'text')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_bg %in% names(named_list)) { + if (is.logical(chart_facet_title_bg)) { + chart_facet_title_bg <- as.character(chart_facet_title_bg) + } + named_list_value <- unname(named_list[chart_facet_title_bg])[[1]] + new_list$x$state$facets$title_bg <- named_list_value + } + } + } + } + new_list$x$state$facets$title_bg_color <- chart_facet_title_bg_color + new_list$x$state$facets$title_bg_padding <- chart_facet_title_bg_padding + list_segment_width <- c("0.1", "0.2", "1", "custom", NULL) + if (!is.null(segment_width)) { + if (!segment_width %in% list_segment_width) { + stop("`segment_width` must be one of: c('0.1', '0.2', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.1": "0.1", "0.2": "0.2", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.1": "0.1", "0.2": "0.2", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && segment_width %in% names(named_list)) { + if (is.logical(segment_width)) { + segment_width <- as.character(segment_width) + } + named_list_value <- unname(named_list[segment_width])[[1]] + new_list$x$state$segment_width <- named_list_value + } + } + } + } + new_list$x$state$segment_width_custom <- segment_width_custom + list_segment_number <- c("auto", "fixed", "custom", NULL) + if (!is.null(segment_number)) { + if (!segment_number %in% list_segment_number) { + stop("`segment_number` must be one of: c('auto', 'fixed', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && segment_number %in% names(named_list)) { + if (is.logical(segment_number)) { + segment_number <- as.character(segment_number) + } + named_list_value <- unname(named_list[segment_number])[[1]] + new_list$x$state$segment_number <- named_list_value + } + } + } + } + new_list$x$state$segment_fixed_number <- segment_fixed_number + if (length(segment_custom) > 1) { + new_list$x$state$segment_custom <- paste(segment_custom, collapse = "\n") + } else { + new_list$x$state$segment_custom <- segment_custom + } + + if (length(segment_labels) > 1) { + new_list$x$state$segment_labels <- paste(segment_labels, collapse = "\n") + } else { + new_list$x$state$segment_labels <- segment_labels + } + + list_segment_label_size <- c("auto", "0.8", "1", "1.2", "custom", NULL) + if (!is.null(segment_label_size)) { + if (!segment_label_size %in% list_segment_label_size) { + stop("`segment_label_size` must be one of: c('auto', '0.8', '1', '1.2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "0.8": "0.8", "1": "1", "1.2": "1.2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "0.8": "0.8", "1": "1", "1.2": "1.2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && segment_label_size %in% names(named_list)) { + if (is.logical(segment_label_size)) { + segment_label_size <- as.character(segment_label_size) + } + named_list_value <- unname(named_list[segment_label_size])[[1]] + new_list$x$state$segment_label_size <- named_list_value + } + } + } + } + new_list$x$state$segment_label_size_custom <- segment_label_size_custom + list_segment_label_weight <- c("bold", "normal", NULL) + if (!is.null(segment_label_weight)) { + if (!segment_label_weight %in% list_segment_label_weight) { + stop("`segment_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && segment_label_weight %in% names(named_list)) { + if (is.logical(segment_label_weight)) { + segment_label_weight <- as.character(segment_label_weight) + } + named_list_value <- unname(named_list[segment_label_weight])[[1]] + new_list$x$state$segment_label_weight <- named_list_value + } + } + } + } + list_segment_label_rotation <- c("none", "ring", NULL) + if (!is.null(segment_label_rotation)) { + if (!segment_label_rotation %in% list_segment_label_rotation) { + stop("`segment_label_rotation` must be one of: c('none', 'ring')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "ring": "ring"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "ring": "ring"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && segment_label_rotation %in% names(named_list)) { + if (is.logical(segment_label_rotation)) { + segment_label_rotation <- as.character(segment_label_rotation) + } + named_list_value <- unname(named_list[segment_label_rotation])[[1]] + new_list$x$state$segment_label_rotation <- named_list_value + } + } + } + } + new_list$x$state$segment_label_color <- segment_label_color + new_list$x$state$segment_label_padding <- segment_label_padding + list_color_type <- c("categorical", "numeric", NULL) + if (!is.null(color_type)) { + if (!color_type %in% list_color_type) { + stop("`color_type` must be one of: c('categorical', 'numeric')") + } else { + if (length(jsonlite::fromJSON('{"categorical": "categorical", "numeric": "numeric"}')) > 1) { + named_list <- jsonlite::fromJSON('{"categorical": "categorical", "numeric": "numeric"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && color_type %in% names(named_list)) { + if (is.logical(color_type)) { + color_type <- as.character(color_type) + } + named_list_value <- unname(named_list[color_type])[[1]] + new_list$x$state$color_type <- named_list_value + } + } + } + } + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + list_ticks_mode <- c("none", "auto", "number", "custom", NULL) + if (!is.null(ticks_mode)) { + if (!ticks_mode %in% list_ticks_mode) { + stop("`ticks_mode` must be one of: c('none', 'auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && ticks_mode %in% names(named_list)) { + if (is.logical(ticks_mode)) { + ticks_mode <- as.character(ticks_mode) + } + named_list_value <- unname(named_list[ticks_mode])[[1]] + new_list$x$state$ticks_mode <- named_list_value + } + } + } + } + new_list$x$state$ticks_number <- ticks_number + if (length(ticks_custom) > 1) { + new_list$x$state$ticks_custom <- paste(ticks_custom, collapse = "\n") + } else { + new_list$x$state$ticks_custom <- ticks_custom + } + + new_list$x$state$ticks_width <- ticks_width + new_list$x$state$ticks_color <- ticks_color + list_ticks_length <- c("0.1", "0.2", "0.3", "custom", NULL) + if (!is.null(ticks_length)) { + if (!ticks_length %in% list_ticks_length) { + stop("`ticks_length` must be one of: c('0.1', '0.2', '0.3', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.1": "0.1", "0.2": "0.2", "0.3": "0.3", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.1": "0.1", "0.2": "0.2", "0.3": "0.3", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && ticks_length %in% names(named_list)) { + if (is.logical(ticks_length)) { + ticks_length <- as.character(ticks_length) + } + named_list_value <- unname(named_list[ticks_length])[[1]] + new_list$x$state$ticks_length <- named_list_value + } + } + } + } + new_list$x$state$ticks_length_custom <- ticks_length_custom + list_ticks_animation <- c("disabled", "enabled", NULL) + if (!is.null(ticks_animation)) { + if (!ticks_animation %in% list_ticks_animation) { + stop("`ticks_animation` must be one of: c('disabled', 'enabled')") + } else { + if (length(jsonlite::fromJSON('{"disabled": "disabled", "enabled": "enabled"}')) > 1) { + named_list <- jsonlite::fromJSON('{"disabled": "disabled", "enabled": "enabled"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && ticks_animation %in% names(named_list)) { + if (is.logical(ticks_animation)) { + ticks_animation <- as.character(ticks_animation) + } + named_list_value <- unname(named_list[ticks_animation])[[1]] + new_list$x$state$ticks_animation <- named_list_value + } + } + } + } + new_list$x$state$ticks_animation_duration <- ticks_animation_duration + list_intermediate_ticks <- c("off", "on", NULL) + if (!is.null(intermediate_ticks)) { + if (!intermediate_ticks %in% list_intermediate_ticks) { + stop("`intermediate_ticks` must be one of: c('off', 'on')") + } else { + if (length(jsonlite::fromJSON('{"off": "off", "on": "on"}')) > 1) { + named_list <- jsonlite::fromJSON('{"off": "off", "on": "on"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && intermediate_ticks %in% names(named_list)) { + if (is.logical(intermediate_ticks)) { + intermediate_ticks <- as.character(intermediate_ticks) + } + named_list_value <- unname(named_list[intermediate_ticks])[[1]] + new_list$x$state$intermediate_ticks <- named_list_value + } + } + } + } + new_list$x$state$intermediate_ticks_number <- intermediate_ticks_number + new_list$x$state$intermediate_ticks_width <- intermediate_ticks_width + list_ticks_direction <- c("inwards", "outwards", NULL) + if (!is.null(ticks_direction)) { + if (!ticks_direction %in% list_ticks_direction) { + stop("`ticks_direction` must be one of: c('inwards', 'outwards')") + } else { + if (length(jsonlite::fromJSON('{"inwards": "inwards", "outwards": "outwards"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inwards": "inwards", "outwards": "outwards"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && ticks_direction %in% names(named_list)) { + if (is.logical(ticks_direction)) { + ticks_direction <- as.character(ticks_direction) + } + named_list_value <- unname(named_list[ticks_direction])[[1]] + new_list$x$state$ticks_direction <- named_list_value + } + } + } + } + list_label_position <- c("inside", "outside", NULL) + if (!is.null(label_position)) { + if (!label_position %in% list_label_position) { + stop("`label_position` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_position %in% names(named_list)) { + if (is.logical(label_position)) { + label_position <- as.character(label_position) + } + named_list_value <- unname(named_list[label_position])[[1]] + new_list$x$state$label_position <- named_list_value + } + } + } + } + new_list$x$state$ticks_label_padding <- ticks_label_padding + new_list$x$state$ticks_label_color <- ticks_label_color + list_label_rotation <- c("none", "auto", "ring", NULL) + if (!is.null(label_rotation)) { + if (!label_rotation %in% list_label_rotation) { + stop("`label_rotation` must be one of: c('none', 'auto', 'ring')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "auto": "auto", "ring": "ring"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "auto": "auto", "ring": "ring"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_rotation %in% names(named_list)) { + if (is.logical(label_rotation)) { + label_rotation <- as.character(label_rotation) + } + named_list_value <- unname(named_list[label_rotation])[[1]] + new_list$x$state$label_rotation <- named_list_value + } + } + } + } + new_list$x$state$label_flip <- label_flip + list_ticks_label_size <- c("1", "1.5", "2", "custom", NULL) + if (!is.null(ticks_label_size)) { + if (!ticks_label_size %in% list_ticks_label_size) { + stop("`ticks_label_size` must be one of: c('1', '1.5', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1": "1", "1.5": "1.5", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1": "1", "1.5": "1.5", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && ticks_label_size %in% names(named_list)) { + if (is.logical(ticks_label_size)) { + ticks_label_size <- as.character(ticks_label_size) + } + named_list_value <- unname(named_list[ticks_label_size])[[1]] + new_list$x$state$ticks_label_size <- named_list_value + } + } + } + } + new_list$x$state$ticks_label_size_custom <- ticks_label_size_custom + list_ticks_label_weight <- c("bold", "normal", NULL) + if (!is.null(ticks_label_weight)) { + if (!ticks_label_weight %in% list_ticks_label_weight) { + stop("`ticks_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && ticks_label_weight %in% names(named_list)) { + if (is.logical(ticks_label_weight)) { + ticks_label_weight <- as.character(ticks_label_weight) + } + named_list_value <- unname(named_list[ticks_label_weight])[[1]] + new_list$x$state$ticks_label_weight <- named_list_value + } + } + } + } + list_needle_size <- c("0.03", "0.06", "0.09", "custom", NULL) + if (!is.null(needle_size)) { + if (!needle_size %in% list_needle_size) { + stop("`needle_size` must be one of: c('0.03', '0.06', '0.09', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.03": "0.03", "0.06": "0.06", "0.09": "0.09", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.03": "0.03", "0.06": "0.06", "0.09": "0.09", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && needle_size %in% names(named_list)) { + if (is.logical(needle_size)) { + needle_size <- as.character(needle_size) + } + named_list_value <- unname(named_list[needle_size])[[1]] + new_list$x$state$needle_size <- named_list_value + } + } + } + } + new_list$x$state$needle_size_custom <- needle_size_custom + list_needle_hand_length <- c("0.5", "0.75", "1", "custom", NULL) + if (!is.null(needle_hand_length)) { + if (!needle_hand_length %in% list_needle_hand_length) { + stop("`needle_hand_length` must be one of: c('0.5', '0.75', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "0.75": "0.75", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "0.75": "0.75", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && needle_hand_length %in% names(named_list)) { + if (is.logical(needle_hand_length)) { + needle_hand_length <- as.character(needle_hand_length) + } + named_list_value <- unname(named_list[needle_hand_length])[[1]] + new_list$x$state$needle_hand_length <- named_list_value + } + } + } + } + new_list$x$state$needle_hand_length_custom <- needle_hand_length_custom + list_needle_color <- c("gauge", "custom", NULL) + if (!is.null(needle_color)) { + if (!needle_color %in% list_needle_color) { + stop("`needle_color` must be one of: c('gauge', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"gauge": "gauge", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"gauge": "gauge", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && needle_color %in% names(named_list)) { + if (is.logical(needle_color)) { + needle_color <- as.character(needle_color) + } + named_list_value <- unname(named_list[needle_color])[[1]] + new_list$x$state$needle_color <- named_list_value + } + } + } + } + new_list$x$state$needle_color_custom <- needle_color_custom + list_needle_centre_size <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(needle_centre_size)) { + if (!needle_centre_size %in% list_needle_centre_size) { + stop("`needle_centre_size` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && needle_centre_size %in% names(named_list)) { + if (is.logical(needle_centre_size)) { + needle_centre_size <- as.character(needle_centre_size) + } + named_list_value <- unname(named_list[needle_centre_size])[[1]] + new_list$x$state$needle_centre_size <- named_list_value + } + } + } + } + new_list$x$state$needle_centre_size_custom <- needle_centre_size_custom + new_list$x$state$needle_centre_stroke_width <- needle_centre_stroke_width + new_list$x$state$needle_centre_stroke <- needle_centre_stroke + list_needle_animation <- c("disabled", "enabled", NULL) + if (!is.null(needle_animation)) { + if (!needle_animation %in% list_needle_animation) { + stop("`needle_animation` must be one of: c('disabled', 'enabled')") + } else { + if (length(jsonlite::fromJSON('{"disabled": "disabled", "enabled": "enabled"}')) > 1) { + named_list <- jsonlite::fromJSON('{"disabled": "disabled", "enabled": "enabled"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && needle_animation %in% names(named_list)) { + if (is.logical(needle_animation)) { + needle_animation <- as.character(needle_animation) + } + named_list_value <- unname(named_list[needle_animation])[[1]] + new_list$x$state$needle_animation <- named_list_value + } + } + } + } + new_list$x$state$needle_animation_duration <- needle_animation_duration + list_jitter <- c("none", "low", "medium", "high", NULL) + if (!is.null(jitter)) { + if (!jitter %in% list_jitter) { + stop("`jitter` must be one of: c('none', 'low', 'medium', 'high')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "low": "low", "medium": "medium", "high": "high"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "low": "low", "medium": "medium", "high": "high"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && jitter %in% names(named_list)) { + if (is.logical(jitter)) { + jitter <- as.character(jitter) + } + named_list_value <- unname(named_list[jitter])[[1]] + new_list$x$state$jitter <- named_list_value + } + } + } + } + new_list$x$state$jitter_speed <- jitter_speed + list_gauge_text_align <- c("start", "middle", "end", NULL) + if (!is.null(gauge_text_align)) { + if (!gauge_text_align %in% list_gauge_text_align) { + stop("`gauge_text_align` must be one of: c('start', 'middle', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "middle": "middle", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "middle": "middle", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_text_align %in% names(named_list)) { + if (is.logical(gauge_text_align)) { + gauge_text_align <- as.character(gauge_text_align) + } + named_list_value <- unname(named_list[gauge_text_align])[[1]] + new_list$x$state$gauge_text_align <- named_list_value + } + } + } + } + list_gauge_text_position <- c("above", "below", "split", NULL) + if (!is.null(gauge_text_position)) { + if (!gauge_text_position %in% list_gauge_text_position) { + stop("`gauge_text_position` must be one of: c('above', 'below', 'split')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "below": "below", "split": "split"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "below": "below", "split": "split"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_text_position %in% names(named_list)) { + if (is.logical(gauge_text_position)) { + gauge_text_position <- as.character(gauge_text_position) + } + named_list_value <- unname(named_list[gauge_text_position])[[1]] + new_list$x$state$gauge_text_position <- named_list_value + } + } + } + } + new_list$x$state$gauge_text_position_flip <- gauge_text_position_flip + list_gauge_name_size <- c("1", "1.5", "2", "custom", NULL) + if (!is.null(gauge_name_size)) { + if (!gauge_name_size %in% list_gauge_name_size) { + stop("`gauge_name_size` must be one of: c('1', '1.5', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1": "1", "1.5": "1.5", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1": "1", "1.5": "1.5", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_name_size %in% names(named_list)) { + if (is.logical(gauge_name_size)) { + gauge_name_size <- as.character(gauge_name_size) + } + named_list_value <- unname(named_list[gauge_name_size])[[1]] + new_list$x$state$gauge_name_size <- named_list_value + } + } + } + } + new_list$x$state$gauge_name_size_custom <- gauge_name_size_custom + new_list$x$state$gauge_name_styling <- gauge_name_styling + list_gauge_name_weight <- c("bold", "normal", NULL) + if (!is.null(gauge_name_weight)) { + if (!gauge_name_weight %in% list_gauge_name_weight) { + stop("`gauge_name_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_name_weight %in% names(named_list)) { + if (is.logical(gauge_name_weight)) { + gauge_name_weight <- as.character(gauge_name_weight) + } + named_list_value <- unname(named_list[gauge_name_weight])[[1]] + new_list$x$state$gauge_name_weight <- named_list_value + } + } + } + } + list_gauge_name_color <- c("gauge", "custom", NULL) + if (!is.null(gauge_name_color)) { + if (!gauge_name_color %in% list_gauge_name_color) { + stop("`gauge_name_color` must be one of: c('gauge', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"gauge": "gauge", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"gauge": "gauge", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_name_color %in% names(named_list)) { + if (is.logical(gauge_name_color)) { + gauge_name_color <- as.character(gauge_name_color) + } + named_list_value <- unname(named_list[gauge_name_color])[[1]] + new_list$x$state$gauge_name_color <- named_list_value + } + } + } + } + new_list$x$state$gauge_name_color_custom <- gauge_name_color_custom + list_gauge_name_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(gauge_name_space_above)) { + if (!gauge_name_space_above %in% list_gauge_name_space_above) { + stop("`gauge_name_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_name_space_above %in% names(named_list)) { + if (is.logical(gauge_name_space_above)) { + gauge_name_space_above <- as.character(gauge_name_space_above) + } + named_list_value <- unname(named_list[gauge_name_space_above])[[1]] + new_list$x$state$gauge_name_space_above <- named_list_value + } + } + } + } + new_list$x$state$gauge_name_space_above_custom <- gauge_name_space_above_custom + list_gauge_name_space_below <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(gauge_name_space_below)) { + if (!gauge_name_space_below %in% list_gauge_name_space_below) { + stop("`gauge_name_space_below` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_name_space_below %in% names(named_list)) { + if (is.logical(gauge_name_space_below)) { + gauge_name_space_below <- as.character(gauge_name_space_below) + } + named_list_value <- unname(named_list[gauge_name_space_below])[[1]] + new_list$x$state$gauge_name_space_below <- named_list_value + } + } + } + } + new_list$x$state$gauge_name_space_below_custom <- gauge_name_space_below_custom + list_gauge_value_size <- c("1", "1.5", "2", "custom", NULL) + if (!is.null(gauge_value_size)) { + if (!gauge_value_size %in% list_gauge_value_size) { + stop("`gauge_value_size` must be one of: c('1', '1.5', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1": "1", "1.5": "1.5", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1": "1", "1.5": "1.5", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_value_size %in% names(named_list)) { + if (is.logical(gauge_value_size)) { + gauge_value_size <- as.character(gauge_value_size) + } + named_list_value <- unname(named_list[gauge_value_size])[[1]] + new_list$x$state$gauge_value_size <- named_list_value + } + } + } + } + new_list$x$state$gauge_value_size_custom <- gauge_value_size_custom + new_list$x$state$gauge_value_styling <- gauge_value_styling + list_gauge_value_weight <- c("bold", "normal", NULL) + if (!is.null(gauge_value_weight)) { + if (!gauge_value_weight %in% list_gauge_value_weight) { + stop("`gauge_value_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_value_weight %in% names(named_list)) { + if (is.logical(gauge_value_weight)) { + gauge_value_weight <- as.character(gauge_value_weight) + } + named_list_value <- unname(named_list[gauge_value_weight])[[1]] + new_list$x$state$gauge_value_weight <- named_list_value + } + } + } + } + list_gauge_value_color <- c("gauge", "custom", NULL) + if (!is.null(gauge_value_color)) { + if (!gauge_value_color %in% list_gauge_value_color) { + stop("`gauge_value_color` must be one of: c('gauge', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"gauge": "gauge", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"gauge": "gauge", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_value_color %in% names(named_list)) { + if (is.logical(gauge_value_color)) { + gauge_value_color <- as.character(gauge_value_color) + } + named_list_value <- unname(named_list[gauge_value_color])[[1]] + new_list$x$state$gauge_value_color <- named_list_value + } + } + } + } + new_list$x$state$gauge_value_color_custom <- gauge_value_color_custom + list_gauge_value_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(gauge_value_space_above)) { + if (!gauge_value_space_above %in% list_gauge_value_space_above) { + stop("`gauge_value_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_value_space_above %in% names(named_list)) { + if (is.logical(gauge_value_space_above)) { + gauge_value_space_above <- as.character(gauge_value_space_above) + } + named_list_value <- unname(named_list[gauge_value_space_above])[[1]] + new_list$x$state$gauge_value_space_above <- named_list_value + } + } + } + } + new_list$x$state$gauge_value_space_above_custom <- gauge_value_space_above_custom + list_gauge_value_space_below <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(gauge_value_space_below)) { + if (!gauge_value_space_below %in% list_gauge_value_space_below) { + stop("`gauge_value_space_below` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && gauge_value_space_below %in% names(named_list)) { + if (is.logical(gauge_value_space_below)) { + gauge_value_space_below <- as.character(gauge_value_space_below) + } + named_list_value <- unname(named_list[gauge_value_space_below])[[1]] + new_list$x$state$gauge_value_space_below <- named_list_value + } + } + } + } + new_list$x$state$gauge_value_space_below_custom <- gauge_value_space_below_custom + new_list$x$state$formatting$prefix <- chart_number_date_format_prefix + new_list$x$state$formatting$suffix <- chart_number_date_format_suffix + new_list$x$state$formatting$n_dec <- chart_number_date_format_n_dec + new_list$x$state$formatting$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$formatting$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$formatting$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$formatting$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$formatting$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$formatting$transform <- named_list_value + } + } + } + } + new_list$x$state$formatting$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$formatting$exponentiate_constant <- chart_number_date_format_exponentiate_constant + list_chart_filter_controls_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_filter_controls_container_alignment)) { + if (!chart_filter_controls_container_alignment %in% list_chart_filter_controls_container_alignment) { + stop("`chart_filter_controls_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_container_alignment %in% names(named_list)) { + if (is.logical(chart_filter_controls_container_alignment)) { + chart_filter_controls_container_alignment <- as.character(chart_filter_controls_container_alignment) + } + named_list_value <- unname(named_list[chart_filter_controls_container_alignment])[[1]] + new_list$x$state$controls_container$alignment <- named_list_value + } + } + } + } + new_list$x$state$controls_container$controls_spacing <- chart_filter_controls_container_controls_spacing + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$controls$control_type <- named_list_value + } + } + } + } + new_list$x$state$controls$control_styles <- chart_filter_controls_control_styles + new_list$x$state$controls$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$controls$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$controls$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$controls$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$controls$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$controls$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$controls$slider_width <- chart_filter_controls_slider_width + new_list$x$state$controls$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$controls$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$controls$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$controls$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$controls$sort <- named_list_value + } + } + } + } + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$slider_style$track_color <- chart_slider_control_style_track_color + new_list$x$state$slider_style$font_color <- chart_slider_control_style_font_color + new_list$x$state$slider_style$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$slider_style$play_color <- chart_slider_control_style_play_color + new_list$x$state$slider_style$track_height <- chart_slider_control_style_track_height + new_list$x$state$slider_style$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$slider_style$play_button <- chart_slider_control_style_play_button + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_hierarchy_details.R b/R_package/R/set_hierarchy_details.R new file mode 100644 index 0000000..301390a --- /dev/null +++ b/R_package/R/set_hierarchy_details.R @@ -0,0 +1,4103 @@ +#' Set hierarchy chart details +#' @name set_hierarchy_details +#' @param sort_by Sort by. Choices: data, value, name. Sort cells by value or by name. (In the Circles layout, the circles are placed in the specified order following an approximately spiral path.). Flourish type hint: string, defaults to `NULL` +#' @param aggregation_type Size cells by. Choices: sum, count. Flourish type hint: string, defaults to `NULL` +#' @param num_of_visible_levels Depth. How many hierarchy levels are visible at once. Flourish type hint: number, defaults to `NULL` +#' @param auto_set_height Automatic height. Choices: `TRUE`, `FALSE`. Whether responsive embeds can adjust their height automatically. Ignored in simple Iframe embeds, Canva and other fixed-height contexts. Flourish type hint: boolean, defaults to `NULL` +#' @param treemap_aspect_ratio_normal Aspect (desktop). Height of treemap, as % of width. Flourish type hint: number, defaults to `NULL` +#' @param treemap_aspect_ratio_narrow Aspect (mobile). Height of treemap, as % of width. Flourish type hint: number, defaults to `NULL` +#' @param responsive_narrow_breakpoint Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to `NULL` +#' @param treemap_type Tile layout. Choices: treemap_binary, treemap_resquarify, treemap_slice, treemap_dice, treemap_slice_dice. Flourish type hint: string, defaults to `NULL` +#' @param treemap_ratio Target. The target ratio between width and height, where 1 is sqaure and a large number is a tall or wide rectangle. Flourish type hint: number, defaults to `NULL` +#' @param cellPadding Padding. Choices: low, medium, high. Flourish type hint: string, defaults to `NULL` +#' @param sunburst_depth_fade Fade. How quickly the segments fade with hierachical depth. (Use 1 for no fade.). Flourish type hint: number, defaults to `NULL` +#' @param sunburst_labelling Orientation. Choices: auto, radial, circular. How the labels should be oriented. Flourish type hint: string, defaults to `NULL` +#' @param sunburst_inner_radius Hole size. As a % of overall radius. Flourish type hint: number, defaults to `NULL` +#' @param sunburst_show_zoomed_node_in_center Show zoomed node in center. Show zoomed node as a circle in the center of the sunburst chart. (If not zoomed, the space is left blank.). Flourish type hint: boolean, defaults to `NULL` +#' @param bar_min_bar_thickness Height. Minimum bar thickness in pixels. This also determines bar thickness if Automatic height is selected and container height isnt fixed. Flourish type hint: number, defaults to `NULL` +#' @param bar_max_bar_thickness Max height. Maximum bar thickness in pixels. Applies when Automatic height is false. Flourish type hint: number, defaults to `NULL` +#' @param bar_bar_padding Spacing. Distance between bars in pixels. Flourish type hint: number, defaults to `NULL` +#' @param bar_max_value Max value. The maximum value represented by bar length (leave blank for auto-scaling). Flourish type hint: number, defaults to `NULL` +#' @param radial_tree_outer_radius Outer radius (%). Radius of outer nodes (as a percent of the container size). Flourish type hint: number, defaults to `NULL` +#' @param radial_tree_bar_length Bar length (%). Bar length (as a percent of the container size). Flourish type hint: number, defaults to `NULL` +#' @param radial_tree_bar_width Bar width (pixels). Bar width in pixels. Flourish type hint: number, defaults to `NULL` +#' @param radial_tree_rotation Rotation (degrees). Rotates the whole tree. Flourish type hint: number, defaults to `NULL` +#' @param label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param label_size Label size. Label size in rems Flourish type hint: number, defaults to `NULL` +#' @param min_label_size Min size. Minimum label size, in rems Flourish type hint: number, defaults to `NULL` +#' @param max_label_size Max size. Max label size, in rems Flourish type hint: number, defaults to `NULL` +#' @param label_padding Padding. Padding between label and border, in rems Flourish type hint: number, defaults to `NULL` +#' @param label_case Label case. Choices: all_upper_case, all_lower_case, top_upper_case, bottom_upper_case. Determines whether labels are lower or upper case. Items at the top level of the hierarchy can have a different case to the remaining items. Flourish type hint: string, defaults to `NULL` +#' @param label_weight Label weight. Choices: all_normal, all_bold, top_bold, bottom_bold. Determines the font weight (normal or bold) of labels. Items at the top level of the hierarchy can have a different weight to the remaining items. Flourish type hint: string, defaults to `NULL` +#' @param bar_axis_label_size Label size. Axis label size, in rems Flourish type hint: number, defaults to `NULL` +#' @param bar_axis_labels_above Position. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param bar_axis_label_space Width. Space available for axis labels, in rems Flourish type hint: number, defaults to `NULL` +#' @param multi_line_labels Wrap long labels. Display long labels across multiple lines where possible. Currently supported in treemap and circle packing. Flourish type hint: boolean, defaults to `NULL` +#' @param show_value_labels Show values. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param bar_value_label_space Space. Space available for value labels, in rems Flourish type hint: number, defaults to `NULL` +#' @param value_label_bold Bold. Flourish type hint: boolean, defaults to `NULL` +#' @param value_label_relative_size Relative size. The size of the value label relative to the name label. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param stroke_color Stroke color. Flourish type hint: color, defaults to `NULL` +#' @param axis_label_color Axis color. Flourish type hint: color, defaults to `NULL` +#' @param radial_tree_colored_links Colored links. Use colored links. Flourish type hint: boolean, defaults to `NULL` +#' @param radial_tree_link_color Radial tree link color. Flourish type hint: color, defaults to `NULL` +#' @param legend_mode Legend mode. Choices: on, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param legend_position Legend position. Choices: above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. You can also use `{{NAME}}` to include the name of the current item, `{{VALUE}}` to include the value of the current item and `{{SIZEBY}}` to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}`. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. You can also use `{{NAME}}` to include the name of the current item, `{{VALUE}}` to include the value of the current item and `{{SIZEBY}}` to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}`. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. The text to appear in the panel. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the panel. You can also use `{{NAME}}` to include the name of the current item, `{{VALUE}}` to include the value of the current item and `{{SIZEBY}}` to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}`. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. The text to appear in the panel. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the panel. You can also use `{{NAME}}` to include the name of the current item, `{{VALUE}}` to include the value of the current item and `{{SIZEBY}}` to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}`. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param popup_active_levels When to show popup or panel. Choices: all_levels, top_level, below_top_level, above_bottom_level, bottom_level. Specify which hierarchy levels popup is active on. Flourish type hint: string, defaults to `NULL` +#' @param filter_control_visibility Visibility. Choices: always, editor, never. Sets whether the Filter is always visible, only visible when editing or never visible. Flourish type hint: string, defaults to `NULL` +#' @param filter_include_all Include "All" in filter. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_all_label Filter All label. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param size_by_control_visibility Visibility. Choices: always, editor, never. Sets whether the Size by control is always visible, only visible when editing or never visible. Flourish type hint: string, defaults to `NULL` +#' @param chart_size_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_size_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_size_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_size_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_size_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_size_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_size_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_size_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_size_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_size_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_size_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_size_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_size_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_size_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param ascend_button_visibility Visibility. Choices: always, editor, never. Flourish type hint: string, defaults to `NULL` +#' @param zoom_out_button_color Button. Flourish type hint: color, defaults to `NULL` +#' @param zoom_out_arrow_color Arrow. Flourish type hint: color, defaults to `NULL` +#' @param chart_filter_controls_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_controls_spacing Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param animation_duration Duration. The duration, in seconds, of transitions for example, between two slides in a storyFlourish type hint: number, defaults to `NULL` +#' @param size_by_number_formatter_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param size_by_number_formatter_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param size_by_number_formatter_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param size_by_number_formatter_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param size_by_number_formatter_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param size_by_number_formatter_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param size_by_number_formatter_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param size_by_number_formatter_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param size_by_number_formatter_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param size_by_number_formatter_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param size_by_number_formatter_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param filter_number_formatter_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param filter_number_formatter_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param filter_number_formatter_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param filter_number_formatter_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_number_formatter_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param filter_number_formatter_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_number_formatter_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_number_formatter_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_number_formatter_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param filter_number_formatter_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param filter_number_formatter_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_enabled Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_whitelist Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "treemap", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_hierarchy_data(gapminder) |> +#' set_hierarchy_details() +#' ) +#' @export + +set_hierarchy_details <- function( + ., + sort_by = NULL, + aggregation_type = NULL, + num_of_visible_levels = NULL, + auto_set_height = NULL, + treemap_aspect_ratio_normal = NULL, + treemap_aspect_ratio_narrow = NULL, + responsive_narrow_breakpoint = NULL, + treemap_type = NULL, + treemap_ratio = NULL, + cellPadding = NULL, + sunburst_depth_fade = NULL, + sunburst_labelling = NULL, + sunburst_inner_radius = NULL, + sunburst_show_zoomed_node_in_center = NULL, + bar_min_bar_thickness = NULL, + bar_max_bar_thickness = NULL, + bar_bar_padding = NULL, + bar_max_value = NULL, + radial_tree_outer_radius = NULL, + radial_tree_bar_length = NULL, + radial_tree_bar_width = NULL, + radial_tree_rotation = NULL, + label_color = NULL, + label_size = NULL, + min_label_size = NULL, + max_label_size = NULL, + label_padding = NULL, + label_case = NULL, + label_weight = NULL, + bar_axis_label_size = NULL, + bar_axis_labels_above = NULL, + bar_axis_label_space = NULL, + multi_line_labels = NULL, + show_value_labels = NULL, + bar_value_label_space = NULL, + value_label_bold = NULL, + value_label_relative_size = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + stroke_color = NULL, + axis_label_color = NULL, + radial_tree_colored_links = NULL, + radial_tree_link_color = NULL, + legend_mode = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_position = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + popup_active_levels = NULL, + filter_control_visibility = NULL, + filter_include_all = NULL, + filter_all_label = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + size_by_control_visibility = NULL, + chart_size_filter_controls_control_type = NULL, + chart_size_filter_controls_control_styles = NULL, + chart_size_filter_controls_control_title = NULL, + chart_size_filter_controls_button_group = NULL, + chart_size_filter_controls_button_group_width_mode = NULL, + chart_size_filter_controls_button_group_width_fixed = NULL, + chart_size_filter_controls_dropdown_width_mode = NULL, + chart_size_filter_controls_dropdown_width_fixed = NULL, + chart_size_filter_controls_slider_width = NULL, + chart_size_filter_controls_slider_max_label_width = NULL, + chart_size_filter_controls_slider_step_time = NULL, + chart_size_filter_controls_slider_loop = NULL, + chart_size_filter_controls_slider_restart_pause = NULL, + chart_size_filter_controls_sort = NULL, + ascend_button_visibility = NULL, + zoom_out_button_color = NULL, + zoom_out_arrow_color = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + animation_duration = NULL, + size_by_number_formatter_prefix = NULL, + size_by_number_formatter_suffix = NULL, + size_by_number_formatter_n_dec = NULL, + size_by_number_formatter_advanced = NULL, + size_by_number_formatter_negative_sign = NULL, + size_by_number_formatter_strip_zeros = NULL, + size_by_number_formatter_strip_separator = NULL, + size_by_number_formatter_transform_labels = NULL, + size_by_number_formatter_transform = NULL, + size_by_number_formatter_multiply_divide_constant = NULL, + size_by_number_formatter_exponentiate_constant = NULL, + filter_number_formatter_prefix = NULL, + filter_number_formatter_suffix = NULL, + filter_number_formatter_n_dec = NULL, + filter_number_formatter_advanced = NULL, + filter_number_formatter_negative_sign = NULL, + filter_number_formatter_strip_zeros = NULL, + filter_number_formatter_strip_separator = NULL, + filter_number_formatter_transform_labels = NULL, + filter_number_formatter_transform = NULL, + filter_number_formatter_multiply_divide_constant = NULL, + filter_number_formatter_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL) { + details_error(., "hierarchy") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/hierarchy")) { + stop("`set_hierarchy_details()` is not supported for this chart type.") + } + list_sort_by <- c("data", "value", "name", NULL) + if (!is.null(sort_by)) { + if (!sort_by %in% list_sort_by) { + stop("`sort_by` must be one of: c('data', 'value', 'name')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "value": "value", "name": "name"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "value": "value", "name": "name"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && sort_by %in% names(named_list)) { + if (is.logical(sort_by)) { + sort_by <- as.character(sort_by) + } + named_list_value <- unname(named_list[sort_by])[[1]] + new_list$x$state$sort_by <- named_list_value + } + } + } + } + list_aggregation_type <- c("sum", "count", NULL) + if (!is.null(aggregation_type)) { + if (!aggregation_type %in% list_aggregation_type) { + stop("`aggregation_type` must be one of: c('sum', 'count')") + } else { + if (length(jsonlite::fromJSON('{"sum": "Sum", "count": "Count"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sum": "Sum", "count": "Count"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && aggregation_type %in% names(named_list)) { + if (is.logical(aggregation_type)) { + aggregation_type <- as.character(aggregation_type) + } + named_list_value <- unname(named_list[aggregation_type])[[1]] + new_list$x$state$aggregation_type <- named_list_value + } + } + } + } + new_list$x$state$num_of_visible_levels <- num_of_visible_levels + list_auto_set_height <- c(TRUE, FALSE, NULL) + if (!is.null(auto_set_height)) { + if (!auto_set_height %in% list_auto_set_height) { + stop("`auto_set_height` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && auto_set_height %in% names(named_list)) { + if (is.logical(auto_set_height)) { + auto_set_height <- as.character(auto_set_height) + } + named_list_value <- unname(named_list[auto_set_height])[[1]] + new_list$x$state$auto_set_height <- named_list_value + } + } + } + } + new_list$x$state$treemap_aspect_ratio_normal <- treemap_aspect_ratio_normal + new_list$x$state$treemap_aspect_ratio_narrow <- treemap_aspect_ratio_narrow + new_list$x$state$responsive_narrow_breakpoint <- responsive_narrow_breakpoint + list_treemap_type <- c("treemap_binary", "treemap_resquarify", "treemap_slice", "treemap_dice", "treemap_slice_dice", NULL) + if (!is.null(treemap_type)) { + if (!treemap_type %in% list_treemap_type) { + stop("`treemap_type` must be one of: c('treemap_binary', 'treemap_resquarify', 'treemap_slice', 'treemap_dice', 'treemap_slice_dice')") + } else { + if (length(jsonlite::fromJSON('{"treemap_binary": "treemapBinary", "treemap_resquarify": "treemapResquarify", "treemap_slice": "treemapSlice", "treemap_dice": "treemapDice", "treemap_slice_dice": "treemapSliceDice"}')) > 1) { + named_list <- jsonlite::fromJSON('{"treemap_binary": "treemapBinary", "treemap_resquarify": "treemapResquarify", "treemap_slice": "treemapSlice", "treemap_dice": "treemapDice", "treemap_slice_dice": "treemapSliceDice"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && treemap_type %in% names(named_list)) { + if (is.logical(treemap_type)) { + treemap_type <- as.character(treemap_type) + } + named_list_value <- unname(named_list[treemap_type])[[1]] + new_list$x$state$treemap_type <- named_list_value + } + } + } + } + new_list$x$state$treemap_ratio <- treemap_ratio + list_cellPadding <- c("low", "medium", "high", NULL) + if (!is.null(cellPadding)) { + if (!cellPadding %in% list_cellPadding) { + stop("`cellPadding` must be one of: c('low', 'medium', 'high')") + } else { + if (length(jsonlite::fromJSON('{"low": "low", "medium": "medium", "high": "high"}')) > 1) { + named_list <- jsonlite::fromJSON('{"low": "low", "medium": "medium", "high": "high"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && cellPadding %in% names(named_list)) { + if (is.logical(cellPadding)) { + cellPadding <- as.character(cellPadding) + } + named_list_value <- unname(named_list[cellPadding])[[1]] + new_list$x$state$cellPadding <- named_list_value + } + } + } + } + new_list$x$state$sunburst_depth_fade <- sunburst_depth_fade + list_sunburst_labelling <- c("auto", "radial", "circular", NULL) + if (!is.null(sunburst_labelling)) { + if (!sunburst_labelling %in% list_sunburst_labelling) { + stop("`sunburst_labelling` must be one of: c('auto', 'radial', 'circular')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "radial": "radial", "circular": "circular"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "radial": "radial", "circular": "circular"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && sunburst_labelling %in% names(named_list)) { + if (is.logical(sunburst_labelling)) { + sunburst_labelling <- as.character(sunburst_labelling) + } + named_list_value <- unname(named_list[sunburst_labelling])[[1]] + new_list$x$state$sunburst_labelling <- named_list_value + } + } + } + } + new_list$x$state$sunburst_inner_radius <- sunburst_inner_radius + new_list$x$state$sunburst_show_zoomed_node_in_center <- sunburst_show_zoomed_node_in_center + new_list$x$state$bar_min_bar_thickness <- bar_min_bar_thickness + new_list$x$state$bar_max_bar_thickness <- bar_max_bar_thickness + new_list$x$state$bar_bar_padding <- bar_bar_padding + new_list$x$state$bar_max_value <- bar_max_value + new_list$x$state$radial_tree_outer_radius <- radial_tree_outer_radius + new_list$x$state$radial_tree_bar_length <- radial_tree_bar_length + new_list$x$state$radial_tree_bar_width <- radial_tree_bar_width + new_list$x$state$radial_tree_rotation <- radial_tree_rotation + new_list$x$state$label_color <- label_color + new_list$x$state$label_size <- label_size + new_list$x$state$min_label_size <- min_label_size + new_list$x$state$max_label_size <- max_label_size + new_list$x$state$label_padding <- label_padding + list_label_case <- c("all_upper_case", "all_lower_case", "top_upper_case", "bottom_upper_case", NULL) + if (!is.null(label_case)) { + if (!label_case %in% list_label_case) { + stop("`label_case` must be one of: c('all_upper_case', 'all_lower_case', 'top_upper_case', 'bottom_upper_case')") + } else { + if (length(jsonlite::fromJSON('{"all_upper_case": "allUpperCase", "all_lower_case": "allLowerCase", "top_upper_case": "topUpperCase", "bottom_upper_case": "bottomUpperCase"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all_upper_case": "allUpperCase", "all_lower_case": "allLowerCase", "top_upper_case": "topUpperCase", "bottom_upper_case": "bottomUpperCase"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_case %in% names(named_list)) { + if (is.logical(label_case)) { + label_case <- as.character(label_case) + } + named_list_value <- unname(named_list[label_case])[[1]] + new_list$x$state$label_case <- named_list_value + } + } + } + } + list_label_weight <- c("all_normal", "all_bold", "top_bold", "bottom_bold", NULL) + if (!is.null(label_weight)) { + if (!label_weight %in% list_label_weight) { + stop("`label_weight` must be one of: c('all_normal', 'all_bold', 'top_bold', 'bottom_bold')") + } else { + if (length(jsonlite::fromJSON('{"all_normal": "allNormal", "all_bold": "allBold", "top_bold": "topBold", "bottom_bold": "bottomBold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all_normal": "allNormal", "all_bold": "allBold", "top_bold": "topBold", "bottom_bold": "bottomBold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_weight %in% names(named_list)) { + if (is.logical(label_weight)) { + label_weight <- as.character(label_weight) + } + named_list_value <- unname(named_list[label_weight])[[1]] + new_list$x$state$label_weight <- named_list_value + } + } + } + } + new_list$x$state$bar_axis_label_size <- bar_axis_label_size + list_bar_axis_labels_above <- c(FALSE, TRUE, NULL) + if (!is.null(bar_axis_labels_above)) { + if (!bar_axis_labels_above %in% list_bar_axis_labels_above) { + stop("`bar_axis_labels_above` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && bar_axis_labels_above %in% names(named_list)) { + if (is.logical(bar_axis_labels_above)) { + bar_axis_labels_above <- as.character(bar_axis_labels_above) + } + named_list_value <- unname(named_list[bar_axis_labels_above])[[1]] + new_list$x$state$bar_axis_labels_above <- named_list_value + } + } + } + } + new_list$x$state$bar_axis_label_space <- bar_axis_label_space + new_list$x$state$multi_line_labels <- multi_line_labels + list_show_value_labels <- c(TRUE, FALSE, NULL) + if (!is.null(show_value_labels)) { + if (!show_value_labels %in% list_show_value_labels) { + stop("`show_value_labels` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && show_value_labels %in% names(named_list)) { + if (is.logical(show_value_labels)) { + show_value_labels <- as.character(show_value_labels) + } + named_list_value <- unname(named_list[show_value_labels])[[1]] + new_list$x$state$show_value_labels <- named_list_value + } + } + } + } + new_list$x$state$bar_value_label_space <- bar_value_label_space + new_list$x$state$value_label_bold <- value_label_bold + new_list$x$state$value_label_relative_size <- value_label_relative_size + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$stroke_color <- stroke_color + new_list$x$state$axis_label_color <- axis_label_color + new_list$x$state$radial_tree_colored_links <- radial_tree_colored_links + new_list$x$state$radial_tree_link_color <- radial_tree_link_color + list_legend_mode <- c("on", "off", NULL) + if (!is.null(legend_mode)) { + if (!legend_mode %in% list_legend_mode) { + stop("`legend_mode` must be one of: c('on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_mode %in% names(named_list)) { + if (is.logical(legend_mode)) { + legend_mode <- as.character(legend_mode) + } + named_list_value <- unname(named_list[legend_mode])[[1]] + new_list$x$state$legend_mode <- named_list_value + } + } + } + } + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_legend_position <- c("above", "below", NULL) + if (!is.null(legend_position)) { + if (!legend_position %in% list_legend_position) { + stop("`legend_position` must be one of: c('above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_position %in% names(named_list)) { + if (is.logical(legend_position)) { + legend_position <- as.character(legend_position) + } + named_list_value <- unname(named_list[legend_position])[[1]] + new_list$x$state$legend_position <- named_list_value + } + } + } + } + list_chart_popup_mode <- c("none", "popup", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + list_popup_active_levels <- c("all_levels", "top_level", "below_top_level", "above_bottom_level", "bottom_level", NULL) + if (!is.null(popup_active_levels)) { + if (!popup_active_levels %in% list_popup_active_levels) { + stop("`popup_active_levels` must be one of: c('all_levels', 'top_level', 'below_top_level', 'above_bottom_level', 'bottom_level')") + } else { + if (length(jsonlite::fromJSON('{"all_levels": "all_levels", "top_level": "top_level", "below_top_level": "below_top_level", "above_bottom_level": "above_bottom_level", "bottom_level": "bottom_level"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all_levels": "all_levels", "top_level": "top_level", "below_top_level": "below_top_level", "above_bottom_level": "above_bottom_level", "bottom_level": "bottom_level"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && popup_active_levels %in% names(named_list)) { + if (is.logical(popup_active_levels)) { + popup_active_levels <- as.character(popup_active_levels) + } + named_list_value <- unname(named_list[popup_active_levels])[[1]] + new_list$x$state$popup_active_levels <- named_list_value + } + } + } + } + list_filter_control_visibility <- c("always", "editor", "never", NULL) + if (!is.null(filter_control_visibility)) { + if (!filter_control_visibility %in% list_filter_control_visibility) { + stop("`filter_control_visibility` must be one of: c('always', 'editor', 'never')") + } else { + if (length(jsonlite::fromJSON('{"always": "always", "editor": "editor", "never": "never"}')) > 1) { + named_list <- jsonlite::fromJSON('{"always": "always", "editor": "editor", "never": "never"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && filter_control_visibility %in% names(named_list)) { + if (is.logical(filter_control_visibility)) { + filter_control_visibility <- as.character(filter_control_visibility) + } + named_list_value <- unname(named_list[filter_control_visibility])[[1]] + new_list$x$state$filter_control_visibility <- named_list_value + } + } + } + } + new_list$x$state$filter_include_all <- filter_include_all + new_list$x$state$filter_all_label <- filter_all_label + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$filter_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$filter_control$control_styles <- chart_filter_controls_control_styles + new_list$x$state$filter_control$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$filter_control$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$filter_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$filter_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$filter_control$slider_width <- chart_filter_controls_slider_width + new_list$x$state$filter_control$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$filter_control$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$filter_control$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$filter_control$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$filter_control$sort <- named_list_value + } + } + } + } + list_size_by_control_visibility <- c("always", "editor", "never", NULL) + if (!is.null(size_by_control_visibility)) { + if (!size_by_control_visibility %in% list_size_by_control_visibility) { + stop("`size_by_control_visibility` must be one of: c('always', 'editor', 'never')") + } else { + if (length(jsonlite::fromJSON('{"always": "always", "editor": "editor", "never": "never"}')) > 1) { + named_list <- jsonlite::fromJSON('{"always": "always", "editor": "editor", "never": "never"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && size_by_control_visibility %in% names(named_list)) { + if (is.logical(size_by_control_visibility)) { + size_by_control_visibility <- as.character(size_by_control_visibility) + } + named_list_value <- unname(named_list[size_by_control_visibility])[[1]] + new_list$x$state$size_by_control_visibility <- named_list_value + } + } + } + } + list_chart_size_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_size_filter_controls_control_type)) { + if (!chart_size_filter_controls_control_type %in% list_chart_size_filter_controls_control_type) { + stop("`chart_size_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_size_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_size_filter_controls_control_type)) { + chart_size_filter_controls_control_type <- as.character(chart_size_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_size_filter_controls_control_type])[[1]] + new_list$x$state$size_by_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$size_by_control$control_styles <- chart_size_filter_controls_control_styles + new_list$x$state$size_by_control$control_title <- chart_size_filter_controls_control_title + list_chart_size_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_size_filter_controls_button_group)) { + if (!chart_size_filter_controls_button_group %in% list_chart_size_filter_controls_button_group) { + stop("`chart_size_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_size_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_size_filter_controls_button_group)) { + chart_size_filter_controls_button_group <- as.character(chart_size_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_size_filter_controls_button_group])[[1]] + new_list$x$state$size_by_control$button_group <- named_list_value + } + } + } + } + list_chart_size_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_size_filter_controls_button_group_width_mode)) { + if (!chart_size_filter_controls_button_group_width_mode %in% list_chart_size_filter_controls_button_group_width_mode) { + stop("`chart_size_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_size_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_size_filter_controls_button_group_width_mode)) { + chart_size_filter_controls_button_group_width_mode <- as.character(chart_size_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_size_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$size_by_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$size_by_control$button_group_width_fixed <- chart_size_filter_controls_button_group_width_fixed + list_chart_size_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_size_filter_controls_dropdown_width_mode)) { + if (!chart_size_filter_controls_dropdown_width_mode %in% list_chart_size_filter_controls_dropdown_width_mode) { + stop("`chart_size_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_size_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_size_filter_controls_dropdown_width_mode)) { + chart_size_filter_controls_dropdown_width_mode <- as.character(chart_size_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_size_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$size_by_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$size_by_control$dropdown_width_fixed <- chart_size_filter_controls_dropdown_width_fixed + new_list$x$state$size_by_control$slider_width <- chart_size_filter_controls_slider_width + new_list$x$state$size_by_control$slider_max_label_width <- chart_size_filter_controls_slider_max_label_width + new_list$x$state$size_by_control$slider_step_time <- chart_size_filter_controls_slider_step_time + new_list$x$state$size_by_control$slider_loop <- chart_size_filter_controls_slider_loop + new_list$x$state$size_by_control$slider_restart_pause <- chart_size_filter_controls_slider_restart_pause + list_chart_size_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_size_filter_controls_sort)) { + if (!chart_size_filter_controls_sort %in% list_chart_size_filter_controls_sort) { + stop("`chart_size_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_size_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_size_filter_controls_sort)) { + chart_size_filter_controls_sort <- as.character(chart_size_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_size_filter_controls_sort])[[1]] + new_list$x$state$size_by_control$sort <- named_list_value + } + } + } + } + list_ascend_button_visibility <- c("always", "editor", "never", NULL) + if (!is.null(ascend_button_visibility)) { + if (!ascend_button_visibility %in% list_ascend_button_visibility) { + stop("`ascend_button_visibility` must be one of: c('always', 'editor', 'never')") + } else { + if (length(jsonlite::fromJSON('{"always": "always", "editor": "editor", "never": "never"}')) > 1) { + named_list <- jsonlite::fromJSON('{"always": "always", "editor": "editor", "never": "never"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && ascend_button_visibility %in% names(named_list)) { + if (is.logical(ascend_button_visibility)) { + ascend_button_visibility <- as.character(ascend_button_visibility) + } + named_list_value <- unname(named_list[ascend_button_visibility])[[1]] + new_list$x$state$ascend_button_visibility <- named_list_value + } + } + } + } + new_list$x$state$zoom_out_button_color <- zoom_out_button_color + new_list$x$state$zoom_out_arrow_color <- zoom_out_arrow_color + list_chart_filter_controls_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_filter_controls_container_alignment)) { + if (!chart_filter_controls_container_alignment %in% list_chart_filter_controls_container_alignment) { + stop("`chart_filter_controls_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_container_alignment %in% names(named_list)) { + if (is.logical(chart_filter_controls_container_alignment)) { + chart_filter_controls_container_alignment <- as.character(chart_filter_controls_container_alignment) + } + named_list_value <- unname(named_list[chart_filter_controls_container_alignment])[[1]] + new_list$x$state$controls_container$alignment <- named_list_value + } + } + } + } + new_list$x$state$controls_container$controls_spacing <- chart_filter_controls_container_controls_spacing + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$slider_style$track_color <- chart_slider_control_style_track_color + new_list$x$state$slider_style$font_color <- chart_slider_control_style_font_color + new_list$x$state$slider_style$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$slider_style$play_color <- chart_slider_control_style_play_color + new_list$x$state$slider_style$track_height <- chart_slider_control_style_track_height + new_list$x$state$slider_style$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$slider_style$play_button <- chart_slider_control_style_play_button + new_list$x$state$animation_duration <- animation_duration + new_list$x$state$size_by_number_formatter$prefix <- size_by_number_formatter_prefix + new_list$x$state$size_by_number_formatter$suffix <- size_by_number_formatter_suffix + new_list$x$state$size_by_number_formatter$n_dec <- size_by_number_formatter_n_dec + new_list$x$state$size_by_number_formatter$advanced <- size_by_number_formatter_advanced + list_size_by_number_formatter_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(size_by_number_formatter_negative_sign)) { + if (!size_by_number_formatter_negative_sign %in% list_size_by_number_formatter_negative_sign) { + stop("`size_by_number_formatter_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && size_by_number_formatter_negative_sign %in% names(named_list)) { + if (is.logical(size_by_number_formatter_negative_sign)) { + size_by_number_formatter_negative_sign <- as.character(size_by_number_formatter_negative_sign) + } + named_list_value <- unname(named_list[size_by_number_formatter_negative_sign])[[1]] + new_list$x$state$size_by_number_formatter$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$size_by_number_formatter$strip_zeros <- size_by_number_formatter_strip_zeros + new_list$x$state$size_by_number_formatter$strip_separator <- size_by_number_formatter_strip_separator + new_list$x$state$size_by_number_formatter$transform_labels <- size_by_number_formatter_transform_labels + list_size_by_number_formatter_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(size_by_number_formatter_transform)) { + if (!size_by_number_formatter_transform %in% list_size_by_number_formatter_transform) { + stop("`size_by_number_formatter_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && size_by_number_formatter_transform %in% names(named_list)) { + if (is.logical(size_by_number_formatter_transform)) { + size_by_number_formatter_transform <- as.character(size_by_number_formatter_transform) + } + named_list_value <- unname(named_list[size_by_number_formatter_transform])[[1]] + new_list$x$state$size_by_number_formatter$transform <- named_list_value + } + } + } + } + new_list$x$state$size_by_number_formatter$multiply_divide_constant <- size_by_number_formatter_multiply_divide_constant + new_list$x$state$size_by_number_formatter$exponentiate_constant <- size_by_number_formatter_exponentiate_constant + new_list$x$state$filter_number_formatter$prefix <- filter_number_formatter_prefix + new_list$x$state$filter_number_formatter$suffix <- filter_number_formatter_suffix + new_list$x$state$filter_number_formatter$n_dec <- filter_number_formatter_n_dec + new_list$x$state$filter_number_formatter$advanced <- filter_number_formatter_advanced + list_filter_number_formatter_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(filter_number_formatter_negative_sign)) { + if (!filter_number_formatter_negative_sign %in% list_filter_number_formatter_negative_sign) { + stop("`filter_number_formatter_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && filter_number_formatter_negative_sign %in% names(named_list)) { + if (is.logical(filter_number_formatter_negative_sign)) { + filter_number_formatter_negative_sign <- as.character(filter_number_formatter_negative_sign) + } + named_list_value <- unname(named_list[filter_number_formatter_negative_sign])[[1]] + new_list$x$state$filter_number_formatter$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$filter_number_formatter$strip_zeros <- filter_number_formatter_strip_zeros + new_list$x$state$filter_number_formatter$strip_separator <- filter_number_formatter_strip_separator + new_list$x$state$filter_number_formatter$transform_labels <- filter_number_formatter_transform_labels + list_filter_number_formatter_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(filter_number_formatter_transform)) { + if (!filter_number_formatter_transform %in% list_filter_number_formatter_transform) { + stop("`filter_number_formatter_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && filter_number_formatter_transform %in% names(named_list)) { + if (is.logical(filter_number_formatter_transform)) { + filter_number_formatter_transform <- as.character(filter_number_formatter_transform) + } + named_list_value <- unname(named_list[filter_number_formatter_transform])[[1]] + new_list$x$state$filter_number_formatter$transform <- named_list_value + } + } + } + } + new_list$x$state$filter_number_formatter$multiply_divide_constant <- filter_number_formatter_multiply_divide_constant + new_list$x$state$filter_number_formatter$exponentiate_constant <- filter_number_formatter_exponentiate_constant + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + new_list$x$state$url_state$enabled <- chart_url_settings_enabled + if (length(chart_url_settings_whitelist) > 1) { + new_list$x$state$url_state$whitelist <- paste(chart_url_settings_whitelist, collapse = "\n") + } else { + new_list$x$state$url_state$whitelist <- chart_url_settings_whitelist + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_horserace_details.R b/R_package/R/set_horserace_details.R new file mode 100644 index 0000000..67d43ba --- /dev/null +++ b/R_package/R/set_horserace_details.R @@ -0,0 +1,4389 @@ +#' Set line chart race chart details +#' @name set_horserace_details +#' @param play_mode Play mode. In All mode, the entire X axis is visible In Zoomed mode, the X axis is only visible for a specified amount of stages In Reveal mode, the X axis is visible from the start until the current stage Flourish type hint: string, defaults to `NULL` +#' @param zoom_steps_to_show Visible stages. The number of time slices (each of which is column of data) to show on the X axis. When in Zoom mode, these time slices are shown to the left and right of the current time. In Reveal mode, these time slices are shown at the beginning. (Value is ignored if the number specified is greater than the number of stages in the data.). Flourish type hint: number, defaults to `NULL` +#' @param value_type Chart mode to show on load. Choices: ranks, scores. Flourish type hint: string, defaults to `NULL` +#' @param higher_scores_win Data type. Choices: `TRUE`, `FALSE`. Useful for data where lower scores beat higher scores e.g. race times. Flourish type hint: boolean, defaults to `NULL` +#' @param ties_mode Rank ties mode. Choices: competition, dense. What ranks should be given when there are ties? See Wikipedia for an explanation of names. Flourish type hint: string, defaults to `NULL` +#' @param height_mode Height mode. Choices: auto, fixed, flexible. In Fill space mode, the lines will be spread out over the available chart height, which by default will be the standard Flourish chart sizes for any given screen width. In this mode, the circles/images may overlap if you have lots of lines. Match data mode will resize the embedded graphic so there is enough vertical space to avoid overlaps. (Note this wont have any effect if you embed the graphic as a fixed height.) Auto mode switches between the two modes depending on the number of lines. Flourish type hint: string, defaults to `NULL` +#' @param padding_top Top. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param padding_right Right. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param padding_bottom Bottom. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param padding_left Left (mobile). In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param show_buttons Ranks/scores toggle. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param show_replay Replay button. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_background_color Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_filter_controls_slider_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_filter_controls_slider_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_filter_controls_slider_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_margin Label width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_include_all Include “All” option. Flourish type hint: boolean, defaults to `NULL` +#' @param label_ranks “Ranks”. Flourish type hint: string, defaults to `NULL` +#' @param label_scores “Scores”. Flourish type hint: string, defaults to `NULL` +#' @param label_replay “Replay”. Flourish type hint: string, defaults to `NULL` +#' @param filter_all_label “All”. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param color_mode Color mode. Choices: category, line, single. Whether to color by category (if you have a category column set in the Datasheet), by each individual line, or give every line the same color. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param color_single Single color. Flourish type hint: color, defaults to `NULL` +#' @param color_single_overrides Color overrides. Type the label of the line whose color you want to set, a colon and then a color (using a name, hex-code or rgb). Multiple colors can be set using multiple lines. For example: China: red India: #4455AA Brazil: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param line_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param line_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param curve Curve. Choices: curve_linear, curve_monotone_x, curve_natural, curve_step, curve_step_after, curve_step_before. Flourish type hint: string, defaults to `NULL` +#' @param shade Shading behind line. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param shade_width Width. Width in pixels. Flourish type hint: number, defaults to `NULL` +#' @param shade_opacity Opacity. Set to a value between 0 and 1. Flourish type hint: number, defaults to `NULL` +#' @param missing Lines between missing data points. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param missing_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param missing_width Width. Flourish type hint: number, defaults to `NULL` +#' @param missing_stroke_dash Stroke dash. Flourish type hint: number, defaults to `NULL` +#' @param start_circle_r Start radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param end_circle_r End radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param end_circle_stroke End stroke. Flourish type hint: number, defaults to `NULL` +#' @param circle_space_between Space between. Minimum space between the circles. The space is ignored when the chart is set to fill available space. Flourish type hint: number, defaults to `NULL` +#' @param end_circle_stroke_bg Stroke color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param horse_images Image inside circle. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param show_labels Show labels. Choices: always, hover, never. Flourish type hint: string, defaults to `NULL` +#' @param animate_scores Animate scores. Flourish type hint: boolean, defaults to `NULL` +#' @param rank_outside_picture Value label position. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param label_divider Divider. The character between label and value. Flourish type hint: string, defaults to `NULL` +#' @param rank_inside_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_labels_max_width Max label width. The maximum allowed label width. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_overlap_mode Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to `NULL` +#' @param chart_labels_spreading_margin Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_data_point_margin Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_show_only_labels Show only certain labels. Manually specify which labels youd like to display (one entry per line that should match entries in the Label column). Flourish type hint: text, defaults to `NULL` +#' @param chart_labels_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_labels_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_text_bg_color Outline. Flourish type hint: color, defaults to `NULL` +#' @param chart_labels_text_bg_size Outline width. As a % of the font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_text_max_lines Max lines. The max number of lines for each label. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_text_weight Weight. Choices: 400, 700. Flourish type hint: string, defaults to `NULL` +#' @param chart_labels_lines Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_labels_line_style Line style. Choices: straight, step. Flourish type hint: string, defaults to `NULL` +#' @param chart_labels_line_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_labels_line_width Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_line_range Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_line_padding Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_axis_position Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_y_axis_position Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_zero_axis Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_position Position. Choices: default, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_side Tick side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_axis_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_zero_axis Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_title_position Position. Choices: side, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_position Position. Choices: default, above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_side Side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param zoom_y_axis Dynamic Y axis. Rescales the y axis when filtering or playing in zoomed mode. Flourish type hint: boolean, defaults to `NULL` +#' @param caption_background_color Background. Flourish type hint: color, defaults to `NULL` +#' @param caption_border_color Border. Flourish type hint: color, defaults to `NULL` +#' @param caption_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param caption_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param caption_padding Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param caption_position Position. Choices: top-left, center-left, bottom-left, top-right, center-right, bottom-right, top-center, center-center, bottom-center. Flourish type hint: string, defaults to `NULL` +#' @param caption_text_width Width. Flourish type hint: number, defaults to `NULL` +#' @param caption_font_size Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param caption_text_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param caption_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param caption_mode Content mode. Choices: text_legend, html. In Text with colors mode, any phrases matching category names will be automatically colored. In HTML mode, no colors will be applied, but you can include any HTML in the datasheet to add images, etc. Flourish type hint: string, defaults to `NULL` +#' @param caption_text_align_h Horizontal align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param caption_text_align_v Vertical align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param caption_image_width Width. Flourish type hint: number, defaults to `NULL` +#' @param caption_image_position Position. Choices: column, column-reverse, row, row-reverse. Flourish type hint: string, defaults to `NULL` +#' @param caption_space_between Space between. Space between image and text. Flourish type hint: number, defaults to `NULL` +#' @param stage_duration Animation duration. The race animation length, in milliseconds per stage(A stage is equal to each column of your data). Flourish type hint: number, defaults to `NULL` +#' @param update_duration Mode duration. The animation duration when change between ranks and scores modes. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "horserace", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_horserace_data(gapminder) |> +#' set_horserace_details() +#' ) +#' @export + +set_horserace_details <- function( + ., + play_mode = NULL, + zoom_steps_to_show = NULL, + value_type = NULL, + higher_scores_win = NULL, + ties_mode = NULL, + height_mode = NULL, + padding_top = NULL, + padding_right = NULL, + padding_bottom = NULL, + padding_left = NULL, + show_buttons = NULL, + show_replay = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_background_color = NULL, + chart_filter_controls_slider_font_color = NULL, + chart_filter_controls_slider_handle_color = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_margin = NULL, + chart_filter_controls_slider_handle_height = NULL, + chart_filter_controls_slider_track_height = NULL, + chart_filter_controls_slider_play_button = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_include_all = NULL, + label_ranks = NULL, + label_scores = NULL, + label_replay = NULL, + filter_all_label = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + color_mode = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + color_single = NULL, + color_single_overrides = NULL, + line_width = NULL, + line_opacity = NULL, + curve = NULL, + shade = NULL, + shade_width = NULL, + shade_opacity = NULL, + missing = NULL, + missing_opacity = NULL, + missing_width = NULL, + missing_stroke_dash = NULL, + start_circle_r = NULL, + end_circle_r = NULL, + end_circle_stroke = NULL, + circle_space_between = NULL, + end_circle_stroke_bg = NULL, + horse_images = NULL, + show_labels = NULL, + animate_scores = NULL, + rank_outside_picture = NULL, + label_divider = NULL, + rank_inside_color = NULL, + chart_labels_max_width = NULL, + chart_labels_overlap_mode = NULL, + chart_labels_spreading_margin = NULL, + chart_labels_data_point_margin = NULL, + chart_labels_show_only_labels = NULL, + chart_labels_text_color = NULL, + chart_labels_text_size = NULL, + chart_labels_text_bg_color = NULL, + chart_labels_text_bg_size = NULL, + chart_labels_text_line_height = NULL, + chart_labels_text_max_lines = NULL, + chart_labels_text_weight = NULL, + chart_labels_lines = NULL, + chart_labels_line_style = NULL, + chart_labels_line_color = NULL, + chart_labels_line_width = NULL, + chart_labels_line_range = NULL, + chart_labels_line_padding = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + zoom_y_axis = NULL, + caption_background_color = NULL, + caption_border_color = NULL, + caption_border_radius = NULL, + caption_opacity = NULL, + caption_padding = NULL, + caption_position = NULL, + caption_text_width = NULL, + caption_font_size = NULL, + caption_text_weight = NULL, + caption_text_color = NULL, + caption_mode = NULL, + caption_text_align_h = NULL, + caption_text_align_v = NULL, + caption_image_width = NULL, + caption_image_position = NULL, + caption_space_between = NULL, + stage_duration = NULL, + update_duration = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "horserace") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/horserace")) { + stop("`set_horserace_details()` is not supported for this chart type.") + } + new_list$x$state$play_mode <- play_mode + new_list$x$state$zoom_steps_to_show <- zoom_steps_to_show + list_value_type <- c("ranks", "scores", NULL) + if (!is.null(value_type)) { + if (!value_type %in% list_value_type) { + stop("`value_type` must be one of: c('ranks', 'scores')") + } else { + if (length(jsonlite::fromJSON('{"ranks": "ranks", "scores": "scores"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ranks": "ranks", "scores": "scores"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && value_type %in% names(named_list)) { + if (is.logical(value_type)) { + value_type <- as.character(value_type) + } + named_list_value <- unname(named_list[value_type])[[1]] + new_list$x$state$value_type <- named_list_value + } + } + } + } + list_higher_scores_win <- c(TRUE, FALSE, NULL) + if (!is.null(higher_scores_win)) { + if (!higher_scores_win %in% list_higher_scores_win) { + stop("`higher_scores_win` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && higher_scores_win %in% names(named_list)) { + if (is.logical(higher_scores_win)) { + higher_scores_win <- as.character(higher_scores_win) + } + named_list_value <- unname(named_list[higher_scores_win])[[1]] + new_list$x$state$higher_scores_win <- named_list_value + } + } + } + } + list_ties_mode <- c("competition", "dense", NULL) + if (!is.null(ties_mode)) { + if (!ties_mode %in% list_ties_mode) { + stop("`ties_mode` must be one of: c('competition', 'dense')") + } else { + if (length(jsonlite::fromJSON('{"competition": "competition", "dense": "dense"}')) > 1) { + named_list <- jsonlite::fromJSON('{"competition": "competition", "dense": "dense"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && ties_mode %in% names(named_list)) { + if (is.logical(ties_mode)) { + ties_mode <- as.character(ties_mode) + } + named_list_value <- unname(named_list[ties_mode])[[1]] + new_list$x$state$ties_mode <- named_list_value + } + } + } + } + list_height_mode <- c("auto", "fixed", "flexible", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('auto', 'fixed', 'flexible')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed", "flexible": "flexible"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed", "flexible": "flexible"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + new_list$x$state$padding_top <- padding_top + new_list$x$state$padding_right <- padding_right + new_list$x$state$padding_bottom <- padding_bottom + new_list$x$state$padding_left <- padding_left + list_show_buttons <- c(TRUE, FALSE, NULL) + if (!is.null(show_buttons)) { + if (!show_buttons %in% list_show_buttons) { + stop("`show_buttons` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && show_buttons %in% names(named_list)) { + if (is.logical(show_buttons)) { + show_buttons <- as.character(show_buttons) + } + named_list_value <- unname(named_list[show_buttons])[[1]] + new_list$x$state$show_buttons <- named_list_value + } + } + } + } + list_show_replay <- c(TRUE, FALSE, NULL) + if (!is.null(show_replay)) { + if (!show_replay %in% list_show_replay) { + stop("`show_replay` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && show_replay %in% names(named_list)) { + if (is.logical(show_replay)) { + show_replay <- as.character(show_replay) + } + named_list_value <- unname(named_list[show_replay])[[1]] + new_list$x$state$show_replay <- named_list_value + } + } + } + } + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$filter_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$filter_control$control_styles <- chart_filter_controls_control_styles + new_list$x$state$filter_control$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$filter_control$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$filter_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$filter_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$filter_control$slider_background_color <- chart_filter_controls_slider_background_color + new_list$x$state$filter_control$slider_font_color <- chart_filter_controls_slider_font_color + new_list$x$state$filter_control$slider_handle_color <- chart_filter_controls_slider_handle_color + new_list$x$state$filter_control$slider_width <- chart_filter_controls_slider_width + new_list$x$state$filter_control$slider_margin <- chart_filter_controls_slider_margin + new_list$x$state$filter_control$slider_handle_height <- chart_filter_controls_slider_handle_height + new_list$x$state$filter_control$slider_track_height <- chart_filter_controls_slider_track_height + new_list$x$state$filter_control$slider_play_button <- chart_filter_controls_slider_play_button + new_list$x$state$filter_control$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$filter_control$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$filter_control$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$filter_control$sort <- named_list_value + } + } + } + } + new_list$x$state$filter_include_all <- filter_include_all + new_list$x$state$label_ranks <- label_ranks + new_list$x$state$label_scores <- label_scores + new_list$x$state$label_replay <- label_replay + new_list$x$state$filter_all_label <- filter_all_label + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + list_color_mode <- c("category", "line", "single", NULL) + if (!is.null(color_mode)) { + if (!color_mode %in% list_color_mode) { + stop("`color_mode` must be one of: c('category', 'line', 'single')") + } else { + if (length(jsonlite::fromJSON('{"category": "category", "line": "line", "single": "single"}')) > 1) { + named_list <- jsonlite::fromJSON('{"category": "category", "line": "line", "single": "single"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && color_mode %in% names(named_list)) { + if (is.logical(color_mode)) { + color_mode <- as.character(color_mode) + } + named_list_value <- unname(named_list[color_mode])[[1]] + new_list$x$state$color_mode <- named_list_value + } + } + } + } + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$color_single <- color_single + if (length(color_single_overrides) > 1) { + new_list$x$state$color_single_overrides <- paste(color_single_overrides, collapse = "\n") + } else { + new_list$x$state$color_single_overrides <- color_single_overrides + } + + new_list$x$state$line_width <- line_width + new_list$x$state$line_opacity <- line_opacity + list_curve <- c("curve_linear", "curve_monotone_x", "curve_natural", "curve_step", "curve_step_after", "curve_step_before", NULL) + if (!is.null(curve)) { + if (!curve %in% list_curve) { + stop("`curve` must be one of: c('curve_linear', 'curve_monotone_x', 'curve_natural', 'curve_step', 'curve_step_after', 'curve_step_before')") + } else { + if (length(jsonlite::fromJSON('{"curve_linear": "curveLinear", "curve_monotone_x": "curveMonotoneX", "curve_natural": "curveNatural", "curve_step": "curveStep", "curve_step_after": "curveStepAfter", "curve_step_before": "curveStepBefore"}')) > 1) { + named_list <- jsonlite::fromJSON('{"curve_linear": "curveLinear", "curve_monotone_x": "curveMonotoneX", "curve_natural": "curveNatural", "curve_step": "curveStep", "curve_step_after": "curveStepAfter", "curve_step_before": "curveStepBefore"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && curve %in% names(named_list)) { + if (is.logical(curve)) { + curve <- as.character(curve) + } + named_list_value <- unname(named_list[curve])[[1]] + new_list$x$state$curve <- named_list_value + } + } + } + } + list_shade <- c(TRUE, FALSE, NULL) + if (!is.null(shade)) { + if (!shade %in% list_shade) { + stop("`shade` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && shade %in% names(named_list)) { + if (is.logical(shade)) { + shade <- as.character(shade) + } + named_list_value <- unname(named_list[shade])[[1]] + new_list$x$state$shade <- named_list_value + } + } + } + } + new_list$x$state$shade_width <- shade_width + new_list$x$state$shade_opacity <- shade_opacity + list_missing <- c(TRUE, FALSE, NULL) + if (!is.null(missing)) { + if (!missing %in% list_missing) { + stop("`missing` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && missing %in% names(named_list)) { + if (is.logical(missing)) { + missing <- as.character(missing) + } + named_list_value <- unname(named_list[missing])[[1]] + new_list$x$state$missing <- named_list_value + } + } + } + } + new_list$x$state$missing_opacity <- missing_opacity + new_list$x$state$missing_width <- missing_width + new_list$x$state$missing_stroke_dash <- missing_stroke_dash + new_list$x$state$start_circle_r <- start_circle_r + new_list$x$state$end_circle_r <- end_circle_r + new_list$x$state$end_circle_stroke <- end_circle_stroke + new_list$x$state$circle_space_between <- circle_space_between + list_end_circle_stroke_bg <- c(TRUE, FALSE, NULL) + if (!is.null(end_circle_stroke_bg)) { + if (!end_circle_stroke_bg %in% list_end_circle_stroke_bg) { + stop("`end_circle_stroke_bg` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && end_circle_stroke_bg %in% names(named_list)) { + if (is.logical(end_circle_stroke_bg)) { + end_circle_stroke_bg <- as.character(end_circle_stroke_bg) + } + named_list_value <- unname(named_list[end_circle_stroke_bg])[[1]] + new_list$x$state$end_circle_stroke_bg <- named_list_value + } + } + } + } + list_horse_images <- c(TRUE, FALSE, NULL) + if (!is.null(horse_images)) { + if (!horse_images %in% list_horse_images) { + stop("`horse_images` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && horse_images %in% names(named_list)) { + if (is.logical(horse_images)) { + horse_images <- as.character(horse_images) + } + named_list_value <- unname(named_list[horse_images])[[1]] + new_list$x$state$horse_images <- named_list_value + } + } + } + } + list_show_labels <- c("always", "hover", "never", NULL) + if (!is.null(show_labels)) { + if (!show_labels %in% list_show_labels) { + stop("`show_labels` must be one of: c('always', 'hover', 'never')") + } else { + if (length(jsonlite::fromJSON('{"always": "always", "hover": "hover", "never": "never"}')) > 1) { + named_list <- jsonlite::fromJSON('{"always": "always", "hover": "hover", "never": "never"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && show_labels %in% names(named_list)) { + if (is.logical(show_labels)) { + show_labels <- as.character(show_labels) + } + named_list_value <- unname(named_list[show_labels])[[1]] + new_list$x$state$show_labels <- named_list_value + } + } + } + } + new_list$x$state$animate_scores <- animate_scores + list_rank_outside_picture <- c(FALSE, TRUE, NULL) + if (!is.null(rank_outside_picture)) { + if (!rank_outside_picture %in% list_rank_outside_picture) { + stop("`rank_outside_picture` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && rank_outside_picture %in% names(named_list)) { + if (is.logical(rank_outside_picture)) { + rank_outside_picture <- as.character(rank_outside_picture) + } + named_list_value <- unname(named_list[rank_outside_picture])[[1]] + new_list$x$state$rank_outside_picture <- named_list_value + } + } + } + } + new_list$x$state$label_divider <- label_divider + new_list$x$state$rank_inside_color <- rank_inside_color + new_list$x$state$labels$max_width <- chart_labels_max_width + list_chart_labels_overlap_mode <- c("spread", "hide", "none", NULL) + if (!is.null(chart_labels_overlap_mode)) { + if (!chart_labels_overlap_mode %in% list_chart_labels_overlap_mode) { + stop("`chart_labels_overlap_mode` must be one of: c('spread', 'hide', 'none')") + } else { + if (length(jsonlite::fromJSON('{"spread": "spread", "hide": "hide", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"spread": "spread", "hide": "hide", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_labels_overlap_mode %in% names(named_list)) { + if (is.logical(chart_labels_overlap_mode)) { + chart_labels_overlap_mode <- as.character(chart_labels_overlap_mode) + } + named_list_value <- unname(named_list[chart_labels_overlap_mode])[[1]] + new_list$x$state$labels$overlap_mode <- named_list_value + } + } + } + } + new_list$x$state$labels$spreading_margin <- chart_labels_spreading_margin + new_list$x$state$labels$data_point_margin <- chart_labels_data_point_margin + if (length(chart_labels_show_only_labels) > 1) { + new_list$x$state$labels$show_only_labels <- paste(chart_labels_show_only_labels, collapse = "\n") + } else { + new_list$x$state$labels$show_only_labels <- chart_labels_show_only_labels + } + + new_list$x$state$labels$text_color <- chart_labels_text_color + new_list$x$state$labels$text_size <- chart_labels_text_size + new_list$x$state$labels$text_bg_color <- chart_labels_text_bg_color + new_list$x$state$labels$text_bg_size <- chart_labels_text_bg_size + new_list$x$state$labels$text_line_height <- chart_labels_text_line_height + new_list$x$state$labels$text_max_lines <- chart_labels_text_max_lines + list_chart_labels_text_weight <- c(400, 700, NULL) + if (!is.null(chart_labels_text_weight)) { + if (!chart_labels_text_weight %in% list_chart_labels_text_weight) { + stop("`chart_labels_text_weight` must be one of: c(400, 700)") + } else { + if (length(jsonlite::fromJSON('{"400": 400, "700": 700}')) > 1) { + named_list <- jsonlite::fromJSON('{"400": 400, "700": 700}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_labels_text_weight %in% names(named_list)) { + if (is.logical(chart_labels_text_weight)) { + chart_labels_text_weight <- as.character(chart_labels_text_weight) + } + named_list_value <- unname(named_list[chart_labels_text_weight])[[1]] + new_list$x$state$labels$text_weight <- named_list_value + } + } + } + } + list_chart_labels_lines <- c("auto", "on", "off", NULL) + if (!is.null(chart_labels_lines)) { + if (!chart_labels_lines %in% list_chart_labels_lines) { + stop("`chart_labels_lines` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_labels_lines %in% names(named_list)) { + if (is.logical(chart_labels_lines)) { + chart_labels_lines <- as.character(chart_labels_lines) + } + named_list_value <- unname(named_list[chart_labels_lines])[[1]] + new_list$x$state$labels$lines <- named_list_value + } + } + } + } + list_chart_labels_line_style <- c("straight", "step", NULL) + if (!is.null(chart_labels_line_style)) { + if (!chart_labels_line_style %in% list_chart_labels_line_style) { + stop("`chart_labels_line_style` must be one of: c('straight', 'step')") + } else { + if (length(jsonlite::fromJSON('{"straight": "straight", "step": "step"}')) > 1) { + named_list <- jsonlite::fromJSON('{"straight": "straight", "step": "step"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_labels_line_style %in% names(named_list)) { + if (is.logical(chart_labels_line_style)) { + chart_labels_line_style <- as.character(chart_labels_line_style) + } + named_list_value <- unname(named_list[chart_labels_line_style])[[1]] + new_list$x$state$labels$line_style <- named_list_value + } + } + } + } + new_list$x$state$labels$line_color <- chart_labels_line_color + new_list$x$state$labels$line_width <- chart_labels_line_width + new_list$x$state$labels$line_range <- chart_labels_line_range + new_list$x$state$labels$line_padding <- chart_labels_line_padding + list_chart_x_axis_axis_position <- c("bottom", "float-below", "float-above", "top", "off", NULL) + if (!is.null(chart_x_axis_axis_position)) { + if (!chart_x_axis_axis_position %in% list_chart_x_axis_axis_position) { + stop("`chart_x_axis_axis_position` must be one of: c('bottom', 'float-below', 'float-above', 'top', 'off')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_axis_position %in% names(named_list)) { + if (is.logical(chart_x_axis_axis_position)) { + chart_x_axis_axis_position <- as.character(chart_x_axis_axis_position) + } + named_list_value <- unname(named_list[chart_x_axis_axis_position])[[1]] + new_list$x$state$x$axis_position <- named_list_value + } + } + } + } + new_list$x$state$x$y_axis_position <- chart_x_axis_y_axis_position + list_chart_x_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_x_axis_numeric_scale_type)) { + if (!chart_x_axis_numeric_scale_type %in% list_chart_x_axis_numeric_scale_type) { + stop("`chart_x_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_x_axis_numeric_scale_type)) { + chart_x_axis_numeric_scale_type <- as.character(chart_x_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_x_axis_numeric_scale_type])[[1]] + new_list$x$state$x$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$x$linear_min <- chart_x_axis_linear_min + new_list$x$state$x$linear_max <- chart_x_axis_linear_max + new_list$x$state$x$log_min <- chart_x_axis_log_min + new_list$x$state$x$log_max <- chart_x_axis_log_max + new_list$x$state$x$datetime_min <- chart_x_axis_datetime_min + new_list$x$state$x$datetime_max <- chart_x_axis_datetime_max + new_list$x$state$x$flip <- chart_x_axis_flip + new_list$x$state$x$show_scale_settings <- chart_x_axis_show_scale_settings + list_chart_x_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_nice)) { + if (!chart_x_axis_nice %in% list_chart_x_axis_nice) { + stop("`chart_x_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_nice %in% names(named_list)) { + if (is.logical(chart_x_axis_nice)) { + chart_x_axis_nice <- as.character(chart_x_axis_nice) + } + named_list_value <- unname(named_list[chart_x_axis_nice])[[1]] + new_list$x$state$x$nice <- named_list_value + } + } + } + } + list_chart_x_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_x_axis_zero_axis)) { + if (!chart_x_axis_zero_axis %in% list_chart_x_axis_zero_axis) { + stop("`chart_x_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_x_axis_zero_axis)) { + chart_x_axis_zero_axis <- as.character(chart_x_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_x_axis_zero_axis])[[1]] + new_list$x$state$x$zero_axis <- named_list_value + } + } + } + } + list_chart_x_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_x_axis_title_mode)) { + if (!chart_x_axis_title_mode %in% list_chart_x_axis_title_mode) { + stop("`chart_x_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_title_mode)) { + chart_x_axis_title_mode <- as.character(chart_x_axis_title_mode) + } + named_list_value <- unname(named_list[chart_x_axis_title_mode])[[1]] + new_list$x$state$x$title_mode <- named_list_value + } + } + } + } + new_list$x$state$x$title <- chart_x_axis_title + new_list$x$state$x$title_styling <- chart_x_axis_title_styling + list_chart_x_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_title_weight)) { + if (!chart_x_axis_title_weight %in% list_chart_x_axis_title_weight) { + stop("`chart_x_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_title_weight)) { + chart_x_axis_title_weight <- as.character(chart_x_axis_title_weight) + } + named_list_value <- unname(named_list[chart_x_axis_title_weight])[[1]] + new_list$x$state$x$title_weight <- named_list_value + } + } + } + } + new_list$x$state$x$title_color <- chart_x_axis_title_color + new_list$x$state$x$title_size <- chart_x_axis_title_size + new_list$x$state$x$title_padding <- chart_x_axis_title_padding + list_chart_x_axis_tick_label_position <- c("default", "left", "right", NULL) + if (!is.null(chart_x_axis_tick_label_position)) { + if (!chart_x_axis_tick_label_position %in% list_chart_x_axis_tick_label_position) { + stop("`chart_x_axis_tick_label_position` must be one of: c('default', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_position)) { + chart_x_axis_tick_label_position <- as.character(chart_x_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_position])[[1]] + new_list$x$state$x$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_styling <- chart_x_axis_tick_label_styling + new_list$x$state$x$tick_label_size <- chart_x_axis_tick_label_size + new_list$x$state$x$tick_label_color <- chart_x_axis_tick_label_color + new_list$x$state$x$tick_padding <- chart_x_axis_tick_padding + list_chart_x_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_x_axis_tick_label_angle)) { + if (!chart_x_axis_tick_label_angle %in% list_chart_x_axis_tick_label_angle) { + stop("`chart_x_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_angle)) { + chart_x_axis_tick_label_angle <- as.character(chart_x_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_angle])[[1]] + new_list$x$state$x$tick_label_angle <- named_list_value + } + } + } + } + list_chart_x_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_tick_label_weight)) { + if (!chart_x_axis_tick_label_weight %in% list_chart_x_axis_tick_label_weight) { + stop("`chart_x_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_weight)) { + chart_x_axis_tick_label_weight <- as.character(chart_x_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_weight])[[1]] + new_list$x$state$x$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_max_lines <- chart_x_axis_tick_label_max_lines + new_list$x$state$x$tick_label_line_height <- chart_x_axis_tick_label_line_height + list_chart_x_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_x_axis_tick_label_space_mode)) { + if (!chart_x_axis_tick_label_space_mode %in% list_chart_x_axis_tick_label_space_mode) { + stop("`chart_x_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_space_mode)) { + chart_x_axis_tick_label_space_mode <- as.character(chart_x_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_space_mode])[[1]] + new_list$x$state$x$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_space <- chart_x_axis_tick_label_space + list_chart_x_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_x_axis_tick_mode)) { + if (!chart_x_axis_tick_mode %in% list_chart_x_axis_tick_mode) { + stop("`chart_x_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_mode)) { + chart_x_axis_tick_mode <- as.character(chart_x_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_mode])[[1]] + new_list$x$state$x$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_number <- chart_x_axis_tick_number + if (length(chart_x_axis_tick_custom) > 1) { + new_list$x$state$x$tick_custom <- paste(chart_x_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$x$tick_custom <- chart_x_axis_tick_custom + } + + new_list$x$state$x$line_and_tick_color <- chart_x_axis_line_and_tick_color + new_list$x$state$x$line_and_tick_width <- chart_x_axis_line_and_tick_width + new_list$x$state$x$tick_length <- chart_x_axis_tick_length + list_chart_x_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_x_axis_tick_side)) { + if (!chart_x_axis_tick_side %in% list_chart_x_axis_tick_side) { + stop("`chart_x_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_side)) { + chart_x_axis_tick_side <- as.character(chart_x_axis_tick_side) + } + named_list_value <- unname(named_list[chart_x_axis_tick_side])[[1]] + new_list$x$state$x$tick_side <- named_list_value + } + } + } + } + new_list$x$state$x$line_visible <- chart_x_axis_line_visible + new_list$x$state$x$edge_padding <- chart_x_axis_edge_padding + list_chart_x_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_gridlines_visible)) { + if (!chart_x_axis_gridlines_visible %in% list_chart_x_axis_gridlines_visible) { + stop("`chart_x_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_x_axis_gridlines_visible)) { + chart_x_axis_gridlines_visible <- as.character(chart_x_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_x_axis_gridlines_visible])[[1]] + new_list$x$state$x$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$x$gridlines_styling <- chart_x_axis_gridlines_styling + new_list$x$state$x$gridline_color <- chart_x_axis_gridline_color + list_chart_x_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_x_axis_gridline_style)) { + if (!chart_x_axis_gridline_style %in% list_chart_x_axis_gridline_style) { + stop("`chart_x_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_x_axis_gridline_style)) { + chart_x_axis_gridline_style <- as.character(chart_x_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_x_axis_gridline_style])[[1]] + new_list$x$state$x$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$x$gridline_width <- chart_x_axis_gridline_width + new_list$x$state$x$gridline_category_dividers <- chart_x_axis_gridline_category_dividers + new_list$x$state$x$gridline_category_dividers_extend <- chart_x_axis_gridline_category_dividers_extend + list_chart_y_axis_axis_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_axis_visible)) { + if (!chart_y_axis_axis_visible %in% list_chart_y_axis_axis_visible) { + stop("`chart_y_axis_axis_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_axis_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_axis_visible)) { + chart_y_axis_axis_visible <- as.character(chart_y_axis_axis_visible) + } + named_list_value <- unname(named_list[chart_y_axis_axis_visible])[[1]] + new_list$x$state$y$axis_visible <- named_list_value + } + } + } + } + list_chart_y_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_y_axis_numeric_scale_type)) { + if (!chart_y_axis_numeric_scale_type %in% list_chart_y_axis_numeric_scale_type) { + stop("`chart_y_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_y_axis_numeric_scale_type)) { + chart_y_axis_numeric_scale_type <- as.character(chart_y_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_y_axis_numeric_scale_type])[[1]] + new_list$x$state$y$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$y$linear_min <- chart_y_axis_linear_min + new_list$x$state$y$linear_max <- chart_y_axis_linear_max + new_list$x$state$y$log_min <- chart_y_axis_log_min + new_list$x$state$y$log_max <- chart_y_axis_log_max + new_list$x$state$y$datetime_min <- chart_y_axis_datetime_min + new_list$x$state$y$datetime_max <- chart_y_axis_datetime_max + new_list$x$state$y$flip <- chart_y_axis_flip + new_list$x$state$y$show_scale_settings <- chart_y_axis_show_scale_settings + list_chart_y_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_nice)) { + if (!chart_y_axis_nice %in% list_chart_y_axis_nice) { + stop("`chart_y_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_nice %in% names(named_list)) { + if (is.logical(chart_y_axis_nice)) { + chart_y_axis_nice <- as.character(chart_y_axis_nice) + } + named_list_value <- unname(named_list[chart_y_axis_nice])[[1]] + new_list$x$state$y$nice <- named_list_value + } + } + } + } + list_chart_y_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_y_axis_zero_axis)) { + if (!chart_y_axis_zero_axis %in% list_chart_y_axis_zero_axis) { + stop("`chart_y_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_y_axis_zero_axis)) { + chart_y_axis_zero_axis <- as.character(chart_y_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_y_axis_zero_axis])[[1]] + new_list$x$state$y$zero_axis <- named_list_value + } + } + } + } + list_chart_y_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_y_axis_title_mode)) { + if (!chart_y_axis_title_mode %in% list_chart_y_axis_title_mode) { + stop("`chart_y_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_title_mode)) { + chart_y_axis_title_mode <- as.character(chart_y_axis_title_mode) + } + named_list_value <- unname(named_list[chart_y_axis_title_mode])[[1]] + new_list$x$state$y$title_mode <- named_list_value + } + } + } + } + new_list$x$state$y$title <- chart_y_axis_title + new_list$x$state$y$title_styling <- chart_y_axis_title_styling + list_chart_y_axis_title_position <- c("side", "end", NULL) + if (!is.null(chart_y_axis_title_position)) { + if (!chart_y_axis_title_position %in% list_chart_y_axis_title_position) { + stop("`chart_y_axis_title_position` must be one of: c('side', 'end')") + } else { + if (length(jsonlite::fromJSON('{"side": "side", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"side": "side", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_position %in% names(named_list)) { + if (is.logical(chart_y_axis_title_position)) { + chart_y_axis_title_position <- as.character(chart_y_axis_title_position) + } + named_list_value <- unname(named_list[chart_y_axis_title_position])[[1]] + new_list$x$state$y$title_position <- named_list_value + } + } + } + } + list_chart_y_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_title_weight)) { + if (!chart_y_axis_title_weight %in% list_chart_y_axis_title_weight) { + stop("`chart_y_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_title_weight)) { + chart_y_axis_title_weight <- as.character(chart_y_axis_title_weight) + } + named_list_value <- unname(named_list[chart_y_axis_title_weight])[[1]] + new_list$x$state$y$title_weight <- named_list_value + } + } + } + } + new_list$x$state$y$title_color <- chart_y_axis_title_color + new_list$x$state$y$title_size <- chart_y_axis_title_size + new_list$x$state$y$title_padding <- chart_y_axis_title_padding + list_chart_y_axis_tick_label_position <- c("default", "above", "below", NULL) + if (!is.null(chart_y_axis_tick_label_position)) { + if (!chart_y_axis_tick_label_position %in% list_chart_y_axis_tick_label_position) { + stop("`chart_y_axis_tick_label_position` must be one of: c('default', 'above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_position)) { + chart_y_axis_tick_label_position <- as.character(chart_y_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_position])[[1]] + new_list$x$state$y$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_styling <- chart_y_axis_tick_label_styling + new_list$x$state$y$tick_label_size <- chart_y_axis_tick_label_size + new_list$x$state$y$tick_label_color <- chart_y_axis_tick_label_color + new_list$x$state$y$tick_padding <- chart_y_axis_tick_padding + list_chart_y_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_y_axis_tick_label_angle)) { + if (!chart_y_axis_tick_label_angle %in% list_chart_y_axis_tick_label_angle) { + stop("`chart_y_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_angle)) { + chart_y_axis_tick_label_angle <- as.character(chart_y_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_angle])[[1]] + new_list$x$state$y$tick_label_angle <- named_list_value + } + } + } + } + list_chart_y_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_tick_label_weight)) { + if (!chart_y_axis_tick_label_weight %in% list_chart_y_axis_tick_label_weight) { + stop("`chart_y_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_weight)) { + chart_y_axis_tick_label_weight <- as.character(chart_y_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_weight])[[1]] + new_list$x$state$y$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_max_lines <- chart_y_axis_tick_label_max_lines + new_list$x$state$y$tick_label_line_height <- chart_y_axis_tick_label_line_height + list_chart_y_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_y_axis_tick_label_space_mode)) { + if (!chart_y_axis_tick_label_space_mode %in% list_chart_y_axis_tick_label_space_mode) { + stop("`chart_y_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_space_mode)) { + chart_y_axis_tick_label_space_mode <- as.character(chart_y_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_space_mode])[[1]] + new_list$x$state$y$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_space <- chart_y_axis_tick_label_space + list_chart_y_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_y_axis_tick_mode)) { + if (!chart_y_axis_tick_mode %in% list_chart_y_axis_tick_mode) { + stop("`chart_y_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_mode)) { + chart_y_axis_tick_mode <- as.character(chart_y_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_mode])[[1]] + new_list$x$state$y$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_number <- chart_y_axis_tick_number + if (length(chart_y_axis_tick_custom) > 1) { + new_list$x$state$y$tick_custom <- paste(chart_y_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$y$tick_custom <- chart_y_axis_tick_custom + } + + new_list$x$state$y$line_and_tick_color <- chart_y_axis_line_and_tick_color + new_list$x$state$y$line_and_tick_width <- chart_y_axis_line_and_tick_width + new_list$x$state$y$tick_length <- chart_y_axis_tick_length + list_chart_y_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_y_axis_tick_side)) { + if (!chart_y_axis_tick_side %in% list_chart_y_axis_tick_side) { + stop("`chart_y_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_side)) { + chart_y_axis_tick_side <- as.character(chart_y_axis_tick_side) + } + named_list_value <- unname(named_list[chart_y_axis_tick_side])[[1]] + new_list$x$state$y$tick_side <- named_list_value + } + } + } + } + new_list$x$state$y$line_visible <- chart_y_axis_line_visible + new_list$x$state$y$edge_padding <- chart_y_axis_edge_padding + list_chart_y_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_gridlines_visible)) { + if (!chart_y_axis_gridlines_visible %in% list_chart_y_axis_gridlines_visible) { + stop("`chart_y_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_gridlines_visible)) { + chart_y_axis_gridlines_visible <- as.character(chart_y_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_y_axis_gridlines_visible])[[1]] + new_list$x$state$y$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$y$gridlines_styling <- chart_y_axis_gridlines_styling + new_list$x$state$y$gridline_color <- chart_y_axis_gridline_color + list_chart_y_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_y_axis_gridline_style)) { + if (!chart_y_axis_gridline_style %in% list_chart_y_axis_gridline_style) { + stop("`chart_y_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_y_axis_gridline_style)) { + chart_y_axis_gridline_style <- as.character(chart_y_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_y_axis_gridline_style])[[1]] + new_list$x$state$y$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$y$gridline_width <- chart_y_axis_gridline_width + new_list$x$state$y$gridline_category_dividers <- chart_y_axis_gridline_category_dividers + new_list$x$state$y$gridline_category_dividers_extend <- chart_y_axis_gridline_category_dividers_extend + new_list$x$state$zoom_y_axis <- zoom_y_axis + new_list$x$state$caption_background_color <- caption_background_color + new_list$x$state$caption_border_color <- caption_border_color + new_list$x$state$caption_border_radius <- caption_border_radius + new_list$x$state$caption_opacity <- caption_opacity + new_list$x$state$caption_padding <- caption_padding + list_caption_position <- c("top-left", "center-left", "bottom-left", "top-right", "center-right", "bottom-right", "top-center", "center-center", "bottom-center", NULL) + if (!is.null(caption_position)) { + if (!caption_position %in% list_caption_position) { + stop("`caption_position` must be one of: c('top-left', 'center-left', 'bottom-left', 'top-right', 'center-right', 'bottom-right', 'top-center', 'center-center', 'bottom-center')") + } else { + if (length(jsonlite::fromJSON('{"top-left": "top-left", "center-left": "center-left", "bottom-left": "bottom-left", "top-right": "top-right", "center-right": "center-right", "bottom-right": "bottom-right", "top-center": "top-center", "center-center": "center-center", "bottom-center": "bottom-center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top-left": "top-left", "center-left": "center-left", "bottom-left": "bottom-left", "top-right": "top-right", "center-right": "center-right", "bottom-right": "bottom-right", "top-center": "top-center", "center-center": "center-center", "bottom-center": "bottom-center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && caption_position %in% names(named_list)) { + if (is.logical(caption_position)) { + caption_position <- as.character(caption_position) + } + named_list_value <- unname(named_list[caption_position])[[1]] + new_list$x$state$caption_position <- named_list_value + } + } + } + } + new_list$x$state$caption_text_width <- caption_text_width + new_list$x$state$caption_font_size <- caption_font_size + list_caption_text_weight <- c("normal", "bold", NULL) + if (!is.null(caption_text_weight)) { + if (!caption_text_weight %in% list_caption_text_weight) { + stop("`caption_text_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && caption_text_weight %in% names(named_list)) { + if (is.logical(caption_text_weight)) { + caption_text_weight <- as.character(caption_text_weight) + } + named_list_value <- unname(named_list[caption_text_weight])[[1]] + new_list$x$state$caption_text_weight <- named_list_value + } + } + } + } + new_list$x$state$caption_text_color <- caption_text_color + list_caption_mode <- c("text_legend", "html", NULL) + if (!is.null(caption_mode)) { + if (!caption_mode %in% list_caption_mode) { + stop("`caption_mode` must be one of: c('text_legend', 'html')") + } else { + if (length(jsonlite::fromJSON('{"text_legend": "text_legend", "html": "html"}')) > 1) { + named_list <- jsonlite::fromJSON('{"text_legend": "text_legend", "html": "html"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && caption_mode %in% names(named_list)) { + if (is.logical(caption_mode)) { + caption_mode <- as.character(caption_mode) + } + named_list_value <- unname(named_list[caption_mode])[[1]] + new_list$x$state$caption_mode <- named_list_value + } + } + } + } + list_caption_text_align_h <- c("start", "center", "end", NULL) + if (!is.null(caption_text_align_h)) { + if (!caption_text_align_h %in% list_caption_text_align_h) { + stop("`caption_text_align_h` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && caption_text_align_h %in% names(named_list)) { + if (is.logical(caption_text_align_h)) { + caption_text_align_h <- as.character(caption_text_align_h) + } + named_list_value <- unname(named_list[caption_text_align_h])[[1]] + new_list$x$state$caption_text_align_h <- named_list_value + } + } + } + } + list_caption_text_align_v <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(caption_text_align_v)) { + if (!caption_text_align_v %in% list_caption_text_align_v) { + stop("`caption_text_align_v` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && caption_text_align_v %in% names(named_list)) { + if (is.logical(caption_text_align_v)) { + caption_text_align_v <- as.character(caption_text_align_v) + } + named_list_value <- unname(named_list[caption_text_align_v])[[1]] + new_list$x$state$caption_text_align_v <- named_list_value + } + } + } + } + new_list$x$state$caption_image_width <- caption_image_width + list_caption_image_position <- c("column", "column-reverse", "row", "row-reverse", NULL) + if (!is.null(caption_image_position)) { + if (!caption_image_position %in% list_caption_image_position) { + stop("`caption_image_position` must be one of: c('column', 'column-reverse', 'row', 'row-reverse')") + } else { + if (length(jsonlite::fromJSON('{"column": "column", "column-reverse": "column-reverse", "row": "row", "row-reverse": "row-reverse"}')) > 1) { + named_list <- jsonlite::fromJSON('{"column": "column", "column-reverse": "column-reverse", "row": "row", "row-reverse": "row-reverse"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && caption_image_position %in% names(named_list)) { + if (is.logical(caption_image_position)) { + caption_image_position <- as.character(caption_image_position) + } + named_list_value <- unname(named_list[caption_image_position])[[1]] + new_list$x$state$caption_image_position <- named_list_value + } + } + } + } + new_list$x$state$caption_space_between <- caption_space_between + new_list$x$state$stage_duration <- stage_duration + new_list$x$state$update_duration <- update_duration + new_list$x$state$formatting$prefix <- chart_number_date_format_prefix + new_list$x$state$formatting$suffix <- chart_number_date_format_suffix + new_list$x$state$formatting$n_dec <- chart_number_date_format_n_dec + new_list$x$state$formatting$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$formatting$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$formatting$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$formatting$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$formatting$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$formatting$transform <- named_list_value + } + } + } + } + new_list$x$state$formatting$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$formatting$exponentiate_constant <- chart_number_date_format_exponentiate_constant + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_interactive_svg_details.R b/R_package/R/set_interactive_svg_details.R new file mode 100644 index 0000000..1c9ee15 --- /dev/null +++ b/R_package/R/set_interactive_svg_details.R @@ -0,0 +1,2312 @@ +#' Set interactive svg chart details +#' @name set_interactive_svg_details +#' @param svg_url SVG file. Flourish type hint: url, defaults to `NULL` +#' @param svg_width_wide Image width. The width in percentage of the image in standard wide-screen view. Flourish type hint: number, defaults to `NULL` +#' @param mobile_view Different mobile view. Flourish type hint: boolean, defaults to `NULL` +#' @param mobile_breakpoint Breakpoint. The size in pixels at which to switch to mobile layout Flourish type hint: number, defaults to `NULL` +#' @param mobile_svg_mode Image on mobile. Choices: none, same, different. Whether to show the image at all on mobile. Flourish type hint: string, defaults to `NULL` +#' @param mobile_svg_url SVG file (mobile). Flourish type hint: url, defaults to `NULL` +#' @param mobile_svg_width Width. The width in percentage of the image on a mobile view. Flourish type hint: number, defaults to `NULL` +#' @param mobile_content_mode Mobile content mode. Choices: interactive, all, accordion. If turned on all content will display on load in mobile view. Flourish type hint: string, defaults to `NULL` +#' @param clickable_svg_animation Animation clickable elements. Choices: off, animation. Flourish type hint: string, defaults to `NULL` +#' @param clickable_svg_animation_duration Duration. The duration of the highlight animation on each clickable element. Flourish type hint: number, defaults to `NULL` +#' @param clickable_svg_animation_config Advanced. Reveal settings to adjust the SVG Animation properties on clickable elements. See Mozilla docs for more detailsFlourish type hint: boolean, defaults to `NULL` +#' @param clickable_svg_animation_attr Attribute. Flourish type hint: string, defaults to `NULL` +#' @param clickable_svg_animation_values Values. Flourish type hint: string, defaults to `NULL` +#' @param clickable_svg_animation_repeat Repeat. Flourish type hint: string, defaults to `NULL` +#' @param text_panel_enabled Text panel enabled. Disable to only show text in popups. Flourish type hint: boolean, defaults to `NULL` +#' @param h3_default Default heading. The text to show on load. Flourish type hint: text, defaults to `NULL` +#' @param h3_size Size. Flourish type hint: number, defaults to `NULL` +#' @param h4_default Default subheading. The text to show on load. Flourish type hint: text, defaults to `NULL` +#' @param h4_size Size. Flourish type hint: number, defaults to `NULL` +#' @param content_default Default text. The text to show on load. Flourish type hint: text, defaults to `NULL` +#' @param content_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param svg_reset_fonts Override fonts in SVG. If enabled, font-family styles will be removed in the SVG, allowing the text to be inherited from the current theme or settings. Flourish type hint: boolean, defaults to `NULL` +#' @param show_css Edit CSS. Flourish type hint: boolean, defaults to `NULL` +#' @param stylesheet Custom styles. Use the CSS class .clickable-element to target all interactive elements. When one is clicked, it has the CSS class is .highlighted and the others are .faded. The text for each clickable element is inside a .text-block, which is also .accordion in accordion mode. Flourish type hint: code, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "interactive_svg", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_interactive_svg_data(gapminder) |> +#' set_interactive_svg_details() +#' ) +#' @export + +set_interactive_svg_details <- function( + ., + svg_url = NULL, + svg_width_wide = NULL, + mobile_view = NULL, + mobile_breakpoint = NULL, + mobile_svg_mode = NULL, + mobile_svg_url = NULL, + mobile_svg_width = NULL, + mobile_content_mode = NULL, + clickable_svg_animation = NULL, + clickable_svg_animation_duration = NULL, + clickable_svg_animation_config = NULL, + clickable_svg_animation_attr = NULL, + clickable_svg_animation_values = NULL, + clickable_svg_animation_repeat = NULL, + text_panel_enabled = NULL, + h3_default = NULL, + h3_size = NULL, + h4_default = NULL, + h4_size = NULL, + content_default = NULL, + content_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + svg_reset_fonts = NULL, + show_css = NULL, + stylesheet = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "interactive_svg") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/interactive-svg")) { + stop("`set_interactive_svg_details()` is not supported for this chart type.") + } + new_list$x$state$svg_url <- svg_url + new_list$x$state$svg_width_wide <- svg_width_wide + new_list$x$state$mobile_view <- mobile_view + new_list$x$state$mobile_breakpoint <- mobile_breakpoint + list_mobile_svg_mode <- c("none", "same", "different", NULL) + if (!is.null(mobile_svg_mode)) { + if (!mobile_svg_mode %in% list_mobile_svg_mode) { + stop("`mobile_svg_mode` must be one of: c('none', 'same', 'different')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "same": "same", "different": "different"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "same": "same", "different": "different"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && mobile_svg_mode %in% names(named_list)) { + if (is.logical(mobile_svg_mode)) { + mobile_svg_mode <- as.character(mobile_svg_mode) + } + named_list_value <- unname(named_list[mobile_svg_mode])[[1]] + new_list$x$state$mobile_svg_mode <- named_list_value + } + } + } + } + new_list$x$state$mobile_svg_url <- mobile_svg_url + new_list$x$state$mobile_svg_width <- mobile_svg_width + list_mobile_content_mode <- c("interactive", "all", "accordion", NULL) + if (!is.null(mobile_content_mode)) { + if (!mobile_content_mode %in% list_mobile_content_mode) { + stop("`mobile_content_mode` must be one of: c('interactive', 'all', 'accordion')") + } else { + if (length(jsonlite::fromJSON('{"interactive": "interactive", "all": "all", "accordion": "accordion"}')) > 1) { + named_list <- jsonlite::fromJSON('{"interactive": "interactive", "all": "all", "accordion": "accordion"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && mobile_content_mode %in% names(named_list)) { + if (is.logical(mobile_content_mode)) { + mobile_content_mode <- as.character(mobile_content_mode) + } + named_list_value <- unname(named_list[mobile_content_mode])[[1]] + new_list$x$state$mobile_content_mode <- named_list_value + } + } + } + } + list_clickable_svg_animation <- c("off", "animation", NULL) + if (!is.null(clickable_svg_animation)) { + if (!clickable_svg_animation %in% list_clickable_svg_animation) { + stop("`clickable_svg_animation` must be one of: c('off', 'animation')") + } else { + if (length(jsonlite::fromJSON('{"off": "off", "animation": "animation"}')) > 1) { + named_list <- jsonlite::fromJSON('{"off": "off", "animation": "animation"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && clickable_svg_animation %in% names(named_list)) { + if (is.logical(clickable_svg_animation)) { + clickable_svg_animation <- as.character(clickable_svg_animation) + } + named_list_value <- unname(named_list[clickable_svg_animation])[[1]] + new_list$x$state$clickable_svg_animation <- named_list_value + } + } + } + } + new_list$x$state$clickable_svg_animation_duration <- clickable_svg_animation_duration + new_list$x$state$clickable_svg_animation_config <- clickable_svg_animation_config + new_list$x$state$clickable_svg_animation_attr <- clickable_svg_animation_attr + new_list$x$state$clickable_svg_animation_values <- clickable_svg_animation_values + new_list$x$state$clickable_svg_animation_repeat <- clickable_svg_animation_repeat + new_list$x$state$text_panel_enabled <- text_panel_enabled + if (length(h3_default) > 1) { + new_list$x$state$h3_default <- paste(h3_default, collapse = "\n") + } else { + new_list$x$state$h3_default <- h3_default + } + + new_list$x$state$h3_size <- h3_size + if (length(h4_default) > 1) { + new_list$x$state$h4_default <- paste(h4_default, collapse = "\n") + } else { + new_list$x$state$h4_default <- h4_default + } + + new_list$x$state$h4_size <- h4_size + if (length(content_default) > 1) { + new_list$x$state$content_default <- paste(content_default, collapse = "\n") + } else { + new_list$x$state$content_default <- content_default + } + + new_list$x$state$content_size <- content_size + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + new_list$x$state$svg_reset_fonts <- svg_reset_fonts + new_list$x$state$show_css <- show_css + if (length(stylesheet) > 1) { + new_list$x$state$stylesheet <- paste(stylesheet, collapse = "\n") + } else { + new_list$x$state$stylesheet <- stylesheet + } + + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_line_bar_pie_details.R b/R_package/R/set_line_bar_pie_details.R new file mode 100644 index 0000000..b18ba88 --- /dev/null +++ b/R_package/R/set_line_bar_pie_details.R @@ -0,0 +1,7727 @@ +#' Set line, bar and pie charts chart details +#' @name set_line_bar_pie_details +#' @param dual_axis Axis type. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param secondary_series Number of combo lines. In line-bar mode , sets how many of your value columns are treated as lines. In line-line mode , sets how many lines use the right axis. The order counts from the start, so if you want column B as a line and A as a column, set the order in the column bindings to "B, A". Flourish type hint: number, defaults to `NULL` +#' @param stack_sort Stack sort mode. Choices: data, ascending, descending. Whether each stack is in the default order or sorted by value. Use ascending or descending with a stacked area chart to make a "bump" area chart. Flourish type hint: string, defaults to `NULL` +#' @param facet_layout Grid mode. Choices: single, facets. By default, Grid of charts creates a mini chart for each series. If Grid of charts is set in your column bindings, a mini chart will be created for each unique value in your specified column. Flourish type hint: string, defaults to `NULL` +#' @param height_mode Height mode. Choices: auto, fill_space, aspect. Auto: sets the height based on the chart type, data and width. Standard: uses the default Flourish responsive sizing. Aspect ratio: sets the aspect of each plot. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to `NULL` +#' @param facet_aspect Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param facet_aspect_mobile Aspect (mobile). Aspect of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param facet_aspect_breakpoint Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to `NULL` +#' @param sort_mode Sort mode. Choices: data, value, label. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_columns_fixed Grid mode. Choices: `FALSE`, `TRUE`. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_columns Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width Min chart width. The minimum width of a chart or cell in the grid. Determines the number of columns. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width_fixed Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_custom_grid Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_custom_positions Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to `NULL` +#' @param chart_facet_max_width Max chart width. The maximum width of a chart or cell in the grid. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_w Horizontal margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_h Vertical margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_animation On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_titles Show titles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_title_align Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_size Size. Relative to the width of the chart. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_unit Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_padding_top Space above. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_padding_bottom Space below. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_bg Background. Choices: none, full, text. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_bg_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_bg_padding Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to `NULL` +#' @param x_axis_matching Same across grid. Ensure the X scale is the same across the grid. Flourish type hint: boolean, defaults to `NULL` +#' @param x_axis_last_row_only Last row only. Only show the X axis on the last row, where possible. Ignored if the X axis is not positioned at the bottom. Flourish type hint: boolean, defaults to `NULL` +#' @param y_axis_matching Same across grid. Ensure the Y scale is the same across the grid. Flourish type hint: boolean, defaults to `NULL` +#' @param y_axis_first_col_only First column only. Only show the Y axis on the first column of the grid, where possible. Flourish type hint: boolean, defaults to `NULL` +#' @param y2_axis_matching Same across grid. Ensure the secondary Y scale is the same across the grid. Flourish type hint: boolean, defaults to `NULL` +#' @param y2_axis_last_col_only Last column only. Only show the secondary Y axis on the last column of the grid, where possible. Flourish type hint: boolean, defaults to `NULL` +#' @param series_filter_mode Series filter. Choices: none, single, multi. Filter control for series/columns. The user can also filter by clicking on the legend, except in single select mode. Use the animation settings panel to determine whether series animate when changing the filter. Flourish type hint: string, defaults to `NULL` +#' @param series_control_multi_text Placeholder text. Flourish type hint: string, defaults to `NULL` +#' @param series_control_multi_none_text No more results text. Flourish type hint: string, defaults to `NULL` +#' @param series_control_select_text Select text. Flourish type hint: string, defaults to `NULL` +#' @param max_series Max series to show. Limits the number of series/columns that will be visualized at once. Flourish type hint: number, defaults to `NULL` +#' @param series_control_background Background. Flourish type hint: color, defaults to `NULL` +#' @param series_control_text Text. Flourish type hint: color, defaults to `NULL` +#' @param series_control_border Border. Flourish type hint: color, defaults to `NULL` +#' @param series_control_pill_background Background. Flourish type hint: color, defaults to `NULL` +#' @param series_control_pill_text Text. Flourish type hint: color, defaults to `NULL` +#' @param series_control_pill_radius Border radius. Flourish type hint: number, defaults to `NULL` +#' @param series_control_single_all Include "All". Flourish type hint: boolean, defaults to `NULL` +#' @param series_control_single_all_text Name for "All". Flourish type hint: string, defaults to `NULL` +#' @param filter_rows_with_no_data Filter rows that have no data. This setting filters rows that have no data, this is useful in combination with filters and datasets that have a lot of empty cells. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_series_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_series_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_series_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_series_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_series_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_series_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_series_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_series_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_series_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_series_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_series_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_series_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_series_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_series_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param row_filter_control_all Include "All". Flourish type hint: boolean, defaults to `NULL` +#' @param row_filter_control_all_text Name for "All". Flourish type hint: string, defaults to `NULL` +#' @param chart_row_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_row_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_row_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_row_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_row_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_row_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_row_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_row_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_row_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_row_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_row_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_row_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_row_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_row_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param log_control_y_visible Show log control for Y axis. Adds a tabbed control to allow users to switch between log and linear Y scales. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_log_control_y_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param log_control_y_text_linear Linear text. Flourish type hint: string, defaults to `NULL` +#' @param log_control_y_text_log Log text. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_controls_spacing Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to `NULL` +#' @param controls_position Control position. Choices: log_series_row, series_log_row, log_row_series, series_row_log, row_log_series, row_series_log. If you have two or more controls turned on for your chart, you can change the order the controls appear. Flourish type hint: string, defaults to `NULL` +#' @param color_mode Color mode. Choices: column, row. By column will set the colors by series. Each column listed in the value column binding in the datasheet will have a different color. By row will instead set the color depending on the datas label/time column binding. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param line_width Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param line_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param line_stroke Outline. Add a stroke around your lines to enhance visibility when overlapping. Flourish type hint: boolean, defaults to `NULL` +#' @param line_curve Line curve. Choices: curve_linear, curve_monotone_x, curve_natural, curve_step, curve_step_before, curve_step_after. Flourish type hint: string, defaults to `NULL` +#' @param line_dash_items Dashed lines. Specify the series that you would like to display with a dashed line. Multiple dashed lines can be set using multiple lines. For example: Party 1 Party 2 Party 3. Flourish type hint: text, defaults to `NULL` +#' @param line_dash_width Dash width. Flourish type hint: number, defaults to `NULL` +#' @param line_dash_space_width Space width. Flourish type hint: number, defaults to `NULL` +#' @param line_interpolate Missing data points. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param shade_between_lines Shade areas between lines. Shade the gap between any two lines on your chart. Flourish type hint: boolean, defaults to `NULL` +#' @param shade_between_lines_config Which lines to shade between. Specify each area as a pair of line names separated by `::`. For example: Series A :: Series B Series C :: Series D You can optionally add a specific color and opacity for each area, e.g. `Series A :: Series B :: red :: 0.1`. Flourish type hint: text, defaults to `NULL` +#' @param shade_between_lines_color Color. Flourish type hint: color, defaults to `NULL` +#' @param shade_between_lines_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param area_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param dot_mode Choices: auto, on, off. " Auto will automatically show dots on lines if fewer than 250 data points. Note: avoid showing dots for large datasets since it can lead to poor performance issues and poor-looking charts". Flourish type hint: string, defaults to `NULL` +#' @param dot_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param dot_radius Radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param dot_radius_last Final dot scale (%). Making the last point on a line larger can help emphasise the final value. This will usually be the dot furthest right on the axis. Flourish type hint: number, defaults to `NULL` +#' @param dot_hollow Hollow. Flourish type hint: boolean, defaults to `NULL` +#' @param bar_height Bar height. The approximate height of the bar, the exact height depends on padding and label style. Specified in rems Ignored if the chart is embedded at a fixed height. Flourish type hint: number, defaults to `NULL` +#' @param column_opacity Bar opacity. Flourish type hint: number, defaults to `NULL` +#' @param uniform_column_width Uniform column width. Flourish type hint: boolean, defaults to `NULL` +#' @param uniform_bar_height Uniform bar height. Flourish type hint: boolean, defaults to `NULL` +#' @param column_padding_inner Spacing (main). Space between bar stacks or groups, as a % of the width of a whole bar stack or group. Flourish type hint: number, defaults to `NULL` +#' @param column_padding_in_group Spacing (in group). Space between bars in groups, as a % of the width of a single bar in the group. Ignored if only a single series is selected. Flourish type hint: number, defaults to `NULL` +#' @param column_padding_stack Spacing (in stack). Space each bar in the stack, in tenths of a rem Flourish type hint: number, defaults to `NULL` +#' @param column_stroke Outline. Add a stroke around your columns or bars (same color as text). Flourish type hint: boolean, defaults to `NULL` +#' @param column_stroke_opacity Outline opacity. Flourish type hint: number, defaults to `NULL` +#' @param column_stroke_color Outline color. Flourish type hint: color, defaults to `NULL` +#' @param donut_inner_radius Doughnut hole (%). Flourish type hint: number, defaults to `NULL` +#' @param donut_corner_radius Corner curve (pixels). Flourish type hint: number, defaults to `NULL` +#' @param donut_pad_angle Segment padding (degrees). Flourish type hint: number, defaults to `NULL` +#' @param donut_auto_scale Scale pies based on data. Scale each pie chart in the grid so that the area of each pie/donut reflect its value. Flourish type hint: boolean, defaults to `NULL` +#' @param bar_labels_above Label style. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param bar_labels_color Color. Flourish type hint: color, defaults to `NULL` +#' @param bar_labels_font_size Size. When in Standard or Aspect ratio height mode, the font size of the labels will be limited to the space available. In remsFlourish type hint: number, defaults to `NULL` +#' @param bar_labels_weight Choices: 600, 400. Flourish type hint: string, defaults to `NULL` +#' @param line_end_labels Show labels on lines. Show series labels on the end of lines if theres enough space. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_line_labels_max_width Max label width. The maximum allowed label width. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_overlap_mode Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to `NULL` +#' @param chart_line_labels_spreading_margin Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_data_point_margin Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_show_only_labels Show only certain labels. Manually specify which labels youd like to display (one entry per line that should match headers from the Values columns). Flourish type hint: text, defaults to `NULL` +#' @param chart_line_labels_text_color Color. If cleared, uses the main text color from the Layout settings panel. Flourish type hint: color, defaults to `NULL` +#' @param chart_line_labels_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_text_bg_color Outline. If cleared, uses the main background color from the Layout settings panel. Flourish type hint: color, defaults to `NULL` +#' @param chart_line_labels_text_bg_size Outline width. As a % of the font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_text_max_lines Max lines. The max number of lines for each label. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_text_weight Weight. Choices: 400, 700. Flourish type hint: string, defaults to `NULL` +#' @param chart_line_labels_lines Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_line_labels_line_style Line style. Choices: straight, step. Flourish type hint: string, defaults to `NULL` +#' @param chart_line_labels_line_color Color. If cleared, uses the main text color from the Layout settings panel. Flourish type hint: color, defaults to `NULL` +#' @param chart_line_labels_line_width Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_line_range Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_line_padding Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to `NULL` +#' @param labels Show labels on data points. Flourish type hint: boolean, defaults to `NULL` +#' @param labels_hide_overlaps Hide overlapping labels. Flourish type hint: boolean, defaults to `NULL` +#' @param labels_dot_center Position labels on center of dot. Flourish type hint: boolean, defaults to `NULL` +#' @param labels_column_align Bar label alignment. Choices: bottom, middle, top, above. The final above option puts the labels above the bars in standard column charts. In stacked charts, where the space above the stack is reserved for stack total the labels falls back to top alignment. Flourish type hint: string, defaults to `NULL` +#' @param labels_column_padding Padding. Space above or below, as a proportion of the font size in rems Flourish type hint: number, defaults to `NULL` +#' @param labels_bar_align Label alignment. Choices: left, center, right, out. In stacked bar charts the final out (outside of bar) option falls back to right alignment, since the space after the stack is reserved for stack total labels (see below). Flourish type hint: string, defaults to `NULL` +#' @param labels_bar_autohide Hide if too big. Turn off to force labels to show, even if they will overflow the bars. Ignored when labels are not inside the bars. Flourish type hint: boolean, defaults to `NULL` +#' @param labels_color_mode Text color. Choices: auto, data, contrast, fixed. Contrast mode is black or white depending on the color of the data point (or the background color for labels positioned over the background). Flourish type hint: string, defaults to `NULL` +#' @param labels_fixed_color Color. Flourish type hint: color, defaults to `NULL` +#' @param labels_font_weight Weight. Choices: 600, 400. Flourish type hint: string, defaults to `NULL` +#' @param labels_font_size_mode Size. Choices: auto, fixed. Flourish type hint: string, defaults to `NULL` +#' @param labels_font_size Size. Flourish type hint: number, defaults to `NULL` +#' @param labels_bg_mode Outline. Choices: on, off. A text outline/background can make the text more readable by increasing contrast. Flourish type hint: string, defaults to `NULL` +#' @param labels_bg_size Size. Size of the background, as % of text size. Flourish type hint: number, defaults to `NULL` +#' @param labels_content Label content. Choices: auto, value, label, both. Flourish type hint: string, defaults to `NULL` +#' @param stack_labels Show labels for stack totals. Flourish type hint: boolean, defaults to `NULL` +#' @param stack_labels_color Color. Flourish type hint: color, defaults to `NULL` +#' @param stack_labels_font_size Size. Flourish type hint: number, defaults to `NULL` +#' @param stack_labels_weight Weight. Choices: 600, 400. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_axis_position Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_y_axis_position Y value. Vertical position of the x axis on the y scale. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_datetime_min Min (date). Use the input date format as specified in the datasheet. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_datetime_max Max (date). Use the input date format as specified in the datasheet. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Overridden by any explicitly specified scale min and max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_zero_axis Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Overridden by any explicitly specified scale min and max. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_position Position. Choices: default, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. How the vertical space available for tick labels is determined. "Auto" means that the space is automatically determined. "Max" lets you specify the maximum vertical space tick labels may occupy. "Fixed" lets you specify a fixed amount of vertical space for tick labels. Tick labels will be truncated to fit within the allocated horizontal space. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_space Space. The space allocated for tick labels (relative to the root font size). Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_mode Mode. Choices: auto, number, custom. Determines how the tick values are chosen. "Auto" mode chooses the ticks automatically. "Number" mode lets you specify how many ticks are drawn. "Custom" mode lets you specify which ticks are drawn. If the axis is categorical, "Number" mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_side Tick side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers Put lines between categories. On a categorical axis this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_axis_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_datetime_min Min (date). Use the same format as displayed in the axis. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_datetime_max Max (date). Use the same format as displayed in the axis. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_zero_axis Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_title_position Position. Choices: side, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_position Position. Choices: default, above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Sets how the horizontal space available for tick labels is determined. "Auto" means that the space is automatically determined. "Max" lets you specify the maximum horizontal space tick labels may occupy. "Fixed" lets you specify a fixed amount of horizontal space for tick labels. Tick labels will be truncated to fit within the allocated horizontal space. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_space Space. The space allocated for tick labels (relative to the root font size). Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_mode Mode. Choices: auto, number, custom. Determines how the tick values are chosen. "Auto" mode chooses the ticks automatically. "Number" mode lets you specify how many ticks are drawn. "Custom" mode lets you specify which ticks are drawn. If the axis is categorical, "Number" mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_side Side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers Put lines between categories. On a categorical axis this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_y_axis_axis_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_y_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_y_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_y_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_y_axis_zero_axis Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_y_axis_title_position Position. Choices: side, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_secondary_y_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_label_position Position. Choices: default, above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Sets how the horizontal space available for tick labels is determined. "Auto" means that the space is automatically determined. "Max" lets you specify the maximum horizontal space tick labels may occupy. "Fixed" lets you specify a fixed amount of horizontal space for tick labels. Tick labels will be truncated to fit within the allocated horizontal space. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_label_space Space. The space allocated for tick labels (relative to the root font size). Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_mode Mode. Choices: auto, number, custom. Determines how the tick values are chosen. "Auto" mode chooses the ticks automatically. "Number" mode lets you specify how many ticks are drawn. "Custom" mode lets you specify which ticks are drawn. If the axis is categorical, "Number" mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_secondary_y_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_secondary_y_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_tick_side Side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_y_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_y_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_y_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_secondary_y_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_y_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_y_axis_gridline_category_dividers Put lines between categories. On a categorical axis this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_y_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_background_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_background_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_background_background_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_background_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_background_background_image_size Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to `NULL` +#' @param chart_background_background_image_position Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to `NULL` +#' @param number_format_labels_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param number_format_labels_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param number_format_labels_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param number_format_labels_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param number_format_labels_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param number_format_labels_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param number_format_labels_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param number_format_labels_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param number_format_labels_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param number_format_labels_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param number_format_labels_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param number_format_prop Show % values. Toggles between showing the raw values from the datasheet and the computed percent values for the row in popups/panels. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_secondary_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_secondary_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_secondary_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param legend_mode Legend mode. Choices: auto, on, off. Auto mode hides the legend in certain situations, such as when each color is already explained by the chart titles in a grid of charts A legend will not show with a single entry. Flourish type hint: string, defaults to `NULL` +#' @param legend_filter_mode Click legend to filter data. Choices: none, filter-in, filter-out. Single select : When clicked only shows the series selected Multi select : When clicked, hides series selected. Multiple series can be hidden Filterable legends are ignored in certain situations, such as when shading by series and using a series filter Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param legend_position Legend position. Choices: above, below. Flourish type hint: string, defaults to `NULL` +#' @param text_legend Add data colors to header text. Choices: auto, custom, off. When selected, this will change the color of any text in your header which matches the name of a series in your data. This feature can be used instead of a legend when there are a small number of series, or it can be used to highlight a particular series. Note using optional HTML in the header is disabled if using this feature. Flourish type hint: string, defaults to `NULL` +#' @param text_legend_title Title. Flourish type hint: boolean, defaults to `NULL` +#' @param text_legend_subtitle Subtitle. Flourish type hint: boolean, defaults to `NULL` +#' @param text_legend_bold Bold. If checked, always use bold for colored items. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{VALUE}}` to include the numerical value of the current data point, or `{{SERIES}}` to display its series name. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}} Text to display when column_name is not empty {{/if}}`. For example, `{{Country}}` `{{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{VALUE}}` to include the numerical value of the current data point, or `{{SERIES}}` to display its series name. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}} Text to display when column_name is not empty {{/if}}`. For example, `{{Country}}` `{{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{VALUE}}` to include the numerical value of the current data point, or `{{SERIES}}` to display its series name. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}} Text to display when column_name is not empty {{/if}}`. For example, `{{Country}}` `{{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{VALUE}}` to include the numerical value of the current data point, or `{{SERIES}}` to display its series name. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}} Text to display when column_name is not empty {{/if}}`. For example, `{{Country}}` `{{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param popup_color_headers Color headers to match data. Flourish type hint: boolean, defaults to `NULL` +#' @param show_series_text Set series info in popups. Allows you to add information about each series/column (e.g. each line) to the popups. Note: This is incompatible with custom popup content. Flourish type hint: boolean, defaults to `NULL` +#' @param popup_series_text Popup content for series. Adds content to the popup about the series. Separate column name and text with a double colon. For example: Series 1 :: Comment about Series 1 Series 2 :: Comment about series 2. Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_placement Placement of axis highlights. Choices: above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_enabled Show highlights on the x axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_x_lines One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example, `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_x_line_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_line_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_line_dash Dash. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_areas One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_x_area_color Area. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_area_opacity Area opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_area_texture Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_vertical Vertical. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_x_label_y_position Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_x_position X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_font_weight Font weight. Choices: regular, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_shadow_color Shadow. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_shadow_enabled Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_y_enabled Show highlights on the y axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_y_lines One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example: `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_y_line_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_line_width line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_line_dash Dash. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_areas One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_y_area_color Area. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_area_opacity Area opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_area_texture Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_x_position X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_y_position Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_font_weight Font weight. Choices: regular, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_shadow_color Shadow. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_shadow_enabled Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param annotations_styles Show styling options. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_annotations_defaults_text_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_text_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_annotations_defaults_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_label_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_annotations_defaults_text_background_mode Text background. Choices: none, outline, background. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_text_bg Outline. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_label_bg Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_text_alignment Alignment. Choices: auto, start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_popup_position Popup position. Choices: center, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_line_marker Marker. Choices: none, arrowhead_open, arrowhead. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_stroke_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_annotations_defaults_stroke_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_connector_extend_line Extend line. Choices: enabled, disabled. Flourish type hint: string, defaults to `NULL` +#' @param data_trans_duration Animation duration. The duration of transitions in milliseconds, for example between two slides in a story. Flourish type hint: number, defaults to `NULL` +#' @param animate_on_load Animate on load. Flourish type hint: boolean, defaults to `NULL` +#' @param data_trans_bind_series Only animate series with same name. Determines how animations work when the data changes (e.g. between slides in a story ). When this is on, series (e.g. lines) will attempt to animate to become another line only if they have the same name (i.e. the same column header). Flourish type hint: boolean, defaults to `NULL` +#' @param data_trans_bind_data_points Only animate points with same label. Determines how animations work when the data changes (e.g. between slides in a story ). When this is on, data points (e.g. dots or bars) will attempt to animate to become other data points if they have the same label (e.g. date or category). Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_enabled Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_whitelist Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "line", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_line_bar_pie_data(gapminder) |> +#' set_line_bar_pie_details() +#' ) +#' @export + +set_line_bar_pie_details <- function( + ., + dual_axis = NULL, + secondary_series = NULL, + stack_sort = NULL, + facet_layout = NULL, + height_mode = NULL, + facet_aspect = NULL, + facet_aspect_mobile = NULL, + facet_aspect_breakpoint = NULL, + sort_mode = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + x_axis_matching = NULL, + x_axis_last_row_only = NULL, + y_axis_matching = NULL, + y_axis_first_col_only = NULL, + y2_axis_matching = NULL, + y2_axis_last_col_only = NULL, + series_filter_mode = NULL, + series_control_multi_text = NULL, + series_control_multi_none_text = NULL, + series_control_select_text = NULL, + max_series = NULL, + series_control_background = NULL, + series_control_text = NULL, + series_control_border = NULL, + series_control_pill_background = NULL, + series_control_pill_text = NULL, + series_control_pill_radius = NULL, + series_control_single_all = NULL, + series_control_single_all_text = NULL, + filter_rows_with_no_data = NULL, + chart_series_filter_controls_control_type = NULL, + chart_series_filter_controls_control_styles = NULL, + chart_series_filter_controls_control_title = NULL, + chart_series_filter_controls_button_group = NULL, + chart_series_filter_controls_button_group_width_mode = NULL, + chart_series_filter_controls_button_group_width_fixed = NULL, + chart_series_filter_controls_dropdown_width_mode = NULL, + chart_series_filter_controls_dropdown_width_fixed = NULL, + chart_series_filter_controls_slider_width = NULL, + chart_series_filter_controls_slider_max_label_width = NULL, + chart_series_filter_controls_slider_step_time = NULL, + chart_series_filter_controls_slider_loop = NULL, + chart_series_filter_controls_slider_restart_pause = NULL, + chart_series_filter_controls_sort = NULL, + row_filter_control_all = NULL, + row_filter_control_all_text = NULL, + chart_row_filter_controls_control_type = NULL, + chart_row_filter_controls_control_styles = NULL, + chart_row_filter_controls_control_title = NULL, + chart_row_filter_controls_button_group = NULL, + chart_row_filter_controls_button_group_width_mode = NULL, + chart_row_filter_controls_button_group_width_fixed = NULL, + chart_row_filter_controls_dropdown_width_mode = NULL, + chart_row_filter_controls_dropdown_width_fixed = NULL, + chart_row_filter_controls_slider_width = NULL, + chart_row_filter_controls_slider_max_label_width = NULL, + chart_row_filter_controls_slider_step_time = NULL, + chart_row_filter_controls_slider_loop = NULL, + chart_row_filter_controls_slider_restart_pause = NULL, + chart_row_filter_controls_sort = NULL, + log_control_y_visible = NULL, + chart_log_control_y_filter_controls_control_type = NULL, + chart_log_control_y_filter_controls_control_styles = NULL, + chart_log_control_y_filter_controls_control_title = NULL, + chart_log_control_y_filter_controls_button_group = NULL, + chart_log_control_y_filter_controls_button_group_width_mode = NULL, + chart_log_control_y_filter_controls_button_group_width_fixed = NULL, + chart_log_control_y_filter_controls_dropdown_width_mode = NULL, + chart_log_control_y_filter_controls_dropdown_width_fixed = NULL, + chart_log_control_y_filter_controls_slider_width = NULL, + chart_log_control_y_filter_controls_slider_max_label_width = NULL, + chart_log_control_y_filter_controls_slider_step_time = NULL, + chart_log_control_y_filter_controls_slider_loop = NULL, + chart_log_control_y_filter_controls_slider_restart_pause = NULL, + chart_log_control_y_filter_controls_sort = NULL, + log_control_y_text_linear = NULL, + log_control_y_text_log = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + controls_position = NULL, + color_mode = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + line_width = NULL, + line_opacity = NULL, + line_stroke = NULL, + line_curve = NULL, + line_dash_items = NULL, + line_dash_width = NULL, + line_dash_space_width = NULL, + line_interpolate = NULL, + shade_between_lines = NULL, + shade_between_lines_config = NULL, + shade_between_lines_color = NULL, + shade_between_lines_opacity = NULL, + area_opacity = NULL, + dot_mode = NULL, + dot_opacity = NULL, + dot_radius = NULL, + dot_radius_last = NULL, + dot_hollow = NULL, + bar_height = NULL, + column_opacity = NULL, + uniform_column_width = NULL, + uniform_bar_height = NULL, + column_padding_inner = NULL, + column_padding_in_group = NULL, + column_padding_stack = NULL, + column_stroke = NULL, + column_stroke_opacity = NULL, + column_stroke_color = NULL, + donut_inner_radius = NULL, + donut_corner_radius = NULL, + donut_pad_angle = NULL, + donut_auto_scale = NULL, + bar_labels_above = NULL, + bar_labels_color = NULL, + bar_labels_font_size = NULL, + bar_labels_weight = NULL, + line_end_labels = NULL, + chart_line_labels_max_width = NULL, + chart_line_labels_overlap_mode = NULL, + chart_line_labels_spreading_margin = NULL, + chart_line_labels_data_point_margin = NULL, + chart_line_labels_show_only_labels = NULL, + chart_line_labels_text_color = NULL, + chart_line_labels_text_size = NULL, + chart_line_labels_text_bg_color = NULL, + chart_line_labels_text_bg_size = NULL, + chart_line_labels_text_line_height = NULL, + chart_line_labels_text_max_lines = NULL, + chart_line_labels_text_weight = NULL, + chart_line_labels_lines = NULL, + chart_line_labels_line_style = NULL, + chart_line_labels_line_color = NULL, + chart_line_labels_line_width = NULL, + chart_line_labels_line_range = NULL, + chart_line_labels_line_padding = NULL, + labels = NULL, + labels_hide_overlaps = NULL, + labels_dot_center = NULL, + labels_column_align = NULL, + labels_column_padding = NULL, + labels_bar_align = NULL, + labels_bar_autohide = NULL, + labels_color_mode = NULL, + labels_fixed_color = NULL, + labels_font_weight = NULL, + labels_font_size_mode = NULL, + labels_font_size = NULL, + labels_bg_mode = NULL, + labels_bg_size = NULL, + labels_content = NULL, + stack_labels = NULL, + stack_labels_color = NULL, + stack_labels_font_size = NULL, + stack_labels_weight = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + chart_secondary_y_axis_axis_visible = NULL, + chart_secondary_y_axis_numeric_scale_type = NULL, + chart_secondary_y_axis_linear_min = NULL, + chart_secondary_y_axis_linear_max = NULL, + chart_secondary_y_axis_log_min = NULL, + chart_secondary_y_axis_log_max = NULL, + chart_secondary_y_axis_datetime_min = NULL, + chart_secondary_y_axis_datetime_max = NULL, + chart_secondary_y_axis_flip = NULL, + chart_secondary_y_axis_show_scale_settings = NULL, + chart_secondary_y_axis_nice = NULL, + chart_secondary_y_axis_zero_axis = NULL, + chart_secondary_y_axis_title_mode = NULL, + chart_secondary_y_axis_title = NULL, + chart_secondary_y_axis_title_styling = NULL, + chart_secondary_y_axis_title_position = NULL, + chart_secondary_y_axis_title_weight = NULL, + chart_secondary_y_axis_title_color = NULL, + chart_secondary_y_axis_title_size = NULL, + chart_secondary_y_axis_title_padding = NULL, + chart_secondary_y_axis_tick_label_position = NULL, + chart_secondary_y_axis_tick_label_styling = NULL, + chart_secondary_y_axis_tick_label_size = NULL, + chart_secondary_y_axis_tick_label_color = NULL, + chart_secondary_y_axis_tick_padding = NULL, + chart_secondary_y_axis_tick_label_angle = NULL, + chart_secondary_y_axis_tick_label_weight = NULL, + chart_secondary_y_axis_tick_label_max_lines = NULL, + chart_secondary_y_axis_tick_label_line_height = NULL, + chart_secondary_y_axis_tick_label_space_mode = NULL, + chart_secondary_y_axis_tick_label_space = NULL, + chart_secondary_y_axis_tick_mode = NULL, + chart_secondary_y_axis_tick_number = NULL, + chart_secondary_y_axis_tick_custom = NULL, + chart_secondary_y_axis_line_and_tick_color = NULL, + chart_secondary_y_axis_line_and_tick_width = NULL, + chart_secondary_y_axis_tick_length = NULL, + chart_secondary_y_axis_tick_side = NULL, + chart_secondary_y_axis_line_visible = NULL, + chart_secondary_y_axis_edge_padding = NULL, + chart_secondary_y_axis_gridlines_visible = NULL, + chart_secondary_y_axis_gridlines_styling = NULL, + chart_secondary_y_axis_gridline_color = NULL, + chart_secondary_y_axis_gridline_style = NULL, + chart_secondary_y_axis_gridline_width = NULL, + chart_secondary_y_axis_gridline_category_dividers = NULL, + chart_secondary_y_axis_gridline_category_dividers_extend = NULL, + chart_background_background_color_enabled = NULL, + chart_background_background_image_enabled = NULL, + chart_background_background_color = NULL, + chart_background_background_image_src = NULL, + chart_background_background_image_size = NULL, + chart_background_background_image_position = NULL, + number_format_labels_prefix = NULL, + number_format_labels_suffix = NULL, + number_format_labels_n_dec = NULL, + number_format_labels_advanced = NULL, + number_format_labels_negative_sign = NULL, + number_format_labels_strip_zeros = NULL, + number_format_labels_strip_separator = NULL, + number_format_labels_transform_labels = NULL, + number_format_labels_transform = NULL, + number_format_labels_multiply_divide_constant = NULL, + number_format_labels_exponentiate_constant = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + number_format_prop = NULL, + chart_secondary_number_date_format_prefix = NULL, + chart_secondary_number_date_format_suffix = NULL, + chart_secondary_number_date_format_n_dec = NULL, + chart_secondary_number_date_format_advanced = NULL, + chart_secondary_number_date_format_negative_sign = NULL, + chart_secondary_number_date_format_strip_zeros = NULL, + chart_secondary_number_date_format_strip_separator = NULL, + chart_secondary_number_date_format_transform_labels = NULL, + chart_secondary_number_date_format_transform = NULL, + chart_secondary_number_date_format_multiply_divide_constant = NULL, + chart_secondary_number_date_format_exponentiate_constant = NULL, + legend_mode = NULL, + legend_filter_mode = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_position = NULL, + text_legend = NULL, + text_legend_title = NULL, + text_legend_subtitle = NULL, + text_legend_bold = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + popup_color_headers = NULL, + show_series_text = NULL, + popup_series_text = NULL, + chart_axes_highlights_placement = NULL, + chart_axes_highlights_x_enabled = NULL, + chart_axes_highlights_x_lines = NULL, + chart_axes_highlights_x_line_color = NULL, + chart_axes_highlights_x_line_width = NULL, + chart_axes_highlights_x_line_dash = NULL, + chart_axes_highlights_x_areas = NULL, + chart_axes_highlights_x_area_color = NULL, + chart_axes_highlights_x_area_opacity = NULL, + chart_axes_highlights_x_area_texture = NULL, + chart_axes_highlights_x_label_vertical = NULL, + chart_axes_highlights_x_label_y_position = NULL, + chart_axes_highlights_x_label_x_position = NULL, + chart_axes_highlights_x_label_max_width = NULL, + chart_axes_highlights_x_font_size = NULL, + chart_axes_highlights_x_font_weight = NULL, + chart_axes_highlights_x_label_color = NULL, + chart_axes_highlights_x_shadow_color = NULL, + chart_axes_highlights_x_shadow_enabled = NULL, + chart_axes_highlights_y_enabled = NULL, + chart_axes_highlights_y_lines = NULL, + chart_axes_highlights_y_line_color = NULL, + chart_axes_highlights_y_line_width = NULL, + chart_axes_highlights_y_line_dash = NULL, + chart_axes_highlights_y_areas = NULL, + chart_axes_highlights_y_area_color = NULL, + chart_axes_highlights_y_area_opacity = NULL, + chart_axes_highlights_y_area_texture = NULL, + chart_axes_highlights_y_label_x_position = NULL, + chart_axes_highlights_y_label_y_position = NULL, + chart_axes_highlights_y_label_max_width = NULL, + chart_axes_highlights_y_font_size = NULL, + chart_axes_highlights_y_font_weight = NULL, + chart_axes_highlights_y_label_color = NULL, + chart_axes_highlights_y_shadow_color = NULL, + chart_axes_highlights_y_shadow_enabled = NULL, + annotations_styles = NULL, + chart_annotations_defaults_text_weight = NULL, + chart_annotations_defaults_text_size = NULL, + chart_annotations_defaults_text_color = NULL, + chart_annotations_defaults_label_width = NULL, + chart_annotations_defaults_text_background_mode = NULL, + chart_annotations_defaults_text_bg = NULL, + chart_annotations_defaults_label_bg = NULL, + chart_annotations_defaults_text_alignment = NULL, + chart_annotations_defaults_popup_position = NULL, + chart_annotations_defaults_line_marker = NULL, + chart_annotations_defaults_stroke_width = NULL, + chart_annotations_defaults_stroke_color = NULL, + chart_annotations_defaults_connector_extend_line = NULL, + data_trans_duration = NULL, + animate_on_load = NULL, + data_trans_bind_series = NULL, + data_trans_bind_data_points = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL) { + details_error(., "line_bar_pie") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/line-bar-pie")) { + stop("`set_line_bar_pie_details()` is not supported for this chart type.") + } + list_dual_axis <- c(FALSE, TRUE, NULL) + if (!is.null(dual_axis)) { + if (!dual_axis %in% list_dual_axis) { + stop("`dual_axis` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && dual_axis %in% names(named_list)) { + if (is.logical(dual_axis)) { + dual_axis <- as.character(dual_axis) + } + named_list_value <- unname(named_list[dual_axis])[[1]] + new_list$x$state$dual_axis <- named_list_value + } + } + } + } + new_list$x$state$secondary_series <- secondary_series + list_stack_sort <- c("data", "ascending", "descending", NULL) + if (!is.null(stack_sort)) { + if (!stack_sort %in% list_stack_sort) { + stop("`stack_sort` must be one of: c('data', 'ascending', 'descending')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "ascending": "ascending", "descending": "descending"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "ascending": "ascending", "descending": "descending"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && stack_sort %in% names(named_list)) { + if (is.logical(stack_sort)) { + stack_sort <- as.character(stack_sort) + } + named_list_value <- unname(named_list[stack_sort])[[1]] + new_list$x$state$stack_sort <- named_list_value + } + } + } + } + list_facet_layout <- c("single", "facets", NULL) + if (!is.null(facet_layout)) { + if (!facet_layout %in% list_facet_layout) { + stop("`facet_layout` must be one of: c('single', 'facets')") + } else { + if (length(jsonlite::fromJSON('{"single": "single", "facets": "facets"}')) > 1) { + named_list <- jsonlite::fromJSON('{"single": "single", "facets": "facets"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && facet_layout %in% names(named_list)) { + if (is.logical(facet_layout)) { + facet_layout <- as.character(facet_layout) + } + named_list_value <- unname(named_list[facet_layout])[[1]] + new_list$x$state$facet_layout <- named_list_value + } + } + } + } + list_height_mode <- c("auto", "fill_space", "aspect", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('auto', 'fill_space', 'aspect')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fill_space": "fill_space", "aspect": "aspect"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fill_space": "fill_space", "aspect": "aspect"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + new_list$x$state$facet_aspect <- facet_aspect + new_list$x$state$facet_aspect_mobile <- facet_aspect_mobile + new_list$x$state$facet_aspect_breakpoint <- facet_aspect_breakpoint + list_sort_mode <- c("data", "value", "label", NULL) + if (!is.null(sort_mode)) { + if (!sort_mode %in% list_sort_mode) { + stop("`sort_mode` must be one of: c('data', 'value', 'label')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "value": "value", "label": "label"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "value": "value", "label": "label"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && sort_mode %in% names(named_list)) { + if (is.logical(sort_mode)) { + sort_mode <- as.character(sort_mode) + } + named_list_value <- unname(named_list[sort_mode])[[1]] + new_list$x$state$sort_mode <- named_list_value + } + } + } + } + list_chart_facet_columns_fixed <- c(FALSE, TRUE, NULL) + if (!is.null(chart_facet_columns_fixed)) { + if (!chart_facet_columns_fixed %in% list_chart_facet_columns_fixed) { + stop("`chart_facet_columns_fixed` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_columns_fixed %in% names(named_list)) { + if (is.logical(chart_facet_columns_fixed)) { + chart_facet_columns_fixed <- as.character(chart_facet_columns_fixed) + } + named_list_value <- unname(named_list[chart_facet_columns_fixed])[[1]] + new_list$x$state$facets$columns_fixed <- named_list_value + } + } + } + } + new_list$x$state$facets$columns <- chart_facet_columns + new_list$x$state$facets$min_width <- chart_facet_min_width + new_list$x$state$facets$min_width_fixed <- chart_facet_min_width_fixed + new_list$x$state$facets$custom_grid <- chart_facet_custom_grid + if (length(chart_facet_custom_positions) > 1) { + new_list$x$state$facets$custom_positions <- paste(chart_facet_custom_positions, collapse = "\n") + } else { + new_list$x$state$facets$custom_positions <- chart_facet_custom_positions + } + + new_list$x$state$facets$max_width <- chart_facet_max_width + new_list$x$state$facets$gutter_w <- chart_facet_gutter_w + new_list$x$state$facets$gutter_h <- chart_facet_gutter_h + list_chart_facet_animation <- c("auto", "name", "reuse", NULL) + if (!is.null(chart_facet_animation)) { + if (!chart_facet_animation %in% list_chart_facet_animation) { + stop("`chart_facet_animation` must be one of: c('auto', 'name', 'reuse')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_animation %in% names(named_list)) { + if (is.logical(chart_facet_animation)) { + chart_facet_animation <- as.character(chart_facet_animation) + } + named_list_value <- unname(named_list[chart_facet_animation])[[1]] + new_list$x$state$facets$animation <- named_list_value + } + } + } + } + new_list$x$state$facets$titles <- chart_facet_titles + list_chart_facet_title_align <- c("auto", "left", "center", "right", NULL) + if (!is.null(chart_facet_title_align)) { + if (!chart_facet_title_align %in% list_chart_facet_title_align) { + stop("`chart_facet_title_align` must be one of: c('auto', 'left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_align %in% names(named_list)) { + if (is.logical(chart_facet_title_align)) { + chart_facet_title_align <- as.character(chart_facet_title_align) + } + named_list_value <- unname(named_list[chart_facet_title_align])[[1]] + new_list$x$state$facets$title_align <- named_list_value + } + } + } + } + new_list$x$state$facets$title_size <- chart_facet_title_size + list_chart_facet_title_unit <- c("rem", "facet", NULL) + if (!is.null(chart_facet_title_unit)) { + if (!chart_facet_title_unit %in% list_chart_facet_title_unit) { + stop("`chart_facet_title_unit` must be one of: c('rem', 'facet')") + } else { + if (length(jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_unit %in% names(named_list)) { + if (is.logical(chart_facet_title_unit)) { + chart_facet_title_unit <- as.character(chart_facet_title_unit) + } + named_list_value <- unname(named_list[chart_facet_title_unit])[[1]] + new_list$x$state$facets$title_unit <- named_list_value + } + } + } + } + new_list$x$state$facets$title_color <- chart_facet_title_color + new_list$x$state$facets$title_padding_top <- chart_facet_title_padding_top + new_list$x$state$facets$title_padding_bottom <- chart_facet_title_padding_bottom + list_chart_facet_title_bg <- c("none", "full", "text", NULL) + if (!is.null(chart_facet_title_bg)) { + if (!chart_facet_title_bg %in% list_chart_facet_title_bg) { + stop("`chart_facet_title_bg` must be one of: c('none', 'full', 'text')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_bg %in% names(named_list)) { + if (is.logical(chart_facet_title_bg)) { + chart_facet_title_bg <- as.character(chart_facet_title_bg) + } + named_list_value <- unname(named_list[chart_facet_title_bg])[[1]] + new_list$x$state$facets$title_bg <- named_list_value + } + } + } + } + new_list$x$state$facets$title_bg_color <- chart_facet_title_bg_color + new_list$x$state$facets$title_bg_padding <- chart_facet_title_bg_padding + new_list$x$state$x_axis_matching <- x_axis_matching + new_list$x$state$x_axis_last_row_only <- x_axis_last_row_only + new_list$x$state$y_axis_matching <- y_axis_matching + new_list$x$state$y_axis_first_col_only <- y_axis_first_col_only + new_list$x$state$y2_axis_matching <- y2_axis_matching + new_list$x$state$y2_axis_last_col_only <- y2_axis_last_col_only + list_series_filter_mode <- c("none", "single", "multi", NULL) + if (!is.null(series_filter_mode)) { + if (!series_filter_mode %in% list_series_filter_mode) { + stop("`series_filter_mode` must be one of: c('none', 'single', 'multi')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "single": "single", "multi": "multi"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "single": "single", "multi": "multi"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && series_filter_mode %in% names(named_list)) { + if (is.logical(series_filter_mode)) { + series_filter_mode <- as.character(series_filter_mode) + } + named_list_value <- unname(named_list[series_filter_mode])[[1]] + new_list$x$state$series_filter_mode <- named_list_value + } + } + } + } + new_list$x$state$series_control_multi_text <- series_control_multi_text + new_list$x$state$series_control_multi_none_text <- series_control_multi_none_text + new_list$x$state$series_control_select_text <- series_control_select_text + new_list$x$state$max_series <- max_series + new_list$x$state$series_control_background <- series_control_background + new_list$x$state$series_control_text <- series_control_text + new_list$x$state$series_control_border <- series_control_border + new_list$x$state$series_control_pill_background <- series_control_pill_background + new_list$x$state$series_control_pill_text <- series_control_pill_text + new_list$x$state$series_control_pill_radius <- series_control_pill_radius + new_list$x$state$series_control_single_all <- series_control_single_all + new_list$x$state$series_control_single_all_text <- series_control_single_all_text + new_list$x$state$filter_rows_with_no_data <- filter_rows_with_no_data + list_chart_series_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_series_filter_controls_control_type)) { + if (!chart_series_filter_controls_control_type %in% list_chart_series_filter_controls_control_type) { + stop("`chart_series_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_series_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_series_filter_controls_control_type)) { + chart_series_filter_controls_control_type <- as.character(chart_series_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_series_filter_controls_control_type])[[1]] + new_list$x$state$series_control_single$control_type <- named_list_value + } + } + } + } + new_list$x$state$series_control_single$control_styles <- chart_series_filter_controls_control_styles + new_list$x$state$series_control_single$control_title <- chart_series_filter_controls_control_title + list_chart_series_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_series_filter_controls_button_group)) { + if (!chart_series_filter_controls_button_group %in% list_chart_series_filter_controls_button_group) { + stop("`chart_series_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_series_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_series_filter_controls_button_group)) { + chart_series_filter_controls_button_group <- as.character(chart_series_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_series_filter_controls_button_group])[[1]] + new_list$x$state$series_control_single$button_group <- named_list_value + } + } + } + } + list_chart_series_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_series_filter_controls_button_group_width_mode)) { + if (!chart_series_filter_controls_button_group_width_mode %in% list_chart_series_filter_controls_button_group_width_mode) { + stop("`chart_series_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_series_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_series_filter_controls_button_group_width_mode)) { + chart_series_filter_controls_button_group_width_mode <- as.character(chart_series_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_series_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$series_control_single$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$series_control_single$button_group_width_fixed <- chart_series_filter_controls_button_group_width_fixed + list_chart_series_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_series_filter_controls_dropdown_width_mode)) { + if (!chart_series_filter_controls_dropdown_width_mode %in% list_chart_series_filter_controls_dropdown_width_mode) { + stop("`chart_series_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_series_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_series_filter_controls_dropdown_width_mode)) { + chart_series_filter_controls_dropdown_width_mode <- as.character(chart_series_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_series_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$series_control_single$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$series_control_single$dropdown_width_fixed <- chart_series_filter_controls_dropdown_width_fixed + new_list$x$state$series_control_single$slider_width <- chart_series_filter_controls_slider_width + new_list$x$state$series_control_single$slider_max_label_width <- chart_series_filter_controls_slider_max_label_width + new_list$x$state$series_control_single$slider_step_time <- chart_series_filter_controls_slider_step_time + new_list$x$state$series_control_single$slider_loop <- chart_series_filter_controls_slider_loop + new_list$x$state$series_control_single$slider_restart_pause <- chart_series_filter_controls_slider_restart_pause + list_chart_series_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_series_filter_controls_sort)) { + if (!chart_series_filter_controls_sort %in% list_chart_series_filter_controls_sort) { + stop("`chart_series_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_series_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_series_filter_controls_sort)) { + chart_series_filter_controls_sort <- as.character(chart_series_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_series_filter_controls_sort])[[1]] + new_list$x$state$series_control_single$sort <- named_list_value + } + } + } + } + new_list$x$state$row_filter_control_all <- row_filter_control_all + new_list$x$state$row_filter_control_all_text <- row_filter_control_all_text + list_chart_row_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_row_filter_controls_control_type)) { + if (!chart_row_filter_controls_control_type %in% list_chart_row_filter_controls_control_type) { + stop("`chart_row_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_row_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_row_filter_controls_control_type)) { + chart_row_filter_controls_control_type <- as.character(chart_row_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_row_filter_controls_control_type])[[1]] + new_list$x$state$row_filter_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$row_filter_control$control_styles <- chart_row_filter_controls_control_styles + new_list$x$state$row_filter_control$control_title <- chart_row_filter_controls_control_title + list_chart_row_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_row_filter_controls_button_group)) { + if (!chart_row_filter_controls_button_group %in% list_chart_row_filter_controls_button_group) { + stop("`chart_row_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_row_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_row_filter_controls_button_group)) { + chart_row_filter_controls_button_group <- as.character(chart_row_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_row_filter_controls_button_group])[[1]] + new_list$x$state$row_filter_control$button_group <- named_list_value + } + } + } + } + list_chart_row_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_row_filter_controls_button_group_width_mode)) { + if (!chart_row_filter_controls_button_group_width_mode %in% list_chart_row_filter_controls_button_group_width_mode) { + stop("`chart_row_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_row_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_row_filter_controls_button_group_width_mode)) { + chart_row_filter_controls_button_group_width_mode <- as.character(chart_row_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_row_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$row_filter_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$row_filter_control$button_group_width_fixed <- chart_row_filter_controls_button_group_width_fixed + list_chart_row_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_row_filter_controls_dropdown_width_mode)) { + if (!chart_row_filter_controls_dropdown_width_mode %in% list_chart_row_filter_controls_dropdown_width_mode) { + stop("`chart_row_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_row_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_row_filter_controls_dropdown_width_mode)) { + chart_row_filter_controls_dropdown_width_mode <- as.character(chart_row_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_row_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$row_filter_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$row_filter_control$dropdown_width_fixed <- chart_row_filter_controls_dropdown_width_fixed + new_list$x$state$row_filter_control$slider_width <- chart_row_filter_controls_slider_width + new_list$x$state$row_filter_control$slider_max_label_width <- chart_row_filter_controls_slider_max_label_width + new_list$x$state$row_filter_control$slider_step_time <- chart_row_filter_controls_slider_step_time + new_list$x$state$row_filter_control$slider_loop <- chart_row_filter_controls_slider_loop + new_list$x$state$row_filter_control$slider_restart_pause <- chart_row_filter_controls_slider_restart_pause + list_chart_row_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_row_filter_controls_sort)) { + if (!chart_row_filter_controls_sort %in% list_chart_row_filter_controls_sort) { + stop("`chart_row_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_row_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_row_filter_controls_sort)) { + chart_row_filter_controls_sort <- as.character(chart_row_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_row_filter_controls_sort])[[1]] + new_list$x$state$row_filter_control$sort <- named_list_value + } + } + } + } + new_list$x$state$log_control_y_visible <- log_control_y_visible + list_chart_log_control_y_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_log_control_y_filter_controls_control_type)) { + if (!chart_log_control_y_filter_controls_control_type %in% list_chart_log_control_y_filter_controls_control_type) { + stop("`chart_log_control_y_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_log_control_y_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_log_control_y_filter_controls_control_type)) { + chart_log_control_y_filter_controls_control_type <- as.character(chart_log_control_y_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_log_control_y_filter_controls_control_type])[[1]] + new_list$x$state$log_control_y$control_type <- named_list_value + } + } + } + } + new_list$x$state$log_control_y$control_styles <- chart_log_control_y_filter_controls_control_styles + new_list$x$state$log_control_y$control_title <- chart_log_control_y_filter_controls_control_title + list_chart_log_control_y_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_log_control_y_filter_controls_button_group)) { + if (!chart_log_control_y_filter_controls_button_group %in% list_chart_log_control_y_filter_controls_button_group) { + stop("`chart_log_control_y_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_log_control_y_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_log_control_y_filter_controls_button_group)) { + chart_log_control_y_filter_controls_button_group <- as.character(chart_log_control_y_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_log_control_y_filter_controls_button_group])[[1]] + new_list$x$state$log_control_y$button_group <- named_list_value + } + } + } + } + list_chart_log_control_y_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_log_control_y_filter_controls_button_group_width_mode)) { + if (!chart_log_control_y_filter_controls_button_group_width_mode %in% list_chart_log_control_y_filter_controls_button_group_width_mode) { + stop("`chart_log_control_y_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_log_control_y_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_log_control_y_filter_controls_button_group_width_mode)) { + chart_log_control_y_filter_controls_button_group_width_mode <- as.character(chart_log_control_y_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_log_control_y_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$log_control_y$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$log_control_y$button_group_width_fixed <- chart_log_control_y_filter_controls_button_group_width_fixed + list_chart_log_control_y_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_log_control_y_filter_controls_dropdown_width_mode)) { + if (!chart_log_control_y_filter_controls_dropdown_width_mode %in% list_chart_log_control_y_filter_controls_dropdown_width_mode) { + stop("`chart_log_control_y_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_log_control_y_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_log_control_y_filter_controls_dropdown_width_mode)) { + chart_log_control_y_filter_controls_dropdown_width_mode <- as.character(chart_log_control_y_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_log_control_y_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$log_control_y$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$log_control_y$dropdown_width_fixed <- chart_log_control_y_filter_controls_dropdown_width_fixed + new_list$x$state$log_control_y$slider_width <- chart_log_control_y_filter_controls_slider_width + new_list$x$state$log_control_y$slider_max_label_width <- chart_log_control_y_filter_controls_slider_max_label_width + new_list$x$state$log_control_y$slider_step_time <- chart_log_control_y_filter_controls_slider_step_time + new_list$x$state$log_control_y$slider_loop <- chart_log_control_y_filter_controls_slider_loop + new_list$x$state$log_control_y$slider_restart_pause <- chart_log_control_y_filter_controls_slider_restart_pause + list_chart_log_control_y_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_log_control_y_filter_controls_sort)) { + if (!chart_log_control_y_filter_controls_sort %in% list_chart_log_control_y_filter_controls_sort) { + stop("`chart_log_control_y_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_log_control_y_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_log_control_y_filter_controls_sort)) { + chart_log_control_y_filter_controls_sort <- as.character(chart_log_control_y_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_log_control_y_filter_controls_sort])[[1]] + new_list$x$state$log_control_y$sort <- named_list_value + } + } + } + } + new_list$x$state$log_control_y_text_linear <- log_control_y_text_linear + new_list$x$state$log_control_y_text_log <- log_control_y_text_log + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + list_chart_filter_controls_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_filter_controls_container_alignment)) { + if (!chart_filter_controls_container_alignment %in% list_chart_filter_controls_container_alignment) { + stop("`chart_filter_controls_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_container_alignment %in% names(named_list)) { + if (is.logical(chart_filter_controls_container_alignment)) { + chart_filter_controls_container_alignment <- as.character(chart_filter_controls_container_alignment) + } + named_list_value <- unname(named_list[chart_filter_controls_container_alignment])[[1]] + new_list$x$state$controls_container$alignment <- named_list_value + } + } + } + } + new_list$x$state$controls_container$controls_spacing <- chart_filter_controls_container_controls_spacing + list_controls_position <- c("log_series_row", "series_log_row", "log_row_series", "series_row_log", "row_log_series", "row_series_log", NULL) + if (!is.null(controls_position)) { + if (!controls_position %in% list_controls_position) { + stop("`controls_position` must be one of: c('log_series_row', 'series_log_row', 'log_row_series', 'series_row_log', 'row_log_series', 'row_series_log')") + } else { + if (length(jsonlite::fromJSON('{"log_series_row": "log_series_row", "series_log_row": "series_log_row", "log_row_series": "log_row_series", "series_row_log": "series_row_log", "row_log_series": "row_log_series", "row_series_log": "row_series_log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"log_series_row": "log_series_row", "series_log_row": "series_log_row", "log_row_series": "log_row_series", "series_row_log": "series_row_log", "row_log_series": "row_log_series", "row_series_log": "row_series_log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && controls_position %in% names(named_list)) { + if (is.logical(controls_position)) { + controls_position <- as.character(controls_position) + } + named_list_value <- unname(named_list[controls_position])[[1]] + new_list$x$state$controls_position <- named_list_value + } + } + } + } + list_color_mode <- c("column", "row", NULL) + if (!is.null(color_mode)) { + if (!color_mode %in% list_color_mode) { + stop("`color_mode` must be one of: c('column', 'row')") + } else { + if (length(jsonlite::fromJSON('{"column": "column", "row": "row"}')) > 1) { + named_list <- jsonlite::fromJSON('{"column": "column", "row": "row"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && color_mode %in% names(named_list)) { + if (is.logical(color_mode)) { + color_mode <- as.character(color_mode) + } + named_list_value <- unname(named_list[color_mode])[[1]] + new_list$x$state$color_mode <- named_list_value + } + } + } + } + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$line_width <- line_width + new_list$x$state$line_opacity <- line_opacity + new_list$x$state$line_stroke <- line_stroke + list_line_curve <- c("curve_linear", "curve_monotone_x", "curve_natural", "curve_step", "curve_step_before", "curve_step_after", NULL) + if (!is.null(line_curve)) { + if (!line_curve %in% list_line_curve) { + stop("`line_curve` must be one of: c('curve_linear', 'curve_monotone_x', 'curve_natural', 'curve_step', 'curve_step_before', 'curve_step_after')") + } else { + if (length(jsonlite::fromJSON('{"curve_linear": "curveLinear", "curve_monotone_x": "curveMonotoneX", "curve_natural": "curveNatural", "curve_step": "curveStep", "curve_step_before": "curveStepBefore", "curve_step_after": "curveStepAfter"}')) > 1) { + named_list <- jsonlite::fromJSON('{"curve_linear": "curveLinear", "curve_monotone_x": "curveMonotoneX", "curve_natural": "curveNatural", "curve_step": "curveStep", "curve_step_before": "curveStepBefore", "curve_step_after": "curveStepAfter"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && line_curve %in% names(named_list)) { + if (is.logical(line_curve)) { + line_curve <- as.character(line_curve) + } + named_list_value <- unname(named_list[line_curve])[[1]] + new_list$x$state$line_curve <- named_list_value + } + } + } + } + if (length(line_dash_items) > 1) { + new_list$x$state$line_dash_items <- paste(line_dash_items, collapse = "\n") + } else { + new_list$x$state$line_dash_items <- line_dash_items + } + + new_list$x$state$line_dash_width <- line_dash_width + new_list$x$state$line_dash_space_width <- line_dash_space_width + list_line_interpolate <- c(TRUE, FALSE, NULL) + if (!is.null(line_interpolate)) { + if (!line_interpolate %in% list_line_interpolate) { + stop("`line_interpolate` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && line_interpolate %in% names(named_list)) { + if (is.logical(line_interpolate)) { + line_interpolate <- as.character(line_interpolate) + } + named_list_value <- unname(named_list[line_interpolate])[[1]] + new_list$x$state$line_interpolate <- named_list_value + } + } + } + } + new_list$x$state$shade_between_lines <- shade_between_lines + if (length(shade_between_lines_config) > 1) { + new_list$x$state$shade_between_lines_config <- paste(shade_between_lines_config, collapse = "\n") + } else { + new_list$x$state$shade_between_lines_config <- shade_between_lines_config + } + + new_list$x$state$shade_between_lines_color <- shade_between_lines_color + new_list$x$state$shade_between_lines_opacity <- shade_between_lines_opacity + new_list$x$state$area_opacity <- area_opacity + list_dot_mode <- c("auto", "on", "off", NULL) + if (!is.null(dot_mode)) { + if (!dot_mode %in% list_dot_mode) { + stop("`dot_mode` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && dot_mode %in% names(named_list)) { + if (is.logical(dot_mode)) { + dot_mode <- as.character(dot_mode) + } + named_list_value <- unname(named_list[dot_mode])[[1]] + new_list$x$state$dot_mode <- named_list_value + } + } + } + } + new_list$x$state$dot_opacity <- dot_opacity + new_list$x$state$dot_radius <- dot_radius + new_list$x$state$dot_radius_last <- dot_radius_last + new_list$x$state$dot_hollow <- dot_hollow + new_list$x$state$bar_height <- bar_height + new_list$x$state$column_opacity <- column_opacity + new_list$x$state$uniform_column_width <- uniform_column_width + new_list$x$state$uniform_bar_height <- uniform_bar_height + new_list$x$state$column_padding_inner <- column_padding_inner + new_list$x$state$column_padding_in_group <- column_padding_in_group + new_list$x$state$column_padding_stack <- column_padding_stack + new_list$x$state$column_stroke <- column_stroke + new_list$x$state$column_stroke_opacity <- column_stroke_opacity + new_list$x$state$column_stroke_color <- column_stroke_color + new_list$x$state$donut_inner_radius <- donut_inner_radius + new_list$x$state$donut_corner_radius <- donut_corner_radius + new_list$x$state$donut_pad_angle <- donut_pad_angle + new_list$x$state$donut_auto_scale <- donut_auto_scale + list_bar_labels_above <- c(TRUE, FALSE, NULL) + if (!is.null(bar_labels_above)) { + if (!bar_labels_above %in% list_bar_labels_above) { + stop("`bar_labels_above` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && bar_labels_above %in% names(named_list)) { + if (is.logical(bar_labels_above)) { + bar_labels_above <- as.character(bar_labels_above) + } + named_list_value <- unname(named_list[bar_labels_above])[[1]] + new_list$x$state$bar_labels_above <- named_list_value + } + } + } + } + new_list$x$state$bar_labels_color <- bar_labels_color + new_list$x$state$bar_labels_font_size <- bar_labels_font_size + list_bar_labels_weight <- c("600", "400", NULL) + if (!is.null(bar_labels_weight)) { + if (!bar_labels_weight %in% list_bar_labels_weight) { + stop("`bar_labels_weight` must be one of: c('600', '400')") + } else { + if (length(jsonlite::fromJSON('{"600": "600", "400": "400"}')) > 1) { + named_list <- jsonlite::fromJSON('{"600": "600", "400": "400"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && bar_labels_weight %in% names(named_list)) { + if (is.logical(bar_labels_weight)) { + bar_labels_weight <- as.character(bar_labels_weight) + } + named_list_value <- unname(named_list[bar_labels_weight])[[1]] + new_list$x$state$bar_labels_weight <- named_list_value + } + } + } + } + new_list$x$state$line_end_labels <- line_end_labels + new_list$x$state$line_labels$max_width <- chart_line_labels_max_width + list_chart_line_labels_overlap_mode <- c("spread", "hide", "none", NULL) + if (!is.null(chart_line_labels_overlap_mode)) { + if (!chart_line_labels_overlap_mode %in% list_chart_line_labels_overlap_mode) { + stop("`chart_line_labels_overlap_mode` must be one of: c('spread', 'hide', 'none')") + } else { + if (length(jsonlite::fromJSON('{"spread": "spread", "hide": "hide", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"spread": "spread", "hide": "hide", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_line_labels_overlap_mode %in% names(named_list)) { + if (is.logical(chart_line_labels_overlap_mode)) { + chart_line_labels_overlap_mode <- as.character(chart_line_labels_overlap_mode) + } + named_list_value <- unname(named_list[chart_line_labels_overlap_mode])[[1]] + new_list$x$state$line_labels$overlap_mode <- named_list_value + } + } + } + } + new_list$x$state$line_labels$spreading_margin <- chart_line_labels_spreading_margin + new_list$x$state$line_labels$data_point_margin <- chart_line_labels_data_point_margin + if (length(chart_line_labels_show_only_labels) > 1) { + new_list$x$state$line_labels$show_only_labels <- paste(chart_line_labels_show_only_labels, collapse = "\n") + } else { + new_list$x$state$line_labels$show_only_labels <- chart_line_labels_show_only_labels + } + + new_list$x$state$line_labels$text_color <- chart_line_labels_text_color + new_list$x$state$line_labels$text_size <- chart_line_labels_text_size + new_list$x$state$line_labels$text_bg_color <- chart_line_labels_text_bg_color + new_list$x$state$line_labels$text_bg_size <- chart_line_labels_text_bg_size + new_list$x$state$line_labels$text_line_height <- chart_line_labels_text_line_height + new_list$x$state$line_labels$text_max_lines <- chart_line_labels_text_max_lines + list_chart_line_labels_text_weight <- c(400, 700, NULL) + if (!is.null(chart_line_labels_text_weight)) { + if (!chart_line_labels_text_weight %in% list_chart_line_labels_text_weight) { + stop("`chart_line_labels_text_weight` must be one of: c(400, 700)") + } else { + if (length(jsonlite::fromJSON('{"400": 400, "700": 700}')) > 1) { + named_list <- jsonlite::fromJSON('{"400": 400, "700": 700}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_line_labels_text_weight %in% names(named_list)) { + if (is.logical(chart_line_labels_text_weight)) { + chart_line_labels_text_weight <- as.character(chart_line_labels_text_weight) + } + named_list_value <- unname(named_list[chart_line_labels_text_weight])[[1]] + new_list$x$state$line_labels$text_weight <- named_list_value + } + } + } + } + list_chart_line_labels_lines <- c("auto", "on", "off", NULL) + if (!is.null(chart_line_labels_lines)) { + if (!chart_line_labels_lines %in% list_chart_line_labels_lines) { + stop("`chart_line_labels_lines` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_line_labels_lines %in% names(named_list)) { + if (is.logical(chart_line_labels_lines)) { + chart_line_labels_lines <- as.character(chart_line_labels_lines) + } + named_list_value <- unname(named_list[chart_line_labels_lines])[[1]] + new_list$x$state$line_labels$lines <- named_list_value + } + } + } + } + list_chart_line_labels_line_style <- c("straight", "step", NULL) + if (!is.null(chart_line_labels_line_style)) { + if (!chart_line_labels_line_style %in% list_chart_line_labels_line_style) { + stop("`chart_line_labels_line_style` must be one of: c('straight', 'step')") + } else { + if (length(jsonlite::fromJSON('{"straight": "straight", "step": "step"}')) > 1) { + named_list <- jsonlite::fromJSON('{"straight": "straight", "step": "step"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_line_labels_line_style %in% names(named_list)) { + if (is.logical(chart_line_labels_line_style)) { + chart_line_labels_line_style <- as.character(chart_line_labels_line_style) + } + named_list_value <- unname(named_list[chart_line_labels_line_style])[[1]] + new_list$x$state$line_labels$line_style <- named_list_value + } + } + } + } + new_list$x$state$line_labels$line_color <- chart_line_labels_line_color + new_list$x$state$line_labels$line_width <- chart_line_labels_line_width + new_list$x$state$line_labels$line_range <- chart_line_labels_line_range + new_list$x$state$line_labels$line_padding <- chart_line_labels_line_padding + new_list$x$state$labels <- labels + new_list$x$state$labels_hide_overlaps <- labels_hide_overlaps + new_list$x$state$labels_dot_center <- labels_dot_center + list_labels_column_align <- c("bottom", "middle", "top", "above", NULL) + if (!is.null(labels_column_align)) { + if (!labels_column_align %in% list_labels_column_align) { + stop("`labels_column_align` must be one of: c('bottom', 'middle', 'top', 'above')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "middle": "middle", "top": "top", "above": "above"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "middle": "middle", "top": "top", "above": "above"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_column_align %in% names(named_list)) { + if (is.logical(labels_column_align)) { + labels_column_align <- as.character(labels_column_align) + } + named_list_value <- unname(named_list[labels_column_align])[[1]] + new_list$x$state$labels_column_align <- named_list_value + } + } + } + } + new_list$x$state$labels_column_padding <- labels_column_padding + list_labels_bar_align <- c("left", "center", "right", "out", NULL) + if (!is.null(labels_bar_align)) { + if (!labels_bar_align %in% list_labels_bar_align) { + stop("`labels_bar_align` must be one of: c('left', 'center', 'right', 'out')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "out": "out"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "out": "out"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_bar_align %in% names(named_list)) { + if (is.logical(labels_bar_align)) { + labels_bar_align <- as.character(labels_bar_align) + } + named_list_value <- unname(named_list[labels_bar_align])[[1]] + new_list$x$state$labels_bar_align <- named_list_value + } + } + } + } + new_list$x$state$labels_bar_autohide <- labels_bar_autohide + list_labels_color_mode <- c("auto", "data", "contrast", "fixed", NULL) + if (!is.null(labels_color_mode)) { + if (!labels_color_mode %in% list_labels_color_mode) { + stop("`labels_color_mode` must be one of: c('auto', 'data', 'contrast', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "data": "data", "contrast": "contrast", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "data": "data", "contrast": "contrast", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_color_mode %in% names(named_list)) { + if (is.logical(labels_color_mode)) { + labels_color_mode <- as.character(labels_color_mode) + } + named_list_value <- unname(named_list[labels_color_mode])[[1]] + new_list$x$state$labels_color_mode <- named_list_value + } + } + } + } + new_list$x$state$labels_fixed_color <- labels_fixed_color + list_labels_font_weight <- c("600", "400", NULL) + if (!is.null(labels_font_weight)) { + if (!labels_font_weight %in% list_labels_font_weight) { + stop("`labels_font_weight` must be one of: c('600', '400')") + } else { + if (length(jsonlite::fromJSON('{"600": "600", "400": "400"}')) > 1) { + named_list <- jsonlite::fromJSON('{"600": "600", "400": "400"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_font_weight %in% names(named_list)) { + if (is.logical(labels_font_weight)) { + labels_font_weight <- as.character(labels_font_weight) + } + named_list_value <- unname(named_list[labels_font_weight])[[1]] + new_list$x$state$labels_font_weight <- named_list_value + } + } + } + } + list_labels_font_size_mode <- c("auto", "fixed", NULL) + if (!is.null(labels_font_size_mode)) { + if (!labels_font_size_mode %in% list_labels_font_size_mode) { + stop("`labels_font_size_mode` must be one of: c('auto', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_font_size_mode %in% names(named_list)) { + if (is.logical(labels_font_size_mode)) { + labels_font_size_mode <- as.character(labels_font_size_mode) + } + named_list_value <- unname(named_list[labels_font_size_mode])[[1]] + new_list$x$state$labels_font_size_mode <- named_list_value + } + } + } + } + new_list$x$state$labels_font_size <- labels_font_size + list_labels_bg_mode <- c("on", "off", NULL) + if (!is.null(labels_bg_mode)) { + if (!labels_bg_mode %in% list_labels_bg_mode) { + stop("`labels_bg_mode` must be one of: c('on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_bg_mode %in% names(named_list)) { + if (is.logical(labels_bg_mode)) { + labels_bg_mode <- as.character(labels_bg_mode) + } + named_list_value <- unname(named_list[labels_bg_mode])[[1]] + new_list$x$state$labels_bg_mode <- named_list_value + } + } + } + } + new_list$x$state$labels_bg_size <- labels_bg_size + list_labels_content <- c("auto", "value", "label", "both", NULL) + if (!is.null(labels_content)) { + if (!labels_content %in% list_labels_content) { + stop("`labels_content` must be one of: c('auto', 'value', 'label', 'both')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "value": "value", "label": "label", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "value": "value", "label": "label", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_content %in% names(named_list)) { + if (is.logical(labels_content)) { + labels_content <- as.character(labels_content) + } + named_list_value <- unname(named_list[labels_content])[[1]] + new_list$x$state$labels_content <- named_list_value + } + } + } + } + new_list$x$state$stack_labels <- stack_labels + new_list$x$state$stack_labels_color <- stack_labels_color + new_list$x$state$stack_labels_font_size <- stack_labels_font_size + list_stack_labels_weight <- c("600", "400", NULL) + if (!is.null(stack_labels_weight)) { + if (!stack_labels_weight %in% list_stack_labels_weight) { + stop("`stack_labels_weight` must be one of: c('600', '400')") + } else { + if (length(jsonlite::fromJSON('{"600": "600", "400": "400"}')) > 1) { + named_list <- jsonlite::fromJSON('{"600": "600", "400": "400"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && stack_labels_weight %in% names(named_list)) { + if (is.logical(stack_labels_weight)) { + stack_labels_weight <- as.character(stack_labels_weight) + } + named_list_value <- unname(named_list[stack_labels_weight])[[1]] + new_list$x$state$stack_labels_weight <- named_list_value + } + } + } + } + list_chart_x_axis_axis_position <- c("bottom", "float-below", "float-above", "top", "off", NULL) + if (!is.null(chart_x_axis_axis_position)) { + if (!chart_x_axis_axis_position %in% list_chart_x_axis_axis_position) { + stop("`chart_x_axis_axis_position` must be one of: c('bottom', 'float-below', 'float-above', 'top', 'off')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_axis_position %in% names(named_list)) { + if (is.logical(chart_x_axis_axis_position)) { + chart_x_axis_axis_position <- as.character(chart_x_axis_axis_position) + } + named_list_value <- unname(named_list[chart_x_axis_axis_position])[[1]] + new_list$x$state$x$axis_position <- named_list_value + } + } + } + } + new_list$x$state$x$y_axis_position <- chart_x_axis_y_axis_position + list_chart_x_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_x_axis_numeric_scale_type)) { + if (!chart_x_axis_numeric_scale_type %in% list_chart_x_axis_numeric_scale_type) { + stop("`chart_x_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_x_axis_numeric_scale_type)) { + chart_x_axis_numeric_scale_type <- as.character(chart_x_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_x_axis_numeric_scale_type])[[1]] + new_list$x$state$x$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$x$linear_min <- chart_x_axis_linear_min + new_list$x$state$x$linear_max <- chart_x_axis_linear_max + new_list$x$state$x$log_min <- chart_x_axis_log_min + new_list$x$state$x$log_max <- chart_x_axis_log_max + new_list$x$state$x$datetime_min <- chart_x_axis_datetime_min + new_list$x$state$x$datetime_max <- chart_x_axis_datetime_max + new_list$x$state$x$flip <- chart_x_axis_flip + new_list$x$state$x$show_scale_settings <- chart_x_axis_show_scale_settings + list_chart_x_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_nice)) { + if (!chart_x_axis_nice %in% list_chart_x_axis_nice) { + stop("`chart_x_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_nice %in% names(named_list)) { + if (is.logical(chart_x_axis_nice)) { + chart_x_axis_nice <- as.character(chart_x_axis_nice) + } + named_list_value <- unname(named_list[chart_x_axis_nice])[[1]] + new_list$x$state$x$nice <- named_list_value + } + } + } + } + list_chart_x_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_x_axis_zero_axis)) { + if (!chart_x_axis_zero_axis %in% list_chart_x_axis_zero_axis) { + stop("`chart_x_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_x_axis_zero_axis)) { + chart_x_axis_zero_axis <- as.character(chart_x_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_x_axis_zero_axis])[[1]] + new_list$x$state$x$zero_axis <- named_list_value + } + } + } + } + list_chart_x_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_x_axis_title_mode)) { + if (!chart_x_axis_title_mode %in% list_chart_x_axis_title_mode) { + stop("`chart_x_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_title_mode)) { + chart_x_axis_title_mode <- as.character(chart_x_axis_title_mode) + } + named_list_value <- unname(named_list[chart_x_axis_title_mode])[[1]] + new_list$x$state$x$title_mode <- named_list_value + } + } + } + } + new_list$x$state$x$title <- chart_x_axis_title + new_list$x$state$x$title_styling <- chart_x_axis_title_styling + list_chart_x_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_title_weight)) { + if (!chart_x_axis_title_weight %in% list_chart_x_axis_title_weight) { + stop("`chart_x_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_title_weight)) { + chart_x_axis_title_weight <- as.character(chart_x_axis_title_weight) + } + named_list_value <- unname(named_list[chart_x_axis_title_weight])[[1]] + new_list$x$state$x$title_weight <- named_list_value + } + } + } + } + new_list$x$state$x$title_color <- chart_x_axis_title_color + new_list$x$state$x$title_size <- chart_x_axis_title_size + new_list$x$state$x$title_padding <- chart_x_axis_title_padding + list_chart_x_axis_tick_label_position <- c("default", "left", "right", NULL) + if (!is.null(chart_x_axis_tick_label_position)) { + if (!chart_x_axis_tick_label_position %in% list_chart_x_axis_tick_label_position) { + stop("`chart_x_axis_tick_label_position` must be one of: c('default', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_position)) { + chart_x_axis_tick_label_position <- as.character(chart_x_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_position])[[1]] + new_list$x$state$x$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_styling <- chart_x_axis_tick_label_styling + new_list$x$state$x$tick_label_size <- chart_x_axis_tick_label_size + new_list$x$state$x$tick_label_color <- chart_x_axis_tick_label_color + new_list$x$state$x$tick_padding <- chart_x_axis_tick_padding + list_chart_x_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_x_axis_tick_label_angle)) { + if (!chart_x_axis_tick_label_angle %in% list_chart_x_axis_tick_label_angle) { + stop("`chart_x_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_angle)) { + chart_x_axis_tick_label_angle <- as.character(chart_x_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_angle])[[1]] + new_list$x$state$x$tick_label_angle <- named_list_value + } + } + } + } + list_chart_x_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_tick_label_weight)) { + if (!chart_x_axis_tick_label_weight %in% list_chart_x_axis_tick_label_weight) { + stop("`chart_x_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_weight)) { + chart_x_axis_tick_label_weight <- as.character(chart_x_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_weight])[[1]] + new_list$x$state$x$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_max_lines <- chart_x_axis_tick_label_max_lines + new_list$x$state$x$tick_label_line_height <- chart_x_axis_tick_label_line_height + list_chart_x_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_x_axis_tick_label_space_mode)) { + if (!chart_x_axis_tick_label_space_mode %in% list_chart_x_axis_tick_label_space_mode) { + stop("`chart_x_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_space_mode)) { + chart_x_axis_tick_label_space_mode <- as.character(chart_x_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_space_mode])[[1]] + new_list$x$state$x$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_space <- chart_x_axis_tick_label_space + list_chart_x_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_x_axis_tick_mode)) { + if (!chart_x_axis_tick_mode %in% list_chart_x_axis_tick_mode) { + stop("`chart_x_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_mode)) { + chart_x_axis_tick_mode <- as.character(chart_x_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_mode])[[1]] + new_list$x$state$x$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_number <- chart_x_axis_tick_number + if (length(chart_x_axis_tick_custom) > 1) { + new_list$x$state$x$tick_custom <- paste(chart_x_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$x$tick_custom <- chart_x_axis_tick_custom + } + + new_list$x$state$x$line_and_tick_color <- chart_x_axis_line_and_tick_color + new_list$x$state$x$line_and_tick_width <- chart_x_axis_line_and_tick_width + new_list$x$state$x$tick_length <- chart_x_axis_tick_length + list_chart_x_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_x_axis_tick_side)) { + if (!chart_x_axis_tick_side %in% list_chart_x_axis_tick_side) { + stop("`chart_x_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_side)) { + chart_x_axis_tick_side <- as.character(chart_x_axis_tick_side) + } + named_list_value <- unname(named_list[chart_x_axis_tick_side])[[1]] + new_list$x$state$x$tick_side <- named_list_value + } + } + } + } + new_list$x$state$x$line_visible <- chart_x_axis_line_visible + new_list$x$state$x$edge_padding <- chart_x_axis_edge_padding + list_chart_x_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_gridlines_visible)) { + if (!chart_x_axis_gridlines_visible %in% list_chart_x_axis_gridlines_visible) { + stop("`chart_x_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_x_axis_gridlines_visible)) { + chart_x_axis_gridlines_visible <- as.character(chart_x_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_x_axis_gridlines_visible])[[1]] + new_list$x$state$x$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$x$gridlines_styling <- chart_x_axis_gridlines_styling + new_list$x$state$x$gridline_color <- chart_x_axis_gridline_color + list_chart_x_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_x_axis_gridline_style)) { + if (!chart_x_axis_gridline_style %in% list_chart_x_axis_gridline_style) { + stop("`chart_x_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_x_axis_gridline_style)) { + chart_x_axis_gridline_style <- as.character(chart_x_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_x_axis_gridline_style])[[1]] + new_list$x$state$x$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$x$gridline_width <- chart_x_axis_gridline_width + new_list$x$state$x$gridline_category_dividers <- chart_x_axis_gridline_category_dividers + new_list$x$state$x$gridline_category_dividers_extend <- chart_x_axis_gridline_category_dividers_extend + list_chart_y_axis_axis_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_axis_visible)) { + if (!chart_y_axis_axis_visible %in% list_chart_y_axis_axis_visible) { + stop("`chart_y_axis_axis_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_axis_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_axis_visible)) { + chart_y_axis_axis_visible <- as.character(chart_y_axis_axis_visible) + } + named_list_value <- unname(named_list[chart_y_axis_axis_visible])[[1]] + new_list$x$state$y$axis_visible <- named_list_value + } + } + } + } + list_chart_y_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_y_axis_numeric_scale_type)) { + if (!chart_y_axis_numeric_scale_type %in% list_chart_y_axis_numeric_scale_type) { + stop("`chart_y_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_y_axis_numeric_scale_type)) { + chart_y_axis_numeric_scale_type <- as.character(chart_y_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_y_axis_numeric_scale_type])[[1]] + new_list$x$state$y$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$y$linear_min <- chart_y_axis_linear_min + new_list$x$state$y$linear_max <- chart_y_axis_linear_max + new_list$x$state$y$log_min <- chart_y_axis_log_min + new_list$x$state$y$log_max <- chart_y_axis_log_max + new_list$x$state$y$datetime_min <- chart_y_axis_datetime_min + new_list$x$state$y$datetime_max <- chart_y_axis_datetime_max + new_list$x$state$y$flip <- chart_y_axis_flip + new_list$x$state$y$show_scale_settings <- chart_y_axis_show_scale_settings + list_chart_y_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_nice)) { + if (!chart_y_axis_nice %in% list_chart_y_axis_nice) { + stop("`chart_y_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_nice %in% names(named_list)) { + if (is.logical(chart_y_axis_nice)) { + chart_y_axis_nice <- as.character(chart_y_axis_nice) + } + named_list_value <- unname(named_list[chart_y_axis_nice])[[1]] + new_list$x$state$y$nice <- named_list_value + } + } + } + } + list_chart_y_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_y_axis_zero_axis)) { + if (!chart_y_axis_zero_axis %in% list_chart_y_axis_zero_axis) { + stop("`chart_y_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_y_axis_zero_axis)) { + chart_y_axis_zero_axis <- as.character(chart_y_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_y_axis_zero_axis])[[1]] + new_list$x$state$y$zero_axis <- named_list_value + } + } + } + } + list_chart_y_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_y_axis_title_mode)) { + if (!chart_y_axis_title_mode %in% list_chart_y_axis_title_mode) { + stop("`chart_y_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_title_mode)) { + chart_y_axis_title_mode <- as.character(chart_y_axis_title_mode) + } + named_list_value <- unname(named_list[chart_y_axis_title_mode])[[1]] + new_list$x$state$y$title_mode <- named_list_value + } + } + } + } + new_list$x$state$y$title <- chart_y_axis_title + new_list$x$state$y$title_styling <- chart_y_axis_title_styling + list_chart_y_axis_title_position <- c("side", "end", NULL) + if (!is.null(chart_y_axis_title_position)) { + if (!chart_y_axis_title_position %in% list_chart_y_axis_title_position) { + stop("`chart_y_axis_title_position` must be one of: c('side', 'end')") + } else { + if (length(jsonlite::fromJSON('{"side": "side", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"side": "side", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_position %in% names(named_list)) { + if (is.logical(chart_y_axis_title_position)) { + chart_y_axis_title_position <- as.character(chart_y_axis_title_position) + } + named_list_value <- unname(named_list[chart_y_axis_title_position])[[1]] + new_list$x$state$y$title_position <- named_list_value + } + } + } + } + list_chart_y_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_title_weight)) { + if (!chart_y_axis_title_weight %in% list_chart_y_axis_title_weight) { + stop("`chart_y_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_title_weight)) { + chart_y_axis_title_weight <- as.character(chart_y_axis_title_weight) + } + named_list_value <- unname(named_list[chart_y_axis_title_weight])[[1]] + new_list$x$state$y$title_weight <- named_list_value + } + } + } + } + new_list$x$state$y$title_color <- chart_y_axis_title_color + new_list$x$state$y$title_size <- chart_y_axis_title_size + new_list$x$state$y$title_padding <- chart_y_axis_title_padding + list_chart_y_axis_tick_label_position <- c("default", "above", "below", NULL) + if (!is.null(chart_y_axis_tick_label_position)) { + if (!chart_y_axis_tick_label_position %in% list_chart_y_axis_tick_label_position) { + stop("`chart_y_axis_tick_label_position` must be one of: c('default', 'above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_position)) { + chart_y_axis_tick_label_position <- as.character(chart_y_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_position])[[1]] + new_list$x$state$y$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_styling <- chart_y_axis_tick_label_styling + new_list$x$state$y$tick_label_size <- chart_y_axis_tick_label_size + new_list$x$state$y$tick_label_color <- chart_y_axis_tick_label_color + new_list$x$state$y$tick_padding <- chart_y_axis_tick_padding + list_chart_y_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_y_axis_tick_label_angle)) { + if (!chart_y_axis_tick_label_angle %in% list_chart_y_axis_tick_label_angle) { + stop("`chart_y_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_angle)) { + chart_y_axis_tick_label_angle <- as.character(chart_y_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_angle])[[1]] + new_list$x$state$y$tick_label_angle <- named_list_value + } + } + } + } + list_chart_y_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_tick_label_weight)) { + if (!chart_y_axis_tick_label_weight %in% list_chart_y_axis_tick_label_weight) { + stop("`chart_y_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_weight)) { + chart_y_axis_tick_label_weight <- as.character(chart_y_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_weight])[[1]] + new_list$x$state$y$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_max_lines <- chart_y_axis_tick_label_max_lines + new_list$x$state$y$tick_label_line_height <- chart_y_axis_tick_label_line_height + list_chart_y_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_y_axis_tick_label_space_mode)) { + if (!chart_y_axis_tick_label_space_mode %in% list_chart_y_axis_tick_label_space_mode) { + stop("`chart_y_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_space_mode)) { + chart_y_axis_tick_label_space_mode <- as.character(chart_y_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_space_mode])[[1]] + new_list$x$state$y$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_space <- chart_y_axis_tick_label_space + list_chart_y_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_y_axis_tick_mode)) { + if (!chart_y_axis_tick_mode %in% list_chart_y_axis_tick_mode) { + stop("`chart_y_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_mode)) { + chart_y_axis_tick_mode <- as.character(chart_y_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_mode])[[1]] + new_list$x$state$y$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_number <- chart_y_axis_tick_number + if (length(chart_y_axis_tick_custom) > 1) { + new_list$x$state$y$tick_custom <- paste(chart_y_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$y$tick_custom <- chart_y_axis_tick_custom + } + + new_list$x$state$y$line_and_tick_color <- chart_y_axis_line_and_tick_color + new_list$x$state$y$line_and_tick_width <- chart_y_axis_line_and_tick_width + new_list$x$state$y$tick_length <- chart_y_axis_tick_length + list_chart_y_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_y_axis_tick_side)) { + if (!chart_y_axis_tick_side %in% list_chart_y_axis_tick_side) { + stop("`chart_y_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_side)) { + chart_y_axis_tick_side <- as.character(chart_y_axis_tick_side) + } + named_list_value <- unname(named_list[chart_y_axis_tick_side])[[1]] + new_list$x$state$y$tick_side <- named_list_value + } + } + } + } + new_list$x$state$y$line_visible <- chart_y_axis_line_visible + new_list$x$state$y$edge_padding <- chart_y_axis_edge_padding + list_chart_y_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_gridlines_visible)) { + if (!chart_y_axis_gridlines_visible %in% list_chart_y_axis_gridlines_visible) { + stop("`chart_y_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_gridlines_visible)) { + chart_y_axis_gridlines_visible <- as.character(chart_y_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_y_axis_gridlines_visible])[[1]] + new_list$x$state$y$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$y$gridlines_styling <- chart_y_axis_gridlines_styling + new_list$x$state$y$gridline_color <- chart_y_axis_gridline_color + list_chart_y_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_y_axis_gridline_style)) { + if (!chart_y_axis_gridline_style %in% list_chart_y_axis_gridline_style) { + stop("`chart_y_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_y_axis_gridline_style)) { + chart_y_axis_gridline_style <- as.character(chart_y_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_y_axis_gridline_style])[[1]] + new_list$x$state$y$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$y$gridline_width <- chart_y_axis_gridline_width + new_list$x$state$y$gridline_category_dividers <- chart_y_axis_gridline_category_dividers + new_list$x$state$y$gridline_category_dividers_extend <- chart_y_axis_gridline_category_dividers_extend + list_chart_secondary_y_axis_axis_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_secondary_y_axis_axis_visible)) { + if (!chart_secondary_y_axis_axis_visible %in% list_chart_secondary_y_axis_axis_visible) { + stop("`chart_secondary_y_axis_axis_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_axis_visible %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_axis_visible)) { + chart_secondary_y_axis_axis_visible <- as.character(chart_secondary_y_axis_axis_visible) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_axis_visible])[[1]] + new_list$x$state$y2$axis_visible <- named_list_value + } + } + } + } + list_chart_secondary_y_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_secondary_y_axis_numeric_scale_type)) { + if (!chart_secondary_y_axis_numeric_scale_type %in% list_chart_secondary_y_axis_numeric_scale_type) { + stop("`chart_secondary_y_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_numeric_scale_type)) { + chart_secondary_y_axis_numeric_scale_type <- as.character(chart_secondary_y_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_numeric_scale_type])[[1]] + new_list$x$state$y2$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$y2$linear_min <- chart_secondary_y_axis_linear_min + new_list$x$state$y2$linear_max <- chart_secondary_y_axis_linear_max + new_list$x$state$y2$log_min <- chart_secondary_y_axis_log_min + new_list$x$state$y2$log_max <- chart_secondary_y_axis_log_max + new_list$x$state$y2$datetime_min <- chart_secondary_y_axis_datetime_min + new_list$x$state$y2$datetime_max <- chart_secondary_y_axis_datetime_max + new_list$x$state$y2$flip <- chart_secondary_y_axis_flip + new_list$x$state$y2$show_scale_settings <- chart_secondary_y_axis_show_scale_settings + list_chart_secondary_y_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_secondary_y_axis_nice)) { + if (!chart_secondary_y_axis_nice %in% list_chart_secondary_y_axis_nice) { + stop("`chart_secondary_y_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_nice %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_nice)) { + chart_secondary_y_axis_nice <- as.character(chart_secondary_y_axis_nice) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_nice])[[1]] + new_list$x$state$y2$nice <- named_list_value + } + } + } + } + list_chart_secondary_y_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_secondary_y_axis_zero_axis)) { + if (!chart_secondary_y_axis_zero_axis %in% list_chart_secondary_y_axis_zero_axis) { + stop("`chart_secondary_y_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_zero_axis)) { + chart_secondary_y_axis_zero_axis <- as.character(chart_secondary_y_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_zero_axis])[[1]] + new_list$x$state$y2$zero_axis <- named_list_value + } + } + } + } + list_chart_secondary_y_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_secondary_y_axis_title_mode)) { + if (!chart_secondary_y_axis_title_mode %in% list_chart_secondary_y_axis_title_mode) { + stop("`chart_secondary_y_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_title_mode)) { + chart_secondary_y_axis_title_mode <- as.character(chart_secondary_y_axis_title_mode) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_title_mode])[[1]] + new_list$x$state$y2$title_mode <- named_list_value + } + } + } + } + new_list$x$state$y2$title <- chart_secondary_y_axis_title + new_list$x$state$y2$title_styling <- chart_secondary_y_axis_title_styling + list_chart_secondary_y_axis_title_position <- c("side", "end", NULL) + if (!is.null(chart_secondary_y_axis_title_position)) { + if (!chart_secondary_y_axis_title_position %in% list_chart_secondary_y_axis_title_position) { + stop("`chart_secondary_y_axis_title_position` must be one of: c('side', 'end')") + } else { + if (length(jsonlite::fromJSON('{"side": "side", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"side": "side", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_title_position %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_title_position)) { + chart_secondary_y_axis_title_position <- as.character(chart_secondary_y_axis_title_position) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_title_position])[[1]] + new_list$x$state$y2$title_position <- named_list_value + } + } + } + } + list_chart_secondary_y_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_secondary_y_axis_title_weight)) { + if (!chart_secondary_y_axis_title_weight %in% list_chart_secondary_y_axis_title_weight) { + stop("`chart_secondary_y_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_title_weight)) { + chart_secondary_y_axis_title_weight <- as.character(chart_secondary_y_axis_title_weight) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_title_weight])[[1]] + new_list$x$state$y2$title_weight <- named_list_value + } + } + } + } + new_list$x$state$y2$title_color <- chart_secondary_y_axis_title_color + new_list$x$state$y2$title_size <- chart_secondary_y_axis_title_size + new_list$x$state$y2$title_padding <- chart_secondary_y_axis_title_padding + list_chart_secondary_y_axis_tick_label_position <- c("default", "above", "below", NULL) + if (!is.null(chart_secondary_y_axis_tick_label_position)) { + if (!chart_secondary_y_axis_tick_label_position %in% list_chart_secondary_y_axis_tick_label_position) { + stop("`chart_secondary_y_axis_tick_label_position` must be one of: c('default', 'above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_tick_label_position)) { + chart_secondary_y_axis_tick_label_position <- as.character(chart_secondary_y_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_tick_label_position])[[1]] + new_list$x$state$y2$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$y2$tick_label_styling <- chart_secondary_y_axis_tick_label_styling + new_list$x$state$y2$tick_label_size <- chart_secondary_y_axis_tick_label_size + new_list$x$state$y2$tick_label_color <- chart_secondary_y_axis_tick_label_color + new_list$x$state$y2$tick_padding <- chart_secondary_y_axis_tick_padding + list_chart_secondary_y_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_secondary_y_axis_tick_label_angle)) { + if (!chart_secondary_y_axis_tick_label_angle %in% list_chart_secondary_y_axis_tick_label_angle) { + stop("`chart_secondary_y_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_tick_label_angle)) { + chart_secondary_y_axis_tick_label_angle <- as.character(chart_secondary_y_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_tick_label_angle])[[1]] + new_list$x$state$y2$tick_label_angle <- named_list_value + } + } + } + } + list_chart_secondary_y_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_secondary_y_axis_tick_label_weight)) { + if (!chart_secondary_y_axis_tick_label_weight %in% list_chart_secondary_y_axis_tick_label_weight) { + stop("`chart_secondary_y_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_tick_label_weight)) { + chart_secondary_y_axis_tick_label_weight <- as.character(chart_secondary_y_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_tick_label_weight])[[1]] + new_list$x$state$y2$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$y2$tick_label_max_lines <- chart_secondary_y_axis_tick_label_max_lines + new_list$x$state$y2$tick_label_line_height <- chart_secondary_y_axis_tick_label_line_height + list_chart_secondary_y_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_secondary_y_axis_tick_label_space_mode)) { + if (!chart_secondary_y_axis_tick_label_space_mode %in% list_chart_secondary_y_axis_tick_label_space_mode) { + stop("`chart_secondary_y_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_tick_label_space_mode)) { + chart_secondary_y_axis_tick_label_space_mode <- as.character(chart_secondary_y_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_tick_label_space_mode])[[1]] + new_list$x$state$y2$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$y2$tick_label_space <- chart_secondary_y_axis_tick_label_space + list_chart_secondary_y_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_secondary_y_axis_tick_mode)) { + if (!chart_secondary_y_axis_tick_mode %in% list_chart_secondary_y_axis_tick_mode) { + stop("`chart_secondary_y_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_tick_mode)) { + chart_secondary_y_axis_tick_mode <- as.character(chart_secondary_y_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_tick_mode])[[1]] + new_list$x$state$y2$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$y2$tick_number <- chart_secondary_y_axis_tick_number + if (length(chart_secondary_y_axis_tick_custom) > 1) { + new_list$x$state$y2$tick_custom <- paste(chart_secondary_y_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$y2$tick_custom <- chart_secondary_y_axis_tick_custom + } + + new_list$x$state$y2$line_and_tick_color <- chart_secondary_y_axis_line_and_tick_color + new_list$x$state$y2$line_and_tick_width <- chart_secondary_y_axis_line_and_tick_width + new_list$x$state$y2$tick_length <- chart_secondary_y_axis_tick_length + list_chart_secondary_y_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_secondary_y_axis_tick_side)) { + if (!chart_secondary_y_axis_tick_side %in% list_chart_secondary_y_axis_tick_side) { + stop("`chart_secondary_y_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_tick_side)) { + chart_secondary_y_axis_tick_side <- as.character(chart_secondary_y_axis_tick_side) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_tick_side])[[1]] + new_list$x$state$y2$tick_side <- named_list_value + } + } + } + } + new_list$x$state$y2$line_visible <- chart_secondary_y_axis_line_visible + new_list$x$state$y2$edge_padding <- chart_secondary_y_axis_edge_padding + list_chart_secondary_y_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_secondary_y_axis_gridlines_visible)) { + if (!chart_secondary_y_axis_gridlines_visible %in% list_chart_secondary_y_axis_gridlines_visible) { + stop("`chart_secondary_y_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_gridlines_visible)) { + chart_secondary_y_axis_gridlines_visible <- as.character(chart_secondary_y_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_gridlines_visible])[[1]] + new_list$x$state$y2$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$y2$gridlines_styling <- chart_secondary_y_axis_gridlines_styling + new_list$x$state$y2$gridline_color <- chart_secondary_y_axis_gridline_color + list_chart_secondary_y_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_secondary_y_axis_gridline_style)) { + if (!chart_secondary_y_axis_gridline_style %in% list_chart_secondary_y_axis_gridline_style) { + stop("`chart_secondary_y_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_y_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_secondary_y_axis_gridline_style)) { + chart_secondary_y_axis_gridline_style <- as.character(chart_secondary_y_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_secondary_y_axis_gridline_style])[[1]] + new_list$x$state$y2$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$y2$gridline_width <- chart_secondary_y_axis_gridline_width + new_list$x$state$y2$gridline_category_dividers <- chart_secondary_y_axis_gridline_category_dividers + new_list$x$state$y2$gridline_category_dividers_extend <- chart_secondary_y_axis_gridline_category_dividers_extend + list_chart_background_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_background_background_color_enabled)) { + if (!chart_background_background_color_enabled %in% list_chart_background_background_color_enabled) { + stop("`chart_background_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_background_background_color_enabled)) { + chart_background_background_color_enabled <- as.character(chart_background_background_color_enabled) + } + named_list_value <- unname(named_list[chart_background_background_color_enabled])[[1]] + new_list$x$state$chart_bg$background_color_enabled <- named_list_value + } + } + } + } + list_chart_background_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_background_background_image_enabled)) { + if (!chart_background_background_image_enabled %in% list_chart_background_background_image_enabled) { + stop("`chart_background_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_background_background_image_enabled)) { + chart_background_background_image_enabled <- as.character(chart_background_background_image_enabled) + } + named_list_value <- unname(named_list[chart_background_background_image_enabled])[[1]] + new_list$x$state$chart_bg$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$chart_bg$background_color <- chart_background_background_color + new_list$x$state$chart_bg$background_image_src <- chart_background_background_image_src + list_chart_background_background_image_size <- c("stretch", "slice", "meet", NULL) + if (!is.null(chart_background_background_image_size)) { + if (!chart_background_background_image_size %in% list_chart_background_background_image_size) { + stop("`chart_background_background_image_size` must be one of: c('stretch', 'slice', 'meet')") + } else { + if (length(jsonlite::fromJSON('{"stretch": "stretch", "slice": "slice", "meet": "meet"}')) > 1) { + named_list <- jsonlite::fromJSON('{"stretch": "stretch", "slice": "slice", "meet": "meet"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_size %in% names(named_list)) { + if (is.logical(chart_background_background_image_size)) { + chart_background_background_image_size <- as.character(chart_background_background_image_size) + } + named_list_value <- unname(named_list[chart_background_background_image_size])[[1]] + new_list$x$state$chart_bg$background_image_size <- named_list_value + } + } + } + } + list_chart_background_background_image_position <- c("x_min_y_min", "x_mid_y_min", "x_max_y_min", "x_max_y_mid", "x_mid_y_mid", "x_min_y_max", "x_mid_y_max", "x_max_y_max", NULL) + if (!is.null(chart_background_background_image_position)) { + if (!chart_background_background_image_position %in% list_chart_background_background_image_position) { + stop("`chart_background_background_image_position` must be one of: c('x_min_y_min', 'x_mid_y_min', 'x_max_y_min', 'x_max_y_mid', 'x_mid_y_mid', 'x_min_y_max', 'x_mid_y_max', 'x_max_y_max')") + } else { + if (length(jsonlite::fromJSON('{"x_min_y_min": "xMinYMin", "x_mid_y_min": "xMidYMin", "x_max_y_min": "xMaxYMin", "x_max_y_mid": "xMaxYMid", "x_mid_y_mid": "xMidYMid", "x_min_y_max": "xMinYMax", "x_mid_y_max": "xMidYMax", "x_max_y_max": "xMaxYMax"}')) > 1) { + named_list <- jsonlite::fromJSON('{"x_min_y_min": "xMinYMin", "x_mid_y_min": "xMidYMin", "x_max_y_min": "xMaxYMin", "x_max_y_mid": "xMaxYMid", "x_mid_y_mid": "xMidYMid", "x_min_y_max": "xMinYMax", "x_mid_y_max": "xMidYMax", "x_max_y_max": "xMaxYMax"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_position %in% names(named_list)) { + if (is.logical(chart_background_background_image_position)) { + chart_background_background_image_position <- as.character(chart_background_background_image_position) + } + named_list_value <- unname(named_list[chart_background_background_image_position])[[1]] + new_list$x$state$chart_bg$background_image_position <- named_list_value + } + } + } + } + new_list$x$state$number_format_labels$prefix <- number_format_labels_prefix + new_list$x$state$number_format_labels$suffix <- number_format_labels_suffix + new_list$x$state$number_format_labels$n_dec <- number_format_labels_n_dec + new_list$x$state$number_format_labels$advanced <- number_format_labels_advanced + list_number_format_labels_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(number_format_labels_negative_sign)) { + if (!number_format_labels_negative_sign %in% list_number_format_labels_negative_sign) { + stop("`number_format_labels_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && number_format_labels_negative_sign %in% names(named_list)) { + if (is.logical(number_format_labels_negative_sign)) { + number_format_labels_negative_sign <- as.character(number_format_labels_negative_sign) + } + named_list_value <- unname(named_list[number_format_labels_negative_sign])[[1]] + new_list$x$state$number_format_labels$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$number_format_labels$strip_zeros <- number_format_labels_strip_zeros + new_list$x$state$number_format_labels$strip_separator <- number_format_labels_strip_separator + new_list$x$state$number_format_labels$transform_labels <- number_format_labels_transform_labels + list_number_format_labels_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(number_format_labels_transform)) { + if (!number_format_labels_transform %in% list_number_format_labels_transform) { + stop("`number_format_labels_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && number_format_labels_transform %in% names(named_list)) { + if (is.logical(number_format_labels_transform)) { + number_format_labels_transform <- as.character(number_format_labels_transform) + } + named_list_value <- unname(named_list[number_format_labels_transform])[[1]] + new_list$x$state$number_format_labels$transform <- named_list_value + } + } + } + } + new_list$x$state$number_format_labels$multiply_divide_constant <- number_format_labels_multiply_divide_constant + new_list$x$state$number_format_labels$exponentiate_constant <- number_format_labels_exponentiate_constant + new_list$x$state$number_format$prefix <- chart_number_date_format_prefix + new_list$x$state$number_format$suffix <- chart_number_date_format_suffix + new_list$x$state$number_format$n_dec <- chart_number_date_format_n_dec + new_list$x$state$number_format$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$number_format$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$number_format$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$number_format$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$number_format$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$number_format$transform <- named_list_value + } + } + } + } + new_list$x$state$number_format$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$number_format$exponentiate_constant <- chart_number_date_format_exponentiate_constant + new_list$x$state$number_format_prop <- number_format_prop + new_list$x$state$number_format_secondary$prefix <- chart_secondary_number_date_format_prefix + new_list$x$state$number_format_secondary$suffix <- chart_secondary_number_date_format_suffix + new_list$x$state$number_format_secondary$n_dec <- chart_secondary_number_date_format_n_dec + new_list$x$state$number_format_secondary$advanced <- chart_secondary_number_date_format_advanced + list_chart_secondary_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_secondary_number_date_format_negative_sign)) { + if (!chart_secondary_number_date_format_negative_sign %in% list_chart_secondary_number_date_format_negative_sign) { + stop("`chart_secondary_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_secondary_number_date_format_negative_sign)) { + chart_secondary_number_date_format_negative_sign <- as.character(chart_secondary_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_secondary_number_date_format_negative_sign])[[1]] + new_list$x$state$number_format_secondary$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$number_format_secondary$strip_zeros <- chart_secondary_number_date_format_strip_zeros + new_list$x$state$number_format_secondary$strip_separator <- chart_secondary_number_date_format_strip_separator + new_list$x$state$number_format_secondary$transform_labels <- chart_secondary_number_date_format_transform_labels + list_chart_secondary_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_secondary_number_date_format_transform)) { + if (!chart_secondary_number_date_format_transform %in% list_chart_secondary_number_date_format_transform) { + stop("`chart_secondary_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_secondary_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_secondary_number_date_format_transform)) { + chart_secondary_number_date_format_transform <- as.character(chart_secondary_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_secondary_number_date_format_transform])[[1]] + new_list$x$state$number_format_secondary$transform <- named_list_value + } + } + } + } + new_list$x$state$number_format_secondary$multiply_divide_constant <- chart_secondary_number_date_format_multiply_divide_constant + new_list$x$state$number_format_secondary$exponentiate_constant <- chart_secondary_number_date_format_exponentiate_constant + list_legend_mode <- c("auto", "on", "off", NULL) + if (!is.null(legend_mode)) { + if (!legend_mode %in% list_legend_mode) { + stop("`legend_mode` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_mode %in% names(named_list)) { + if (is.logical(legend_mode)) { + legend_mode <- as.character(legend_mode) + } + named_list_value <- unname(named_list[legend_mode])[[1]] + new_list$x$state$legend_mode <- named_list_value + } + } + } + } + list_legend_filter_mode <- c("none", "filter-in", "filter-out", NULL) + if (!is.null(legend_filter_mode)) { + if (!legend_filter_mode %in% list_legend_filter_mode) { + stop("`legend_filter_mode` must be one of: c('none', 'filter-in', 'filter-out')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "filter-in": "filter-in", "filter-out": "filter-out"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "filter-in": "filter-in", "filter-out": "filter-out"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_filter_mode %in% names(named_list)) { + if (is.logical(legend_filter_mode)) { + legend_filter_mode <- as.character(legend_filter_mode) + } + named_list_value <- unname(named_list[legend_filter_mode])[[1]] + new_list$x$state$legend_filter_mode <- named_list_value + } + } + } + } + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_legend_position <- c("above", "below", NULL) + if (!is.null(legend_position)) { + if (!legend_position %in% list_legend_position) { + stop("`legend_position` must be one of: c('above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_position %in% names(named_list)) { + if (is.logical(legend_position)) { + legend_position <- as.character(legend_position) + } + named_list_value <- unname(named_list[legend_position])[[1]] + new_list$x$state$legend_position <- named_list_value + } + } + } + } + list_text_legend <- c("auto", "custom", "off", NULL) + if (!is.null(text_legend)) { + if (!text_legend %in% list_text_legend) { + stop("`text_legend` must be one of: c('auto', 'custom', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && text_legend %in% names(named_list)) { + if (is.logical(text_legend)) { + text_legend <- as.character(text_legend) + } + named_list_value <- unname(named_list[text_legend])[[1]] + new_list$x$state$text_legend <- named_list_value + } + } + } + } + new_list$x$state$text_legend_title <- text_legend_title + new_list$x$state$text_legend_subtitle <- text_legend_subtitle + new_list$x$state$text_legend_bold <- text_legend_bold + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + new_list$x$state$popup_color_headers <- popup_color_headers + new_list$x$state$show_series_text <- show_series_text + if (length(popup_series_text) > 1) { + new_list$x$state$popup_series_text <- paste(popup_series_text, collapse = "\n") + } else { + new_list$x$state$popup_series_text <- popup_series_text + } + + list_chart_axes_highlights_placement <- c("above", "below", NULL) + if (!is.null(chart_axes_highlights_placement)) { + if (!chart_axes_highlights_placement %in% list_chart_axes_highlights_placement) { + stop("`chart_axes_highlights_placement` must be one of: c('above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_placement %in% names(named_list)) { + if (is.logical(chart_axes_highlights_placement)) { + chart_axes_highlights_placement <- as.character(chart_axes_highlights_placement) + } + named_list_value <- unname(named_list[chart_axes_highlights_placement])[[1]] + new_list$x$state$axes_highlights$placement <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_enabled <- chart_axes_highlights_x_enabled + if (length(chart_axes_highlights_x_lines) > 1) { + new_list$x$state$axes_highlights$x_lines <- paste(chart_axes_highlights_x_lines, collapse = "\n") + } else { + new_list$x$state$axes_highlights$x_lines <- chart_axes_highlights_x_lines + } + + new_list$x$state$axes_highlights$x_line_color <- chart_axes_highlights_x_line_color + new_list$x$state$axes_highlights$x_line_width <- chart_axes_highlights_x_line_width + new_list$x$state$axes_highlights$x_line_dash <- chart_axes_highlights_x_line_dash + if (length(chart_axes_highlights_x_areas) > 1) { + new_list$x$state$axes_highlights$x_areas <- paste(chart_axes_highlights_x_areas, collapse = "\n") + } else { + new_list$x$state$axes_highlights$x_areas <- chart_axes_highlights_x_areas + } + + new_list$x$state$axes_highlights$x_area_color <- chart_axes_highlights_x_area_color + new_list$x$state$axes_highlights$x_area_opacity <- chart_axes_highlights_x_area_opacity + list_chart_axes_highlights_x_area_texture <- c("none", "pattern-diagonal", "pattern-grid", "pattern-dots", NULL) + if (!is.null(chart_axes_highlights_x_area_texture)) { + if (!chart_axes_highlights_x_area_texture %in% list_chart_axes_highlights_x_area_texture) { + stop("`chart_axes_highlights_x_area_texture` must be one of: c('none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_area_texture %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_area_texture)) { + chart_axes_highlights_x_area_texture <- as.character(chart_axes_highlights_x_area_texture) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_area_texture])[[1]] + new_list$x$state$axes_highlights$x_area_texture <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_vertical <- chart_axes_highlights_x_label_vertical + list_chart_axes_highlights_x_label_y_position <- c("bottom", "middle", "top", NULL) + if (!is.null(chart_axes_highlights_x_label_y_position)) { + if (!chart_axes_highlights_x_label_y_position %in% list_chart_axes_highlights_x_label_y_position) { + stop("`chart_axes_highlights_x_label_y_position` must be one of: c('bottom', 'middle', 'top')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "middle": "middle", "top": "top"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "middle": "middle", "top": "top"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_label_y_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_label_y_position)) { + chart_axes_highlights_x_label_y_position <- as.character(chart_axes_highlights_x_label_y_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_label_y_position])[[1]] + new_list$x$state$axes_highlights$x_label_y_position <- named_list_value + } + } + } + } + list_chart_axes_highlights_x_label_x_position <- c("left", "middle", "right", NULL) + if (!is.null(chart_axes_highlights_x_label_x_position)) { + if (!chart_axes_highlights_x_label_x_position %in% list_chart_axes_highlights_x_label_x_position) { + stop("`chart_axes_highlights_x_label_x_position` must be one of: c('left', 'middle', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_label_x_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_label_x_position)) { + chart_axes_highlights_x_label_x_position <- as.character(chart_axes_highlights_x_label_x_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_label_x_position])[[1]] + new_list$x$state$axes_highlights$x_label_x_position <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_max_width <- chart_axes_highlights_x_label_max_width + new_list$x$state$axes_highlights$x_font_size <- chart_axes_highlights_x_font_size + list_chart_axes_highlights_x_font_weight <- c("regular", "bold", NULL) + if (!is.null(chart_axes_highlights_x_font_weight)) { + if (!chart_axes_highlights_x_font_weight %in% list_chart_axes_highlights_x_font_weight) { + stop("`chart_axes_highlights_x_font_weight` must be one of: c('regular', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_font_weight %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_font_weight)) { + chart_axes_highlights_x_font_weight <- as.character(chart_axes_highlights_x_font_weight) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_font_weight])[[1]] + new_list$x$state$axes_highlights$x_font_weight <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_color <- chart_axes_highlights_x_label_color + new_list$x$state$axes_highlights$x_shadow_color <- chart_axes_highlights_x_shadow_color + new_list$x$state$axes_highlights$x_shadow_enabled <- chart_axes_highlights_x_shadow_enabled + new_list$x$state$axes_highlights$y_enabled <- chart_axes_highlights_y_enabled + if (length(chart_axes_highlights_y_lines) > 1) { + new_list$x$state$axes_highlights$y_lines <- paste(chart_axes_highlights_y_lines, collapse = "\n") + } else { + new_list$x$state$axes_highlights$y_lines <- chart_axes_highlights_y_lines + } + + new_list$x$state$axes_highlights$y_line_color <- chart_axes_highlights_y_line_color + new_list$x$state$axes_highlights$y_line_width <- chart_axes_highlights_y_line_width + new_list$x$state$axes_highlights$y_line_dash <- chart_axes_highlights_y_line_dash + if (length(chart_axes_highlights_y_areas) > 1) { + new_list$x$state$axes_highlights$y_areas <- paste(chart_axes_highlights_y_areas, collapse = "\n") + } else { + new_list$x$state$axes_highlights$y_areas <- chart_axes_highlights_y_areas + } + + new_list$x$state$axes_highlights$y_area_color <- chart_axes_highlights_y_area_color + new_list$x$state$axes_highlights$y_area_opacity <- chart_axes_highlights_y_area_opacity + list_chart_axes_highlights_y_area_texture <- c("none", "pattern-diagonal", "pattern-grid", "pattern-dots", NULL) + if (!is.null(chart_axes_highlights_y_area_texture)) { + if (!chart_axes_highlights_y_area_texture %in% list_chart_axes_highlights_y_area_texture) { + stop("`chart_axes_highlights_y_area_texture` must be one of: c('none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_area_texture %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_area_texture)) { + chart_axes_highlights_y_area_texture <- as.character(chart_axes_highlights_y_area_texture) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_area_texture])[[1]] + new_list$x$state$axes_highlights$y_area_texture <- named_list_value + } + } + } + } + list_chart_axes_highlights_y_label_x_position <- c("left", "middle", "right", NULL) + if (!is.null(chart_axes_highlights_y_label_x_position)) { + if (!chart_axes_highlights_y_label_x_position %in% list_chart_axes_highlights_y_label_x_position) { + stop("`chart_axes_highlights_y_label_x_position` must be one of: c('left', 'middle', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_label_x_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_label_x_position)) { + chart_axes_highlights_y_label_x_position <- as.character(chart_axes_highlights_y_label_x_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_label_x_position])[[1]] + new_list$x$state$axes_highlights$y_label_x_position <- named_list_value + } + } + } + } + list_chart_axes_highlights_y_label_y_position <- c("above", "middle", "below", NULL) + if (!is.null(chart_axes_highlights_y_label_y_position)) { + if (!chart_axes_highlights_y_label_y_position %in% list_chart_axes_highlights_y_label_y_position) { + stop("`chart_axes_highlights_y_label_y_position` must be one of: c('above', 'middle', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "middle": "middle", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "middle": "middle", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_label_y_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_label_y_position)) { + chart_axes_highlights_y_label_y_position <- as.character(chart_axes_highlights_y_label_y_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_label_y_position])[[1]] + new_list$x$state$axes_highlights$y_label_y_position <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$y_label_max_width <- chart_axes_highlights_y_label_max_width + new_list$x$state$axes_highlights$y_font_size <- chart_axes_highlights_y_font_size + list_chart_axes_highlights_y_font_weight <- c("regular", "bold", NULL) + if (!is.null(chart_axes_highlights_y_font_weight)) { + if (!chart_axes_highlights_y_font_weight %in% list_chart_axes_highlights_y_font_weight) { + stop("`chart_axes_highlights_y_font_weight` must be one of: c('regular', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_font_weight %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_font_weight)) { + chart_axes_highlights_y_font_weight <- as.character(chart_axes_highlights_y_font_weight) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_font_weight])[[1]] + new_list$x$state$axes_highlights$y_font_weight <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$y_label_color <- chart_axes_highlights_y_label_color + new_list$x$state$axes_highlights$y_shadow_color <- chart_axes_highlights_y_shadow_color + new_list$x$state$axes_highlights$y_shadow_enabled <- chart_axes_highlights_y_shadow_enabled + new_list$x$state$annotations_styles <- annotations_styles + list_chart_annotations_defaults_text_weight <- c("normal", "bold", NULL) + if (!is.null(chart_annotations_defaults_text_weight)) { + if (!chart_annotations_defaults_text_weight %in% list_chart_annotations_defaults_text_weight) { + stop("`chart_annotations_defaults_text_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_text_weight %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_text_weight)) { + chart_annotations_defaults_text_weight <- as.character(chart_annotations_defaults_text_weight) + } + named_list_value <- unname(named_list[chart_annotations_defaults_text_weight])[[1]] + new_list$x$state$annotations$defaults$text_weight <- named_list_value + } + } + } + } + new_list$x$state$annotations$defaults$text_size <- chart_annotations_defaults_text_size + new_list$x$state$annotations$defaults$text_color <- chart_annotations_defaults_text_color + new_list$x$state$annotations$defaults$label_width <- chart_annotations_defaults_label_width + list_chart_annotations_defaults_text_background_mode <- c("none", "outline", "background", NULL) + if (!is.null(chart_annotations_defaults_text_background_mode)) { + if (!chart_annotations_defaults_text_background_mode %in% list_chart_annotations_defaults_text_background_mode) { + stop("`chart_annotations_defaults_text_background_mode` must be one of: c('none', 'outline', 'background')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "outline": "outline", "background": "background"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "outline": "outline", "background": "background"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_text_background_mode %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_text_background_mode)) { + chart_annotations_defaults_text_background_mode <- as.character(chart_annotations_defaults_text_background_mode) + } + named_list_value <- unname(named_list[chart_annotations_defaults_text_background_mode])[[1]] + new_list$x$state$annotations$defaults$text_background_mode <- named_list_value + } + } + } + } + new_list$x$state$annotations$defaults$text_bg <- chart_annotations_defaults_text_bg + new_list$x$state$annotations$defaults$label_bg <- chart_annotations_defaults_label_bg + list_chart_annotations_defaults_text_alignment <- c("auto", "start", "center", "end", NULL) + if (!is.null(chart_annotations_defaults_text_alignment)) { + if (!chart_annotations_defaults_text_alignment %in% list_chart_annotations_defaults_text_alignment) { + stop("`chart_annotations_defaults_text_alignment` must be one of: c('auto', 'start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_text_alignment %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_text_alignment)) { + chart_annotations_defaults_text_alignment <- as.character(chart_annotations_defaults_text_alignment) + } + named_list_value <- unname(named_list[chart_annotations_defaults_text_alignment])[[1]] + new_list$x$state$annotations$defaults$text_alignment <- named_list_value + } + } + } + } + list_chart_annotations_defaults_popup_position <- c("center", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_annotations_defaults_popup_position)) { + if (!chart_annotations_defaults_popup_position %in% list_chart_annotations_defaults_popup_position) { + stop("`chart_annotations_defaults_popup_position` must be one of: c('center', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"center": "center", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"center": "center", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_popup_position %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_popup_position)) { + chart_annotations_defaults_popup_position <- as.character(chart_annotations_defaults_popup_position) + } + named_list_value <- unname(named_list[chart_annotations_defaults_popup_position])[[1]] + new_list$x$state$annotations$defaults$popup_position <- named_list_value + } + } + } + } + list_chart_annotations_defaults_line_marker <- c("none", "arrowhead_open", "arrowhead", NULL) + if (!is.null(chart_annotations_defaults_line_marker)) { + if (!chart_annotations_defaults_line_marker %in% list_chart_annotations_defaults_line_marker) { + stop("`chart_annotations_defaults_line_marker` must be one of: c('none', 'arrowhead_open', 'arrowhead')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "arrowhead_open": "arrowhead_open", "arrowhead": "arrowhead"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "arrowhead_open": "arrowhead_open", "arrowhead": "arrowhead"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_line_marker %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_line_marker)) { + chart_annotations_defaults_line_marker <- as.character(chart_annotations_defaults_line_marker) + } + named_list_value <- unname(named_list[chart_annotations_defaults_line_marker])[[1]] + new_list$x$state$annotations$defaults$line_marker <- named_list_value + } + } + } + } + new_list$x$state$annotations$defaults$stroke_width <- chart_annotations_defaults_stroke_width + new_list$x$state$annotations$defaults$stroke_color <- chart_annotations_defaults_stroke_color + list_chart_annotations_defaults_connector_extend_line <- c("enabled", "disabled", NULL) + if (!is.null(chart_annotations_defaults_connector_extend_line)) { + if (!chart_annotations_defaults_connector_extend_line %in% list_chart_annotations_defaults_connector_extend_line) { + stop("`chart_annotations_defaults_connector_extend_line` must be one of: c('enabled', 'disabled')") + } else { + if (length(jsonlite::fromJSON('{"enabled": "enabled", "disabled": "disabled"}')) > 1) { + named_list <- jsonlite::fromJSON('{"enabled": "enabled", "disabled": "disabled"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_connector_extend_line %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_connector_extend_line)) { + chart_annotations_defaults_connector_extend_line <- as.character(chart_annotations_defaults_connector_extend_line) + } + named_list_value <- unname(named_list[chart_annotations_defaults_connector_extend_line])[[1]] + new_list$x$state$annotations$defaults$connector_extend_line <- named_list_value + } + } + } + } + new_list$x$state$data_trans_duration <- data_trans_duration + new_list$x$state$animate_on_load <- animate_on_load + new_list$x$state$data_trans_bind_series <- data_trans_bind_series + new_list$x$state$data_trans_bind_data_points <- data_trans_bind_data_points + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + new_list$x$state$url_state$enabled <- chart_url_settings_enabled + if (length(chart_url_settings_whitelist) > 1) { + new_list$x$state$url_state$whitelist <- paste(chart_url_settings_whitelist, collapse = "\n") + } else { + new_list$x$state$url_state$whitelist <- chart_url_settings_whitelist + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_marimekko_details.R b/R_package/R/set_marimekko_details.R new file mode 100644 index 0000000..cef5e94 --- /dev/null +++ b/R_package/R/set_marimekko_details.R @@ -0,0 +1,5827 @@ +#' Set marimekko chart details +#' @name set_marimekko_details +#' @param sort_by Sort by. Choices: none, unstacked, stacked. Whether your chart is sorted by the primary (unstacked) or the secondary (stacked) metric. Flourish type hint: string, defaults to `NULL` +#' @param sort_direction Sort direction. Choices: desc, asc. Flourish type hint: string, defaults to `NULL` +#' @param orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param height_mode Height mode. Choices: auto, aspect_ratio. How the graphics height is determined. Auto uses the default Flourish responsive sizing. In Aspect ratio mode, you set the aspect ratio of the plot, and the container will be updated to accommodate it (not supported when embedded in a simple fixed-height iframe ). Flourish type hint: string, defaults to `NULL` +#' @param facet_aspect Aspect (desktop). Aspect ratio of each chart in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param facet_aspect_mobile Aspect (mobile). Aspect ratio of each chart in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param facet_aspect_breakpoint Breakpoint. The width at which mobile mode ends and desktop begins (in px). Flourish type hint: number, defaults to `NULL` +#' @param stack_padding_stacked Space between stacked values. The space between stacked values (in rems ). Flourish type hint: number, defaults to `NULL` +#' @param stack_padding_unstacked Space between stacks. The space between stacks (in rems). Flourish type hint: number, defaults to `NULL` +#' @param color_mode Color mode. Choices: stack, bar. In order to color by stack, you need to have at least two columns bound to the Secondary metric Flourish type hint: string, defaults to `NULL` +#' @param stack_fade Stack fade. How quickly the stacks fade. (Use 1 for no fade). Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param enable_labels Show labels. Choices: auto, on, off. Auto turns labels off if there are more than 50. Flourish type hint: string, defaults to `NULL` +#' @param label_position Label position. Choices: edge_of_chart, edge_of_bar. This alters the position of the label from being at the edge of the chart to the edge of the bars. Note these two positions will only be different when the secondary measure is not being treated as a percentage. Flourish type hint: string, defaults to `NULL` +#' @param chart_labels_max_width Max label width. The maximum allowed label width. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_overlap_mode Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to `NULL` +#' @param chart_labels_spreading_margin Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_data_point_margin Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_show_only_labels Show only certain labels. Manually specify which labels youd like to display (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_labels_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_labels_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_text_bg_color Outline. Flourish type hint: color, defaults to `NULL` +#' @param chart_labels_text_bg_size Outline width. As a % of the font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_text_max_lines Max lines. The max number of lines for each label. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_text_weight Weight. Choices: 400, 700. Flourish type hint: string, defaults to `NULL` +#' @param chart_labels_lines Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_labels_line_style Line style. Choices: straight, step. Flourish type hint: string, defaults to `NULL` +#' @param chart_labels_line_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_labels_line_width Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_line_range Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_labels_line_padding Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_columns_fixed Grid mode. Choices: `FALSE`, `TRUE`. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_columns Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width Min chart width. The minimum width of a chart or cell in the grid. Determines the number of columns. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width_fixed Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_custom_grid Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_custom_positions Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to `NULL` +#' @param chart_facet_max_width Max chart width. The maximum width of a chart or cell in the grid. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_w Horizontal margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_h Vertical margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_animation On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_titles Show titles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_title_align Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_size Size. Relative to the width of the chart. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_unit Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_padding_top Space above. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_padding_bottom Space below. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_bg Background. Choices: none, full, text. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_bg_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_bg_padding Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to `NULL` +#' @param x_as_percentage Treat as percentage. Displays values summed to 100%. This is useful for comparing proportional contributions across all categories. Flourish type hint: boolean, defaults to `NULL` +#' @param matching_x_axis Match x axes accross facets. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_axis_position Choices: bottom, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_y_axis_position Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_zero_axis Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_position Position. Choices: default, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_side Tick side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param y_as_percentage Treat as percentage. Displays values summed to 100%. This is useful for comparing proportional contributions across all categories. Flourish type hint: boolean, defaults to `NULL` +#' @param matching_y_axis Match y axes accross facets. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_axis_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_zero_axis Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_title_position Position. Choices: side, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_position Position. Choices: default, above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_side Side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_show_all Include "All". Flourish type hint: boolean, defaults to `NULL` +#' @param filter_show_all_text Name for "All". Leave blank to not include an All option. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_controls_spacing Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_x_enabled Show highlights on the x axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_x_lines One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example, `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_x_line_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_line_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_line_dash Dash. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_areas One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_x_area_color Area. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_area_opacity Area opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_area_texture Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_vertical Vertical. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_x_label_y_position Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_x_position X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_font_weight Font weight. Choices: regular, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_shadow_color Shadow. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_shadow_enabled Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_y_enabled Show highlights on the y axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_y_lines One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example: `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_y_line_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_line_width line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_line_dash Dash. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_areas One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_y_area_color Area. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_area_opacity Area opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_area_texture Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_x_position X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_y_position Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_font_weight Font weight. Choices: regular, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_shadow_color Shadow. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_shadow_enabled Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param axes_highlights_stack_order Stack order. Choices: above_data, below_data. Whether your axis highlights should be displayed above or below your chart area. Flourish type hint: string, defaults to `NULL` +#' @param annotations_styles Show styling options. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_annotations_defaults_text_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_text_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_annotations_defaults_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_label_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_annotations_defaults_text_background_mode Text background. Choices: none, outline, background. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_text_bg Outline. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_label_bg Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_text_alignment Alignment. Choices: auto, start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_popup_position Popup position. Choices: center, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_line_marker Marker. Choices: none, arrowhead_open, arrowhead. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_stroke_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_annotations_defaults_stroke_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_connector_extend_line Extend line. Choices: enabled, disabled. Flourish type hint: string, defaults to `NULL` +#' @param animation_duration Animation duration. The duration of the animation (in seconds) when changing data or mode for example, between slides in a story Flourish type hint: number, defaults to `NULL` +#' @param chart_background_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_background_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_background_background_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_background_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_background_background_image_size Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to `NULL` +#' @param chart_background_background_image_position Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "marimekko", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_marimekko_data(gapminder) |> +#' set_marimekko_details() +#' ) +#' @export + +set_marimekko_details <- function( + ., + sort_by = NULL, + sort_direction = NULL, + orientation = NULL, + height_mode = NULL, + facet_aspect = NULL, + facet_aspect_mobile = NULL, + facet_aspect_breakpoint = NULL, + stack_padding_stacked = NULL, + stack_padding_unstacked = NULL, + color_mode = NULL, + stack_fade = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + enable_labels = NULL, + label_position = NULL, + chart_labels_max_width = NULL, + chart_labels_overlap_mode = NULL, + chart_labels_spreading_margin = NULL, + chart_labels_data_point_margin = NULL, + chart_labels_show_only_labels = NULL, + chart_labels_text_color = NULL, + chart_labels_text_size = NULL, + chart_labels_text_bg_color = NULL, + chart_labels_text_bg_size = NULL, + chart_labels_text_line_height = NULL, + chart_labels_text_max_lines = NULL, + chart_labels_text_weight = NULL, + chart_labels_lines = NULL, + chart_labels_line_style = NULL, + chart_labels_line_color = NULL, + chart_labels_line_width = NULL, + chart_labels_line_range = NULL, + chart_labels_line_padding = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + x_as_percentage = NULL, + matching_x_axis = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_x_axis_number_date_format_prefix = NULL, + chart_x_axis_number_date_format_suffix = NULL, + chart_x_axis_number_date_format_n_dec = NULL, + chart_x_axis_number_date_format_advanced = NULL, + chart_x_axis_number_date_format_negative_sign = NULL, + chart_x_axis_number_date_format_strip_zeros = NULL, + chart_x_axis_number_date_format_strip_separator = NULL, + chart_x_axis_number_date_format_transform_labels = NULL, + chart_x_axis_number_date_format_transform = NULL, + chart_x_axis_number_date_format_multiply_divide_constant = NULL, + chart_x_axis_number_date_format_exponentiate_constant = NULL, + y_as_percentage = NULL, + matching_y_axis = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_number_date_format_prefix = NULL, + chart_y_axis_number_date_format_suffix = NULL, + chart_y_axis_number_date_format_n_dec = NULL, + chart_y_axis_number_date_format_advanced = NULL, + chart_y_axis_number_date_format_negative_sign = NULL, + chart_y_axis_number_date_format_strip_zeros = NULL, + chart_y_axis_number_date_format_strip_separator = NULL, + chart_y_axis_number_date_format_transform_labels = NULL, + chart_y_axis_number_date_format_transform = NULL, + chart_y_axis_number_date_format_multiply_divide_constant = NULL, + chart_y_axis_number_date_format_exponentiate_constant = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_show_all = NULL, + filter_show_all_text = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_axes_highlights_x_enabled = NULL, + chart_axes_highlights_x_lines = NULL, + chart_axes_highlights_x_line_color = NULL, + chart_axes_highlights_x_line_width = NULL, + chart_axes_highlights_x_line_dash = NULL, + chart_axes_highlights_x_areas = NULL, + chart_axes_highlights_x_area_color = NULL, + chart_axes_highlights_x_area_opacity = NULL, + chart_axes_highlights_x_area_texture = NULL, + chart_axes_highlights_x_label_vertical = NULL, + chart_axes_highlights_x_label_y_position = NULL, + chart_axes_highlights_x_label_x_position = NULL, + chart_axes_highlights_x_label_max_width = NULL, + chart_axes_highlights_x_font_size = NULL, + chart_axes_highlights_x_font_weight = NULL, + chart_axes_highlights_x_label_color = NULL, + chart_axes_highlights_x_shadow_color = NULL, + chart_axes_highlights_x_shadow_enabled = NULL, + chart_axes_highlights_y_enabled = NULL, + chart_axes_highlights_y_lines = NULL, + chart_axes_highlights_y_line_color = NULL, + chart_axes_highlights_y_line_width = NULL, + chart_axes_highlights_y_line_dash = NULL, + chart_axes_highlights_y_areas = NULL, + chart_axes_highlights_y_area_color = NULL, + chart_axes_highlights_y_area_opacity = NULL, + chart_axes_highlights_y_area_texture = NULL, + chart_axes_highlights_y_label_x_position = NULL, + chart_axes_highlights_y_label_y_position = NULL, + chart_axes_highlights_y_label_max_width = NULL, + chart_axes_highlights_y_font_size = NULL, + chart_axes_highlights_y_font_weight = NULL, + chart_axes_highlights_y_label_color = NULL, + chart_axes_highlights_y_shadow_color = NULL, + chart_axes_highlights_y_shadow_enabled = NULL, + axes_highlights_stack_order = NULL, + annotations_styles = NULL, + chart_annotations_defaults_text_weight = NULL, + chart_annotations_defaults_text_size = NULL, + chart_annotations_defaults_text_color = NULL, + chart_annotations_defaults_label_width = NULL, + chart_annotations_defaults_text_background_mode = NULL, + chart_annotations_defaults_text_bg = NULL, + chart_annotations_defaults_label_bg = NULL, + chart_annotations_defaults_text_alignment = NULL, + chart_annotations_defaults_popup_position = NULL, + chart_annotations_defaults_line_marker = NULL, + chart_annotations_defaults_stroke_width = NULL, + chart_annotations_defaults_stroke_color = NULL, + chart_annotations_defaults_connector_extend_line = NULL, + animation_duration = NULL, + chart_background_background_color_enabled = NULL, + chart_background_background_image_enabled = NULL, + chart_background_background_color = NULL, + chart_background_background_image_src = NULL, + chart_background_background_image_size = NULL, + chart_background_background_image_position = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "marimekko") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/marimekko")) { + stop("`set_marimekko_details()` is not supported for this chart type.") + } + list_sort_by <- c("none", "unstacked", "stacked", NULL) + if (!is.null(sort_by)) { + if (!sort_by %in% list_sort_by) { + stop("`sort_by` must be one of: c('none', 'unstacked', 'stacked')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "unstacked": "unstacked", "stacked": "stacked"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "unstacked": "unstacked", "stacked": "stacked"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && sort_by %in% names(named_list)) { + if (is.logical(sort_by)) { + sort_by <- as.character(sort_by) + } + named_list_value <- unname(named_list[sort_by])[[1]] + new_list$x$state$sort_by <- named_list_value + } + } + } + } + list_sort_direction <- c("desc", "asc", NULL) + if (!is.null(sort_direction)) { + if (!sort_direction %in% list_sort_direction) { + stop("`sort_direction` must be one of: c('desc', 'asc')") + } else { + if (length(jsonlite::fromJSON('{"desc": "desc", "asc": "asc"}')) > 1) { + named_list <- jsonlite::fromJSON('{"desc": "desc", "asc": "asc"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && sort_direction %in% names(named_list)) { + if (is.logical(sort_direction)) { + sort_direction <- as.character(sort_direction) + } + named_list_value <- unname(named_list[sort_direction])[[1]] + new_list$x$state$sort_direction <- named_list_value + } + } + } + } + list_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(orientation)) { + if (!orientation %in% list_orientation) { + stop("`orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && orientation %in% names(named_list)) { + if (is.logical(orientation)) { + orientation <- as.character(orientation) + } + named_list_value <- unname(named_list[orientation])[[1]] + new_list$x$state$orientation <- named_list_value + } + } + } + } + list_height_mode <- c("auto", "aspect_ratio", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('auto', 'aspect_ratio')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "aspect_ratio": "aspect_ratio"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "aspect_ratio": "aspect_ratio"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + new_list$x$state$facet_aspect <- facet_aspect + new_list$x$state$facet_aspect_mobile <- facet_aspect_mobile + new_list$x$state$facet_aspect_breakpoint <- facet_aspect_breakpoint + new_list$x$state$stack_padding_stacked <- stack_padding_stacked + new_list$x$state$stack_padding_unstacked <- stack_padding_unstacked + list_color_mode <- c("stack", "bar", NULL) + if (!is.null(color_mode)) { + if (!color_mode %in% list_color_mode) { + stop("`color_mode` must be one of: c('stack', 'bar')") + } else { + if (length(jsonlite::fromJSON('{"stack": "stack", "bar": "bar"}')) > 1) { + named_list <- jsonlite::fromJSON('{"stack": "stack", "bar": "bar"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && color_mode %in% names(named_list)) { + if (is.logical(color_mode)) { + color_mode <- as.character(color_mode) + } + named_list_value <- unname(named_list[color_mode])[[1]] + new_list$x$state$color_mode <- named_list_value + } + } + } + } + new_list$x$state$stack_fade <- stack_fade + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + list_enable_labels <- c("auto", "on", "off", NULL) + if (!is.null(enable_labels)) { + if (!enable_labels %in% list_enable_labels) { + stop("`enable_labels` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && enable_labels %in% names(named_list)) { + if (is.logical(enable_labels)) { + enable_labels <- as.character(enable_labels) + } + named_list_value <- unname(named_list[enable_labels])[[1]] + new_list$x$state$enable_labels <- named_list_value + } + } + } + } + list_label_position <- c("edge_of_chart", "edge_of_bar", NULL) + if (!is.null(label_position)) { + if (!label_position %in% list_label_position) { + stop("`label_position` must be one of: c('edge_of_chart', 'edge_of_bar')") + } else { + if (length(jsonlite::fromJSON('{"edge_of_chart": "edge_of_chart", "edge_of_bar": "edge_of_bar"}')) > 1) { + named_list <- jsonlite::fromJSON('{"edge_of_chart": "edge_of_chart", "edge_of_bar": "edge_of_bar"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_position %in% names(named_list)) { + if (is.logical(label_position)) { + label_position <- as.character(label_position) + } + named_list_value <- unname(named_list[label_position])[[1]] + new_list$x$state$label_position <- named_list_value + } + } + } + } + new_list$x$state$labels$max_width <- chart_labels_max_width + list_chart_labels_overlap_mode <- c("spread", "hide", "none", NULL) + if (!is.null(chart_labels_overlap_mode)) { + if (!chart_labels_overlap_mode %in% list_chart_labels_overlap_mode) { + stop("`chart_labels_overlap_mode` must be one of: c('spread', 'hide', 'none')") + } else { + if (length(jsonlite::fromJSON('{"spread": "spread", "hide": "hide", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"spread": "spread", "hide": "hide", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_labels_overlap_mode %in% names(named_list)) { + if (is.logical(chart_labels_overlap_mode)) { + chart_labels_overlap_mode <- as.character(chart_labels_overlap_mode) + } + named_list_value <- unname(named_list[chart_labels_overlap_mode])[[1]] + new_list$x$state$labels$overlap_mode <- named_list_value + } + } + } + } + new_list$x$state$labels$spreading_margin <- chart_labels_spreading_margin + new_list$x$state$labels$data_point_margin <- chart_labels_data_point_margin + if (length(chart_labels_show_only_labels) > 1) { + new_list$x$state$labels$show_only_labels <- paste(chart_labels_show_only_labels, collapse = "\n") + } else { + new_list$x$state$labels$show_only_labels <- chart_labels_show_only_labels + } + + new_list$x$state$labels$text_color <- chart_labels_text_color + new_list$x$state$labels$text_size <- chart_labels_text_size + new_list$x$state$labels$text_bg_color <- chart_labels_text_bg_color + new_list$x$state$labels$text_bg_size <- chart_labels_text_bg_size + new_list$x$state$labels$text_line_height <- chart_labels_text_line_height + new_list$x$state$labels$text_max_lines <- chart_labels_text_max_lines + list_chart_labels_text_weight <- c(400, 700, NULL) + if (!is.null(chart_labels_text_weight)) { + if (!chart_labels_text_weight %in% list_chart_labels_text_weight) { + stop("`chart_labels_text_weight` must be one of: c(400, 700)") + } else { + if (length(jsonlite::fromJSON('{"400": 400, "700": 700}')) > 1) { + named_list <- jsonlite::fromJSON('{"400": 400, "700": 700}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_labels_text_weight %in% names(named_list)) { + if (is.logical(chart_labels_text_weight)) { + chart_labels_text_weight <- as.character(chart_labels_text_weight) + } + named_list_value <- unname(named_list[chart_labels_text_weight])[[1]] + new_list$x$state$labels$text_weight <- named_list_value + } + } + } + } + list_chart_labels_lines <- c("auto", "on", "off", NULL) + if (!is.null(chart_labels_lines)) { + if (!chart_labels_lines %in% list_chart_labels_lines) { + stop("`chart_labels_lines` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_labels_lines %in% names(named_list)) { + if (is.logical(chart_labels_lines)) { + chart_labels_lines <- as.character(chart_labels_lines) + } + named_list_value <- unname(named_list[chart_labels_lines])[[1]] + new_list$x$state$labels$lines <- named_list_value + } + } + } + } + list_chart_labels_line_style <- c("straight", "step", NULL) + if (!is.null(chart_labels_line_style)) { + if (!chart_labels_line_style %in% list_chart_labels_line_style) { + stop("`chart_labels_line_style` must be one of: c('straight', 'step')") + } else { + if (length(jsonlite::fromJSON('{"straight": "straight", "step": "step"}')) > 1) { + named_list <- jsonlite::fromJSON('{"straight": "straight", "step": "step"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_labels_line_style %in% names(named_list)) { + if (is.logical(chart_labels_line_style)) { + chart_labels_line_style <- as.character(chart_labels_line_style) + } + named_list_value <- unname(named_list[chart_labels_line_style])[[1]] + new_list$x$state$labels$line_style <- named_list_value + } + } + } + } + new_list$x$state$labels$line_color <- chart_labels_line_color + new_list$x$state$labels$line_width <- chart_labels_line_width + new_list$x$state$labels$line_range <- chart_labels_line_range + new_list$x$state$labels$line_padding <- chart_labels_line_padding + list_chart_facet_columns_fixed <- c(FALSE, TRUE, NULL) + if (!is.null(chart_facet_columns_fixed)) { + if (!chart_facet_columns_fixed %in% list_chart_facet_columns_fixed) { + stop("`chart_facet_columns_fixed` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_columns_fixed %in% names(named_list)) { + if (is.logical(chart_facet_columns_fixed)) { + chart_facet_columns_fixed <- as.character(chart_facet_columns_fixed) + } + named_list_value <- unname(named_list[chart_facet_columns_fixed])[[1]] + new_list$x$state$facets$columns_fixed <- named_list_value + } + } + } + } + new_list$x$state$facets$columns <- chart_facet_columns + new_list$x$state$facets$min_width <- chart_facet_min_width + new_list$x$state$facets$min_width_fixed <- chart_facet_min_width_fixed + new_list$x$state$facets$custom_grid <- chart_facet_custom_grid + if (length(chart_facet_custom_positions) > 1) { + new_list$x$state$facets$custom_positions <- paste(chart_facet_custom_positions, collapse = "\n") + } else { + new_list$x$state$facets$custom_positions <- chart_facet_custom_positions + } + + new_list$x$state$facets$max_width <- chart_facet_max_width + new_list$x$state$facets$gutter_w <- chart_facet_gutter_w + new_list$x$state$facets$gutter_h <- chart_facet_gutter_h + list_chart_facet_animation <- c("auto", "name", "reuse", NULL) + if (!is.null(chart_facet_animation)) { + if (!chart_facet_animation %in% list_chart_facet_animation) { + stop("`chart_facet_animation` must be one of: c('auto', 'name', 'reuse')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_animation %in% names(named_list)) { + if (is.logical(chart_facet_animation)) { + chart_facet_animation <- as.character(chart_facet_animation) + } + named_list_value <- unname(named_list[chart_facet_animation])[[1]] + new_list$x$state$facets$animation <- named_list_value + } + } + } + } + new_list$x$state$facets$titles <- chart_facet_titles + list_chart_facet_title_align <- c("auto", "left", "center", "right", NULL) + if (!is.null(chart_facet_title_align)) { + if (!chart_facet_title_align %in% list_chart_facet_title_align) { + stop("`chart_facet_title_align` must be one of: c('auto', 'left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_align %in% names(named_list)) { + if (is.logical(chart_facet_title_align)) { + chart_facet_title_align <- as.character(chart_facet_title_align) + } + named_list_value <- unname(named_list[chart_facet_title_align])[[1]] + new_list$x$state$facets$title_align <- named_list_value + } + } + } + } + new_list$x$state$facets$title_size <- chart_facet_title_size + list_chart_facet_title_unit <- c("rem", "facet", NULL) + if (!is.null(chart_facet_title_unit)) { + if (!chart_facet_title_unit %in% list_chart_facet_title_unit) { + stop("`chart_facet_title_unit` must be one of: c('rem', 'facet')") + } else { + if (length(jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_unit %in% names(named_list)) { + if (is.logical(chart_facet_title_unit)) { + chart_facet_title_unit <- as.character(chart_facet_title_unit) + } + named_list_value <- unname(named_list[chart_facet_title_unit])[[1]] + new_list$x$state$facets$title_unit <- named_list_value + } + } + } + } + new_list$x$state$facets$title_color <- chart_facet_title_color + new_list$x$state$facets$title_padding_top <- chart_facet_title_padding_top + new_list$x$state$facets$title_padding_bottom <- chart_facet_title_padding_bottom + list_chart_facet_title_bg <- c("none", "full", "text", NULL) + if (!is.null(chart_facet_title_bg)) { + if (!chart_facet_title_bg %in% list_chart_facet_title_bg) { + stop("`chart_facet_title_bg` must be one of: c('none', 'full', 'text')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_bg %in% names(named_list)) { + if (is.logical(chart_facet_title_bg)) { + chart_facet_title_bg <- as.character(chart_facet_title_bg) + } + named_list_value <- unname(named_list[chart_facet_title_bg])[[1]] + new_list$x$state$facets$title_bg <- named_list_value + } + } + } + } + new_list$x$state$facets$title_bg_color <- chart_facet_title_bg_color + new_list$x$state$facets$title_bg_padding <- chart_facet_title_bg_padding + new_list$x$state$x_as_percentage <- x_as_percentage + new_list$x$state$matching_x_axis <- matching_x_axis + list_chart_x_axis_axis_position <- c("bottom", "off", NULL) + if (!is.null(chart_x_axis_axis_position)) { + if (!chart_x_axis_axis_position %in% list_chart_x_axis_axis_position) { + stop("`chart_x_axis_axis_position` must be one of: c('bottom', 'off')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_axis_position %in% names(named_list)) { + if (is.logical(chart_x_axis_axis_position)) { + chart_x_axis_axis_position <- as.character(chart_x_axis_axis_position) + } + named_list_value <- unname(named_list[chart_x_axis_axis_position])[[1]] + new_list$x$state$x$axis_position <- named_list_value + } + } + } + } + new_list$x$state$x$y_axis_position <- chart_x_axis_y_axis_position + list_chart_x_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_x_axis_numeric_scale_type)) { + if (!chart_x_axis_numeric_scale_type %in% list_chart_x_axis_numeric_scale_type) { + stop("`chart_x_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_x_axis_numeric_scale_type)) { + chart_x_axis_numeric_scale_type <- as.character(chart_x_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_x_axis_numeric_scale_type])[[1]] + new_list$x$state$x$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$x$linear_min <- chart_x_axis_linear_min + new_list$x$state$x$linear_max <- chart_x_axis_linear_max + new_list$x$state$x$log_min <- chart_x_axis_log_min + new_list$x$state$x$log_max <- chart_x_axis_log_max + new_list$x$state$x$datetime_min <- chart_x_axis_datetime_min + new_list$x$state$x$datetime_max <- chart_x_axis_datetime_max + new_list$x$state$x$flip <- chart_x_axis_flip + new_list$x$state$x$show_scale_settings <- chart_x_axis_show_scale_settings + list_chart_x_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_nice)) { + if (!chart_x_axis_nice %in% list_chart_x_axis_nice) { + stop("`chart_x_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_nice %in% names(named_list)) { + if (is.logical(chart_x_axis_nice)) { + chart_x_axis_nice <- as.character(chart_x_axis_nice) + } + named_list_value <- unname(named_list[chart_x_axis_nice])[[1]] + new_list$x$state$x$nice <- named_list_value + } + } + } + } + list_chart_x_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_x_axis_zero_axis)) { + if (!chart_x_axis_zero_axis %in% list_chart_x_axis_zero_axis) { + stop("`chart_x_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_x_axis_zero_axis)) { + chart_x_axis_zero_axis <- as.character(chart_x_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_x_axis_zero_axis])[[1]] + new_list$x$state$x$zero_axis <- named_list_value + } + } + } + } + list_chart_x_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_x_axis_title_mode)) { + if (!chart_x_axis_title_mode %in% list_chart_x_axis_title_mode) { + stop("`chart_x_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_title_mode)) { + chart_x_axis_title_mode <- as.character(chart_x_axis_title_mode) + } + named_list_value <- unname(named_list[chart_x_axis_title_mode])[[1]] + new_list$x$state$x$title_mode <- named_list_value + } + } + } + } + new_list$x$state$x$title <- chart_x_axis_title + new_list$x$state$x$title_styling <- chart_x_axis_title_styling + list_chart_x_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_title_weight)) { + if (!chart_x_axis_title_weight %in% list_chart_x_axis_title_weight) { + stop("`chart_x_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_title_weight)) { + chart_x_axis_title_weight <- as.character(chart_x_axis_title_weight) + } + named_list_value <- unname(named_list[chart_x_axis_title_weight])[[1]] + new_list$x$state$x$title_weight <- named_list_value + } + } + } + } + new_list$x$state$x$title_color <- chart_x_axis_title_color + new_list$x$state$x$title_size <- chart_x_axis_title_size + new_list$x$state$x$title_padding <- chart_x_axis_title_padding + list_chart_x_axis_tick_label_position <- c("default", "left", "right", NULL) + if (!is.null(chart_x_axis_tick_label_position)) { + if (!chart_x_axis_tick_label_position %in% list_chart_x_axis_tick_label_position) { + stop("`chart_x_axis_tick_label_position` must be one of: c('default', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_position)) { + chart_x_axis_tick_label_position <- as.character(chart_x_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_position])[[1]] + new_list$x$state$x$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_styling <- chart_x_axis_tick_label_styling + new_list$x$state$x$tick_label_size <- chart_x_axis_tick_label_size + new_list$x$state$x$tick_label_color <- chart_x_axis_tick_label_color + new_list$x$state$x$tick_padding <- chart_x_axis_tick_padding + list_chart_x_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_x_axis_tick_label_angle)) { + if (!chart_x_axis_tick_label_angle %in% list_chart_x_axis_tick_label_angle) { + stop("`chart_x_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_angle)) { + chart_x_axis_tick_label_angle <- as.character(chart_x_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_angle])[[1]] + new_list$x$state$x$tick_label_angle <- named_list_value + } + } + } + } + list_chart_x_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_tick_label_weight)) { + if (!chart_x_axis_tick_label_weight %in% list_chart_x_axis_tick_label_weight) { + stop("`chart_x_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_weight)) { + chart_x_axis_tick_label_weight <- as.character(chart_x_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_weight])[[1]] + new_list$x$state$x$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_max_lines <- chart_x_axis_tick_label_max_lines + new_list$x$state$x$tick_label_line_height <- chart_x_axis_tick_label_line_height + list_chart_x_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_x_axis_tick_label_space_mode)) { + if (!chart_x_axis_tick_label_space_mode %in% list_chart_x_axis_tick_label_space_mode) { + stop("`chart_x_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_space_mode)) { + chart_x_axis_tick_label_space_mode <- as.character(chart_x_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_space_mode])[[1]] + new_list$x$state$x$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_space <- chart_x_axis_tick_label_space + list_chart_x_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_x_axis_tick_mode)) { + if (!chart_x_axis_tick_mode %in% list_chart_x_axis_tick_mode) { + stop("`chart_x_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_mode)) { + chart_x_axis_tick_mode <- as.character(chart_x_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_mode])[[1]] + new_list$x$state$x$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_number <- chart_x_axis_tick_number + if (length(chart_x_axis_tick_custom) > 1) { + new_list$x$state$x$tick_custom <- paste(chart_x_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$x$tick_custom <- chart_x_axis_tick_custom + } + + new_list$x$state$x$line_and_tick_color <- chart_x_axis_line_and_tick_color + new_list$x$state$x$line_and_tick_width <- chart_x_axis_line_and_tick_width + new_list$x$state$x$tick_length <- chart_x_axis_tick_length + list_chart_x_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_x_axis_tick_side)) { + if (!chart_x_axis_tick_side %in% list_chart_x_axis_tick_side) { + stop("`chart_x_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_side)) { + chart_x_axis_tick_side <- as.character(chart_x_axis_tick_side) + } + named_list_value <- unname(named_list[chart_x_axis_tick_side])[[1]] + new_list$x$state$x$tick_side <- named_list_value + } + } + } + } + new_list$x$state$x$line_visible <- chart_x_axis_line_visible + new_list$x$state$x$edge_padding <- chart_x_axis_edge_padding + list_chart_x_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_gridlines_visible)) { + if (!chart_x_axis_gridlines_visible %in% list_chart_x_axis_gridlines_visible) { + stop("`chart_x_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_x_axis_gridlines_visible)) { + chart_x_axis_gridlines_visible <- as.character(chart_x_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_x_axis_gridlines_visible])[[1]] + new_list$x$state$x$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$x$gridlines_styling <- chart_x_axis_gridlines_styling + new_list$x$state$x$gridline_color <- chart_x_axis_gridline_color + list_chart_x_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_x_axis_gridline_style)) { + if (!chart_x_axis_gridline_style %in% list_chart_x_axis_gridline_style) { + stop("`chart_x_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_x_axis_gridline_style)) { + chart_x_axis_gridline_style <- as.character(chart_x_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_x_axis_gridline_style])[[1]] + new_list$x$state$x$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$x$gridline_width <- chart_x_axis_gridline_width + new_list$x$state$x$gridline_category_dividers <- chart_x_axis_gridline_category_dividers + new_list$x$state$x$gridline_category_dividers_extend <- chart_x_axis_gridline_category_dividers_extend + new_list$x$state$x_formatting$prefix <- chart_x_axis_number_date_format_prefix + new_list$x$state$x_formatting$suffix <- chart_x_axis_number_date_format_suffix + new_list$x$state$x_formatting$n_dec <- chart_x_axis_number_date_format_n_dec + new_list$x$state$x_formatting$advanced <- chart_x_axis_number_date_format_advanced + list_chart_x_axis_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_x_axis_number_date_format_negative_sign)) { + if (!chart_x_axis_number_date_format_negative_sign %in% list_chart_x_axis_number_date_format_negative_sign) { + stop("`chart_x_axis_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_x_axis_number_date_format_negative_sign)) { + chart_x_axis_number_date_format_negative_sign <- as.character(chart_x_axis_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_x_axis_number_date_format_negative_sign])[[1]] + new_list$x$state$x_formatting$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$x_formatting$strip_zeros <- chart_x_axis_number_date_format_strip_zeros + new_list$x$state$x_formatting$strip_separator <- chart_x_axis_number_date_format_strip_separator + new_list$x$state$x_formatting$transform_labels <- chart_x_axis_number_date_format_transform_labels + list_chart_x_axis_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_x_axis_number_date_format_transform)) { + if (!chart_x_axis_number_date_format_transform %in% list_chart_x_axis_number_date_format_transform) { + stop("`chart_x_axis_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_x_axis_number_date_format_transform)) { + chart_x_axis_number_date_format_transform <- as.character(chart_x_axis_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_x_axis_number_date_format_transform])[[1]] + new_list$x$state$x_formatting$transform <- named_list_value + } + } + } + } + new_list$x$state$x_formatting$multiply_divide_constant <- chart_x_axis_number_date_format_multiply_divide_constant + new_list$x$state$x_formatting$exponentiate_constant <- chart_x_axis_number_date_format_exponentiate_constant + new_list$x$state$y_as_percentage <- y_as_percentage + new_list$x$state$matching_y_axis <- matching_y_axis + list_chart_y_axis_axis_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_axis_visible)) { + if (!chart_y_axis_axis_visible %in% list_chart_y_axis_axis_visible) { + stop("`chart_y_axis_axis_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_axis_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_axis_visible)) { + chart_y_axis_axis_visible <- as.character(chart_y_axis_axis_visible) + } + named_list_value <- unname(named_list[chart_y_axis_axis_visible])[[1]] + new_list$x$state$y$axis_visible <- named_list_value + } + } + } + } + list_chart_y_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_y_axis_numeric_scale_type)) { + if (!chart_y_axis_numeric_scale_type %in% list_chart_y_axis_numeric_scale_type) { + stop("`chart_y_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_y_axis_numeric_scale_type)) { + chart_y_axis_numeric_scale_type <- as.character(chart_y_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_y_axis_numeric_scale_type])[[1]] + new_list$x$state$y$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$y$linear_min <- chart_y_axis_linear_min + new_list$x$state$y$linear_max <- chart_y_axis_linear_max + new_list$x$state$y$log_min <- chart_y_axis_log_min + new_list$x$state$y$log_max <- chart_y_axis_log_max + new_list$x$state$y$datetime_min <- chart_y_axis_datetime_min + new_list$x$state$y$datetime_max <- chart_y_axis_datetime_max + new_list$x$state$y$flip <- chart_y_axis_flip + new_list$x$state$y$show_scale_settings <- chart_y_axis_show_scale_settings + list_chart_y_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_nice)) { + if (!chart_y_axis_nice %in% list_chart_y_axis_nice) { + stop("`chart_y_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_nice %in% names(named_list)) { + if (is.logical(chart_y_axis_nice)) { + chart_y_axis_nice <- as.character(chart_y_axis_nice) + } + named_list_value <- unname(named_list[chart_y_axis_nice])[[1]] + new_list$x$state$y$nice <- named_list_value + } + } + } + } + list_chart_y_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_y_axis_zero_axis)) { + if (!chart_y_axis_zero_axis %in% list_chart_y_axis_zero_axis) { + stop("`chart_y_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_y_axis_zero_axis)) { + chart_y_axis_zero_axis <- as.character(chart_y_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_y_axis_zero_axis])[[1]] + new_list$x$state$y$zero_axis <- named_list_value + } + } + } + } + list_chart_y_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_y_axis_title_mode)) { + if (!chart_y_axis_title_mode %in% list_chart_y_axis_title_mode) { + stop("`chart_y_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_title_mode)) { + chart_y_axis_title_mode <- as.character(chart_y_axis_title_mode) + } + named_list_value <- unname(named_list[chart_y_axis_title_mode])[[1]] + new_list$x$state$y$title_mode <- named_list_value + } + } + } + } + new_list$x$state$y$title <- chart_y_axis_title + new_list$x$state$y$title_styling <- chart_y_axis_title_styling + list_chart_y_axis_title_position <- c("side", "end", NULL) + if (!is.null(chart_y_axis_title_position)) { + if (!chart_y_axis_title_position %in% list_chart_y_axis_title_position) { + stop("`chart_y_axis_title_position` must be one of: c('side', 'end')") + } else { + if (length(jsonlite::fromJSON('{"side": "side", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"side": "side", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_position %in% names(named_list)) { + if (is.logical(chart_y_axis_title_position)) { + chart_y_axis_title_position <- as.character(chart_y_axis_title_position) + } + named_list_value <- unname(named_list[chart_y_axis_title_position])[[1]] + new_list$x$state$y$title_position <- named_list_value + } + } + } + } + list_chart_y_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_title_weight)) { + if (!chart_y_axis_title_weight %in% list_chart_y_axis_title_weight) { + stop("`chart_y_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_title_weight)) { + chart_y_axis_title_weight <- as.character(chart_y_axis_title_weight) + } + named_list_value <- unname(named_list[chart_y_axis_title_weight])[[1]] + new_list$x$state$y$title_weight <- named_list_value + } + } + } + } + new_list$x$state$y$title_color <- chart_y_axis_title_color + new_list$x$state$y$title_size <- chart_y_axis_title_size + new_list$x$state$y$title_padding <- chart_y_axis_title_padding + list_chart_y_axis_tick_label_position <- c("default", "above", "below", NULL) + if (!is.null(chart_y_axis_tick_label_position)) { + if (!chart_y_axis_tick_label_position %in% list_chart_y_axis_tick_label_position) { + stop("`chart_y_axis_tick_label_position` must be one of: c('default', 'above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_position)) { + chart_y_axis_tick_label_position <- as.character(chart_y_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_position])[[1]] + new_list$x$state$y$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_styling <- chart_y_axis_tick_label_styling + new_list$x$state$y$tick_label_size <- chart_y_axis_tick_label_size + new_list$x$state$y$tick_label_color <- chart_y_axis_tick_label_color + new_list$x$state$y$tick_padding <- chart_y_axis_tick_padding + list_chart_y_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_y_axis_tick_label_angle)) { + if (!chart_y_axis_tick_label_angle %in% list_chart_y_axis_tick_label_angle) { + stop("`chart_y_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_angle)) { + chart_y_axis_tick_label_angle <- as.character(chart_y_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_angle])[[1]] + new_list$x$state$y$tick_label_angle <- named_list_value + } + } + } + } + list_chart_y_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_tick_label_weight)) { + if (!chart_y_axis_tick_label_weight %in% list_chart_y_axis_tick_label_weight) { + stop("`chart_y_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_weight)) { + chart_y_axis_tick_label_weight <- as.character(chart_y_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_weight])[[1]] + new_list$x$state$y$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_max_lines <- chart_y_axis_tick_label_max_lines + new_list$x$state$y$tick_label_line_height <- chart_y_axis_tick_label_line_height + list_chart_y_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_y_axis_tick_label_space_mode)) { + if (!chart_y_axis_tick_label_space_mode %in% list_chart_y_axis_tick_label_space_mode) { + stop("`chart_y_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_space_mode)) { + chart_y_axis_tick_label_space_mode <- as.character(chart_y_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_space_mode])[[1]] + new_list$x$state$y$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_space <- chart_y_axis_tick_label_space + list_chart_y_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_y_axis_tick_mode)) { + if (!chart_y_axis_tick_mode %in% list_chart_y_axis_tick_mode) { + stop("`chart_y_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_mode)) { + chart_y_axis_tick_mode <- as.character(chart_y_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_mode])[[1]] + new_list$x$state$y$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_number <- chart_y_axis_tick_number + if (length(chart_y_axis_tick_custom) > 1) { + new_list$x$state$y$tick_custom <- paste(chart_y_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$y$tick_custom <- chart_y_axis_tick_custom + } + + new_list$x$state$y$line_and_tick_color <- chart_y_axis_line_and_tick_color + new_list$x$state$y$line_and_tick_width <- chart_y_axis_line_and_tick_width + new_list$x$state$y$tick_length <- chart_y_axis_tick_length + list_chart_y_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_y_axis_tick_side)) { + if (!chart_y_axis_tick_side %in% list_chart_y_axis_tick_side) { + stop("`chart_y_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_side)) { + chart_y_axis_tick_side <- as.character(chart_y_axis_tick_side) + } + named_list_value <- unname(named_list[chart_y_axis_tick_side])[[1]] + new_list$x$state$y$tick_side <- named_list_value + } + } + } + } + new_list$x$state$y$line_visible <- chart_y_axis_line_visible + new_list$x$state$y$edge_padding <- chart_y_axis_edge_padding + list_chart_y_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_gridlines_visible)) { + if (!chart_y_axis_gridlines_visible %in% list_chart_y_axis_gridlines_visible) { + stop("`chart_y_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_gridlines_visible)) { + chart_y_axis_gridlines_visible <- as.character(chart_y_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_y_axis_gridlines_visible])[[1]] + new_list$x$state$y$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$y$gridlines_styling <- chart_y_axis_gridlines_styling + new_list$x$state$y$gridline_color <- chart_y_axis_gridline_color + list_chart_y_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_y_axis_gridline_style)) { + if (!chart_y_axis_gridline_style %in% list_chart_y_axis_gridline_style) { + stop("`chart_y_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_y_axis_gridline_style)) { + chart_y_axis_gridline_style <- as.character(chart_y_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_y_axis_gridline_style])[[1]] + new_list$x$state$y$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$y$gridline_width <- chart_y_axis_gridline_width + new_list$x$state$y$gridline_category_dividers <- chart_y_axis_gridline_category_dividers + new_list$x$state$y$gridline_category_dividers_extend <- chart_y_axis_gridline_category_dividers_extend + new_list$x$state$y_formatting$prefix <- chart_y_axis_number_date_format_prefix + new_list$x$state$y_formatting$suffix <- chart_y_axis_number_date_format_suffix + new_list$x$state$y_formatting$n_dec <- chart_y_axis_number_date_format_n_dec + new_list$x$state$y_formatting$advanced <- chart_y_axis_number_date_format_advanced + list_chart_y_axis_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_y_axis_number_date_format_negative_sign)) { + if (!chart_y_axis_number_date_format_negative_sign %in% list_chart_y_axis_number_date_format_negative_sign) { + stop("`chart_y_axis_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_y_axis_number_date_format_negative_sign)) { + chart_y_axis_number_date_format_negative_sign <- as.character(chart_y_axis_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_y_axis_number_date_format_negative_sign])[[1]] + new_list$x$state$y_formatting$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$y_formatting$strip_zeros <- chart_y_axis_number_date_format_strip_zeros + new_list$x$state$y_formatting$strip_separator <- chart_y_axis_number_date_format_strip_separator + new_list$x$state$y_formatting$transform_labels <- chart_y_axis_number_date_format_transform_labels + list_chart_y_axis_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_y_axis_number_date_format_transform)) { + if (!chart_y_axis_number_date_format_transform %in% list_chart_y_axis_number_date_format_transform) { + stop("`chart_y_axis_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_y_axis_number_date_format_transform)) { + chart_y_axis_number_date_format_transform <- as.character(chart_y_axis_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_y_axis_number_date_format_transform])[[1]] + new_list$x$state$y_formatting$transform <- named_list_value + } + } + } + } + new_list$x$state$y_formatting$multiply_divide_constant <- chart_y_axis_number_date_format_multiply_divide_constant + new_list$x$state$y_formatting$exponentiate_constant <- chart_y_axis_number_date_format_exponentiate_constant + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$filter_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$filter_control$control_styles <- chart_filter_controls_control_styles + new_list$x$state$filter_control$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$filter_control$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$filter_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$filter_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$filter_control$slider_width <- chart_filter_controls_slider_width + new_list$x$state$filter_control$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$filter_control$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$filter_control$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$filter_control$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$filter_control$sort <- named_list_value + } + } + } + } + new_list$x$state$filter_show_all <- filter_show_all + new_list$x$state$filter_show_all_text <- filter_show_all_text + list_chart_filter_controls_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_filter_controls_container_alignment)) { + if (!chart_filter_controls_container_alignment %in% list_chart_filter_controls_container_alignment) { + stop("`chart_filter_controls_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_container_alignment %in% names(named_list)) { + if (is.logical(chart_filter_controls_container_alignment)) { + chart_filter_controls_container_alignment <- as.character(chart_filter_controls_container_alignment) + } + named_list_value <- unname(named_list[chart_filter_controls_container_alignment])[[1]] + new_list$x$state$controls_container$alignment <- named_list_value + } + } + } + } + new_list$x$state$controls_container$controls_spacing <- chart_filter_controls_container_controls_spacing + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + new_list$x$state$axes_highlights$x_enabled <- chart_axes_highlights_x_enabled + if (length(chart_axes_highlights_x_lines) > 1) { + new_list$x$state$axes_highlights$x_lines <- paste(chart_axes_highlights_x_lines, collapse = "\n") + } else { + new_list$x$state$axes_highlights$x_lines <- chart_axes_highlights_x_lines + } + + new_list$x$state$axes_highlights$x_line_color <- chart_axes_highlights_x_line_color + new_list$x$state$axes_highlights$x_line_width <- chart_axes_highlights_x_line_width + new_list$x$state$axes_highlights$x_line_dash <- chart_axes_highlights_x_line_dash + if (length(chart_axes_highlights_x_areas) > 1) { + new_list$x$state$axes_highlights$x_areas <- paste(chart_axes_highlights_x_areas, collapse = "\n") + } else { + new_list$x$state$axes_highlights$x_areas <- chart_axes_highlights_x_areas + } + + new_list$x$state$axes_highlights$x_area_color <- chart_axes_highlights_x_area_color + new_list$x$state$axes_highlights$x_area_opacity <- chart_axes_highlights_x_area_opacity + list_chart_axes_highlights_x_area_texture <- c("none", "pattern-diagonal", "pattern-grid", "pattern-dots", NULL) + if (!is.null(chart_axes_highlights_x_area_texture)) { + if (!chart_axes_highlights_x_area_texture %in% list_chart_axes_highlights_x_area_texture) { + stop("`chart_axes_highlights_x_area_texture` must be one of: c('none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_area_texture %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_area_texture)) { + chart_axes_highlights_x_area_texture <- as.character(chart_axes_highlights_x_area_texture) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_area_texture])[[1]] + new_list$x$state$axes_highlights$x_area_texture <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_vertical <- chart_axes_highlights_x_label_vertical + list_chart_axes_highlights_x_label_y_position <- c("bottom", "middle", "top", NULL) + if (!is.null(chart_axes_highlights_x_label_y_position)) { + if (!chart_axes_highlights_x_label_y_position %in% list_chart_axes_highlights_x_label_y_position) { + stop("`chart_axes_highlights_x_label_y_position` must be one of: c('bottom', 'middle', 'top')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "middle": "middle", "top": "top"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "middle": "middle", "top": "top"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_label_y_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_label_y_position)) { + chart_axes_highlights_x_label_y_position <- as.character(chart_axes_highlights_x_label_y_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_label_y_position])[[1]] + new_list$x$state$axes_highlights$x_label_y_position <- named_list_value + } + } + } + } + list_chart_axes_highlights_x_label_x_position <- c("left", "middle", "right", NULL) + if (!is.null(chart_axes_highlights_x_label_x_position)) { + if (!chart_axes_highlights_x_label_x_position %in% list_chart_axes_highlights_x_label_x_position) { + stop("`chart_axes_highlights_x_label_x_position` must be one of: c('left', 'middle', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_label_x_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_label_x_position)) { + chart_axes_highlights_x_label_x_position <- as.character(chart_axes_highlights_x_label_x_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_label_x_position])[[1]] + new_list$x$state$axes_highlights$x_label_x_position <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_max_width <- chart_axes_highlights_x_label_max_width + new_list$x$state$axes_highlights$x_font_size <- chart_axes_highlights_x_font_size + list_chart_axes_highlights_x_font_weight <- c("regular", "bold", NULL) + if (!is.null(chart_axes_highlights_x_font_weight)) { + if (!chart_axes_highlights_x_font_weight %in% list_chart_axes_highlights_x_font_weight) { + stop("`chart_axes_highlights_x_font_weight` must be one of: c('regular', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_font_weight %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_font_weight)) { + chart_axes_highlights_x_font_weight <- as.character(chart_axes_highlights_x_font_weight) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_font_weight])[[1]] + new_list$x$state$axes_highlights$x_font_weight <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_color <- chart_axes_highlights_x_label_color + new_list$x$state$axes_highlights$x_shadow_color <- chart_axes_highlights_x_shadow_color + new_list$x$state$axes_highlights$x_shadow_enabled <- chart_axes_highlights_x_shadow_enabled + new_list$x$state$axes_highlights$y_enabled <- chart_axes_highlights_y_enabled + if (length(chart_axes_highlights_y_lines) > 1) { + new_list$x$state$axes_highlights$y_lines <- paste(chart_axes_highlights_y_lines, collapse = "\n") + } else { + new_list$x$state$axes_highlights$y_lines <- chart_axes_highlights_y_lines + } + + new_list$x$state$axes_highlights$y_line_color <- chart_axes_highlights_y_line_color + new_list$x$state$axes_highlights$y_line_width <- chart_axes_highlights_y_line_width + new_list$x$state$axes_highlights$y_line_dash <- chart_axes_highlights_y_line_dash + if (length(chart_axes_highlights_y_areas) > 1) { + new_list$x$state$axes_highlights$y_areas <- paste(chart_axes_highlights_y_areas, collapse = "\n") + } else { + new_list$x$state$axes_highlights$y_areas <- chart_axes_highlights_y_areas + } + + new_list$x$state$axes_highlights$y_area_color <- chart_axes_highlights_y_area_color + new_list$x$state$axes_highlights$y_area_opacity <- chart_axes_highlights_y_area_opacity + list_chart_axes_highlights_y_area_texture <- c("none", "pattern-diagonal", "pattern-grid", "pattern-dots", NULL) + if (!is.null(chart_axes_highlights_y_area_texture)) { + if (!chart_axes_highlights_y_area_texture %in% list_chart_axes_highlights_y_area_texture) { + stop("`chart_axes_highlights_y_area_texture` must be one of: c('none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_area_texture %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_area_texture)) { + chart_axes_highlights_y_area_texture <- as.character(chart_axes_highlights_y_area_texture) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_area_texture])[[1]] + new_list$x$state$axes_highlights$y_area_texture <- named_list_value + } + } + } + } + list_chart_axes_highlights_y_label_x_position <- c("left", "middle", "right", NULL) + if (!is.null(chart_axes_highlights_y_label_x_position)) { + if (!chart_axes_highlights_y_label_x_position %in% list_chart_axes_highlights_y_label_x_position) { + stop("`chart_axes_highlights_y_label_x_position` must be one of: c('left', 'middle', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_label_x_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_label_x_position)) { + chart_axes_highlights_y_label_x_position <- as.character(chart_axes_highlights_y_label_x_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_label_x_position])[[1]] + new_list$x$state$axes_highlights$y_label_x_position <- named_list_value + } + } + } + } + list_chart_axes_highlights_y_label_y_position <- c("above", "middle", "below", NULL) + if (!is.null(chart_axes_highlights_y_label_y_position)) { + if (!chart_axes_highlights_y_label_y_position %in% list_chart_axes_highlights_y_label_y_position) { + stop("`chart_axes_highlights_y_label_y_position` must be one of: c('above', 'middle', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "middle": "middle", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "middle": "middle", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_label_y_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_label_y_position)) { + chart_axes_highlights_y_label_y_position <- as.character(chart_axes_highlights_y_label_y_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_label_y_position])[[1]] + new_list$x$state$axes_highlights$y_label_y_position <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$y_label_max_width <- chart_axes_highlights_y_label_max_width + new_list$x$state$axes_highlights$y_font_size <- chart_axes_highlights_y_font_size + list_chart_axes_highlights_y_font_weight <- c("regular", "bold", NULL) + if (!is.null(chart_axes_highlights_y_font_weight)) { + if (!chart_axes_highlights_y_font_weight %in% list_chart_axes_highlights_y_font_weight) { + stop("`chart_axes_highlights_y_font_weight` must be one of: c('regular', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_font_weight %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_font_weight)) { + chart_axes_highlights_y_font_weight <- as.character(chart_axes_highlights_y_font_weight) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_font_weight])[[1]] + new_list$x$state$axes_highlights$y_font_weight <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$y_label_color <- chart_axes_highlights_y_label_color + new_list$x$state$axes_highlights$y_shadow_color <- chart_axes_highlights_y_shadow_color + new_list$x$state$axes_highlights$y_shadow_enabled <- chart_axes_highlights_y_shadow_enabled + list_axes_highlights_stack_order <- c("above_data", "below_data", NULL) + if (!is.null(axes_highlights_stack_order)) { + if (!axes_highlights_stack_order %in% list_axes_highlights_stack_order) { + stop("`axes_highlights_stack_order` must be one of: c('above_data', 'below_data')") + } else { + if (length(jsonlite::fromJSON('{"above_data": "above_data", "below_data": "below_data"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above_data": "above_data", "below_data": "below_data"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && axes_highlights_stack_order %in% names(named_list)) { + if (is.logical(axes_highlights_stack_order)) { + axes_highlights_stack_order <- as.character(axes_highlights_stack_order) + } + named_list_value <- unname(named_list[axes_highlights_stack_order])[[1]] + new_list$x$state$axes_highlights_stack_order <- named_list_value + } + } + } + } + new_list$x$state$annotations_styles <- annotations_styles + list_chart_annotations_defaults_text_weight <- c("normal", "bold", NULL) + if (!is.null(chart_annotations_defaults_text_weight)) { + if (!chart_annotations_defaults_text_weight %in% list_chart_annotations_defaults_text_weight) { + stop("`chart_annotations_defaults_text_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_text_weight %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_text_weight)) { + chart_annotations_defaults_text_weight <- as.character(chart_annotations_defaults_text_weight) + } + named_list_value <- unname(named_list[chart_annotations_defaults_text_weight])[[1]] + new_list$x$state$annotations$defaults$text_weight <- named_list_value + } + } + } + } + new_list$x$state$annotations$defaults$text_size <- chart_annotations_defaults_text_size + new_list$x$state$annotations$defaults$text_color <- chart_annotations_defaults_text_color + new_list$x$state$annotations$defaults$label_width <- chart_annotations_defaults_label_width + list_chart_annotations_defaults_text_background_mode <- c("none", "outline", "background", NULL) + if (!is.null(chart_annotations_defaults_text_background_mode)) { + if (!chart_annotations_defaults_text_background_mode %in% list_chart_annotations_defaults_text_background_mode) { + stop("`chart_annotations_defaults_text_background_mode` must be one of: c('none', 'outline', 'background')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "outline": "outline", "background": "background"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "outline": "outline", "background": "background"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_text_background_mode %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_text_background_mode)) { + chart_annotations_defaults_text_background_mode <- as.character(chart_annotations_defaults_text_background_mode) + } + named_list_value <- unname(named_list[chart_annotations_defaults_text_background_mode])[[1]] + new_list$x$state$annotations$defaults$text_background_mode <- named_list_value + } + } + } + } + new_list$x$state$annotations$defaults$text_bg <- chart_annotations_defaults_text_bg + new_list$x$state$annotations$defaults$label_bg <- chart_annotations_defaults_label_bg + list_chart_annotations_defaults_text_alignment <- c("auto", "start", "center", "end", NULL) + if (!is.null(chart_annotations_defaults_text_alignment)) { + if (!chart_annotations_defaults_text_alignment %in% list_chart_annotations_defaults_text_alignment) { + stop("`chart_annotations_defaults_text_alignment` must be one of: c('auto', 'start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_text_alignment %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_text_alignment)) { + chart_annotations_defaults_text_alignment <- as.character(chart_annotations_defaults_text_alignment) + } + named_list_value <- unname(named_list[chart_annotations_defaults_text_alignment])[[1]] + new_list$x$state$annotations$defaults$text_alignment <- named_list_value + } + } + } + } + list_chart_annotations_defaults_popup_position <- c("center", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_annotations_defaults_popup_position)) { + if (!chart_annotations_defaults_popup_position %in% list_chart_annotations_defaults_popup_position) { + stop("`chart_annotations_defaults_popup_position` must be one of: c('center', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"center": "center", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"center": "center", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_popup_position %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_popup_position)) { + chart_annotations_defaults_popup_position <- as.character(chart_annotations_defaults_popup_position) + } + named_list_value <- unname(named_list[chart_annotations_defaults_popup_position])[[1]] + new_list$x$state$annotations$defaults$popup_position <- named_list_value + } + } + } + } + list_chart_annotations_defaults_line_marker <- c("none", "arrowhead_open", "arrowhead", NULL) + if (!is.null(chart_annotations_defaults_line_marker)) { + if (!chart_annotations_defaults_line_marker %in% list_chart_annotations_defaults_line_marker) { + stop("`chart_annotations_defaults_line_marker` must be one of: c('none', 'arrowhead_open', 'arrowhead')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "arrowhead_open": "arrowhead_open", "arrowhead": "arrowhead"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "arrowhead_open": "arrowhead_open", "arrowhead": "arrowhead"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_line_marker %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_line_marker)) { + chart_annotations_defaults_line_marker <- as.character(chart_annotations_defaults_line_marker) + } + named_list_value <- unname(named_list[chart_annotations_defaults_line_marker])[[1]] + new_list$x$state$annotations$defaults$line_marker <- named_list_value + } + } + } + } + new_list$x$state$annotations$defaults$stroke_width <- chart_annotations_defaults_stroke_width + new_list$x$state$annotations$defaults$stroke_color <- chart_annotations_defaults_stroke_color + list_chart_annotations_defaults_connector_extend_line <- c("enabled", "disabled", NULL) + if (!is.null(chart_annotations_defaults_connector_extend_line)) { + if (!chart_annotations_defaults_connector_extend_line %in% list_chart_annotations_defaults_connector_extend_line) { + stop("`chart_annotations_defaults_connector_extend_line` must be one of: c('enabled', 'disabled')") + } else { + if (length(jsonlite::fromJSON('{"enabled": "enabled", "disabled": "disabled"}')) > 1) { + named_list <- jsonlite::fromJSON('{"enabled": "enabled", "disabled": "disabled"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_connector_extend_line %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_connector_extend_line)) { + chart_annotations_defaults_connector_extend_line <- as.character(chart_annotations_defaults_connector_extend_line) + } + named_list_value <- unname(named_list[chart_annotations_defaults_connector_extend_line])[[1]] + new_list$x$state$annotations$defaults$connector_extend_line <- named_list_value + } + } + } + } + new_list$x$state$animation_duration <- animation_duration + list_chart_background_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_background_background_color_enabled)) { + if (!chart_background_background_color_enabled %in% list_chart_background_background_color_enabled) { + stop("`chart_background_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_background_background_color_enabled)) { + chart_background_background_color_enabled <- as.character(chart_background_background_color_enabled) + } + named_list_value <- unname(named_list[chart_background_background_color_enabled])[[1]] + new_list$x$state$chart_bg$background_color_enabled <- named_list_value + } + } + } + } + list_chart_background_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_background_background_image_enabled)) { + if (!chart_background_background_image_enabled %in% list_chart_background_background_image_enabled) { + stop("`chart_background_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_background_background_image_enabled)) { + chart_background_background_image_enabled <- as.character(chart_background_background_image_enabled) + } + named_list_value <- unname(named_list[chart_background_background_image_enabled])[[1]] + new_list$x$state$chart_bg$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$chart_bg$background_color <- chart_background_background_color + new_list$x$state$chart_bg$background_image_src <- chart_background_background_image_src + list_chart_background_background_image_size <- c("stretch", "slice", "meet", NULL) + if (!is.null(chart_background_background_image_size)) { + if (!chart_background_background_image_size %in% list_chart_background_background_image_size) { + stop("`chart_background_background_image_size` must be one of: c('stretch', 'slice', 'meet')") + } else { + if (length(jsonlite::fromJSON('{"stretch": "stretch", "slice": "slice", "meet": "meet"}')) > 1) { + named_list <- jsonlite::fromJSON('{"stretch": "stretch", "slice": "slice", "meet": "meet"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_size %in% names(named_list)) { + if (is.logical(chart_background_background_image_size)) { + chart_background_background_image_size <- as.character(chart_background_background_image_size) + } + named_list_value <- unname(named_list[chart_background_background_image_size])[[1]] + new_list$x$state$chart_bg$background_image_size <- named_list_value + } + } + } + } + list_chart_background_background_image_position <- c("x_min_y_min", "x_mid_y_min", "x_max_y_min", "x_max_y_mid", "x_mid_y_mid", "x_min_y_max", "x_mid_y_max", "x_max_y_max", NULL) + if (!is.null(chart_background_background_image_position)) { + if (!chart_background_background_image_position %in% list_chart_background_background_image_position) { + stop("`chart_background_background_image_position` must be one of: c('x_min_y_min', 'x_mid_y_min', 'x_max_y_min', 'x_max_y_mid', 'x_mid_y_mid', 'x_min_y_max', 'x_mid_y_max', 'x_max_y_max')") + } else { + if (length(jsonlite::fromJSON('{"x_min_y_min": "xMinYMin", "x_mid_y_min": "xMidYMin", "x_max_y_min": "xMaxYMin", "x_max_y_mid": "xMaxYMid", "x_mid_y_mid": "xMidYMid", "x_min_y_max": "xMinYMax", "x_mid_y_max": "xMidYMax", "x_max_y_max": "xMaxYMax"}')) > 1) { + named_list <- jsonlite::fromJSON('{"x_min_y_min": "xMinYMin", "x_mid_y_min": "xMidYMin", "x_max_y_min": "xMaxYMin", "x_max_y_mid": "xMaxYMid", "x_mid_y_mid": "xMidYMid", "x_min_y_max": "xMinYMax", "x_mid_y_max": "xMidYMax", "x_max_y_max": "xMaxYMax"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_position %in% names(named_list)) { + if (is.logical(chart_background_background_image_position)) { + chart_background_background_image_position <- as.character(chart_background_background_image_position) + } + named_list_value <- unname(named_list[chart_background_background_image_position])[[1]] + new_list$x$state$chart_bg$background_image_position <- named_list_value + } + } + } + } + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_network_graph_details.R b/R_package/R/set_network_graph_details.R new file mode 100644 index 0000000..d3bff73 --- /dev/null +++ b/R_package/R/set_network_graph_details.R @@ -0,0 +1,2855 @@ +#' Set network graph chart details +#' @name set_network_graph_details +#' @param chart_type Choices: regular, radial. Flourish type hint: string, defaults to `NULL` +#' @param radial_sort Radial sort mode. Choices: auto, none, clockwise, counter_clockwise. Whether sorting will be applied or not and in which direction. Flourish type hint: string, defaults to `NULL` +#' @param radial_sort_primary Primary sort. Choices: group, id, size, link_count, link_value. The primary criteria used when ordering points. If there are ties when sorting the data the secondary sorting criteria is applied. Flourish type hint: string, defaults to `NULL` +#' @param radial_sort_secondary Secondary sort. Choices: group, id, size, link_count, link_value. The secondary criteria used when ordering points. It is applied in cases where the primary sorting criteria results in a tie. Flourish type hint: string, defaults to `NULL` +#' @param height_mode Height mode. Choices: auto, fill_space, aspect. How the graphics height is determined; ignored when embedded in a fixed-height context such as a simple iframe embed. Auto sets the height based on the chart type, data and width. Standard uses the default Flourish responsive sizing. Aspect ratio sets the aspect of each plot. Please note that animations between slides in a story will only work in Aspect ratio mode. Flourish type hint: string, defaults to `NULL` +#' @param facet_aspect Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param facet_aspect_mobile Aspect (mobile). Aspect of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param facet_aspect_breakpoint Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to `NULL` +#' @param ring_padding Ring padding (%). Adds extra spacing around the outside of the radial layout. Flourish type hint: number, defaults to `NULL` +#' @param ring_angle Ring rotation. The number of degrees to rotate the radial layout. Flourish type hint: number, defaults to `NULL` +#' @param fill_color Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param node_scale_pack Pack points to fit radial layout. Scale points relatively to fit tightly around the perimiter of the radial layout, without leaving space between points. If enabled this option overrides other point sizing options in this section. Flourish type hint: boolean, defaults to `NULL` +#' @param constant_node_radius Radius. The radius of your points (in px). Flourish type hint: number, defaults to `NULL` +#' @param min_node_radius Minimum radius. Flourish type hint: number, defaults to `NULL` +#' @param max_node_radius Maximum radius. The maximum radius of your points (in px). Flourish type hint: number, defaults to `NULL` +#' @param point_opacity Opacity (default). How opaque the default state of the points in your network should be. Flourish type hint: number, defaults to `NULL` +#' @param fade_opacity Opacity (unhighlighted). When a point is emphasized, how opaque the rest of the network should be. Flourish type hint: number, defaults to `NULL` +#' @param image_opacity Image opacity. How opaque the images in your points should be. Flourish type hint: number, defaults to `NULL` +#' @param node_stroke_width Width. Flourish type hint: number, defaults to `NULL` +#' @param node_stroke_color Color. When not set, stroke color is same as background color. Flourish type hint: color, defaults to `NULL` +#' @param node_highlight_stroke_color Color (highlighted). When not set, stroke color is same as background color. Flourish type hint: color, defaults to `NULL` +#' @param points_advanced Advanced point settings. Flourish type hint: boolean, defaults to `NULL` +#' @param node_scale_type Scale points relative to:. Choices: current, arbitrary. Flourish type hint: string, defaults to `NULL` +#' @param max_node_value Value. Values bigger than this maximum will have a radius equal to the maximum radius. Flourish type hint: number, defaults to `NULL` +#' @param auto_scale Scale points down when not enough space. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param max_fullness Max total point area. What percent of the space can the points fill before they are scaled down. Flourish type hint: number, defaults to `NULL` +#' @param label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param label_weight Weight. Choices: bold, regular. Flourish type hint: string, defaults to `NULL` +#' @param label_color_mode Color mode. Choices: auto, fixed. Flourish type hint: string, defaults to `NULL` +#' @param label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param label_show Show. Choices: auto, all, neighbourhood, click, none. When to show node labels. If set to "Auto" behavior is dynamic depending on chart type and available space. Flourish type hint: string, defaults to `NULL` +#' @param link_color Color. When not set, uses same color as main text. Flourish type hint: color, defaults to `NULL` +#' @param link_opacity Opacity. How opaque the links between your points should be. Flourish type hint: number, defaults to `NULL` +#' @param constant_link_width Width. Flourish type hint: number, defaults to `NULL` +#' @param min_link_width Minimum width. Any smaller links will be scaled up to the specified level. (Ignored if greater than the Maximum width setting.). Flourish type hint: number, defaults to `NULL` +#' @param max_link_width Maximum width. Flourish type hint: number, defaults to `NULL` +#' @param max_link_value Value. Values bigger than this maximum will have a width equal to the maximum width. Flourish type hint: number, defaults to `NULL` +#' @param links_advanced Advanced link settings. Flourish type hint: boolean, defaults to `NULL` +#' @param directional Show arrows on links. Flourish type hint: boolean, defaults to `NULL` +#' @param link_scale_type Scale links relative to:. Choices: current, arbitrary. Flourish type hint: string, defaults to `NULL` +#' @param link_highlight_color Color (highlighted). When not set, uses same color as main text. Flourish type hint: color, defaults to `NULL` +#' @param link_highlight_opacity Opacity (highlighted). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_show_popups Popups. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_is_custom Popup contents. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_custom_template Popup content. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_show_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_style_popups Custom styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_text_color Text colour. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_text_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_fill_color Fill colour. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_border_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param popup_opacity Popup opacity on overlap. When the popup is overlapping other points and links, the opacity of the popup will change so most of the chart is still visible. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param legend_position Position. Choices: above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param legend_interaction When clicking a legend item. Choices: filter_and_layout, filter_in_position, none. Flourish type hint: string, defaults to `NULL` +#' @param animate_simulation Animate network simulation. Display the initial animation of the network. Flourish type hint: boolean, defaults to `NULL` +#' @param simulation_speed Animation speed. The speed of the initial animation (in ms). Flourish type hint: number, defaults to `NULL` +#' @param animate_transition Animate layout transitions. Enable or disable layout transitions. Flourish type hint: boolean, defaults to `NULL` +#' @param transition_scale Transition duration. The duration multiplier for transition animations. Flourish type hint: number, defaults to `NULL` +#' @param many_body_strength Repulsion between points. How strongly the points repulse each others. Known as many-body force. Measured in arbitrary units. Flourish type hint: number, defaults to `NULL` +#' @param collision_strength Collision-force strength. How strongly the points push away from each other when colliding. In arbitrary units. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_localization_input_decimal_separator Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_output_separators Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "network", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_network_graph_data(gapminder) |> +#' set_network_graph_details() +#' ) +#' @export + +set_network_graph_details <- function( + ., + chart_type = NULL, + radial_sort = NULL, + radial_sort_primary = NULL, + radial_sort_secondary = NULL, + height_mode = NULL, + facet_aspect = NULL, + facet_aspect_mobile = NULL, + facet_aspect_breakpoint = NULL, + ring_padding = NULL, + ring_angle = NULL, + fill_color = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + node_scale_pack = NULL, + constant_node_radius = NULL, + min_node_radius = NULL, + max_node_radius = NULL, + point_opacity = NULL, + fade_opacity = NULL, + image_opacity = NULL, + node_stroke_width = NULL, + node_stroke_color = NULL, + node_highlight_stroke_color = NULL, + points_advanced = NULL, + node_scale_type = NULL, + max_node_value = NULL, + auto_scale = NULL, + max_fullness = NULL, + label_size = NULL, + label_weight = NULL, + label_color_mode = NULL, + label_color = NULL, + label_show = NULL, + link_color = NULL, + link_opacity = NULL, + constant_link_width = NULL, + min_link_width = NULL, + max_link_width = NULL, + max_link_value = NULL, + links_advanced = NULL, + directional = NULL, + link_scale_type = NULL, + link_highlight_color = NULL, + link_highlight_opacity = NULL, + chart_popup_show_popups = NULL, + chart_popup_is_custom = NULL, + chart_popup_custom_template = NULL, + chart_popup_show_pointer = NULL, + chart_popup_show_shadow = NULL, + chart_popup_style_popups = NULL, + chart_popup_text_color = NULL, + chart_popup_align = NULL, + chart_popup_text_size = NULL, + chart_popup_fill_color = NULL, + chart_popup_opacity = NULL, + chart_popup_padding = NULL, + chart_popup_border_radius = NULL, + chart_popup_max_width = NULL, + popup_opacity = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_position = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + legend_interaction = NULL, + animate_simulation = NULL, + simulation_speed = NULL, + animate_transition = NULL, + transition_scale = NULL, + many_body_strength = NULL, + collision_strength = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "network_graph") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/network-graph")) { + stop("`set_network_graph_details()` is not supported for this chart type.") + } + list_chart_type <- c("regular", "radial", NULL) + if (!is.null(chart_type)) { + if (!chart_type %in% list_chart_type) { + stop("`chart_type` must be one of: c('regular', 'radial')") + } else { + if (length(jsonlite::fromJSON('{"regular": "regular", "radial": "radial"}')) > 1) { + named_list <- jsonlite::fromJSON('{"regular": "regular", "radial": "radial"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_type %in% names(named_list)) { + if (is.logical(chart_type)) { + chart_type <- as.character(chart_type) + } + named_list_value <- unname(named_list[chart_type])[[1]] + new_list$x$state$chart_type <- named_list_value + } + } + } + } + list_radial_sort <- c("auto", "none", "clockwise", "counter_clockwise", NULL) + if (!is.null(radial_sort)) { + if (!radial_sort %in% list_radial_sort) { + stop("`radial_sort` must be one of: c('auto', 'none', 'clockwise', 'counter_clockwise')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "none": "none", "clockwise": "clockwise", "counter_clockwise": "counter_clockwise"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "none": "none", "clockwise": "clockwise", "counter_clockwise": "counter_clockwise"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && radial_sort %in% names(named_list)) { + if (is.logical(radial_sort)) { + radial_sort <- as.character(radial_sort) + } + named_list_value <- unname(named_list[radial_sort])[[1]] + new_list$x$state$radial_sort <- named_list_value + } + } + } + } + list_radial_sort_primary <- c("group", "id", "size", "link_count", "link_value", NULL) + if (!is.null(radial_sort_primary)) { + if (!radial_sort_primary %in% list_radial_sort_primary) { + stop("`radial_sort_primary` must be one of: c('group', 'id', 'size', 'link_count', 'link_value')") + } else { + if (length(jsonlite::fromJSON('{"group": "group", "id": "id", "size": "size", "link_count": "link_count", "link_value": "link_value"}')) > 1) { + named_list <- jsonlite::fromJSON('{"group": "group", "id": "id", "size": "size", "link_count": "link_count", "link_value": "link_value"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && radial_sort_primary %in% names(named_list)) { + if (is.logical(radial_sort_primary)) { + radial_sort_primary <- as.character(radial_sort_primary) + } + named_list_value <- unname(named_list[radial_sort_primary])[[1]] + new_list$x$state$radial_sort_primary <- named_list_value + } + } + } + } + list_radial_sort_secondary <- c("group", "id", "size", "link_count", "link_value", NULL) + if (!is.null(radial_sort_secondary)) { + if (!radial_sort_secondary %in% list_radial_sort_secondary) { + stop("`radial_sort_secondary` must be one of: c('group', 'id', 'size', 'link_count', 'link_value')") + } else { + if (length(jsonlite::fromJSON('{"group": "group", "id": "id", "size": "size", "link_count": "link_count", "link_value": "link_value"}')) > 1) { + named_list <- jsonlite::fromJSON('{"group": "group", "id": "id", "size": "size", "link_count": "link_count", "link_value": "link_value"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && radial_sort_secondary %in% names(named_list)) { + if (is.logical(radial_sort_secondary)) { + radial_sort_secondary <- as.character(radial_sort_secondary) + } + named_list_value <- unname(named_list[radial_sort_secondary])[[1]] + new_list$x$state$radial_sort_secondary <- named_list_value + } + } + } + } + list_height_mode <- c("auto", "fill_space", "aspect", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('auto', 'fill_space', 'aspect')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fill_space": "fill_space", "aspect": "aspect"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fill_space": "fill_space", "aspect": "aspect"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + new_list$x$state$facet_aspect <- facet_aspect + new_list$x$state$facet_aspect_mobile <- facet_aspect_mobile + new_list$x$state$facet_aspect_breakpoint <- facet_aspect_breakpoint + new_list$x$state$ring_padding <- ring_padding + new_list$x$state$ring_angle <- ring_angle + new_list$x$state$fill_color <- fill_color + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$node_scale_pack <- node_scale_pack + new_list$x$state$constant_node_radius <- constant_node_radius + new_list$x$state$min_node_radius <- min_node_radius + new_list$x$state$max_node_radius <- max_node_radius + new_list$x$state$point_opacity <- point_opacity + new_list$x$state$fade_opacity <- fade_opacity + new_list$x$state$image_opacity <- image_opacity + new_list$x$state$node_stroke_width <- node_stroke_width + new_list$x$state$node_stroke_color <- node_stroke_color + new_list$x$state$node_highlight_stroke_color <- node_highlight_stroke_color + new_list$x$state$points_advanced <- points_advanced + list_node_scale_type <- c("current", "arbitrary", NULL) + if (!is.null(node_scale_type)) { + if (!node_scale_type %in% list_node_scale_type) { + stop("`node_scale_type` must be one of: c('current', 'arbitrary')") + } else { + if (length(jsonlite::fromJSON('{"current": "current", "arbitrary": "arbitrary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"current": "current", "arbitrary": "arbitrary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && node_scale_type %in% names(named_list)) { + if (is.logical(node_scale_type)) { + node_scale_type <- as.character(node_scale_type) + } + named_list_value <- unname(named_list[node_scale_type])[[1]] + new_list$x$state$node_scale_type <- named_list_value + } + } + } + } + new_list$x$state$max_node_value <- max_node_value + list_auto_scale <- c(TRUE, FALSE, NULL) + if (!is.null(auto_scale)) { + if (!auto_scale %in% list_auto_scale) { + stop("`auto_scale` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && auto_scale %in% names(named_list)) { + if (is.logical(auto_scale)) { + auto_scale <- as.character(auto_scale) + } + named_list_value <- unname(named_list[auto_scale])[[1]] + new_list$x$state$auto_scale <- named_list_value + } + } + } + } + new_list$x$state$max_fullness <- max_fullness + new_list$x$state$label_size <- label_size + list_label_weight <- c("bold", "regular", NULL) + if (!is.null(label_weight)) { + if (!label_weight %in% list_label_weight) { + stop("`label_weight` must be one of: c('bold', 'regular')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "regular": "regular"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "regular": "regular"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_weight %in% names(named_list)) { + if (is.logical(label_weight)) { + label_weight <- as.character(label_weight) + } + named_list_value <- unname(named_list[label_weight])[[1]] + new_list$x$state$label_weight <- named_list_value + } + } + } + } + list_label_color_mode <- c("auto", "fixed", NULL) + if (!is.null(label_color_mode)) { + if (!label_color_mode %in% list_label_color_mode) { + stop("`label_color_mode` must be one of: c('auto', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_color_mode %in% names(named_list)) { + if (is.logical(label_color_mode)) { + label_color_mode <- as.character(label_color_mode) + } + named_list_value <- unname(named_list[label_color_mode])[[1]] + new_list$x$state$label_color_mode <- named_list_value + } + } + } + } + new_list$x$state$label_color <- label_color + list_label_show <- c("auto", "all", "neighbourhood", "click", "none", NULL) + if (!is.null(label_show)) { + if (!label_show %in% list_label_show) { + stop("`label_show` must be one of: c('auto', 'all', 'neighbourhood', 'click', 'none')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "all": "all", "neighbourhood": "neighbourhood", "click": "click", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "all": "all", "neighbourhood": "neighbourhood", "click": "click", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_show %in% names(named_list)) { + if (is.logical(label_show)) { + label_show <- as.character(label_show) + } + named_list_value <- unname(named_list[label_show])[[1]] + new_list$x$state$label_show <- named_list_value + } + } + } + } + new_list$x$state$link_color <- link_color + new_list$x$state$link_opacity <- link_opacity + new_list$x$state$constant_link_width <- constant_link_width + new_list$x$state$min_link_width <- min_link_width + new_list$x$state$max_link_width <- max_link_width + new_list$x$state$max_link_value <- max_link_value + new_list$x$state$links_advanced <- links_advanced + new_list$x$state$directional <- directional + list_link_scale_type <- c("current", "arbitrary", NULL) + if (!is.null(link_scale_type)) { + if (!link_scale_type %in% list_link_scale_type) { + stop("`link_scale_type` must be one of: c('current', 'arbitrary')") + } else { + if (length(jsonlite::fromJSON('{"current": "current", "arbitrary": "arbitrary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"current": "current", "arbitrary": "arbitrary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && link_scale_type %in% names(named_list)) { + if (is.logical(link_scale_type)) { + link_scale_type <- as.character(link_scale_type) + } + named_list_value <- unname(named_list[link_scale_type])[[1]] + new_list$x$state$link_scale_type <- named_list_value + } + } + } + } + new_list$x$state$link_highlight_color <- link_highlight_color + new_list$x$state$link_highlight_opacity <- link_highlight_opacity + list_chart_popup_show_popups <- c(TRUE, FALSE, NULL) + if (!is.null(chart_popup_show_popups)) { + if (!chart_popup_show_popups %in% list_chart_popup_show_popups) { + stop("`chart_popup_show_popups` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_show_popups %in% names(named_list)) { + if (is.logical(chart_popup_show_popups)) { + chart_popup_show_popups <- as.character(chart_popup_show_popups) + } + named_list_value <- unname(named_list[chart_popup_show_popups])[[1]] + new_list$x$state$popup$show_popups <- named_list_value + } + } + } + } + list_chart_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_is_custom)) { + if (!chart_popup_is_custom %in% list_chart_popup_is_custom) { + stop("`chart_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_is_custom)) { + chart_popup_is_custom <- as.character(chart_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_is_custom])[[1]] + new_list$x$state$popup$is_custom <- named_list_value + } + } + } + } + if (length(chart_popup_custom_template) > 1) { + new_list$x$state$popup$custom_template <- paste(chart_popup_custom_template, collapse = "\n") + } else { + new_list$x$state$popup$custom_template <- chart_popup_custom_template + } + + new_list$x$state$popup$show_pointer <- chart_popup_show_pointer + new_list$x$state$popup$show_shadow <- chart_popup_show_shadow + new_list$x$state$popup$style_popups <- chart_popup_style_popups + new_list$x$state$popup$text_color <- chart_popup_text_color + list_chart_popup_align <- c("left", "center", "right", NULL) + if (!is.null(chart_popup_align)) { + if (!chart_popup_align %in% list_chart_popup_align) { + stop("`chart_popup_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_align)) { + chart_popup_align <- as.character(chart_popup_align) + } + named_list_value <- unname(named_list[chart_popup_align])[[1]] + new_list$x$state$popup$align <- named_list_value + } + } + } + } + new_list$x$state$popup$text_size <- chart_popup_text_size + new_list$x$state$popup$fill_color <- chart_popup_fill_color + new_list$x$state$popup$opacity <- chart_popup_opacity + new_list$x$state$popup$padding <- chart_popup_padding + new_list$x$state$popup$border_radius <- chart_popup_border_radius + new_list$x$state$popup$max_width <- chart_popup_max_width + new_list$x$state$popup_opacity <- popup_opacity + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_legend_position <- c("above", "below", NULL) + if (!is.null(legend_position)) { + if (!legend_position %in% list_legend_position) { + stop("`legend_position` must be one of: c('above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_position %in% names(named_list)) { + if (is.logical(legend_position)) { + legend_position <- as.character(legend_position) + } + named_list_value <- unname(named_list[legend_position])[[1]] + new_list$x$state$legend_position <- named_list_value + } + } + } + } + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_legend_interaction <- c("filter_and_layout", "filter_in_position", "none", NULL) + if (!is.null(legend_interaction)) { + if (!legend_interaction %in% list_legend_interaction) { + stop("`legend_interaction` must be one of: c('filter_and_layout', 'filter_in_position', 'none')") + } else { + if (length(jsonlite::fromJSON('{"filter_and_layout": "filter_and_layout", "filter_in_position": "filter_in_position", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"filter_and_layout": "filter_and_layout", "filter_in_position": "filter_in_position", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_interaction %in% names(named_list)) { + if (is.logical(legend_interaction)) { + legend_interaction <- as.character(legend_interaction) + } + named_list_value <- unname(named_list[legend_interaction])[[1]] + new_list$x$state$legend_interaction <- named_list_value + } + } + } + } + new_list$x$state$animate_simulation <- animate_simulation + new_list$x$state$simulation_speed <- simulation_speed + new_list$x$state$animate_transition <- animate_transition + new_list$x$state$transition_scale <- transition_scale + new_list$x$state$many_body_strength <- many_body_strength + new_list$x$state$collision_strength <- collision_strength + list_chart_number_localization_input_decimal_separator <- c(".", ",", NULL) + if (!is.null(chart_number_localization_input_decimal_separator)) { + if (!chart_number_localization_input_decimal_separator %in% list_chart_number_localization_input_decimal_separator) { + stop("`chart_number_localization_input_decimal_separator` must be one of: c('.', ',')") + } else { + if (length(jsonlite::fromJSON('{".": ".", ",": ","}')) > 1) { + named_list <- jsonlite::fromJSON('{".": ".", ",": ","}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_input_decimal_separator %in% names(named_list)) { + if (is.logical(chart_number_localization_input_decimal_separator)) { + chart_number_localization_input_decimal_separator <- as.character(chart_number_localization_input_decimal_separator) + } + named_list_value <- unname(named_list[chart_number_localization_input_decimal_separator])[[1]] + new_list$x$state$localization$input_decimal_separator <- named_list_value + } + } + } + } + list_chart_number_localization_output_separators <- c(",.", ".,", ".", ",", " .", " ,", NULL) + if (!is.null(chart_number_localization_output_separators)) { + if (!chart_number_localization_output_separators %in% list_chart_number_localization_output_separators) { + stop("`chart_number_localization_output_separators` must be one of: c(',.', '.,', '.', ',', ' .', ' ,')") + } else { + if (length(jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}')) > 1) { + named_list <- jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_output_separators %in% names(named_list)) { + if (is.logical(chart_number_localization_output_separators)) { + chart_number_localization_output_separators <- as.character(chart_number_localization_output_separators) + } + named_list_value <- unname(named_list[chart_number_localization_output_separators])[[1]] + new_list$x$state$localization$output_separators <- named_list_value + } + } + } + } + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_number_ticker_details.R b/R_package/R/set_number_ticker_details.R new file mode 100644 index 0000000..56949b9 --- /dev/null +++ b/R_package/R/set_number_ticker_details.R @@ -0,0 +1,1852 @@ +#' Set number ticker chart details +#' @name set_number_ticker_details +#' @param mode Choices: simple, custom. Flourish type hint: string, defaults to `NULL` +#' @param number_start Tick from. Flourish type hint: number, defaults to `NULL` +#' @param number Tick to. Flourish type hint: number, defaults to `NULL` +#' @param custom_template Text and `{{numbers}}`. Put numbers to tick in double braces, e.g. `{{1000}}` to tick from 0 to 1000, or `{{-1000/1000}}` to count from -1000 to 1000. You can also use markdown styling, e.g. **bold** and *italic* or custom HTMLFlourish type hint: text, defaults to `NULL` +#' @param font_unit Font size mode. Choices: vw, rem. When set to Scale with page, the text will always take up the same proportion of the page width, on any page size (e.g. mobile or desktop) When set to Default the text will be scaled responsively in the same way as other text components, such as the header text. Flourish type hint: string, defaults to `NULL` +#' @param font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param font_weight Font weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param duration Duration. How many seconds you want the animation to last for. Flourish type hint: number, defaults to `NULL` +#' @param easing Tick rate. Choices: constant, speed_up, slow_down, fast_slow_fast. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_input_decimal_separator Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_output_separators Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to `NULL` +#' @param value_format_prefix Prefix. Text to place in front of number. Flourish type hint: string, defaults to `NULL` +#' @param value_format_suffix Suffix. Text to place after number. Flourish type hint: string, defaults to `NULL` +#' @param value_format_n_dec Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param value_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param value_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param value_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param value_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param value_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param value_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param value_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param value_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "number_ticker", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' set_number_ticker_details() +#' ) +#' @export + +set_number_ticker_details <- function( + ., + mode = NULL, + number_start = NULL, + number = NULL, + custom_template = NULL, + font_unit = NULL, + font_size = NULL, + text_color = NULL, + font_weight = NULL, + line_height = NULL, + duration = NULL, + easing = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + value_format_prefix = NULL, + value_format_suffix = NULL, + value_format_n_dec = NULL, + value_format_advanced = NULL, + value_format_negative_sign = NULL, + value_format_strip_zeros = NULL, + value_format_strip_separator = NULL, + value_format_transform_labels = NULL, + value_format_transform = NULL, + value_format_multiply_divide_constant = NULL, + value_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "number_ticker") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/number-ticker")) { + stop("`set_number_ticker_details()` is not supported for this chart type.") + } + list_mode <- c("simple", "custom", NULL) + if (!is.null(mode)) { + if (!mode %in% list_mode) { + stop("`mode` must be one of: c('simple', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"simple": "simple", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"simple": "simple", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && mode %in% names(named_list)) { + if (is.logical(mode)) { + mode <- as.character(mode) + } + named_list_value <- unname(named_list[mode])[[1]] + new_list$x$state$mode <- named_list_value + } + } + } + } + new_list$x$state$number_start <- number_start + new_list$x$state$number <- number + if (length(custom_template) > 1) { + new_list$x$state$custom_template <- paste(custom_template, collapse = "\n") + } else { + new_list$x$state$custom_template <- custom_template + } + + list_font_unit <- c("vw", "rem", NULL) + if (!is.null(font_unit)) { + if (!font_unit %in% list_font_unit) { + stop("`font_unit` must be one of: c('vw', 'rem')") + } else { + if (length(jsonlite::fromJSON('{"vw": "vw", "rem": "rem"}')) > 1) { + named_list <- jsonlite::fromJSON('{"vw": "vw", "rem": "rem"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && font_unit %in% names(named_list)) { + if (is.logical(font_unit)) { + font_unit <- as.character(font_unit) + } + named_list_value <- unname(named_list[font_unit])[[1]] + new_list$x$state$font_unit <- named_list_value + } + } + } + } + new_list$x$state$font_size <- font_size + new_list$x$state$text_color <- text_color + list_font_weight <- c("normal", "bold", NULL) + if (!is.null(font_weight)) { + if (!font_weight %in% list_font_weight) { + stop("`font_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && font_weight %in% names(named_list)) { + if (is.logical(font_weight)) { + font_weight <- as.character(font_weight) + } + named_list_value <- unname(named_list[font_weight])[[1]] + new_list$x$state$font_weight <- named_list_value + } + } + } + } + new_list$x$state$line_height <- line_height + new_list$x$state$duration <- duration + list_easing <- c("constant", "speed_up", "slow_down", "fast_slow_fast", NULL) + if (!is.null(easing)) { + if (!easing %in% list_easing) { + stop("`easing` must be one of: c('constant', 'speed_up', 'slow_down', 'fast_slow_fast')") + } else { + if (length(jsonlite::fromJSON('{"constant": "constant", "speed_up": "speed_up", "slow_down": "slow_down", "fast_slow_fast": "fast_slow_fast"}')) > 1) { + named_list <- jsonlite::fromJSON('{"constant": "constant", "speed_up": "speed_up", "slow_down": "slow_down", "fast_slow_fast": "fast_slow_fast"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && easing %in% names(named_list)) { + if (is.logical(easing)) { + easing <- as.character(easing) + } + named_list_value <- unname(named_list[easing])[[1]] + new_list$x$state$easing <- named_list_value + } + } + } + } + list_chart_number_localization_input_decimal_separator <- c(".", ",", NULL) + if (!is.null(chart_number_localization_input_decimal_separator)) { + if (!chart_number_localization_input_decimal_separator %in% list_chart_number_localization_input_decimal_separator) { + stop("`chart_number_localization_input_decimal_separator` must be one of: c('.', ',')") + } else { + if (length(jsonlite::fromJSON('{".": ".", ",": ","}')) > 1) { + named_list <- jsonlite::fromJSON('{".": ".", ",": ","}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_input_decimal_separator %in% names(named_list)) { + if (is.logical(chart_number_localization_input_decimal_separator)) { + chart_number_localization_input_decimal_separator <- as.character(chart_number_localization_input_decimal_separator) + } + named_list_value <- unname(named_list[chart_number_localization_input_decimal_separator])[[1]] + new_list$x$state$localization$input_decimal_separator <- named_list_value + } + } + } + } + list_chart_number_localization_output_separators <- c(",.", ".,", ".", ",", " .", " ,", NULL) + if (!is.null(chart_number_localization_output_separators)) { + if (!chart_number_localization_output_separators %in% list_chart_number_localization_output_separators) { + stop("`chart_number_localization_output_separators` must be one of: c(',.', '.,', '.', ',', ' .', ' ,')") + } else { + if (length(jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}')) > 1) { + named_list <- jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_output_separators %in% names(named_list)) { + if (is.logical(chart_number_localization_output_separators)) { + chart_number_localization_output_separators <- as.character(chart_number_localization_output_separators) + } + named_list_value <- unname(named_list[chart_number_localization_output_separators])[[1]] + new_list$x$state$localization$output_separators <- named_list_value + } + } + } + } + new_list$x$state$value_format$prefix <- value_format_prefix + new_list$x$state$value_format$suffix <- value_format_suffix + new_list$x$state$value_format$n_dec <- value_format_n_dec + new_list$x$state$value_format$advanced <- value_format_advanced + list_value_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(value_format_negative_sign)) { + if (!value_format_negative_sign %in% list_value_format_negative_sign) { + stop("`value_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && value_format_negative_sign %in% names(named_list)) { + if (is.logical(value_format_negative_sign)) { + value_format_negative_sign <- as.character(value_format_negative_sign) + } + named_list_value <- unname(named_list[value_format_negative_sign])[[1]] + new_list$x$state$value_format$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$value_format$strip_zeros <- value_format_strip_zeros + new_list$x$state$value_format$strip_separator <- value_format_strip_separator + new_list$x$state$value_format$transform_labels <- value_format_transform_labels + list_value_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(value_format_transform)) { + if (!value_format_transform %in% list_value_format_transform) { + stop("`value_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && value_format_transform %in% names(named_list)) { + if (is.logical(value_format_transform)) { + value_format_transform <- as.character(value_format_transform) + } + named_list_value <- unname(named_list[value_format_transform])[[1]] + new_list$x$state$value_format$transform <- named_list_value + } + } + } + } + new_list$x$state$value_format$multiply_divide_constant <- value_format_multiply_divide_constant + new_list$x$state$value_format$exponentiate_constant <- value_format_exponentiate_constant + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_parliament_chart_details.R b/R_package/R/set_parliament_chart_details.R new file mode 100644 index 0000000..8261659 --- /dev/null +++ b/R_package/R/set_parliament_chart_details.R @@ -0,0 +1,2886 @@ +#' Set parliament chart chart details +#' @name set_parliament_chart_details +#' @param num_of_seats Number of seats. This number is ignored if the value is lower than the actual number of seats in your data. Flourish type hint: number, defaults to `NULL` +#' @param hemicycle_arc Size of arc. In degrees. Flourish type hint: number, defaults to `NULL` +#' @param circle_inner Inner space. As a % of the circle. Flourish type hint: number, defaults to `NULL` +#' @param manual_row_count Number of rows. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param num_of_rows Rows. Flourish type hint: number, defaults to `NULL` +#' @param use_hover_animation Highlight parties on hover. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param unassigned_color Unassigned outline color. Flourish type hint: color, defaults to `NULL` +#' @param count_font_size Size. If the font size means that the seat count is too large to fit within the parliament, the text will be automatically scaled to fit. Flourish type hint: number, defaults to `NULL` +#' @param count_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param party_font_size Size. If the font size means that the party name is too large to fit within the parliament, the text will be automatically scaled to fit. Flourish type hint: number, defaults to `NULL` +#' @param party_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param legend_hide_empty_parties Dont include parties that dont have any seats. Flourish type hint: boolean, defaults to `NULL` +#' @param show_table Show table. Flourish type hint: boolean, defaults to `NULL` +#' @param gain_color Gain color. Flourish type hint: color, defaults to `NULL` +#' @param loss_color Loss color. Flourish type hint: color, defaults to `NULL` +#' @param default_text_color Default color. Flourish type hint: color, defaults to `NULL` +#' @param header_weight Header text. Choices: bold, normal, italic. Flourish type hint: string, defaults to `NULL` +#' @param margin_table Margin. Flourish type hint: number, defaults to `NULL` +#' @param show_seat_change Choices: off, auto, custom. This adds a new column that shows the change between 2 columns. "Auto" will compare the last 2 columns in your data "Custom" will allow you to handpick 2 columns to compare. Flourish type hint: string, defaults to `NULL` +#' @param seat_change_before Seat change before. Add the name of the column you want to compare with. Flourish type hint: string, defaults to `NULL` +#' @param seat_change_after Seat change after. Add the name of the column you want to compare with. Flourish type hint: string, defaults to `NULL` +#' @param seat_change_label Column name. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param majority_threshold_line_enabled Show a line for the majority threshold. Draws a line at 50%. Flourish type hint: boolean, defaults to `NULL` +#' @param majority_threshold_line_content Text. Flourish type hint: string, defaults to `NULL` +#' @param majority_threshold_line_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param majority_threshold_line_dashoffset Dash width and offset. In pixels, eg. 2,2. Flourish type hint: string, defaults to `NULL` +#' @param majority_threshold_line_width Thickness. In pixels. Flourish type hint: number, defaults to `NULL` +#' @param majority_threshold_line_color Color. Flourish type hint: color, defaults to `NULL` +#' @param animation_duration Animation duration. How long the seats take to "flip" when changing party, in seconds. Flourish type hint: number, defaults to `NULL` +#' @param animation_stagger Animation spread. How many seconds to spread the seat animations across. Flourish type hint: number, defaults to `NULL` +#' @param animate_on_load Animate on load. Whether to animate the seats when the visualisations first loads. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. The controls show up if youve selected multiple value columns. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_controls_spacing Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_localization_input_decimal_separator Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_output_separators Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "parliament", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_parliament_chart_data(gapminder) |> +#' set_parliament_chart_details() +#' ) +#' @export + +set_parliament_chart_details <- function( + ., + num_of_seats = NULL, + hemicycle_arc = NULL, + circle_inner = NULL, + manual_row_count = NULL, + num_of_rows = NULL, + use_hover_animation = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + unassigned_color = NULL, + count_font_size = NULL, + count_weight = NULL, + party_font_size = NULL, + party_weight = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + legend_hide_empty_parties = NULL, + show_table = NULL, + gain_color = NULL, + loss_color = NULL, + default_text_color = NULL, + header_weight = NULL, + margin_table = NULL, + show_seat_change = NULL, + seat_change_before = NULL, + seat_change_after = NULL, + seat_change_label = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + majority_threshold_line_enabled = NULL, + majority_threshold_line_content = NULL, + majority_threshold_line_text_color = NULL, + majority_threshold_line_dashoffset = NULL, + majority_threshold_line_width = NULL, + majority_threshold_line_color = NULL, + animation_duration = NULL, + animation_stagger = NULL, + animate_on_load = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "parliament_chart") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/parliament-chart")) { + stop("`set_parliament_chart_details()` is not supported for this chart type.") + } + new_list$x$state$num_of_seats <- num_of_seats + new_list$x$state$hemicycle_arc <- hemicycle_arc + new_list$x$state$circle_inner <- circle_inner + list_manual_row_count <- c(FALSE, TRUE, NULL) + if (!is.null(manual_row_count)) { + if (!manual_row_count %in% list_manual_row_count) { + stop("`manual_row_count` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && manual_row_count %in% names(named_list)) { + if (is.logical(manual_row_count)) { + manual_row_count <- as.character(manual_row_count) + } + named_list_value <- unname(named_list[manual_row_count])[[1]] + new_list$x$state$manual_row_count <- named_list_value + } + } + } + } + new_list$x$state$num_of_rows <- num_of_rows + new_list$x$state$use_hover_animation <- use_hover_animation + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$unassigned_color <- unassigned_color + new_list$x$state$count_font_size <- count_font_size + list_count_weight <- c("normal", "bold", NULL) + if (!is.null(count_weight)) { + if (!count_weight %in% list_count_weight) { + stop("`count_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && count_weight %in% names(named_list)) { + if (is.logical(count_weight)) { + count_weight <- as.character(count_weight) + } + named_list_value <- unname(named_list[count_weight])[[1]] + new_list$x$state$count_weight <- named_list_value + } + } + } + } + new_list$x$state$party_font_size <- party_font_size + list_party_weight <- c("normal", "bold", NULL) + if (!is.null(party_weight)) { + if (!party_weight %in% list_party_weight) { + stop("`party_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && party_weight %in% names(named_list)) { + if (is.logical(party_weight)) { + party_weight <- as.character(party_weight) + } + named_list_value <- unname(named_list[party_weight])[[1]] + new_list$x$state$party_weight <- named_list_value + } + } + } + } + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + new_list$x$state$legend_hide_empty_parties <- legend_hide_empty_parties + new_list$x$state$show_table <- show_table + new_list$x$state$gain_color <- gain_color + new_list$x$state$loss_color <- loss_color + new_list$x$state$default_text_color <- default_text_color + list_header_weight <- c("bold", "normal", "italic", NULL) + if (!is.null(header_weight)) { + if (!header_weight %in% list_header_weight) { + stop("`header_weight` must be one of: c('bold', 'normal', 'italic')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal", "italic": "italic"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal", "italic": "italic"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && header_weight %in% names(named_list)) { + if (is.logical(header_weight)) { + header_weight <- as.character(header_weight) + } + named_list_value <- unname(named_list[header_weight])[[1]] + new_list$x$state$header_weight <- named_list_value + } + } + } + } + new_list$x$state$margin_table <- margin_table + list_show_seat_change <- c("off", "auto", "custom", NULL) + if (!is.null(show_seat_change)) { + if (!show_seat_change %in% list_show_seat_change) { + stop("`show_seat_change` must be one of: c('off', 'auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"off": "off", "auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"off": "off", "auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && show_seat_change %in% names(named_list)) { + if (is.logical(show_seat_change)) { + show_seat_change <- as.character(show_seat_change) + } + named_list_value <- unname(named_list[show_seat_change])[[1]] + new_list$x$state$show_seat_change <- named_list_value + } + } + } + } + new_list$x$state$seat_change_before <- seat_change_before + new_list$x$state$seat_change_after <- seat_change_after + new_list$x$state$seat_change_label <- seat_change_label + new_list$x$state$seat_format$prefix <- chart_number_date_format_prefix + new_list$x$state$seat_format$suffix <- chart_number_date_format_suffix + new_list$x$state$seat_format$n_dec <- chart_number_date_format_n_dec + new_list$x$state$seat_format$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$seat_format$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$seat_format$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$seat_format$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$seat_format$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$seat_format$transform <- named_list_value + } + } + } + } + new_list$x$state$seat_format$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$seat_format$exponentiate_constant <- chart_number_date_format_exponentiate_constant + new_list$x$state$majority_threshold_line_enabled <- majority_threshold_line_enabled + new_list$x$state$majority_threshold_line_content <- majority_threshold_line_content + new_list$x$state$majority_threshold_line_text_color <- majority_threshold_line_text_color + new_list$x$state$majority_threshold_line_dashoffset <- majority_threshold_line_dashoffset + new_list$x$state$majority_threshold_line_width <- majority_threshold_line_width + new_list$x$state$majority_threshold_line_color <- majority_threshold_line_color + new_list$x$state$animation_duration <- animation_duration + new_list$x$state$animation_stagger <- animation_stagger + new_list$x$state$animate_on_load <- animate_on_load + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$controls$control_type <- named_list_value + } + } + } + } + new_list$x$state$controls$control_styles <- chart_filter_controls_control_styles + new_list$x$state$controls$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$controls$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$controls$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$controls$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$controls$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$controls$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$controls$slider_width <- chart_filter_controls_slider_width + new_list$x$state$controls$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$controls$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$controls$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$controls$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$controls$sort <- named_list_value + } + } + } + } + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$slider_style$track_color <- chart_slider_control_style_track_color + new_list$x$state$slider_style$font_color <- chart_slider_control_style_font_color + new_list$x$state$slider_style$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$slider_style$play_color <- chart_slider_control_style_play_color + new_list$x$state$slider_style$track_height <- chart_slider_control_style_track_height + new_list$x$state$slider_style$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$slider_style$play_button <- chart_slider_control_style_play_button + list_chart_filter_controls_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_filter_controls_container_alignment)) { + if (!chart_filter_controls_container_alignment %in% list_chart_filter_controls_container_alignment) { + stop("`chart_filter_controls_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_container_alignment %in% names(named_list)) { + if (is.logical(chart_filter_controls_container_alignment)) { + chart_filter_controls_container_alignment <- as.character(chart_filter_controls_container_alignment) + } + named_list_value <- unname(named_list[chart_filter_controls_container_alignment])[[1]] + new_list$x$state$controls_container$alignment <- named_list_value + } + } + } + } + new_list$x$state$controls_container$controls_spacing <- chart_filter_controls_container_controls_spacing + list_chart_number_localization_input_decimal_separator <- c(".", ",", NULL) + if (!is.null(chart_number_localization_input_decimal_separator)) { + if (!chart_number_localization_input_decimal_separator %in% list_chart_number_localization_input_decimal_separator) { + stop("`chart_number_localization_input_decimal_separator` must be one of: c('.', ',')") + } else { + if (length(jsonlite::fromJSON('{".": ".", ",": ","}')) > 1) { + named_list <- jsonlite::fromJSON('{".": ".", ",": ","}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_input_decimal_separator %in% names(named_list)) { + if (is.logical(chart_number_localization_input_decimal_separator)) { + chart_number_localization_input_decimal_separator <- as.character(chart_number_localization_input_decimal_separator) + } + named_list_value <- unname(named_list[chart_number_localization_input_decimal_separator])[[1]] + new_list$x$state$localization$input_decimal_separator <- named_list_value + } + } + } + } + list_chart_number_localization_output_separators <- c(",.", ".,", ".", ",", " .", " ,", NULL) + if (!is.null(chart_number_localization_output_separators)) { + if (!chart_number_localization_output_separators %in% list_chart_number_localization_output_separators) { + stop("`chart_number_localization_output_separators` must be one of: c(',.', '.,', '.', ',', ' .', ' ,')") + } else { + if (length(jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}')) > 1) { + named_list <- jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_output_separators %in% names(named_list)) { + if (is.logical(chart_number_localization_output_separators)) { + chart_number_localization_output_separators <- as.character(chart_number_localization_output_separators) + } + named_list_value <- unname(named_list[chart_number_localization_output_separators])[[1]] + new_list$x$state$localization$output_separators <- named_list_value + } + } + } + } + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_photo_slider_details.R b/R_package/R/set_photo_slider_details.R new file mode 100644 index 0000000..a4e6f64 --- /dev/null +++ b/R_package/R/set_photo_slider_details.R @@ -0,0 +1,1646 @@ +#' Set photo slider chart details +#' @name set_photo_slider_details +#' @param mode Before/after mode. Choices: slide, fade, spotlight. Flourish type hint: string, defaults to `NULL` +#' @param spotlight_size Spotlight size. Flourish type hint: number, defaults to `NULL` +#' @param spotlight_blur Spotlight blur. Flourish type hint: number, defaults to `NULL` +#' @param spotlight_speed Spotlight animation. Time it takes to animate from one spotlight position to another in the story player Flourish type hint: number, defaults to `NULL` +#' @param photo_1_big Flourish type hint: url, defaults to `NULL` +#' @param has_photo_1_small Add smaller version for mobile. (Optional) Mobile versions will be loaded quicker on smaller screens. Flourish type hint: boolean, defaults to `NULL` +#' @param photo_1_small Photo 1 (mobile version). This picture should be roughly 500px wide. Flourish type hint: url, defaults to `NULL` +#' @param photo_2_big Flourish type hint: url, defaults to `NULL` +#' @param has_photo_2_small Add smaller version for mobile. (Optional) Mobile versions will be loaded quicker on smaller screens. Flourish type hint: boolean, defaults to `NULL` +#' @param photo_2_small Photo 2 (mobile version). This picture should be roughly 500px wide. Flourish type hint: url, defaults to `NULL` +#' @param slider_radius Size. Flourish type hint: number, defaults to `NULL` +#' @param slider_fill_type Type. Choices: color, image. Flourish type hint: string, defaults to `NULL` +#' @param slider_fill_image Image. Flourish type hint: url, defaults to `NULL` +#' @param slider_fill_overlay Fill. Flourish type hint: color, defaults to `NULL` +#' @param slider_fill_standalone Fill (outside picture). Flourish type hint: color, defaults to `NULL` +#' @param slider_line_thickness Slider line thickness. Flourish type hint: number, defaults to `NULL` +#' @param slider_line_color Slider line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "photo_slider", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' set_photo_slider_details() +#' ) +#' @export + +set_photo_slider_details <- function( + ., + mode = NULL, + spotlight_size = NULL, + spotlight_blur = NULL, + spotlight_speed = NULL, + photo_1_big = NULL, + has_photo_1_small = NULL, + photo_1_small = NULL, + photo_2_big = NULL, + has_photo_2_small = NULL, + photo_2_small = NULL, + slider_radius = NULL, + slider_fill_type = NULL, + slider_fill_image = NULL, + slider_fill_overlay = NULL, + slider_fill_standalone = NULL, + slider_line_thickness = NULL, + slider_line_color = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "photo_slider") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/photo-slider")) { + stop("`set_photo_slider_details()` is not supported for this chart type.") + } + list_mode <- c("slide", "fade", "spotlight", NULL) + if (!is.null(mode)) { + if (!mode %in% list_mode) { + stop("`mode` must be one of: c('slide', 'fade', 'spotlight')") + } else { + if (length(jsonlite::fromJSON('{"slide": "slide", "fade": "fade", "spotlight": "spotlight"}')) > 1) { + named_list <- jsonlite::fromJSON('{"slide": "slide", "fade": "fade", "spotlight": "spotlight"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && mode %in% names(named_list)) { + if (is.logical(mode)) { + mode <- as.character(mode) + } + named_list_value <- unname(named_list[mode])[[1]] + new_list$x$state$mode <- named_list_value + } + } + } + } + new_list$x$state$spotlight_size <- spotlight_size + new_list$x$state$spotlight_blur <- spotlight_blur + new_list$x$state$spotlight_speed <- spotlight_speed + new_list$x$state$photo_1_big <- photo_1_big + new_list$x$state$has_photo_1_small <- has_photo_1_small + new_list$x$state$photo_1_small <- photo_1_small + new_list$x$state$photo_2_big <- photo_2_big + new_list$x$state$has_photo_2_small <- has_photo_2_small + new_list$x$state$photo_2_small <- photo_2_small + new_list$x$state$slider_radius <- slider_radius + list_slider_fill_type <- c("color", "image", NULL) + if (!is.null(slider_fill_type)) { + if (!slider_fill_type %in% list_slider_fill_type) { + stop("`slider_fill_type` must be one of: c('color', 'image')") + } else { + if (length(jsonlite::fromJSON('{"color": "color", "image": "image"}')) > 1) { + named_list <- jsonlite::fromJSON('{"color": "color", "image": "image"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && slider_fill_type %in% names(named_list)) { + if (is.logical(slider_fill_type)) { + slider_fill_type <- as.character(slider_fill_type) + } + named_list_value <- unname(named_list[slider_fill_type])[[1]] + new_list$x$state$slider_fill_type <- named_list_value + } + } + } + } + new_list$x$state$slider_fill_image <- slider_fill_image + new_list$x$state$slider_fill_overlay <- slider_fill_overlay + new_list$x$state$slider_fill_standalone <- slider_fill_standalone + new_list$x$state$slider_line_thickness <- slider_line_thickness + new_list$x$state$slider_line_color <- slider_line_color + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_pictogram_details.R b/R_package/R/set_pictogram_details.R new file mode 100644 index 0000000..d5eaf99 --- /dev/null +++ b/R_package/R/set_pictogram_details.R @@ -0,0 +1,4323 @@ +#' Set pictogram chart details +#' @name set_pictogram_details +#' @param bar_orientation Bar orientation. Choices: vertical, horizontal. Defines the orientation of the bars (vertical or horizontal). Flourish type hint: string, defaults to `NULL` +#' @param flip_bars Flip bars. Flip the bars so they point in the opposite direction. Flourish type hint: boolean, defaults to `NULL` +#' @param bar_padding Bar padding (%). Padding surrounding bars (as a percentage of bar width). Flourish type hint: number, defaults to `NULL` +#' @param plot_aspect_ratio Aspect (desktop). The aspect ratio of the pictogram plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. This only applies when embedding using a script (i.e., not AMP or iframe ). Flourish type hint: number, defaults to `NULL` +#' @param plot_aspect_ratio_mobile Aspect (mobile). The aspect ratio of the pictogram plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. This only applies when embedding using a script (i.e., not AMP or iframe ). Flourish type hint: number, defaults to `NULL` +#' @param plot_aspect_ratio_breakpoint Breakpoint. The screen width at which mobile mode ends and desktop begins. This only applies when embedding using a script (i.e., not AMP or iframe ). Flourish type hint: number, defaults to `NULL` +#' @param icons Icons. Choices: binding, user, female, male, baby, child, wheelchair, angry, frown, meh, smile, smile-beam, thumbs-up, thumbs-down, hands-helping, hand-rock, hand-peace, dollar-sign, euro-sign, money-bill, money-bill-wave, pound-sign, coins, shopping-bag, shopping-cart, circle, square, star, heart, comment, cat, dog, dove, bus, car, biking, running, plane, suitcase, pizza-slice, ice-cream, coffee, wine-glass-alt, building, home, store, industry, database, laptop, microchip, phone, mobile-alt, tv, clock, atom, award, music, leaf, lightbulb, sun, wrench, airbnb, amazon, android, apple, bitcoin, facebook, google, linux, microsoft, twitter, windows, youtube. Use your own icons using icon bindings, or choose a built-in icon Flourish type hint: string, defaults to `NULL` +#' @param icon_padding Icon padding (%). Padding surrounding icons (as a percentage of the icon size). Flourish type hint: number, defaults to `NULL` +#' @param auto_icon_value Auto icon value. Automatically calculate a sensible value for each icon. Flourish type hint: boolean, defaults to `NULL` +#' @param icon_value Icon value. The value that each icon represents. Flourish type hint: number, defaults to `NULL` +#' @param icon_color Icon color. The color of the icons. Flourish type hint: color, defaults to `NULL` +#' @param icon_style Icon style. Choices: solid, outline. The style (solid or outline) of the icons. Flourish type hint: string, defaults to `NULL` +#' @param icon_stroke_thickness Icon outline thickness (%). The outline thickness (as a percentage of the icon size). Flourish type hint: number, defaults to `NULL` +#' @param use_filler_icons Use filler icons. Fill empty space with icons Flourish type hint: boolean, defaults to `NULL` +#' @param filler_icon_color Filler icon color. Color of filler icons. Flourish type hint: color, defaults to `NULL` +#' @param max_bar_value Maximum bar value. (Optional) Maximum bar value (the remaining bar space will be filled with filler icons ). A value less than the largest bar value is disregarded. Flourish type hint: number, defaults to `NULL` +#' @param fill_final_row Fill final row. Fill the final row of icons with filler icons (so that a grid of icons is formed). Flourish type hint: boolean, defaults to `NULL` +#' @param filler_icons Filler icon. Choices: auto, user, female, male, baby, child, wheelchair, angry, frown, meh, smile, smile-beam, thumbs-up, thumbs-down, hands-helping, hand-rock, hand-peace, dollar-sign, euro-sign, money-bill, money-bill-wave, pound-sign, coins, shopping-bag, shopping-cart, circle, square, star, heart, comment, cat, dog, dove, bus, car, biking, running, plane, suitcase, pizza-slice, ice-cream, coffee, wine-glass-alt, building, home, store, industry, database, laptop, microchip, phone, mobile-alt, tv, clock, atom, award, music, leaf, lightbulb, sun, wrench, airbnb, amazon, android, apple, bitcoin, facebook, google, linux, microsoft, twitter, windows, youtube. Icon used to fill remaining space. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param show_bar_labels Show bar labels. Flourish type hint: boolean, defaults to `NULL` +#' @param bar_label_size Size. Bar label size in rems (relative to the root font size). Flourish type hint: number, defaults to `NULL` +#' @param bar_label_color Color. Bar label color. Flourish type hint: color, defaults to `NULL` +#' @param bar_label_weight Weight. Choices: normal, bold. Bar label font weight. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_axis_position Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_y_axis_position Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_zero_axis Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_position Position. Choices: default, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_side Tick side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_localization_input_decimal_separator Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_output_separators Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_value_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_value_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_value_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_value_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_value_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_value_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_value_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_value_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_value_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_value_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_value_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_value_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_value_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_value_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param value_legend_icon Icon. Choices: auto, user, female, male, baby, child, wheelchair, angry, frown, meh, smile, smile-beam, thumbs-up, thumbs-down, hands-helping, hand-rock, hand-peace, dollar-sign, euro-sign, money-bill, money-bill-wave, pound-sign, coins, shopping-bag, shopping-cart, circle, square, star, heart, comment, cat, dog, dove, bus, car, biking, running, plane, suitcase, pizza-slice, ice-cream, coffee, wine-glass-alt, building, home, store, industry, database, laptop, microchip, phone, mobile-alt, tv, clock, atom, award, music, leaf, lightbulb, sun, wrench, airbnb, amazon, android, apple, bitcoin, facebook, google, linux, microsoft, twitter, windows, youtube. Icon used in legend. Flourish type hint: string, defaults to `NULL` +#' @param chart_icon_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_icon_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_icon_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_icon_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_icon_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_icon_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_icon_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_icon_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_icon_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_icon_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_icon_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_icon_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_icon_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_icon_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_color_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_color_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_color_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_color_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param value_control_visibility Show value control. Choices: always, editor, never. Sets whether the value control is always visible, only visible when editing or never visible. Flourish type hint: string, defaults to `NULL` +#' @param chart_value_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_value_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_value_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_value_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_value_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_value_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_value_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_value_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_value_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_value_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_value_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_value_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_value_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_value_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "pictogram", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_pictogram_data(gapminder) |> +#' set_pictogram_details() +#' ) +#' @export + +set_pictogram_details <- function( + ., + bar_orientation = NULL, + flip_bars = NULL, + bar_padding = NULL, + plot_aspect_ratio = NULL, + plot_aspect_ratio_mobile = NULL, + plot_aspect_ratio_breakpoint = NULL, + icons = NULL, + icon_padding = NULL, + auto_icon_value = NULL, + icon_value = NULL, + icon_color = NULL, + icon_style = NULL, + icon_stroke_thickness = NULL, + use_filler_icons = NULL, + filler_icon_color = NULL, + max_bar_value = NULL, + fill_final_row = NULL, + filler_icons = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + show_bar_labels = NULL, + bar_label_size = NULL, + bar_label_color = NULL, + bar_label_weight = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_value_legend_show_legend = NULL, + chart_value_legend_title_mode = NULL, + chart_value_legend_title = NULL, + chart_value_legend_swatch_width = NULL, + chart_value_legend_swatch_height = NULL, + chart_value_legend_swatch_radius = NULL, + chart_value_legend_legend_items_padding = NULL, + chart_value_legend_swatch_outline = NULL, + chart_value_legend_swatch_outline_color = NULL, + chart_value_legend_order_override = NULL, + chart_value_legend_icon_height = NULL, + chart_value_legend_icon_color = NULL, + chart_value_legend_max_width = NULL, + chart_value_legend_orientation = NULL, + value_legend_icon = NULL, + chart_icon_legend_show_legend = NULL, + chart_icon_legend_title_mode = NULL, + chart_icon_legend_title = NULL, + chart_icon_legend_swatch_width = NULL, + chart_icon_legend_swatch_height = NULL, + chart_icon_legend_swatch_radius = NULL, + chart_icon_legend_legend_items_padding = NULL, + chart_icon_legend_swatch_outline = NULL, + chart_icon_legend_swatch_outline_color = NULL, + chart_icon_legend_order_override = NULL, + chart_icon_legend_icon_height = NULL, + chart_icon_legend_icon_color = NULL, + chart_icon_legend_max_width = NULL, + chart_icon_legend_orientation = NULL, + chart_color_legend_show_legend = NULL, + chart_color_legend_title_mode = NULL, + chart_color_legend_title = NULL, + chart_color_legend_swatch_width = NULL, + chart_color_legend_swatch_height = NULL, + chart_color_legend_swatch_radius = NULL, + chart_color_legend_legend_items_padding = NULL, + chart_color_legend_swatch_outline = NULL, + chart_color_legend_swatch_outline_color = NULL, + chart_color_legend_order_override = NULL, + chart_color_legend_icon_height = NULL, + chart_color_legend_icon_color = NULL, + chart_color_legend_max_width = NULL, + chart_color_legend_orientation = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + value_control_visibility = NULL, + chart_value_filter_controls_control_type = NULL, + chart_value_filter_controls_control_styles = NULL, + chart_value_filter_controls_control_title = NULL, + chart_value_filter_controls_button_group = NULL, + chart_value_filter_controls_button_group_width_mode = NULL, + chart_value_filter_controls_button_group_width_fixed = NULL, + chart_value_filter_controls_dropdown_width_mode = NULL, + chart_value_filter_controls_dropdown_width_fixed = NULL, + chart_value_filter_controls_slider_width = NULL, + chart_value_filter_controls_slider_max_label_width = NULL, + chart_value_filter_controls_slider_step_time = NULL, + chart_value_filter_controls_slider_loop = NULL, + chart_value_filter_controls_slider_restart_pause = NULL, + chart_value_filter_controls_sort = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "pictogram") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/pictogram")) { + stop("`set_pictogram_details()` is not supported for this chart type.") + } + list_bar_orientation <- c("vertical", "horizontal", NULL) + if (!is.null(bar_orientation)) { + if (!bar_orientation %in% list_bar_orientation) { + stop("`bar_orientation` must be one of: c('vertical', 'horizontal')") + } else { + if (length(jsonlite::fromJSON('{"vertical": "vertical", "horizontal": "horizontal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"vertical": "vertical", "horizontal": "horizontal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && bar_orientation %in% names(named_list)) { + if (is.logical(bar_orientation)) { + bar_orientation <- as.character(bar_orientation) + } + named_list_value <- unname(named_list[bar_orientation])[[1]] + new_list$x$state$bar_orientation <- named_list_value + } + } + } + } + new_list$x$state$flip_bars <- flip_bars + new_list$x$state$bar_padding <- bar_padding + new_list$x$state$plot_aspect_ratio <- plot_aspect_ratio + new_list$x$state$plot_aspect_ratio_mobile <- plot_aspect_ratio_mobile + new_list$x$state$plot_aspect_ratio_breakpoint <- plot_aspect_ratio_breakpoint + list_icons <- c("binding", "user", "female", "male", "baby", "child", "wheelchair", "angry", "frown", "meh", "smile", "smile-beam", "thumbs-up", "thumbs-down", "hands-helping", "hand-rock", "hand-peace", "dollar-sign", "euro-sign", "money-bill", "money-bill-wave", "pound-sign", "coins", "shopping-bag", "shopping-cart", "circle", "square", "star", "heart", "comment", "cat", "dog", "dove", "bus", "car", "biking", "running", "plane", "suitcase", "pizza-slice", "ice-cream", "coffee", "wine-glass-alt", "building", "home", "store", "industry", "database", "laptop", "microchip", "phone", "mobile-alt", "tv", "clock", "atom", "award", "music", "leaf", "lightbulb", "sun", "wrench", "airbnb", "amazon", "android", "apple", "bitcoin", "facebook", "google", "linux", "microsoft", "twitter", "windows", "youtube", NULL) + if (!is.null(icons)) { + if (!icons %in% list_icons) { + stop("`icons` must be one of: c('binding', 'user', 'female', 'male', 'baby', 'child', 'wheelchair', 'angry', 'frown', 'meh', 'smile', 'smile-beam', 'thumbs-up', 'thumbs-down', 'hands-helping', 'hand-rock', 'hand-peace', 'dollar-sign', 'euro-sign', 'money-bill', 'money-bill-wave', 'pound-sign', 'coins', 'shopping-bag', 'shopping-cart', 'circle', 'square', 'star', 'heart', 'comment', 'cat', 'dog', 'dove', 'bus', 'car', 'biking', 'running', 'plane', 'suitcase', 'pizza-slice', 'ice-cream', 'coffee', 'wine-glass-alt', 'building', 'home', 'store', 'industry', 'database', 'laptop', 'microchip', 'phone', 'mobile-alt', 'tv', 'clock', 'atom', 'award', 'music', 'leaf', 'lightbulb', 'sun', 'wrench', 'airbnb', 'amazon', 'android', 'apple', 'bitcoin', 'facebook', 'google', 'linux', 'microsoft', 'twitter', 'windows', 'youtube')") + } else { + if (length(jsonlite::fromJSON('{"binding": "binding", "user": "user", "female": "female", "male": "male", "baby": "baby", "child": "child", "wheelchair": "wheelchair", "angry": "angry", "frown": "frown", "meh": "meh", "smile": "smile", "smile-beam": "smile-beam", "thumbs-up": "thumbs-up", "thumbs-down": "thumbs-down", "hands-helping": "hands-helping", "hand-rock": "hand-rock", "hand-peace": "hand-peace", "dollar-sign": "dollar-sign", "euro-sign": "euro-sign", "money-bill": "money-bill", "money-bill-wave": "money-bill-wave", "pound-sign": "pound-sign", "coins": "coins", "shopping-bag": "shopping-bag", "shopping-cart": "shopping-cart", "circle": "circle", "square": "square", "star": "star", "heart": "heart", "comment": "comment", "cat": "cat", "dog": "dog", "dove": "dove", "bus": "bus", "car": "car", "biking": "biking", "running": "running", "plane": "plane", "suitcase": "suitcase", "pizza-slice": "pizza-slice", "ice-cream": "ice-cream", "coffee": "coffee", "wine-glass-alt": "wine-glass-alt", "building": "building", "home": "home", "store": "store", "industry": "industry", "database": "database", "laptop": "laptop", "microchip": "microchip", "phone": "phone", "mobile-alt": "mobile-alt", "tv": "tv", "clock": "clock", "atom": "atom", "award": "award", "music": "music", "leaf": "leaf", "lightbulb": "lightbulb", "sun": "sun", "wrench": "wrench", "airbnb": "airbnb", "amazon": "amazon", "android": "android", "apple": "apple", "bitcoin": "bitcoin", "facebook": "facebook", "google": "google", "linux": "linux", "microsoft": "microsoft", "twitter": "twitter", "windows": "windows", "youtube": "youtube"}')) > 1) { + named_list <- jsonlite::fromJSON('{"binding": "binding", "user": "user", "female": "female", "male": "male", "baby": "baby", "child": "child", "wheelchair": "wheelchair", "angry": "angry", "frown": "frown", "meh": "meh", "smile": "smile", "smile-beam": "smile-beam", "thumbs-up": "thumbs-up", "thumbs-down": "thumbs-down", "hands-helping": "hands-helping", "hand-rock": "hand-rock", "hand-peace": "hand-peace", "dollar-sign": "dollar-sign", "euro-sign": "euro-sign", "money-bill": "money-bill", "money-bill-wave": "money-bill-wave", "pound-sign": "pound-sign", "coins": "coins", "shopping-bag": "shopping-bag", "shopping-cart": "shopping-cart", "circle": "circle", "square": "square", "star": "star", "heart": "heart", "comment": "comment", "cat": "cat", "dog": "dog", "dove": "dove", "bus": "bus", "car": "car", "biking": "biking", "running": "running", "plane": "plane", "suitcase": "suitcase", "pizza-slice": "pizza-slice", "ice-cream": "ice-cream", "coffee": "coffee", "wine-glass-alt": "wine-glass-alt", "building": "building", "home": "home", "store": "store", "industry": "industry", "database": "database", "laptop": "laptop", "microchip": "microchip", "phone": "phone", "mobile-alt": "mobile-alt", "tv": "tv", "clock": "clock", "atom": "atom", "award": "award", "music": "music", "leaf": "leaf", "lightbulb": "lightbulb", "sun": "sun", "wrench": "wrench", "airbnb": "airbnb", "amazon": "amazon", "android": "android", "apple": "apple", "bitcoin": "bitcoin", "facebook": "facebook", "google": "google", "linux": "linux", "microsoft": "microsoft", "twitter": "twitter", "windows": "windows", "youtube": "youtube"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && icons %in% names(named_list)) { + if (is.logical(icons)) { + icons <- as.character(icons) + } + named_list_value <- unname(named_list[icons])[[1]] + new_list$x$state$icons <- named_list_value + } + } + } + } + new_list$x$state$icon_padding <- icon_padding + new_list$x$state$auto_icon_value <- auto_icon_value + new_list$x$state$icon_value <- icon_value + new_list$x$state$icon_color <- icon_color + list_icon_style <- c("solid", "outline", NULL) + if (!is.null(icon_style)) { + if (!icon_style %in% list_icon_style) { + stop("`icon_style` must be one of: c('solid', 'outline')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "outline": "outline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "outline": "outline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && icon_style %in% names(named_list)) { + if (is.logical(icon_style)) { + icon_style <- as.character(icon_style) + } + named_list_value <- unname(named_list[icon_style])[[1]] + new_list$x$state$icon_style <- named_list_value + } + } + } + } + new_list$x$state$icon_stroke_thickness <- icon_stroke_thickness + new_list$x$state$use_filler_icons <- use_filler_icons + new_list$x$state$filler_icon_color <- filler_icon_color + new_list$x$state$max_bar_value <- max_bar_value + new_list$x$state$fill_final_row <- fill_final_row + list_filler_icons <- c("auto", "user", "female", "male", "baby", "child", "wheelchair", "angry", "frown", "meh", "smile", "smile-beam", "thumbs-up", "thumbs-down", "hands-helping", "hand-rock", "hand-peace", "dollar-sign", "euro-sign", "money-bill", "money-bill-wave", "pound-sign", "coins", "shopping-bag", "shopping-cart", "circle", "square", "star", "heart", "comment", "cat", "dog", "dove", "bus", "car", "biking", "running", "plane", "suitcase", "pizza-slice", "ice-cream", "coffee", "wine-glass-alt", "building", "home", "store", "industry", "database", "laptop", "microchip", "phone", "mobile-alt", "tv", "clock", "atom", "award", "music", "leaf", "lightbulb", "sun", "wrench", "airbnb", "amazon", "android", "apple", "bitcoin", "facebook", "google", "linux", "microsoft", "twitter", "windows", "youtube", NULL) + if (!is.null(filler_icons)) { + if (!filler_icons %in% list_filler_icons) { + stop("`filler_icons` must be one of: c('auto', 'user', 'female', 'male', 'baby', 'child', 'wheelchair', 'angry', 'frown', 'meh', 'smile', 'smile-beam', 'thumbs-up', 'thumbs-down', 'hands-helping', 'hand-rock', 'hand-peace', 'dollar-sign', 'euro-sign', 'money-bill', 'money-bill-wave', 'pound-sign', 'coins', 'shopping-bag', 'shopping-cart', 'circle', 'square', 'star', 'heart', 'comment', 'cat', 'dog', 'dove', 'bus', 'car', 'biking', 'running', 'plane', 'suitcase', 'pizza-slice', 'ice-cream', 'coffee', 'wine-glass-alt', 'building', 'home', 'store', 'industry', 'database', 'laptop', 'microchip', 'phone', 'mobile-alt', 'tv', 'clock', 'atom', 'award', 'music', 'leaf', 'lightbulb', 'sun', 'wrench', 'airbnb', 'amazon', 'android', 'apple', 'bitcoin', 'facebook', 'google', 'linux', 'microsoft', 'twitter', 'windows', 'youtube')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "user": "user", "female": "female", "male": "male", "baby": "baby", "child": "child", "wheelchair": "wheelchair", "angry": "angry", "frown": "frown", "meh": "meh", "smile": "smile", "smile-beam": "smile-beam", "thumbs-up": "thumbs-up", "thumbs-down": "thumbs-down", "hands-helping": "hands-helping", "hand-rock": "hand-rock", "hand-peace": "hand-peace", "dollar-sign": "dollar-sign", "euro-sign": "euro-sign", "money-bill": "money-bill", "money-bill-wave": "money-bill-wave", "pound-sign": "pound-sign", "coins": "coins", "shopping-bag": "shopping-bag", "shopping-cart": "shopping-cart", "circle": "circle", "square": "square", "star": "star", "heart": "heart", "comment": "comment", "cat": "cat", "dog": "dog", "dove": "dove", "bus": "bus", "car": "car", "biking": "biking", "running": "running", "plane": "plane", "suitcase": "suitcase", "pizza-slice": "pizza-slice", "ice-cream": "ice-cream", "coffee": "coffee", "wine-glass-alt": "wine-glass-alt", "building": "building", "home": "home", "store": "store", "industry": "industry", "database": "database", "laptop": "laptop", "microchip": "microchip", "phone": "phone", "mobile-alt": "mobile-alt", "tv": "tv", "clock": "clock", "atom": "atom", "award": "award", "music": "music", "leaf": "leaf", "lightbulb": "lightbulb", "sun": "sun", "wrench": "wrench", "airbnb": "airbnb", "amazon": "amazon", "android": "android", "apple": "apple", "bitcoin": "bitcoin", "facebook": "facebook", "google": "google", "linux": "linux", "microsoft": "microsoft", "twitter": "twitter", "windows": "windows", "youtube": "youtube"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "user": "user", "female": "female", "male": "male", "baby": "baby", "child": "child", "wheelchair": "wheelchair", "angry": "angry", "frown": "frown", "meh": "meh", "smile": "smile", "smile-beam": "smile-beam", "thumbs-up": "thumbs-up", "thumbs-down": "thumbs-down", "hands-helping": "hands-helping", "hand-rock": "hand-rock", "hand-peace": "hand-peace", "dollar-sign": "dollar-sign", "euro-sign": "euro-sign", "money-bill": "money-bill", "money-bill-wave": "money-bill-wave", "pound-sign": "pound-sign", "coins": "coins", "shopping-bag": "shopping-bag", "shopping-cart": "shopping-cart", "circle": "circle", "square": "square", "star": "star", "heart": "heart", "comment": "comment", "cat": "cat", "dog": "dog", "dove": "dove", "bus": "bus", "car": "car", "biking": "biking", "running": "running", "plane": "plane", "suitcase": "suitcase", "pizza-slice": "pizza-slice", "ice-cream": "ice-cream", "coffee": "coffee", "wine-glass-alt": "wine-glass-alt", "building": "building", "home": "home", "store": "store", "industry": "industry", "database": "database", "laptop": "laptop", "microchip": "microchip", "phone": "phone", "mobile-alt": "mobile-alt", "tv": "tv", "clock": "clock", "atom": "atom", "award": "award", "music": "music", "leaf": "leaf", "lightbulb": "lightbulb", "sun": "sun", "wrench": "wrench", "airbnb": "airbnb", "amazon": "amazon", "android": "android", "apple": "apple", "bitcoin": "bitcoin", "facebook": "facebook", "google": "google", "linux": "linux", "microsoft": "microsoft", "twitter": "twitter", "windows": "windows", "youtube": "youtube"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && filler_icons %in% names(named_list)) { + if (is.logical(filler_icons)) { + filler_icons <- as.character(filler_icons) + } + named_list_value <- unname(named_list[filler_icons])[[1]] + new_list$x$state$filler_icons <- named_list_value + } + } + } + } + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$show_bar_labels <- show_bar_labels + new_list$x$state$bar_label_size <- bar_label_size + new_list$x$state$bar_label_color <- bar_label_color + list_bar_label_weight <- c("normal", "bold", NULL) + if (!is.null(bar_label_weight)) { + if (!bar_label_weight %in% list_bar_label_weight) { + stop("`bar_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && bar_label_weight %in% names(named_list)) { + if (is.logical(bar_label_weight)) { + bar_label_weight <- as.character(bar_label_weight) + } + named_list_value <- unname(named_list[bar_label_weight])[[1]] + new_list$x$state$bar_label_weight <- named_list_value + } + } + } + } + list_chart_x_axis_axis_position <- c("bottom", "float-below", "float-above", "top", "off", NULL) + if (!is.null(chart_x_axis_axis_position)) { + if (!chart_x_axis_axis_position %in% list_chart_x_axis_axis_position) { + stop("`chart_x_axis_axis_position` must be one of: c('bottom', 'float-below', 'float-above', 'top', 'off')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_axis_position %in% names(named_list)) { + if (is.logical(chart_x_axis_axis_position)) { + chart_x_axis_axis_position <- as.character(chart_x_axis_axis_position) + } + named_list_value <- unname(named_list[chart_x_axis_axis_position])[[1]] + new_list$x$state$axis$axis_position <- named_list_value + } + } + } + } + new_list$x$state$axis$y_axis_position <- chart_x_axis_y_axis_position + list_chart_x_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_x_axis_numeric_scale_type)) { + if (!chart_x_axis_numeric_scale_type %in% list_chart_x_axis_numeric_scale_type) { + stop("`chart_x_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_x_axis_numeric_scale_type)) { + chart_x_axis_numeric_scale_type <- as.character(chart_x_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_x_axis_numeric_scale_type])[[1]] + new_list$x$state$axis$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$axis$linear_min <- chart_x_axis_linear_min + new_list$x$state$axis$linear_max <- chart_x_axis_linear_max + new_list$x$state$axis$log_min <- chart_x_axis_log_min + new_list$x$state$axis$log_max <- chart_x_axis_log_max + new_list$x$state$axis$datetime_min <- chart_x_axis_datetime_min + new_list$x$state$axis$datetime_max <- chart_x_axis_datetime_max + new_list$x$state$axis$flip <- chart_x_axis_flip + new_list$x$state$axis$show_scale_settings <- chart_x_axis_show_scale_settings + list_chart_x_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_nice)) { + if (!chart_x_axis_nice %in% list_chart_x_axis_nice) { + stop("`chart_x_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_nice %in% names(named_list)) { + if (is.logical(chart_x_axis_nice)) { + chart_x_axis_nice <- as.character(chart_x_axis_nice) + } + named_list_value <- unname(named_list[chart_x_axis_nice])[[1]] + new_list$x$state$axis$nice <- named_list_value + } + } + } + } + list_chart_x_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_x_axis_zero_axis)) { + if (!chart_x_axis_zero_axis %in% list_chart_x_axis_zero_axis) { + stop("`chart_x_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_x_axis_zero_axis)) { + chart_x_axis_zero_axis <- as.character(chart_x_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_x_axis_zero_axis])[[1]] + new_list$x$state$axis$zero_axis <- named_list_value + } + } + } + } + list_chart_x_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_x_axis_title_mode)) { + if (!chart_x_axis_title_mode %in% list_chart_x_axis_title_mode) { + stop("`chart_x_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_title_mode)) { + chart_x_axis_title_mode <- as.character(chart_x_axis_title_mode) + } + named_list_value <- unname(named_list[chart_x_axis_title_mode])[[1]] + new_list$x$state$axis$title_mode <- named_list_value + } + } + } + } + new_list$x$state$axis$title <- chart_x_axis_title + new_list$x$state$axis$title_styling <- chart_x_axis_title_styling + list_chart_x_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_title_weight)) { + if (!chart_x_axis_title_weight %in% list_chart_x_axis_title_weight) { + stop("`chart_x_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_title_weight)) { + chart_x_axis_title_weight <- as.character(chart_x_axis_title_weight) + } + named_list_value <- unname(named_list[chart_x_axis_title_weight])[[1]] + new_list$x$state$axis$title_weight <- named_list_value + } + } + } + } + new_list$x$state$axis$title_color <- chart_x_axis_title_color + new_list$x$state$axis$title_size <- chart_x_axis_title_size + new_list$x$state$axis$title_padding <- chart_x_axis_title_padding + list_chart_x_axis_tick_label_position <- c("default", "left", "right", NULL) + if (!is.null(chart_x_axis_tick_label_position)) { + if (!chart_x_axis_tick_label_position %in% list_chart_x_axis_tick_label_position) { + stop("`chart_x_axis_tick_label_position` must be one of: c('default', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_position)) { + chart_x_axis_tick_label_position <- as.character(chart_x_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_position])[[1]] + new_list$x$state$axis$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$axis$tick_label_styling <- chart_x_axis_tick_label_styling + new_list$x$state$axis$tick_label_size <- chart_x_axis_tick_label_size + new_list$x$state$axis$tick_label_color <- chart_x_axis_tick_label_color + new_list$x$state$axis$tick_padding <- chart_x_axis_tick_padding + list_chart_x_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_x_axis_tick_label_angle)) { + if (!chart_x_axis_tick_label_angle %in% list_chart_x_axis_tick_label_angle) { + stop("`chart_x_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_angle)) { + chart_x_axis_tick_label_angle <- as.character(chart_x_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_angle])[[1]] + new_list$x$state$axis$tick_label_angle <- named_list_value + } + } + } + } + list_chart_x_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_tick_label_weight)) { + if (!chart_x_axis_tick_label_weight %in% list_chart_x_axis_tick_label_weight) { + stop("`chart_x_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_weight)) { + chart_x_axis_tick_label_weight <- as.character(chart_x_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_weight])[[1]] + new_list$x$state$axis$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$axis$tick_label_max_lines <- chart_x_axis_tick_label_max_lines + new_list$x$state$axis$tick_label_line_height <- chart_x_axis_tick_label_line_height + list_chart_x_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_x_axis_tick_label_space_mode)) { + if (!chart_x_axis_tick_label_space_mode %in% list_chart_x_axis_tick_label_space_mode) { + stop("`chart_x_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_space_mode)) { + chart_x_axis_tick_label_space_mode <- as.character(chart_x_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_space_mode])[[1]] + new_list$x$state$axis$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$axis$tick_label_space <- chart_x_axis_tick_label_space + list_chart_x_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_x_axis_tick_mode)) { + if (!chart_x_axis_tick_mode %in% list_chart_x_axis_tick_mode) { + stop("`chart_x_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_mode)) { + chart_x_axis_tick_mode <- as.character(chart_x_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_mode])[[1]] + new_list$x$state$axis$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$axis$tick_number <- chart_x_axis_tick_number + if (length(chart_x_axis_tick_custom) > 1) { + new_list$x$state$axis$tick_custom <- paste(chart_x_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$axis$tick_custom <- chart_x_axis_tick_custom + } + + new_list$x$state$axis$line_and_tick_color <- chart_x_axis_line_and_tick_color + new_list$x$state$axis$line_and_tick_width <- chart_x_axis_line_and_tick_width + new_list$x$state$axis$tick_length <- chart_x_axis_tick_length + list_chart_x_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_x_axis_tick_side)) { + if (!chart_x_axis_tick_side %in% list_chart_x_axis_tick_side) { + stop("`chart_x_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_side)) { + chart_x_axis_tick_side <- as.character(chart_x_axis_tick_side) + } + named_list_value <- unname(named_list[chart_x_axis_tick_side])[[1]] + new_list$x$state$axis$tick_side <- named_list_value + } + } + } + } + new_list$x$state$axis$line_visible <- chart_x_axis_line_visible + new_list$x$state$axis$edge_padding <- chart_x_axis_edge_padding + list_chart_x_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_gridlines_visible)) { + if (!chart_x_axis_gridlines_visible %in% list_chart_x_axis_gridlines_visible) { + stop("`chart_x_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_x_axis_gridlines_visible)) { + chart_x_axis_gridlines_visible <- as.character(chart_x_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_x_axis_gridlines_visible])[[1]] + new_list$x$state$axis$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$axis$gridlines_styling <- chart_x_axis_gridlines_styling + new_list$x$state$axis$gridline_color <- chart_x_axis_gridline_color + list_chart_x_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_x_axis_gridline_style)) { + if (!chart_x_axis_gridline_style %in% list_chart_x_axis_gridline_style) { + stop("`chart_x_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_x_axis_gridline_style)) { + chart_x_axis_gridline_style <- as.character(chart_x_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_x_axis_gridline_style])[[1]] + new_list$x$state$axis$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$axis$gridline_width <- chart_x_axis_gridline_width + new_list$x$state$axis$gridline_category_dividers <- chart_x_axis_gridline_category_dividers + new_list$x$state$axis$gridline_category_dividers_extend <- chart_x_axis_gridline_category_dividers_extend + list_chart_number_localization_input_decimal_separator <- c(".", ",", NULL) + if (!is.null(chart_number_localization_input_decimal_separator)) { + if (!chart_number_localization_input_decimal_separator %in% list_chart_number_localization_input_decimal_separator) { + stop("`chart_number_localization_input_decimal_separator` must be one of: c('.', ',')") + } else { + if (length(jsonlite::fromJSON('{".": ".", ",": ","}')) > 1) { + named_list <- jsonlite::fromJSON('{".": ".", ",": ","}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_input_decimal_separator %in% names(named_list)) { + if (is.logical(chart_number_localization_input_decimal_separator)) { + chart_number_localization_input_decimal_separator <- as.character(chart_number_localization_input_decimal_separator) + } + named_list_value <- unname(named_list[chart_number_localization_input_decimal_separator])[[1]] + new_list$x$state$number_localization$input_decimal_separator <- named_list_value + } + } + } + } + list_chart_number_localization_output_separators <- c(",.", ".,", ".", ",", " .", " ,", NULL) + if (!is.null(chart_number_localization_output_separators)) { + if (!chart_number_localization_output_separators %in% list_chart_number_localization_output_separators) { + stop("`chart_number_localization_output_separators` must be one of: c(',.', '.,', '.', ',', ' .', ' ,')") + } else { + if (length(jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}')) > 1) { + named_list <- jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_output_separators %in% names(named_list)) { + if (is.logical(chart_number_localization_output_separators)) { + chart_number_localization_output_separators <- as.character(chart_number_localization_output_separators) + } + named_list_value <- unname(named_list[chart_number_localization_output_separators])[[1]] + new_list$x$state$number_localization$output_separators <- named_list_value + } + } + } + } + new_list$x$state$number_format$prefix <- chart_number_date_format_prefix + new_list$x$state$number_format$suffix <- chart_number_date_format_suffix + new_list$x$state$number_format$n_dec <- chart_number_date_format_n_dec + new_list$x$state$number_format$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$number_format$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$number_format$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$number_format$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$number_format$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$number_format$transform <- named_list_value + } + } + } + } + new_list$x$state$number_format$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$number_format$exponentiate_constant <- chart_number_date_format_exponentiate_constant + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_chart_value_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_value_legend_show_legend)) { + if (!chart_value_legend_show_legend %in% list_chart_value_legend_show_legend) { + stop("`chart_value_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_value_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_value_legend_show_legend)) { + chart_value_legend_show_legend <- as.character(chart_value_legend_show_legend) + } + named_list_value <- unname(named_list[chart_value_legend_show_legend])[[1]] + new_list$x$state$value_legend$show_legend <- named_list_value + } + } + } + } + list_chart_value_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_value_legend_title_mode)) { + if (!chart_value_legend_title_mode %in% list_chart_value_legend_title_mode) { + stop("`chart_value_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_value_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_value_legend_title_mode)) { + chart_value_legend_title_mode <- as.character(chart_value_legend_title_mode) + } + named_list_value <- unname(named_list[chart_value_legend_title_mode])[[1]] + new_list$x$state$value_legend$title_mode <- named_list_value + } + } + } + } + new_list$x$state$value_legend$title <- chart_value_legend_title + new_list$x$state$value_legend$swatch_width <- chart_value_legend_swatch_width + new_list$x$state$value_legend$swatch_height <- chart_value_legend_swatch_height + new_list$x$state$value_legend$swatch_radius <- chart_value_legend_swatch_radius + new_list$x$state$value_legend$legend_items_padding <- chart_value_legend_legend_items_padding + new_list$x$state$value_legend$swatch_outline <- chart_value_legend_swatch_outline + new_list$x$state$value_legend$swatch_outline_color <- chart_value_legend_swatch_outline_color + if (length(chart_value_legend_order_override) > 1) { + new_list$x$state$value_legend$order_override <- paste(chart_value_legend_order_override, collapse = "\n") + } else { + new_list$x$state$value_legend$order_override <- chart_value_legend_order_override + } + + new_list$x$state$value_legend$icon_height <- chart_value_legend_icon_height + new_list$x$state$value_legend$icon_color <- chart_value_legend_icon_color + new_list$x$state$value_legend$max_width <- chart_value_legend_max_width + list_chart_value_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_value_legend_orientation)) { + if (!chart_value_legend_orientation %in% list_chart_value_legend_orientation) { + stop("`chart_value_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_value_legend_orientation %in% names(named_list)) { + if (is.logical(chart_value_legend_orientation)) { + chart_value_legend_orientation <- as.character(chart_value_legend_orientation) + } + named_list_value <- unname(named_list[chart_value_legend_orientation])[[1]] + new_list$x$state$value_legend$orientation <- named_list_value + } + } + } + } + list_value_legend_icon <- c("auto", "user", "female", "male", "baby", "child", "wheelchair", "angry", "frown", "meh", "smile", "smile-beam", "thumbs-up", "thumbs-down", "hands-helping", "hand-rock", "hand-peace", "dollar-sign", "euro-sign", "money-bill", "money-bill-wave", "pound-sign", "coins", "shopping-bag", "shopping-cart", "circle", "square", "star", "heart", "comment", "cat", "dog", "dove", "bus", "car", "biking", "running", "plane", "suitcase", "pizza-slice", "ice-cream", "coffee", "wine-glass-alt", "building", "home", "store", "industry", "database", "laptop", "microchip", "phone", "mobile-alt", "tv", "clock", "atom", "award", "music", "leaf", "lightbulb", "sun", "wrench", "airbnb", "amazon", "android", "apple", "bitcoin", "facebook", "google", "linux", "microsoft", "twitter", "windows", "youtube", NULL) + if (!is.null(value_legend_icon)) { + if (!value_legend_icon %in% list_value_legend_icon) { + stop("`value_legend_icon` must be one of: c('auto', 'user', 'female', 'male', 'baby', 'child', 'wheelchair', 'angry', 'frown', 'meh', 'smile', 'smile-beam', 'thumbs-up', 'thumbs-down', 'hands-helping', 'hand-rock', 'hand-peace', 'dollar-sign', 'euro-sign', 'money-bill', 'money-bill-wave', 'pound-sign', 'coins', 'shopping-bag', 'shopping-cart', 'circle', 'square', 'star', 'heart', 'comment', 'cat', 'dog', 'dove', 'bus', 'car', 'biking', 'running', 'plane', 'suitcase', 'pizza-slice', 'ice-cream', 'coffee', 'wine-glass-alt', 'building', 'home', 'store', 'industry', 'database', 'laptop', 'microchip', 'phone', 'mobile-alt', 'tv', 'clock', 'atom', 'award', 'music', 'leaf', 'lightbulb', 'sun', 'wrench', 'airbnb', 'amazon', 'android', 'apple', 'bitcoin', 'facebook', 'google', 'linux', 'microsoft', 'twitter', 'windows', 'youtube')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "user": "user", "female": "female", "male": "male", "baby": "baby", "child": "child", "wheelchair": "wheelchair", "angry": "angry", "frown": "frown", "meh": "meh", "smile": "smile", "smile-beam": "smile-beam", "thumbs-up": "thumbs-up", "thumbs-down": "thumbs-down", "hands-helping": "hands-helping", "hand-rock": "hand-rock", "hand-peace": "hand-peace", "dollar-sign": "dollar-sign", "euro-sign": "euro-sign", "money-bill": "money-bill", "money-bill-wave": "money-bill-wave", "pound-sign": "pound-sign", "coins": "coins", "shopping-bag": "shopping-bag", "shopping-cart": "shopping-cart", "circle": "circle", "square": "square", "star": "star", "heart": "heart", "comment": "comment", "cat": "cat", "dog": "dog", "dove": "dove", "bus": "bus", "car": "car", "biking": "biking", "running": "running", "plane": "plane", "suitcase": "suitcase", "pizza-slice": "pizza-slice", "ice-cream": "ice-cream", "coffee": "coffee", "wine-glass-alt": "wine-glass-alt", "building": "building", "home": "home", "store": "store", "industry": "industry", "database": "database", "laptop": "laptop", "microchip": "microchip", "phone": "phone", "mobile-alt": "mobile-alt", "tv": "tv", "clock": "clock", "atom": "atom", "award": "award", "music": "music", "leaf": "leaf", "lightbulb": "lightbulb", "sun": "sun", "wrench": "wrench", "airbnb": "airbnb", "amazon": "amazon", "android": "android", "apple": "apple", "bitcoin": "bitcoin", "facebook": "facebook", "google": "google", "linux": "linux", "microsoft": "microsoft", "twitter": "twitter", "windows": "windows", "youtube": "youtube"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "user": "user", "female": "female", "male": "male", "baby": "baby", "child": "child", "wheelchair": "wheelchair", "angry": "angry", "frown": "frown", "meh": "meh", "smile": "smile", "smile-beam": "smile-beam", "thumbs-up": "thumbs-up", "thumbs-down": "thumbs-down", "hands-helping": "hands-helping", "hand-rock": "hand-rock", "hand-peace": "hand-peace", "dollar-sign": "dollar-sign", "euro-sign": "euro-sign", "money-bill": "money-bill", "money-bill-wave": "money-bill-wave", "pound-sign": "pound-sign", "coins": "coins", "shopping-bag": "shopping-bag", "shopping-cart": "shopping-cart", "circle": "circle", "square": "square", "star": "star", "heart": "heart", "comment": "comment", "cat": "cat", "dog": "dog", "dove": "dove", "bus": "bus", "car": "car", "biking": "biking", "running": "running", "plane": "plane", "suitcase": "suitcase", "pizza-slice": "pizza-slice", "ice-cream": "ice-cream", "coffee": "coffee", "wine-glass-alt": "wine-glass-alt", "building": "building", "home": "home", "store": "store", "industry": "industry", "database": "database", "laptop": "laptop", "microchip": "microchip", "phone": "phone", "mobile-alt": "mobile-alt", "tv": "tv", "clock": "clock", "atom": "atom", "award": "award", "music": "music", "leaf": "leaf", "lightbulb": "lightbulb", "sun": "sun", "wrench": "wrench", "airbnb": "airbnb", "amazon": "amazon", "android": "android", "apple": "apple", "bitcoin": "bitcoin", "facebook": "facebook", "google": "google", "linux": "linux", "microsoft": "microsoft", "twitter": "twitter", "windows": "windows", "youtube": "youtube"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && value_legend_icon %in% names(named_list)) { + if (is.logical(value_legend_icon)) { + value_legend_icon <- as.character(value_legend_icon) + } + named_list_value <- unname(named_list[value_legend_icon])[[1]] + new_list$x$state$value_legend_icon <- named_list_value + } + } + } + } + list_chart_icon_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_icon_legend_show_legend)) { + if (!chart_icon_legend_show_legend %in% list_chart_icon_legend_show_legend) { + stop("`chart_icon_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_icon_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_icon_legend_show_legend)) { + chart_icon_legend_show_legend <- as.character(chart_icon_legend_show_legend) + } + named_list_value <- unname(named_list[chart_icon_legend_show_legend])[[1]] + new_list$x$state$icon_legend$show_legend <- named_list_value + } + } + } + } + list_chart_icon_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_icon_legend_title_mode)) { + if (!chart_icon_legend_title_mode %in% list_chart_icon_legend_title_mode) { + stop("`chart_icon_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_icon_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_icon_legend_title_mode)) { + chart_icon_legend_title_mode <- as.character(chart_icon_legend_title_mode) + } + named_list_value <- unname(named_list[chart_icon_legend_title_mode])[[1]] + new_list$x$state$icon_legend$title_mode <- named_list_value + } + } + } + } + new_list$x$state$icon_legend$title <- chart_icon_legend_title + new_list$x$state$icon_legend$swatch_width <- chart_icon_legend_swatch_width + new_list$x$state$icon_legend$swatch_height <- chart_icon_legend_swatch_height + new_list$x$state$icon_legend$swatch_radius <- chart_icon_legend_swatch_radius + new_list$x$state$icon_legend$legend_items_padding <- chart_icon_legend_legend_items_padding + new_list$x$state$icon_legend$swatch_outline <- chart_icon_legend_swatch_outline + new_list$x$state$icon_legend$swatch_outline_color <- chart_icon_legend_swatch_outline_color + if (length(chart_icon_legend_order_override) > 1) { + new_list$x$state$icon_legend$order_override <- paste(chart_icon_legend_order_override, collapse = "\n") + } else { + new_list$x$state$icon_legend$order_override <- chart_icon_legend_order_override + } + + new_list$x$state$icon_legend$icon_height <- chart_icon_legend_icon_height + new_list$x$state$icon_legend$icon_color <- chart_icon_legend_icon_color + new_list$x$state$icon_legend$max_width <- chart_icon_legend_max_width + list_chart_icon_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_icon_legend_orientation)) { + if (!chart_icon_legend_orientation %in% list_chart_icon_legend_orientation) { + stop("`chart_icon_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_icon_legend_orientation %in% names(named_list)) { + if (is.logical(chart_icon_legend_orientation)) { + chart_icon_legend_orientation <- as.character(chart_icon_legend_orientation) + } + named_list_value <- unname(named_list[chart_icon_legend_orientation])[[1]] + new_list$x$state$icon_legend$orientation <- named_list_value + } + } + } + } + list_chart_color_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_color_legend_show_legend)) { + if (!chart_color_legend_show_legend %in% list_chart_color_legend_show_legend) { + stop("`chart_color_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_color_legend_show_legend)) { + chart_color_legend_show_legend <- as.character(chart_color_legend_show_legend) + } + named_list_value <- unname(named_list[chart_color_legend_show_legend])[[1]] + new_list$x$state$color_legend$show_legend <- named_list_value + } + } + } + } + list_chart_color_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_color_legend_title_mode)) { + if (!chart_color_legend_title_mode %in% list_chart_color_legend_title_mode) { + stop("`chart_color_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_color_legend_title_mode)) { + chart_color_legend_title_mode <- as.character(chart_color_legend_title_mode) + } + named_list_value <- unname(named_list[chart_color_legend_title_mode])[[1]] + new_list$x$state$color_legend$title_mode <- named_list_value + } + } + } + } + new_list$x$state$color_legend$title <- chart_color_legend_title + new_list$x$state$color_legend$swatch_width <- chart_color_legend_swatch_width + new_list$x$state$color_legend$swatch_height <- chart_color_legend_swatch_height + new_list$x$state$color_legend$swatch_radius <- chart_color_legend_swatch_radius + new_list$x$state$color_legend$legend_items_padding <- chart_color_legend_legend_items_padding + new_list$x$state$color_legend$swatch_outline <- chart_color_legend_swatch_outline + new_list$x$state$color_legend$swatch_outline_color <- chart_color_legend_swatch_outline_color + if (length(chart_color_legend_order_override) > 1) { + new_list$x$state$color_legend$order_override <- paste(chart_color_legend_order_override, collapse = "\n") + } else { + new_list$x$state$color_legend$order_override <- chart_color_legend_order_override + } + + new_list$x$state$color_legend$icon_height <- chart_color_legend_icon_height + new_list$x$state$color_legend$icon_color <- chart_color_legend_icon_color + new_list$x$state$color_legend$max_width <- chart_color_legend_max_width + list_chart_color_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_color_legend_orientation)) { + if (!chart_color_legend_orientation %in% list_chart_color_legend_orientation) { + stop("`chart_color_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_legend_orientation %in% names(named_list)) { + if (is.logical(chart_color_legend_orientation)) { + chart_color_legend_orientation <- as.character(chart_color_legend_orientation) + } + named_list_value <- unname(named_list[chart_color_legend_orientation])[[1]] + new_list$x$state$color_legend$orientation <- named_list_value + } + } + } + } + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + list_value_control_visibility <- c("always", "editor", "never", NULL) + if (!is.null(value_control_visibility)) { + if (!value_control_visibility %in% list_value_control_visibility) { + stop("`value_control_visibility` must be one of: c('always', 'editor', 'never')") + } else { + if (length(jsonlite::fromJSON('{"always": "always", "editor": "editor", "never": "never"}')) > 1) { + named_list <- jsonlite::fromJSON('{"always": "always", "editor": "editor", "never": "never"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && value_control_visibility %in% names(named_list)) { + if (is.logical(value_control_visibility)) { + value_control_visibility <- as.character(value_control_visibility) + } + named_list_value <- unname(named_list[value_control_visibility])[[1]] + new_list$x$state$value_control_visibility <- named_list_value + } + } + } + } + list_chart_value_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_value_filter_controls_control_type)) { + if (!chart_value_filter_controls_control_type %in% list_chart_value_filter_controls_control_type) { + stop("`chart_value_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_value_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_value_filter_controls_control_type)) { + chart_value_filter_controls_control_type <- as.character(chart_value_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_value_filter_controls_control_type])[[1]] + new_list$x$state$value_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$value_control$control_styles <- chart_value_filter_controls_control_styles + new_list$x$state$value_control$control_title <- chart_value_filter_controls_control_title + list_chart_value_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_value_filter_controls_button_group)) { + if (!chart_value_filter_controls_button_group %in% list_chart_value_filter_controls_button_group) { + stop("`chart_value_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_value_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_value_filter_controls_button_group)) { + chart_value_filter_controls_button_group <- as.character(chart_value_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_value_filter_controls_button_group])[[1]] + new_list$x$state$value_control$button_group <- named_list_value + } + } + } + } + list_chart_value_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_value_filter_controls_button_group_width_mode)) { + if (!chart_value_filter_controls_button_group_width_mode %in% list_chart_value_filter_controls_button_group_width_mode) { + stop("`chart_value_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_value_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_value_filter_controls_button_group_width_mode)) { + chart_value_filter_controls_button_group_width_mode <- as.character(chart_value_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_value_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$value_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$value_control$button_group_width_fixed <- chart_value_filter_controls_button_group_width_fixed + list_chart_value_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_value_filter_controls_dropdown_width_mode)) { + if (!chart_value_filter_controls_dropdown_width_mode %in% list_chart_value_filter_controls_dropdown_width_mode) { + stop("`chart_value_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_value_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_value_filter_controls_dropdown_width_mode)) { + chart_value_filter_controls_dropdown_width_mode <- as.character(chart_value_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_value_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$value_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$value_control$dropdown_width_fixed <- chart_value_filter_controls_dropdown_width_fixed + new_list$x$state$value_control$slider_width <- chart_value_filter_controls_slider_width + new_list$x$state$value_control$slider_max_label_width <- chart_value_filter_controls_slider_max_label_width + new_list$x$state$value_control$slider_step_time <- chart_value_filter_controls_slider_step_time + new_list$x$state$value_control$slider_loop <- chart_value_filter_controls_slider_loop + new_list$x$state$value_control$slider_restart_pause <- chart_value_filter_controls_slider_restart_pause + list_chart_value_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_value_filter_controls_sort)) { + if (!chart_value_filter_controls_sort %in% list_chart_value_filter_controls_sort) { + stop("`chart_value_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_value_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_value_filter_controls_sort)) { + chart_value_filter_controls_sort <- as.character(chart_value_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_value_filter_controls_sort])[[1]] + new_list$x$state$value_control$sort <- named_list_value + } + } + } + } + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$slider_style$track_color <- chart_slider_control_style_track_color + new_list$x$state$slider_style$font_color <- chart_slider_control_style_font_color + new_list$x$state$slider_style$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$slider_style$play_color <- chart_slider_control_style_play_color + new_list$x$state$slider_style$track_height <- chart_slider_control_style_track_height + new_list$x$state$slider_style$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$slider_style$play_button <- chart_slider_control_style_play_button + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_quiz_details.R b/R_package/R/set_quiz_details.R new file mode 100644 index 0000000..d13e2c5 --- /dev/null +++ b/R_package/R/set_quiz_details.R @@ -0,0 +1,1987 @@ +#' Set quiz chart details +#' @name set_quiz_details +#' @param color_primary User input. Flourish type hint: color, defaults to `NULL` +#' @param color_neutral Neutral. Flourish type hint: color, defaults to `NULL` +#' @param color_correct Correct. Flourish type hint: color, defaults to `NULL` +#' @param block_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param text_border_color Border color. Flourish type hint: color, defaults to `NULL` +#' @param block_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param block_text_size_custom Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param block_background Background. Flourish type hint: color, defaults to `NULL` +#' @param block_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param block_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param block_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param block_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param block_shadow Enabled. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param block_shadow_blur Blur. Flourish type hint: number, defaults to `NULL` +#' @param block_shadow_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param block_btn_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param block_btn_text_size Size. Choices: 1.1, 1.2, 1.4, custom. Flourish type hint: string, defaults to `NULL` +#' @param block_btn_text_size_custom Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param show_all_questions Show unanswered questions. Flourish type hint: boolean, defaults to `NULL` +#' @param slider_handle_fill Color. Flourish type hint: color, defaults to `NULL` +#' @param slider_handle_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param slider_handle_stroke Border. Flourish type hint: number, defaults to `NULL` +#' @param slider_channel_fill Color. Flourish type hint: color, defaults to `NULL` +#' @param slider_channel_height Height. Flourish type hint: number, defaults to `NULL` +#' @param slider_comparison_opacity Comparison opacity. Flourish type hint: number, defaults to `NULL` +#' @param slider_range_type Slider range. Choices: auto, fixed, custom. In Auto mode, the range will go from 0 to the nearest power of 10. In Fixed mode, you can set a fixed range for every question. In Custom mode, you can set a range for each individual question. Flourish type hint: string, defaults to `NULL` +#' @param slider_range_min Min. Flourish type hint: number, defaults to `NULL` +#' @param slider_range_max Max. Flourish type hint: number, defaults to `NULL` +#' @param slider_range_step Step. Flourish type hint: number, defaults to `NULL` +#' @param slider_range_custom Custom. Set a custom range for each question. Write a new range on each line with the following format: `question text :: range minimum :: range maximum :: range step`. < For example: `How many people live in London? :: 1000000 :: 20000000 :: 1000` Flourish type hint: text, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param mc_background Background. Flourish type hint: color, defaults to `NULL` +#' @param mc_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param mc_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param mc_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param dropdown Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param dropdown_default_label Default comparison. Type in an answer thats selected as a default when you load the visualization. Flourish type hint: string, defaults to `NULL` +#' @param dropdown_label_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param slider_advanced_scoring Linear scores for slider questions. Rather than a slider answer just being "right" or "wrong", change this setting to get a higher score the closer you are to the correct answer. Flourish type hint: boolean, defaults to `NULL` +#' @param slider_score_zone_percent Scoring zone (%). Defines how close (as a percentage of the slider range) the input needs to be to the correct answer to produce a score. For example, for a slider range of 0 to 200, a correct answer of 45, and a scoring zone of 10%, the score is non-zero if the input is between 25 and 65 (because 10% of the slider range is 20). The score increases linearly from 0 at the scoring zone boundary to a score of 1 at the correct answer. Flourish type hint: number, defaults to `NULL` +#' @param slider_correct_zone_percent Correct zone (%). Defines how close (as a percentage of the scoring zone) the input needs to be to the correct answer to produce a full score of 1. For example, for a slider range of 0 to 200, a correct answer of 45, a scoring zone of 10%, and a correct zone of 50%, the score is 1 if the input is between 35 and 55 (because 50% of the scoring zone is 10). The score increases linearly from the scoring zone boundary to the correct zone boundary. For example, inputs of 20, 25, 30, 35, or 40 scores 0, 0, 0.5, 1, or 1, respectively. Flourish type hint: number, defaults to `NULL` +#' @param end_result_default_text Default end result text. This is the text that shows up after youve finished the quiz. You can add custom end result text for specific score ranges in the Data tab, inside the End result sheet. Flourish type hint: text, defaults to `NULL` +#' @param text_your_answer Slider your answer. Flourish type hint: string, defaults to `NULL` +#' @param text_submit Submit button. Flourish type hint: string, defaults to `NULL` +#' @param text_dropdown_label Dropdown label. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_input_decimal_separator Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_output_separators Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "quiz", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_quiz_data(gapminder) |> +#' set_quiz_details() +#' ) +#' @export + +set_quiz_details <- function( + ., + color_primary = NULL, + color_neutral = NULL, + color_correct = NULL, + block_text_color = NULL, + text_border_color = NULL, + block_text_size = NULL, + block_text_size_custom = NULL, + block_background = NULL, + block_padding = NULL, + block_border_width = NULL, + block_border_color = NULL, + block_border_radius = NULL, + block_shadow = NULL, + block_shadow_blur = NULL, + block_shadow_opacity = NULL, + block_btn_text_color = NULL, + block_btn_text_size = NULL, + block_btn_text_size_custom = NULL, + show_all_questions = NULL, + slider_handle_fill = NULL, + slider_handle_radius = NULL, + slider_handle_stroke = NULL, + slider_channel_fill = NULL, + slider_channel_height = NULL, + slider_comparison_opacity = NULL, + slider_range_type = NULL, + slider_range_min = NULL, + slider_range_max = NULL, + slider_range_step = NULL, + slider_range_custom = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + mc_background = NULL, + mc_border_color = NULL, + mc_border_width = NULL, + mc_border_radius = NULL, + dropdown = NULL, + dropdown_default_label = NULL, + dropdown_label_color = NULL, + slider_advanced_scoring = NULL, + slider_score_zone_percent = NULL, + slider_correct_zone_percent = NULL, + end_result_default_text = NULL, + text_your_answer = NULL, + text_submit = NULL, + text_dropdown_label = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "quiz") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/quiz")) { + stop("`set_quiz_details()` is not supported for this chart type.") + } + new_list$x$state$color_primary <- color_primary + new_list$x$state$color_neutral <- color_neutral + new_list$x$state$color_correct <- color_correct + new_list$x$state$block_text_color <- block_text_color + new_list$x$state$text_border_color <- text_border_color + list_block_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(block_text_size)) { + if (!block_text_size %in% list_block_text_size) { + stop("`block_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && block_text_size %in% names(named_list)) { + if (is.logical(block_text_size)) { + block_text_size <- as.character(block_text_size) + } + named_list_value <- unname(named_list[block_text_size])[[1]] + new_list$x$state$block_text_size <- named_list_value + } + } + } + } + new_list$x$state$block_text_size_custom <- block_text_size_custom + new_list$x$state$block_background <- block_background + new_list$x$state$block_padding <- block_padding + new_list$x$state$block_border_width <- block_border_width + new_list$x$state$block_border_color <- block_border_color + new_list$x$state$block_border_radius <- block_border_radius + list_block_shadow <- c(TRUE, FALSE, NULL) + if (!is.null(block_shadow)) { + if (!block_shadow %in% list_block_shadow) { + stop("`block_shadow` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && block_shadow %in% names(named_list)) { + if (is.logical(block_shadow)) { + block_shadow <- as.character(block_shadow) + } + named_list_value <- unname(named_list[block_shadow])[[1]] + new_list$x$state$block_shadow <- named_list_value + } + } + } + } + new_list$x$state$block_shadow_blur <- block_shadow_blur + new_list$x$state$block_shadow_opacity <- block_shadow_opacity + new_list$x$state$block_btn_text_color <- block_btn_text_color + list_block_btn_text_size <- c("1.1", "1.2", "1.4", "custom", NULL) + if (!is.null(block_btn_text_size)) { + if (!block_btn_text_size %in% list_block_btn_text_size) { + stop("`block_btn_text_size` must be one of: c('1.1', '1.2', '1.4', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.1": "1.1", "1.2": "1.2", "1.4": "1.4", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.1": "1.1", "1.2": "1.2", "1.4": "1.4", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && block_btn_text_size %in% names(named_list)) { + if (is.logical(block_btn_text_size)) { + block_btn_text_size <- as.character(block_btn_text_size) + } + named_list_value <- unname(named_list[block_btn_text_size])[[1]] + new_list$x$state$block_btn_text_size <- named_list_value + } + } + } + } + new_list$x$state$block_btn_text_size_custom <- block_btn_text_size_custom + new_list$x$state$show_all_questions <- show_all_questions + new_list$x$state$slider_handle_fill <- slider_handle_fill + new_list$x$state$slider_handle_radius <- slider_handle_radius + new_list$x$state$slider_handle_stroke <- slider_handle_stroke + new_list$x$state$slider_channel_fill <- slider_channel_fill + new_list$x$state$slider_channel_height <- slider_channel_height + new_list$x$state$slider_comparison_opacity <- slider_comparison_opacity + list_slider_range_type <- c("auto", "fixed", "custom", NULL) + if (!is.null(slider_range_type)) { + if (!slider_range_type %in% list_slider_range_type) { + stop("`slider_range_type` must be one of: c('auto', 'fixed', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && slider_range_type %in% names(named_list)) { + if (is.logical(slider_range_type)) { + slider_range_type <- as.character(slider_range_type) + } + named_list_value <- unname(named_list[slider_range_type])[[1]] + new_list$x$state$slider_range_type <- named_list_value + } + } + } + } + new_list$x$state$slider_range_min <- slider_range_min + new_list$x$state$slider_range_max <- slider_range_max + new_list$x$state$slider_range_step <- slider_range_step + if (length(slider_range_custom) > 1) { + new_list$x$state$slider_range_custom <- paste(slider_range_custom, collapse = "\n") + } else { + new_list$x$state$slider_range_custom <- slider_range_custom + } + + new_list$x$state$slider_number_format$prefix <- chart_number_date_format_prefix + new_list$x$state$slider_number_format$suffix <- chart_number_date_format_suffix + new_list$x$state$slider_number_format$n_dec <- chart_number_date_format_n_dec + new_list$x$state$slider_number_format$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$slider_number_format$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$slider_number_format$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$slider_number_format$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$slider_number_format$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$slider_number_format$transform <- named_list_value + } + } + } + } + new_list$x$state$slider_number_format$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$slider_number_format$exponentiate_constant <- chart_number_date_format_exponentiate_constant + new_list$x$state$mc_background <- mc_background + new_list$x$state$mc_border_color <- mc_border_color + new_list$x$state$mc_border_width <- mc_border_width + new_list$x$state$mc_border_radius <- mc_border_radius + list_dropdown <- c(TRUE, FALSE, NULL) + if (!is.null(dropdown)) { + if (!dropdown %in% list_dropdown) { + stop("`dropdown` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && dropdown %in% names(named_list)) { + if (is.logical(dropdown)) { + dropdown <- as.character(dropdown) + } + named_list_value <- unname(named_list[dropdown])[[1]] + new_list$x$state$dropdown <- named_list_value + } + } + } + } + new_list$x$state$dropdown_default_label <- dropdown_default_label + new_list$x$state$dropdown_label_color <- dropdown_label_color + new_list$x$state$slider_advanced_scoring <- slider_advanced_scoring + new_list$x$state$slider_score_zone_percent <- slider_score_zone_percent + new_list$x$state$slider_correct_zone_percent <- slider_correct_zone_percent + if (length(end_result_default_text) > 1) { + new_list$x$state$end_result_default_text <- paste(end_result_default_text, collapse = "\n") + } else { + new_list$x$state$end_result_default_text <- end_result_default_text + } + + new_list$x$state$text_your_answer <- text_your_answer + new_list$x$state$text_submit <- text_submit + new_list$x$state$text_dropdown_label <- text_dropdown_label + list_chart_number_localization_input_decimal_separator <- c(".", ",", NULL) + if (!is.null(chart_number_localization_input_decimal_separator)) { + if (!chart_number_localization_input_decimal_separator %in% list_chart_number_localization_input_decimal_separator) { + stop("`chart_number_localization_input_decimal_separator` must be one of: c('.', ',')") + } else { + if (length(jsonlite::fromJSON('{".": ".", ",": ","}')) > 1) { + named_list <- jsonlite::fromJSON('{".": ".", ",": ","}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_input_decimal_separator %in% names(named_list)) { + if (is.logical(chart_number_localization_input_decimal_separator)) { + chart_number_localization_input_decimal_separator <- as.character(chart_number_localization_input_decimal_separator) + } + named_list_value <- unname(named_list[chart_number_localization_input_decimal_separator])[[1]] + new_list$x$state$localization$input_decimal_separator <- named_list_value + } + } + } + } + list_chart_number_localization_output_separators <- c(",.", ".,", ".", ",", " .", " ,", NULL) + if (!is.null(chart_number_localization_output_separators)) { + if (!chart_number_localization_output_separators %in% list_chart_number_localization_output_separators) { + stop("`chart_number_localization_output_separators` must be one of: c(',.', '.,', '.', ',', ' .', ' ,')") + } else { + if (length(jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}')) > 1) { + named_list <- jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_output_separators %in% names(named_list)) { + if (is.logical(chart_number_localization_output_separators)) { + chart_number_localization_output_separators <- as.character(chart_number_localization_output_separators) + } + named_list_value <- unname(named_list[chart_number_localization_output_separators])[[1]] + new_list$x$state$localization$output_separators <- named_list_value + } + } + } + } + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_radar_details.R b/R_package/R/set_radar_details.R new file mode 100644 index 0000000..b05484e --- /dev/null +++ b/R_package/R/set_radar_details.R @@ -0,0 +1,3886 @@ +#' Set radar chart chart details +#' @name set_radar_details +#' @param radars_curve Line curve. Choices: linear, cardinal. Flourish type hint: string, defaults to `NULL` +#' @param radars_star Line shape. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param radars_stroke_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param radars_stroke_opacity Line opacity. Flourish type hint: number, defaults to `NULL` +#' @param radars_fill_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param radars_star_inner_radius Star inner. The star shapes inner radius, as a percent of the max radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param facet_comparisons Show comparison lines in grid mode. Flourish type hint: boolean, defaults to `NULL` +#' @param facet_comparison_stroke Line. Flourish type hint: color, defaults to `NULL` +#' @param facet_comparison_stroke_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param facet_comparison_stroke_opacity Line opacity. Flourish type hint: number, defaults to `NULL` +#' @param facet_comparison_fill Fill. Flourish type hint: color, defaults to `NULL` +#' @param facet_comparison_fill_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_columns_fixed Grid mode. Choices: `FALSE`, `TRUE`. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_columns Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width Min chart width. The minimum width of a chart or cell in the grid. Determines the number of columns. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width_fixed Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_custom_grid Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_custom_positions Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to `NULL` +#' @param chart_facet_max_width Max chart width. The maximum width of a chart or cell in the grid. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_w Horizontal margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_h Vertical margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_animation On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_titles Show titles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_title_align Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_size Size. Relative to the width of the chart. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_unit Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_padding_top Space above. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_padding_bottom Space below. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_bg Background. Choices: none, full, text. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_bg_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_bg_padding Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_axis_show Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_radial_axis_x_line_color Line. Flourish type hint: color, defaults to `NULL` +#' @param chart_radial_axis_x_line_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_x_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_radial_axis_x_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_x_tick_label_outline Outline. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_x_tick_label_weight Choices: 600, 400. Flourish type hint: string, defaults to `NULL` +#' @param chart_radial_axis_y_min Min value. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_y_max Max value. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_y_tick_number Number. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_y_line_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_radial_axis_y_line_width Width. Flourish type hint: string, defaults to `NULL` +#' @param chart_radial_axis_y_line_dash Dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_radial_axis_y_line_dash_gap Gap. Flourish type hint: string, defaults to `NULL` +#' @param chart_radial_axis_y_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_radial_axis_y_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_y_tick_label_outline Outline. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_y_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_y_tick_label_weight Choices: 600, 400. Flourish type hint: string, defaults to `NULL` +#' @param chart_radial_axis_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_group_labels Outer labels. Enter one per line, with an angle and a label separated by a colon, such as: 50: My Label. Flourish type hint: text, defaults to `NULL` +#' @param chart_radial_axis_group_labels_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_radial_axis_group_labels_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_group_labels_letter_spacing Letter spacing. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_group_labels_space_above Space above. Flourish type hint: number, defaults to `NULL` +#' @param chart_radial_axis_group_labels_space_below Space below. Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param facet_control_show Show charts grid control. Flourish type hint: boolean, defaults to `NULL` +#' @param facet_control_default Option to show on load. If you want to specify a different facet view to show on load either make a story or enter the label from the relevant button here. Case sensitive. Flourish type hint: string, defaults to `NULL` +#' @param facet_control_none Include combined option. Flourish type hint: boolean, defaults to `NULL` +#' @param facets_label_combined Combined label. Flourish type hint: string, defaults to `NULL` +#' @param facet_control_individual Include separate option. Flourish type hint: boolean, defaults to `NULL` +#' @param facets_label_separate Separate label. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_control_all Name for "All". Leave blank to not include an "All" option. Flourish type hint: string, defaults to `NULL` +#' @param filter_y_max Update axis y max when filtering. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_controls_spacing Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param popup_color_headings Color popup headings. Flourish type hint: boolean, defaults to `NULL` +#' @param duration Duration. The duration, in seconds, of transitions for example between two slides in a story. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "radar", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_radar_data(gapminder) |> +#' set_radar_details() +#' ) +#' @export + +set_radar_details <- function( + ., + radars_curve = NULL, + radars_star = NULL, + radars_stroke_width = NULL, + radars_stroke_opacity = NULL, + radars_fill_opacity = NULL, + radars_star_inner_radius = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + facet_comparisons = NULL, + facet_comparison_stroke = NULL, + facet_comparison_stroke_width = NULL, + facet_comparison_stroke_opacity = NULL, + facet_comparison_fill = NULL, + facet_comparison_fill_opacity = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + chart_radial_axis_axis_show = NULL, + chart_radial_axis_x_line_color = NULL, + chart_radial_axis_x_line_width = NULL, + chart_radial_axis_x_tick_label_color = NULL, + chart_radial_axis_x_tick_label_size = NULL, + chart_radial_axis_x_tick_label_outline = NULL, + chart_radial_axis_x_tick_label_weight = NULL, + chart_radial_axis_y_min = NULL, + chart_radial_axis_y_max = NULL, + chart_radial_axis_y_tick_number = NULL, + chart_radial_axis_y_line_color = NULL, + chart_radial_axis_y_line_width = NULL, + chart_radial_axis_y_line_dash = NULL, + chart_radial_axis_y_line_dash_gap = NULL, + chart_radial_axis_y_tick_label_color = NULL, + chart_radial_axis_y_tick_label_size = NULL, + chart_radial_axis_y_tick_label_outline = NULL, + chart_radial_axis_y_tick_label_space = NULL, + chart_radial_axis_y_tick_label_weight = NULL, + chart_radial_axis_margin_top = NULL, + chart_radial_axis_margin_right = NULL, + chart_radial_axis_margin_bottom = NULL, + chart_radial_axis_margin_left = NULL, + chart_radial_axis_group_labels = NULL, + chart_radial_axis_group_labels_color = NULL, + chart_radial_axis_group_labels_size = NULL, + chart_radial_axis_group_labels_letter_spacing = NULL, + chart_radial_axis_group_labels_space_above = NULL, + chart_radial_axis_group_labels_space_below = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_legend_show_legend = NULL, + chart_legend_title_mode = NULL, + chart_legend_title = NULL, + chart_legend_swatch_width = NULL, + chart_legend_swatch_height = NULL, + chart_legend_swatch_radius = NULL, + chart_legend_legend_items_padding = NULL, + chart_legend_swatch_outline = NULL, + chart_legend_swatch_outline_color = NULL, + chart_legend_order_override = NULL, + chart_legend_icon_height = NULL, + chart_legend_icon_color = NULL, + chart_legend_max_width = NULL, + chart_legend_orientation = NULL, + facet_control_show = NULL, + facet_control_default = NULL, + facet_control_none = NULL, + facets_label_combined = NULL, + facet_control_individual = NULL, + facets_label_separate = NULL, + chart_facet_filter_controls_control_type = NULL, + chart_facet_filter_controls_control_styles = NULL, + chart_facet_filter_controls_control_title = NULL, + chart_facet_filter_controls_button_group = NULL, + chart_facet_filter_controls_button_group_width_mode = NULL, + chart_facet_filter_controls_button_group_width_fixed = NULL, + chart_facet_filter_controls_dropdown_width_mode = NULL, + chart_facet_filter_controls_dropdown_width_fixed = NULL, + chart_facet_filter_controls_slider_width = NULL, + chart_facet_filter_controls_slider_max_label_width = NULL, + chart_facet_filter_controls_slider_step_time = NULL, + chart_facet_filter_controls_slider_loop = NULL, + chart_facet_filter_controls_slider_restart_pause = NULL, + chart_facet_filter_controls_sort = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_control_all = NULL, + filter_y_max = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + popup_color_headings = NULL, + duration = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "radar") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/radar")) { + stop("`set_radar_details()` is not supported for this chart type.") + } + list_radars_curve <- c("linear", "cardinal", NULL) + if (!is.null(radars_curve)) { + if (!radars_curve %in% list_radars_curve) { + stop("`radars_curve` must be one of: c('linear', 'cardinal')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "cardinal": "cardinal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "cardinal": "cardinal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && radars_curve %in% names(named_list)) { + if (is.logical(radars_curve)) { + radars_curve <- as.character(radars_curve) + } + named_list_value <- unname(named_list[radars_curve])[[1]] + new_list$x$state$radars$curve <- named_list_value + } + } + } + } + list_radars_star <- c(FALSE, TRUE, NULL) + if (!is.null(radars_star)) { + if (!radars_star %in% list_radars_star) { + stop("`radars_star` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && radars_star %in% names(named_list)) { + if (is.logical(radars_star)) { + radars_star <- as.character(radars_star) + } + named_list_value <- unname(named_list[radars_star])[[1]] + new_list$x$state$radars$star <- named_list_value + } + } + } + } + new_list$x$state$radars$stroke_width <- radars_stroke_width + new_list$x$state$radars$stroke_opacity <- radars_stroke_opacity + new_list$x$state$radars$fill_opacity <- radars_fill_opacity + new_list$x$state$radars$star_inner_radius <- radars_star_inner_radius + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$facet_comparisons <- facet_comparisons + new_list$x$state$facet_comparison_stroke <- facet_comparison_stroke + new_list$x$state$facet_comparison_stroke_width <- facet_comparison_stroke_width + new_list$x$state$facet_comparison_stroke_opacity <- facet_comparison_stroke_opacity + new_list$x$state$facet_comparison_fill <- facet_comparison_fill + new_list$x$state$facet_comparison_fill_opacity <- facet_comparison_fill_opacity + list_chart_facet_columns_fixed <- c(FALSE, TRUE, NULL) + if (!is.null(chart_facet_columns_fixed)) { + if (!chart_facet_columns_fixed %in% list_chart_facet_columns_fixed) { + stop("`chart_facet_columns_fixed` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_columns_fixed %in% names(named_list)) { + if (is.logical(chart_facet_columns_fixed)) { + chart_facet_columns_fixed <- as.character(chart_facet_columns_fixed) + } + named_list_value <- unname(named_list[chart_facet_columns_fixed])[[1]] + new_list$x$state$facets$columns_fixed <- named_list_value + } + } + } + } + new_list$x$state$facets$columns <- chart_facet_columns + new_list$x$state$facets$min_width <- chart_facet_min_width + new_list$x$state$facets$min_width_fixed <- chart_facet_min_width_fixed + new_list$x$state$facets$custom_grid <- chart_facet_custom_grid + if (length(chart_facet_custom_positions) > 1) { + new_list$x$state$facets$custom_positions <- paste(chart_facet_custom_positions, collapse = "\n") + } else { + new_list$x$state$facets$custom_positions <- chart_facet_custom_positions + } + + new_list$x$state$facets$max_width <- chart_facet_max_width + new_list$x$state$facets$gutter_w <- chart_facet_gutter_w + new_list$x$state$facets$gutter_h <- chart_facet_gutter_h + list_chart_facet_animation <- c("auto", "name", "reuse", NULL) + if (!is.null(chart_facet_animation)) { + if (!chart_facet_animation %in% list_chart_facet_animation) { + stop("`chart_facet_animation` must be one of: c('auto', 'name', 'reuse')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_animation %in% names(named_list)) { + if (is.logical(chart_facet_animation)) { + chart_facet_animation <- as.character(chart_facet_animation) + } + named_list_value <- unname(named_list[chart_facet_animation])[[1]] + new_list$x$state$facets$animation <- named_list_value + } + } + } + } + new_list$x$state$facets$titles <- chart_facet_titles + list_chart_facet_title_align <- c("auto", "left", "center", "right", NULL) + if (!is.null(chart_facet_title_align)) { + if (!chart_facet_title_align %in% list_chart_facet_title_align) { + stop("`chart_facet_title_align` must be one of: c('auto', 'left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_align %in% names(named_list)) { + if (is.logical(chart_facet_title_align)) { + chart_facet_title_align <- as.character(chart_facet_title_align) + } + named_list_value <- unname(named_list[chart_facet_title_align])[[1]] + new_list$x$state$facets$title_align <- named_list_value + } + } + } + } + new_list$x$state$facets$title_size <- chart_facet_title_size + list_chart_facet_title_unit <- c("rem", "facet", NULL) + if (!is.null(chart_facet_title_unit)) { + if (!chart_facet_title_unit %in% list_chart_facet_title_unit) { + stop("`chart_facet_title_unit` must be one of: c('rem', 'facet')") + } else { + if (length(jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_unit %in% names(named_list)) { + if (is.logical(chart_facet_title_unit)) { + chart_facet_title_unit <- as.character(chart_facet_title_unit) + } + named_list_value <- unname(named_list[chart_facet_title_unit])[[1]] + new_list$x$state$facets$title_unit <- named_list_value + } + } + } + } + new_list$x$state$facets$title_color <- chart_facet_title_color + new_list$x$state$facets$title_padding_top <- chart_facet_title_padding_top + new_list$x$state$facets$title_padding_bottom <- chart_facet_title_padding_bottom + list_chart_facet_title_bg <- c("none", "full", "text", NULL) + if (!is.null(chart_facet_title_bg)) { + if (!chart_facet_title_bg %in% list_chart_facet_title_bg) { + stop("`chart_facet_title_bg` must be one of: c('none', 'full', 'text')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_bg %in% names(named_list)) { + if (is.logical(chart_facet_title_bg)) { + chart_facet_title_bg <- as.character(chart_facet_title_bg) + } + named_list_value <- unname(named_list[chart_facet_title_bg])[[1]] + new_list$x$state$facets$title_bg <- named_list_value + } + } + } + } + new_list$x$state$facets$title_bg_color <- chart_facet_title_bg_color + new_list$x$state$facets$title_bg_padding <- chart_facet_title_bg_padding + list_chart_radial_axis_axis_show <- c(TRUE, FALSE, NULL) + if (!is.null(chart_radial_axis_axis_show)) { + if (!chart_radial_axis_axis_show %in% list_chart_radial_axis_axis_show) { + stop("`chart_radial_axis_axis_show` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_radial_axis_axis_show %in% names(named_list)) { + if (is.logical(chart_radial_axis_axis_show)) { + chart_radial_axis_axis_show <- as.character(chart_radial_axis_axis_show) + } + named_list_value <- unname(named_list[chart_radial_axis_axis_show])[[1]] + new_list$x$state$radial_axis$axis_show <- named_list_value + } + } + } + } + new_list$x$state$radial_axis$x_line_color <- chart_radial_axis_x_line_color + new_list$x$state$radial_axis$x_line_width <- chart_radial_axis_x_line_width + new_list$x$state$radial_axis$x_tick_label_color <- chart_radial_axis_x_tick_label_color + new_list$x$state$radial_axis$x_tick_label_size <- chart_radial_axis_x_tick_label_size + new_list$x$state$radial_axis$x_tick_label_outline <- chart_radial_axis_x_tick_label_outline + list_chart_radial_axis_x_tick_label_weight <- c("600", "400", NULL) + if (!is.null(chart_radial_axis_x_tick_label_weight)) { + if (!chart_radial_axis_x_tick_label_weight %in% list_chart_radial_axis_x_tick_label_weight) { + stop("`chart_radial_axis_x_tick_label_weight` must be one of: c('600', '400')") + } else { + if (length(jsonlite::fromJSON('{"600": "600", "400": "400"}')) > 1) { + named_list <- jsonlite::fromJSON('{"600": "600", "400": "400"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_radial_axis_x_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_radial_axis_x_tick_label_weight)) { + chart_radial_axis_x_tick_label_weight <- as.character(chart_radial_axis_x_tick_label_weight) + } + named_list_value <- unname(named_list[chart_radial_axis_x_tick_label_weight])[[1]] + new_list$x$state$radial_axis$x_tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$radial_axis$y_min <- chart_radial_axis_y_min + new_list$x$state$radial_axis$y_max <- chart_radial_axis_y_max + new_list$x$state$radial_axis$y_tick_number <- chart_radial_axis_y_tick_number + new_list$x$state$radial_axis$y_line_color <- chart_radial_axis_y_line_color + new_list$x$state$radial_axis$y_line_width <- chart_radial_axis_y_line_width + new_list$x$state$radial_axis$y_line_dash <- chart_radial_axis_y_line_dash + new_list$x$state$radial_axis$y_line_dash_gap <- chart_radial_axis_y_line_dash_gap + new_list$x$state$radial_axis$y_tick_label_color <- chart_radial_axis_y_tick_label_color + new_list$x$state$radial_axis$y_tick_label_size <- chart_radial_axis_y_tick_label_size + new_list$x$state$radial_axis$y_tick_label_outline <- chart_radial_axis_y_tick_label_outline + new_list$x$state$radial_axis$y_tick_label_space <- chart_radial_axis_y_tick_label_space + list_chart_radial_axis_y_tick_label_weight <- c("600", "400", NULL) + if (!is.null(chart_radial_axis_y_tick_label_weight)) { + if (!chart_radial_axis_y_tick_label_weight %in% list_chart_radial_axis_y_tick_label_weight) { + stop("`chart_radial_axis_y_tick_label_weight` must be one of: c('600', '400')") + } else { + if (length(jsonlite::fromJSON('{"600": "600", "400": "400"}')) > 1) { + named_list <- jsonlite::fromJSON('{"600": "600", "400": "400"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_radial_axis_y_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_radial_axis_y_tick_label_weight)) { + chart_radial_axis_y_tick_label_weight <- as.character(chart_radial_axis_y_tick_label_weight) + } + named_list_value <- unname(named_list[chart_radial_axis_y_tick_label_weight])[[1]] + new_list$x$state$radial_axis$y_tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$radial_axis$margin_top <- chart_radial_axis_margin_top + new_list$x$state$radial_axis$margin_right <- chart_radial_axis_margin_right + new_list$x$state$radial_axis$margin_bottom <- chart_radial_axis_margin_bottom + new_list$x$state$radial_axis$margin_left <- chart_radial_axis_margin_left + if (length(chart_radial_axis_group_labels) > 1) { + new_list$x$state$radial_axis$group_labels <- paste(chart_radial_axis_group_labels, collapse = "\n") + } else { + new_list$x$state$radial_axis$group_labels <- chart_radial_axis_group_labels + } + + new_list$x$state$radial_axis$group_labels_color <- chart_radial_axis_group_labels_color + new_list$x$state$radial_axis$group_labels_size <- chart_radial_axis_group_labels_size + new_list$x$state$radial_axis$group_labels_letter_spacing <- chart_radial_axis_group_labels_letter_spacing + new_list$x$state$radial_axis$group_labels_space_above <- chart_radial_axis_group_labels_space_above + new_list$x$state$radial_axis$group_labels_space_below <- chart_radial_axis_group_labels_space_below + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_chart_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_legend_show_legend)) { + if (!chart_legend_show_legend %in% list_chart_legend_show_legend) { + stop("`chart_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_legend_show_legend)) { + chart_legend_show_legend <- as.character(chart_legend_show_legend) + } + named_list_value <- unname(named_list[chart_legend_show_legend])[[1]] + new_list$x$state$legend$show_legend <- named_list_value + } + } + } + } + list_chart_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_legend_title_mode)) { + if (!chart_legend_title_mode %in% list_chart_legend_title_mode) { + stop("`chart_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_legend_title_mode)) { + chart_legend_title_mode <- as.character(chart_legend_title_mode) + } + named_list_value <- unname(named_list[chart_legend_title_mode])[[1]] + new_list$x$state$legend$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend$title <- chart_legend_title + new_list$x$state$legend$swatch_width <- chart_legend_swatch_width + new_list$x$state$legend$swatch_height <- chart_legend_swatch_height + new_list$x$state$legend$swatch_radius <- chart_legend_swatch_radius + new_list$x$state$legend$legend_items_padding <- chart_legend_legend_items_padding + new_list$x$state$legend$swatch_outline <- chart_legend_swatch_outline + new_list$x$state$legend$swatch_outline_color <- chart_legend_swatch_outline_color + if (length(chart_legend_order_override) > 1) { + new_list$x$state$legend$order_override <- paste(chart_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend$order_override <- chart_legend_order_override + } + + new_list$x$state$legend$icon_height <- chart_legend_icon_height + new_list$x$state$legend$icon_color <- chart_legend_icon_color + new_list$x$state$legend$max_width <- chart_legend_max_width + list_chart_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_orientation)) { + if (!chart_legend_orientation %in% list_chart_legend_orientation) { + stop("`chart_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_orientation %in% names(named_list)) { + if (is.logical(chart_legend_orientation)) { + chart_legend_orientation <- as.character(chart_legend_orientation) + } + named_list_value <- unname(named_list[chart_legend_orientation])[[1]] + new_list$x$state$legend$orientation <- named_list_value + } + } + } + } + new_list$x$state$facet_control_show <- facet_control_show + new_list$x$state$facet_control_default <- facet_control_default + new_list$x$state$facet_control_none <- facet_control_none + new_list$x$state$facets_label_combined <- facets_label_combined + new_list$x$state$facet_control_individual <- facet_control_individual + new_list$x$state$facets_label_separate <- facets_label_separate + list_chart_facet_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_facet_filter_controls_control_type)) { + if (!chart_facet_filter_controls_control_type %in% list_chart_facet_filter_controls_control_type) { + stop("`chart_facet_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_facet_filter_controls_control_type)) { + chart_facet_filter_controls_control_type <- as.character(chart_facet_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_facet_filter_controls_control_type])[[1]] + new_list$x$state$facets_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$facets_control$control_styles <- chart_facet_filter_controls_control_styles + new_list$x$state$facets_control$control_title <- chart_facet_filter_controls_control_title + list_chart_facet_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_facet_filter_controls_button_group)) { + if (!chart_facet_filter_controls_button_group %in% list_chart_facet_filter_controls_button_group) { + stop("`chart_facet_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_facet_filter_controls_button_group)) { + chart_facet_filter_controls_button_group <- as.character(chart_facet_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_facet_filter_controls_button_group])[[1]] + new_list$x$state$facets_control$button_group <- named_list_value + } + } + } + } + list_chart_facet_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_facet_filter_controls_button_group_width_mode)) { + if (!chart_facet_filter_controls_button_group_width_mode %in% list_chart_facet_filter_controls_button_group_width_mode) { + stop("`chart_facet_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_facet_filter_controls_button_group_width_mode)) { + chart_facet_filter_controls_button_group_width_mode <- as.character(chart_facet_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_facet_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$facets_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$facets_control$button_group_width_fixed <- chart_facet_filter_controls_button_group_width_fixed + list_chart_facet_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_facet_filter_controls_dropdown_width_mode)) { + if (!chart_facet_filter_controls_dropdown_width_mode %in% list_chart_facet_filter_controls_dropdown_width_mode) { + stop("`chart_facet_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_facet_filter_controls_dropdown_width_mode)) { + chart_facet_filter_controls_dropdown_width_mode <- as.character(chart_facet_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_facet_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$facets_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$facets_control$dropdown_width_fixed <- chart_facet_filter_controls_dropdown_width_fixed + new_list$x$state$facets_control$slider_width <- chart_facet_filter_controls_slider_width + new_list$x$state$facets_control$slider_max_label_width <- chart_facet_filter_controls_slider_max_label_width + new_list$x$state$facets_control$slider_step_time <- chart_facet_filter_controls_slider_step_time + new_list$x$state$facets_control$slider_loop <- chart_facet_filter_controls_slider_loop + new_list$x$state$facets_control$slider_restart_pause <- chart_facet_filter_controls_slider_restart_pause + list_chart_facet_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_facet_filter_controls_sort)) { + if (!chart_facet_filter_controls_sort %in% list_chart_facet_filter_controls_sort) { + stop("`chart_facet_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_facet_filter_controls_sort)) { + chart_facet_filter_controls_sort <- as.character(chart_facet_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_facet_filter_controls_sort])[[1]] + new_list$x$state$facets_control$sort <- named_list_value + } + } + } + } + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$filter_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$filter_control$control_styles <- chart_filter_controls_control_styles + new_list$x$state$filter_control$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$filter_control$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$filter_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$filter_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$filter_control$slider_width <- chart_filter_controls_slider_width + new_list$x$state$filter_control$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$filter_control$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$filter_control$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$filter_control$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$filter_control$sort <- named_list_value + } + } + } + } + new_list$x$state$filter_control_all <- filter_control_all + new_list$x$state$filter_y_max <- filter_y_max + new_list$x$state$style_controls$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$style_controls$font_weight <- named_list_value + } + } + } + } + new_list$x$state$style_controls$height <- chart_controls_style_height + new_list$x$state$style_button$background <- chart_button_control_style_background + new_list$x$state$style_button$background_selected <- chart_button_control_style_background_selected + new_list$x$state$style_button$background_hover <- chart_button_control_style_background_hover + new_list$x$state$style_button$font_color <- chart_button_control_style_font_color + new_list$x$state$style_button$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$style_button$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$style_button$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$style_button$border_width <- chart_button_control_style_border_width + new_list$x$state$style_button$border_color <- chart_button_control_style_border_color + new_list$x$state$style_button$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$style_button$border_radius <- chart_button_control_style_border_radius + new_list$x$state$style_dropdown$background <- chart_dropdown_control_style_background + new_list$x$state$style_dropdown$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$style_dropdown$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$style_dropdown$border_style <- named_list_value + } + } + } + } + new_list$x$state$style_dropdown$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$style_dropdown$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$style_dropdown$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$style_dropdown$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$style_slider$track_color <- chart_slider_control_style_track_color + new_list$x$state$style_slider$font_color <- chart_slider_control_style_font_color + new_list$x$state$style_slider$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$style_slider$play_color <- chart_slider_control_style_play_color + new_list$x$state$style_slider$track_height <- chart_slider_control_style_track_height + new_list$x$state$style_slider$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$style_slider$play_button <- chart_slider_control_style_play_button + list_chart_filter_controls_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_filter_controls_container_alignment)) { + if (!chart_filter_controls_container_alignment %in% list_chart_filter_controls_container_alignment) { + stop("`chart_filter_controls_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_container_alignment %in% names(named_list)) { + if (is.logical(chart_filter_controls_container_alignment)) { + chart_filter_controls_container_alignment <- as.character(chart_filter_controls_container_alignment) + } + named_list_value <- unname(named_list[chart_filter_controls_container_alignment])[[1]] + new_list$x$state$controls_container$alignment <- named_list_value + } + } + } + } + new_list$x$state$controls_container$controls_spacing <- chart_filter_controls_container_controls_spacing + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + new_list$x$state$popup_color_headings <- popup_color_headings + new_list$x$state$duration <- duration + new_list$x$state$formatting$prefix <- chart_number_date_format_prefix + new_list$x$state$formatting$suffix <- chart_number_date_format_suffix + new_list$x$state$formatting$n_dec <- chart_number_date_format_n_dec + new_list$x$state$formatting$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$formatting$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$formatting$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$formatting$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$formatting$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$formatting$transform <- named_list_value + } + } + } + } + new_list$x$state$formatting$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$formatting$exponentiate_constant <- chart_number_date_format_exponentiate_constant + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_sankey_details.R b/R_package/R/set_sankey_details.R new file mode 100644 index 0000000..83bae9e --- /dev/null +++ b/R_package/R/set_sankey_details.R @@ -0,0 +1,3569 @@ +#' Set sankey diagram chart details +#' @name set_sankey_details +#' @param mode Mode. Choices: alluvial, sankey. Flourish type hint: string, defaults to `NULL` +#' @param spread Spread. Choices: step, column. Flourish type hint: string, defaults to `NULL` +#' @param alignment Alignment. Choices: justify, center, left, right. Flourish type hint: string, defaults to `NULL` +#' @param sorting_mode Sorting. Choices: datasheet, name, value, reduce_overlaps. Match sheet sorts based on the order of the categories as they appear in the datasheet. Value sorts by the value of the nodes at each stage. Reduce overlaps reduces the overlapping of links. Flourish type hint: string, defaults to `NULL` +#' @param node_sort_order Order. Choices: ascending, descending. Flourish type hint: string, defaults to `NULL` +#' @param iterations Iterations. Number of iterations of the layout algorithm before the diagram is drawn. The higher the value, the fewer link crossings you will see but the less likely the order is to match that in the datasheet. Flourish type hint: number, defaults to `NULL` +#' @param setup_settings Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param node_width Node width. Flourish type hint: number, defaults to `NULL` +#' @param node_padding Node spacing. The vertical gap between nodes. Flourish type hint: number, defaults to `NULL` +#' @param top_padding Margin above. Adds space at the top of the diagram; useful to accommodate any overflowing labels. Flourish type hint: number, defaults to `NULL` +#' @param bottom_padding Margin below. Adds space at the bottom of the diagram; useful to accommodate any overflowing labels. Flourish type hint: number, defaults to `NULL` +#' @param height_mode Height mode. Choices: aspect, standard. Whether responsive embeds should set their own height or use the standard responsive Flourish embed heights. Ignored in simple Iframe embeds, Canva and other fixed-height contexts. Flourish type hint: string, defaults to `NULL` +#' @param facet_aspect Aspect. Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_columns_fixed Grid mode. Choices: `FALSE`, `TRUE`. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_columns Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width Min chart width. The minimum width of a chart or cell in the grid. Determines the number of columns. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width_fixed Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_custom_grid Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_custom_positions Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to `NULL` +#' @param chart_facet_max_width Max chart width. The maximum width of a chart or cell in the grid. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_w Horizontal margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_h Vertical margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_animation On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_titles Show titles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_title_align Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_size Size. Relative to the width of the chart. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_unit Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_padding_top Space above. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_padding_bottom Space below. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_bg Background. Choices: none, full, text. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_bg_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_bg_padding Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to `NULL` +#' @param facets_hide_empty Hide empty charts when filtering. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param link_opacity Link opacity. Flourish type hint: number, defaults to `NULL` +#' @param background_opacity Defocused opacity. When a node or link is in focus, this sets the opacity of the links and nodes not in focus. Flourish type hint: number, defaults to `NULL` +#' @param custom_node_color Custom node color. Flourish type hint: color, defaults to `NULL` +#' @param links_color_mode Links color mode. Choices: node, source, target. Flourish type hint: string, defaults to `NULL` +#' @param label_mode Position. Choices: outwards, inwards. Flourish type hint: string, defaults to `NULL` +#' @param label_outwards_max_width Space. The max space available for the labels, as a percentage of the chart width. Flourish type hint: number, defaults to `NULL` +#' @param label_color_mode Color mode. Choices: auto, fixed. Flourish type hint: string, defaults to `NULL` +#' @param label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param label_bold Bold. Flourish type hint: boolean, defaults to `NULL` +#' @param label_show_values Include values. Flourish type hint: boolean, defaults to `NULL` +#' @param label_show_values_links Show link values. Choices: never, focused, always. Flourish type hint: string, defaults to `NULL` +#' @param label_color_links Colour. Flourish type hint: color, defaults to `NULL` +#' @param label_outline Outline. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param label_outline_width Width. As a percent of the font size. Flourish type hint: number, defaults to `NULL` +#' @param label_font_size Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param label_facet_scaling Scale with grid. Sets a max size based on the facet size, regardless of the page width. Flourish type hint: boolean, defaults to `NULL` +#' @param show_node_headings Show headings. Enables the labels above each column of nodes in an Alluvial diagram. Flourish type hint: boolean, defaults to `NULL` +#' @param node_headings_bold Bold. Flourish type hint: boolean, defaults to `NULL` +#' @param node_headings_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param node_headings_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param node_headings_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param node_headings_color Color. Flourish type hint: color, defaults to `NULL` +#' @param node_headings_overrides Custom overrides. On each line, type the step heading that you want to override, a double colon and then the replacement step heading. For example: 1 :: Phase A 2 :: Phase B. Flourish type hint: text, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_show_all Include "All". Flourish type hint: boolean, defaults to `NULL` +#' @param filter_show_all_text “All” label. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{LABEL}}` to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` If statements can also be used to show certain content for links only or nodes only. Use `{{#if IS_LINK}}` or `{{#if IS_NODE}}` like so: `{{#if IS_LINK}} This is a link popup {{/if}}` `{{#if IS_NODE}} This is a node popup {{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{LABEL}}` to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` If statements can also be used to show certain content for links only or nodes only. Use `{{#if IS_LINK}}` or `{{#if IS_NODE}}` like so: `{{#if IS_LINK}} This is a link popup {{/if}}` `{{#if IS_NODE}} This is a node popup {{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{LABEL}}` to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` If statements can also be used to show certain content for links only or nodes only. Use `{{#if IS_LINK}}` or `{{#if IS_NODE}}` like so: `{{#if IS_LINK}} This is a link panel {{/if}}` `{{#if IS_NODE}} This is a node panel {{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{LABEL}}` to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` If statements can also be used to show certain content for links only or nodes only. Use `{{#if IS_LINK}}` or `{{#if IS_NODE}}` like so: `{{#if IS_LINK}} This is a link panel {{/if}}` `{{#if IS_NODE}} This is a node panel {{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param popup_type Type. Choices: links, nodes, all. Flourish type hint: string, defaults to `NULL` +#' @param intro_duration Duration. Flourish type hint: number, defaults to `NULL` +#' @param intro_ease_range Speed variation. When set at zero, all the links are revealed at an even speed. When set above zero, the lines randomly accelerate and decelerate slightly to give a more natural effect. Flourish type hint: number, defaults to `NULL` +#' @param transition_duration Duration. In seconds. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "sankey", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_sankey_data(gapminder) |> +#' set_sankey_details() +#' ) +#' @export + +set_sankey_details <- function( + ., + mode = NULL, + spread = NULL, + alignment = NULL, + sorting_mode = NULL, + node_sort_order = NULL, + iterations = NULL, + setup_settings = NULL, + node_width = NULL, + node_padding = NULL, + top_padding = NULL, + bottom_padding = NULL, + height_mode = NULL, + facet_aspect = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + facets_hide_empty = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + link_opacity = NULL, + background_opacity = NULL, + custom_node_color = NULL, + links_color_mode = NULL, + label_mode = NULL, + label_outwards_max_width = NULL, + label_color_mode = NULL, + label_color = NULL, + label_bold = NULL, + label_show_values = NULL, + label_show_values_links = NULL, + label_color_links = NULL, + label_outline = NULL, + label_outline_width = NULL, + label_font_size = NULL, + label_facet_scaling = NULL, + show_node_headings = NULL, + node_headings_bold = NULL, + node_headings_font_size = NULL, + node_headings_padding = NULL, + node_headings_max_width = NULL, + node_headings_color = NULL, + node_headings_overrides = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_show_all = NULL, + filter_show_all_text = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + popup_type = NULL, + intro_duration = NULL, + intro_ease_range = NULL, + transition_duration = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "sankey") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/sankey")) { + stop("`set_sankey_details()` is not supported for this chart type.") + } + list_mode <- c("alluvial", "sankey", NULL) + if (!is.null(mode)) { + if (!mode %in% list_mode) { + stop("`mode` must be one of: c('alluvial', 'sankey')") + } else { + if (length(jsonlite::fromJSON('{"alluvial": "alluvial", "sankey": "sankey"}')) > 1) { + named_list <- jsonlite::fromJSON('{"alluvial": "alluvial", "sankey": "sankey"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && mode %in% names(named_list)) { + if (is.logical(mode)) { + mode <- as.character(mode) + } + named_list_value <- unname(named_list[mode])[[1]] + new_list$x$state$mode <- named_list_value + } + } + } + } + list_spread <- c("step", "column", NULL) + if (!is.null(spread)) { + if (!spread %in% list_spread) { + stop("`spread` must be one of: c('step', 'column')") + } else { + if (length(jsonlite::fromJSON('{"step": "step", "column": "column"}')) > 1) { + named_list <- jsonlite::fromJSON('{"step": "step", "column": "column"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && spread %in% names(named_list)) { + if (is.logical(spread)) { + spread <- as.character(spread) + } + named_list_value <- unname(named_list[spread])[[1]] + new_list$x$state$spread <- named_list_value + } + } + } + } + list_alignment <- c("justify", "center", "left", "right", NULL) + if (!is.null(alignment)) { + if (!alignment %in% list_alignment) { + stop("`alignment` must be one of: c('justify', 'center', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"justify": "justify", "center": "center", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"justify": "justify", "center": "center", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && alignment %in% names(named_list)) { + if (is.logical(alignment)) { + alignment <- as.character(alignment) + } + named_list_value <- unname(named_list[alignment])[[1]] + new_list$x$state$alignment <- named_list_value + } + } + } + } + list_sorting_mode <- c("datasheet", "name", "value", "reduce_overlaps", NULL) + if (!is.null(sorting_mode)) { + if (!sorting_mode %in% list_sorting_mode) { + stop("`sorting_mode` must be one of: c('datasheet', 'name', 'value', 'reduce_overlaps')") + } else { + if (length(jsonlite::fromJSON('{"datasheet": "datasheet", "name": "name", "value": "value", "reduce_overlaps": "reduce_overlaps"}')) > 1) { + named_list <- jsonlite::fromJSON('{"datasheet": "datasheet", "name": "name", "value": "value", "reduce_overlaps": "reduce_overlaps"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && sorting_mode %in% names(named_list)) { + if (is.logical(sorting_mode)) { + sorting_mode <- as.character(sorting_mode) + } + named_list_value <- unname(named_list[sorting_mode])[[1]] + new_list$x$state$sorting_mode <- named_list_value + } + } + } + } + list_node_sort_order <- c("ascending", "descending", NULL) + if (!is.null(node_sort_order)) { + if (!node_sort_order %in% list_node_sort_order) { + stop("`node_sort_order` must be one of: c('ascending', 'descending')") + } else { + if (length(jsonlite::fromJSON('{"ascending": "ascending", "descending": "descending"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ascending": "ascending", "descending": "descending"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && node_sort_order %in% names(named_list)) { + if (is.logical(node_sort_order)) { + node_sort_order <- as.character(node_sort_order) + } + named_list_value <- unname(named_list[node_sort_order])[[1]] + new_list$x$state$node_sort_order <- named_list_value + } + } + } + } + new_list$x$state$iterations <- iterations + new_list$x$state$setup_settings <- setup_settings + new_list$x$state$node_width <- node_width + new_list$x$state$node_padding <- node_padding + new_list$x$state$top_padding <- top_padding + new_list$x$state$bottom_padding <- bottom_padding + list_height_mode <- c("aspect", "standard", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('aspect', 'standard')") + } else { + if (length(jsonlite::fromJSON('{"aspect": "aspect", "standard": "standard"}')) > 1) { + named_list <- jsonlite::fromJSON('{"aspect": "aspect", "standard": "standard"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + new_list$x$state$facet_aspect <- facet_aspect + list_chart_facet_columns_fixed <- c(FALSE, TRUE, NULL) + if (!is.null(chart_facet_columns_fixed)) { + if (!chart_facet_columns_fixed %in% list_chart_facet_columns_fixed) { + stop("`chart_facet_columns_fixed` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_columns_fixed %in% names(named_list)) { + if (is.logical(chart_facet_columns_fixed)) { + chart_facet_columns_fixed <- as.character(chart_facet_columns_fixed) + } + named_list_value <- unname(named_list[chart_facet_columns_fixed])[[1]] + new_list$x$state$facets$columns_fixed <- named_list_value + } + } + } + } + new_list$x$state$facets$columns <- chart_facet_columns + new_list$x$state$facets$min_width <- chart_facet_min_width + new_list$x$state$facets$min_width_fixed <- chart_facet_min_width_fixed + new_list$x$state$facets$custom_grid <- chart_facet_custom_grid + if (length(chart_facet_custom_positions) > 1) { + new_list$x$state$facets$custom_positions <- paste(chart_facet_custom_positions, collapse = "\n") + } else { + new_list$x$state$facets$custom_positions <- chart_facet_custom_positions + } + + new_list$x$state$facets$max_width <- chart_facet_max_width + new_list$x$state$facets$gutter_w <- chart_facet_gutter_w + new_list$x$state$facets$gutter_h <- chart_facet_gutter_h + list_chart_facet_animation <- c("auto", "name", "reuse", NULL) + if (!is.null(chart_facet_animation)) { + if (!chart_facet_animation %in% list_chart_facet_animation) { + stop("`chart_facet_animation` must be one of: c('auto', 'name', 'reuse')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_animation %in% names(named_list)) { + if (is.logical(chart_facet_animation)) { + chart_facet_animation <- as.character(chart_facet_animation) + } + named_list_value <- unname(named_list[chart_facet_animation])[[1]] + new_list$x$state$facets$animation <- named_list_value + } + } + } + } + new_list$x$state$facets$titles <- chart_facet_titles + list_chart_facet_title_align <- c("auto", "left", "center", "right", NULL) + if (!is.null(chart_facet_title_align)) { + if (!chart_facet_title_align %in% list_chart_facet_title_align) { + stop("`chart_facet_title_align` must be one of: c('auto', 'left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_align %in% names(named_list)) { + if (is.logical(chart_facet_title_align)) { + chart_facet_title_align <- as.character(chart_facet_title_align) + } + named_list_value <- unname(named_list[chart_facet_title_align])[[1]] + new_list$x$state$facets$title_align <- named_list_value + } + } + } + } + new_list$x$state$facets$title_size <- chart_facet_title_size + list_chart_facet_title_unit <- c("rem", "facet", NULL) + if (!is.null(chart_facet_title_unit)) { + if (!chart_facet_title_unit %in% list_chart_facet_title_unit) { + stop("`chart_facet_title_unit` must be one of: c('rem', 'facet')") + } else { + if (length(jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_unit %in% names(named_list)) { + if (is.logical(chart_facet_title_unit)) { + chart_facet_title_unit <- as.character(chart_facet_title_unit) + } + named_list_value <- unname(named_list[chart_facet_title_unit])[[1]] + new_list$x$state$facets$title_unit <- named_list_value + } + } + } + } + new_list$x$state$facets$title_color <- chart_facet_title_color + new_list$x$state$facets$title_padding_top <- chart_facet_title_padding_top + new_list$x$state$facets$title_padding_bottom <- chart_facet_title_padding_bottom + list_chart_facet_title_bg <- c("none", "full", "text", NULL) + if (!is.null(chart_facet_title_bg)) { + if (!chart_facet_title_bg %in% list_chart_facet_title_bg) { + stop("`chart_facet_title_bg` must be one of: c('none', 'full', 'text')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_bg %in% names(named_list)) { + if (is.logical(chart_facet_title_bg)) { + chart_facet_title_bg <- as.character(chart_facet_title_bg) + } + named_list_value <- unname(named_list[chart_facet_title_bg])[[1]] + new_list$x$state$facets$title_bg <- named_list_value + } + } + } + } + new_list$x$state$facets$title_bg_color <- chart_facet_title_bg_color + new_list$x$state$facets$title_bg_padding <- chart_facet_title_bg_padding + new_list$x$state$facets_hide_empty <- facets_hide_empty + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$link_opacity <- link_opacity + new_list$x$state$background_opacity <- background_opacity + new_list$x$state$custom_node_color <- custom_node_color + list_links_color_mode <- c("node", "source", "target", NULL) + if (!is.null(links_color_mode)) { + if (!links_color_mode %in% list_links_color_mode) { + stop("`links_color_mode` must be one of: c('node', 'source', 'target')") + } else { + if (length(jsonlite::fromJSON('{"node": "node", "source": "source", "target": "target"}')) > 1) { + named_list <- jsonlite::fromJSON('{"node": "node", "source": "source", "target": "target"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && links_color_mode %in% names(named_list)) { + if (is.logical(links_color_mode)) { + links_color_mode <- as.character(links_color_mode) + } + named_list_value <- unname(named_list[links_color_mode])[[1]] + new_list$x$state$links_color_mode <- named_list_value + } + } + } + } + list_label_mode <- c("outwards", "inwards", NULL) + if (!is.null(label_mode)) { + if (!label_mode %in% list_label_mode) { + stop("`label_mode` must be one of: c('outwards', 'inwards')") + } else { + if (length(jsonlite::fromJSON('{"outwards": "outwards", "inwards": "inwards"}')) > 1) { + named_list <- jsonlite::fromJSON('{"outwards": "outwards", "inwards": "inwards"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_mode %in% names(named_list)) { + if (is.logical(label_mode)) { + label_mode <- as.character(label_mode) + } + named_list_value <- unname(named_list[label_mode])[[1]] + new_list$x$state$label_mode <- named_list_value + } + } + } + } + new_list$x$state$label_outwards_max_width <- label_outwards_max_width + list_label_color_mode <- c("auto", "fixed", NULL) + if (!is.null(label_color_mode)) { + if (!label_color_mode %in% list_label_color_mode) { + stop("`label_color_mode` must be one of: c('auto', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_color_mode %in% names(named_list)) { + if (is.logical(label_color_mode)) { + label_color_mode <- as.character(label_color_mode) + } + named_list_value <- unname(named_list[label_color_mode])[[1]] + new_list$x$state$label_color_mode <- named_list_value + } + } + } + } + new_list$x$state$label_color <- label_color + new_list$x$state$label_bold <- label_bold + new_list$x$state$label_show_values <- label_show_values + list_label_show_values_links <- c("never", "focused", "always", NULL) + if (!is.null(label_show_values_links)) { + if (!label_show_values_links %in% list_label_show_values_links) { + stop("`label_show_values_links` must be one of: c('never', 'focused', 'always')") + } else { + if (length(jsonlite::fromJSON('{"never": "never", "focused": "focused", "always": "always"}')) > 1) { + named_list <- jsonlite::fromJSON('{"never": "never", "focused": "focused", "always": "always"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_show_values_links %in% names(named_list)) { + if (is.logical(label_show_values_links)) { + label_show_values_links <- as.character(label_show_values_links) + } + named_list_value <- unname(named_list[label_show_values_links])[[1]] + new_list$x$state$label_show_values_links <- named_list_value + } + } + } + } + new_list$x$state$label_color_links <- label_color_links + list_label_outline <- c(TRUE, FALSE, NULL) + if (!is.null(label_outline)) { + if (!label_outline %in% list_label_outline) { + stop("`label_outline` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_outline %in% names(named_list)) { + if (is.logical(label_outline)) { + label_outline <- as.character(label_outline) + } + named_list_value <- unname(named_list[label_outline])[[1]] + new_list$x$state$label_outline <- named_list_value + } + } + } + } + new_list$x$state$label_outline_width <- label_outline_width + new_list$x$state$label_font_size <- label_font_size + new_list$x$state$label_facet_scaling <- label_facet_scaling + new_list$x$state$show_node_headings <- show_node_headings + new_list$x$state$node_headings_bold <- node_headings_bold + new_list$x$state$node_headings_font_size <- node_headings_font_size + new_list$x$state$node_headings_padding <- node_headings_padding + new_list$x$state$node_headings_max_width <- node_headings_max_width + new_list$x$state$node_headings_color <- node_headings_color + if (length(node_headings_overrides) > 1) { + new_list$x$state$node_headings_overrides <- paste(node_headings_overrides, collapse = "\n") + } else { + new_list$x$state$node_headings_overrides <- node_headings_overrides + } + + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$filter_controls$control_type <- named_list_value + } + } + } + } + new_list$x$state$filter_controls$control_styles <- chart_filter_controls_control_styles + new_list$x$state$filter_controls$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$filter_controls$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$filter_controls$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_controls$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$filter_controls$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_controls$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$filter_controls$slider_width <- chart_filter_controls_slider_width + new_list$x$state$filter_controls$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$filter_controls$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$filter_controls$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$filter_controls$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$filter_controls$sort <- named_list_value + } + } + } + } + new_list$x$state$filter_show_all <- filter_show_all + new_list$x$state$filter_show_all_text <- filter_show_all_text + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$slider_style$track_color <- chart_slider_control_style_track_color + new_list$x$state$slider_style$font_color <- chart_slider_control_style_font_color + new_list$x$state$slider_style$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$slider_style$play_color <- chart_slider_control_style_play_color + new_list$x$state$slider_style$track_height <- chart_slider_control_style_track_height + new_list$x$state$slider_style$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$slider_style$play_button <- chart_slider_control_style_play_button + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + list_popup_type <- c("links", "nodes", "all", NULL) + if (!is.null(popup_type)) { + if (!popup_type %in% list_popup_type) { + stop("`popup_type` must be one of: c('links', 'nodes', 'all')") + } else { + if (length(jsonlite::fromJSON('{"links": "links", "nodes": "nodes", "all": "all"}')) > 1) { + named_list <- jsonlite::fromJSON('{"links": "links", "nodes": "nodes", "all": "all"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && popup_type %in% names(named_list)) { + if (is.logical(popup_type)) { + popup_type <- as.character(popup_type) + } + named_list_value <- unname(named_list[popup_type])[[1]] + new_list$x$state$popup_type <- named_list_value + } + } + } + } + new_list$x$state$intro_duration <- intro_duration + new_list$x$state$intro_ease_range <- intro_ease_range + new_list$x$state$transition_duration <- transition_duration + new_list$x$state$formatting$prefix <- chart_number_date_format_prefix + new_list$x$state$formatting$suffix <- chart_number_date_format_suffix + new_list$x$state$formatting$n_dec <- chart_number_date_format_n_dec + new_list$x$state$formatting$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$formatting$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$formatting$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$formatting$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$formatting$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$formatting$transform <- named_list_value + } + } + } + } + new_list$x$state$formatting$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$formatting$exponentiate_constant <- chart_number_date_format_exponentiate_constant + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_scatter_details.R b/R_package/R/set_scatter_details.R new file mode 100644 index 0000000..6e6d017 --- /dev/null +++ b/R_package/R/set_scatter_details.R @@ -0,0 +1,6611 @@ +#' Set scatter chart details +#' @name set_scatter_details +#' @param default_color Default color. Used when Color column is unspecified. Flourish type hint: color, defaults to `NULL` +#' @param fill_opacity Dot opacity. Flourish type hint: number, defaults to `NULL` +#' @param default_shape Default shape. Choices: circle, cross, diamond, square, star, triangle, wye. Used when Shape column is unspecified or empty. Flourish type hint: string, defaults to `NULL` +#' @param data_point_default_size Size. In pixel area. Only used when Size column is unspecified or empty. Subject to scaling with the chart size (see setting below). Flourish type hint: number, defaults to `NULL` +#' @param data_point_min_size Min size. In pixel area. Used when you have a Size column selected. Subject to scaling with the chart size. Flourish type hint: number, defaults to `NULL` +#' @param data_point_max_size Max size. In pixel area. Used when you have a Size column selected. Subject to scaling with the chart size. Flourish type hint: number, defaults to `NULL` +#' @param responsive_dots Scale dots based on chart size. Makes the dots get bigger or smaller relative to the chart size. Turn off to specify a fixed size regardless of chart size. Flourish type hint: boolean, defaults to `NULL` +#' @param stroke_opacity Outline opacity. Flourish type hint: number, defaults to `NULL` +#' @param stroke_width Outline width. Flourish type hint: number, defaults to `NULL` +#' @param stroke_mode Outline mode. Choices: auto, fixed. Choose Auto for outline color to match dot color. Choose Fixed to give all dots a uniform outline color. Flourish type hint: string, defaults to `NULL` +#' @param stroke_color Outline color. Flourish type hint: color, defaults to `NULL` +#' @param render_mode Renderer. Choices: svg, webgl. In most cases you should only need SVG, but you may want to choose WebGL if you have a lot of data or you notice your chart is running slowly on your device. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param labels_show Show labels on points. Labels only show up if you have designated a Name column in the data tab. Flourish type hint: boolean, defaults to `NULL` +#' @param labels_selective Labels to show. Choices: `FALSE`, `TRUE`. To show labels selectively, turn on this option and then make a story In the story editor, click on dots to hide/show the labels. Flourish type hint: boolean, defaults to `NULL` +#' @param label_color_type Label color. Choices: auto, match, fixed. Flourish type hint: string, defaults to `NULL` +#' @param label_color Fixed. Flourish type hint: color, defaults to `NULL` +#' @param labels_responsive Scale label. Choices: chart, data, none. Choose between no scale, scale by chart size, or try to fit the label in the data point. Flourish type hint: string, defaults to `NULL` +#' @param label_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param label_font_size_min Min font size. Flourish type hint: number, defaults to `NULL` +#' @param label_font_size_max Max font size. Flourish type hint: number, defaults to `NULL` +#' @param label_bg_size Shadow size. As percent of font size. Flourish type hint: number, defaults to `NULL` +#' @param label_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param label_align Alignment. Choices: auto, start, middle, end. Align the text at the start, middle or end of the data point. Flourish type hint: string, defaults to `NULL` +#' @param label_x_offset Offset. Choices: top, next. Place labels on top of or next to the data point. Flourish type hint: string, defaults to `NULL` +#' @param label_y_offset Offset. Choices: top, above, below. Place labels on top of or next to the data point. Flourish type hint: string, defaults to `NULL` +#' @param height_mode Sizing mode. Choices: auto, fill_space, aspect. In Fill space mode the graphic will fill the container (which by default will be the the standard Flourish responsive chart size). In Aspect ratio mode, you set the aspect ratio of the plot, and the container will be updated to accommodate it (not supported when embedded in a simple fixed-height iframe ). Flourish type hint: string, defaults to `NULL` +#' @param facet_aspect Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param facet_aspect_mobile Aspect (mobile). Aspect of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param chart_background_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_background_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_background_background_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_background_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_background_background_image_size Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to `NULL` +#' @param chart_background_background_image_position Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to `NULL` +#' @param margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param facet_fixed_cols Fixed number of columns in grid. Flourish type hint: boolean, defaults to `NULL` +#' @param facet_min_w Min chart width. Determines how many columns of charts there should be in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to `NULL` +#' @param facet_cols Number of columns in grid. Flourish type hint: number, defaults to `NULL` +#' @param facet_gutter_w Horizontal. In rems. Flourish type hint: number, defaults to `NULL` +#' @param facet_gutter_h Vertical. In rems. Flourish type hint: number, defaults to `NULL` +#' @param facet_header_font_size Text size. In rems. Flourish type hint: number, defaults to `NULL` +#' @param facet_title_align Alignment. Choices: auto, left, center. Flourish type hint: string, defaults to `NULL` +#' @param facet_header_color Color. Flourish type hint: color, defaults to `NULL` +#' @param lines_show Shows lines. Flourish type hint: boolean, defaults to `NULL` +#' @param line_width Line width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param line_curve Line style. Choices: curve_linear, curve_natural. Flourish type hint: string, defaults to `NULL` +#' @param line_opacity Line opacity. Flourish type hint: number, defaults to `NULL` +#' @param line_color_mode Line color. Choices: by_dot, fixed. When set to Match dots the lines will be the same as the first dot in the line. Flourish type hint: string, defaults to `NULL` +#' @param line_per_facet Lock lines to axes. Disable to allow lines to run between or animate between facets. Flourish type hint: boolean, defaults to `NULL` +#' @param line_color Color. Flourish type hint: color, defaults to `NULL` +#' @param line_arrows Arrow heads on lines. Flourish type hint: boolean, defaults to `NULL` +#' @param line_arrow_size Size. Flourish type hint: number, defaults to `NULL` +#' @param line_arrow_color_mode Color mode. Choices: auto, fixed. Flourish type hint: string, defaults to `NULL` +#' @param line_arrow_color Color. Flourish type hint: color, defaults to `NULL` +#' @param x_matching Matching x axis across grid of charts. Flourish type hint: boolean, defaults to `NULL` +#' @param x_single_row Only show x axis on first column of grid. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_axis_position Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_y_axis_position Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_zero_axis Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_position Position. Choices: default, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_side Tick side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param y_matching Matching y axis across grid of charts. Flourish type hint: boolean, defaults to `NULL` +#' @param y_single_col Only show Y axis on first column of grid. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_axis_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_zero_axis Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_title_position Position. Choices: side, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_position Position. Choices: default, above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_side Side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param legend_position Legend position. Choices: above, below, off. The legend position relative to the chart. A legend will not show with a single entry. Flourish type hint: string, defaults to `NULL` +#' @param legend_filtering_mode Clickable legend. Choices: filter_out, filter_in, off. When a legend item is clicked on, the corresponding dots can either be hidden or shown. This option can also be turned off. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_show_legend Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_continous_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_color_band_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_continous_legend_color_band_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_continous_legend_color_band_radius Roundness. The radius of the corners of the color band (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_continous_legend_binned_label_mode Binned label mode. Choices: thresholds, centers, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_binned_label_custom Custom bin labels. List numeric values, separated by semi-colons. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_legend_min Legend min. Flourish type hint: number, defaults to `NULL` +#' @param chart_continous_legend_additional_min_label Custom min label. Flourish type hint: string, defaults to `NULL` +#' @param chart_continous_legend_legend_max Legend max. Flourish type hint: number, defaults to `NULL` +#' @param chart_continous_legend_additional_max_label Custom max label. Flourish type hint: string, defaults to `NULL` +#' @param text_legend Choices: auto, custom, off. Flourish type hint: string, defaults to `NULL` +#' @param text_legend_title Title. Flourish type hint: boolean, defaults to `NULL` +#' @param text_legend_subtitle Subtitle. Flourish type hint: boolean, defaults to `NULL` +#' @param text_legend_bold Bold. If checked, always use bold for colored items. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_show_all Include "All". Flourish type hint: boolean, defaults to `NULL` +#' @param filter_show_all_text “All” label. Flourish type hint: string, defaults to `NULL` +#' @param filter_updates_axes Update axes when filtering. Choices: off, x, y, both. Flourish type hint: string, defaults to `NULL` +#' @param slider_updates_axes Update axes when using slider. Choices: off, x, y, both. Flourish type hint: string, defaults to `NULL` +#' @param time_label_show Show time label. Flourish type hint: boolean, defaults to `NULL` +#' @param time_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param time_label_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param time_label_font_size Size. As a percent of the default size; the actual size scales with the chart. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_slider_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_slider_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_slider_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_slider_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_slider_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_slider_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_slider_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_controls_spacing Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param fit_type Lines to show. Choices: none, both, color, chart, all. Flourish type hint: string, defaults to `NULL` +#' @param fit_force_origin Force line through origin. Flourish type hint: boolean, defaults to `NULL` +#' @param fit_line_width Width. Flourish type hint: number, defaults to `NULL` +#' @param fit_line_dash Dash. Flourish type hint: number, defaults to `NULL` +#' @param fit_line_color Color. Flourish type hint: color, defaults to `NULL` +#' @param beeswarm_plot Show beeswarm when plotting one numerical and one categorical axis. Choices: `TRUE`, `FALSE`. Auto mode will make a beeswarm unless there are more than 5000 points in the dataset. Note: Performance will be reduced with thousands of rows due to the nature of how beeswarm positions are computed. Flourish type hint: boolean, defaults to `NULL` +#' @param box_plot Show box plot when plotting one numerical and one categorical axis. Choices: `TRUE`, `FALSE`. To learn more about box plots see here. Flourish type hint: boolean, defaults to `NULL` +#' @param box_color Box color. Flourish type hint: color, defaults to `NULL` +#' @param box_opacity Box opacity. Flourish type hint: number, defaults to `NULL` +#' @param box_line_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param box_line_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param box_whisker_type Whisker type. Choices: tukey, all. Flourish type hint: string, defaults to `NULL` +#' @param box_whisker_multiplier Max whisker length (number of IQRs). Maximum distance whiskers should extend out from the box as a multiple of the interquartile range. 1.5 is John Tukeys classsic value. Flourish type hint: number, defaults to `NULL` +#' @param use_box_popup Box popup. If enabled, shows a popup for the box describing the first quartile, median, and third quartile. The user will not be able to access the popups for the points underneath the box. Flourish type hint: boolean, defaults to `NULL` +#' @param box_first_quartile_text First quartile. Flourish type hint: string, defaults to `NULL` +#' @param box_median_text Median. Flourish type hint: string, defaults to `NULL` +#' @param box_third_quartile_text Third quartile. Flourish type hint: string, defaults to `NULL` +#' @param violin_plot Show violin plot when plotting one numerical and one categorical axis. Choices: `TRUE`, `FALSE`. To learn more about violin plots see here. Flourish type hint: boolean, defaults to `NULL` +#' @param violin_bandwidth Bandwidth. The bandwidth in a violin plot determines the degree of smoothing applied to the probability density function estimating the shape of the plot. Generally, larger bandwidth values create a smoother plot with less detail, while smaller values create a more precise plot with more detail. Flourish type hint: number, defaults to `NULL` +#' @param violin_samples No. of samples. Number of points at which to calculate a violins distribution. More points means a more accurate curve but can also harm performance. Flourish type hint: number, defaults to `NULL` +#' @param violin_color Color. Flourish type hint: color, defaults to `NULL` +#' @param violin_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param violin_sizing Sizing mode. Choices: area, width. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_enabled Show highlights on the x axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_x_lines One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example, `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_x_line_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_line_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_line_dash Dash. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_areas One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_x_area_color Area. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_area_opacity Area opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_area_texture Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_vertical Vertical. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_x_label_y_position Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_x_position X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_x_font_weight Font weight. Choices: regular, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_x_label_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_shadow_color Shadow. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_x_shadow_enabled Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_y_enabled Show highlights on the y axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_axes_highlights_y_lines One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example: `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_y_line_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_line_width line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_line_dash Dash. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_areas One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to `NULL` +#' @param chart_axes_highlights_y_area_color Area. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_area_opacity Area opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_area_texture Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_x_position X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_y_position Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_axes_highlights_y_font_weight Font weight. Choices: regular, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_axes_highlights_y_label_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_shadow_color Shadow. Flourish type hint: color, defaults to `NULL` +#' @param chart_axes_highlights_y_shadow_enabled Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param annotations_styling Show annotations styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_annotations_defaults_text_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_text_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_annotations_defaults_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_label_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_annotations_defaults_text_background_mode Text background. Choices: none, outline, background. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_text_bg Outline. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_label_bg Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_text_alignment Alignment. Choices: auto, start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_popup_position Popup position. Choices: center, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_line_marker Marker. Choices: none, arrowhead_open, arrowhead. Flourish type hint: string, defaults to `NULL` +#' @param chart_annotations_defaults_stroke_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_annotations_defaults_stroke_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_annotations_defaults_connector_extend_line Extend line. Choices: enabled, disabled. Flourish type hint: string, defaults to `NULL` +#' @param animation_duration Animation duration. The duration of the animation for each dot or axis, in seconds. The animation can be seen between slides in a Flourish story. Flourish type hint: number, defaults to `NULL` +#' @param animation_stagger Animation stagger. The delay between each dot starting to move, in seconds; set to 0 to have all dots move simultaneously. Flourish type hint: number, defaults to `NULL` +#' @param line_animate_in Animate new lines in. Whether new lines should appear whole or be animated into view. Flourish type hint: boolean, defaults to `NULL` +#' @param line_animate_out Animate exiting lines. Whether filtered/removed lines should be removed whole or animated out of view. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_enabled Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_whitelist Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "scatter", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_scatter_data(gapminder) |> +#' set_scatter_details() +#' ) +#' @export + +set_scatter_details <- function( + ., + default_color = NULL, + fill_opacity = NULL, + default_shape = NULL, + data_point_default_size = NULL, + data_point_min_size = NULL, + data_point_max_size = NULL, + responsive_dots = NULL, + stroke_opacity = NULL, + stroke_width = NULL, + stroke_mode = NULL, + stroke_color = NULL, + render_mode = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + labels_show = NULL, + labels_selective = NULL, + label_color_type = NULL, + label_color = NULL, + labels_responsive = NULL, + label_font_size = NULL, + label_font_size_min = NULL, + label_font_size_max = NULL, + label_bg_size = NULL, + label_max_width = NULL, + label_align = NULL, + label_x_offset = NULL, + label_y_offset = NULL, + height_mode = NULL, + facet_aspect = NULL, + facet_aspect_mobile = NULL, + chart_background_background_color_enabled = NULL, + chart_background_background_image_enabled = NULL, + chart_background_background_color = NULL, + chart_background_background_image_src = NULL, + chart_background_background_image_size = NULL, + chart_background_background_image_position = NULL, + margin_top = NULL, + margin_right = NULL, + margin_bottom = NULL, + margin_left = NULL, + facet_fixed_cols = NULL, + facet_min_w = NULL, + facet_cols = NULL, + facet_gutter_w = NULL, + facet_gutter_h = NULL, + facet_header_font_size = NULL, + facet_title_align = NULL, + facet_header_color = NULL, + lines_show = NULL, + line_width = NULL, + line_curve = NULL, + line_opacity = NULL, + line_color_mode = NULL, + line_per_facet = NULL, + line_color = NULL, + line_arrows = NULL, + line_arrow_size = NULL, + line_arrow_color_mode = NULL, + line_arrow_color = NULL, + x_matching = NULL, + x_single_row = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_x_axis_number_date_format_prefix = NULL, + chart_x_axis_number_date_format_suffix = NULL, + chart_x_axis_number_date_format_n_dec = NULL, + chart_x_axis_number_date_format_advanced = NULL, + chart_x_axis_number_date_format_negative_sign = NULL, + chart_x_axis_number_date_format_strip_zeros = NULL, + chart_x_axis_number_date_format_strip_separator = NULL, + chart_x_axis_number_date_format_transform_labels = NULL, + chart_x_axis_number_date_format_transform = NULL, + chart_x_axis_number_date_format_multiply_divide_constant = NULL, + chart_x_axis_number_date_format_exponentiate_constant = NULL, + y_matching = NULL, + y_single_col = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_number_date_format_prefix = NULL, + chart_y_axis_number_date_format_suffix = NULL, + chart_y_axis_number_date_format_n_dec = NULL, + chart_y_axis_number_date_format_advanced = NULL, + chart_y_axis_number_date_format_negative_sign = NULL, + chart_y_axis_number_date_format_strip_zeros = NULL, + chart_y_axis_number_date_format_strip_separator = NULL, + chart_y_axis_number_date_format_transform_labels = NULL, + chart_y_axis_number_date_format_transform = NULL, + chart_y_axis_number_date_format_multiply_divide_constant = NULL, + chart_y_axis_number_date_format_exponentiate_constant = NULL, + legend_position = NULL, + legend_filtering_mode = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_continous_legend_show_legend = NULL, + chart_continous_legend_title_mode = NULL, + chart_continous_legend_title = NULL, + chart_continous_legend_color_band_width = NULL, + chart_continous_legend_color_band_height = NULL, + chart_continous_legend_color_band_radius = NULL, + chart_continous_legend_binned_label_mode = NULL, + chart_continous_legend_binned_label_custom = NULL, + chart_continous_legend_legend_min = NULL, + chart_continous_legend_additional_min_label = NULL, + chart_continous_legend_legend_max = NULL, + chart_continous_legend_additional_max_label = NULL, + text_legend = NULL, + text_legend_title = NULL, + text_legend_subtitle = NULL, + text_legend_bold = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_show_all = NULL, + filter_show_all_text = NULL, + filter_updates_axes = NULL, + slider_updates_axes = NULL, + time_label_show = NULL, + time_label_color = NULL, + time_label_opacity = NULL, + time_label_font_size = NULL, + chart_slider_filter_controls_control_type = NULL, + chart_slider_filter_controls_control_styles = NULL, + chart_slider_filter_controls_control_title = NULL, + chart_slider_filter_controls_button_group = NULL, + chart_slider_filter_controls_button_group_width_mode = NULL, + chart_slider_filter_controls_button_group_width_fixed = NULL, + chart_slider_filter_controls_dropdown_width_mode = NULL, + chart_slider_filter_controls_dropdown_width_fixed = NULL, + chart_slider_filter_controls_slider_width = NULL, + chart_slider_filter_controls_slider_max_label_width = NULL, + chart_slider_filter_controls_slider_step_time = NULL, + chart_slider_filter_controls_slider_loop = NULL, + chart_slider_filter_controls_slider_restart_pause = NULL, + chart_slider_filter_controls_sort = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + fit_type = NULL, + fit_force_origin = NULL, + fit_line_width = NULL, + fit_line_dash = NULL, + fit_line_color = NULL, + beeswarm_plot = NULL, + box_plot = NULL, + box_color = NULL, + box_opacity = NULL, + box_line_color = NULL, + box_line_width = NULL, + box_whisker_type = NULL, + box_whisker_multiplier = NULL, + use_box_popup = NULL, + box_first_quartile_text = NULL, + box_median_text = NULL, + box_third_quartile_text = NULL, + violin_plot = NULL, + violin_bandwidth = NULL, + violin_samples = NULL, + violin_color = NULL, + violin_opacity = NULL, + violin_sizing = NULL, + chart_axes_highlights_x_enabled = NULL, + chart_axes_highlights_x_lines = NULL, + chart_axes_highlights_x_line_color = NULL, + chart_axes_highlights_x_line_width = NULL, + chart_axes_highlights_x_line_dash = NULL, + chart_axes_highlights_x_areas = NULL, + chart_axes_highlights_x_area_color = NULL, + chart_axes_highlights_x_area_opacity = NULL, + chart_axes_highlights_x_area_texture = NULL, + chart_axes_highlights_x_label_vertical = NULL, + chart_axes_highlights_x_label_y_position = NULL, + chart_axes_highlights_x_label_x_position = NULL, + chart_axes_highlights_x_label_max_width = NULL, + chart_axes_highlights_x_font_size = NULL, + chart_axes_highlights_x_font_weight = NULL, + chart_axes_highlights_x_label_color = NULL, + chart_axes_highlights_x_shadow_color = NULL, + chart_axes_highlights_x_shadow_enabled = NULL, + chart_axes_highlights_y_enabled = NULL, + chart_axes_highlights_y_lines = NULL, + chart_axes_highlights_y_line_color = NULL, + chart_axes_highlights_y_line_width = NULL, + chart_axes_highlights_y_line_dash = NULL, + chart_axes_highlights_y_areas = NULL, + chart_axes_highlights_y_area_color = NULL, + chart_axes_highlights_y_area_opacity = NULL, + chart_axes_highlights_y_area_texture = NULL, + chart_axes_highlights_y_label_x_position = NULL, + chart_axes_highlights_y_label_y_position = NULL, + chart_axes_highlights_y_label_max_width = NULL, + chart_axes_highlights_y_font_size = NULL, + chart_axes_highlights_y_font_weight = NULL, + chart_axes_highlights_y_label_color = NULL, + chart_axes_highlights_y_shadow_color = NULL, + chart_axes_highlights_y_shadow_enabled = NULL, + annotations_styling = NULL, + chart_annotations_defaults_text_weight = NULL, + chart_annotations_defaults_text_size = NULL, + chart_annotations_defaults_text_color = NULL, + chart_annotations_defaults_label_width = NULL, + chart_annotations_defaults_text_background_mode = NULL, + chart_annotations_defaults_text_bg = NULL, + chart_annotations_defaults_label_bg = NULL, + chart_annotations_defaults_text_alignment = NULL, + chart_annotations_defaults_popup_position = NULL, + chart_annotations_defaults_line_marker = NULL, + chart_annotations_defaults_stroke_width = NULL, + chart_annotations_defaults_stroke_color = NULL, + chart_annotations_defaults_connector_extend_line = NULL, + animation_duration = NULL, + animation_stagger = NULL, + line_animate_in = NULL, + line_animate_out = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL) { + details_error(., "scatter") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/scatter")) { + stop("`set_scatter_details()` is not supported for this chart type.") + } + new_list$x$state$default_color <- default_color + new_list$x$state$fill_opacity <- fill_opacity + list_default_shape <- c("circle", "cross", "diamond", "square", "star", "triangle", "wye", NULL) + if (!is.null(default_shape)) { + if (!default_shape %in% list_default_shape) { + stop("`default_shape` must be one of: c('circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye')") + } else { + if (length(jsonlite::fromJSON('{"circle": "symbolCircle", "cross": "symbolCross", "diamond": "symbolDiamond", "square": "symbolSquare", "star": "symbolStar", "triangle": "symbolTriangle", "wye": "symbolWye"}')) > 1) { + named_list <- jsonlite::fromJSON('{"circle": "symbolCircle", "cross": "symbolCross", "diamond": "symbolDiamond", "square": "symbolSquare", "star": "symbolStar", "triangle": "symbolTriangle", "wye": "symbolWye"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && default_shape %in% names(named_list)) { + if (is.logical(default_shape)) { + default_shape <- as.character(default_shape) + } + named_list_value <- unname(named_list[default_shape])[[1]] + new_list$x$state$default_shape <- named_list_value + } + } + } + } + new_list$x$state$data_point_default_size <- data_point_default_size + new_list$x$state$data_point_min_size <- data_point_min_size + new_list$x$state$data_point_max_size <- data_point_max_size + new_list$x$state$responsive_dots <- responsive_dots + new_list$x$state$stroke_opacity <- stroke_opacity + new_list$x$state$stroke_width <- stroke_width + list_stroke_mode <- c("auto", "fixed", NULL) + if (!is.null(stroke_mode)) { + if (!stroke_mode %in% list_stroke_mode) { + stop("`stroke_mode` must be one of: c('auto', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && stroke_mode %in% names(named_list)) { + if (is.logical(stroke_mode)) { + stroke_mode <- as.character(stroke_mode) + } + named_list_value <- unname(named_list[stroke_mode])[[1]] + new_list$x$state$stroke_mode <- named_list_value + } + } + } + } + new_list$x$state$stroke_color <- stroke_color + list_render_mode <- c("svg", "webgl", NULL) + if (!is.null(render_mode)) { + if (!render_mode %in% list_render_mode) { + stop("`render_mode` must be one of: c('svg', 'webgl')") + } else { + if (length(jsonlite::fromJSON('{"svg": "svg", "webgl": "webgl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"svg": "svg", "webgl": "webgl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && render_mode %in% names(named_list)) { + if (is.logical(render_mode)) { + render_mode <- as.character(render_mode) + } + named_list_value <- unname(named_list[render_mode])[[1]] + new_list$x$state$render_mode <- named_list_value + } + } + } + } + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$labels_show <- labels_show + list_labels_selective <- c(FALSE, TRUE, NULL) + if (!is.null(labels_selective)) { + if (!labels_selective %in% list_labels_selective) { + stop("`labels_selective` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_selective %in% names(named_list)) { + if (is.logical(labels_selective)) { + labels_selective <- as.character(labels_selective) + } + named_list_value <- unname(named_list[labels_selective])[[1]] + new_list$x$state$labels_selective <- named_list_value + } + } + } + } + list_label_color_type <- c("auto", "match", "fixed", NULL) + if (!is.null(label_color_type)) { + if (!label_color_type %in% list_label_color_type) { + stop("`label_color_type` must be one of: c('auto', 'match', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "match": "match", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "match": "match", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_color_type %in% names(named_list)) { + if (is.logical(label_color_type)) { + label_color_type <- as.character(label_color_type) + } + named_list_value <- unname(named_list[label_color_type])[[1]] + new_list$x$state$label_color_type <- named_list_value + } + } + } + } + new_list$x$state$label_color <- label_color + list_labels_responsive <- c("chart", "data", "none", NULL) + if (!is.null(labels_responsive)) { + if (!labels_responsive %in% list_labels_responsive) { + stop("`labels_responsive` must be one of: c('chart', 'data', 'none')") + } else { + if (length(jsonlite::fromJSON('{"chart": "chart", "data": "data", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"chart": "chart", "data": "data", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_responsive %in% names(named_list)) { + if (is.logical(labels_responsive)) { + labels_responsive <- as.character(labels_responsive) + } + named_list_value <- unname(named_list[labels_responsive])[[1]] + new_list$x$state$labels_responsive <- named_list_value + } + } + } + } + new_list$x$state$label_font_size <- label_font_size + new_list$x$state$label_font_size_min <- label_font_size_min + new_list$x$state$label_font_size_max <- label_font_size_max + new_list$x$state$label_bg_size <- label_bg_size + new_list$x$state$label_max_width <- label_max_width + list_label_align <- c("auto", "start", "middle", "end", NULL) + if (!is.null(label_align)) { + if (!label_align %in% list_label_align) { + stop("`label_align` must be one of: c('auto', 'start', 'middle', 'end')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "start": "start", "middle": "middle", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "start": "start", "middle": "middle", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_align %in% names(named_list)) { + if (is.logical(label_align)) { + label_align <- as.character(label_align) + } + named_list_value <- unname(named_list[label_align])[[1]] + new_list$x$state$label_align <- named_list_value + } + } + } + } + list_label_x_offset <- c("top", "next", NULL) + if (!is.null(label_x_offset)) { + if (!label_x_offset %in% list_label_x_offset) { + stop("`label_x_offset` must be one of: c('top', 'next')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "next": "next"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "next": "next"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_x_offset %in% names(named_list)) { + if (is.logical(label_x_offset)) { + label_x_offset <- as.character(label_x_offset) + } + named_list_value <- unname(named_list[label_x_offset])[[1]] + new_list$x$state$label_x_offset <- named_list_value + } + } + } + } + list_label_y_offset <- c("top", "above", "below", NULL) + if (!is.null(label_y_offset)) { + if (!label_y_offset %in% list_label_y_offset) { + stop("`label_y_offset` must be one of: c('top', 'above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_y_offset %in% names(named_list)) { + if (is.logical(label_y_offset)) { + label_y_offset <- as.character(label_y_offset) + } + named_list_value <- unname(named_list[label_y_offset])[[1]] + new_list$x$state$label_y_offset <- named_list_value + } + } + } + } + list_height_mode <- c("auto", "fill_space", "aspect", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('auto', 'fill_space', 'aspect')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fill_space": "fill_space", "aspect": "aspect"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fill_space": "fill_space", "aspect": "aspect"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + new_list$x$state$facet_aspect <- facet_aspect + new_list$x$state$facet_aspect_mobile <- facet_aspect_mobile + list_chart_background_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_background_background_color_enabled)) { + if (!chart_background_background_color_enabled %in% list_chart_background_background_color_enabled) { + stop("`chart_background_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_background_background_color_enabled)) { + chart_background_background_color_enabled <- as.character(chart_background_background_color_enabled) + } + named_list_value <- unname(named_list[chart_background_background_color_enabled])[[1]] + new_list$x$state$chart_bg$background_color_enabled <- named_list_value + } + } + } + } + list_chart_background_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_background_background_image_enabled)) { + if (!chart_background_background_image_enabled %in% list_chart_background_background_image_enabled) { + stop("`chart_background_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_background_background_image_enabled)) { + chart_background_background_image_enabled <- as.character(chart_background_background_image_enabled) + } + named_list_value <- unname(named_list[chart_background_background_image_enabled])[[1]] + new_list$x$state$chart_bg$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$chart_bg$background_color <- chart_background_background_color + new_list$x$state$chart_bg$background_image_src <- chart_background_background_image_src + list_chart_background_background_image_size <- c("stretch", "slice", "meet", NULL) + if (!is.null(chart_background_background_image_size)) { + if (!chart_background_background_image_size %in% list_chart_background_background_image_size) { + stop("`chart_background_background_image_size` must be one of: c('stretch', 'slice', 'meet')") + } else { + if (length(jsonlite::fromJSON('{"stretch": "stretch", "slice": "slice", "meet": "meet"}')) > 1) { + named_list <- jsonlite::fromJSON('{"stretch": "stretch", "slice": "slice", "meet": "meet"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_size %in% names(named_list)) { + if (is.logical(chart_background_background_image_size)) { + chart_background_background_image_size <- as.character(chart_background_background_image_size) + } + named_list_value <- unname(named_list[chart_background_background_image_size])[[1]] + new_list$x$state$chart_bg$background_image_size <- named_list_value + } + } + } + } + list_chart_background_background_image_position <- c("x_min_y_min", "x_mid_y_min", "x_max_y_min", "x_max_y_mid", "x_mid_y_mid", "x_min_y_max", "x_mid_y_max", "x_max_y_max", NULL) + if (!is.null(chart_background_background_image_position)) { + if (!chart_background_background_image_position %in% list_chart_background_background_image_position) { + stop("`chart_background_background_image_position` must be one of: c('x_min_y_min', 'x_mid_y_min', 'x_max_y_min', 'x_max_y_mid', 'x_mid_y_mid', 'x_min_y_max', 'x_mid_y_max', 'x_max_y_max')") + } else { + if (length(jsonlite::fromJSON('{"x_min_y_min": "xMinYMin", "x_mid_y_min": "xMidYMin", "x_max_y_min": "xMaxYMin", "x_max_y_mid": "xMaxYMid", "x_mid_y_mid": "xMidYMid", "x_min_y_max": "xMinYMax", "x_mid_y_max": "xMidYMax", "x_max_y_max": "xMaxYMax"}')) > 1) { + named_list <- jsonlite::fromJSON('{"x_min_y_min": "xMinYMin", "x_mid_y_min": "xMidYMin", "x_max_y_min": "xMaxYMin", "x_max_y_mid": "xMaxYMid", "x_mid_y_mid": "xMidYMid", "x_min_y_max": "xMinYMax", "x_mid_y_max": "xMidYMax", "x_max_y_max": "xMaxYMax"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_background_background_image_position %in% names(named_list)) { + if (is.logical(chart_background_background_image_position)) { + chart_background_background_image_position <- as.character(chart_background_background_image_position) + } + named_list_value <- unname(named_list[chart_background_background_image_position])[[1]] + new_list$x$state$chart_bg$background_image_position <- named_list_value + } + } + } + } + new_list$x$state$margin_top <- margin_top + new_list$x$state$margin_right <- margin_right + new_list$x$state$margin_bottom <- margin_bottom + new_list$x$state$margin_left <- margin_left + new_list$x$state$facet_fixed_cols <- facet_fixed_cols + new_list$x$state$facet_min_w <- facet_min_w + new_list$x$state$facet_cols <- facet_cols + new_list$x$state$facet_gutter_w <- facet_gutter_w + new_list$x$state$facet_gutter_h <- facet_gutter_h + new_list$x$state$facet_header_font_size <- facet_header_font_size + list_facet_title_align <- c("auto", "left", "center", NULL) + if (!is.null(facet_title_align)) { + if (!facet_title_align %in% list_facet_title_align) { + stop("`facet_title_align` must be one of: c('auto', 'left', 'center')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && facet_title_align %in% names(named_list)) { + if (is.logical(facet_title_align)) { + facet_title_align <- as.character(facet_title_align) + } + named_list_value <- unname(named_list[facet_title_align])[[1]] + new_list$x$state$facet_title_align <- named_list_value + } + } + } + } + new_list$x$state$facet_header_color <- facet_header_color + new_list$x$state$lines_show <- lines_show + new_list$x$state$line_width <- line_width + list_line_curve <- c("curve_linear", "curve_natural", NULL) + if (!is.null(line_curve)) { + if (!line_curve %in% list_line_curve) { + stop("`line_curve` must be one of: c('curve_linear', 'curve_natural')") + } else { + if (length(jsonlite::fromJSON('{"curve_linear": "curveLinear", "curve_natural": "curveNatural"}')) > 1) { + named_list <- jsonlite::fromJSON('{"curve_linear": "curveLinear", "curve_natural": "curveNatural"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && line_curve %in% names(named_list)) { + if (is.logical(line_curve)) { + line_curve <- as.character(line_curve) + } + named_list_value <- unname(named_list[line_curve])[[1]] + new_list$x$state$line_curve <- named_list_value + } + } + } + } + new_list$x$state$line_opacity <- line_opacity + list_line_color_mode <- c("by_dot", "fixed", NULL) + if (!is.null(line_color_mode)) { + if (!line_color_mode %in% list_line_color_mode) { + stop("`line_color_mode` must be one of: c('by_dot', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"by_dot": "by_dot", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"by_dot": "by_dot", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && line_color_mode %in% names(named_list)) { + if (is.logical(line_color_mode)) { + line_color_mode <- as.character(line_color_mode) + } + named_list_value <- unname(named_list[line_color_mode])[[1]] + new_list$x$state$line_color_mode <- named_list_value + } + } + } + } + new_list$x$state$line_per_facet <- line_per_facet + new_list$x$state$line_color <- line_color + new_list$x$state$line_arrows <- line_arrows + new_list$x$state$line_arrow_size <- line_arrow_size + list_line_arrow_color_mode <- c("auto", "fixed", NULL) + if (!is.null(line_arrow_color_mode)) { + if (!line_arrow_color_mode %in% list_line_arrow_color_mode) { + stop("`line_arrow_color_mode` must be one of: c('auto', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && line_arrow_color_mode %in% names(named_list)) { + if (is.logical(line_arrow_color_mode)) { + line_arrow_color_mode <- as.character(line_arrow_color_mode) + } + named_list_value <- unname(named_list[line_arrow_color_mode])[[1]] + new_list$x$state$line_arrow_color_mode <- named_list_value + } + } + } + } + new_list$x$state$line_arrow_color <- line_arrow_color + new_list$x$state$x_matching <- x_matching + new_list$x$state$x_single_row <- x_single_row + list_chart_x_axis_axis_position <- c("bottom", "float-below", "float-above", "top", "off", NULL) + if (!is.null(chart_x_axis_axis_position)) { + if (!chart_x_axis_axis_position %in% list_chart_x_axis_axis_position) { + stop("`chart_x_axis_axis_position` must be one of: c('bottom', 'float-below', 'float-above', 'top', 'off')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "float-below": "float-below", "float-above": "float-above", "top": "top", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_axis_position %in% names(named_list)) { + if (is.logical(chart_x_axis_axis_position)) { + chart_x_axis_axis_position <- as.character(chart_x_axis_axis_position) + } + named_list_value <- unname(named_list[chart_x_axis_axis_position])[[1]] + new_list$x$state$x$axis_position <- named_list_value + } + } + } + } + new_list$x$state$x$y_axis_position <- chart_x_axis_y_axis_position + list_chart_x_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_x_axis_numeric_scale_type)) { + if (!chart_x_axis_numeric_scale_type %in% list_chart_x_axis_numeric_scale_type) { + stop("`chart_x_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_x_axis_numeric_scale_type)) { + chart_x_axis_numeric_scale_type <- as.character(chart_x_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_x_axis_numeric_scale_type])[[1]] + new_list$x$state$x$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$x$linear_min <- chart_x_axis_linear_min + new_list$x$state$x$linear_max <- chart_x_axis_linear_max + new_list$x$state$x$log_min <- chart_x_axis_log_min + new_list$x$state$x$log_max <- chart_x_axis_log_max + new_list$x$state$x$datetime_min <- chart_x_axis_datetime_min + new_list$x$state$x$datetime_max <- chart_x_axis_datetime_max + new_list$x$state$x$flip <- chart_x_axis_flip + new_list$x$state$x$show_scale_settings <- chart_x_axis_show_scale_settings + list_chart_x_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_nice)) { + if (!chart_x_axis_nice %in% list_chart_x_axis_nice) { + stop("`chart_x_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_nice %in% names(named_list)) { + if (is.logical(chart_x_axis_nice)) { + chart_x_axis_nice <- as.character(chart_x_axis_nice) + } + named_list_value <- unname(named_list[chart_x_axis_nice])[[1]] + new_list$x$state$x$nice <- named_list_value + } + } + } + } + list_chart_x_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_x_axis_zero_axis)) { + if (!chart_x_axis_zero_axis %in% list_chart_x_axis_zero_axis) { + stop("`chart_x_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_x_axis_zero_axis)) { + chart_x_axis_zero_axis <- as.character(chart_x_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_x_axis_zero_axis])[[1]] + new_list$x$state$x$zero_axis <- named_list_value + } + } + } + } + list_chart_x_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_x_axis_title_mode)) { + if (!chart_x_axis_title_mode %in% list_chart_x_axis_title_mode) { + stop("`chart_x_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_title_mode)) { + chart_x_axis_title_mode <- as.character(chart_x_axis_title_mode) + } + named_list_value <- unname(named_list[chart_x_axis_title_mode])[[1]] + new_list$x$state$x$title_mode <- named_list_value + } + } + } + } + new_list$x$state$x$title <- chart_x_axis_title + new_list$x$state$x$title_styling <- chart_x_axis_title_styling + list_chart_x_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_title_weight)) { + if (!chart_x_axis_title_weight %in% list_chart_x_axis_title_weight) { + stop("`chart_x_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_title_weight)) { + chart_x_axis_title_weight <- as.character(chart_x_axis_title_weight) + } + named_list_value <- unname(named_list[chart_x_axis_title_weight])[[1]] + new_list$x$state$x$title_weight <- named_list_value + } + } + } + } + new_list$x$state$x$title_color <- chart_x_axis_title_color + new_list$x$state$x$title_size <- chart_x_axis_title_size + new_list$x$state$x$title_padding <- chart_x_axis_title_padding + list_chart_x_axis_tick_label_position <- c("default", "left", "right", NULL) + if (!is.null(chart_x_axis_tick_label_position)) { + if (!chart_x_axis_tick_label_position %in% list_chart_x_axis_tick_label_position) { + stop("`chart_x_axis_tick_label_position` must be one of: c('default', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_position)) { + chart_x_axis_tick_label_position <- as.character(chart_x_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_position])[[1]] + new_list$x$state$x$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_styling <- chart_x_axis_tick_label_styling + new_list$x$state$x$tick_label_size <- chart_x_axis_tick_label_size + new_list$x$state$x$tick_label_color <- chart_x_axis_tick_label_color + new_list$x$state$x$tick_padding <- chart_x_axis_tick_padding + list_chart_x_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_x_axis_tick_label_angle)) { + if (!chart_x_axis_tick_label_angle %in% list_chart_x_axis_tick_label_angle) { + stop("`chart_x_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_angle)) { + chart_x_axis_tick_label_angle <- as.character(chart_x_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_angle])[[1]] + new_list$x$state$x$tick_label_angle <- named_list_value + } + } + } + } + list_chart_x_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_tick_label_weight)) { + if (!chart_x_axis_tick_label_weight %in% list_chart_x_axis_tick_label_weight) { + stop("`chart_x_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_weight)) { + chart_x_axis_tick_label_weight <- as.character(chart_x_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_weight])[[1]] + new_list$x$state$x$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_max_lines <- chart_x_axis_tick_label_max_lines + new_list$x$state$x$tick_label_line_height <- chart_x_axis_tick_label_line_height + list_chart_x_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_x_axis_tick_label_space_mode)) { + if (!chart_x_axis_tick_label_space_mode %in% list_chart_x_axis_tick_label_space_mode) { + stop("`chart_x_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_space_mode)) { + chart_x_axis_tick_label_space_mode <- as.character(chart_x_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_space_mode])[[1]] + new_list$x$state$x$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_space <- chart_x_axis_tick_label_space + list_chart_x_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_x_axis_tick_mode)) { + if (!chart_x_axis_tick_mode %in% list_chart_x_axis_tick_mode) { + stop("`chart_x_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_mode)) { + chart_x_axis_tick_mode <- as.character(chart_x_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_mode])[[1]] + new_list$x$state$x$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_number <- chart_x_axis_tick_number + if (length(chart_x_axis_tick_custom) > 1) { + new_list$x$state$x$tick_custom <- paste(chart_x_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$x$tick_custom <- chart_x_axis_tick_custom + } + + new_list$x$state$x$line_and_tick_color <- chart_x_axis_line_and_tick_color + new_list$x$state$x$line_and_tick_width <- chart_x_axis_line_and_tick_width + new_list$x$state$x$tick_length <- chart_x_axis_tick_length + list_chart_x_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_x_axis_tick_side)) { + if (!chart_x_axis_tick_side %in% list_chart_x_axis_tick_side) { + stop("`chart_x_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_side)) { + chart_x_axis_tick_side <- as.character(chart_x_axis_tick_side) + } + named_list_value <- unname(named_list[chart_x_axis_tick_side])[[1]] + new_list$x$state$x$tick_side <- named_list_value + } + } + } + } + new_list$x$state$x$line_visible <- chart_x_axis_line_visible + new_list$x$state$x$edge_padding <- chart_x_axis_edge_padding + list_chart_x_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_gridlines_visible)) { + if (!chart_x_axis_gridlines_visible %in% list_chart_x_axis_gridlines_visible) { + stop("`chart_x_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_x_axis_gridlines_visible)) { + chart_x_axis_gridlines_visible <- as.character(chart_x_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_x_axis_gridlines_visible])[[1]] + new_list$x$state$x$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$x$gridlines_styling <- chart_x_axis_gridlines_styling + new_list$x$state$x$gridline_color <- chart_x_axis_gridline_color + list_chart_x_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_x_axis_gridline_style)) { + if (!chart_x_axis_gridline_style %in% list_chart_x_axis_gridline_style) { + stop("`chart_x_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_x_axis_gridline_style)) { + chart_x_axis_gridline_style <- as.character(chart_x_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_x_axis_gridline_style])[[1]] + new_list$x$state$x$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$x$gridline_width <- chart_x_axis_gridline_width + new_list$x$state$x$gridline_category_dividers <- chart_x_axis_gridline_category_dividers + new_list$x$state$x$gridline_category_dividers_extend <- chart_x_axis_gridline_category_dividers_extend + new_list$x$state$x_formatting$prefix <- chart_x_axis_number_date_format_prefix + new_list$x$state$x_formatting$suffix <- chart_x_axis_number_date_format_suffix + new_list$x$state$x_formatting$n_dec <- chart_x_axis_number_date_format_n_dec + new_list$x$state$x_formatting$advanced <- chart_x_axis_number_date_format_advanced + list_chart_x_axis_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_x_axis_number_date_format_negative_sign)) { + if (!chart_x_axis_number_date_format_negative_sign %in% list_chart_x_axis_number_date_format_negative_sign) { + stop("`chart_x_axis_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_x_axis_number_date_format_negative_sign)) { + chart_x_axis_number_date_format_negative_sign <- as.character(chart_x_axis_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_x_axis_number_date_format_negative_sign])[[1]] + new_list$x$state$x_formatting$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$x_formatting$strip_zeros <- chart_x_axis_number_date_format_strip_zeros + new_list$x$state$x_formatting$strip_separator <- chart_x_axis_number_date_format_strip_separator + new_list$x$state$x_formatting$transform_labels <- chart_x_axis_number_date_format_transform_labels + list_chart_x_axis_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_x_axis_number_date_format_transform)) { + if (!chart_x_axis_number_date_format_transform %in% list_chart_x_axis_number_date_format_transform) { + stop("`chart_x_axis_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_x_axis_number_date_format_transform)) { + chart_x_axis_number_date_format_transform <- as.character(chart_x_axis_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_x_axis_number_date_format_transform])[[1]] + new_list$x$state$x_formatting$transform <- named_list_value + } + } + } + } + new_list$x$state$x_formatting$multiply_divide_constant <- chart_x_axis_number_date_format_multiply_divide_constant + new_list$x$state$x_formatting$exponentiate_constant <- chart_x_axis_number_date_format_exponentiate_constant + new_list$x$state$y_matching <- y_matching + new_list$x$state$y_single_col <- y_single_col + list_chart_y_axis_axis_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_axis_visible)) { + if (!chart_y_axis_axis_visible %in% list_chart_y_axis_axis_visible) { + stop("`chart_y_axis_axis_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_axis_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_axis_visible)) { + chart_y_axis_axis_visible <- as.character(chart_y_axis_axis_visible) + } + named_list_value <- unname(named_list[chart_y_axis_axis_visible])[[1]] + new_list$x$state$y$axis_visible <- named_list_value + } + } + } + } + list_chart_y_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_y_axis_numeric_scale_type)) { + if (!chart_y_axis_numeric_scale_type %in% list_chart_y_axis_numeric_scale_type) { + stop("`chart_y_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_y_axis_numeric_scale_type)) { + chart_y_axis_numeric_scale_type <- as.character(chart_y_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_y_axis_numeric_scale_type])[[1]] + new_list$x$state$y$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$y$linear_min <- chart_y_axis_linear_min + new_list$x$state$y$linear_max <- chart_y_axis_linear_max + new_list$x$state$y$log_min <- chart_y_axis_log_min + new_list$x$state$y$log_max <- chart_y_axis_log_max + new_list$x$state$y$datetime_min <- chart_y_axis_datetime_min + new_list$x$state$y$datetime_max <- chart_y_axis_datetime_max + new_list$x$state$y$flip <- chart_y_axis_flip + new_list$x$state$y$show_scale_settings <- chart_y_axis_show_scale_settings + list_chart_y_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_nice)) { + if (!chart_y_axis_nice %in% list_chart_y_axis_nice) { + stop("`chart_y_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_nice %in% names(named_list)) { + if (is.logical(chart_y_axis_nice)) { + chart_y_axis_nice <- as.character(chart_y_axis_nice) + } + named_list_value <- unname(named_list[chart_y_axis_nice])[[1]] + new_list$x$state$y$nice <- named_list_value + } + } + } + } + list_chart_y_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_y_axis_zero_axis)) { + if (!chart_y_axis_zero_axis %in% list_chart_y_axis_zero_axis) { + stop("`chart_y_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_y_axis_zero_axis)) { + chart_y_axis_zero_axis <- as.character(chart_y_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_y_axis_zero_axis])[[1]] + new_list$x$state$y$zero_axis <- named_list_value + } + } + } + } + list_chart_y_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_y_axis_title_mode)) { + if (!chart_y_axis_title_mode %in% list_chart_y_axis_title_mode) { + stop("`chart_y_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_title_mode)) { + chart_y_axis_title_mode <- as.character(chart_y_axis_title_mode) + } + named_list_value <- unname(named_list[chart_y_axis_title_mode])[[1]] + new_list$x$state$y$title_mode <- named_list_value + } + } + } + } + new_list$x$state$y$title <- chart_y_axis_title + new_list$x$state$y$title_styling <- chart_y_axis_title_styling + list_chart_y_axis_title_position <- c("side", "end", NULL) + if (!is.null(chart_y_axis_title_position)) { + if (!chart_y_axis_title_position %in% list_chart_y_axis_title_position) { + stop("`chart_y_axis_title_position` must be one of: c('side', 'end')") + } else { + if (length(jsonlite::fromJSON('{"side": "side", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"side": "side", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_position %in% names(named_list)) { + if (is.logical(chart_y_axis_title_position)) { + chart_y_axis_title_position <- as.character(chart_y_axis_title_position) + } + named_list_value <- unname(named_list[chart_y_axis_title_position])[[1]] + new_list$x$state$y$title_position <- named_list_value + } + } + } + } + list_chart_y_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_title_weight)) { + if (!chart_y_axis_title_weight %in% list_chart_y_axis_title_weight) { + stop("`chart_y_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_title_weight)) { + chart_y_axis_title_weight <- as.character(chart_y_axis_title_weight) + } + named_list_value <- unname(named_list[chart_y_axis_title_weight])[[1]] + new_list$x$state$y$title_weight <- named_list_value + } + } + } + } + new_list$x$state$y$title_color <- chart_y_axis_title_color + new_list$x$state$y$title_size <- chart_y_axis_title_size + new_list$x$state$y$title_padding <- chart_y_axis_title_padding + list_chart_y_axis_tick_label_position <- c("default", "above", "below", NULL) + if (!is.null(chart_y_axis_tick_label_position)) { + if (!chart_y_axis_tick_label_position %in% list_chart_y_axis_tick_label_position) { + stop("`chart_y_axis_tick_label_position` must be one of: c('default', 'above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_position)) { + chart_y_axis_tick_label_position <- as.character(chart_y_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_position])[[1]] + new_list$x$state$y$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_styling <- chart_y_axis_tick_label_styling + new_list$x$state$y$tick_label_size <- chart_y_axis_tick_label_size + new_list$x$state$y$tick_label_color <- chart_y_axis_tick_label_color + new_list$x$state$y$tick_padding <- chart_y_axis_tick_padding + list_chart_y_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_y_axis_tick_label_angle)) { + if (!chart_y_axis_tick_label_angle %in% list_chart_y_axis_tick_label_angle) { + stop("`chart_y_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_angle)) { + chart_y_axis_tick_label_angle <- as.character(chart_y_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_angle])[[1]] + new_list$x$state$y$tick_label_angle <- named_list_value + } + } + } + } + list_chart_y_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_tick_label_weight)) { + if (!chart_y_axis_tick_label_weight %in% list_chart_y_axis_tick_label_weight) { + stop("`chart_y_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_weight)) { + chart_y_axis_tick_label_weight <- as.character(chart_y_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_weight])[[1]] + new_list$x$state$y$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_max_lines <- chart_y_axis_tick_label_max_lines + new_list$x$state$y$tick_label_line_height <- chart_y_axis_tick_label_line_height + list_chart_y_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_y_axis_tick_label_space_mode)) { + if (!chart_y_axis_tick_label_space_mode %in% list_chart_y_axis_tick_label_space_mode) { + stop("`chart_y_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_space_mode)) { + chart_y_axis_tick_label_space_mode <- as.character(chart_y_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_space_mode])[[1]] + new_list$x$state$y$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_space <- chart_y_axis_tick_label_space + list_chart_y_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_y_axis_tick_mode)) { + if (!chart_y_axis_tick_mode %in% list_chart_y_axis_tick_mode) { + stop("`chart_y_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_mode)) { + chart_y_axis_tick_mode <- as.character(chart_y_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_mode])[[1]] + new_list$x$state$y$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_number <- chart_y_axis_tick_number + if (length(chart_y_axis_tick_custom) > 1) { + new_list$x$state$y$tick_custom <- paste(chart_y_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$y$tick_custom <- chart_y_axis_tick_custom + } + + new_list$x$state$y$line_and_tick_color <- chart_y_axis_line_and_tick_color + new_list$x$state$y$line_and_tick_width <- chart_y_axis_line_and_tick_width + new_list$x$state$y$tick_length <- chart_y_axis_tick_length + list_chart_y_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_y_axis_tick_side)) { + if (!chart_y_axis_tick_side %in% list_chart_y_axis_tick_side) { + stop("`chart_y_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_side)) { + chart_y_axis_tick_side <- as.character(chart_y_axis_tick_side) + } + named_list_value <- unname(named_list[chart_y_axis_tick_side])[[1]] + new_list$x$state$y$tick_side <- named_list_value + } + } + } + } + new_list$x$state$y$line_visible <- chart_y_axis_line_visible + new_list$x$state$y$edge_padding <- chart_y_axis_edge_padding + list_chart_y_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_gridlines_visible)) { + if (!chart_y_axis_gridlines_visible %in% list_chart_y_axis_gridlines_visible) { + stop("`chart_y_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_gridlines_visible)) { + chart_y_axis_gridlines_visible <- as.character(chart_y_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_y_axis_gridlines_visible])[[1]] + new_list$x$state$y$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$y$gridlines_styling <- chart_y_axis_gridlines_styling + new_list$x$state$y$gridline_color <- chart_y_axis_gridline_color + list_chart_y_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_y_axis_gridline_style)) { + if (!chart_y_axis_gridline_style %in% list_chart_y_axis_gridline_style) { + stop("`chart_y_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_y_axis_gridline_style)) { + chart_y_axis_gridline_style <- as.character(chart_y_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_y_axis_gridline_style])[[1]] + new_list$x$state$y$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$y$gridline_width <- chart_y_axis_gridline_width + new_list$x$state$y$gridline_category_dividers <- chart_y_axis_gridline_category_dividers + new_list$x$state$y$gridline_category_dividers_extend <- chart_y_axis_gridline_category_dividers_extend + new_list$x$state$y_formatting$prefix <- chart_y_axis_number_date_format_prefix + new_list$x$state$y_formatting$suffix <- chart_y_axis_number_date_format_suffix + new_list$x$state$y_formatting$n_dec <- chart_y_axis_number_date_format_n_dec + new_list$x$state$y_formatting$advanced <- chart_y_axis_number_date_format_advanced + list_chart_y_axis_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_y_axis_number_date_format_negative_sign)) { + if (!chart_y_axis_number_date_format_negative_sign %in% list_chart_y_axis_number_date_format_negative_sign) { + stop("`chart_y_axis_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_y_axis_number_date_format_negative_sign)) { + chart_y_axis_number_date_format_negative_sign <- as.character(chart_y_axis_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_y_axis_number_date_format_negative_sign])[[1]] + new_list$x$state$y_formatting$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$y_formatting$strip_zeros <- chart_y_axis_number_date_format_strip_zeros + new_list$x$state$y_formatting$strip_separator <- chart_y_axis_number_date_format_strip_separator + new_list$x$state$y_formatting$transform_labels <- chart_y_axis_number_date_format_transform_labels + list_chart_y_axis_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_y_axis_number_date_format_transform)) { + if (!chart_y_axis_number_date_format_transform %in% list_chart_y_axis_number_date_format_transform) { + stop("`chart_y_axis_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_y_axis_number_date_format_transform)) { + chart_y_axis_number_date_format_transform <- as.character(chart_y_axis_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_y_axis_number_date_format_transform])[[1]] + new_list$x$state$y_formatting$transform <- named_list_value + } + } + } + } + new_list$x$state$y_formatting$multiply_divide_constant <- chart_y_axis_number_date_format_multiply_divide_constant + new_list$x$state$y_formatting$exponentiate_constant <- chart_y_axis_number_date_format_exponentiate_constant + list_legend_position <- c("above", "below", "off", NULL) + if (!is.null(legend_position)) { + if (!legend_position %in% list_legend_position) { + stop("`legend_position` must be one of: c('above', 'below', 'off')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "below": "below", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "below": "below", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_position %in% names(named_list)) { + if (is.logical(legend_position)) { + legend_position <- as.character(legend_position) + } + named_list_value <- unname(named_list[legend_position])[[1]] + new_list$x$state$legend_position <- named_list_value + } + } + } + } + list_legend_filtering_mode <- c("filter_out", "filter_in", "off", NULL) + if (!is.null(legend_filtering_mode)) { + if (!legend_filtering_mode %in% list_legend_filtering_mode) { + stop("`legend_filtering_mode` must be one of: c('filter_out', 'filter_in', 'off')") + } else { + if (length(jsonlite::fromJSON('{"filter_out": "filter_out", "filter_in": "filter_in", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"filter_out": "filter_out", "filter_in": "filter_in", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_filtering_mode %in% names(named_list)) { + if (is.logical(legend_filtering_mode)) { + legend_filtering_mode <- as.character(legend_filtering_mode) + } + named_list_value <- unname(named_list[legend_filtering_mode])[[1]] + new_list$x$state$legend_filtering_mode <- named_list_value + } + } + } + } + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$categorical_legend$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$categorical_legend$title_mode <- named_list_value + } + } + } + } + new_list$x$state$categorical_legend$title <- chart_categorical_legend_title + new_list$x$state$categorical_legend$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$categorical_legend$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$categorical_legend$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$categorical_legend$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$categorical_legend$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$categorical_legend$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$categorical_legend$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$categorical_legend$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$categorical_legend$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$categorical_legend$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$categorical_legend$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$categorical_legend$orientation <- named_list_value + } + } + } + } + list_chart_continous_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_continous_legend_show_legend)) { + if (!chart_continous_legend_show_legend %in% list_chart_continous_legend_show_legend) { + stop("`chart_continous_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_continous_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_continous_legend_show_legend)) { + chart_continous_legend_show_legend <- as.character(chart_continous_legend_show_legend) + } + named_list_value <- unname(named_list[chart_continous_legend_show_legend])[[1]] + new_list$x$state$continuous_legend$show_legend <- named_list_value + } + } + } + } + list_chart_continous_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_continous_legend_title_mode)) { + if (!chart_continous_legend_title_mode %in% list_chart_continous_legend_title_mode) { + stop("`chart_continous_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_continous_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_continous_legend_title_mode)) { + chart_continous_legend_title_mode <- as.character(chart_continous_legend_title_mode) + } + named_list_value <- unname(named_list[chart_continous_legend_title_mode])[[1]] + new_list$x$state$continuous_legend$title_mode <- named_list_value + } + } + } + } + new_list$x$state$continuous_legend$title <- chart_continous_legend_title + new_list$x$state$continuous_legend$color_band_width <- chart_continous_legend_color_band_width + new_list$x$state$continuous_legend$color_band_height <- chart_continous_legend_color_band_height + new_list$x$state$continuous_legend$color_band_radius <- chart_continous_legend_color_band_radius + list_chart_continous_legend_binned_label_mode <- c("thresholds", "centers", "custom", NULL) + if (!is.null(chart_continous_legend_binned_label_mode)) { + if (!chart_continous_legend_binned_label_mode %in% list_chart_continous_legend_binned_label_mode) { + stop("`chart_continous_legend_binned_label_mode` must be one of: c('thresholds', 'centers', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"thresholds": "thresholds", "centers": "centers", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"thresholds": "thresholds", "centers": "centers", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_continous_legend_binned_label_mode %in% names(named_list)) { + if (is.logical(chart_continous_legend_binned_label_mode)) { + chart_continous_legend_binned_label_mode <- as.character(chart_continous_legend_binned_label_mode) + } + named_list_value <- unname(named_list[chart_continous_legend_binned_label_mode])[[1]] + new_list$x$state$continuous_legend$binned_label_mode <- named_list_value + } + } + } + } + new_list$x$state$continuous_legend$binned_label_custom <- chart_continous_legend_binned_label_custom + new_list$x$state$continuous_legend$legend_min <- chart_continous_legend_legend_min + new_list$x$state$continuous_legend$additional_min_label <- chart_continous_legend_additional_min_label + new_list$x$state$continuous_legend$legend_max <- chart_continous_legend_legend_max + new_list$x$state$continuous_legend$additional_max_label <- chart_continous_legend_additional_max_label + list_text_legend <- c("auto", "custom", "off", NULL) + if (!is.null(text_legend)) { + if (!text_legend %in% list_text_legend) { + stop("`text_legend` must be one of: c('auto', 'custom', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && text_legend %in% names(named_list)) { + if (is.logical(text_legend)) { + text_legend <- as.character(text_legend) + } + named_list_value <- unname(named_list[text_legend])[[1]] + new_list$x$state$text_legend <- named_list_value + } + } + } + } + new_list$x$state$text_legend_title <- text_legend_title + new_list$x$state$text_legend_subtitle <- text_legend_subtitle + new_list$x$state$text_legend_bold <- text_legend_bold + new_list$x$state$color_formatting$prefix <- chart_number_date_format_prefix + new_list$x$state$color_formatting$suffix <- chart_number_date_format_suffix + new_list$x$state$color_formatting$n_dec <- chart_number_date_format_n_dec + new_list$x$state$color_formatting$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$color_formatting$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$color_formatting$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$color_formatting$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$color_formatting$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$color_formatting$transform <- named_list_value + } + } + } + } + new_list$x$state$color_formatting$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$color_formatting$exponentiate_constant <- chart_number_date_format_exponentiate_constant + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$filter$control_type <- named_list_value + } + } + } + } + new_list$x$state$filter$control_styles <- chart_filter_controls_control_styles + new_list$x$state$filter$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$filter$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$filter$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$filter$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$filter$slider_width <- chart_filter_controls_slider_width + new_list$x$state$filter$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$filter$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$filter$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$filter$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$filter$sort <- named_list_value + } + } + } + } + new_list$x$state$filter_show_all <- filter_show_all + new_list$x$state$filter_show_all_text <- filter_show_all_text + list_filter_updates_axes <- c("off", "x", "y", "both", NULL) + if (!is.null(filter_updates_axes)) { + if (!filter_updates_axes %in% list_filter_updates_axes) { + stop("`filter_updates_axes` must be one of: c('off', 'x', 'y', 'both')") + } else { + if (length(jsonlite::fromJSON('{"off": "off", "x": "x", "y": "y", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"off": "off", "x": "x", "y": "y", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && filter_updates_axes %in% names(named_list)) { + if (is.logical(filter_updates_axes)) { + filter_updates_axes <- as.character(filter_updates_axes) + } + named_list_value <- unname(named_list[filter_updates_axes])[[1]] + new_list$x$state$filter_updates_axes <- named_list_value + } + } + } + } + list_slider_updates_axes <- c("off", "x", "y", "both", NULL) + if (!is.null(slider_updates_axes)) { + if (!slider_updates_axes %in% list_slider_updates_axes) { + stop("`slider_updates_axes` must be one of: c('off', 'x', 'y', 'both')") + } else { + if (length(jsonlite::fromJSON('{"off": "off", "x": "x", "y": "y", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"off": "off", "x": "x", "y": "y", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && slider_updates_axes %in% names(named_list)) { + if (is.logical(slider_updates_axes)) { + slider_updates_axes <- as.character(slider_updates_axes) + } + named_list_value <- unname(named_list[slider_updates_axes])[[1]] + new_list$x$state$slider_updates_axes <- named_list_value + } + } + } + } + new_list$x$state$time_label_show <- time_label_show + new_list$x$state$time_label_color <- time_label_color + new_list$x$state$time_label_opacity <- time_label_opacity + new_list$x$state$time_label_font_size <- time_label_font_size + list_chart_slider_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_slider_filter_controls_control_type)) { + if (!chart_slider_filter_controls_control_type %in% list_chart_slider_filter_controls_control_type) { + stop("`chart_slider_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_slider_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_slider_filter_controls_control_type)) { + chart_slider_filter_controls_control_type <- as.character(chart_slider_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_slider_filter_controls_control_type])[[1]] + new_list$x$state$slider$control_type <- named_list_value + } + } + } + } + new_list$x$state$slider$control_styles <- chart_slider_filter_controls_control_styles + new_list$x$state$slider$control_title <- chart_slider_filter_controls_control_title + list_chart_slider_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_slider_filter_controls_button_group)) { + if (!chart_slider_filter_controls_button_group %in% list_chart_slider_filter_controls_button_group) { + stop("`chart_slider_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_slider_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_slider_filter_controls_button_group)) { + chart_slider_filter_controls_button_group <- as.character(chart_slider_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_slider_filter_controls_button_group])[[1]] + new_list$x$state$slider$button_group <- named_list_value + } + } + } + } + list_chart_slider_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_slider_filter_controls_button_group_width_mode)) { + if (!chart_slider_filter_controls_button_group_width_mode %in% list_chart_slider_filter_controls_button_group_width_mode) { + stop("`chart_slider_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_slider_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_slider_filter_controls_button_group_width_mode)) { + chart_slider_filter_controls_button_group_width_mode <- as.character(chart_slider_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_slider_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$slider$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$slider$button_group_width_fixed <- chart_slider_filter_controls_button_group_width_fixed + list_chart_slider_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_slider_filter_controls_dropdown_width_mode)) { + if (!chart_slider_filter_controls_dropdown_width_mode %in% list_chart_slider_filter_controls_dropdown_width_mode) { + stop("`chart_slider_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_slider_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_slider_filter_controls_dropdown_width_mode)) { + chart_slider_filter_controls_dropdown_width_mode <- as.character(chart_slider_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_slider_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$slider$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$slider$dropdown_width_fixed <- chart_slider_filter_controls_dropdown_width_fixed + new_list$x$state$slider$slider_width <- chart_slider_filter_controls_slider_width + new_list$x$state$slider$slider_max_label_width <- chart_slider_filter_controls_slider_max_label_width + new_list$x$state$slider$slider_step_time <- chart_slider_filter_controls_slider_step_time + new_list$x$state$slider$slider_loop <- chart_slider_filter_controls_slider_loop + new_list$x$state$slider$slider_restart_pause <- chart_slider_filter_controls_slider_restart_pause + list_chart_slider_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_slider_filter_controls_sort)) { + if (!chart_slider_filter_controls_sort %in% list_chart_slider_filter_controls_sort) { + stop("`chart_slider_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_slider_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_slider_filter_controls_sort)) { + chart_slider_filter_controls_sort <- as.character(chart_slider_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_slider_filter_controls_sort])[[1]] + new_list$x$state$slider$sort <- named_list_value + } + } + } + } + list_chart_filter_controls_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_filter_controls_container_alignment)) { + if (!chart_filter_controls_container_alignment %in% list_chart_filter_controls_container_alignment) { + stop("`chart_filter_controls_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_container_alignment %in% names(named_list)) { + if (is.logical(chart_filter_controls_container_alignment)) { + chart_filter_controls_container_alignment <- as.character(chart_filter_controls_container_alignment) + } + named_list_value <- unname(named_list[chart_filter_controls_container_alignment])[[1]] + new_list$x$state$controls_container$alignment <- named_list_value + } + } + } + } + new_list$x$state$controls_container$controls_spacing <- chart_filter_controls_container_controls_spacing + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$slider_style$track_color <- chart_slider_control_style_track_color + new_list$x$state$slider_style$font_color <- chart_slider_control_style_font_color + new_list$x$state$slider_style$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$slider_style$play_color <- chart_slider_control_style_play_color + new_list$x$state$slider_style$track_height <- chart_slider_control_style_track_height + new_list$x$state$slider_style$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$slider_style$play_button <- chart_slider_control_style_play_button + list_fit_type <- c("none", "both", "color", "chart", "all", NULL) + if (!is.null(fit_type)) { + if (!fit_type %in% list_fit_type) { + stop("`fit_type` must be one of: c('none', 'both', 'color', 'chart', 'all')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "both": "both", "color": "color", "chart": "chart", "all": "all"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "both": "both", "color": "color", "chart": "chart", "all": "all"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && fit_type %in% names(named_list)) { + if (is.logical(fit_type)) { + fit_type <- as.character(fit_type) + } + named_list_value <- unname(named_list[fit_type])[[1]] + new_list$x$state$fit_type <- named_list_value + } + } + } + } + new_list$x$state$fit_force_origin <- fit_force_origin + new_list$x$state$fit_line_width <- fit_line_width + new_list$x$state$fit_line_dash <- fit_line_dash + new_list$x$state$fit_line_color <- fit_line_color + list_beeswarm_plot <- c(TRUE, FALSE, NULL) + if (!is.null(beeswarm_plot)) { + if (!beeswarm_plot %in% list_beeswarm_plot) { + stop("`beeswarm_plot` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && beeswarm_plot %in% names(named_list)) { + if (is.logical(beeswarm_plot)) { + beeswarm_plot <- as.character(beeswarm_plot) + } + named_list_value <- unname(named_list[beeswarm_plot])[[1]] + new_list$x$state$beeswarm_plot <- named_list_value + } + } + } + } + list_box_plot <- c(TRUE, FALSE, NULL) + if (!is.null(box_plot)) { + if (!box_plot %in% list_box_plot) { + stop("`box_plot` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && box_plot %in% names(named_list)) { + if (is.logical(box_plot)) { + box_plot <- as.character(box_plot) + } + named_list_value <- unname(named_list[box_plot])[[1]] + new_list$x$state$box_plot <- named_list_value + } + } + } + } + new_list$x$state$box_color <- box_color + new_list$x$state$box_opacity <- box_opacity + new_list$x$state$box_line_color <- box_line_color + new_list$x$state$box_line_width <- box_line_width + list_box_whisker_type <- c("tukey", "all", NULL) + if (!is.null(box_whisker_type)) { + if (!box_whisker_type %in% list_box_whisker_type) { + stop("`box_whisker_type` must be one of: c('tukey', 'all')") + } else { + if (length(jsonlite::fromJSON('{"tukey": "tukey", "all": "all"}')) > 1) { + named_list <- jsonlite::fromJSON('{"tukey": "tukey", "all": "all"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && box_whisker_type %in% names(named_list)) { + if (is.logical(box_whisker_type)) { + box_whisker_type <- as.character(box_whisker_type) + } + named_list_value <- unname(named_list[box_whisker_type])[[1]] + new_list$x$state$box_whisker_type <- named_list_value + } + } + } + } + new_list$x$state$box_whisker_multiplier <- box_whisker_multiplier + new_list$x$state$use_box_popup <- use_box_popup + new_list$x$state$box_first_quartile_text <- box_first_quartile_text + new_list$x$state$box_median_text <- box_median_text + new_list$x$state$box_third_quartile_text <- box_third_quartile_text + list_violin_plot <- c(TRUE, FALSE, NULL) + if (!is.null(violin_plot)) { + if (!violin_plot %in% list_violin_plot) { + stop("`violin_plot` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && violin_plot %in% names(named_list)) { + if (is.logical(violin_plot)) { + violin_plot <- as.character(violin_plot) + } + named_list_value <- unname(named_list[violin_plot])[[1]] + new_list$x$state$violin_plot <- named_list_value + } + } + } + } + new_list$x$state$violin_bandwidth <- violin_bandwidth + new_list$x$state$violin_samples <- violin_samples + new_list$x$state$violin_color <- violin_color + new_list$x$state$violin_opacity <- violin_opacity + list_violin_sizing <- c("area", "width", NULL) + if (!is.null(violin_sizing)) { + if (!violin_sizing %in% list_violin_sizing) { + stop("`violin_sizing` must be one of: c('area', 'width')") + } else { + if (length(jsonlite::fromJSON('{"area": "area", "width": "width"}')) > 1) { + named_list <- jsonlite::fromJSON('{"area": "area", "width": "width"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && violin_sizing %in% names(named_list)) { + if (is.logical(violin_sizing)) { + violin_sizing <- as.character(violin_sizing) + } + named_list_value <- unname(named_list[violin_sizing])[[1]] + new_list$x$state$violin_sizing <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_enabled <- chart_axes_highlights_x_enabled + if (length(chart_axes_highlights_x_lines) > 1) { + new_list$x$state$axes_highlights$x_lines <- paste(chart_axes_highlights_x_lines, collapse = "\n") + } else { + new_list$x$state$axes_highlights$x_lines <- chart_axes_highlights_x_lines + } + + new_list$x$state$axes_highlights$x_line_color <- chart_axes_highlights_x_line_color + new_list$x$state$axes_highlights$x_line_width <- chart_axes_highlights_x_line_width + new_list$x$state$axes_highlights$x_line_dash <- chart_axes_highlights_x_line_dash + if (length(chart_axes_highlights_x_areas) > 1) { + new_list$x$state$axes_highlights$x_areas <- paste(chart_axes_highlights_x_areas, collapse = "\n") + } else { + new_list$x$state$axes_highlights$x_areas <- chart_axes_highlights_x_areas + } + + new_list$x$state$axes_highlights$x_area_color <- chart_axes_highlights_x_area_color + new_list$x$state$axes_highlights$x_area_opacity <- chart_axes_highlights_x_area_opacity + list_chart_axes_highlights_x_area_texture <- c("none", "pattern-diagonal", "pattern-grid", "pattern-dots", NULL) + if (!is.null(chart_axes_highlights_x_area_texture)) { + if (!chart_axes_highlights_x_area_texture %in% list_chart_axes_highlights_x_area_texture) { + stop("`chart_axes_highlights_x_area_texture` must be one of: c('none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_area_texture %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_area_texture)) { + chart_axes_highlights_x_area_texture <- as.character(chart_axes_highlights_x_area_texture) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_area_texture])[[1]] + new_list$x$state$axes_highlights$x_area_texture <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_vertical <- chart_axes_highlights_x_label_vertical + list_chart_axes_highlights_x_label_y_position <- c("bottom", "middle", "top", NULL) + if (!is.null(chart_axes_highlights_x_label_y_position)) { + if (!chart_axes_highlights_x_label_y_position %in% list_chart_axes_highlights_x_label_y_position) { + stop("`chart_axes_highlights_x_label_y_position` must be one of: c('bottom', 'middle', 'top')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "middle": "middle", "top": "top"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "middle": "middle", "top": "top"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_label_y_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_label_y_position)) { + chart_axes_highlights_x_label_y_position <- as.character(chart_axes_highlights_x_label_y_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_label_y_position])[[1]] + new_list$x$state$axes_highlights$x_label_y_position <- named_list_value + } + } + } + } + list_chart_axes_highlights_x_label_x_position <- c("left", "middle", "right", NULL) + if (!is.null(chart_axes_highlights_x_label_x_position)) { + if (!chart_axes_highlights_x_label_x_position %in% list_chart_axes_highlights_x_label_x_position) { + stop("`chart_axes_highlights_x_label_x_position` must be one of: c('left', 'middle', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_label_x_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_label_x_position)) { + chart_axes_highlights_x_label_x_position <- as.character(chart_axes_highlights_x_label_x_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_label_x_position])[[1]] + new_list$x$state$axes_highlights$x_label_x_position <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_max_width <- chart_axes_highlights_x_label_max_width + new_list$x$state$axes_highlights$x_font_size <- chart_axes_highlights_x_font_size + list_chart_axes_highlights_x_font_weight <- c("regular", "bold", NULL) + if (!is.null(chart_axes_highlights_x_font_weight)) { + if (!chart_axes_highlights_x_font_weight %in% list_chart_axes_highlights_x_font_weight) { + stop("`chart_axes_highlights_x_font_weight` must be one of: c('regular', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_x_font_weight %in% names(named_list)) { + if (is.logical(chart_axes_highlights_x_font_weight)) { + chart_axes_highlights_x_font_weight <- as.character(chart_axes_highlights_x_font_weight) + } + named_list_value <- unname(named_list[chart_axes_highlights_x_font_weight])[[1]] + new_list$x$state$axes_highlights$x_font_weight <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$x_label_color <- chart_axes_highlights_x_label_color + new_list$x$state$axes_highlights$x_shadow_color <- chart_axes_highlights_x_shadow_color + new_list$x$state$axes_highlights$x_shadow_enabled <- chart_axes_highlights_x_shadow_enabled + new_list$x$state$axes_highlights$y_enabled <- chart_axes_highlights_y_enabled + if (length(chart_axes_highlights_y_lines) > 1) { + new_list$x$state$axes_highlights$y_lines <- paste(chart_axes_highlights_y_lines, collapse = "\n") + } else { + new_list$x$state$axes_highlights$y_lines <- chart_axes_highlights_y_lines + } + + new_list$x$state$axes_highlights$y_line_color <- chart_axes_highlights_y_line_color + new_list$x$state$axes_highlights$y_line_width <- chart_axes_highlights_y_line_width + new_list$x$state$axes_highlights$y_line_dash <- chart_axes_highlights_y_line_dash + if (length(chart_axes_highlights_y_areas) > 1) { + new_list$x$state$axes_highlights$y_areas <- paste(chart_axes_highlights_y_areas, collapse = "\n") + } else { + new_list$x$state$axes_highlights$y_areas <- chart_axes_highlights_y_areas + } + + new_list$x$state$axes_highlights$y_area_color <- chart_axes_highlights_y_area_color + new_list$x$state$axes_highlights$y_area_opacity <- chart_axes_highlights_y_area_opacity + list_chart_axes_highlights_y_area_texture <- c("none", "pattern-diagonal", "pattern-grid", "pattern-dots", NULL) + if (!is.null(chart_axes_highlights_y_area_texture)) { + if (!chart_axes_highlights_y_area_texture %in% list_chart_axes_highlights_y_area_texture) { + stop("`chart_axes_highlights_y_area_texture` must be one of: c('none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "pattern-diagonal": "fl-pattern-diagonal", "pattern-grid": "fl-pattern-grid", "pattern-dots": "fl-pattern-dots"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_area_texture %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_area_texture)) { + chart_axes_highlights_y_area_texture <- as.character(chart_axes_highlights_y_area_texture) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_area_texture])[[1]] + new_list$x$state$axes_highlights$y_area_texture <- named_list_value + } + } + } + } + list_chart_axes_highlights_y_label_x_position <- c("left", "middle", "right", NULL) + if (!is.null(chart_axes_highlights_y_label_x_position)) { + if (!chart_axes_highlights_y_label_x_position %in% list_chart_axes_highlights_y_label_x_position) { + stop("`chart_axes_highlights_y_label_x_position` must be one of: c('left', 'middle', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "middle": "middle", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_label_x_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_label_x_position)) { + chart_axes_highlights_y_label_x_position <- as.character(chart_axes_highlights_y_label_x_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_label_x_position])[[1]] + new_list$x$state$axes_highlights$y_label_x_position <- named_list_value + } + } + } + } + list_chart_axes_highlights_y_label_y_position <- c("above", "middle", "below", NULL) + if (!is.null(chart_axes_highlights_y_label_y_position)) { + if (!chart_axes_highlights_y_label_y_position %in% list_chart_axes_highlights_y_label_y_position) { + stop("`chart_axes_highlights_y_label_y_position` must be one of: c('above', 'middle', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "middle": "middle", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "middle": "middle", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_label_y_position %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_label_y_position)) { + chart_axes_highlights_y_label_y_position <- as.character(chart_axes_highlights_y_label_y_position) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_label_y_position])[[1]] + new_list$x$state$axes_highlights$y_label_y_position <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$y_label_max_width <- chart_axes_highlights_y_label_max_width + new_list$x$state$axes_highlights$y_font_size <- chart_axes_highlights_y_font_size + list_chart_axes_highlights_y_font_weight <- c("regular", "bold", NULL) + if (!is.null(chart_axes_highlights_y_font_weight)) { + if (!chart_axes_highlights_y_font_weight %in% list_chart_axes_highlights_y_font_weight) { + stop("`chart_axes_highlights_y_font_weight` must be one of: c('regular', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"regular": "regular", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_axes_highlights_y_font_weight %in% names(named_list)) { + if (is.logical(chart_axes_highlights_y_font_weight)) { + chart_axes_highlights_y_font_weight <- as.character(chart_axes_highlights_y_font_weight) + } + named_list_value <- unname(named_list[chart_axes_highlights_y_font_weight])[[1]] + new_list$x$state$axes_highlights$y_font_weight <- named_list_value + } + } + } + } + new_list$x$state$axes_highlights$y_label_color <- chart_axes_highlights_y_label_color + new_list$x$state$axes_highlights$y_shadow_color <- chart_axes_highlights_y_shadow_color + new_list$x$state$axes_highlights$y_shadow_enabled <- chart_axes_highlights_y_shadow_enabled + new_list$x$state$annotations_styling <- annotations_styling + list_chart_annotations_defaults_text_weight <- c("normal", "bold", NULL) + if (!is.null(chart_annotations_defaults_text_weight)) { + if (!chart_annotations_defaults_text_weight %in% list_chart_annotations_defaults_text_weight) { + stop("`chart_annotations_defaults_text_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_text_weight %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_text_weight)) { + chart_annotations_defaults_text_weight <- as.character(chart_annotations_defaults_text_weight) + } + named_list_value <- unname(named_list[chart_annotations_defaults_text_weight])[[1]] + new_list$x$state$annotations$defaults$text_weight <- named_list_value + } + } + } + } + new_list$x$state$annotations$defaults$text_size <- chart_annotations_defaults_text_size + new_list$x$state$annotations$defaults$text_color <- chart_annotations_defaults_text_color + new_list$x$state$annotations$defaults$label_width <- chart_annotations_defaults_label_width + list_chart_annotations_defaults_text_background_mode <- c("none", "outline", "background", NULL) + if (!is.null(chart_annotations_defaults_text_background_mode)) { + if (!chart_annotations_defaults_text_background_mode %in% list_chart_annotations_defaults_text_background_mode) { + stop("`chart_annotations_defaults_text_background_mode` must be one of: c('none', 'outline', 'background')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "outline": "outline", "background": "background"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "outline": "outline", "background": "background"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_text_background_mode %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_text_background_mode)) { + chart_annotations_defaults_text_background_mode <- as.character(chart_annotations_defaults_text_background_mode) + } + named_list_value <- unname(named_list[chart_annotations_defaults_text_background_mode])[[1]] + new_list$x$state$annotations$defaults$text_background_mode <- named_list_value + } + } + } + } + new_list$x$state$annotations$defaults$text_bg <- chart_annotations_defaults_text_bg + new_list$x$state$annotations$defaults$label_bg <- chart_annotations_defaults_label_bg + list_chart_annotations_defaults_text_alignment <- c("auto", "start", "center", "end", NULL) + if (!is.null(chart_annotations_defaults_text_alignment)) { + if (!chart_annotations_defaults_text_alignment %in% list_chart_annotations_defaults_text_alignment) { + stop("`chart_annotations_defaults_text_alignment` must be one of: c('auto', 'start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_text_alignment %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_text_alignment)) { + chart_annotations_defaults_text_alignment <- as.character(chart_annotations_defaults_text_alignment) + } + named_list_value <- unname(named_list[chart_annotations_defaults_text_alignment])[[1]] + new_list$x$state$annotations$defaults$text_alignment <- named_list_value + } + } + } + } + list_chart_annotations_defaults_popup_position <- c("center", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_annotations_defaults_popup_position)) { + if (!chart_annotations_defaults_popup_position %in% list_chart_annotations_defaults_popup_position) { + stop("`chart_annotations_defaults_popup_position` must be one of: c('center', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"center": "center", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"center": "center", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_popup_position %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_popup_position)) { + chart_annotations_defaults_popup_position <- as.character(chart_annotations_defaults_popup_position) + } + named_list_value <- unname(named_list[chart_annotations_defaults_popup_position])[[1]] + new_list$x$state$annotations$defaults$popup_position <- named_list_value + } + } + } + } + list_chart_annotations_defaults_line_marker <- c("none", "arrowhead_open", "arrowhead", NULL) + if (!is.null(chart_annotations_defaults_line_marker)) { + if (!chart_annotations_defaults_line_marker %in% list_chart_annotations_defaults_line_marker) { + stop("`chart_annotations_defaults_line_marker` must be one of: c('none', 'arrowhead_open', 'arrowhead')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "arrowhead_open": "arrowhead_open", "arrowhead": "arrowhead"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "arrowhead_open": "arrowhead_open", "arrowhead": "arrowhead"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_line_marker %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_line_marker)) { + chart_annotations_defaults_line_marker <- as.character(chart_annotations_defaults_line_marker) + } + named_list_value <- unname(named_list[chart_annotations_defaults_line_marker])[[1]] + new_list$x$state$annotations$defaults$line_marker <- named_list_value + } + } + } + } + new_list$x$state$annotations$defaults$stroke_width <- chart_annotations_defaults_stroke_width + new_list$x$state$annotations$defaults$stroke_color <- chart_annotations_defaults_stroke_color + list_chart_annotations_defaults_connector_extend_line <- c("enabled", "disabled", NULL) + if (!is.null(chart_annotations_defaults_connector_extend_line)) { + if (!chart_annotations_defaults_connector_extend_line %in% list_chart_annotations_defaults_connector_extend_line) { + stop("`chart_annotations_defaults_connector_extend_line` must be one of: c('enabled', 'disabled')") + } else { + if (length(jsonlite::fromJSON('{"enabled": "enabled", "disabled": "disabled"}')) > 1) { + named_list <- jsonlite::fromJSON('{"enabled": "enabled", "disabled": "disabled"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_annotations_defaults_connector_extend_line %in% names(named_list)) { + if (is.logical(chart_annotations_defaults_connector_extend_line)) { + chart_annotations_defaults_connector_extend_line <- as.character(chart_annotations_defaults_connector_extend_line) + } + named_list_value <- unname(named_list[chart_annotations_defaults_connector_extend_line])[[1]] + new_list$x$state$annotations$defaults$connector_extend_line <- named_list_value + } + } + } + } + new_list$x$state$animation_duration <- animation_duration + new_list$x$state$animation_stagger <- animation_stagger + new_list$x$state$line_animate_in <- line_animate_in + new_list$x$state$line_animate_out <- line_animate_out + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + new_list$x$state$url_state$enabled <- chart_url_settings_enabled + if (length(chart_url_settings_whitelist) > 1) { + new_list$x$state$url_state$whitelist <- paste(chart_url_settings_whitelist, collapse = "\n") + } else { + new_list$x$state$url_state$whitelist <- chart_url_settings_whitelist + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_slope_chart_details.R b/R_package/R/set_slope_chart_details.R new file mode 100644 index 0000000..e49e38a --- /dev/null +++ b/R_package/R/set_slope_chart_details.R @@ -0,0 +1,3937 @@ +#' Set slope chart chart details +#' @name set_slope_chart_details +#' @param circle_radius Circle radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param slope_width Slope width. In pixels. Flourish type hint: number, defaults to `NULL` +#' @param slope_width_max Max slope width. Flourish type hint: number, defaults to `NULL` +#' @param slope_color Slope color. If not set, will use same color as main text. Flourish type hint: color, defaults to `NULL` +#' @param curve Line curve. Choices: linear, cardinal, step. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette for categories. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param selected_slopes Highlight slopes. To highlight slopes, write the name of each slope on a line. You can also create a story and highlight/unhighlight by clicking on a slope. Leave empty to highlight all slopes. Flourish type hint: text, defaults to `NULL` +#' @param value_type Value mode. Choices: ranks, scores, change. Flourish type hint: string, defaults to `NULL` +#' @param ties_mode Ties mode. Choices: dense, competition, fractional, modified_competition. What rank should be given when there are ties? See https://en.wikipedia.org/wiki/Ranking for explanation of nomenclature. Flourish type hint: string, defaults to `NULL` +#' @param sort_mode Sort mode. Choices: descending, ascending. Flourish type hint: string, defaults to `NULL` +#' @param height_mode Height mode. Choices: auto, aspect_ratio. Flourish type hint: string, defaults to `NULL` +#' @param aspect_ratio Aspect ratio. 1 for square, a smaller value means a bigger height. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_columns_fixed Grid mode. Choices: `FALSE`, `TRUE`. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_columns Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width Min chart width. The minimum width of a chart or cell in the grid. Determines the number of columns. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_min_width_fixed Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_custom_grid Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_custom_positions Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to `NULL` +#' @param chart_facet_max_width Max chart width. The maximum width of a chart or cell in the grid. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_w Horizontal margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_gutter_h Vertical margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_animation On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_titles Show titles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_facet_title_align Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_size Size. Relative to the width of the chart. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_unit Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_padding_top Space above. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_padding_bottom Space below. Flourish type hint: number, defaults to `NULL` +#' @param chart_facet_title_bg Background. Choices: none, full, text. Flourish type hint: string, defaults to `NULL` +#' @param chart_facet_title_bg_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_facet_title_bg_padding Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to `NULL` +#' @param axis_first_row_only Show X axis on first row only. Flourish type hint: boolean, defaults to `NULL` +#' @param matching_y_axis Matching Y scale across facets. Flourish type hint: boolean, defaults to `NULL` +#' @param labels_name_position Slope name mode. Choices: side, inline, none. Flourish type hint: string, defaults to `NULL` +#' @param labels_position Slope name position. Choices: start, both, end. Both mode will fallback to Start on narrow windows and devices. Flourish type hint: string, defaults to `NULL` +#' @param labels_inline_position Slope name position. Choices: start, middle, end. Flourish type hint: string, defaults to `NULL` +#' @param labels_inline_position_custom Custom slope name positions. Change the position of each individual label. One line per label. Syntax Label name :: start/middle/end :: offset in % (optional) Example Luxembourg :: end :: 10 France :: start. Flourish type hint: text, defaults to `NULL` +#' @param only_show_highlights Only show highlighted labels. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_line_labels_max_width Max label width. The maximum allowed label width. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_overlap_mode Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to `NULL` +#' @param chart_line_labels_spreading_margin Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_data_point_margin Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_show_only_labels Show only certain labels. Manually specify which labels youd like to display (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_line_labels_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_line_labels_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_text_bg_color Outline. Flourish type hint: color, defaults to `NULL` +#' @param chart_line_labels_text_bg_size Outline width. As a % of the font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_text_max_lines Max lines. The max number of lines for each label. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_text_weight Weight. Choices: 400, 700. Flourish type hint: string, defaults to `NULL` +#' @param chart_line_labels_lines Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to `NULL` +#' @param chart_line_labels_line_style Line style. Choices: straight, step. Flourish type hint: string, defaults to `NULL` +#' @param chart_line_labels_line_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_line_labels_line_width Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_line_range Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_line_labels_line_padding Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param axis_labels_position Position. Choices: top, bottom, hidden. Flourish type hint: string, defaults to `NULL` +#' @param axis_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param axis_text_color Font color. Flourish type hint: color, defaults to `NULL` +#' @param axis_color Axis color. Flourish type hint: color, defaults to `NULL` +#' @param axis_width Axis width. Flourish type hint: number, defaults to `NULL` +#' @param axis_dashoffset Axis dash. eg. 2,2. Flourish type hint: string, defaults to `NULL` +#' @param update_y_axis_filter Update Y axis when filtering. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_show_all Include "All". Flourish type hint: boolean, defaults to `NULL` +#' @param filter_show_all_text “All” label. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param animation_duration Animation duration. The duration of the animation (in milliseconds) when changing data or mode for example between slides in a story. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param legend_position Position. Choices: above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_enabled Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_whitelist Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "slope", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_slope_chart_data(gapminder) |> +#' set_slope_chart_details() +#' ) +#' @export + +set_slope_chart_details <- function( + ., + circle_radius = NULL, + slope_width = NULL, + slope_width_max = NULL, + slope_color = NULL, + curve = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + selected_slopes = NULL, + value_type = NULL, + ties_mode = NULL, + sort_mode = NULL, + height_mode = NULL, + aspect_ratio = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + axis_first_row_only = NULL, + matching_y_axis = NULL, + labels_name_position = NULL, + labels_position = NULL, + labels_inline_position = NULL, + labels_inline_position_custom = NULL, + only_show_highlights = NULL, + chart_line_labels_max_width = NULL, + chart_line_labels_overlap_mode = NULL, + chart_line_labels_spreading_margin = NULL, + chart_line_labels_data_point_margin = NULL, + chart_line_labels_show_only_labels = NULL, + chart_line_labels_text_color = NULL, + chart_line_labels_text_size = NULL, + chart_line_labels_text_bg_color = NULL, + chart_line_labels_text_bg_size = NULL, + chart_line_labels_text_line_height = NULL, + chart_line_labels_text_max_lines = NULL, + chart_line_labels_text_weight = NULL, + chart_line_labels_lines = NULL, + chart_line_labels_line_style = NULL, + chart_line_labels_line_color = NULL, + chart_line_labels_line_width = NULL, + chart_line_labels_line_range = NULL, + chart_line_labels_line_padding = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + axis_labels_position = NULL, + axis_font_size = NULL, + axis_text_color = NULL, + axis_color = NULL, + axis_width = NULL, + axis_dashoffset = NULL, + update_y_axis_filter = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_show_all = NULL, + filter_show_all_text = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + animation_duration = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_position = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL) { + details_error(., "slope_chart") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/slope-chart")) { + stop("`set_slope_chart_details()` is not supported for this chart type.") + } + new_list$x$state$circle_radius <- circle_radius + new_list$x$state$slope_width <- slope_width + new_list$x$state$slope_width_max <- slope_width_max + new_list$x$state$slope_color <- slope_color + list_curve <- c("linear", "cardinal", "step", NULL) + if (!is.null(curve)) { + if (!curve %in% list_curve) { + stop("`curve` must be one of: c('linear', 'cardinal', 'step')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "cardinal": "cardinal", "step": "step"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "cardinal": "cardinal", "step": "step"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && curve %in% names(named_list)) { + if (is.logical(curve)) { + curve <- as.character(curve) + } + named_list_value <- unname(named_list[curve])[[1]] + new_list$x$state$curve <- named_list_value + } + } + } + } + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + if (length(selected_slopes) > 1) { + new_list$x$state$selected_slopes <- paste(selected_slopes, collapse = "\n") + } else { + new_list$x$state$selected_slopes <- selected_slopes + } + + list_value_type <- c("ranks", "scores", "change", NULL) + if (!is.null(value_type)) { + if (!value_type %in% list_value_type) { + stop("`value_type` must be one of: c('ranks', 'scores', 'change')") + } else { + if (length(jsonlite::fromJSON('{"ranks": "ranks", "scores": "scores", "change": "change"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ranks": "ranks", "scores": "scores", "change": "change"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && value_type %in% names(named_list)) { + if (is.logical(value_type)) { + value_type <- as.character(value_type) + } + named_list_value <- unname(named_list[value_type])[[1]] + new_list$x$state$value_type <- named_list_value + } + } + } + } + list_ties_mode <- c("dense", "competition", "fractional", "modified_competition", NULL) + if (!is.null(ties_mode)) { + if (!ties_mode %in% list_ties_mode) { + stop("`ties_mode` must be one of: c('dense', 'competition', 'fractional', 'modified_competition')") + } else { + if (length(jsonlite::fromJSON('{"dense": "dense", "competition": "competition", "fractional": "fractional", "modified_competition": "modified_competition"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dense": "dense", "competition": "competition", "fractional": "fractional", "modified_competition": "modified_competition"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && ties_mode %in% names(named_list)) { + if (is.logical(ties_mode)) { + ties_mode <- as.character(ties_mode) + } + named_list_value <- unname(named_list[ties_mode])[[1]] + new_list$x$state$ties_mode <- named_list_value + } + } + } + } + list_sort_mode <- c("descending", "ascending", NULL) + if (!is.null(sort_mode)) { + if (!sort_mode %in% list_sort_mode) { + stop("`sort_mode` must be one of: c('descending', 'ascending')") + } else { + if (length(jsonlite::fromJSON('{"descending": "descending", "ascending": "ascending"}')) > 1) { + named_list <- jsonlite::fromJSON('{"descending": "descending", "ascending": "ascending"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && sort_mode %in% names(named_list)) { + if (is.logical(sort_mode)) { + sort_mode <- as.character(sort_mode) + } + named_list_value <- unname(named_list[sort_mode])[[1]] + new_list$x$state$sort_mode <- named_list_value + } + } + } + } + list_height_mode <- c("auto", "aspect_ratio", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('auto', 'aspect_ratio')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "aspect_ratio": "aspect_ratio"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "aspect_ratio": "aspect_ratio"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + new_list$x$state$aspect_ratio <- aspect_ratio + list_chart_facet_columns_fixed <- c(FALSE, TRUE, NULL) + if (!is.null(chart_facet_columns_fixed)) { + if (!chart_facet_columns_fixed %in% list_chart_facet_columns_fixed) { + stop("`chart_facet_columns_fixed` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_columns_fixed %in% names(named_list)) { + if (is.logical(chart_facet_columns_fixed)) { + chart_facet_columns_fixed <- as.character(chart_facet_columns_fixed) + } + named_list_value <- unname(named_list[chart_facet_columns_fixed])[[1]] + new_list$x$state$facets$columns_fixed <- named_list_value + } + } + } + } + new_list$x$state$facets$columns <- chart_facet_columns + new_list$x$state$facets$min_width <- chart_facet_min_width + new_list$x$state$facets$min_width_fixed <- chart_facet_min_width_fixed + new_list$x$state$facets$custom_grid <- chart_facet_custom_grid + if (length(chart_facet_custom_positions) > 1) { + new_list$x$state$facets$custom_positions <- paste(chart_facet_custom_positions, collapse = "\n") + } else { + new_list$x$state$facets$custom_positions <- chart_facet_custom_positions + } + + new_list$x$state$facets$max_width <- chart_facet_max_width + new_list$x$state$facets$gutter_w <- chart_facet_gutter_w + new_list$x$state$facets$gutter_h <- chart_facet_gutter_h + list_chart_facet_animation <- c("auto", "name", "reuse", NULL) + if (!is.null(chart_facet_animation)) { + if (!chart_facet_animation %in% list_chart_facet_animation) { + stop("`chart_facet_animation` must be one of: c('auto', 'name', 'reuse')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "name": "name", "reuse": "reuse"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_animation %in% names(named_list)) { + if (is.logical(chart_facet_animation)) { + chart_facet_animation <- as.character(chart_facet_animation) + } + named_list_value <- unname(named_list[chart_facet_animation])[[1]] + new_list$x$state$facets$animation <- named_list_value + } + } + } + } + new_list$x$state$facets$titles <- chart_facet_titles + list_chart_facet_title_align <- c("auto", "left", "center", "right", NULL) + if (!is.null(chart_facet_title_align)) { + if (!chart_facet_title_align %in% list_chart_facet_title_align) { + stop("`chart_facet_title_align` must be one of: c('auto', 'left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_align %in% names(named_list)) { + if (is.logical(chart_facet_title_align)) { + chart_facet_title_align <- as.character(chart_facet_title_align) + } + named_list_value <- unname(named_list[chart_facet_title_align])[[1]] + new_list$x$state$facets$title_align <- named_list_value + } + } + } + } + new_list$x$state$facets$title_size <- chart_facet_title_size + list_chart_facet_title_unit <- c("rem", "facet", NULL) + if (!is.null(chart_facet_title_unit)) { + if (!chart_facet_title_unit %in% list_chart_facet_title_unit) { + stop("`chart_facet_title_unit` must be one of: c('rem', 'facet')") + } else { + if (length(jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rem": "rem", "facet": "facet"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_unit %in% names(named_list)) { + if (is.logical(chart_facet_title_unit)) { + chart_facet_title_unit <- as.character(chart_facet_title_unit) + } + named_list_value <- unname(named_list[chart_facet_title_unit])[[1]] + new_list$x$state$facets$title_unit <- named_list_value + } + } + } + } + new_list$x$state$facets$title_color <- chart_facet_title_color + new_list$x$state$facets$title_padding_top <- chart_facet_title_padding_top + new_list$x$state$facets$title_padding_bottom <- chart_facet_title_padding_bottom + list_chart_facet_title_bg <- c("none", "full", "text", NULL) + if (!is.null(chart_facet_title_bg)) { + if (!chart_facet_title_bg %in% list_chart_facet_title_bg) { + stop("`chart_facet_title_bg` must be one of: c('none', 'full', 'text')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "full": "full", "text": "text"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_facet_title_bg %in% names(named_list)) { + if (is.logical(chart_facet_title_bg)) { + chart_facet_title_bg <- as.character(chart_facet_title_bg) + } + named_list_value <- unname(named_list[chart_facet_title_bg])[[1]] + new_list$x$state$facets$title_bg <- named_list_value + } + } + } + } + new_list$x$state$facets$title_bg_color <- chart_facet_title_bg_color + new_list$x$state$facets$title_bg_padding <- chart_facet_title_bg_padding + new_list$x$state$axis_first_row_only <- axis_first_row_only + new_list$x$state$matching_y_axis <- matching_y_axis + list_labels_name_position <- c("side", "inline", "none", NULL) + if (!is.null(labels_name_position)) { + if (!labels_name_position %in% list_labels_name_position) { + stop("`labels_name_position` must be one of: c('side', 'inline', 'none')") + } else { + if (length(jsonlite::fromJSON('{"side": "side", "inline": "inline", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"side": "side", "inline": "inline", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_name_position %in% names(named_list)) { + if (is.logical(labels_name_position)) { + labels_name_position <- as.character(labels_name_position) + } + named_list_value <- unname(named_list[labels_name_position])[[1]] + new_list$x$state$labels_name_position <- named_list_value + } + } + } + } + list_labels_position <- c("start", "both", "end", NULL) + if (!is.null(labels_position)) { + if (!labels_position %in% list_labels_position) { + stop("`labels_position` must be one of: c('start', 'both', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "both": "both", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "both": "both", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_position %in% names(named_list)) { + if (is.logical(labels_position)) { + labels_position <- as.character(labels_position) + } + named_list_value <- unname(named_list[labels_position])[[1]] + new_list$x$state$labels_position <- named_list_value + } + } + } + } + list_labels_inline_position <- c("start", "middle", "end", NULL) + if (!is.null(labels_inline_position)) { + if (!labels_inline_position %in% list_labels_inline_position) { + stop("`labels_inline_position` must be one of: c('start', 'middle', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "middle": "middle", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "middle": "middle", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && labels_inline_position %in% names(named_list)) { + if (is.logical(labels_inline_position)) { + labels_inline_position <- as.character(labels_inline_position) + } + named_list_value <- unname(named_list[labels_inline_position])[[1]] + new_list$x$state$labels_inline_position <- named_list_value + } + } + } + } + if (length(labels_inline_position_custom) > 1) { + new_list$x$state$labels_inline_position_custom <- paste(labels_inline_position_custom, collapse = "\n") + } else { + new_list$x$state$labels_inline_position_custom <- labels_inline_position_custom + } + + new_list$x$state$only_show_highlights <- only_show_highlights + new_list$x$state$line_labels$max_width <- chart_line_labels_max_width + list_chart_line_labels_overlap_mode <- c("spread", "hide", "none", NULL) + if (!is.null(chart_line_labels_overlap_mode)) { + if (!chart_line_labels_overlap_mode %in% list_chart_line_labels_overlap_mode) { + stop("`chart_line_labels_overlap_mode` must be one of: c('spread', 'hide', 'none')") + } else { + if (length(jsonlite::fromJSON('{"spread": "spread", "hide": "hide", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"spread": "spread", "hide": "hide", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_line_labels_overlap_mode %in% names(named_list)) { + if (is.logical(chart_line_labels_overlap_mode)) { + chart_line_labels_overlap_mode <- as.character(chart_line_labels_overlap_mode) + } + named_list_value <- unname(named_list[chart_line_labels_overlap_mode])[[1]] + new_list$x$state$line_labels$overlap_mode <- named_list_value + } + } + } + } + new_list$x$state$line_labels$spreading_margin <- chart_line_labels_spreading_margin + new_list$x$state$line_labels$data_point_margin <- chart_line_labels_data_point_margin + if (length(chart_line_labels_show_only_labels) > 1) { + new_list$x$state$line_labels$show_only_labels <- paste(chart_line_labels_show_only_labels, collapse = "\n") + } else { + new_list$x$state$line_labels$show_only_labels <- chart_line_labels_show_only_labels + } + + new_list$x$state$line_labels$text_color <- chart_line_labels_text_color + new_list$x$state$line_labels$text_size <- chart_line_labels_text_size + new_list$x$state$line_labels$text_bg_color <- chart_line_labels_text_bg_color + new_list$x$state$line_labels$text_bg_size <- chart_line_labels_text_bg_size + new_list$x$state$line_labels$text_line_height <- chart_line_labels_text_line_height + new_list$x$state$line_labels$text_max_lines <- chart_line_labels_text_max_lines + list_chart_line_labels_text_weight <- c(400, 700, NULL) + if (!is.null(chart_line_labels_text_weight)) { + if (!chart_line_labels_text_weight %in% list_chart_line_labels_text_weight) { + stop("`chart_line_labels_text_weight` must be one of: c(400, 700)") + } else { + if (length(jsonlite::fromJSON('{"400": 400, "700": 700}')) > 1) { + named_list <- jsonlite::fromJSON('{"400": 400, "700": 700}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_line_labels_text_weight %in% names(named_list)) { + if (is.logical(chart_line_labels_text_weight)) { + chart_line_labels_text_weight <- as.character(chart_line_labels_text_weight) + } + named_list_value <- unname(named_list[chart_line_labels_text_weight])[[1]] + new_list$x$state$line_labels$text_weight <- named_list_value + } + } + } + } + list_chart_line_labels_lines <- c("auto", "on", "off", NULL) + if (!is.null(chart_line_labels_lines)) { + if (!chart_line_labels_lines %in% list_chart_line_labels_lines) { + stop("`chart_line_labels_lines` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_line_labels_lines %in% names(named_list)) { + if (is.logical(chart_line_labels_lines)) { + chart_line_labels_lines <- as.character(chart_line_labels_lines) + } + named_list_value <- unname(named_list[chart_line_labels_lines])[[1]] + new_list$x$state$line_labels$lines <- named_list_value + } + } + } + } + list_chart_line_labels_line_style <- c("straight", "step", NULL) + if (!is.null(chart_line_labels_line_style)) { + if (!chart_line_labels_line_style %in% list_chart_line_labels_line_style) { + stop("`chart_line_labels_line_style` must be one of: c('straight', 'step')") + } else { + if (length(jsonlite::fromJSON('{"straight": "straight", "step": "step"}')) > 1) { + named_list <- jsonlite::fromJSON('{"straight": "straight", "step": "step"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_line_labels_line_style %in% names(named_list)) { + if (is.logical(chart_line_labels_line_style)) { + chart_line_labels_line_style <- as.character(chart_line_labels_line_style) + } + named_list_value <- unname(named_list[chart_line_labels_line_style])[[1]] + new_list$x$state$line_labels$line_style <- named_list_value + } + } + } + } + new_list$x$state$line_labels$line_color <- chart_line_labels_line_color + new_list$x$state$line_labels$line_width <- chart_line_labels_line_width + new_list$x$state$line_labels$line_range <- chart_line_labels_line_range + new_list$x$state$line_labels$line_padding <- chart_line_labels_line_padding + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + list_axis_labels_position <- c("top", "bottom", "hidden", NULL) + if (!is.null(axis_labels_position)) { + if (!axis_labels_position %in% list_axis_labels_position) { + stop("`axis_labels_position` must be one of: c('top', 'bottom', 'hidden')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "hidden": "hidden"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "hidden": "hidden"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && axis_labels_position %in% names(named_list)) { + if (is.logical(axis_labels_position)) { + axis_labels_position <- as.character(axis_labels_position) + } + named_list_value <- unname(named_list[axis_labels_position])[[1]] + new_list$x$state$axis_labels_position <- named_list_value + } + } + } + } + new_list$x$state$axis_font_size <- axis_font_size + new_list$x$state$axis_text_color <- axis_text_color + new_list$x$state$axis_color <- axis_color + new_list$x$state$axis_width <- axis_width + new_list$x$state$axis_dashoffset <- axis_dashoffset + new_list$x$state$update_y_axis_filter <- update_y_axis_filter + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$controls$control_type <- named_list_value + } + } + } + } + new_list$x$state$controls$control_styles <- chart_filter_controls_control_styles + new_list$x$state$controls$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$controls$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$controls$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$controls$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$controls$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$controls$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$controls$slider_width <- chart_filter_controls_slider_width + new_list$x$state$controls$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$controls$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$controls$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$controls$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$controls$sort <- named_list_value + } + } + } + } + new_list$x$state$filter_show_all <- filter_show_all + new_list$x$state$filter_show_all_text <- filter_show_all_text + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$slider_style$track_color <- chart_slider_control_style_track_color + new_list$x$state$slider_style$font_color <- chart_slider_control_style_font_color + new_list$x$state$slider_style$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$slider_style$play_color <- chart_slider_control_style_play_color + new_list$x$state$slider_style$track_height <- chart_slider_control_style_track_height + new_list$x$state$slider_style$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$slider_style$play_button <- chart_slider_control_style_play_button + new_list$x$state$animation_duration <- animation_duration + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_legend_position <- c("above", "below", NULL) + if (!is.null(legend_position)) { + if (!legend_position %in% list_legend_position) { + stop("`legend_position` must be one of: c('above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_position %in% names(named_list)) { + if (is.logical(legend_position)) { + legend_position <- as.character(legend_position) + } + named_list_value <- unname(named_list[legend_position])[[1]] + new_list$x$state$legend_position <- named_list_value + } + } + } + } + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + new_list$x$state$formatting$prefix <- chart_number_date_format_prefix + new_list$x$state$formatting$suffix <- chart_number_date_format_suffix + new_list$x$state$formatting$n_dec <- chart_number_date_format_n_dec + new_list$x$state$formatting$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$formatting$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$formatting$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$formatting$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$formatting$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$formatting$transform <- named_list_value + } + } + } + } + new_list$x$state$formatting$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$formatting$exponentiate_constant <- chart_number_date_format_exponentiate_constant + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + new_list$x$state$url_state$enabled <- chart_url_settings_enabled + if (length(chart_url_settings_whitelist) > 1) { + new_list$x$state$url_state$whitelist <- paste(chart_url_settings_whitelist, collapse = "\n") + } else { + new_list$x$state$url_state$whitelist <- chart_url_settings_whitelist + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_sports_details.R b/R_package/R/set_sports_details.R new file mode 100644 index 0000000..7e5221e --- /dev/null +++ b/R_package/R/set_sports_details.R @@ -0,0 +1,3919 @@ +#' Set sports chart details +#' @name set_sports_details +#' @param positions_type Position points by. Choices: auto, formation, data. Position points automatically based on your data, on a specific formation, or use X and Y coordinates. Flourish type hint: string, defaults to `NULL` +#' @param positions_scale_custom Position scale. Choices: auto, custom. "Auto" will set the position scale based on the minimum and maximum values in your data. "Custom" allows you to set a custom minimum and maximum. Flourish type hint: string, defaults to `NULL` +#' @param positions_x_min X min. Flourish type hint: number, defaults to `NULL` +#' @param positions_x_max X max. Flourish type hint: number, defaults to `NULL` +#' @param positions_y_min Y min. Flourish type hint: number, defaults to `NULL` +#' @param positions_y_max Y max. Flourish type hint: number, defaults to `NULL` +#' @param formation_type Formation type. Choices: preset, custom. Flourish type hint: string, defaults to `NULL` +#' @param formation Formation. Choices: 3-5-2, 4-3-3, 4-3-2-1, 4-4-2, 3-4-3, 4-2-3-1. Flourish type hint: string, defaults to `NULL` +#' @param formation_custom Custom formation. Use a "*"" for every player and a "-" for every space on the pitch. Flourish type hint: code, defaults to `NULL` +#' @param pitch_margin_top Top. Increases the gap between the top of the pitch and the first dot. Flourish type hint: number, defaults to `NULL` +#' @param pitch_margin_bottom Bottom. Increases the gap between the bottom of the pitch and the last dot. Flourish type hint: number, defaults to `NULL` +#' @param pitch_type Sport. Choices: football, basketball, tennis, custom. Flourish type hint: string, defaults to `NULL` +#' @param pitch_type_custom Choices: upload, svg. Flourish type hint: string, defaults to `NULL` +#' @param pitch_type_upload Upload. Flourish type hint: url, defaults to `NULL` +#' @param pitch_type_svg SVG. Flourish type hint: text, defaults to `NULL` +#' @param pitch_line_color Color. Flourish type hint: color, defaults to `NULL` +#' @param pitch_line_opacity Opacity. Opacity of the pitch marking lines. Flourish type hint: number, defaults to `NULL` +#' @param pitch_line_width Line width. Line width of the pitch markings in pixels. Flourish type hint: number, defaults to `NULL` +#' @param pitch_height Pitch height. As a percentage of the width. Flourish type hint: number, defaults to `NULL` +#' @param pitch_background Background color. Background color of the pitch. To change the color of the background outside of the pitch, instead slect Background color in the layout section. Flourish type hint: color, defaults to `NULL` +#' @param pitch_opacity Background opacity. Opacity of the pitch background. Flourish type hint: number, defaults to `NULL` +#' @param pitch_orientation Orientation. Choices: vertical, horizontal. Flourish type hint: string, defaults to `NULL` +#' @param pitch_crop Crop pitch. Choices: 1, custom. Show the full pitch, or only show a portion. Flourish type hint: string, defaults to `NULL` +#' @param pitch_crop_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param pitch_flip_dots Flip dots. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param pitch_flip_pitch Flip pitch. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param colors_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param colors_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param colors_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param colors_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param colors_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param colors_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param colors_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param colors_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param colors_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param colors_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param colors_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param colors_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param colors_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param colors_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param colors_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param colors_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param colors_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param colors_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param colors_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param colors_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param colors_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param colors_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param colors_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param colors_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param colors_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param colors_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param dot_opacity Opacity. Opacity of the dots. Flourish type hint: number, defaults to `NULL` +#' @param dot_size Size. Choices: 1.3, 2.5, 6, custom. Flourish type hint: string, defaults to `NULL` +#' @param dot_size_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param dot_border Border size. Choices: 0, 0.2, 0.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param dot_border_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param dot_border_color Color. Outline color of the dots. Flourish type hint: color, defaults to `NULL` +#' @param label_mode Labels. Choices: `TRUE`, `FALSE`. Labels will always be hidden if there are more than 200 data points. Flourish type hint: boolean, defaults to `NULL` +#' @param label_color Color. Label color. Defaults to layout font color settings if not set. Flourish type hint: color, defaults to `NULL` +#' @param label_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param label_size Size. Choices: 0.8, 1, 1.2, custom. Sizing unit is relative to root font size. Flourish type hint: string, defaults to `NULL` +#' @param label_size_custom Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param show_squad_numbers Show Squad Numbers. Optional squad number to appear within dot. Flourish type hint: boolean, defaults to `NULL` +#' @param squad_number_size Size Mode. Choices: 1.1, 1.4, 1.7, custom. Resizes the font size as a proportion of the dots radius. Flourish type hint: string, defaults to `NULL` +#' @param squad_number_size_custom Custom. Specify a custom responsive font size. Best results are betwen 0.8 and 2. Flourish type hint: number, defaults to `NULL` +#' @param squad_number_weight Weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param squad_number_color Color. Flourish type hint: color, defaults to `NULL` +#' @param squad_number_vertical_adjust Adjust vertical spacing. Adjust vertical centering for custom fonts. Flourish type hint: number, defaults to `NULL` +#' @param image_contrast Contrast. Flourish type hint: number, defaults to `NULL` +#' @param image_brightness Brightness. Flourish type hint: number, defaults to `NULL` +#' @param image_saturation Saturation. Flourish type hint: number, defaults to `NULL` +#' @param image_blend_mode Blend mode. Choices: normal, multiply, screen, overlay, darken, lighten. Flourish type hint: string, defaults to `NULL` +#' @param animation_target Animate. Choices: position, opacity, both. Choose whether you want to animate the animate the positions or fade, for example when changing the filter, or drag players positions in the story editor. Flourish type hint: string, defaults to `NULL` +#' @param animation_duration Duration. Specified in seconds. Flourish type hint: number, defaults to `NULL` +#' @param trail Trail lines. Choices: `FALSE`, `TRUE`. Show trail lines when a point is dragged to a new position. Only visible in the story editor. Flourish type hint: boolean, defaults to `NULL` +#' @param trail_color Color. Flourish type hint: color, defaults to `NULL` +#' @param trail_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param trail_size Size. Choices: 0.2, 0.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param trail_size_custom Custom. Proportional to the smallest point size. Flourish type hint: number, defaults to `NULL` +#' @param trail_style Style. Choices: solid, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_container_controls_spacing Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_include_all Include "all". Include "All" in the filter dropdown. Flourish type hint: boolean, defaults to `NULL` +#' @param filter_all_label All label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "sports", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_sports_data(gapminder) |> +#' set_sports_details() +#' ) +#' @export + +set_sports_details <- function( + ., + positions_type = NULL, + positions_scale_custom = NULL, + positions_x_min = NULL, + positions_x_max = NULL, + positions_y_min = NULL, + positions_y_max = NULL, + formation_type = NULL, + formation = NULL, + formation_custom = NULL, + pitch_margin_top = NULL, + pitch_margin_bottom = NULL, + pitch_type = NULL, + pitch_type_custom = NULL, + pitch_type_upload = NULL, + pitch_type_svg = NULL, + pitch_line_color = NULL, + pitch_line_opacity = NULL, + pitch_line_width = NULL, + pitch_height = NULL, + pitch_background = NULL, + pitch_opacity = NULL, + pitch_orientation = NULL, + pitch_crop = NULL, + pitch_crop_custom = NULL, + pitch_flip_dots = NULL, + pitch_flip_pitch = NULL, + colors_categorical_palette = NULL, + colors_categorical_extend = NULL, + colors_categorical_custom_palette = NULL, + colors_numeric_type = NULL, + colors_binning = NULL, + colors_bin_mode = NULL, + colors_bin_count = NULL, + colors_bin_thresholds = NULL, + colors_sequential_palette = NULL, + colors_sequential_reverse = NULL, + colors_sequential_custom_min = NULL, + colors_sequential_custom_max = NULL, + colors_sequential_color_space = NULL, + colors_sequential_custom_domain = NULL, + colors_sequential_domain_min = NULL, + colors_sequential_domain_max = NULL, + colors_diverging_palette = NULL, + colors_diverging_reverse = NULL, + colors_diverging_custom_min = NULL, + colors_diverging_custom_mid = NULL, + colors_diverging_custom_max = NULL, + colors_diverging_color_space = NULL, + colors_diverging_custom_domain = NULL, + colors_diverging_domain_min = NULL, + colors_diverging_domain_mid = NULL, + colors_diverging_domain_max = NULL, + dot_opacity = NULL, + dot_size = NULL, + dot_size_custom = NULL, + dot_border = NULL, + dot_border_custom = NULL, + dot_border_color = NULL, + label_mode = NULL, + label_color = NULL, + label_weight = NULL, + label_size = NULL, + label_size_custom = NULL, + show_squad_numbers = NULL, + squad_number_size = NULL, + squad_number_size_custom = NULL, + squad_number_weight = NULL, + squad_number_color = NULL, + squad_number_vertical_adjust = NULL, + image_contrast = NULL, + image_brightness = NULL, + image_saturation = NULL, + image_blend_mode = NULL, + animation_target = NULL, + animation_duration = NULL, + trail = NULL, + trail_color = NULL, + trail_opacity = NULL, + trail_size = NULL, + trail_size_custom = NULL, + trail_style = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + filter_include_all = NULL, + filter_all_label = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "sports") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/sports")) { + stop("`set_sports_details()` is not supported for this chart type.") + } + list_positions_type <- c("auto", "formation", "data", NULL) + if (!is.null(positions_type)) { + if (!positions_type %in% list_positions_type) { + stop("`positions_type` must be one of: c('auto', 'formation', 'data')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "formation": "formation", "data": "data"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "formation": "formation", "data": "data"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && positions_type %in% names(named_list)) { + if (is.logical(positions_type)) { + positions_type <- as.character(positions_type) + } + named_list_value <- unname(named_list[positions_type])[[1]] + new_list$x$state$positions_type <- named_list_value + } + } + } + } + list_positions_scale_custom <- c("auto", "custom", NULL) + if (!is.null(positions_scale_custom)) { + if (!positions_scale_custom %in% list_positions_scale_custom) { + stop("`positions_scale_custom` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && positions_scale_custom %in% names(named_list)) { + if (is.logical(positions_scale_custom)) { + positions_scale_custom <- as.character(positions_scale_custom) + } + named_list_value <- unname(named_list[positions_scale_custom])[[1]] + new_list$x$state$positions_scale_custom <- named_list_value + } + } + } + } + new_list$x$state$positions_x_min <- positions_x_min + new_list$x$state$positions_x_max <- positions_x_max + new_list$x$state$positions_y_min <- positions_y_min + new_list$x$state$positions_y_max <- positions_y_max + list_formation_type <- c("preset", "custom", NULL) + if (!is.null(formation_type)) { + if (!formation_type %in% list_formation_type) { + stop("`formation_type` must be one of: c('preset', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"preset": "preset", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"preset": "preset", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && formation_type %in% names(named_list)) { + if (is.logical(formation_type)) { + formation_type <- as.character(formation_type) + } + named_list_value <- unname(named_list[formation_type])[[1]] + new_list$x$state$formation_type <- named_list_value + } + } + } + } + list_formation <- c("3-5-2", "4-3-3", "4-3-2-1", "4-4-2", "3-4-3", "4-2-3-1", NULL) + if (!is.null(formation)) { + if (!formation %in% list_formation) { + stop("`formation` must be one of: c('3-5-2', '4-3-3', '4-3-2-1', '4-4-2', '3-4-3', '4-2-3-1')") + } else { + if (length(jsonlite::fromJSON('{"3-5-2": "--*--\n-----\n-***-\n*---*\n-----\n-*-*-\n--*--\n-----\n-*-*-", "4-3-3": "--*--\n-----\n-----\n-----\n-----\n****\n-----\n-----\n-----\n-----\n-*--*--*-\n-----\n-----\n-----\n-*-*-\n-----\n-*-", "4-3-2-1": "--*--\n-*-*-\n*---*\n--*--\n-*-*-\n*---*\n--*--", "4-4-2": "-*-\n-\n-**-\n*--*\n----\n-**-\n*--*\n-\n-\n-*--*-", "3-4-3": "-*-\n--\n-*-*-*-\n--\n*-*-*-*\n--\n-*---*-\n-*-\n--", "4-2-3-1": "-*-\n-\n****\n-\n-*-*-\n-\n-*----*-\n--*--\n-\n-*-\n-"}')) > 1) { + named_list <- jsonlite::fromJSON('{"3-5-2": "--*--\n-----\n-***-\n*---*\n-----\n-*-*-\n--*--\n-----\n-*-*-", "4-3-3": "--*--\n-----\n-----\n-----\n-----\n****\n-----\n-----\n-----\n-----\n-*--*--*-\n-----\n-----\n-----\n-*-*-\n-----\n-*-", "4-3-2-1": "--*--\n-*-*-\n*---*\n--*--\n-*-*-\n*---*\n--*--", "4-4-2": "-*-\n-\n-**-\n*--*\n----\n-**-\n*--*\n-\n-\n-*--*-", "3-4-3": "-*-\n--\n-*-*-*-\n--\n*-*-*-*\n--\n-*---*-\n-*-\n--", "4-2-3-1": "-*-\n-\n****\n-\n-*-*-\n-\n-*----*-\n--*--\n-\n-*-\n-"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && formation %in% names(named_list)) { + if (is.logical(formation)) { + formation <- as.character(formation) + } + named_list_value <- unname(named_list[formation])[[1]] + new_list$x$state$formation <- named_list_value + } + } + } + } + if (length(formation_custom) > 1) { + new_list$x$state$formation_custom <- paste(formation_custom, collapse = "\n") + } else { + new_list$x$state$formation_custom <- formation_custom + } + + new_list$x$state$pitch$margin_top <- pitch_margin_top + new_list$x$state$pitch$margin_bottom <- pitch_margin_bottom + list_pitch_type <- c("football", "basketball", "tennis", "custom", NULL) + if (!is.null(pitch_type)) { + if (!pitch_type %in% list_pitch_type) { + stop("`pitch_type` must be one of: c('football', 'basketball', 'tennis', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"football": "football", "basketball": "basketball", "tennis": "tennis", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"football": "football", "basketball": "basketball", "tennis": "tennis", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && pitch_type %in% names(named_list)) { + if (is.logical(pitch_type)) { + pitch_type <- as.character(pitch_type) + } + named_list_value <- unname(named_list[pitch_type])[[1]] + new_list$x$state$pitch$type <- named_list_value + } + } + } + } + list_pitch_type_custom <- c("upload", "svg", NULL) + if (!is.null(pitch_type_custom)) { + if (!pitch_type_custom %in% list_pitch_type_custom) { + stop("`pitch_type_custom` must be one of: c('upload', 'svg')") + } else { + if (length(jsonlite::fromJSON('{"upload": "upload", "svg": "svg"}')) > 1) { + named_list <- jsonlite::fromJSON('{"upload": "upload", "svg": "svg"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && pitch_type_custom %in% names(named_list)) { + if (is.logical(pitch_type_custom)) { + pitch_type_custom <- as.character(pitch_type_custom) + } + named_list_value <- unname(named_list[pitch_type_custom])[[1]] + new_list$x$state$pitch$type_custom <- named_list_value + } + } + } + } + new_list$x$state$pitch$type_upload <- pitch_type_upload + if (length(pitch_type_svg) > 1) { + new_list$x$state$pitch$type_svg <- paste(pitch_type_svg, collapse = "\n") + } else { + new_list$x$state$pitch$type_svg <- pitch_type_svg + } + + new_list$x$state$pitch$line_color <- pitch_line_color + new_list$x$state$pitch$line_opacity <- pitch_line_opacity + new_list$x$state$pitch$line_width <- pitch_line_width + new_list$x$state$pitch$height <- pitch_height + new_list$x$state$pitch$background <- pitch_background + new_list$x$state$pitch$opacity <- pitch_opacity + list_pitch_orientation <- c("vertical", "horizontal", NULL) + if (!is.null(pitch_orientation)) { + if (!pitch_orientation %in% list_pitch_orientation) { + stop("`pitch_orientation` must be one of: c('vertical', 'horizontal')") + } else { + if (length(jsonlite::fromJSON('{"vertical": "vertical", "horizontal": "horizontal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"vertical": "vertical", "horizontal": "horizontal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && pitch_orientation %in% names(named_list)) { + if (is.logical(pitch_orientation)) { + pitch_orientation <- as.character(pitch_orientation) + } + named_list_value <- unname(named_list[pitch_orientation])[[1]] + new_list$x$state$pitch$orientation <- named_list_value + } + } + } + } + list_pitch_crop <- c("1", "custom", NULL) + if (!is.null(pitch_crop)) { + if (!pitch_crop %in% list_pitch_crop) { + stop("`pitch_crop` must be one of: c('1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && pitch_crop %in% names(named_list)) { + if (is.logical(pitch_crop)) { + pitch_crop <- as.character(pitch_crop) + } + named_list_value <- unname(named_list[pitch_crop])[[1]] + new_list$x$state$pitch$crop <- named_list_value + } + } + } + } + new_list$x$state$pitch$crop_custom <- pitch_crop_custom + list_pitch_flip_dots <- c(TRUE, FALSE, NULL) + if (!is.null(pitch_flip_dots)) { + if (!pitch_flip_dots %in% list_pitch_flip_dots) { + stop("`pitch_flip_dots` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && pitch_flip_dots %in% names(named_list)) { + if (is.logical(pitch_flip_dots)) { + pitch_flip_dots <- as.character(pitch_flip_dots) + } + named_list_value <- unname(named_list[pitch_flip_dots])[[1]] + new_list$x$state$pitch$flip_dots <- named_list_value + } + } + } + } + list_pitch_flip_pitch <- c(TRUE, FALSE, NULL) + if (!is.null(pitch_flip_pitch)) { + if (!pitch_flip_pitch %in% list_pitch_flip_pitch) { + stop("`pitch_flip_pitch` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && pitch_flip_pitch %in% names(named_list)) { + if (is.logical(pitch_flip_pitch)) { + pitch_flip_pitch <- as.character(pitch_flip_pitch) + } + named_list_value <- unname(named_list[pitch_flip_pitch])[[1]] + new_list$x$state$pitch$flip_pitch <- named_list_value + } + } + } + } + if (length(colors_categorical_palette) > 1) { + new_list$x$state$colors$categorical_palette <- paste(colors_categorical_palette, collapse = "\n") + } else { + new_list$x$state$colors$categorical_palette <- colors_categorical_palette + } + + new_list$x$state$colors$categorical_extend <- colors_categorical_extend + if (length(colors_categorical_custom_palette) > 1) { + new_list$x$state$colors$categorical_custom_palette <- paste(colors_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$colors$categorical_custom_palette <- colors_categorical_custom_palette + } + + list_colors_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(colors_numeric_type)) { + if (!colors_numeric_type %in% list_colors_numeric_type) { + stop("`colors_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && colors_numeric_type %in% names(named_list)) { + if (is.logical(colors_numeric_type)) { + colors_numeric_type <- as.character(colors_numeric_type) + } + named_list_value <- unname(named_list[colors_numeric_type])[[1]] + new_list$x$state$colors$numeric_type <- named_list_value + } + } + } + } + list_colors_binning <- c(FALSE, TRUE, NULL) + if (!is.null(colors_binning)) { + if (!colors_binning %in% list_colors_binning) { + stop("`colors_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && colors_binning %in% names(named_list)) { + if (is.logical(colors_binning)) { + colors_binning <- as.character(colors_binning) + } + named_list_value <- unname(named_list[colors_binning])[[1]] + new_list$x$state$colors$binning <- named_list_value + } + } + } + } + list_colors_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(colors_bin_mode)) { + if (!colors_bin_mode %in% list_colors_bin_mode) { + stop("`colors_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && colors_bin_mode %in% names(named_list)) { + if (is.logical(colors_bin_mode)) { + colors_bin_mode <- as.character(colors_bin_mode) + } + named_list_value <- unname(named_list[colors_bin_mode])[[1]] + new_list$x$state$colors$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$colors$bin_count <- colors_bin_count + new_list$x$state$colors$bin_thresholds <- colors_bin_thresholds + new_list$x$state$colors$sequential_palette <- colors_sequential_palette + new_list$x$state$colors$sequential_reverse <- colors_sequential_reverse + new_list$x$state$colors$sequential_custom_min <- colors_sequential_custom_min + new_list$x$state$colors$sequential_custom_max <- colors_sequential_custom_max + list_colors_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(colors_sequential_color_space)) { + if (!colors_sequential_color_space %in% list_colors_sequential_color_space) { + stop("`colors_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && colors_sequential_color_space %in% names(named_list)) { + if (is.logical(colors_sequential_color_space)) { + colors_sequential_color_space <- as.character(colors_sequential_color_space) + } + named_list_value <- unname(named_list[colors_sequential_color_space])[[1]] + new_list$x$state$colors$sequential_color_space <- named_list_value + } + } + } + } + list_colors_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(colors_sequential_custom_domain)) { + if (!colors_sequential_custom_domain %in% list_colors_sequential_custom_domain) { + stop("`colors_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && colors_sequential_custom_domain %in% names(named_list)) { + if (is.logical(colors_sequential_custom_domain)) { + colors_sequential_custom_domain <- as.character(colors_sequential_custom_domain) + } + named_list_value <- unname(named_list[colors_sequential_custom_domain])[[1]] + new_list$x$state$colors$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$colors$sequential_domain_min <- colors_sequential_domain_min + new_list$x$state$colors$sequential_domain_max <- colors_sequential_domain_max + new_list$x$state$colors$diverging_palette <- colors_diverging_palette + new_list$x$state$colors$diverging_reverse <- colors_diverging_reverse + new_list$x$state$colors$diverging_custom_min <- colors_diverging_custom_min + new_list$x$state$colors$diverging_custom_mid <- colors_diverging_custom_mid + new_list$x$state$colors$diverging_custom_max <- colors_diverging_custom_max + list_colors_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(colors_diverging_color_space)) { + if (!colors_diverging_color_space %in% list_colors_diverging_color_space) { + stop("`colors_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && colors_diverging_color_space %in% names(named_list)) { + if (is.logical(colors_diverging_color_space)) { + colors_diverging_color_space <- as.character(colors_diverging_color_space) + } + named_list_value <- unname(named_list[colors_diverging_color_space])[[1]] + new_list$x$state$colors$diverging_color_space <- named_list_value + } + } + } + } + list_colors_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(colors_diverging_custom_domain)) { + if (!colors_diverging_custom_domain %in% list_colors_diverging_custom_domain) { + stop("`colors_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && colors_diverging_custom_domain %in% names(named_list)) { + if (is.logical(colors_diverging_custom_domain)) { + colors_diverging_custom_domain <- as.character(colors_diverging_custom_domain) + } + named_list_value <- unname(named_list[colors_diverging_custom_domain])[[1]] + new_list$x$state$colors$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$colors$diverging_domain_min <- colors_diverging_domain_min + new_list$x$state$colors$diverging_domain_mid <- colors_diverging_domain_mid + new_list$x$state$colors$diverging_domain_max <- colors_diverging_domain_max + new_list$x$state$dot_opacity <- dot_opacity + list_dot_size <- c("1.3", "2.5", "6", "custom", NULL) + if (!is.null(dot_size)) { + if (!dot_size %in% list_dot_size) { + stop("`dot_size` must be one of: c('1.3', '2.5', '6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.3": "1.3", "2.5": "2.5", "6": "6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.3": "1.3", "2.5": "2.5", "6": "6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && dot_size %in% names(named_list)) { + if (is.logical(dot_size)) { + dot_size <- as.character(dot_size) + } + named_list_value <- unname(named_list[dot_size])[[1]] + new_list$x$state$dot_size <- named_list_value + } + } + } + } + new_list$x$state$dot_size_custom <- dot_size_custom + list_dot_border <- c("0", "0.2", "0.5", "custom", NULL) + if (!is.null(dot_border)) { + if (!dot_border %in% list_dot_border) { + stop("`dot_border` must be one of: c('0', '0.2', '0.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.2": "0.2", "0.5": "0.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.2": "0.2", "0.5": "0.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && dot_border %in% names(named_list)) { + if (is.logical(dot_border)) { + dot_border <- as.character(dot_border) + } + named_list_value <- unname(named_list[dot_border])[[1]] + new_list$x$state$dot_border <- named_list_value + } + } + } + } + new_list$x$state$dot_border_custom <- dot_border_custom + new_list$x$state$dot_border_color <- dot_border_color + list_label_mode <- c(TRUE, FALSE, NULL) + if (!is.null(label_mode)) { + if (!label_mode %in% list_label_mode) { + stop("`label_mode` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_mode %in% names(named_list)) { + if (is.logical(label_mode)) { + label_mode <- as.character(label_mode) + } + named_list_value <- unname(named_list[label_mode])[[1]] + new_list$x$state$label_mode <- named_list_value + } + } + } + } + new_list$x$state$label_color <- label_color + list_label_weight <- c("normal", "bold", NULL) + if (!is.null(label_weight)) { + if (!label_weight %in% list_label_weight) { + stop("`label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_weight %in% names(named_list)) { + if (is.logical(label_weight)) { + label_weight <- as.character(label_weight) + } + named_list_value <- unname(named_list[label_weight])[[1]] + new_list$x$state$label_weight <- named_list_value + } + } + } + } + list_label_size <- c("0.8", "1", "1.2", "custom", NULL) + if (!is.null(label_size)) { + if (!label_size %in% list_label_size) { + stop("`label_size` must be one of: c('0.8', '1', '1.2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.8": "0.8", "1": "1", "1.2": "1.2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.8": "0.8", "1": "1", "1.2": "1.2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_size %in% names(named_list)) { + if (is.logical(label_size)) { + label_size <- as.character(label_size) + } + named_list_value <- unname(named_list[label_size])[[1]] + new_list$x$state$label_size <- named_list_value + } + } + } + } + new_list$x$state$label_size_custom <- label_size_custom + new_list$x$state$show_squad_numbers <- show_squad_numbers + list_squad_number_size <- c("1.1", "1.4", "1.7", "custom", NULL) + if (!is.null(squad_number_size)) { + if (!squad_number_size %in% list_squad_number_size) { + stop("`squad_number_size` must be one of: c('1.1', '1.4', '1.7', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.1": "1.1", "1.4": "1.4", "1.7": "1.7", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.1": "1.1", "1.4": "1.4", "1.7": "1.7", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && squad_number_size %in% names(named_list)) { + if (is.logical(squad_number_size)) { + squad_number_size <- as.character(squad_number_size) + } + named_list_value <- unname(named_list[squad_number_size])[[1]] + new_list$x$state$squad_number_size <- named_list_value + } + } + } + } + new_list$x$state$squad_number_size_custom <- squad_number_size_custom + list_squad_number_weight <- c("normal", "bold", NULL) + if (!is.null(squad_number_weight)) { + if (!squad_number_weight %in% list_squad_number_weight) { + stop("`squad_number_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && squad_number_weight %in% names(named_list)) { + if (is.logical(squad_number_weight)) { + squad_number_weight <- as.character(squad_number_weight) + } + named_list_value <- unname(named_list[squad_number_weight])[[1]] + new_list$x$state$squad_number_weight <- named_list_value + } + } + } + } + new_list$x$state$squad_number_color <- squad_number_color + new_list$x$state$squad_number_vertical_adjust <- squad_number_vertical_adjust + new_list$x$state$image_contrast <- image_contrast + new_list$x$state$image_brightness <- image_brightness + new_list$x$state$image_saturation <- image_saturation + list_image_blend_mode <- c("normal", "multiply", "screen", "overlay", "darken", "lighten", NULL) + if (!is.null(image_blend_mode)) { + if (!image_blend_mode %in% list_image_blend_mode) { + stop("`image_blend_mode` must be one of: c('normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "multiply": "multiply", "screen": "screen", "overlay": "overlay", "darken": "darken", "lighten": "lighten"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "multiply": "multiply", "screen": "screen", "overlay": "overlay", "darken": "darken", "lighten": "lighten"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_blend_mode %in% names(named_list)) { + if (is.logical(image_blend_mode)) { + image_blend_mode <- as.character(image_blend_mode) + } + named_list_value <- unname(named_list[image_blend_mode])[[1]] + new_list$x$state$image_blend_mode <- named_list_value + } + } + } + } + list_animation_target <- c("position", "opacity", "both", NULL) + if (!is.null(animation_target)) { + if (!animation_target %in% list_animation_target) { + stop("`animation_target` must be one of: c('position', 'opacity', 'both')") + } else { + if (length(jsonlite::fromJSON('{"position": "position", "opacity": "opacity", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"position": "position", "opacity": "opacity", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && animation_target %in% names(named_list)) { + if (is.logical(animation_target)) { + animation_target <- as.character(animation_target) + } + named_list_value <- unname(named_list[animation_target])[[1]] + new_list$x$state$animation_target <- named_list_value + } + } + } + } + new_list$x$state$animation_duration <- animation_duration + list_trail <- c(FALSE, TRUE, NULL) + if (!is.null(trail)) { + if (!trail %in% list_trail) { + stop("`trail` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && trail %in% names(named_list)) { + if (is.logical(trail)) { + trail <- as.character(trail) + } + named_list_value <- unname(named_list[trail])[[1]] + new_list$x$state$trail <- named_list_value + } + } + } + } + new_list$x$state$trail_color <- trail_color + new_list$x$state$trail_opacity <- trail_opacity + list_trail_size <- c("0.2", "0.5", "custom", NULL) + if (!is.null(trail_size)) { + if (!trail_size %in% list_trail_size) { + stop("`trail_size` must be one of: c('0.2', '0.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.2": "0.2", "0.5": "0.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.2": "0.2", "0.5": "0.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && trail_size %in% names(named_list)) { + if (is.logical(trail_size)) { + trail_size <- as.character(trail_size) + } + named_list_value <- unname(named_list[trail_size])[[1]] + new_list$x$state$trail_size <- named_list_value + } + } + } + } + new_list$x$state$trail_size_custom <- trail_size_custom + list_trail_style <- c("solid", "dotted", NULL) + if (!is.null(trail_style)) { + if (!trail_style %in% list_trail_style) { + stop("`trail_style` must be one of: c('solid', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && trail_style %in% names(named_list)) { + if (is.logical(trail_style)) { + trail_style <- as.character(trail_style) + } + named_list_value <- unname(named_list[trail_style])[[1]] + new_list$x$state$trail_style <- named_list_value + } + } + } + } + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + list_chart_filter_controls_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_filter_controls_container_alignment)) { + if (!chart_filter_controls_container_alignment %in% list_chart_filter_controls_container_alignment) { + stop("`chart_filter_controls_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_container_alignment %in% names(named_list)) { + if (is.logical(chart_filter_controls_container_alignment)) { + chart_filter_controls_container_alignment <- as.character(chart_filter_controls_container_alignment) + } + named_list_value <- unname(named_list[chart_filter_controls_container_alignment])[[1]] + new_list$x$state$controls_container$alignment <- named_list_value + } + } + } + } + new_list$x$state$controls_container$controls_spacing <- chart_filter_controls_container_controls_spacing + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$filter_control$control_type <- named_list_value + } + } + } + } + new_list$x$state$filter_control$control_styles <- chart_filter_controls_control_styles + new_list$x$state$filter_control$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$filter_control$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$filter_control$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$filter_control$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$filter_control$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$filter_control$slider_width <- chart_filter_controls_slider_width + new_list$x$state$filter_control$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$filter_control$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$filter_control$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$filter_control$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$filter_control$sort <- named_list_value + } + } + } + } + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$slider_style$track_color <- chart_slider_control_style_track_color + new_list$x$state$slider_style$font_color <- chart_slider_control_style_font_color + new_list$x$state$slider_style$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$slider_style$play_color <- chart_slider_control_style_play_color + new_list$x$state$slider_style$track_height <- chart_slider_control_style_track_height + new_list$x$state$slider_style$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$slider_style$play_button <- chart_slider_control_style_play_button + new_list$x$state$filter_include_all <- filter_include_all + new_list$x$state$filter_all_label <- filter_all_label + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_sports_race_details.R b/R_package/R/set_sports_race_details.R new file mode 100644 index 0000000..6d10390 --- /dev/null +++ b/R_package/R/set_sports_race_details.R @@ -0,0 +1,2809 @@ +#' Set sports race chart details +#' @name set_sports_race_details +#' @param preset_svg Choices: athletics, swimming, cycling, custom. Flourish type hint: string, defaults to `NULL` +#' @param custom_svg Custom SVG. Use a custom track using your own SVG Flourish type hint: text, defaults to `NULL` +#' @param track_path_id Path ID. The ID of the element in the SVG which defines the center of the track. Flourish type hint: string, defaults to `NULL` +#' @param track_lane_width Lane width. The distance between each participant. Flourish type hint: number, defaults to `NULL` +#' @param track_back_and_forth Track type. Choices: `FALSE`, `TRUE`. Whether the track goes back and forth, like a swimming pool, or back to the start, like a race track. Flourish type hint: boolean, defaults to `NULL` +#' @param participant_icon_mode Icon type. Choices: circle, image. Flourish type hint: string, defaults to `NULL` +#' @param participant_size Size. Flourish type hint: number, defaults to `NULL` +#' @param participant_stroke_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param participant_stroke_opacity Stroke opacity. Flourish type hint: number, defaults to `NULL` +#' @param participant_fill_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param preset_participant_image Default images. Choices: runner, swimmer, cyclist, custom. The images used if no image is included for the participant in the datasheet. Flourish type hint: string, defaults to `NULL` +#' @param custom_participant_start_image Custom start image. The image shown at the start of the race. Flourish type hint: url, defaults to `NULL` +#' @param custom_participant_race_image Custom racing image. The image shown while the participant is racing. Flourish type hint: url, defaults to `NULL` +#' @param custom_participant_finish_image Custom finish image. The image shown when the participant has finished the race. Flourish type hint: url, defaults to `NULL` +#' @param image_initial_rotation Rotate images. Choices: 0, 90, 180, 270. Flourish type hint: string, defaults to `NULL` +#' @param image_initial_flip_x Flip horizontally. Flourish type hint: boolean, defaults to `NULL` +#' @param image_initial_flip_y Flip vertically. Flourish type hint: boolean, defaults to `NULL` +#' @param image_transform_mode Direction change. Choices: rotate, flip_x, flip_y, flip_both, static. Change the direction of the image based on which way the participant is traveling. Rotate rotates the image to face the direction of travel. Flip horizontally flips the image horizontally depending on whether the participant is traveling towards the left or right. Flip vertically flips the image vertically depending on whether the participant is traveling towards the top or bottom. Flip horizontally and vertically combines the horizontal and vertical flip settings. Static doesnt change the direction of the image. Flourish type hint: string, defaults to `NULL` +#' @param participant_icon_recolor Recolor icons. Apply colors to differentiate the participants. Works best with greyscale images. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_participant_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_participant_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_participant_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_participant_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_participant_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_participant_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_participant_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_participant_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_participant_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_participant_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_participant_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_participant_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_participant_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_participant_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_participant_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_participant_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_participant_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_participant_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_participant_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_participant_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_participant_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_participant_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_participant_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_participant_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_participant_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_participant_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param camera_mode Camera mode. Choices: track, leader. Flourish type hint: string, defaults to `NULL` +#' @param zoom Zoom level. How much to zoom in when playing. Flourish type hint: number, defaults to `NULL` +#' @param checkpoint_mode Checkpoint mode. Choices: laps, splits, custom. Flourish type hint: string, defaults to `NULL` +#' @param checkpoints Checkpoints. Enter the number of laps completed at each recorded checkpoint/column in the data. E.g. "0.5, 1, 1.5, 2" would mean that the times were taken every half a lap. Enter one checkpoint per line. Flourish type hint: text, defaults to `NULL` +#' @param times_cumulative Times are cumulative. Switch on if the time columns represent the cumulative time taken at each checkpoint (e.g. 12, 25, 36). Switch off if the times represent how long individual checkpoints took to complete (e.g. 12, 13, 11). Flourish type hint: boolean, defaults to `NULL` +#' @param participant_label_mode Label mode. Choices: auto, leader, all, custom. Determines which labels are drawn. Auto draws as many labels as possible whilst avoiding overlaps. Flourish type hint: string, defaults to `NULL` +#' @param participant_label_custom Participants to label. Enter the names of the participants to label. These must exactly match the names in your data. Enter one name per line. Flourish type hint: text, defaults to `NULL` +#' @param participant_label_position Label position. Choices: auto, left, right. Flourish type hint: string, defaults to `NULL` +#' @param participant_label_style Style. Flourish type hint: boolean, defaults to `NULL` +#' @param participant_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param participant_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param participant_label_stroke Outline. Flourish type hint: color, defaults to `NULL` +#' @param participant_label_stroke_size Outline width. As a % of the font size. Flourish type hint: number, defaults to `NULL` +#' @param participant_label_weight Weight. Choices: 400, 600. Flourish type hint: string, defaults to `NULL` +#' @param participant_highlight Highlight icons. Highlight the labeled participant(s). Flourish type hint: boolean, defaults to `NULL` +#' @param participant_highlight_color Highlight color. Flourish type hint: color, defaults to `NULL` +#' @param participant_highlight_width Highlight width. Flourish type hint: number, defaults to `NULL` +#' @param label_position_enabled Choices: `FALSE`, `TRUE`. Whether to show the position of the participant in the label. Flourish type hint: boolean, defaults to `NULL` +#' @param label_position_time Show position. Choices: always, race, finish. Set to At finish, to only show a participants position when theyve completed the race. Set to During race, to only show a participants position while they are still racing. Flourish type hint: string, defaults to `NULL` +#' @param label_position_type Position to show. Choices: current, finish. Whether to show a participants current position in the race, or their finishing position. Flourish type hint: string, defaults to `NULL` +#' @param label_medal_enabled Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param label_medal_time Show medals. Choices: always, race, finish. Set to At finish, to only show a participants medal when theyve completed the race. Set to During race, to only show a participants medal while they are still racing. Flourish type hint: string, defaults to `NULL` +#' @param label_medal_type Medal to show. Choices: current, finish. Whether to show the medal position for a participant at the current point in the race, or the medal they win at the end of the race. Flourish type hint: string, defaults to `NULL` +#' @param label_medal_replace_position Replace position. Turn on to replace a participants position label with their medal if they are in a medal position. Flourish type hint: boolean, defaults to `NULL` +#' @param label_finishing_time_enabled Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param label_finishing_time_time Show finishing time. Choices: always, finish. Flourish type hint: string, defaults to `NULL` +#' @param participant_stacking Choices: sheet_order, rank, y_position. Determines which participants obscure other participants when they overlap. Flourish type hint: string, defaults to `NULL` +#' @param chart_timeline_controls_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_style Style. Choices: timeline, button. Flourish type hint: string, defaults to `NULL` +#' @param chart_timeline_controls_graph Show chart. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_play_on_load Play on load. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_loop Loop timeline. When turned on, the timeline will return to the beginning once complete. Otherwise, it will stop when it reaches the end. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_duration Timeline duration. Total duration of the timeline during normal playback in seconds. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_duration_tween Time jump duration. Duration of transitions between different points in time on the timeline. This is the transition you see in the story player when switching between slides with a different time on the timeline (in seconds). Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_duration_wait_at_end Pause before loop. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_axes_custom_enabled Axis settings. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_color_axes Axes color. Flourish type hint: color, defaults to `NULL` +#' @param chart_timeline_controls_axis_font_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_date_format_display X axis date format. Choices:, %Y-%m-%dT%H:%M:%S.%LZ, %Y-%m-%d, %m/%d/%Y, %d/%m/%Y, %d-%b-%y, %m/%Y, %b %Y, %b %y, %B %d, %d %b, %Y, %B, %b, %A, %a, %H:%M:%S, %I:%M %p, %H:%M. Flourish type hint: string, defaults to `NULL` +#' @param chart_timeline_controls_axis_nice_x Clean X axis. Rounds out the X axis so that its start and end values are nice, round dates. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_axis_nice_y Clean Y axis. Rounds out the Y axis so that its start and end values are nice, round numbers. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_scrubber_snap Snap when scrubbing. When turned on, you can only jump to values that are supplied in the dataset and nothing in between. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_scrubber_snap_paused Snap when paused. Activate to snap the timeline to the closest interval when non animating. This is useful for ensuring the data visible in the visualization always reflects the data you have supplied. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_layout_settings Layout settings. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_margin_right Space between button and timeline. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_scrubber_height Scrubber height. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_margin_right_button Space between button and text. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_graph_settings Chart settings. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_color_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_timeline_controls_graph_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_curve Curved lines. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_playback_styling Play button settings. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_button_color Button color. Flourish type hint: color, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_button_size Button size. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_icon_color Icon color. Flourish type hint: color, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_icon_size Icon size. Flourish type hint: number, defaults to `NULL` +#' @param chart_timeline_controls_playback_button_label_size Label size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "sports_race", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_sports_race_data(gapminder) |> +#' set_sports_race_details() +#' ) +#' @export + +set_sports_race_details <- function( + ., + preset_svg = NULL, + custom_svg = NULL, + track_path_id = NULL, + track_lane_width = NULL, + track_back_and_forth = NULL, + participant_icon_mode = NULL, + participant_size = NULL, + participant_stroke_width = NULL, + participant_stroke_opacity = NULL, + participant_fill_opacity = NULL, + preset_participant_image = NULL, + custom_participant_start_image = NULL, + custom_participant_race_image = NULL, + custom_participant_finish_image = NULL, + image_initial_rotation = NULL, + image_initial_flip_x = NULL, + image_initial_flip_y = NULL, + image_transform_mode = NULL, + participant_icon_recolor = NULL, + chart_participant_color_scale_categorical_palette = NULL, + chart_participant_color_scale_categorical_extend = NULL, + chart_participant_color_scale_categorical_custom_palette = NULL, + chart_participant_color_scale_numeric_type = NULL, + chart_participant_color_scale_binning = NULL, + chart_participant_color_scale_bin_mode = NULL, + chart_participant_color_scale_bin_count = NULL, + chart_participant_color_scale_bin_thresholds = NULL, + chart_participant_color_scale_sequential_palette = NULL, + chart_participant_color_scale_sequential_reverse = NULL, + chart_participant_color_scale_sequential_custom_min = NULL, + chart_participant_color_scale_sequential_custom_max = NULL, + chart_participant_color_scale_sequential_color_space = NULL, + chart_participant_color_scale_sequential_custom_domain = NULL, + chart_participant_color_scale_sequential_domain_min = NULL, + chart_participant_color_scale_sequential_domain_max = NULL, + chart_participant_color_scale_diverging_palette = NULL, + chart_participant_color_scale_diverging_reverse = NULL, + chart_participant_color_scale_diverging_custom_min = NULL, + chart_participant_color_scale_diverging_custom_mid = NULL, + chart_participant_color_scale_diverging_custom_max = NULL, + chart_participant_color_scale_diverging_color_space = NULL, + chart_participant_color_scale_diverging_custom_domain = NULL, + chart_participant_color_scale_diverging_domain_min = NULL, + chart_participant_color_scale_diverging_domain_mid = NULL, + chart_participant_color_scale_diverging_domain_max = NULL, + camera_mode = NULL, + zoom = NULL, + checkpoint_mode = NULL, + checkpoints = NULL, + times_cumulative = NULL, + participant_label_mode = NULL, + participant_label_custom = NULL, + participant_label_position = NULL, + participant_label_style = NULL, + participant_label_color = NULL, + participant_label_size = NULL, + participant_label_stroke = NULL, + participant_label_stroke_size = NULL, + participant_label_weight = NULL, + participant_highlight = NULL, + participant_highlight_color = NULL, + participant_highlight_width = NULL, + label_position_enabled = NULL, + label_position_time = NULL, + label_position_type = NULL, + label_medal_enabled = NULL, + label_medal_time = NULL, + label_medal_type = NULL, + label_medal_replace_position = NULL, + label_finishing_time_enabled = NULL, + label_finishing_time_time = NULL, + participant_stacking = NULL, + chart_timeline_controls_enabled = NULL, + chart_timeline_controls_style = NULL, + chart_timeline_controls_graph = NULL, + chart_timeline_controls_play_on_load = NULL, + chart_timeline_controls_loop = NULL, + chart_timeline_controls_duration = NULL, + chart_timeline_controls_duration_tween = NULL, + chart_timeline_controls_duration_wait_at_end = NULL, + chart_timeline_controls_axes_custom_enabled = NULL, + chart_timeline_controls_color_axes = NULL, + chart_timeline_controls_axis_font_size = NULL, + chart_timeline_controls_date_format_display = NULL, + chart_timeline_controls_axis_nice_x = NULL, + chart_timeline_controls_axis_nice_y = NULL, + chart_timeline_controls_scrubber_snap = NULL, + chart_timeline_controls_scrubber_snap_paused = NULL, + chart_timeline_controls_layout_settings = NULL, + chart_timeline_controls_margin_top = NULL, + chart_timeline_controls_margin_left = NULL, + chart_timeline_controls_margin_bottom = NULL, + chart_timeline_controls_margin_right = NULL, + chart_timeline_controls_playback_button_margin_right = NULL, + chart_timeline_controls_scrubber_height = NULL, + chart_timeline_controls_playback_button_margin_right_button = NULL, + chart_timeline_controls_graph_settings = NULL, + chart_timeline_controls_color_background = NULL, + chart_timeline_controls_graph_height = NULL, + chart_timeline_controls_curve = NULL, + chart_timeline_controls_playback_styling = NULL, + chart_timeline_controls_playback_button_button_color = NULL, + chart_timeline_controls_playback_button_button_size = NULL, + chart_timeline_controls_playback_button_icon_color = NULL, + chart_timeline_controls_playback_button_icon_size = NULL, + chart_timeline_controls_playback_button_label_size = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "sports_race") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/sports-race")) { + stop("`set_sports_race_details()` is not supported for this chart type.") + } + list_preset_svg <- c("athletics", "swimming", "cycling", "custom", NULL) + if (!is.null(preset_svg)) { + if (!preset_svg %in% list_preset_svg) { + stop("`preset_svg` must be one of: c('athletics', 'swimming', 'cycling', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"athletics": "athletics", "swimming": "swimming", "cycling": "cycling", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"athletics": "athletics", "swimming": "swimming", "cycling": "cycling", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && preset_svg %in% names(named_list)) { + if (is.logical(preset_svg)) { + preset_svg <- as.character(preset_svg) + } + named_list_value <- unname(named_list[preset_svg])[[1]] + new_list$x$state$preset_svg <- named_list_value + } + } + } + } + if (length(custom_svg) > 1) { + new_list$x$state$custom_svg <- paste(custom_svg, collapse = "\n") + } else { + new_list$x$state$custom_svg <- custom_svg + } + + new_list$x$state$track_path_id <- track_path_id + new_list$x$state$track_lane_width <- track_lane_width + list_track_back_and_forth <- c(FALSE, TRUE, NULL) + if (!is.null(track_back_and_forth)) { + if (!track_back_and_forth %in% list_track_back_and_forth) { + stop("`track_back_and_forth` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && track_back_and_forth %in% names(named_list)) { + if (is.logical(track_back_and_forth)) { + track_back_and_forth <- as.character(track_back_and_forth) + } + named_list_value <- unname(named_list[track_back_and_forth])[[1]] + new_list$x$state$track_back_and_forth <- named_list_value + } + } + } + } + list_participant_icon_mode <- c("circle", "image", NULL) + if (!is.null(participant_icon_mode)) { + if (!participant_icon_mode %in% list_participant_icon_mode) { + stop("`participant_icon_mode` must be one of: c('circle', 'image')") + } else { + if (length(jsonlite::fromJSON('{"circle": "circle", "image": "image"}')) > 1) { + named_list <- jsonlite::fromJSON('{"circle": "circle", "image": "image"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && participant_icon_mode %in% names(named_list)) { + if (is.logical(participant_icon_mode)) { + participant_icon_mode <- as.character(participant_icon_mode) + } + named_list_value <- unname(named_list[participant_icon_mode])[[1]] + new_list$x$state$participant_icon_mode <- named_list_value + } + } + } + } + new_list$x$state$participant_size <- participant_size + new_list$x$state$participant_stroke_width <- participant_stroke_width + new_list$x$state$participant_stroke_opacity <- participant_stroke_opacity + new_list$x$state$participant_fill_opacity <- participant_fill_opacity + list_preset_participant_image <- c("runner", "swimmer", "cyclist", "custom", NULL) + if (!is.null(preset_participant_image)) { + if (!preset_participant_image %in% list_preset_participant_image) { + stop("`preset_participant_image` must be one of: c('runner', 'swimmer', 'cyclist', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"runner": "runner", "swimmer": "swimmer", "cyclist": "cyclist", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"runner": "runner", "swimmer": "swimmer", "cyclist": "cyclist", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && preset_participant_image %in% names(named_list)) { + if (is.logical(preset_participant_image)) { + preset_participant_image <- as.character(preset_participant_image) + } + named_list_value <- unname(named_list[preset_participant_image])[[1]] + new_list$x$state$preset_participant_image <- named_list_value + } + } + } + } + new_list$x$state$custom_participant_start_image <- custom_participant_start_image + new_list$x$state$custom_participant_race_image <- custom_participant_race_image + new_list$x$state$custom_participant_finish_image <- custom_participant_finish_image + list_image_initial_rotation <- c("0", "90", "180", "270", NULL) + if (!is.null(image_initial_rotation)) { + if (!image_initial_rotation %in% list_image_initial_rotation) { + stop("`image_initial_rotation` must be one of: c('0', '90', '180', '270')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "90": "90", "180": "180", "270": "270"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "90": "90", "180": "180", "270": "270"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_initial_rotation %in% names(named_list)) { + if (is.logical(image_initial_rotation)) { + image_initial_rotation <- as.character(image_initial_rotation) + } + named_list_value <- unname(named_list[image_initial_rotation])[[1]] + new_list$x$state$image_initial_rotation <- named_list_value + } + } + } + } + new_list$x$state$image_initial_flip_x <- image_initial_flip_x + new_list$x$state$image_initial_flip_y <- image_initial_flip_y + list_image_transform_mode <- c("rotate", "flip_x", "flip_y", "flip_both", "static", NULL) + if (!is.null(image_transform_mode)) { + if (!image_transform_mode %in% list_image_transform_mode) { + stop("`image_transform_mode` must be one of: c('rotate', 'flip_x', 'flip_y', 'flip_both', 'static')") + } else { + if (length(jsonlite::fromJSON('{"rotate": "rotate", "flip_x": "flip_x", "flip_y": "flip_y", "flip_both": "flip_both", "static": "static"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rotate": "rotate", "flip_x": "flip_x", "flip_y": "flip_y", "flip_both": "flip_both", "static": "static"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_transform_mode %in% names(named_list)) { + if (is.logical(image_transform_mode)) { + image_transform_mode <- as.character(image_transform_mode) + } + named_list_value <- unname(named_list[image_transform_mode])[[1]] + new_list$x$state$image_transform_mode <- named_list_value + } + } + } + } + new_list$x$state$participant_icon_recolor <- participant_icon_recolor + if (length(chart_participant_color_scale_categorical_palette) > 1) { + new_list$x$state$participant_color$categorical_palette <- paste(chart_participant_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$participant_color$categorical_palette <- chart_participant_color_scale_categorical_palette + } + + new_list$x$state$participant_color$categorical_extend <- chart_participant_color_scale_categorical_extend + if (length(chart_participant_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$participant_color$categorical_custom_palette <- paste(chart_participant_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$participant_color$categorical_custom_palette <- chart_participant_color_scale_categorical_custom_palette + } + + list_chart_participant_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_participant_color_scale_numeric_type)) { + if (!chart_participant_color_scale_numeric_type %in% list_chart_participant_color_scale_numeric_type) { + stop("`chart_participant_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_participant_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_participant_color_scale_numeric_type)) { + chart_participant_color_scale_numeric_type <- as.character(chart_participant_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_participant_color_scale_numeric_type])[[1]] + new_list$x$state$participant_color$numeric_type <- named_list_value + } + } + } + } + list_chart_participant_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_participant_color_scale_binning)) { + if (!chart_participant_color_scale_binning %in% list_chart_participant_color_scale_binning) { + stop("`chart_participant_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_participant_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_participant_color_scale_binning)) { + chart_participant_color_scale_binning <- as.character(chart_participant_color_scale_binning) + } + named_list_value <- unname(named_list[chart_participant_color_scale_binning])[[1]] + new_list$x$state$participant_color$binning <- named_list_value + } + } + } + } + list_chart_participant_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_participant_color_scale_bin_mode)) { + if (!chart_participant_color_scale_bin_mode %in% list_chart_participant_color_scale_bin_mode) { + stop("`chart_participant_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_participant_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_participant_color_scale_bin_mode)) { + chart_participant_color_scale_bin_mode <- as.character(chart_participant_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_participant_color_scale_bin_mode])[[1]] + new_list$x$state$participant_color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$participant_color$bin_count <- chart_participant_color_scale_bin_count + new_list$x$state$participant_color$bin_thresholds <- chart_participant_color_scale_bin_thresholds + new_list$x$state$participant_color$sequential_palette <- chart_participant_color_scale_sequential_palette + new_list$x$state$participant_color$sequential_reverse <- chart_participant_color_scale_sequential_reverse + new_list$x$state$participant_color$sequential_custom_min <- chart_participant_color_scale_sequential_custom_min + new_list$x$state$participant_color$sequential_custom_max <- chart_participant_color_scale_sequential_custom_max + list_chart_participant_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_participant_color_scale_sequential_color_space)) { + if (!chart_participant_color_scale_sequential_color_space %in% list_chart_participant_color_scale_sequential_color_space) { + stop("`chart_participant_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_participant_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_participant_color_scale_sequential_color_space)) { + chart_participant_color_scale_sequential_color_space <- as.character(chart_participant_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_participant_color_scale_sequential_color_space])[[1]] + new_list$x$state$participant_color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_participant_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_participant_color_scale_sequential_custom_domain)) { + if (!chart_participant_color_scale_sequential_custom_domain %in% list_chart_participant_color_scale_sequential_custom_domain) { + stop("`chart_participant_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_participant_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_participant_color_scale_sequential_custom_domain)) { + chart_participant_color_scale_sequential_custom_domain <- as.character(chart_participant_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_participant_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$participant_color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$participant_color$sequential_domain_min <- chart_participant_color_scale_sequential_domain_min + new_list$x$state$participant_color$sequential_domain_max <- chart_participant_color_scale_sequential_domain_max + new_list$x$state$participant_color$diverging_palette <- chart_participant_color_scale_diverging_palette + new_list$x$state$participant_color$diverging_reverse <- chart_participant_color_scale_diverging_reverse + new_list$x$state$participant_color$diverging_custom_min <- chart_participant_color_scale_diverging_custom_min + new_list$x$state$participant_color$diverging_custom_mid <- chart_participant_color_scale_diverging_custom_mid + new_list$x$state$participant_color$diverging_custom_max <- chart_participant_color_scale_diverging_custom_max + list_chart_participant_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_participant_color_scale_diverging_color_space)) { + if (!chart_participant_color_scale_diverging_color_space %in% list_chart_participant_color_scale_diverging_color_space) { + stop("`chart_participant_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_participant_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_participant_color_scale_diverging_color_space)) { + chart_participant_color_scale_diverging_color_space <- as.character(chart_participant_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_participant_color_scale_diverging_color_space])[[1]] + new_list$x$state$participant_color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_participant_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_participant_color_scale_diverging_custom_domain)) { + if (!chart_participant_color_scale_diverging_custom_domain %in% list_chart_participant_color_scale_diverging_custom_domain) { + stop("`chart_participant_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_participant_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_participant_color_scale_diverging_custom_domain)) { + chart_participant_color_scale_diverging_custom_domain <- as.character(chart_participant_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_participant_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$participant_color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$participant_color$diverging_domain_min <- chart_participant_color_scale_diverging_domain_min + new_list$x$state$participant_color$diverging_domain_mid <- chart_participant_color_scale_diverging_domain_mid + new_list$x$state$participant_color$diverging_domain_max <- chart_participant_color_scale_diverging_domain_max + list_camera_mode <- c("track", "leader", NULL) + if (!is.null(camera_mode)) { + if (!camera_mode %in% list_camera_mode) { + stop("`camera_mode` must be one of: c('track', 'leader')") + } else { + if (length(jsonlite::fromJSON('{"track": "track", "leader": "leader"}')) > 1) { + named_list <- jsonlite::fromJSON('{"track": "track", "leader": "leader"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && camera_mode %in% names(named_list)) { + if (is.logical(camera_mode)) { + camera_mode <- as.character(camera_mode) + } + named_list_value <- unname(named_list[camera_mode])[[1]] + new_list$x$state$camera_mode <- named_list_value + } + } + } + } + new_list$x$state$zoom <- zoom + list_checkpoint_mode <- c("laps", "splits", "custom", NULL) + if (!is.null(checkpoint_mode)) { + if (!checkpoint_mode %in% list_checkpoint_mode) { + stop("`checkpoint_mode` must be one of: c('laps', 'splits', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"laps": "laps", "splits": "splits", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"laps": "laps", "splits": "splits", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && checkpoint_mode %in% names(named_list)) { + if (is.logical(checkpoint_mode)) { + checkpoint_mode <- as.character(checkpoint_mode) + } + named_list_value <- unname(named_list[checkpoint_mode])[[1]] + new_list$x$state$checkpoint_mode <- named_list_value + } + } + } + } + if (length(checkpoints) > 1) { + new_list$x$state$checkpoints <- paste(checkpoints, collapse = "\n") + } else { + new_list$x$state$checkpoints <- checkpoints + } + + new_list$x$state$times_cumulative <- times_cumulative + list_participant_label_mode <- c("auto", "leader", "all", "custom", NULL) + if (!is.null(participant_label_mode)) { + if (!participant_label_mode %in% list_participant_label_mode) { + stop("`participant_label_mode` must be one of: c('auto', 'leader', 'all', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "leader": "leader", "all": "all", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "leader": "leader", "all": "all", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && participant_label_mode %in% names(named_list)) { + if (is.logical(participant_label_mode)) { + participant_label_mode <- as.character(participant_label_mode) + } + named_list_value <- unname(named_list[participant_label_mode])[[1]] + new_list$x$state$participant_label_mode <- named_list_value + } + } + } + } + if (length(participant_label_custom) > 1) { + new_list$x$state$participant_label_custom <- paste(participant_label_custom, collapse = "\n") + } else { + new_list$x$state$participant_label_custom <- participant_label_custom + } + + list_participant_label_position <- c("auto", "left", "right", NULL) + if (!is.null(participant_label_position)) { + if (!participant_label_position %in% list_participant_label_position) { + stop("`participant_label_position` must be one of: c('auto', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && participant_label_position %in% names(named_list)) { + if (is.logical(participant_label_position)) { + participant_label_position <- as.character(participant_label_position) + } + named_list_value <- unname(named_list[participant_label_position])[[1]] + new_list$x$state$participant_label_position <- named_list_value + } + } + } + } + new_list$x$state$participant_label_style <- participant_label_style + new_list$x$state$participant_label_color <- participant_label_color + new_list$x$state$participant_label_size <- participant_label_size + new_list$x$state$participant_label_stroke <- participant_label_stroke + new_list$x$state$participant_label_stroke_size <- participant_label_stroke_size + list_participant_label_weight <- c("400", "600", NULL) + if (!is.null(participant_label_weight)) { + if (!participant_label_weight %in% list_participant_label_weight) { + stop("`participant_label_weight` must be one of: c('400', '600')") + } else { + if (length(jsonlite::fromJSON('{"400": "400", "600": "600"}')) > 1) { + named_list <- jsonlite::fromJSON('{"400": "400", "600": "600"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && participant_label_weight %in% names(named_list)) { + if (is.logical(participant_label_weight)) { + participant_label_weight <- as.character(participant_label_weight) + } + named_list_value <- unname(named_list[participant_label_weight])[[1]] + new_list$x$state$participant_label_weight <- named_list_value + } + } + } + } + new_list$x$state$participant_highlight <- participant_highlight + new_list$x$state$participant_highlight_color <- participant_highlight_color + new_list$x$state$participant_highlight_width <- participant_highlight_width + list_label_position_enabled <- c(FALSE, TRUE, NULL) + if (!is.null(label_position_enabled)) { + if (!label_position_enabled %in% list_label_position_enabled) { + stop("`label_position_enabled` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_position_enabled %in% names(named_list)) { + if (is.logical(label_position_enabled)) { + label_position_enabled <- as.character(label_position_enabled) + } + named_list_value <- unname(named_list[label_position_enabled])[[1]] + new_list$x$state$label_position_enabled <- named_list_value + } + } + } + } + list_label_position_time <- c("always", "race", "finish", NULL) + if (!is.null(label_position_time)) { + if (!label_position_time %in% list_label_position_time) { + stop("`label_position_time` must be one of: c('always', 'race', 'finish')") + } else { + if (length(jsonlite::fromJSON('{"always": "always", "race": "race", "finish": "finish"}')) > 1) { + named_list <- jsonlite::fromJSON('{"always": "always", "race": "race", "finish": "finish"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_position_time %in% names(named_list)) { + if (is.logical(label_position_time)) { + label_position_time <- as.character(label_position_time) + } + named_list_value <- unname(named_list[label_position_time])[[1]] + new_list$x$state$label_position_time <- named_list_value + } + } + } + } + list_label_position_type <- c("current", "finish", NULL) + if (!is.null(label_position_type)) { + if (!label_position_type %in% list_label_position_type) { + stop("`label_position_type` must be one of: c('current', 'finish')") + } else { + if (length(jsonlite::fromJSON('{"current": "current", "finish": "finish"}')) > 1) { + named_list <- jsonlite::fromJSON('{"current": "current", "finish": "finish"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_position_type %in% names(named_list)) { + if (is.logical(label_position_type)) { + label_position_type <- as.character(label_position_type) + } + named_list_value <- unname(named_list[label_position_type])[[1]] + new_list$x$state$label_position_type <- named_list_value + } + } + } + } + list_label_medal_enabled <- c(FALSE, TRUE, NULL) + if (!is.null(label_medal_enabled)) { + if (!label_medal_enabled %in% list_label_medal_enabled) { + stop("`label_medal_enabled` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_medal_enabled %in% names(named_list)) { + if (is.logical(label_medal_enabled)) { + label_medal_enabled <- as.character(label_medal_enabled) + } + named_list_value <- unname(named_list[label_medal_enabled])[[1]] + new_list$x$state$label_medal_enabled <- named_list_value + } + } + } + } + list_label_medal_time <- c("always", "race", "finish", NULL) + if (!is.null(label_medal_time)) { + if (!label_medal_time %in% list_label_medal_time) { + stop("`label_medal_time` must be one of: c('always', 'race', 'finish')") + } else { + if (length(jsonlite::fromJSON('{"always": "always", "race": "race", "finish": "finish"}')) > 1) { + named_list <- jsonlite::fromJSON('{"always": "always", "race": "race", "finish": "finish"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_medal_time %in% names(named_list)) { + if (is.logical(label_medal_time)) { + label_medal_time <- as.character(label_medal_time) + } + named_list_value <- unname(named_list[label_medal_time])[[1]] + new_list$x$state$label_medal_time <- named_list_value + } + } + } + } + list_label_medal_type <- c("current", "finish", NULL) + if (!is.null(label_medal_type)) { + if (!label_medal_type %in% list_label_medal_type) { + stop("`label_medal_type` must be one of: c('current', 'finish')") + } else { + if (length(jsonlite::fromJSON('{"current": "current", "finish": "finish"}')) > 1) { + named_list <- jsonlite::fromJSON('{"current": "current", "finish": "finish"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_medal_type %in% names(named_list)) { + if (is.logical(label_medal_type)) { + label_medal_type <- as.character(label_medal_type) + } + named_list_value <- unname(named_list[label_medal_type])[[1]] + new_list$x$state$label_medal_type <- named_list_value + } + } + } + } + new_list$x$state$label_medal_replace_position <- label_medal_replace_position + list_label_finishing_time_enabled <- c(FALSE, TRUE, NULL) + if (!is.null(label_finishing_time_enabled)) { + if (!label_finishing_time_enabled %in% list_label_finishing_time_enabled) { + stop("`label_finishing_time_enabled` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_finishing_time_enabled %in% names(named_list)) { + if (is.logical(label_finishing_time_enabled)) { + label_finishing_time_enabled <- as.character(label_finishing_time_enabled) + } + named_list_value <- unname(named_list[label_finishing_time_enabled])[[1]] + new_list$x$state$label_finishing_time_enabled <- named_list_value + } + } + } + } + list_label_finishing_time_time <- c("always", "finish", NULL) + if (!is.null(label_finishing_time_time)) { + if (!label_finishing_time_time %in% list_label_finishing_time_time) { + stop("`label_finishing_time_time` must be one of: c('always', 'finish')") + } else { + if (length(jsonlite::fromJSON('{"always": "always", "finish": "finish"}')) > 1) { + named_list <- jsonlite::fromJSON('{"always": "always", "finish": "finish"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_finishing_time_time %in% names(named_list)) { + if (is.logical(label_finishing_time_time)) { + label_finishing_time_time <- as.character(label_finishing_time_time) + } + named_list_value <- unname(named_list[label_finishing_time_time])[[1]] + new_list$x$state$label_finishing_time_time <- named_list_value + } + } + } + } + list_participant_stacking <- c("sheet_order", "rank", "y_position", NULL) + if (!is.null(participant_stacking)) { + if (!participant_stacking %in% list_participant_stacking) { + stop("`participant_stacking` must be one of: c('sheet_order', 'rank', 'y_position')") + } else { + if (length(jsonlite::fromJSON('{"sheet_order": "sheet_order", "rank": "rank", "y_position": "y_position"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sheet_order": "sheet_order", "rank": "rank", "y_position": "y_position"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && participant_stacking %in% names(named_list)) { + if (is.logical(participant_stacking)) { + participant_stacking <- as.character(participant_stacking) + } + named_list_value <- unname(named_list[participant_stacking])[[1]] + new_list$x$state$participant_stacking <- named_list_value + } + } + } + } + list_chart_timeline_controls_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_timeline_controls_enabled)) { + if (!chart_timeline_controls_enabled %in% list_chart_timeline_controls_enabled) { + stop("`chart_timeline_controls_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_timeline_controls_enabled %in% names(named_list)) { + if (is.logical(chart_timeline_controls_enabled)) { + chart_timeline_controls_enabled <- as.character(chart_timeline_controls_enabled) + } + named_list_value <- unname(named_list[chart_timeline_controls_enabled])[[1]] + new_list$x$state$timeline$enabled <- named_list_value + } + } + } + } + list_chart_timeline_controls_style <- c("timeline", "button", NULL) + if (!is.null(chart_timeline_controls_style)) { + if (!chart_timeline_controls_style %in% list_chart_timeline_controls_style) { + stop("`chart_timeline_controls_style` must be one of: c('timeline', 'button')") + } else { + if (length(jsonlite::fromJSON('{"timeline": "timeline", "button": "button"}')) > 1) { + named_list <- jsonlite::fromJSON('{"timeline": "timeline", "button": "button"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_timeline_controls_style %in% names(named_list)) { + if (is.logical(chart_timeline_controls_style)) { + chart_timeline_controls_style <- as.character(chart_timeline_controls_style) + } + named_list_value <- unname(named_list[chart_timeline_controls_style])[[1]] + new_list$x$state$timeline$style <- named_list_value + } + } + } + } + list_chart_timeline_controls_graph <- c(TRUE, FALSE, NULL) + if (!is.null(chart_timeline_controls_graph)) { + if (!chart_timeline_controls_graph %in% list_chart_timeline_controls_graph) { + stop("`chart_timeline_controls_graph` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_timeline_controls_graph %in% names(named_list)) { + if (is.logical(chart_timeline_controls_graph)) { + chart_timeline_controls_graph <- as.character(chart_timeline_controls_graph) + } + named_list_value <- unname(named_list[chart_timeline_controls_graph])[[1]] + new_list$x$state$timeline$graph <- named_list_value + } + } + } + } + new_list$x$state$timeline$play_on_load <- chart_timeline_controls_play_on_load + new_list$x$state$timeline$loop <- chart_timeline_controls_loop + new_list$x$state$timeline$duration <- chart_timeline_controls_duration + new_list$x$state$timeline$duration_tween <- chart_timeline_controls_duration_tween + new_list$x$state$timeline$duration_wait_at_end <- chart_timeline_controls_duration_wait_at_end + new_list$x$state$timeline$axes_custom_enabled <- chart_timeline_controls_axes_custom_enabled + new_list$x$state$timeline$color_axes <- chart_timeline_controls_color_axes + new_list$x$state$timeline$axis_font_size <- chart_timeline_controls_axis_font_size + list_chart_timeline_controls_date_format_display <- c("", "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d", "%m/%d/%Y", "%d/%m/%Y", "%d-%b-%y", "%m/%Y", "%b %Y", "%b %y", "%B %d", "%d %b", "%Y", "%B", "%b", "%A", "%a", "%H:%M:%S", "%I:%M %p", "%H:%M", NULL) + if (!is.null(chart_timeline_controls_date_format_display)) { + if (!chart_timeline_controls_date_format_display %in% list_chart_timeline_controls_date_format_display) { + stop("`chart_timeline_controls_date_format_display` must be one of: c('', '%Y-%m-%dT%H:%M:%S.%LZ', '%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%d-%b-%y', '%m/%Y', '%b %Y', '%b %y', '%B %d', '%d %b', '%Y', '%B', '%b', '%A', '%a', '%H:%M:%S', '%I:%M %p', '%H:%M')") + } else { + if (length(jsonlite::fromJSON('{"": "", "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d": "%Y-%m-%d", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%d-%b-%y": "%d-%b-%y", "%m/%Y": "%m/%Y", "%b %Y": "%b %Y", "%b %y": "%b %y", "%B %d": "%B %d", "%d %b": "%d %b", "%Y": "%Y", "%B": "%B", "%b": "%b", "%A": "%A", "%a": "%a", "%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M"}')) > 1) { + named_list <- jsonlite::fromJSON('{"": "", "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", "%Y-%m-%d": "%Y-%m-%d", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%d-%b-%y": "%d-%b-%y", "%m/%Y": "%m/%Y", "%b %Y": "%b %Y", "%b %y": "%b %y", "%B %d": "%B %d", "%d %b": "%d %b", "%Y": "%Y", "%B": "%B", "%b": "%b", "%A": "%A", "%a": "%a", "%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_timeline_controls_date_format_display %in% names(named_list)) { + if (is.logical(chart_timeline_controls_date_format_display)) { + chart_timeline_controls_date_format_display <- as.character(chart_timeline_controls_date_format_display) + } + named_list_value <- unname(named_list[chart_timeline_controls_date_format_display])[[1]] + new_list$x$state$timeline$date_format_display <- named_list_value + } + } + } + } + new_list$x$state$timeline$axis_nice_x <- chart_timeline_controls_axis_nice_x + new_list$x$state$timeline$axis_nice_y <- chart_timeline_controls_axis_nice_y + new_list$x$state$timeline$scrubber_snap <- chart_timeline_controls_scrubber_snap + new_list$x$state$timeline$scrubber_snap_paused <- chart_timeline_controls_scrubber_snap_paused + new_list$x$state$timeline$layout_settings <- chart_timeline_controls_layout_settings + new_list$x$state$timeline$margin$top <- chart_timeline_controls_margin_top + new_list$x$state$timeline$margin$left <- chart_timeline_controls_margin_left + new_list$x$state$timeline$margin$bottom <- chart_timeline_controls_margin_bottom + new_list$x$state$timeline$margin$right <- chart_timeline_controls_margin_right + new_list$x$state$timeline$playback_button$margin_right <- chart_timeline_controls_playback_button_margin_right + new_list$x$state$timeline$scrubber_height <- chart_timeline_controls_scrubber_height + new_list$x$state$timeline$playback_button$margin_right_button <- chart_timeline_controls_playback_button_margin_right_button + new_list$x$state$timeline$graph_settings <- chart_timeline_controls_graph_settings + new_list$x$state$timeline$color_background <- chart_timeline_controls_color_background + new_list$x$state$timeline$graph_height <- chart_timeline_controls_graph_height + new_list$x$state$timeline$curve <- chart_timeline_controls_curve + new_list$x$state$timeline$playback_styling <- chart_timeline_controls_playback_styling + new_list$x$state$timeline$playback_button$button_color <- chart_timeline_controls_playback_button_button_color + new_list$x$state$timeline$playback_button$button_size <- chart_timeline_controls_playback_button_button_size + new_list$x$state$timeline$playback_button$icon_color <- chart_timeline_controls_playback_button_icon_color + new_list$x$state$timeline$playback_button$icon_size <- chart_timeline_controls_playback_button_icon_size + new_list$x$state$timeline$playback_button$label_size <- chart_timeline_controls_playback_button_label_size + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_survey_details.R b/R_package/R/set_survey_details.R new file mode 100644 index 0000000..b3557ad --- /dev/null +++ b/R_package/R/set_survey_details.R @@ -0,0 +1,3561 @@ +#' Set survey chart details +#' @name set_survey_details +#' @param dot_fill Default color. If left blank, the first color in the color palette will be used. Flourish type hint: color, defaults to `NULL` +#' @param dot_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param dot_opacity_unhighlighted Opacity (unhighlighted). The opacity of the unhighlighted dots when one of the dots is highlighted. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Color when shading. The colors to use when shading by the answer to a questions. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the name of the category that you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26) Note that overrides from the "Color overrides" sheet take priority over the overrides in this setting. Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param dot_shape Shape. Choices: circle, square, polygon. Flourish type hint: string, defaults to `NULL` +#' @param dot_sides Sides. Flourish type hint: number, defaults to `NULL` +#' @param outline_width Stroke width. In pixels. The width of the outline stroke. Flourish type hint: number, defaults to `NULL` +#' @param outline_color Stroke color. Outline color for your dots/squares/polygons. If not set, the layout background color will be used. Flourish type hint: color, defaults to `NULL` +#' @param dot_label Default label or emoji. A label or emoji to show on each dot. Overriden by any label specified using the Label column setting. Flourish type hint: string, defaults to `NULL` +#' @param dot_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param dot_label_bold Bold. Flourish type hint: boolean, defaults to `NULL` +#' @param dot_label_min Min size to display. The minimum text size in pixels for dot labels. Below this level they will not render. Flourish type hint: number, defaults to `NULL` +#' @param dot_label_auto_size Sizing mode. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param dot_label_fixed Size in %. Specifies font size across the graphic as a percentage of dot height. Flourish type hint: number, defaults to `NULL` +#' @param dot_label_scale Scale. Scales the labels up or down from their default size. Flourish type hint: number, defaults to `NULL` +#' @param dot_label_size_value Show numerical value when sizing dots. Flourish type hint: boolean, defaults to `NULL` +#' @param all_group_label Name for "all" group. Flourish type hint: string, defaults to `NULL` +#' @param include_grouped_questions_on_shade_menu Include grouped questions on shading menu. Flourish type hint: boolean, defaults to `NULL` +#' @param include_grouped_questions_on_compare_menu Include grouped questions on compare menu. Flourish type hint: boolean, defaults to `NULL` +#' @param order_groups_by_size Order groups by size. Flourish type hint: boolean, defaults to `NULL` +#' @param order_groups_by_size_mode Choices: ascending, descending. Flourish type hint: string, defaults to `NULL` +#' @param group_colors Arrange groups by color. If selected, dots of the same color are grouped together; if not the dots are placed in spreadsheet order. Flourish type hint: boolean, defaults to `NULL` +#' @param exclusions Exclude groups with the following names. Case-sensitive comma-separated list. Flourish type hint: string, defaults to `NULL` +#' @param exclude_blanks Exclude groups with blank names. Flourish type hint: boolean, defaults to `NULL` +#' @param bundle_small_groups Bundle small groups. Flourish type hint: boolean, defaults to `NULL` +#' @param small_groups_threshold Min size. Flourish type hint: number, defaults to `NULL` +#' @param small_groups_other_label "Other" group label. Flourish type hint: string, defaults to `NULL` +#' @param label_mode Label position. Choices: atop, around, above. Flourish type hint: string, defaults to `NULL` +#' @param label_tight_fit Position close to group. Flourish type hint: boolean, defaults to `NULL` +#' @param label_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param label_min_font_size Min font size. In pixels; the actual font size in any view is set automatically between the min and max. Flourish type hint: number, defaults to `NULL` +#' @param label_max_font_size Max font size. In pixels; the actual font size in any view is set automatically between the min and max. Flourish type hint: number, defaults to `NULL` +#' @param label_group_padding_lines Space for labels. The amount of space to leave above the groups, specified in lines of text. Flourish type hint: number, defaults to `NULL` +#' @param label_shadow_size Size. As percent of font size. Flourish type hint: number, defaults to `NULL` +#' @param label_shadow_color Color. Flourish type hint: color, defaults to `NULL` +#' @param label_group_count Show number of dots in group. Adds the number in brackets after the main label; ignored in chart, map and compare modes. Flourish type hint: boolean, defaults to `NULL` +#' @param label_group_percent Show group size as % of visible dots. Adds group size as a percent of visible dots, in brackets after the main label. This setting is ignored in chart, map and compare modes and when showing a grouped question. Flourish type hint: boolean, defaults to `NULL` +#' @param label_group_percent_decimals Decimal places on percentage labels. Flourish type hint: number, defaults to `NULL` +#' @param always_show_x_label Show X label when not comparing. Show the groups label at the bottom of chart when not comparing two metrics. Flourish type hint: boolean, defaults to `NULL` +#' @param show_xy_axis_labels_when_comparing Show X/Y labels when comparing. Show groups labels on both axes when comparing two metrics. Flourish type hint: boolean, defaults to `NULL` +#' @param compare_y_axis_width Y axis width. Flourish type hint: number, defaults to `NULL` +#' @param compare_x_axis_height X axis height. Flourish type hint: number, defaults to `NULL` +#' @param chart_height_mode Height mode. Choices: auto, aspect_ratio. How the graphic height will be set when embedded with the responsive script embed without a specified height. Flourish type hint: string, defaults to `NULL` +#' @param chart_aspect_ratio_wide Desktop. The chart aspect ratio on screens 640 pixels wide and higher (1 for square - a smaller value means a bigger height). Flourish type hint: number, defaults to `NULL` +#' @param chart_aspect_ratio_narrow Mobile. The chart aspect ratio on screens narrower than 640 pixels (1 for square - a smaller value means a bigger height). Flourish type hint: number, defaults to `NULL` +#' @param map_opacity_map_mode Map opacity (in map mode). Flourish type hint: number, defaults to `NULL` +#' @param map_opacity_non_map_mode Map opacity (in other modes). Flourish type hint: number, defaults to `NULL` +#' @param map_max_group_size Max group size in map view. In relative units. Flourish type hint: number, defaults to `NULL` +#' @param map_dimensions Map dimensions. Choices: auto, aspect_ratio. Flourish type hint: string, defaults to `NULL` +#' @param map_aspect_ratio Map aspect ratio. Aspect ratio of the map. 1 will make the map square. Flourish type hint: number, defaults to `NULL` +#' @param map_region Region. Choices: world, usa, europe, custom. Flourish type hint: string, defaults to `NULL` +#' @param map_region_url Url to equirectangular projection of map. Flourish type hint: url, defaults to `NULL` +#' @param map_region_bounds_x1 Minimum longitude. Flourish type hint: number, defaults to `NULL` +#' @param map_region_bounds_x2 Maximum longitude. Flourish type hint: number, defaults to `NULL` +#' @param map_region_bounds_y2 Minimum latitude. Flourish type hint: number, defaults to `NULL` +#' @param map_region_bounds_y1 Maximum latitude. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param panel_background_color Background. Flourish type hint: color, defaults to `NULL` +#' @param panel_background_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param panel_text_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param panel_icon_color Icon color. Choices: light, dark. Flourish type hint: string, defaults to `NULL` +#' @param panel_width Panel width. Width of the controls panels on wide screens, ignored on mobile. Flourish type hint: number, defaults to `NULL` +#' @param panel_cog_color Cog icon color. Flourish type hint: color, defaults to `NULL` +#' @param panel_overlay Overlay panel over graphic. Flourish type hint: boolean, defaults to `NULL` +#' @param panel_hide_cog Disable controls toggle in published graphic. When checked, the controls icon for showing/ hiding the controls panel is visible only in the visualization and story editors not in the published visualization or story. When making a story, you can still lock the panel to be visible or hidden by clicking the cog icon in the story editor. Flourish type hint: boolean, defaults to `NULL` +#' @param select_group_show Group menu. Populated by all category columns. Flourish type hint: boolean, defaults to `NULL` +#' @param select_color_show Color menu. Populated by all category columns. Flourish type hint: boolean, defaults to `NULL` +#' @param select_size_show Size menu. Populated by all continuous number columns. Flourish type hint: boolean, defaults to `NULL` +#' @param select_compare_show Compare menu. Populated by all category columns; appears only when Group by is selected. Flourish type hint: boolean, defaults to `NULL` +#' @param histogram_show Bar mode. Flourish type hint: boolean, defaults to `NULL` +#' @param select_group_text Group by. Flourish type hint: string, defaults to `NULL` +#' @param select_color_text Shade by. Flourish type hint: string, defaults to `NULL` +#' @param select_size_text Size by. Flourish type hint: string, defaults to `NULL` +#' @param select_compare_text Compare. Flourish type hint: string, defaults to `NULL` +#' @param select_filter_text Filter. Flourish type hint: string, defaults to `NULL` +#' @param select_map_text Group location. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_type Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_control_styles Adv. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_control_title Control title. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group Grouped. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_mode Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_button_group_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_mode Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_filter_controls_dropdown_width_fixed Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_width Slider width. Width of the slider track in rems Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_max_label_width Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_step_time Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_slider_loop Loop. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_filter_controls_slider_restart_pause Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to `NULL` +#' @param chart_filter_controls_sort Sorting. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param column_filter_show_all Include "All" in slider/menu. Flourish type hint: boolean, defaults to `NULL` +#' @param column_filter_show_all_label Label for All. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_controls_style_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_controls_style_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_background_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_selected Selected. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_font_color_hover Mouse over. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_button_styles_advanced Button border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_button_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_button_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_button_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_track_color Track. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_font_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_handle_color Handle. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_play_color Play/pause. Flourish type hint: color, defaults to `NULL` +#' @param chart_slider_control_style_track_height Track height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_handle_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_slider_control_style_play_button Play button. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_styles_advanced Dropdown border styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_dropdown_control_style_border_style Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_dropdown_control_style_border_width Border width. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_dropdown_control_style_border_transparency Transparency. Flourish type hint: number, defaults to `NULL` +#' @param chart_dropdown_control_style_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param legend_position Position. Choices: above, below. Flourish type hint: string, defaults to `NULL` +#' @param legend_hide_space Remove space when empty. Turn off to avoid the legend taking up space when empty. Leave on to avoid the graphic jumping up and down a little when the legend is revealed or hidden. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param zoom_on_double_click Zoom on double click. Flourish type hint: boolean, defaults to `NULL` +#' @param zoom_on_mousewheel Zoom on pinch/mousewheel. Flourish type hint: boolean, defaults to `NULL` +#' @param transition_duration Duration. Time in milliseconds of each dots animation. Flourish type hint: number, defaults to `NULL` +#' @param transition_stagger Stagger. The spread of time over which the dots start animating. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "survey", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_survey_data(gapminder) |> +#' set_survey_details() +#' ) +#' @export + +set_survey_details <- function( + ., + dot_fill = NULL, + dot_opacity = NULL, + dot_opacity_unhighlighted = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + dot_shape = NULL, + dot_sides = NULL, + outline_width = NULL, + outline_color = NULL, + dot_label = NULL, + dot_label_color = NULL, + dot_label_bold = NULL, + dot_label_min = NULL, + dot_label_auto_size = NULL, + dot_label_fixed = NULL, + dot_label_scale = NULL, + dot_label_size_value = NULL, + all_group_label = NULL, + include_grouped_questions_on_shade_menu = NULL, + include_grouped_questions_on_compare_menu = NULL, + order_groups_by_size = NULL, + order_groups_by_size_mode = NULL, + group_colors = NULL, + exclusions = NULL, + exclude_blanks = NULL, + bundle_small_groups = NULL, + small_groups_threshold = NULL, + small_groups_other_label = NULL, + label_mode = NULL, + label_tight_fit = NULL, + label_color = NULL, + label_min_font_size = NULL, + label_max_font_size = NULL, + label_group_padding_lines = NULL, + label_shadow_size = NULL, + label_shadow_color = NULL, + label_group_count = NULL, + label_group_percent = NULL, + label_group_percent_decimals = NULL, + always_show_x_label = NULL, + show_xy_axis_labels_when_comparing = NULL, + compare_y_axis_width = NULL, + compare_x_axis_height = NULL, + chart_height_mode = NULL, + chart_aspect_ratio_wide = NULL, + chart_aspect_ratio_narrow = NULL, + map_opacity_map_mode = NULL, + map_opacity_non_map_mode = NULL, + map_max_group_size = NULL, + map_dimensions = NULL, + map_aspect_ratio = NULL, + map_region = NULL, + map_region_url = NULL, + map_region_bounds_x1 = NULL, + map_region_bounds_x2 = NULL, + map_region_bounds_y2 = NULL, + map_region_bounds_y1 = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + panel_background_color = NULL, + panel_background_opacity = NULL, + panel_text_color = NULL, + panel_text_size = NULL, + panel_icon_color = NULL, + panel_width = NULL, + panel_cog_color = NULL, + panel_overlay = NULL, + panel_hide_cog = NULL, + select_group_show = NULL, + select_color_show = NULL, + select_size_show = NULL, + select_compare_show = NULL, + histogram_show = NULL, + select_group_text = NULL, + select_color_text = NULL, + select_size_text = NULL, + select_compare_text = NULL, + select_filter_text = NULL, + select_map_text = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + column_filter_show_all = NULL, + column_filter_show_all_label = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_position = NULL, + legend_hide_space = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + zoom_on_double_click = NULL, + zoom_on_mousewheel = NULL, + transition_duration = NULL, + transition_stagger = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "survey") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/survey")) { + stop("`set_survey_details()` is not supported for this chart type.") + } + new_list$x$state$dot_fill <- dot_fill + new_list$x$state$dot_opacity <- dot_opacity + new_list$x$state$dot_opacity_unhighlighted <- dot_opacity_unhighlighted + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + list_dot_shape <- c("circle", "square", "polygon", NULL) + if (!is.null(dot_shape)) { + if (!dot_shape %in% list_dot_shape) { + stop("`dot_shape` must be one of: c('circle', 'square', 'polygon')") + } else { + if (length(jsonlite::fromJSON('{"circle": "circle", "square": "square", "polygon": "polygon"}')) > 1) { + named_list <- jsonlite::fromJSON('{"circle": "circle", "square": "square", "polygon": "polygon"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && dot_shape %in% names(named_list)) { + if (is.logical(dot_shape)) { + dot_shape <- as.character(dot_shape) + } + named_list_value <- unname(named_list[dot_shape])[[1]] + new_list$x$state$dot_shape <- named_list_value + } + } + } + } + new_list$x$state$dot_sides <- dot_sides + new_list$x$state$outline_width <- outline_width + new_list$x$state$outline_color <- outline_color + new_list$x$state$dot_label <- dot_label + new_list$x$state$dot_label_color <- dot_label_color + new_list$x$state$dot_label_bold <- dot_label_bold + new_list$x$state$dot_label_min <- dot_label_min + list_dot_label_auto_size <- c(TRUE, FALSE, NULL) + if (!is.null(dot_label_auto_size)) { + if (!dot_label_auto_size %in% list_dot_label_auto_size) { + stop("`dot_label_auto_size` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && dot_label_auto_size %in% names(named_list)) { + if (is.logical(dot_label_auto_size)) { + dot_label_auto_size <- as.character(dot_label_auto_size) + } + named_list_value <- unname(named_list[dot_label_auto_size])[[1]] + new_list$x$state$dot_label_auto_size <- named_list_value + } + } + } + } + new_list$x$state$dot_label_fixed <- dot_label_fixed + new_list$x$state$dot_label_scale <- dot_label_scale + new_list$x$state$dot_label_size_value <- dot_label_size_value + new_list$x$state$all_group_label <- all_group_label + new_list$x$state$include_grouped_questions_on_shade_menu <- include_grouped_questions_on_shade_menu + new_list$x$state$include_grouped_questions_on_compare_menu <- include_grouped_questions_on_compare_menu + new_list$x$state$order_groups_by_size <- order_groups_by_size + list_order_groups_by_size_mode <- c("ascending", "descending", NULL) + if (!is.null(order_groups_by_size_mode)) { + if (!order_groups_by_size_mode %in% list_order_groups_by_size_mode) { + stop("`order_groups_by_size_mode` must be one of: c('ascending', 'descending')") + } else { + if (length(jsonlite::fromJSON('{"ascending": "ascending", "descending": "descending"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ascending": "ascending", "descending": "descending"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && order_groups_by_size_mode %in% names(named_list)) { + if (is.logical(order_groups_by_size_mode)) { + order_groups_by_size_mode <- as.character(order_groups_by_size_mode) + } + named_list_value <- unname(named_list[order_groups_by_size_mode])[[1]] + new_list$x$state$order_groups_by_size_mode <- named_list_value + } + } + } + } + new_list$x$state$group_colors <- group_colors + new_list$x$state$exclusions <- exclusions + new_list$x$state$exclude_blanks <- exclude_blanks + new_list$x$state$bundle_small_groups <- bundle_small_groups + new_list$x$state$small_groups_threshold <- small_groups_threshold + new_list$x$state$small_groups_other_label <- small_groups_other_label + list_label_mode <- c("atop", "around", "above", NULL) + if (!is.null(label_mode)) { + if (!label_mode %in% list_label_mode) { + stop("`label_mode` must be one of: c('atop', 'around', 'above')") + } else { + if (length(jsonlite::fromJSON('{"atop": "atop", "around": "around", "above": "above"}')) > 1) { + named_list <- jsonlite::fromJSON('{"atop": "atop", "around": "around", "above": "above"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && label_mode %in% names(named_list)) { + if (is.logical(label_mode)) { + label_mode <- as.character(label_mode) + } + named_list_value <- unname(named_list[label_mode])[[1]] + new_list$x$state$label_mode <- named_list_value + } + } + } + } + new_list$x$state$label_tight_fit <- label_tight_fit + new_list$x$state$label_color <- label_color + new_list$x$state$label_min_font_size <- label_min_font_size + new_list$x$state$label_max_font_size <- label_max_font_size + new_list$x$state$label_group_padding_lines <- label_group_padding_lines + new_list$x$state$label_shadow_size <- label_shadow_size + new_list$x$state$label_shadow_color <- label_shadow_color + new_list$x$state$label_group_count <- label_group_count + new_list$x$state$label_group_percent <- label_group_percent + new_list$x$state$label_group_percent_decimals <- label_group_percent_decimals + new_list$x$state$always_show_x_label <- always_show_x_label + new_list$x$state$show_xy_axis_labels_when_comparing <- show_xy_axis_labels_when_comparing + new_list$x$state$compare_y_axis_width <- compare_y_axis_width + new_list$x$state$compare_x_axis_height <- compare_x_axis_height + list_chart_height_mode <- c("auto", "aspect_ratio", NULL) + if (!is.null(chart_height_mode)) { + if (!chart_height_mode %in% list_chart_height_mode) { + stop("`chart_height_mode` must be one of: c('auto', 'aspect_ratio')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "aspect_ratio": "aspect_ratio"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "aspect_ratio": "aspect_ratio"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_height_mode %in% names(named_list)) { + if (is.logical(chart_height_mode)) { + chart_height_mode <- as.character(chart_height_mode) + } + named_list_value <- unname(named_list[chart_height_mode])[[1]] + new_list$x$state$chart_height_mode <- named_list_value + } + } + } + } + new_list$x$state$chart_aspect_ratio_wide <- chart_aspect_ratio_wide + new_list$x$state$chart_aspect_ratio_narrow <- chart_aspect_ratio_narrow + new_list$x$state$map_opacity_map_mode <- map_opacity_map_mode + new_list$x$state$map_opacity_non_map_mode <- map_opacity_non_map_mode + new_list$x$state$map_max_group_size <- map_max_group_size + list_map_dimensions <- c("auto", "aspect_ratio", NULL) + if (!is.null(map_dimensions)) { + if (!map_dimensions %in% list_map_dimensions) { + stop("`map_dimensions` must be one of: c('auto', 'aspect_ratio')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "aspect_ratio": "aspect_ratio"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "aspect_ratio": "aspect_ratio"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && map_dimensions %in% names(named_list)) { + if (is.logical(map_dimensions)) { + map_dimensions <- as.character(map_dimensions) + } + named_list_value <- unname(named_list[map_dimensions])[[1]] + new_list$x$state$map_dimensions <- named_list_value + } + } + } + } + new_list$x$state$map_aspect_ratio <- map_aspect_ratio + list_map_region <- c("world", "usa", "europe", "custom", NULL) + if (!is.null(map_region)) { + if (!map_region %in% list_map_region) { + stop("`map_region` must be one of: c('world', 'usa', 'europe', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"world": "world", "usa": "usa", "europe": "europe", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"world": "world", "usa": "usa", "europe": "europe", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && map_region %in% names(named_list)) { + if (is.logical(map_region)) { + map_region <- as.character(map_region) + } + named_list_value <- unname(named_list[map_region])[[1]] + new_list$x$state$map_region <- named_list_value + } + } + } + } + new_list$x$state$map_region_url <- map_region_url + new_list$x$state$map_region_bounds$x1 <- map_region_bounds_x1 + new_list$x$state$map_region_bounds$x2 <- map_region_bounds_x2 + new_list$x$state$map_region_bounds$y2 <- map_region_bounds_y2 + new_list$x$state$map_region_bounds$y1 <- map_region_bounds_y1 + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + new_list$x$state$panel_background_color <- panel_background_color + new_list$x$state$panel_background_opacity <- panel_background_opacity + new_list$x$state$panel_text_color <- panel_text_color + new_list$x$state$panel_text_size <- panel_text_size + list_panel_icon_color <- c("light", "dark", NULL) + if (!is.null(panel_icon_color)) { + if (!panel_icon_color %in% list_panel_icon_color) { + stop("`panel_icon_color` must be one of: c('light', 'dark')") + } else { + if (length(jsonlite::fromJSON('{"light": "light", "dark": "dark"}')) > 1) { + named_list <- jsonlite::fromJSON('{"light": "light", "dark": "dark"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && panel_icon_color %in% names(named_list)) { + if (is.logical(panel_icon_color)) { + panel_icon_color <- as.character(panel_icon_color) + } + named_list_value <- unname(named_list[panel_icon_color])[[1]] + new_list$x$state$panel_icon_color <- named_list_value + } + } + } + } + new_list$x$state$panel_width <- panel_width + new_list$x$state$panel_cog_color <- panel_cog_color + new_list$x$state$panel_overlay <- panel_overlay + new_list$x$state$panel_hide_cog <- panel_hide_cog + new_list$x$state$select_group_show <- select_group_show + new_list$x$state$select_color_show <- select_color_show + new_list$x$state$select_size_show <- select_size_show + new_list$x$state$select_compare_show <- select_compare_show + new_list$x$state$histogram_show <- histogram_show + new_list$x$state$select_group_text <- select_group_text + new_list$x$state$select_color_text <- select_color_text + new_list$x$state$select_size_text <- select_size_text + new_list$x$state$select_compare_text <- select_compare_text + new_list$x$state$select_filter_text <- select_filter_text + new_list$x$state$select_map_text <- select_map_text + list_chart_filter_controls_control_type <- c("dropdown", "buttons", "slider", NULL) + if (!is.null(chart_filter_controls_control_type)) { + if (!chart_filter_controls_control_type %in% list_chart_filter_controls_control_type) { + stop("`chart_filter_controls_control_type` must be one of: c('dropdown', 'buttons', 'slider')") + } else { + if (length(jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}')) > 1) { + named_list <- jsonlite::fromJSON('{"dropdown": "dropdown", "buttons": "buttons", "slider": "slider"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_control_type %in% names(named_list)) { + if (is.logical(chart_filter_controls_control_type)) { + chart_filter_controls_control_type <- as.character(chart_filter_controls_control_type) + } + named_list_value <- unname(named_list[chart_filter_controls_control_type])[[1]] + new_list$x$state$controls_filter$control_type <- named_list_value + } + } + } + } + new_list$x$state$controls_filter$control_styles <- chart_filter_controls_control_styles + new_list$x$state$controls_filter$control_title <- chart_filter_controls_control_title + list_chart_filter_controls_button_group <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_button_group)) { + if (!chart_filter_controls_button_group %in% list_chart_filter_controls_button_group) { + stop("`chart_filter_controls_button_group` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group)) { + chart_filter_controls_button_group <- as.character(chart_filter_controls_button_group) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group])[[1]] + new_list$x$state$controls_filter$button_group <- named_list_value + } + } + } + } + list_chart_filter_controls_button_group_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_button_group_width_mode)) { + if (!chart_filter_controls_button_group_width_mode %in% list_chart_filter_controls_button_group_width_mode) { + stop("`chart_filter_controls_button_group_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_button_group_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_button_group_width_mode)) { + chart_filter_controls_button_group_width_mode <- as.character(chart_filter_controls_button_group_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_button_group_width_mode])[[1]] + new_list$x$state$controls_filter$button_group_width_mode <- named_list_value + } + } + } + } + new_list$x$state$controls_filter$button_group_width_fixed <- chart_filter_controls_button_group_width_fixed + list_chart_filter_controls_dropdown_width_mode <- c("auto", "full", "fixed", NULL) + if (!is.null(chart_filter_controls_dropdown_width_mode)) { + if (!chart_filter_controls_dropdown_width_mode %in% list_chart_filter_controls_dropdown_width_mode) { + stop("`chart_filter_controls_dropdown_width_mode` must be one of: c('auto', 'full', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "full": "full", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_dropdown_width_mode %in% names(named_list)) { + if (is.logical(chart_filter_controls_dropdown_width_mode)) { + chart_filter_controls_dropdown_width_mode <- as.character(chart_filter_controls_dropdown_width_mode) + } + named_list_value <- unname(named_list[chart_filter_controls_dropdown_width_mode])[[1]] + new_list$x$state$controls_filter$dropdown_width_mode <- named_list_value + } + } + } + } + new_list$x$state$controls_filter$dropdown_width_fixed <- chart_filter_controls_dropdown_width_fixed + new_list$x$state$controls_filter$slider_width <- chart_filter_controls_slider_width + new_list$x$state$controls_filter$slider_max_label_width <- chart_filter_controls_slider_max_label_width + new_list$x$state$controls_filter$slider_step_time <- chart_filter_controls_slider_step_time + new_list$x$state$controls_filter$slider_loop <- chart_filter_controls_slider_loop + new_list$x$state$controls_filter$slider_restart_pause <- chart_filter_controls_slider_restart_pause + list_chart_filter_controls_sort <- c(TRUE, FALSE, NULL) + if (!is.null(chart_filter_controls_sort)) { + if (!chart_filter_controls_sort %in% list_chart_filter_controls_sort) { + stop("`chart_filter_controls_sort` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_filter_controls_sort %in% names(named_list)) { + if (is.logical(chart_filter_controls_sort)) { + chart_filter_controls_sort <- as.character(chart_filter_controls_sort) + } + named_list_value <- unname(named_list[chart_filter_controls_sort])[[1]] + new_list$x$state$controls_filter$sort <- named_list_value + } + } + } + } + new_list$x$state$column_filter_show_all <- column_filter_show_all + new_list$x$state$column_filter_show_all_label <- column_filter_show_all_label + new_list$x$state$controls_style$font_size <- chart_controls_style_font_size + list_chart_controls_style_font_weight <- c("bold", "normal", NULL) + if (!is.null(chart_controls_style_font_weight)) { + if (!chart_controls_style_font_weight %in% list_chart_controls_style_font_weight) { + stop("`chart_controls_style_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_controls_style_font_weight %in% names(named_list)) { + if (is.logical(chart_controls_style_font_weight)) { + chart_controls_style_font_weight <- as.character(chart_controls_style_font_weight) + } + named_list_value <- unname(named_list[chart_controls_style_font_weight])[[1]] + new_list$x$state$controls_style$font_weight <- named_list_value + } + } + } + } + new_list$x$state$controls_style$height <- chart_controls_style_height + new_list$x$state$button_style$background <- chart_button_control_style_background + new_list$x$state$button_style$background_selected <- chart_button_control_style_background_selected + new_list$x$state$button_style$background_hover <- chart_button_control_style_background_hover + new_list$x$state$button_style$font_color <- chart_button_control_style_font_color + new_list$x$state$button_style$font_color_selected <- chart_button_control_style_font_color_selected + new_list$x$state$button_style$font_color_hover <- chart_button_control_style_font_color_hover + new_list$x$state$button_style$button_styles_advanced <- chart_button_control_style_button_styles_advanced + new_list$x$state$button_style$border_width <- chart_button_control_style_border_width + new_list$x$state$button_style$border_color <- chart_button_control_style_border_color + new_list$x$state$button_style$border_transparency <- chart_button_control_style_border_transparency + new_list$x$state$button_style$border_radius <- chart_button_control_style_border_radius + new_list$x$state$slider_style$track_color <- chart_slider_control_style_track_color + new_list$x$state$slider_style$font_color <- chart_slider_control_style_font_color + new_list$x$state$slider_style$handle_color <- chart_slider_control_style_handle_color + new_list$x$state$slider_style$play_color <- chart_slider_control_style_play_color + new_list$x$state$slider_style$track_height <- chart_slider_control_style_track_height + new_list$x$state$slider_style$handle_height <- chart_slider_control_style_handle_height + new_list$x$state$slider_style$play_button <- chart_slider_control_style_play_button + new_list$x$state$dropdown_style$background <- chart_dropdown_control_style_background + new_list$x$state$dropdown_style$font_color <- chart_dropdown_control_style_font_color + new_list$x$state$dropdown_style$border_styles_advanced <- chart_dropdown_control_style_border_styles_advanced + list_chart_dropdown_control_style_border_style <- c("all", "bottom", NULL) + if (!is.null(chart_dropdown_control_style_border_style)) { + if (!chart_dropdown_control_style_border_style %in% list_chart_dropdown_control_style_border_style) { + stop("`chart_dropdown_control_style_border_style` must be one of: c('all', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_dropdown_control_style_border_style %in% names(named_list)) { + if (is.logical(chart_dropdown_control_style_border_style)) { + chart_dropdown_control_style_border_style <- as.character(chart_dropdown_control_style_border_style) + } + named_list_value <- unname(named_list[chart_dropdown_control_style_border_style])[[1]] + new_list$x$state$dropdown_style$border_style <- named_list_value + } + } + } + } + new_list$x$state$dropdown_style$border_width <- chart_dropdown_control_style_border_width + new_list$x$state$dropdown_style$border_color <- chart_dropdown_control_style_border_color + new_list$x$state$dropdown_style$border_transparency <- chart_dropdown_control_style_border_transparency + new_list$x$state$dropdown_style$border_radius <- chart_dropdown_control_style_border_radius + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + list_legend_position <- c("above", "below", NULL) + if (!is.null(legend_position)) { + if (!legend_position %in% list_legend_position) { + stop("`legend_position` must be one of: c('above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_position %in% names(named_list)) { + if (is.logical(legend_position)) { + legend_position <- as.character(legend_position) + } + named_list_value <- unname(named_list[legend_position])[[1]] + new_list$x$state$legend_position <- named_list_value + } + } + } + } + new_list$x$state$legend_hide_space <- legend_hide_space + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + new_list$x$state$zoom_on_double_click <- zoom_on_double_click + new_list$x$state$zoom_on_mousewheel <- zoom_on_mousewheel + new_list$x$state$transition_duration <- transition_duration + new_list$x$state$transition_stagger <- transition_stagger + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_svg_annotator_details.R b/R_package/R/set_svg_annotator_details.R new file mode 100644 index 0000000..3f7b305 --- /dev/null +++ b/R_package/R/set_svg_annotator_details.R @@ -0,0 +1,2252 @@ +#' Set svg annotator chart details +#' @name set_svg_annotator_details +#' @param svg_url SVG file. Flourish type hint: url, defaults to `NULL` +#' @param svg_width_wide Image width. The width in % of the image in standard wide-screen view. Flourish type hint: number, defaults to `NULL` +#' @param mobile_view Different mobile view. Flourish type hint: boolean, defaults to `NULL` +#' @param mobile_breakpoint Breakpoint. The size in pixels at which to switch to mobile layout. Flourish type hint: number, defaults to `NULL` +#' @param mobile_svg_mode Image on mobile. Choices: none, same, different. Whether to show the image at all on mobile. Flourish type hint: string, defaults to `NULL` +#' @param mobile_svg_url SVG file (mobile). Flourish type hint: url, defaults to `NULL` +#' @param mobile_svg_width Width. The width in % of the image on a mobile view. Flourish type hint: number, defaults to `NULL` +#' @param mobile_content_mode Mobile content mode. Choices: interactive, all, accordion. If turned on all content will display on load in mobile view. Flourish type hint: string, defaults to `NULL` +#' @param clickable_svg_animation Animation clickable elements. Choices: off, animation. Flourish type hint: string, defaults to `NULL` +#' @param clickable_svg_animation_duration Duration. The duration of the highlight animation on each clickable element. Flourish type hint: number, defaults to `NULL` +#' @param clickable_svg_animation_config Advanced. Reveal settings to adjust the SVG Animation properties on clickable elements. See https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate for more details. Flourish type hint: boolean, defaults to `NULL` +#' @param clickable_svg_animation_attr Attribute. Flourish type hint: string, defaults to `NULL` +#' @param clickable_svg_animation_values Values. Flourish type hint: string, defaults to `NULL` +#' @param clickable_svg_animation_repeat Repeat. Flourish type hint: string, defaults to `NULL` +#' @param text_panel_enabled Text panel enabled. Set to disabled to only show text in popups. Flourish type hint: boolean, defaults to `NULL` +#' @param h1_default Default heading. The text to show on load. Flourish type hint: text, defaults to `NULL` +#' @param h1_size Size. Flourish type hint: number, defaults to `NULL` +#' @param h2_default Default subheading. The text to show on load. Flourish type hint: text, defaults to `NULL` +#' @param h2_size Size. Flourish type hint: number, defaults to `NULL` +#' @param content_default Default subheading. The text to show on load. Flourish type hint: text, defaults to `NULL` +#' @param content_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. The text to appear in the panel. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. The text to appear in the panel. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing "Click position" is especially useful when your visualisation is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param svg_reset_fonts Override fonts in SVG. If enabled, font-family styles will be removed in the SVG, allowing the text to be inherited from the current theme or settings. Flourish type hint: boolean, defaults to `NULL` +#' @param show_css Edit CSS. Flourish type hint: boolean, defaults to `NULL` +#' @param stylesheet Custom styles. Use the class .clickable-element to target all interactive elements. When one is clicked, it is .highlighted and the others are .faded. The text for each clickable element is inside a .text-block, which is also .accordion in accordion mode. Flourish type hint: code, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default, but you can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, but you can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Choices: stack-default, stack-2, stack-3, stack-4. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements such as axes. Note that when direction is set to "right to left" any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualisation container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background colour is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders. (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders. Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "svg_annotator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_svg_annotator_data(gapminder) |> +#' set_svg_annotator_details() +#' ) +#' @export + +set_svg_annotator_details <- function( + ., + svg_url = NULL, + svg_width_wide = NULL, + mobile_view = NULL, + mobile_breakpoint = NULL, + mobile_svg_mode = NULL, + mobile_svg_url = NULL, + mobile_svg_width = NULL, + mobile_content_mode = NULL, + clickable_svg_animation = NULL, + clickable_svg_animation_duration = NULL, + clickable_svg_animation_config = NULL, + clickable_svg_animation_attr = NULL, + clickable_svg_animation_values = NULL, + clickable_svg_animation_repeat = NULL, + text_panel_enabled = NULL, + h1_default = NULL, + h1_size = NULL, + h2_default = NULL, + h2_size = NULL, + content_default = NULL, + content_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + svg_reset_fonts = NULL, + show_css = NULL, + stylesheet = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL) { + details_error(., "svg_annotator") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/svg-annotator")) { + stop("`set_svg_annotator_details()` is not supported for this chart type.") + } + new_list$x$state$svg_url <- svg_url + new_list$x$state$svg_width_wide <- svg_width_wide + new_list$x$state$mobile_view <- mobile_view + new_list$x$state$mobile_breakpoint <- mobile_breakpoint + list_mobile_svg_mode <- c("none", "same", "different", NULL) + if (!is.null(mobile_svg_mode)) { + if (!mobile_svg_mode %in% list_mobile_svg_mode) { + stop("`mobile_svg_mode` must be one of: c('none', 'same', 'different')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "same": "same", "different": "different"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "same": "same", "different": "different"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && mobile_svg_mode %in% names(named_list)) { + if (is.logical(mobile_svg_mode)) { + mobile_svg_mode <- as.character(mobile_svg_mode) + } + named_list_value <- unname(named_list[mobile_svg_mode])[[1]] + new_list$x$state$mobile_svg_mode <- named_list_value + } + } + } + } + new_list$x$state$mobile_svg_url <- mobile_svg_url + new_list$x$state$mobile_svg_width <- mobile_svg_width + list_mobile_content_mode <- c("interactive", "all", "accordion", NULL) + if (!is.null(mobile_content_mode)) { + if (!mobile_content_mode %in% list_mobile_content_mode) { + stop("`mobile_content_mode` must be one of: c('interactive', 'all', 'accordion')") + } else { + if (length(jsonlite::fromJSON('{"interactive": "interactive", "all": "all", "accordion": "accordion"}')) > 1) { + named_list <- jsonlite::fromJSON('{"interactive": "interactive", "all": "all", "accordion": "accordion"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && mobile_content_mode %in% names(named_list)) { + if (is.logical(mobile_content_mode)) { + mobile_content_mode <- as.character(mobile_content_mode) + } + named_list_value <- unname(named_list[mobile_content_mode])[[1]] + new_list$x$state$mobile_content_mode <- named_list_value + } + } + } + } + list_clickable_svg_animation <- c("off", "animation", NULL) + if (!is.null(clickable_svg_animation)) { + if (!clickable_svg_animation %in% list_clickable_svg_animation) { + stop("`clickable_svg_animation` must be one of: c('off', 'animation')") + } else { + if (length(jsonlite::fromJSON('{"off": "off", "animation": "animation"}')) > 1) { + named_list <- jsonlite::fromJSON('{"off": "off", "animation": "animation"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && clickable_svg_animation %in% names(named_list)) { + if (is.logical(clickable_svg_animation)) { + clickable_svg_animation <- as.character(clickable_svg_animation) + } + named_list_value <- unname(named_list[clickable_svg_animation])[[1]] + new_list$x$state$clickable_svg_animation <- named_list_value + } + } + } + } + new_list$x$state$clickable_svg_animation_duration <- clickable_svg_animation_duration + new_list$x$state$clickable_svg_animation_config <- clickable_svg_animation_config + new_list$x$state$clickable_svg_animation_attr <- clickable_svg_animation_attr + new_list$x$state$clickable_svg_animation_values <- clickable_svg_animation_values + new_list$x$state$clickable_svg_animation_repeat <- clickable_svg_animation_repeat + new_list$x$state$text_panel_enabled <- text_panel_enabled + if (length(h1_default) > 1) { + new_list$x$state$h1_default <- paste(h1_default, collapse = "\n") + } else { + new_list$x$state$h1_default <- h1_default + } + + new_list$x$state$h1_size <- h1_size + if (length(h2_default) > 1) { + new_list$x$state$h2_default <- paste(h2_default, collapse = "\n") + } else { + new_list$x$state$h2_default <- h2_default + } + + new_list$x$state$h2_size <- h2_size + if (length(content_default) > 1) { + new_list$x$state$content_default <- paste(content_default, collapse = "\n") + } else { + new_list$x$state$content_default <- content_default + } + + new_list$x$state$content_size <- content_size + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + new_list$x$state$svg_reset_fonts <- svg_reset_fonts + new_list$x$state$show_css <- show_css + if (length(stylesheet) > 1) { + new_list$x$state$stylesheet <- paste(stylesheet, collapse = "\n") + } else { + new_list$x$state$stylesheet <- stylesheet + } + + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + list_chart_layout_layout_order <- c("stack-default", "stack-2", "stack-3", "stack-4", NULL) + if (!is.null(chart_layout_layout_order)) { + if (!chart_layout_layout_order %in% list_chart_layout_layout_order) { + stop("`chart_layout_layout_order` must be one of: c('stack-default', 'stack-2', 'stack-3', 'stack-4')") + } else { + if (length(jsonlite::fromJSON('{"stack-default": "stack-default", "stack-2": "stack-2", "stack-3": "stack-3", "stack-4": "stack-4"}')) > 1) { + named_list <- jsonlite::fromJSON('{"stack-default": "stack-default", "stack-2": "stack-2", "stack-3": "stack-3", "stack-4": "stack-4"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_layout_order %in% names(named_list)) { + if (is.logical(chart_layout_layout_order)) { + chart_layout_layout_order <- as.character(chart_layout_layout_order) + } + named_list_value <- unname(named_list[chart_layout_layout_order])[[1]] + new_list$x$state$layout$layout_order <- named_list_value + } + } + } + } + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + new_list$x$state$layout$footer_note <- chart_layout_footer_note + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_table_details.R b/R_package/R/set_table_details.R new file mode 100644 index 0000000..90d6a95 --- /dev/null +++ b/R_package/R/set_table_details.R @@ -0,0 +1,3627 @@ +#' Set table chart details +#' @name set_table_details +#' @param table_min_width Min width. Flourish type hint: number, defaults to `NULL` +#' @param table_border_width Border. Flourish type hint: number, defaults to `NULL` +#' @param table_border_color Border color. Flourish type hint: color, defaults to `NULL` +#' @param sorting_enabled Sortable columns. Choices: all, none, custom. Determines whether a viewer can sort the table by clicking on the column headers. Custom allows the user only to sort listed columns. Flourish type hint: string, defaults to `NULL` +#' @param sorting_custom_columns Columns to make sortable. Write each column name you want to make sortable on a new line. Flourish type hint: text, defaults to `NULL` +#' @param pagination_amount Rows per page. If you dont want pagination, set this number to a value greater than the number of rows in your data. Flourish type hint: number, defaults to `NULL` +#' @param markdown_enabled Cell text styling. Choices: `TRUE`, `FALSE`. Enables Markdown for your cells. For example for _italic_, **bold** text. Flourish type hint: boolean, defaults to `NULL` +#' @param cell_height Min height. Flourish type hint: number, defaults to `NULL` +#' @param cell_padding_vertical Padding vertical. Flourish type hint: number, defaults to `NULL` +#' @param cell_padding_horizontal Padding horizontal. Flourish type hint: number, defaults to `NULL` +#' @param cell_wrap Wrap text in cell. Flourish type hint: boolean, defaults to `NULL` +#' @param cell_horizontal_alignment Text. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param cell_numeric_horizontal_alignment Numbers. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param cell_vertical_alignment Vertical alignment. Choices: top, center, bottom. Flourish type hint: string, defaults to `NULL` +#' @param cell_fill_1 Main color. Flourish type hint: color, defaults to `NULL` +#' @param cell_fill_2 Stripe color. Flourish type hint: color, defaults to `NULL` +#' @param cell_fill_direction Stripe direction. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param cell_fill_custom_enabled Color cells based on content. Flourish type hint: boolean, defaults to `NULL` +#' @param cell_fill_custom_categorical Categorical coloring. To color cells based on their content, use the format: cell-color/text-color : cell-text : column name OR row-number To specify a row, write "row-" followed by the row number from the datasheet. Its also possible to leave out the column name or row number if you want to target all the cells in the table For example: red/white : Chelsea Use * in place of cell-text to select an entire column or row. For example: #0000dd/#ffffff : Alabama #ffffff/#dddddd : * : State #0000dd/#ffffff : * : row-2 #ffffff/#dddddd : n/a : Capital Flourish type hint: text, defaults to `NULL` +#' @param cell_fill_custom_numeric Numeric coloring. Color cells numerically based on their content. For sequential coloring, use the format: min_color >> max_color : column_name : domain_min >> domain_max The domain is optional, for example: #ffffff >> #00ff00 : Population #ffffff >> #00ff00 : Population : 0 >> 1000000000 For diverging coloring, use the format: min_color >> midpt_color >> max_color : col_name : domain_min >> domain_mid >> domain_max The domain is optional, for example: #ffffff >> #00ff00 >> #ff00ff : Vote share #ffffff >> #00ff00 >> #ff00ff : Vote share : 0 >> 50 >> 100 Where both numeric and categorical coloring are used on a cell, categorical will override numeric. Flourish type hint: text, defaults to `NULL` +#' @param cell_fill_margin_vertical Vertical margin. Flourish type hint: number, defaults to `NULL` +#' @param cell_fill_margin_horizontal Horizontal margin. Flourish type hint: number, defaults to `NULL` +#' @param cell_border_mode Mode. Choices: none, horizontal, vertical, both. Flourish type hint: string, defaults to `NULL` +#' @param cell_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param cell_border_width Thickness. Flourish type hint: number, defaults to `NULL` +#' @param cell_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param cell_font_color Color. Flourish type hint: color, defaults to `NULL` +#' @param cell_link_color Link color. Flourish type hint: color, defaults to `NULL` +#' @param cell_font_size Size. Choices: 1, 1.25, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param cell_font_size_custom Custom. Specify a custom responsive font size in rems Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param column_width_mode Choices: auto, equal, fixed. Flourish type hint: string, defaults to `NULL` +#' @param column_widths Column widths. A comma separated lists of column widths. The first column will be the first number in the list. You can use "px" to set fixed widths or "%" to use percentage of total width. (e.g. 200px,200px,25%). Flourish type hint: string, defaults to `NULL` +#' @param header_font_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param header_fill Background. Flourish type hint: color, defaults to `NULL` +#' @param header_font_color Color. Flourish type hint: color, defaults to `NULL` +#' @param header_underline_sorting Underline sorting header. Flourish type hint: boolean, defaults to `NULL` +#' @param header_style_default Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param header_height Height. Flourish type hint: number, defaults to `NULL` +#' @param header_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param header_horizontal_alignment Horizontal alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param header_font_default Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param header_font_size Size. Flourish type hint: number, defaults to `NULL` +#' @param header_border_default Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param header_border_width Thickness. Flourish type hint: number, defaults to `NULL` +#' @param header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param cell_image_height Height. as a percentage of the cell height. Flourish type hint: number, defaults to `NULL` +#' @param cell_image_radius Rounded corners. Sets the radius of the corner roundness (in %). A value of 50 means your image will show as a circle. Flourish type hint: number, defaults to `NULL` +#' @param bar_columns_enabled Choices: `TRUE`, `FALSE`. This setting will convert numerical values in your data to a simple visual bar chart. Flourish type hint: boolean, defaults to `NULL` +#' @param bar_columns_bar_1_columns Which columns should be part of the bar chart?. Just write down the column names on a new line. Flourish type hint: text, defaults to `NULL` +#' @param bar_columns_bar_1_column_name New column name. Flourish type hint: string, defaults to `NULL` +#' @param bar_columns_type Bar type. Choices: bars, columns. Flourish type hint: string, defaults to `NULL` +#' @param bar_columns_bar_1_height Max height. Flourish type hint: number, defaults to `NULL` +#' @param bar_columns_bar_1_width Width. Flourish type hint: number, defaults to `NULL` +#' @param bar_columns_bar_1_column_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param bar_columns_bar_1_proportional Mode. Choices: `FALSE`, `TRUE`. Display data in a proportional bar chart or a standard stacked bar chart with a fixed min and max, e.g. for negative numbers. Flourish type hint: boolean, defaults to `NULL` +#' @param bar_columns_bar_1_same_scale Consistent scale. If enabled, all the bar charts in the table will use the same X scale. Flourish type hint: boolean, defaults to `NULL` +#' @param bar_columns_bar_1_zero_line Show zero line. Flourish type hint: boolean, defaults to `NULL` +#' @param bar_columns_bar_1_zero_line_color Zero line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param bar_columns_bar_1_labels Labels. Choices: none, popup, inline. Flourish type hint: string, defaults to `NULL` +#' @param bar_columns_bar_1_label_size Inline label size. Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_show_legend Legend. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param legend_position Legend position. Choices: above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_title_weight Title weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_weight Text weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_legend_container_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_legend_container_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param line_columns_enabled Choices: `TRUE`, `FALSE`. This setting will convert numerical values in your data to a simple visual line chart. Flourish type hint: boolean, defaults to `NULL` +#' @param line_columns_line_1_columns Which columns should be part of the line chart?. Write down the column names on a new line. Flourish type hint: text, defaults to `NULL` +#' @param line_columns_line_1_column_name New column name. Flourish type hint: string, defaults to `NULL` +#' @param line_columns_line_1_width Width. Flourish type hint: number, defaults to `NULL` +#' @param line_columns_line_1_height Max height. Flourish type hint: number, defaults to `NULL` +#' @param line_columns_line_1_color Color. Flourish type hint: color, defaults to `NULL` +#' @param line_columns_line_1_area Area chart. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param line_columns_line_1_min_enabled Min. Choices: `TRUE`, `FALSE`. Use a fixed min value. Flourish type hint: boolean, defaults to `NULL` +#' @param line_columns_line_1_min Min value. Flourish type hint: number, defaults to `NULL` +#' @param line_columns_line_1_max_enabled Max. Choices: `TRUE`, `FALSE`. Use a fixed max value. Flourish type hint: boolean, defaults to `NULL` +#' @param line_columns_line_1_max Max value. Flourish type hint: number, defaults to `NULL` +#' @param mobile_view Mobile view. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param mobile_breakpoint Mobile breakpoint width. Flourish type hint: number, defaults to `NULL` +#' @param mobile_cell_font_size Text size. Choices: 1, 1.25, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param mobile_cell_font_size_custom Custom. Specify a custom responsive font size in rems Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param mobile_pagination_amount Rows per page. If you dont want pagination, set this number to a value greater than the number of rows in your data. Flourish type hint: number, defaults to `NULL` +#' @param search_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param search_mode Search mode. Choices: anywhere, start, whole. Anywhere : Search for the specified text anywhere in the cell Start : Search for the specified text at the beginning of the cell Whole : Search for the exact specified text in the cell. Flourish type hint: string, defaults to `NULL` +#' @param search_width Width. Width of search container. Flourish type hint: number, defaults to `NULL` +#' @param search_background_color Background. Flourish type hint: color, defaults to `NULL` +#' @param search_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param search_placeholder Placeholder text. Flourish type hint: string, defaults to `NULL` +#' @param no_results_text Text when no results. Flourish type hint: string, defaults to `NULL` +#' @param search_hide_table Hide table before search. Flourish type hint: boolean, defaults to `NULL` +#' @param search_hide_published Hide search when published. Keeps the search box visible in the editor (e.g. for filtering in a story) but hides it in the published visualization or storyFlourish type hint: boolean, defaults to `NULL` +#' @param search_columns Columns to search. Choices: all, first, custom. Choose which columns you want to search through. You might want to narrow this down with big datasets to speed it up You can select specific columns by writing them down on a new line, like this: Column A Column B. Flourish type hint: string, defaults to `NULL` +#' @param search_columns_custom Flourish type hint: text, defaults to `NULL` +#' @param search_resize Resize table after searching. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param search_dropdown Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param search_dropdown_persistent Always show dropdown suggestions. Flourish type hint: boolean, defaults to `NULL` +#' @param search_val Search value. The current string value of the search box. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_popup_show_popups Popups. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_is_custom Popup contents. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_custom_template Popup content. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_show_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_style_popups Custom styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_text_color Text colour. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_text_size Font size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_fill_color Fill colour. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_border_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param formatted_columns Columns to format. Write down the column names on a new line that you want to apply formatting to. Flourish type hint: text, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after a number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_enabled Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_url_settings_whitelist Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "table", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_table_data(gapminder) |> +#' set_table_details() +#' ) +#' @export + +set_table_details <- function( + ., + table_min_width = NULL, + table_border_width = NULL, + table_border_color = NULL, + sorting_enabled = NULL, + sorting_custom_columns = NULL, + pagination_amount = NULL, + markdown_enabled = NULL, + cell_height = NULL, + cell_padding_vertical = NULL, + cell_padding_horizontal = NULL, + cell_wrap = NULL, + cell_horizontal_alignment = NULL, + cell_numeric_horizontal_alignment = NULL, + cell_vertical_alignment = NULL, + cell_fill_1 = NULL, + cell_fill_2 = NULL, + cell_fill_direction = NULL, + cell_fill_custom_enabled = NULL, + cell_fill_custom_categorical = NULL, + cell_fill_custom_numeric = NULL, + cell_fill_margin_vertical = NULL, + cell_fill_margin_horizontal = NULL, + cell_border_mode = NULL, + cell_border_color = NULL, + cell_border_width = NULL, + cell_border_style = NULL, + cell_font_color = NULL, + cell_link_color = NULL, + cell_font_size = NULL, + cell_font_size_custom = NULL, + column_width_mode = NULL, + column_widths = NULL, + header_font_weight = NULL, + header_fill = NULL, + header_font_color = NULL, + header_underline_sorting = NULL, + header_style_default = NULL, + header_height = NULL, + header_padding = NULL, + header_horizontal_alignment = NULL, + header_font_default = NULL, + header_font_size = NULL, + header_border_default = NULL, + header_border_color = NULL, + header_border_width = NULL, + header_border_style = NULL, + cell_image_height = NULL, + cell_image_radius = NULL, + bar_columns_enabled = NULL, + bar_columns_bar_1_columns = NULL, + bar_columns_bar_1_column_name = NULL, + bar_columns_type = NULL, + bar_columns_bar_1_height = NULL, + bar_columns_bar_1_width = NULL, + bar_columns_bar_1_column_padding = NULL, + bar_columns_bar_1_proportional = NULL, + bar_columns_bar_1_same_scale = NULL, + bar_columns_bar_1_zero_line = NULL, + bar_columns_bar_1_zero_line_color = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + bar_columns_bar_1_labels = NULL, + bar_columns_bar_1_label_size = NULL, + chart_legend_show_legend = NULL, + chart_legend_title_mode = NULL, + chart_legend_title = NULL, + chart_legend_swatch_width = NULL, + chart_legend_swatch_height = NULL, + chart_legend_swatch_radius = NULL, + chart_legend_legend_items_padding = NULL, + chart_legend_swatch_outline = NULL, + chart_legend_swatch_outline_color = NULL, + chart_legend_order_override = NULL, + chart_legend_icon_height = NULL, + chart_legend_icon_color = NULL, + chart_legend_max_width = NULL, + chart_legend_orientation = NULL, + legend_position = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + line_columns_enabled = NULL, + line_columns_line_1_columns = NULL, + line_columns_line_1_column_name = NULL, + line_columns_line_1_width = NULL, + line_columns_line_1_height = NULL, + line_columns_line_1_color = NULL, + line_columns_line_1_area = NULL, + line_columns_line_1_min_enabled = NULL, + line_columns_line_1_min = NULL, + line_columns_line_1_max_enabled = NULL, + line_columns_line_1_max = NULL, + mobile_view = NULL, + mobile_breakpoint = NULL, + mobile_cell_font_size = NULL, + mobile_cell_font_size_custom = NULL, + mobile_pagination_amount = NULL, + search_enabled = NULL, + search_mode = NULL, + search_width = NULL, + search_background_color = NULL, + search_text_color = NULL, + search_placeholder = NULL, + no_results_text = NULL, + search_hide_table = NULL, + search_hide_published = NULL, + search_columns = NULL, + search_columns_custom = NULL, + search_resize = NULL, + search_dropdown = NULL, + search_dropdown_persistent = NULL, + search_val = NULL, + chart_popup_show_popups = NULL, + chart_popup_is_custom = NULL, + chart_popup_custom_template = NULL, + chart_popup_show_pointer = NULL, + chart_popup_show_shadow = NULL, + chart_popup_style_popups = NULL, + chart_popup_text_color = NULL, + chart_popup_align = NULL, + chart_popup_text_size = NULL, + chart_popup_fill_color = NULL, + chart_popup_opacity = NULL, + chart_popup_padding = NULL, + chart_popup_border_radius = NULL, + chart_popup_max_width = NULL, + formatted_columns = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL) { + details_error(., "table") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/table")) { + stop("`set_table_details()` is not supported for this chart type.") + } + new_list$x$state$table_min_width <- table_min_width + new_list$x$state$table_border_width <- table_border_width + new_list$x$state$table_border_color <- table_border_color + list_sorting_enabled <- c("all", "none", "custom", NULL) + if (!is.null(sorting_enabled)) { + if (!sorting_enabled %in% list_sorting_enabled) { + stop("`sorting_enabled` must be one of: c('all', 'none', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "none": "none", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "none": "none", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && sorting_enabled %in% names(named_list)) { + if (is.logical(sorting_enabled)) { + sorting_enabled <- as.character(sorting_enabled) + } + named_list_value <- unname(named_list[sorting_enabled])[[1]] + new_list$x$state$sorting$enabled <- named_list_value + } + } + } + } + if (length(sorting_custom_columns) > 1) { + new_list$x$state$sorting$custom_columns <- paste(sorting_custom_columns, collapse = "\n") + } else { + new_list$x$state$sorting$custom_columns <- sorting_custom_columns + } + + new_list$x$state$pagination_amount <- pagination_amount + list_markdown_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(markdown_enabled)) { + if (!markdown_enabled %in% list_markdown_enabled) { + stop("`markdown_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && markdown_enabled %in% names(named_list)) { + if (is.logical(markdown_enabled)) { + markdown_enabled <- as.character(markdown_enabled) + } + named_list_value <- unname(named_list[markdown_enabled])[[1]] + new_list$x$state$markdown_enabled <- named_list_value + } + } + } + } + new_list$x$state$cell_height <- cell_height + new_list$x$state$cell_padding_vertical <- cell_padding_vertical + new_list$x$state$cell_padding_horizontal <- cell_padding_horizontal + new_list$x$state$cell_wrap <- cell_wrap + list_cell_horizontal_alignment <- c("start", "center", "end", NULL) + if (!is.null(cell_horizontal_alignment)) { + if (!cell_horizontal_alignment %in% list_cell_horizontal_alignment) { + stop("`cell_horizontal_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && cell_horizontal_alignment %in% names(named_list)) { + if (is.logical(cell_horizontal_alignment)) { + cell_horizontal_alignment <- as.character(cell_horizontal_alignment) + } + named_list_value <- unname(named_list[cell_horizontal_alignment])[[1]] + new_list$x$state$cell_horizontal_alignment <- named_list_value + } + } + } + } + list_cell_numeric_horizontal_alignment <- c("start", "center", "end", NULL) + if (!is.null(cell_numeric_horizontal_alignment)) { + if (!cell_numeric_horizontal_alignment %in% list_cell_numeric_horizontal_alignment) { + stop("`cell_numeric_horizontal_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && cell_numeric_horizontal_alignment %in% names(named_list)) { + if (is.logical(cell_numeric_horizontal_alignment)) { + cell_numeric_horizontal_alignment <- as.character(cell_numeric_horizontal_alignment) + } + named_list_value <- unname(named_list[cell_numeric_horizontal_alignment])[[1]] + new_list$x$state$cell_numeric_horizontal_alignment <- named_list_value + } + } + } + } + list_cell_vertical_alignment <- c("top", "center", "bottom", NULL) + if (!is.null(cell_vertical_alignment)) { + if (!cell_vertical_alignment %in% list_cell_vertical_alignment) { + stop("`cell_vertical_alignment` must be one of: c('top', 'center', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "center": "center", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "center": "center", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && cell_vertical_alignment %in% names(named_list)) { + if (is.logical(cell_vertical_alignment)) { + cell_vertical_alignment <- as.character(cell_vertical_alignment) + } + named_list_value <- unname(named_list[cell_vertical_alignment])[[1]] + new_list$x$state$cell_vertical_alignment <- named_list_value + } + } + } + } + new_list$x$state$cell_fill_1 <- cell_fill_1 + new_list$x$state$cell_fill_2 <- cell_fill_2 + list_cell_fill_direction <- c("horizontal", "vertical", NULL) + if (!is.null(cell_fill_direction)) { + if (!cell_fill_direction %in% list_cell_fill_direction) { + stop("`cell_fill_direction` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && cell_fill_direction %in% names(named_list)) { + if (is.logical(cell_fill_direction)) { + cell_fill_direction <- as.character(cell_fill_direction) + } + named_list_value <- unname(named_list[cell_fill_direction])[[1]] + new_list$x$state$cell_fill_direction <- named_list_value + } + } + } + } + new_list$x$state$cell_fill_custom_enabled <- cell_fill_custom_enabled + if (length(cell_fill_custom_categorical) > 1) { + new_list$x$state$cell_fill_custom_categorical <- paste(cell_fill_custom_categorical, collapse = "\n") + } else { + new_list$x$state$cell_fill_custom_categorical <- cell_fill_custom_categorical + } + + if (length(cell_fill_custom_numeric) > 1) { + new_list$x$state$cell_fill_custom_numeric <- paste(cell_fill_custom_numeric, collapse = "\n") + } else { + new_list$x$state$cell_fill_custom_numeric <- cell_fill_custom_numeric + } + + new_list$x$state$cell_fill_margin_vertical <- cell_fill_margin_vertical + new_list$x$state$cell_fill_margin_horizontal <- cell_fill_margin_horizontal + list_cell_border_mode <- c("none", "horizontal", "vertical", "both", NULL) + if (!is.null(cell_border_mode)) { + if (!cell_border_mode %in% list_cell_border_mode) { + stop("`cell_border_mode` must be one of: c('none', 'horizontal', 'vertical', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "horizontal": "horizontal", "vertical": "vertical", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "horizontal": "horizontal", "vertical": "vertical", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && cell_border_mode %in% names(named_list)) { + if (is.logical(cell_border_mode)) { + cell_border_mode <- as.character(cell_border_mode) + } + named_list_value <- unname(named_list[cell_border_mode])[[1]] + new_list$x$state$cell_border_mode <- named_list_value + } + } + } + } + new_list$x$state$cell_border_color <- cell_border_color + new_list$x$state$cell_border_width <- cell_border_width + list_cell_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(cell_border_style)) { + if (!cell_border_style %in% list_cell_border_style) { + stop("`cell_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && cell_border_style %in% names(named_list)) { + if (is.logical(cell_border_style)) { + cell_border_style <- as.character(cell_border_style) + } + named_list_value <- unname(named_list[cell_border_style])[[1]] + new_list$x$state$cell_border_style <- named_list_value + } + } + } + } + new_list$x$state$cell_font_color <- cell_font_color + new_list$x$state$cell_link_color <- cell_link_color + list_cell_font_size <- c("1", "1.25", "1.5", "custom", NULL) + if (!is.null(cell_font_size)) { + if (!cell_font_size %in% list_cell_font_size) { + stop("`cell_font_size` must be one of: c('1', '1.25', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1": "1", "1.25": "1.25", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1": "1", "1.25": "1.25", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && cell_font_size %in% names(named_list)) { + if (is.logical(cell_font_size)) { + cell_font_size <- as.character(cell_font_size) + } + named_list_value <- unname(named_list[cell_font_size])[[1]] + new_list$x$state$cell_font_size <- named_list_value + } + } + } + } + new_list$x$state$cell_font_size_custom <- cell_font_size_custom + list_column_width_mode <- c("auto", "equal", "fixed", NULL) + if (!is.null(column_width_mode)) { + if (!column_width_mode %in% list_column_width_mode) { + stop("`column_width_mode` must be one of: c('auto', 'equal', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "equal": "equal", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "equal": "equal", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && column_width_mode %in% names(named_list)) { + if (is.logical(column_width_mode)) { + column_width_mode <- as.character(column_width_mode) + } + named_list_value <- unname(named_list[column_width_mode])[[1]] + new_list$x$state$column_width_mode <- named_list_value + } + } + } + } + new_list$x$state$column_widths <- column_widths + list_header_font_weight <- c("bold", "normal", NULL) + if (!is.null(header_font_weight)) { + if (!header_font_weight %in% list_header_font_weight) { + stop("`header_font_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && header_font_weight %in% names(named_list)) { + if (is.logical(header_font_weight)) { + header_font_weight <- as.character(header_font_weight) + } + named_list_value <- unname(named_list[header_font_weight])[[1]] + new_list$x$state$header_font_weight <- named_list_value + } + } + } + } + new_list$x$state$header_fill <- header_fill + new_list$x$state$header_font_color <- header_font_color + new_list$x$state$header_underline_sorting <- header_underline_sorting + list_header_style_default <- c(TRUE, FALSE, NULL) + if (!is.null(header_style_default)) { + if (!header_style_default %in% list_header_style_default) { + stop("`header_style_default` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && header_style_default %in% names(named_list)) { + if (is.logical(header_style_default)) { + header_style_default <- as.character(header_style_default) + } + named_list_value <- unname(named_list[header_style_default])[[1]] + new_list$x$state$header_style_default <- named_list_value + } + } + } + } + new_list$x$state$header_height <- header_height + new_list$x$state$header_padding <- header_padding + list_header_horizontal_alignment <- c("start", "center", "end", NULL) + if (!is.null(header_horizontal_alignment)) { + if (!header_horizontal_alignment %in% list_header_horizontal_alignment) { + stop("`header_horizontal_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && header_horizontal_alignment %in% names(named_list)) { + if (is.logical(header_horizontal_alignment)) { + header_horizontal_alignment <- as.character(header_horizontal_alignment) + } + named_list_value <- unname(named_list[header_horizontal_alignment])[[1]] + new_list$x$state$header_horizontal_alignment <- named_list_value + } + } + } + } + list_header_font_default <- c(TRUE, FALSE, NULL) + if (!is.null(header_font_default)) { + if (!header_font_default %in% list_header_font_default) { + stop("`header_font_default` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && header_font_default %in% names(named_list)) { + if (is.logical(header_font_default)) { + header_font_default <- as.character(header_font_default) + } + named_list_value <- unname(named_list[header_font_default])[[1]] + new_list$x$state$header_font_default <- named_list_value + } + } + } + } + new_list$x$state$header_font_size <- header_font_size + list_header_border_default <- c(TRUE, FALSE, NULL) + if (!is.null(header_border_default)) { + if (!header_border_default %in% list_header_border_default) { + stop("`header_border_default` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && header_border_default %in% names(named_list)) { + if (is.logical(header_border_default)) { + header_border_default <- as.character(header_border_default) + } + named_list_value <- unname(named_list[header_border_default])[[1]] + new_list$x$state$header_border_default <- named_list_value + } + } + } + } + new_list$x$state$header_border_color <- header_border_color + new_list$x$state$header_border_width <- header_border_width + list_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(header_border_style)) { + if (!header_border_style %in% list_header_border_style) { + stop("`header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && header_border_style %in% names(named_list)) { + if (is.logical(header_border_style)) { + header_border_style <- as.character(header_border_style) + } + named_list_value <- unname(named_list[header_border_style])[[1]] + new_list$x$state$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$cell_image_height <- cell_image_height + new_list$x$state$cell_image_radius <- cell_image_radius + list_bar_columns_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(bar_columns_enabled)) { + if (!bar_columns_enabled %in% list_bar_columns_enabled) { + stop("`bar_columns_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && bar_columns_enabled %in% names(named_list)) { + if (is.logical(bar_columns_enabled)) { + bar_columns_enabled <- as.character(bar_columns_enabled) + } + named_list_value <- unname(named_list[bar_columns_enabled])[[1]] + new_list$x$state$bar_columns$enabled <- named_list_value + } + } + } + } + if (length(bar_columns_bar_1_columns) > 1) { + new_list$x$state$bar_columns$bar_1_columns <- paste(bar_columns_bar_1_columns, collapse = "\n") + } else { + new_list$x$state$bar_columns$bar_1_columns <- bar_columns_bar_1_columns + } + + new_list$x$state$bar_columns$bar_1_column_name <- bar_columns_bar_1_column_name + list_bar_columns_type <- c("bars", "columns", NULL) + if (!is.null(bar_columns_type)) { + if (!bar_columns_type %in% list_bar_columns_type) { + stop("`bar_columns_type` must be one of: c('bars', 'columns')") + } else { + if (length(jsonlite::fromJSON('{"bars": "bars", "columns": "columns"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bars": "bars", "columns": "columns"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && bar_columns_type %in% names(named_list)) { + if (is.logical(bar_columns_type)) { + bar_columns_type <- as.character(bar_columns_type) + } + named_list_value <- unname(named_list[bar_columns_type])[[1]] + new_list$x$state$bar_columns$type <- named_list_value + } + } + } + } + new_list$x$state$bar_columns$bar_1_height <- bar_columns_bar_1_height + new_list$x$state$bar_columns$bar_1_width <- bar_columns_bar_1_width + new_list$x$state$bar_columns$bar_1_column_padding <- bar_columns_bar_1_column_padding + list_bar_columns_bar_1_proportional <- c(FALSE, TRUE, NULL) + if (!is.null(bar_columns_bar_1_proportional)) { + if (!bar_columns_bar_1_proportional %in% list_bar_columns_bar_1_proportional) { + stop("`bar_columns_bar_1_proportional` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && bar_columns_bar_1_proportional %in% names(named_list)) { + if (is.logical(bar_columns_bar_1_proportional)) { + bar_columns_bar_1_proportional <- as.character(bar_columns_bar_1_proportional) + } + named_list_value <- unname(named_list[bar_columns_bar_1_proportional])[[1]] + new_list$x$state$bar_columns$bar_1_proportional <- named_list_value + } + } + } + } + new_list$x$state$bar_columns$bar_1_same_scale <- bar_columns_bar_1_same_scale + new_list$x$state$bar_columns$bar_1_zero_line <- bar_columns_bar_1_zero_line + new_list$x$state$bar_columns$bar_1_zero_line_color <- bar_columns_bar_1_zero_line_color + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + list_bar_columns_bar_1_labels <- c("none", "popup", "inline", NULL) + if (!is.null(bar_columns_bar_1_labels)) { + if (!bar_columns_bar_1_labels %in% list_bar_columns_bar_1_labels) { + stop("`bar_columns_bar_1_labels` must be one of: c('none', 'popup', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && bar_columns_bar_1_labels %in% names(named_list)) { + if (is.logical(bar_columns_bar_1_labels)) { + bar_columns_bar_1_labels <- as.character(bar_columns_bar_1_labels) + } + named_list_value <- unname(named_list[bar_columns_bar_1_labels])[[1]] + new_list$x$state$bar_columns$bar_1_labels <- named_list_value + } + } + } + } + new_list$x$state$bar_columns$bar_1_label_size <- bar_columns_bar_1_label_size + list_chart_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_legend_show_legend)) { + if (!chart_legend_show_legend %in% list_chart_legend_show_legend) { + stop("`chart_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_legend_show_legend)) { + chart_legend_show_legend <- as.character(chart_legend_show_legend) + } + named_list_value <- unname(named_list[chart_legend_show_legend])[[1]] + new_list$x$state$legend$show_legend <- named_list_value + } + } + } + } + list_chart_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_legend_title_mode)) { + if (!chart_legend_title_mode %in% list_chart_legend_title_mode) { + stop("`chart_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_legend_title_mode)) { + chart_legend_title_mode <- as.character(chart_legend_title_mode) + } + named_list_value <- unname(named_list[chart_legend_title_mode])[[1]] + new_list$x$state$legend$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend$title <- chart_legend_title + new_list$x$state$legend$swatch_width <- chart_legend_swatch_width + new_list$x$state$legend$swatch_height <- chart_legend_swatch_height + new_list$x$state$legend$swatch_radius <- chart_legend_swatch_radius + new_list$x$state$legend$legend_items_padding <- chart_legend_legend_items_padding + new_list$x$state$legend$swatch_outline <- chart_legend_swatch_outline + new_list$x$state$legend$swatch_outline_color <- chart_legend_swatch_outline_color + if (length(chart_legend_order_override) > 1) { + new_list$x$state$legend$order_override <- paste(chart_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend$order_override <- chart_legend_order_override + } + + new_list$x$state$legend$icon_height <- chart_legend_icon_height + new_list$x$state$legend$icon_color <- chart_legend_icon_color + new_list$x$state$legend$max_width <- chart_legend_max_width + list_chart_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_orientation)) { + if (!chart_legend_orientation %in% list_chart_legend_orientation) { + stop("`chart_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_orientation %in% names(named_list)) { + if (is.logical(chart_legend_orientation)) { + chart_legend_orientation <- as.character(chart_legend_orientation) + } + named_list_value <- unname(named_list[chart_legend_orientation])[[1]] + new_list$x$state$legend$orientation <- named_list_value + } + } + } + } + list_legend_position <- c("above", "below", NULL) + if (!is.null(legend_position)) { + if (!legend_position %in% list_legend_position) { + stop("`legend_position` must be one of: c('above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && legend_position %in% names(named_list)) { + if (is.logical(legend_position)) { + legend_position <- as.character(legend_position) + } + named_list_value <- unname(named_list[legend_position])[[1]] + new_list$x$state$legend_position <- named_list_value + } + } + } + } + list_chart_legend_container_alignment <- c("start", "center", "end", NULL) + if (!is.null(chart_legend_container_alignment)) { + if (!chart_legend_container_alignment %in% list_chart_legend_container_alignment) { + stop("`chart_legend_container_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_alignment %in% names(named_list)) { + if (is.logical(chart_legend_container_alignment)) { + chart_legend_container_alignment <- as.character(chart_legend_container_alignment) + } + named_list_value <- unname(named_list[chart_legend_container_alignment])[[1]] + new_list$x$state$legend_container$alignment <- named_list_value + } + } + } + } + list_chart_legend_container_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_legend_container_orientation)) { + if (!chart_legend_container_orientation %in% list_chart_legend_container_orientation) { + stop("`chart_legend_container_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_orientation %in% names(named_list)) { + if (is.logical(chart_legend_container_orientation)) { + chart_legend_container_orientation <- as.character(chart_legend_container_orientation) + } + named_list_value <- unname(named_list[chart_legend_container_orientation])[[1]] + new_list$x$state$legend_container$orientation <- named_list_value + } + } + } + } + list_chart_legend_container_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_title_weight)) { + if (!chart_legend_container_title_weight %in% list_chart_legend_container_title_weight) { + stop("`chart_legend_container_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_title_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_title_weight)) { + chart_legend_container_title_weight <- as.character(chart_legend_container_title_weight) + } + named_list_value <- unname(named_list[chart_legend_container_title_weight])[[1]] + new_list$x$state$legend_container$title_weight <- named_list_value + } + } + } + } + list_chart_legend_container_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_legend_container_text_weight)) { + if (!chart_legend_container_text_weight %in% list_chart_legend_container_text_weight) { + stop("`chart_legend_container_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_legend_container_text_weight %in% names(named_list)) { + if (is.logical(chart_legend_container_text_weight)) { + chart_legend_container_text_weight <- as.character(chart_legend_container_text_weight) + } + named_list_value <- unname(named_list[chart_legend_container_text_weight])[[1]] + new_list$x$state$legend_container$text_weight <- named_list_value + } + } + } + } + new_list$x$state$legend_container$text_color <- chart_legend_container_text_color + new_list$x$state$legend_container$text_size <- chart_legend_container_text_size + list_line_columns_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(line_columns_enabled)) { + if (!line_columns_enabled %in% list_line_columns_enabled) { + stop("`line_columns_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && line_columns_enabled %in% names(named_list)) { + if (is.logical(line_columns_enabled)) { + line_columns_enabled <- as.character(line_columns_enabled) + } + named_list_value <- unname(named_list[line_columns_enabled])[[1]] + new_list$x$state$line_columns$enabled <- named_list_value + } + } + } + } + if (length(line_columns_line_1_columns) > 1) { + new_list$x$state$line_columns$line_1_columns <- paste(line_columns_line_1_columns, collapse = "\n") + } else { + new_list$x$state$line_columns$line_1_columns <- line_columns_line_1_columns + } + + new_list$x$state$line_columns$line_1_column_name <- line_columns_line_1_column_name + new_list$x$state$line_columns$line_1_width <- line_columns_line_1_width + new_list$x$state$line_columns$line_1_height <- line_columns_line_1_height + new_list$x$state$line_columns$line_1_color <- line_columns_line_1_color + list_line_columns_line_1_area <- c(TRUE, FALSE, NULL) + if (!is.null(line_columns_line_1_area)) { + if (!line_columns_line_1_area %in% list_line_columns_line_1_area) { + stop("`line_columns_line_1_area` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && line_columns_line_1_area %in% names(named_list)) { + if (is.logical(line_columns_line_1_area)) { + line_columns_line_1_area <- as.character(line_columns_line_1_area) + } + named_list_value <- unname(named_list[line_columns_line_1_area])[[1]] + new_list$x$state$line_columns$line_1_area <- named_list_value + } + } + } + } + list_line_columns_line_1_min_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(line_columns_line_1_min_enabled)) { + if (!line_columns_line_1_min_enabled %in% list_line_columns_line_1_min_enabled) { + stop("`line_columns_line_1_min_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && line_columns_line_1_min_enabled %in% names(named_list)) { + if (is.logical(line_columns_line_1_min_enabled)) { + line_columns_line_1_min_enabled <- as.character(line_columns_line_1_min_enabled) + } + named_list_value <- unname(named_list[line_columns_line_1_min_enabled])[[1]] + new_list$x$state$line_columns$line_1_min_enabled <- named_list_value + } + } + } + } + new_list$x$state$line_columns$line_1_min <- line_columns_line_1_min + list_line_columns_line_1_max_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(line_columns_line_1_max_enabled)) { + if (!line_columns_line_1_max_enabled %in% list_line_columns_line_1_max_enabled) { + stop("`line_columns_line_1_max_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && line_columns_line_1_max_enabled %in% names(named_list)) { + if (is.logical(line_columns_line_1_max_enabled)) { + line_columns_line_1_max_enabled <- as.character(line_columns_line_1_max_enabled) + } + named_list_value <- unname(named_list[line_columns_line_1_max_enabled])[[1]] + new_list$x$state$line_columns$line_1_max_enabled <- named_list_value + } + } + } + } + new_list$x$state$line_columns$line_1_max <- line_columns_line_1_max + list_mobile_view <- c(FALSE, TRUE, NULL) + if (!is.null(mobile_view)) { + if (!mobile_view %in% list_mobile_view) { + stop("`mobile_view` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && mobile_view %in% names(named_list)) { + if (is.logical(mobile_view)) { + mobile_view <- as.character(mobile_view) + } + named_list_value <- unname(named_list[mobile_view])[[1]] + new_list$x$state$mobile$view <- named_list_value + } + } + } + } + new_list$x$state$mobile$breakpoint <- mobile_breakpoint + list_mobile_cell_font_size <- c("1", "1.25", "1.5", "custom", NULL) + if (!is.null(mobile_cell_font_size)) { + if (!mobile_cell_font_size %in% list_mobile_cell_font_size) { + stop("`mobile_cell_font_size` must be one of: c('1', '1.25', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1": "1", "1.25": "1.25", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1": "1", "1.25": "1.25", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && mobile_cell_font_size %in% names(named_list)) { + if (is.logical(mobile_cell_font_size)) { + mobile_cell_font_size <- as.character(mobile_cell_font_size) + } + named_list_value <- unname(named_list[mobile_cell_font_size])[[1]] + new_list$x$state$mobile$cell_font_size <- named_list_value + } + } + } + } + new_list$x$state$mobile$cell_font_size_custom <- mobile_cell_font_size_custom + new_list$x$state$mobile$pagination_amount <- mobile_pagination_amount + list_search_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(search_enabled)) { + if (!search_enabled %in% list_search_enabled) { + stop("`search_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && search_enabled %in% names(named_list)) { + if (is.logical(search_enabled)) { + search_enabled <- as.character(search_enabled) + } + named_list_value <- unname(named_list[search_enabled])[[1]] + new_list$x$state$search_enabled <- named_list_value + } + } + } + } + list_search_mode <- c("anywhere", "start", "whole", NULL) + if (!is.null(search_mode)) { + if (!search_mode %in% list_search_mode) { + stop("`search_mode` must be one of: c('anywhere', 'start', 'whole')") + } else { + if (length(jsonlite::fromJSON('{"anywhere": "anywhere", "start": "start", "whole": "whole"}')) > 1) { + named_list <- jsonlite::fromJSON('{"anywhere": "anywhere", "start": "start", "whole": "whole"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && search_mode %in% names(named_list)) { + if (is.logical(search_mode)) { + search_mode <- as.character(search_mode) + } + named_list_value <- unname(named_list[search_mode])[[1]] + new_list$x$state$search_mode <- named_list_value + } + } + } + } + new_list$x$state$search_width <- search_width + new_list$x$state$search_background_color <- search_background_color + new_list$x$state$search_text_color <- search_text_color + new_list$x$state$search_placeholder <- search_placeholder + new_list$x$state$no_results_text <- no_results_text + new_list$x$state$search_hide_table <- search_hide_table + new_list$x$state$search_hide_published <- search_hide_published + list_search_columns <- c("all", "first", "custom", NULL) + if (!is.null(search_columns)) { + if (!search_columns %in% list_search_columns) { + stop("`search_columns` must be one of: c('all', 'first', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"all": "all", "first": "first", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"all": "all", "first": "first", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && search_columns %in% names(named_list)) { + if (is.logical(search_columns)) { + search_columns <- as.character(search_columns) + } + named_list_value <- unname(named_list[search_columns])[[1]] + new_list$x$state$search_columns <- named_list_value + } + } + } + } + if (length(search_columns_custom) > 1) { + new_list$x$state$search_columns_custom <- paste(search_columns_custom, collapse = "\n") + } else { + new_list$x$state$search_columns_custom <- search_columns_custom + } + + list_search_resize <- c(TRUE, FALSE, NULL) + if (!is.null(search_resize)) { + if (!search_resize %in% list_search_resize) { + stop("`search_resize` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && search_resize %in% names(named_list)) { + if (is.logical(search_resize)) { + search_resize <- as.character(search_resize) + } + named_list_value <- unname(named_list[search_resize])[[1]] + new_list$x$state$search_resize <- named_list_value + } + } + } + } + list_search_dropdown <- c(TRUE, FALSE, NULL) + if (!is.null(search_dropdown)) { + if (!search_dropdown %in% list_search_dropdown) { + stop("`search_dropdown` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && search_dropdown %in% names(named_list)) { + if (is.logical(search_dropdown)) { + search_dropdown <- as.character(search_dropdown) + } + named_list_value <- unname(named_list[search_dropdown])[[1]] + new_list$x$state$search_dropdown <- named_list_value + } + } + } + } + new_list$x$state$search_dropdown_persistent <- search_dropdown_persistent + new_list$x$state$search_val <- search_val + list_chart_popup_show_popups <- c(TRUE, FALSE, NULL) + if (!is.null(chart_popup_show_popups)) { + if (!chart_popup_show_popups %in% list_chart_popup_show_popups) { + stop("`chart_popup_show_popups` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_show_popups %in% names(named_list)) { + if (is.logical(chart_popup_show_popups)) { + chart_popup_show_popups <- as.character(chart_popup_show_popups) + } + named_list_value <- unname(named_list[chart_popup_show_popups])[[1]] + new_list$x$state$popup$show_popups <- named_list_value + } + } + } + } + list_chart_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_is_custom)) { + if (!chart_popup_is_custom %in% list_chart_popup_is_custom) { + stop("`chart_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_is_custom)) { + chart_popup_is_custom <- as.character(chart_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_is_custom])[[1]] + new_list$x$state$popup$is_custom <- named_list_value + } + } + } + } + if (length(chart_popup_custom_template) > 1) { + new_list$x$state$popup$custom_template <- paste(chart_popup_custom_template, collapse = "\n") + } else { + new_list$x$state$popup$custom_template <- chart_popup_custom_template + } + + new_list$x$state$popup$show_pointer <- chart_popup_show_pointer + new_list$x$state$popup$show_shadow <- chart_popup_show_shadow + new_list$x$state$popup$style_popups <- chart_popup_style_popups + new_list$x$state$popup$text_color <- chart_popup_text_color + list_chart_popup_align <- c("left", "center", "right", NULL) + if (!is.null(chart_popup_align)) { + if (!chart_popup_align %in% list_chart_popup_align) { + stop("`chart_popup_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_align)) { + chart_popup_align <- as.character(chart_popup_align) + } + named_list_value <- unname(named_list[chart_popup_align])[[1]] + new_list$x$state$popup$align <- named_list_value + } + } + } + } + new_list$x$state$popup$text_size <- chart_popup_text_size + new_list$x$state$popup$fill_color <- chart_popup_fill_color + new_list$x$state$popup$opacity <- chart_popup_opacity + new_list$x$state$popup$padding <- chart_popup_padding + new_list$x$state$popup$border_radius <- chart_popup_border_radius + new_list$x$state$popup$max_width <- chart_popup_max_width + if (length(formatted_columns) > 1) { + new_list$x$state$formatted_columns <- paste(formatted_columns, collapse = "\n") + } else { + new_list$x$state$formatted_columns <- formatted_columns + } + + new_list$x$state$number_format$prefix <- chart_number_date_format_prefix + new_list$x$state$number_format$suffix <- chart_number_date_format_suffix + new_list$x$state$number_format$n_dec <- chart_number_date_format_n_dec + new_list$x$state$number_format$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$number_format$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$number_format$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$number_format$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$number_format$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$number_format$transform <- named_list_value + } + } + } + } + new_list$x$state$number_format$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$number_format$exponentiate_constant <- chart_number_date_format_exponentiate_constant + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + new_list$x$state$url_state$enabled <- chart_url_settings_enabled + if (length(chart_url_settings_whitelist) > 1) { + new_list$x$state$url_state$whitelist <- paste(chart_url_settings_whitelist, collapse = "\n") + } else { + new_list$x$state$url_state$whitelist <- chart_url_settings_whitelist + } + + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_text_annotator_details.R b/R_package/R/set_text_annotator_details.R new file mode 100644 index 0000000..1156db0 --- /dev/null +++ b/R_package/R/set_text_annotator_details.R @@ -0,0 +1,1819 @@ +#' Set text annotator chart details +#' @name set_text_annotator_details +#' @param text Text. Fill in the text you want to annotate In the datasheet, you can write which parts of the text should be annotated. If you want to annotate a specific part of the text that occurs more than once, you can add identifiers to your text. For example, annotating the word beautiful would look like: `[beautiful]{beautiful-annotation}`. Then, in the datasheet, you can write beautiful-annotation in the first column and the text to include in the annotation in the second column. Flourish type hint: html, defaults to `NULL` +#' @param highlight_color Highlight color. Flourish type hint: color, defaults to `NULL` +#' @param layout_align Align. Choices: center, start. Flourish type hint: string, defaults to `NULL` +#' @param text_container_width Width. Max width of text container. Flourish type hint: number, defaults to `NULL` +#' @param text_font_size Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param text_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param text_font_color_highlighted Text color (highlighted). Flourish type hint: color, defaults to `NULL` +#' @param text_font_color_highlighted_contrast Text color (highlighted). Flourish type hint: color, defaults to `NULL` +#' @param text_highlight_type Highlight type. Choices: handdrawn, background, text_color, underline. Flourish type hint: string, defaults to `NULL` +#' @param text_highlight_handdrawn Handdrawn type. Choices: circle, highlight, box, underline. Flourish type hint: string, defaults to `NULL` +#' @param highlighted_stroke_end Stroke end. Choices: round,Flourish type hint: string, defaults to `NULL` +#' @param highlighted_stroke_amount Iterations. Number of lines to draw. Flourish type hint: number, defaults to `NULL` +#' @param highlighted_stroke_width Thickness. Flourish type hint: number, defaults to `NULL` +#' @param note_type Mode. Choices: side-panel, inline. Flourish type hint: string, defaults to `NULL` +#' @param note_visibility Show notes. Choices: always, click. Flourish type hint: string, defaults to `NULL` +#' @param note_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param side_panel_width Width. Max width of side panel. Flourish type hint: number, defaults to `NULL` +#' @param note_font_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param note_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param note_custom_content Note content. Use `{{NOTE}}` to show the annotation content. Use this setting to add prefixes, suffixes or additional HTML styling to your annotations. Flourish type hint: html, defaults to `NULL` +#' @param note_mobile_mode Mobile mode. Choices: side-panel, inline, overlay. Choose where to display the notes on smaller screens. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "text_annotator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_text_annotator_data(gapminder) |> +#' set_text_annotator_details() +#' ) +#' @export + +set_text_annotator_details <- function( + ., + text = NULL, + highlight_color = NULL, + layout_align = NULL, + text_container_width = NULL, + text_font_size = NULL, + text_font_color = NULL, + text_font_color_highlighted = NULL, + text_font_color_highlighted_contrast = NULL, + text_highlight_type = NULL, + text_highlight_handdrawn = NULL, + highlighted_stroke_end = NULL, + highlighted_stroke_amount = NULL, + highlighted_stroke_width = NULL, + note_type = NULL, + note_visibility = NULL, + note_font_size = NULL, + side_panel_width = NULL, + note_font_color = NULL, + note_background_color = NULL, + note_custom_content = NULL, + note_mobile_mode = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "text_annotator") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/text-annotator")) { + stop("`set_text_annotator_details()` is not supported for this chart type.") + } + if (length(text) > 1) { + new_list$x$state$text <- paste(text, collapse = "\n") + } else { + new_list$x$state$text <- text + } + + new_list$x$state$highlight_color <- highlight_color + list_layout_align <- c("center", "start", NULL) + if (!is.null(layout_align)) { + if (!layout_align %in% list_layout_align) { + stop("`layout_align` must be one of: c('center', 'start')") + } else { + if (length(jsonlite::fromJSON('{"center": "center", "start": "start"}')) > 1) { + named_list <- jsonlite::fromJSON('{"center": "center", "start": "start"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && layout_align %in% names(named_list)) { + if (is.logical(layout_align)) { + layout_align <- as.character(layout_align) + } + named_list_value <- unname(named_list[layout_align])[[1]] + new_list$x$state$layout_align <- named_list_value + } + } + } + } + new_list$x$state$text_container_width <- text_container_width + new_list$x$state$text_font_size <- text_font_size + new_list$x$state$text_font_color <- text_font_color + new_list$x$state$text_font_color_highlighted <- text_font_color_highlighted + new_list$x$state$text_font_color_highlighted_contrast <- text_font_color_highlighted_contrast + list_text_highlight_type <- c("handdrawn", "background", "text_color", "underline", NULL) + if (!is.null(text_highlight_type)) { + if (!text_highlight_type %in% list_text_highlight_type) { + stop("`text_highlight_type` must be one of: c('handdrawn', 'background', 'text_color', 'underline')") + } else { + if (length(jsonlite::fromJSON('{"handdrawn": "handdrawn", "background": "background", "text_color": "text_color", "underline": "underline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"handdrawn": "handdrawn", "background": "background", "text_color": "text_color", "underline": "underline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && text_highlight_type %in% names(named_list)) { + if (is.logical(text_highlight_type)) { + text_highlight_type <- as.character(text_highlight_type) + } + named_list_value <- unname(named_list[text_highlight_type])[[1]] + new_list$x$state$text_highlight_type <- named_list_value + } + } + } + } + list_text_highlight_handdrawn <- c("circle", "highlight", "box", "underline", NULL) + if (!is.null(text_highlight_handdrawn)) { + if (!text_highlight_handdrawn %in% list_text_highlight_handdrawn) { + stop("`text_highlight_handdrawn` must be one of: c('circle', 'highlight', 'box', 'underline')") + } else { + if (length(jsonlite::fromJSON('{"circle": "circle", "highlight": "highlight", "box": "box", "underline": "underline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"circle": "circle", "highlight": "highlight", "box": "box", "underline": "underline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && text_highlight_handdrawn %in% names(named_list)) { + if (is.logical(text_highlight_handdrawn)) { + text_highlight_handdrawn <- as.character(text_highlight_handdrawn) + } + named_list_value <- unname(named_list[text_highlight_handdrawn])[[1]] + new_list$x$state$text_highlight_handdrawn <- named_list_value + } + } + } + } + list_highlighted_stroke_end <- c("round", "", NULL) + if (!is.null(highlighted_stroke_end)) { + if (!highlighted_stroke_end %in% list_highlighted_stroke_end) { + stop("`highlighted_stroke_end` must be one of: c('round', '')") + } else { + if (length(jsonlite::fromJSON('{"round": "round", "": ""}')) > 1) { + named_list <- jsonlite::fromJSON('{"round": "round", "": ""}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && highlighted_stroke_end %in% names(named_list)) { + if (is.logical(highlighted_stroke_end)) { + highlighted_stroke_end <- as.character(highlighted_stroke_end) + } + named_list_value <- unname(named_list[highlighted_stroke_end])[[1]] + new_list$x$state$highlighted_stroke_end <- named_list_value + } + } + } + } + new_list$x$state$highlighted_stroke_amount <- highlighted_stroke_amount + new_list$x$state$highlighted_stroke_width <- highlighted_stroke_width + list_note_type <- c("side-panel", "inline", NULL) + if (!is.null(note_type)) { + if (!note_type %in% list_note_type) { + stop("`note_type` must be one of: c('side-panel', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"side-panel": "side-panel", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"side-panel": "side-panel", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && note_type %in% names(named_list)) { + if (is.logical(note_type)) { + note_type <- as.character(note_type) + } + named_list_value <- unname(named_list[note_type])[[1]] + new_list$x$state$note_type <- named_list_value + } + } + } + } + list_note_visibility <- c("always", "click", NULL) + if (!is.null(note_visibility)) { + if (!note_visibility %in% list_note_visibility) { + stop("`note_visibility` must be one of: c('always', 'click')") + } else { + if (length(jsonlite::fromJSON('{"always": "always", "click": "click"}')) > 1) { + named_list <- jsonlite::fromJSON('{"always": "always", "click": "click"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && note_visibility %in% names(named_list)) { + if (is.logical(note_visibility)) { + note_visibility <- as.character(note_visibility) + } + named_list_value <- unname(named_list[note_visibility])[[1]] + new_list$x$state$note_visibility <- named_list_value + } + } + } + } + new_list$x$state$note_font_size <- note_font_size + new_list$x$state$side_panel_width <- side_panel_width + new_list$x$state$note_font_color <- note_font_color + new_list$x$state$note_background_color <- note_background_color + if (length(note_custom_content) > 1) { + new_list$x$state$note_custom_content <- paste(note_custom_content, collapse = "\n") + } else { + new_list$x$state$note_custom_content <- note_custom_content + } + + list_note_mobile_mode <- c("side-panel", "inline", "overlay", NULL) + if (!is.null(note_mobile_mode)) { + if (!note_mobile_mode %in% list_note_mobile_mode) { + stop("`note_mobile_mode` must be one of: c('side-panel', 'inline', 'overlay')") + } else { + if (length(jsonlite::fromJSON('{"side-panel": "side-panel", "inline": "inline", "overlay": "overlay"}')) > 1) { + named_list <- jsonlite::fromJSON('{"side-panel": "side-panel", "inline": "inline", "overlay": "overlay"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && note_mobile_mode %in% names(named_list)) { + if (is.logical(note_mobile_mode)) { + note_mobile_mode <- as.character(note_mobile_mode) + } + named_list_value <- unname(named_list[note_mobile_mode])[[1]] + new_list$x$state$note_mobile_mode <- named_list_value + } + } + } + } + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_timeline_details.R b/R_package/R/set_timeline_details.R new file mode 100644 index 0000000..9cf40fa --- /dev/null +++ b/R_package/R/set_timeline_details.R @@ -0,0 +1,4669 @@ +#' Set timeline chart details +#' @name set_timeline_details +#' @param widescreen_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param height_mode Height mode. Choices: auto, standard, aspect. Auto: sets the height based on the chart type, data and width. Standard: uses the default Flourish responsive sizing. Aspect ratio: sets the aspect of each plot. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to `NULL` +#' @param facet_aspect Desktop aspect. Choices: 0.75, 1, 1.5, custom. Aspect ratio of the visualization in desktop mode. Flourish type hint: string, defaults to `NULL` +#' @param facet_aspect_custom Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param facet_aspect_breakpoint Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to `NULL` +#' @param facet_aspect_mobile Mobile aspect. Choices: 0.75, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param facet_aspect_mobile_custom Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param line_color Color. Flourish type hint: color, defaults to `NULL` +#' @param line_width Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param line_cap Cap. Choices: butt, round, square. The shape used to draw the end points. Flourish type hint: string, defaults to `NULL` +#' @param events_scale_type Choices: linear, timescale. Flourish type hint: string, defaults to `NULL` +#' @param background_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param background_sizing Sizing. Choices: contain, cover, zoom. Flourish type hint: string, defaults to `NULL` +#' @param background_zoom Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to `NULL` +#' @param background_gradient_size Size. Flourish type hint: number, defaults to `NULL` +#' @param background_gradient_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param background_gradient_blur Blur. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param marker_size Size. Flourish type hint: number, defaults to `NULL` +#' @param marker_background_color Color. Choices: data, custom. Flourish type hint: string, defaults to `NULL` +#' @param marker_background_color_custom Flourish type hint: color, defaults to `NULL` +#' @param marker_border_width Size. Flourish type hint: number, defaults to `NULL` +#' @param marker_border_color Color. Choices: data, custom. Flourish type hint: string, defaults to `NULL` +#' @param marker_border_color_custom Flourish type hint: color, defaults to `NULL` +#' @param connector_size Size. Flourish type hint: number, defaults to `NULL` +#' @param connector_space Space. Sets the area around the markers to keep clear of content containers. Flourish type hint: number, defaults to `NULL` +#' @param connector_color Color. Flourish type hint: color, defaults to `NULL` +#' @param connector_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param content_background_color Background. Flourish type hint: color, defaults to `NULL` +#' @param content_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param content_space_between Space between. Defines the minimum amount of space between each content container. Flourish type hint: number, defaults to `NULL` +#' @param content_consistent_size Keep sizes consistent. Flourish type hint: boolean, defaults to `NULL` +#' @param content_border_radius Radius. Flourish type hint: number, defaults to `NULL` +#' @param individual_borders Style borders individually. Flourish type hint: boolean, defaults to `NULL` +#' @param content_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param content_border_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param content_border_color Color. Choices: data, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_border_color_custom Flourish type hint: color, defaults to `NULL` +#' @param content_border_top_width Width. Flourish type hint: number, defaults to `NULL` +#' @param content_border_top_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param content_border_top_color Color. Choices: data, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_border_top_color_custom Flourish type hint: color, defaults to `NULL` +#' @param content_border_right_width Width. Flourish type hint: number, defaults to `NULL` +#' @param content_border_right_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param content_border_right_color Color. Choices: data, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_border_right_color_custom Flourish type hint: color, defaults to `NULL` +#' @param content_border_bottom_width Width. Flourish type hint: number, defaults to `NULL` +#' @param content_border_bottom_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param content_border_bottom_color Color. Choices: data, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_border_bottom_color_custom Flourish type hint: color, defaults to `NULL` +#' @param content_border_left_width Width. Flourish type hint: number, defaults to `NULL` +#' @param content_border_left_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param content_border_left_color Color. Choices: data, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_border_left_color_custom Flourish type hint: color, defaults to `NULL` +#' @param content_title_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param content_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param content_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param content_title_size Size. Choices: 1.0, 1.2, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_title_size_custom Custom. Specify a custom responsive font size. Best results will be with values between 0.8 and 3. Flourish type hint: number, defaults to `NULL` +#' @param content_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param content_title_color Color. Choices: data, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_title_color_custom Flourish type hint: color, defaults to `NULL` +#' @param content_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param content_subtitle_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param content_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param content_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param content_subtitle_size Size. Choices: 1.0, 1.2, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_subtitle_size_custom Custom. Specify a custom responsive font size. Best results will be with values between 0.8 and 3. Flourish type hint: number, defaults to `NULL` +#' @param content_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param content_subtitle_color Color. Choices: data, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_subtitle_color_custom Flourish type hint: color, defaults to `NULL` +#' @param content_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param content_text_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param content_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param content_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param content_text_size Size. Choices: 1.0, 1.2, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_text_size_custom Custom. Specify a custom responsive font size. Best results will be with values between 0.8 and 3. Flourish type hint: number, defaults to `NULL` +#' @param content_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param content_text_color Color. Choices: data, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_text_color_custom Flourish type hint: color, defaults to `NULL` +#' @param content_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param link_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param link_color Color. Flourish type hint: color, defaults to `NULL` +#' @param link_underline Underline. Flourish type hint: boolean, defaults to `NULL` +#' @param image_location Location. Choices: none, marker, content. Flourish type hint: string, defaults to `NULL` +#' @param image_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param image_display Content display. Choices: float, inline, banner, background. Flourish type hint: string, defaults to `NULL` +#' @param image_sizing Sizing. Choices: contain, cover, zoom. Flourish type hint: string, defaults to `NULL` +#' @param image_zoom Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to `NULL` +#' @param image_content_sizing Sizing. Choices: contain, cover, zoom. Flourish type hint: string, defaults to `NULL` +#' @param image_content_zoom Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to `NULL` +#' @param image_float_position Position. Choices: 1, 2. Flourish type hint: string, defaults to `NULL` +#' @param image_inline_position Position. Choices: 1, 2, 3. Flourish type hint: string, defaults to `NULL` +#' @param image_alignment Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param content_banner_depth Banner depth. Choices: 2, 4, 6, custom. Flourish type hint: string, defaults to `NULL` +#' @param content_banner_depth_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param image_width Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param image_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param image_aspect Aspect ratio. As a multiplier of the images width. For example: a value of 2, means the image height is 2 times the image width. Flourish type hint: number, defaults to `NULL` +#' @param navigation_step_type Step by. Choices: screen, event. Determines by which measure the timeline is approximately moved each time the navigation buttons are clicked. Flourish type hint: string, defaults to `NULL` +#' @param navigation_screen_proportion Proportion. Flourish type hint: number, defaults to `NULL` +#' @param navigation_event_number Number. Flourish type hint: number, defaults to `NULL` +#' @param navigation_icon_type Icon. Choices: default, custom. Flourish type hint: string, defaults to `NULL` +#' @param navigation_icon_size Size. Flourish type hint: number, defaults to `NULL` +#' @param navigation_icon_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param navigation_icon_custom Custom icon. Flourish type hint: url, defaults to `NULL` +#' @param navigation_icon_color Color. Flourish type hint: color, defaults to `NULL` +#' @param navigation_gradient_color Color. If undefined the color will default to the background of the visualization. Flourish type hint: color, defaults to `NULL` +#' @param navigation_gradient_width Width. Flourish type hint: number, defaults to `NULL` +#' @param navigation_gradient_opacity Opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_axis_position Position. Choices: bottom, top, hidden. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_y_axis_position Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_zero_axis Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_position Position. Choices: default, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_tick_side Tick side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_x_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_x_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_x_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_axis_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_numeric_scale_type Type. Choices: linear, log. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_linear_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_linear_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_log_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_datetime_min Min (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_datetime_max Max (date). Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_flip Flip axis. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_show_scale_settings Configure default min/max. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_nice Round min/max. Choices: `TRUE`, `FALSE`. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_zero_axis Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_mode Type. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title Text. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_title_position Position. Choices: side, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_title_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_title_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_position Position. Choices: default, above, below. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_tick_label_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_tick_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_angle Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_max_lines Max lines. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_label_space_mode Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_label_space Space. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_mode Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_tick_number Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_custom One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_color Line color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_line_and_tick_width Line width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_length Tick length. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_tick_side Side. Choices: out, in. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_line_visible Axis line. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_edge_padding Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridlines_visible Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridlines_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_y_axis_gridline_style Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to `NULL` +#' @param chart_y_axis_gridline_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_y_axis_gridline_category_dividers_extend Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_show_legend Legend mode. Choices: `TRUE`, `FALSE`. A legend will not show with a single entry. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_title_mode Title mode. Choices: auto, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_title Title. Flourish type hint: string, defaults to `NULL` +#' @param chart_categorical_legend_swatch_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_radius Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_legend_items_padding Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_categorical_legend_swatch_outline_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_order_override Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to `NULL` +#' @param chart_categorical_legend_icon_height Height. Height of icon ( in rems ). Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_icon_color Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to `NULL` +#' @param chart_categorical_legend_max_width Max width. Flourish type hint: number, defaults to `NULL` +#' @param chart_categorical_legend_orientation Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "timeline", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_timeline_data(gapminder) |> +#' set_timeline_details() +#' ) +#' @export + +set_timeline_details <- function( + ., + widescreen_orientation = NULL, + height_mode = NULL, + facet_aspect = NULL, + facet_aspect_custom = NULL, + facet_aspect_breakpoint = NULL, + facet_aspect_mobile = NULL, + facet_aspect_mobile_custom = NULL, + line_color = NULL, + line_width = NULL, + line_cap = NULL, + events_scale_type = NULL, + background_opacity = NULL, + background_sizing = NULL, + background_zoom = NULL, + background_gradient_size = NULL, + background_gradient_opacity = NULL, + background_gradient_blur = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + marker_size = NULL, + marker_background_color = NULL, + marker_background_color_custom = NULL, + marker_border_width = NULL, + marker_border_color = NULL, + marker_border_color_custom = NULL, + connector_size = NULL, + connector_space = NULL, + connector_color = NULL, + connector_opacity = NULL, + content_background_color = NULL, + content_padding = NULL, + content_space_between = NULL, + content_consistent_size = NULL, + content_border_radius = NULL, + individual_borders = NULL, + content_border_width = NULL, + content_border_opacity = NULL, + content_border_color = NULL, + content_border_color_custom = NULL, + content_border_top_width = NULL, + content_border_top_opacity = NULL, + content_border_top_color = NULL, + content_border_top_color_custom = NULL, + content_border_right_width = NULL, + content_border_right_opacity = NULL, + content_border_right_color = NULL, + content_border_right_color_custom = NULL, + content_border_bottom_width = NULL, + content_border_bottom_opacity = NULL, + content_border_bottom_color = NULL, + content_border_bottom_color_custom = NULL, + content_border_left_width = NULL, + content_border_left_opacity = NULL, + content_border_left_color = NULL, + content_border_left_color_custom = NULL, + content_title_alignment = NULL, + content_title_styling = NULL, + content_title_line_height = NULL, + content_title_size = NULL, + content_title_size_custom = NULL, + content_title_weight = NULL, + content_title_color = NULL, + content_title_color_custom = NULL, + content_title_space_above = NULL, + content_title_space_above_custom = NULL, + content_subtitle_alignment = NULL, + content_subtitle_styling = NULL, + content_subtitle_line_height = NULL, + content_subtitle_size = NULL, + content_subtitle_size_custom = NULL, + content_subtitle_weight = NULL, + content_subtitle_color = NULL, + content_subtitle_color_custom = NULL, + content_subtitle_space_above = NULL, + content_subtitle_space_above_custom = NULL, + content_text_alignment = NULL, + content_text_styling = NULL, + content_text_line_height = NULL, + content_text_size = NULL, + content_text_size_custom = NULL, + content_text_weight = NULL, + content_text_color = NULL, + content_text_color_custom = NULL, + content_text_space_above = NULL, + content_text_space_above_custom = NULL, + link_weight = NULL, + link_color = NULL, + link_underline = NULL, + image_location = NULL, + image_opacity = NULL, + image_display = NULL, + image_sizing = NULL, + image_zoom = NULL, + image_content_sizing = NULL, + image_content_zoom = NULL, + image_float_position = NULL, + image_inline_position = NULL, + image_alignment = NULL, + content_banner_depth = NULL, + content_banner_depth_custom = NULL, + image_width = NULL, + image_margin = NULL, + image_aspect = NULL, + navigation_step_type = NULL, + navigation_screen_proportion = NULL, + navigation_event_number = NULL, + navigation_icon_type = NULL, + navigation_icon_size = NULL, + navigation_icon_opacity = NULL, + navigation_icon_custom = NULL, + navigation_icon_color = NULL, + navigation_gradient_color = NULL, + navigation_gradient_width = NULL, + navigation_gradient_opacity = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "timeline") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/timeline")) { + stop("`set_timeline_details()` is not supported for this chart type.") + } + list_widescreen_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(widescreen_orientation)) { + if (!widescreen_orientation %in% list_widescreen_orientation) { + stop("`widescreen_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && widescreen_orientation %in% names(named_list)) { + if (is.logical(widescreen_orientation)) { + widescreen_orientation <- as.character(widescreen_orientation) + } + named_list_value <- unname(named_list[widescreen_orientation])[[1]] + new_list$x$state$widescreen_orientation <- named_list_value + } + } + } + } + list_height_mode <- c("auto", "standard", "aspect", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('auto', 'standard', 'aspect')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "standard": "standard", "aspect": "aspect"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "standard": "standard", "aspect": "aspect"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + list_facet_aspect <- c("0.75", "1", "1.5", "custom", NULL) + if (!is.null(facet_aspect)) { + if (!facet_aspect %in% list_facet_aspect) { + stop("`facet_aspect` must be one of: c('0.75', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.75": "0.75", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.75": "0.75", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && facet_aspect %in% names(named_list)) { + if (is.logical(facet_aspect)) { + facet_aspect <- as.character(facet_aspect) + } + named_list_value <- unname(named_list[facet_aspect])[[1]] + new_list$x$state$facet_aspect <- named_list_value + } + } + } + } + new_list$x$state$facet_aspect_custom <- facet_aspect_custom + new_list$x$state$facet_aspect_breakpoint <- facet_aspect_breakpoint + list_facet_aspect_mobile <- c("0.75", "1", "1.5", "custom", NULL) + if (!is.null(facet_aspect_mobile)) { + if (!facet_aspect_mobile %in% list_facet_aspect_mobile) { + stop("`facet_aspect_mobile` must be one of: c('0.75', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.75": "0.75", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.75": "0.75", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && facet_aspect_mobile %in% names(named_list)) { + if (is.logical(facet_aspect_mobile)) { + facet_aspect_mobile <- as.character(facet_aspect_mobile) + } + named_list_value <- unname(named_list[facet_aspect_mobile])[[1]] + new_list$x$state$facet_aspect_mobile <- named_list_value + } + } + } + } + new_list$x$state$facet_aspect_mobile_custom <- facet_aspect_mobile_custom + new_list$x$state$line_color <- line_color + new_list$x$state$line_width <- line_width + list_line_cap <- c("butt", "round", "square", NULL) + if (!is.null(line_cap)) { + if (!line_cap %in% list_line_cap) { + stop("`line_cap` must be one of: c('butt', 'round', 'square')") + } else { + if (length(jsonlite::fromJSON('{"butt": "butt", "round": "round", "square": "square"}')) > 1) { + named_list <- jsonlite::fromJSON('{"butt": "butt", "round": "round", "square": "square"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && line_cap %in% names(named_list)) { + if (is.logical(line_cap)) { + line_cap <- as.character(line_cap) + } + named_list_value <- unname(named_list[line_cap])[[1]] + new_list$x$state$line_cap <- named_list_value + } + } + } + } + list_events_scale_type <- c("linear", "timescale", NULL) + if (!is.null(events_scale_type)) { + if (!events_scale_type %in% list_events_scale_type) { + stop("`events_scale_type` must be one of: c('linear', 'timescale')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "timescale": "timescale"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "timescale": "timescale"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && events_scale_type %in% names(named_list)) { + if (is.logical(events_scale_type)) { + events_scale_type <- as.character(events_scale_type) + } + named_list_value <- unname(named_list[events_scale_type])[[1]] + new_list$x$state$events_scale_type <- named_list_value + } + } + } + } + new_list$x$state$background_opacity <- background_opacity + list_background_sizing <- c("contain", "cover", "zoom", NULL) + if (!is.null(background_sizing)) { + if (!background_sizing %in% list_background_sizing) { + stop("`background_sizing` must be one of: c('contain', 'cover', 'zoom')") + } else { + if (length(jsonlite::fromJSON('{"contain": "contain", "cover": "cover", "zoom": "zoom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"contain": "contain", "cover": "cover", "zoom": "zoom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && background_sizing %in% names(named_list)) { + if (is.logical(background_sizing)) { + background_sizing <- as.character(background_sizing) + } + named_list_value <- unname(named_list[background_sizing])[[1]] + new_list$x$state$background_sizing <- named_list_value + } + } + } + } + new_list$x$state$background_zoom <- background_zoom + new_list$x$state$background_gradient_size <- background_gradient_size + new_list$x$state$background_gradient_opacity <- background_gradient_opacity + new_list$x$state$background_gradient_blur <- background_gradient_blur + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + new_list$x$state$marker_size <- marker_size + list_marker_background_color <- c("data", "custom", NULL) + if (!is.null(marker_background_color)) { + if (!marker_background_color %in% list_marker_background_color) { + stop("`marker_background_color` must be one of: c('data', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && marker_background_color %in% names(named_list)) { + if (is.logical(marker_background_color)) { + marker_background_color <- as.character(marker_background_color) + } + named_list_value <- unname(named_list[marker_background_color])[[1]] + new_list$x$state$marker_background_color <- named_list_value + } + } + } + } + new_list$x$state$marker_background_color_custom <- marker_background_color_custom + new_list$x$state$marker_border_width <- marker_border_width + list_marker_border_color <- c("data", "custom", NULL) + if (!is.null(marker_border_color)) { + if (!marker_border_color %in% list_marker_border_color) { + stop("`marker_border_color` must be one of: c('data', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && marker_border_color %in% names(named_list)) { + if (is.logical(marker_border_color)) { + marker_border_color <- as.character(marker_border_color) + } + named_list_value <- unname(named_list[marker_border_color])[[1]] + new_list$x$state$marker_border_color <- named_list_value + } + } + } + } + new_list$x$state$marker_border_color_custom <- marker_border_color_custom + new_list$x$state$connector_size <- connector_size + new_list$x$state$connector_space <- connector_space + new_list$x$state$connector_color <- connector_color + new_list$x$state$connector_opacity <- connector_opacity + new_list$x$state$content_background_color <- content_background_color + new_list$x$state$content_padding <- content_padding + new_list$x$state$content_space_between <- content_space_between + new_list$x$state$content_consistent_size <- content_consistent_size + new_list$x$state$content_border_radius <- content_border_radius + new_list$x$state$individual_borders <- individual_borders + new_list$x$state$content_border_width <- content_border_width + new_list$x$state$content_border_opacity <- content_border_opacity + list_content_border_color <- c("data", "custom", NULL) + if (!is.null(content_border_color)) { + if (!content_border_color %in% list_content_border_color) { + stop("`content_border_color` must be one of: c('data', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_border_color %in% names(named_list)) { + if (is.logical(content_border_color)) { + content_border_color <- as.character(content_border_color) + } + named_list_value <- unname(named_list[content_border_color])[[1]] + new_list$x$state$content_border_color <- named_list_value + } + } + } + } + new_list$x$state$content_border_color_custom <- content_border_color_custom + new_list$x$state$content_border_top_width <- content_border_top_width + new_list$x$state$content_border_top_opacity <- content_border_top_opacity + list_content_border_top_color <- c("data", "custom", NULL) + if (!is.null(content_border_top_color)) { + if (!content_border_top_color %in% list_content_border_top_color) { + stop("`content_border_top_color` must be one of: c('data', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_border_top_color %in% names(named_list)) { + if (is.logical(content_border_top_color)) { + content_border_top_color <- as.character(content_border_top_color) + } + named_list_value <- unname(named_list[content_border_top_color])[[1]] + new_list$x$state$content_border_top_color <- named_list_value + } + } + } + } + new_list$x$state$content_border_top_color_custom <- content_border_top_color_custom + new_list$x$state$content_border_right_width <- content_border_right_width + new_list$x$state$content_border_right_opacity <- content_border_right_opacity + list_content_border_right_color <- c("data", "custom", NULL) + if (!is.null(content_border_right_color)) { + if (!content_border_right_color %in% list_content_border_right_color) { + stop("`content_border_right_color` must be one of: c('data', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_border_right_color %in% names(named_list)) { + if (is.logical(content_border_right_color)) { + content_border_right_color <- as.character(content_border_right_color) + } + named_list_value <- unname(named_list[content_border_right_color])[[1]] + new_list$x$state$content_border_right_color <- named_list_value + } + } + } + } + new_list$x$state$content_border_right_color_custom <- content_border_right_color_custom + new_list$x$state$content_border_bottom_width <- content_border_bottom_width + new_list$x$state$content_border_bottom_opacity <- content_border_bottom_opacity + list_content_border_bottom_color <- c("data", "custom", NULL) + if (!is.null(content_border_bottom_color)) { + if (!content_border_bottom_color %in% list_content_border_bottom_color) { + stop("`content_border_bottom_color` must be one of: c('data', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_border_bottom_color %in% names(named_list)) { + if (is.logical(content_border_bottom_color)) { + content_border_bottom_color <- as.character(content_border_bottom_color) + } + named_list_value <- unname(named_list[content_border_bottom_color])[[1]] + new_list$x$state$content_border_bottom_color <- named_list_value + } + } + } + } + new_list$x$state$content_border_bottom_color_custom <- content_border_bottom_color_custom + new_list$x$state$content_border_left_width <- content_border_left_width + new_list$x$state$content_border_left_opacity <- content_border_left_opacity + list_content_border_left_color <- c("data", "custom", NULL) + if (!is.null(content_border_left_color)) { + if (!content_border_left_color %in% list_content_border_left_color) { + stop("`content_border_left_color` must be one of: c('data', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_border_left_color %in% names(named_list)) { + if (is.logical(content_border_left_color)) { + content_border_left_color <- as.character(content_border_left_color) + } + named_list_value <- unname(named_list[content_border_left_color])[[1]] + new_list$x$state$content_border_left_color <- named_list_value + } + } + } + } + new_list$x$state$content_border_left_color_custom <- content_border_left_color_custom + list_content_title_alignment <- c("start", "center", "end", NULL) + if (!is.null(content_title_alignment)) { + if (!content_title_alignment %in% list_content_title_alignment) { + stop("`content_title_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_title_alignment %in% names(named_list)) { + if (is.logical(content_title_alignment)) { + content_title_alignment <- as.character(content_title_alignment) + } + named_list_value <- unname(named_list[content_title_alignment])[[1]] + new_list$x$state$content_title_alignment <- named_list_value + } + } + } + } + new_list$x$state$content_title_styling <- content_title_styling + new_list$x$state$content_title_line_height <- content_title_line_height + list_content_title_size <- c("1.0", "1.2", "custom", NULL) + if (!is.null(content_title_size)) { + if (!content_title_size %in% list_content_title_size) { + stop("`content_title_size` must be one of: c('1.0', '1.2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.0": "1.0", "1.2": "1.2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.0": "1.0", "1.2": "1.2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_title_size %in% names(named_list)) { + if (is.logical(content_title_size)) { + content_title_size <- as.character(content_title_size) + } + named_list_value <- unname(named_list[content_title_size])[[1]] + new_list$x$state$content_title_size <- named_list_value + } + } + } + } + new_list$x$state$content_title_size_custom <- content_title_size_custom + list_content_title_weight <- c("bold", "normal", NULL) + if (!is.null(content_title_weight)) { + if (!content_title_weight %in% list_content_title_weight) { + stop("`content_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_title_weight %in% names(named_list)) { + if (is.logical(content_title_weight)) { + content_title_weight <- as.character(content_title_weight) + } + named_list_value <- unname(named_list[content_title_weight])[[1]] + new_list$x$state$content_title_weight <- named_list_value + } + } + } + } + list_content_title_color <- c("data", "custom", NULL) + if (!is.null(content_title_color)) { + if (!content_title_color %in% list_content_title_color) { + stop("`content_title_color` must be one of: c('data', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_title_color %in% names(named_list)) { + if (is.logical(content_title_color)) { + content_title_color <- as.character(content_title_color) + } + named_list_value <- unname(named_list[content_title_color])[[1]] + new_list$x$state$content_title_color <- named_list_value + } + } + } + } + new_list$x$state$content_title_color_custom <- content_title_color_custom + list_content_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(content_title_space_above)) { + if (!content_title_space_above %in% list_content_title_space_above) { + stop("`content_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_title_space_above %in% names(named_list)) { + if (is.logical(content_title_space_above)) { + content_title_space_above <- as.character(content_title_space_above) + } + named_list_value <- unname(named_list[content_title_space_above])[[1]] + new_list$x$state$content_title_space_above <- named_list_value + } + } + } + } + new_list$x$state$content_title_space_above_custom <- content_title_space_above_custom + list_content_subtitle_alignment <- c("start", "center", "end", NULL) + if (!is.null(content_subtitle_alignment)) { + if (!content_subtitle_alignment %in% list_content_subtitle_alignment) { + stop("`content_subtitle_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_subtitle_alignment %in% names(named_list)) { + if (is.logical(content_subtitle_alignment)) { + content_subtitle_alignment <- as.character(content_subtitle_alignment) + } + named_list_value <- unname(named_list[content_subtitle_alignment])[[1]] + new_list$x$state$content_subtitle_alignment <- named_list_value + } + } + } + } + new_list$x$state$content_subtitle_styling <- content_subtitle_styling + new_list$x$state$content_subtitle_line_height <- content_subtitle_line_height + list_content_subtitle_size <- c("1.0", "1.2", "custom", NULL) + if (!is.null(content_subtitle_size)) { + if (!content_subtitle_size %in% list_content_subtitle_size) { + stop("`content_subtitle_size` must be one of: c('1.0', '1.2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.0": "1.0", "1.2": "1.2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.0": "1.0", "1.2": "1.2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_subtitle_size %in% names(named_list)) { + if (is.logical(content_subtitle_size)) { + content_subtitle_size <- as.character(content_subtitle_size) + } + named_list_value <- unname(named_list[content_subtitle_size])[[1]] + new_list$x$state$content_subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$content_subtitle_size_custom <- content_subtitle_size_custom + list_content_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(content_subtitle_weight)) { + if (!content_subtitle_weight %in% list_content_subtitle_weight) { + stop("`content_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_subtitle_weight %in% names(named_list)) { + if (is.logical(content_subtitle_weight)) { + content_subtitle_weight <- as.character(content_subtitle_weight) + } + named_list_value <- unname(named_list[content_subtitle_weight])[[1]] + new_list$x$state$content_subtitle_weight <- named_list_value + } + } + } + } + list_content_subtitle_color <- c("data", "custom", NULL) + if (!is.null(content_subtitle_color)) { + if (!content_subtitle_color %in% list_content_subtitle_color) { + stop("`content_subtitle_color` must be one of: c('data', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_subtitle_color %in% names(named_list)) { + if (is.logical(content_subtitle_color)) { + content_subtitle_color <- as.character(content_subtitle_color) + } + named_list_value <- unname(named_list[content_subtitle_color])[[1]] + new_list$x$state$content_subtitle_color <- named_list_value + } + } + } + } + new_list$x$state$content_subtitle_color_custom <- content_subtitle_color_custom + list_content_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(content_subtitle_space_above)) { + if (!content_subtitle_space_above %in% list_content_subtitle_space_above) { + stop("`content_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_subtitle_space_above %in% names(named_list)) { + if (is.logical(content_subtitle_space_above)) { + content_subtitle_space_above <- as.character(content_subtitle_space_above) + } + named_list_value <- unname(named_list[content_subtitle_space_above])[[1]] + new_list$x$state$content_subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$content_subtitle_space_above_custom <- content_subtitle_space_above_custom + list_content_text_alignment <- c("start", "center", "end", NULL) + if (!is.null(content_text_alignment)) { + if (!content_text_alignment %in% list_content_text_alignment) { + stop("`content_text_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_text_alignment %in% names(named_list)) { + if (is.logical(content_text_alignment)) { + content_text_alignment <- as.character(content_text_alignment) + } + named_list_value <- unname(named_list[content_text_alignment])[[1]] + new_list$x$state$content_text_alignment <- named_list_value + } + } + } + } + new_list$x$state$content_text_styling <- content_text_styling + new_list$x$state$content_text_line_height <- content_text_line_height + list_content_text_size <- c("1.0", "1.2", "custom", NULL) + if (!is.null(content_text_size)) { + if (!content_text_size %in% list_content_text_size) { + stop("`content_text_size` must be one of: c('1.0', '1.2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.0": "1.0", "1.2": "1.2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.0": "1.0", "1.2": "1.2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_text_size %in% names(named_list)) { + if (is.logical(content_text_size)) { + content_text_size <- as.character(content_text_size) + } + named_list_value <- unname(named_list[content_text_size])[[1]] + new_list$x$state$content_text_size <- named_list_value + } + } + } + } + new_list$x$state$content_text_size_custom <- content_text_size_custom + list_content_text_weight <- c("bold", "normal", NULL) + if (!is.null(content_text_weight)) { + if (!content_text_weight %in% list_content_text_weight) { + stop("`content_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_text_weight %in% names(named_list)) { + if (is.logical(content_text_weight)) { + content_text_weight <- as.character(content_text_weight) + } + named_list_value <- unname(named_list[content_text_weight])[[1]] + new_list$x$state$content_text_weight <- named_list_value + } + } + } + } + list_content_text_color <- c("data", "custom", NULL) + if (!is.null(content_text_color)) { + if (!content_text_color %in% list_content_text_color) { + stop("`content_text_color` must be one of: c('data', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"data": "data", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"data": "data", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_text_color %in% names(named_list)) { + if (is.logical(content_text_color)) { + content_text_color <- as.character(content_text_color) + } + named_list_value <- unname(named_list[content_text_color])[[1]] + new_list$x$state$content_text_color <- named_list_value + } + } + } + } + new_list$x$state$content_text_color_custom <- content_text_color_custom + list_content_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(content_text_space_above)) { + if (!content_text_space_above %in% list_content_text_space_above) { + stop("`content_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_text_space_above %in% names(named_list)) { + if (is.logical(content_text_space_above)) { + content_text_space_above <- as.character(content_text_space_above) + } + named_list_value <- unname(named_list[content_text_space_above])[[1]] + new_list$x$state$content_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$content_text_space_above_custom <- content_text_space_above_custom + list_link_weight <- c("bold", "normal", NULL) + if (!is.null(link_weight)) { + if (!link_weight %in% list_link_weight) { + stop("`link_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && link_weight %in% names(named_list)) { + if (is.logical(link_weight)) { + link_weight <- as.character(link_weight) + } + named_list_value <- unname(named_list[link_weight])[[1]] + new_list$x$state$link_weight <- named_list_value + } + } + } + } + new_list$x$state$link_color <- link_color + new_list$x$state$link_underline <- link_underline + list_image_location <- c("none", "marker", "content", NULL) + if (!is.null(image_location)) { + if (!image_location %in% list_image_location) { + stop("`image_location` must be one of: c('none', 'marker', 'content')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "marker": "marker", "content": "content"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "marker": "marker", "content": "content"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_location %in% names(named_list)) { + if (is.logical(image_location)) { + image_location <- as.character(image_location) + } + named_list_value <- unname(named_list[image_location])[[1]] + new_list$x$state$image_location <- named_list_value + } + } + } + } + new_list$x$state$image_opacity <- image_opacity + list_image_display <- c("float", "inline", "banner", "background", NULL) + if (!is.null(image_display)) { + if (!image_display %in% list_image_display) { + stop("`image_display` must be one of: c('float', 'inline', 'banner', 'background')") + } else { + if (length(jsonlite::fromJSON('{"float": "float", "inline": "inline", "banner": "banner", "background": "background"}')) > 1) { + named_list <- jsonlite::fromJSON('{"float": "float", "inline": "inline", "banner": "banner", "background": "background"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_display %in% names(named_list)) { + if (is.logical(image_display)) { + image_display <- as.character(image_display) + } + named_list_value <- unname(named_list[image_display])[[1]] + new_list$x$state$image_display <- named_list_value + } + } + } + } + list_image_sizing <- c("contain", "cover", "zoom", NULL) + if (!is.null(image_sizing)) { + if (!image_sizing %in% list_image_sizing) { + stop("`image_sizing` must be one of: c('contain', 'cover', 'zoom')") + } else { + if (length(jsonlite::fromJSON('{"contain": "contain", "cover": "cover", "zoom": "zoom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"contain": "contain", "cover": "cover", "zoom": "zoom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_sizing %in% names(named_list)) { + if (is.logical(image_sizing)) { + image_sizing <- as.character(image_sizing) + } + named_list_value <- unname(named_list[image_sizing])[[1]] + new_list$x$state$image_sizing <- named_list_value + } + } + } + } + new_list$x$state$image_zoom <- image_zoom + list_image_content_sizing <- c("contain", "cover", "zoom", NULL) + if (!is.null(image_content_sizing)) { + if (!image_content_sizing %in% list_image_content_sizing) { + stop("`image_content_sizing` must be one of: c('contain', 'cover', 'zoom')") + } else { + if (length(jsonlite::fromJSON('{"contain": "contain", "cover": "cover", "zoom": "zoom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"contain": "contain", "cover": "cover", "zoom": "zoom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_content_sizing %in% names(named_list)) { + if (is.logical(image_content_sizing)) { + image_content_sizing <- as.character(image_content_sizing) + } + named_list_value <- unname(named_list[image_content_sizing])[[1]] + new_list$x$state$image_content_sizing <- named_list_value + } + } + } + } + new_list$x$state$image_content_zoom <- image_content_zoom + list_image_float_position <- c("1", "2", NULL) + if (!is.null(image_float_position)) { + if (!image_float_position %in% list_image_float_position) { + stop("`image_float_position` must be one of: c('1', '2')") + } else { + if (length(jsonlite::fromJSON('{"1": "1", "2": "2"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1": "1", "2": "2"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_float_position %in% names(named_list)) { + if (is.logical(image_float_position)) { + image_float_position <- as.character(image_float_position) + } + named_list_value <- unname(named_list[image_float_position])[[1]] + new_list$x$state$image_float_position <- named_list_value + } + } + } + } + list_image_inline_position <- c("1", "2", "3", NULL) + if (!is.null(image_inline_position)) { + if (!image_inline_position %in% list_image_inline_position) { + stop("`image_inline_position` must be one of: c('1', '2', '3')") + } else { + if (length(jsonlite::fromJSON('{"1": "1", "2": "2", "3": "3"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1": "1", "2": "2", "3": "3"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_inline_position %in% names(named_list)) { + if (is.logical(image_inline_position)) { + image_inline_position <- as.character(image_inline_position) + } + named_list_value <- unname(named_list[image_inline_position])[[1]] + new_list$x$state$image_inline_position <- named_list_value + } + } + } + } + list_image_alignment <- c("start", "center", "end", NULL) + if (!is.null(image_alignment)) { + if (!image_alignment %in% list_image_alignment) { + stop("`image_alignment` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_alignment %in% names(named_list)) { + if (is.logical(image_alignment)) { + image_alignment <- as.character(image_alignment) + } + named_list_value <- unname(named_list[image_alignment])[[1]] + new_list$x$state$image_alignment <- named_list_value + } + } + } + } + list_content_banner_depth <- c("2", "4", "6", "custom", NULL) + if (!is.null(content_banner_depth)) { + if (!content_banner_depth %in% list_content_banner_depth) { + stop("`content_banner_depth` must be one of: c('2', '4', '6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"2": "2", "4": "4", "6": "6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"2": "2", "4": "4", "6": "6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && content_banner_depth %in% names(named_list)) { + if (is.logical(content_banner_depth)) { + content_banner_depth <- as.character(content_banner_depth) + } + named_list_value <- unname(named_list[content_banner_depth])[[1]] + new_list$x$state$content_banner_depth <- named_list_value + } + } + } + } + new_list$x$state$content_banner_depth_custom <- content_banner_depth_custom + new_list$x$state$image_width <- image_width + new_list$x$state$image_margin <- image_margin + new_list$x$state$image_aspect <- image_aspect + list_navigation_step_type <- c("screen", "event", NULL) + if (!is.null(navigation_step_type)) { + if (!navigation_step_type %in% list_navigation_step_type) { + stop("`navigation_step_type` must be one of: c('screen', 'event')") + } else { + if (length(jsonlite::fromJSON('{"screen": "screen", "event": "event"}')) > 1) { + named_list <- jsonlite::fromJSON('{"screen": "screen", "event": "event"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && navigation_step_type %in% names(named_list)) { + if (is.logical(navigation_step_type)) { + navigation_step_type <- as.character(navigation_step_type) + } + named_list_value <- unname(named_list[navigation_step_type])[[1]] + new_list$x$state$navigation_step_type <- named_list_value + } + } + } + } + new_list$x$state$navigation_screen_proportion <- navigation_screen_proportion + new_list$x$state$navigation_event_number <- navigation_event_number + list_navigation_icon_type <- c("default", "custom", NULL) + if (!is.null(navigation_icon_type)) { + if (!navigation_icon_type %in% list_navigation_icon_type) { + stop("`navigation_icon_type` must be one of: c('default', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && navigation_icon_type %in% names(named_list)) { + if (is.logical(navigation_icon_type)) { + navigation_icon_type <- as.character(navigation_icon_type) + } + named_list_value <- unname(named_list[navigation_icon_type])[[1]] + new_list$x$state$navigation_icon_type <- named_list_value + } + } + } + } + new_list$x$state$navigation_icon_size <- navigation_icon_size + new_list$x$state$navigation_icon_opacity <- navigation_icon_opacity + new_list$x$state$navigation_icon_custom <- navigation_icon_custom + new_list$x$state$navigation_icon_color <- navigation_icon_color + new_list$x$state$navigation_gradient_color <- navigation_gradient_color + new_list$x$state$navigation_gradient_width <- navigation_gradient_width + new_list$x$state$navigation_gradient_opacity <- navigation_gradient_opacity + list_chart_x_axis_axis_position <- c("bottom", "top", "hidden", NULL) + if (!is.null(chart_x_axis_axis_position)) { + if (!chart_x_axis_axis_position %in% list_chart_x_axis_axis_position) { + stop("`chart_x_axis_axis_position` must be one of: c('bottom', 'top', 'hidden')") + } else { + if (length(jsonlite::fromJSON('{"bottom": "bottom", "top": "top", "hidden": "hidden"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bottom": "bottom", "top": "top", "hidden": "hidden"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_axis_position %in% names(named_list)) { + if (is.logical(chart_x_axis_axis_position)) { + chart_x_axis_axis_position <- as.character(chart_x_axis_axis_position) + } + named_list_value <- unname(named_list[chart_x_axis_axis_position])[[1]] + new_list$x$state$x$axis_position <- named_list_value + } + } + } + } + new_list$x$state$x$y_axis_position <- chart_x_axis_y_axis_position + list_chart_x_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_x_axis_numeric_scale_type)) { + if (!chart_x_axis_numeric_scale_type %in% list_chart_x_axis_numeric_scale_type) { + stop("`chart_x_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_x_axis_numeric_scale_type)) { + chart_x_axis_numeric_scale_type <- as.character(chart_x_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_x_axis_numeric_scale_type])[[1]] + new_list$x$state$x$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$x$linear_min <- chart_x_axis_linear_min + new_list$x$state$x$linear_max <- chart_x_axis_linear_max + new_list$x$state$x$log_min <- chart_x_axis_log_min + new_list$x$state$x$log_max <- chart_x_axis_log_max + new_list$x$state$x$datetime_min <- chart_x_axis_datetime_min + new_list$x$state$x$datetime_max <- chart_x_axis_datetime_max + new_list$x$state$x$flip <- chart_x_axis_flip + new_list$x$state$x$show_scale_settings <- chart_x_axis_show_scale_settings + list_chart_x_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_nice)) { + if (!chart_x_axis_nice %in% list_chart_x_axis_nice) { + stop("`chart_x_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_nice %in% names(named_list)) { + if (is.logical(chart_x_axis_nice)) { + chart_x_axis_nice <- as.character(chart_x_axis_nice) + } + named_list_value <- unname(named_list[chart_x_axis_nice])[[1]] + new_list$x$state$x$nice <- named_list_value + } + } + } + } + list_chart_x_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_x_axis_zero_axis)) { + if (!chart_x_axis_zero_axis %in% list_chart_x_axis_zero_axis) { + stop("`chart_x_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_x_axis_zero_axis)) { + chart_x_axis_zero_axis <- as.character(chart_x_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_x_axis_zero_axis])[[1]] + new_list$x$state$x$zero_axis <- named_list_value + } + } + } + } + list_chart_x_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_x_axis_title_mode)) { + if (!chart_x_axis_title_mode %in% list_chart_x_axis_title_mode) { + stop("`chart_x_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_title_mode)) { + chart_x_axis_title_mode <- as.character(chart_x_axis_title_mode) + } + named_list_value <- unname(named_list[chart_x_axis_title_mode])[[1]] + new_list$x$state$x$title_mode <- named_list_value + } + } + } + } + new_list$x$state$x$title <- chart_x_axis_title + new_list$x$state$x$title_styling <- chart_x_axis_title_styling + list_chart_x_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_title_weight)) { + if (!chart_x_axis_title_weight %in% list_chart_x_axis_title_weight) { + stop("`chart_x_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_title_weight)) { + chart_x_axis_title_weight <- as.character(chart_x_axis_title_weight) + } + named_list_value <- unname(named_list[chart_x_axis_title_weight])[[1]] + new_list$x$state$x$title_weight <- named_list_value + } + } + } + } + new_list$x$state$x$title_color <- chart_x_axis_title_color + new_list$x$state$x$title_size <- chart_x_axis_title_size + new_list$x$state$x$title_padding <- chart_x_axis_title_padding + list_chart_x_axis_tick_label_position <- c("default", "left", "right", NULL) + if (!is.null(chart_x_axis_tick_label_position)) { + if (!chart_x_axis_tick_label_position %in% list_chart_x_axis_tick_label_position) { + stop("`chart_x_axis_tick_label_position` must be one of: c('default', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_position)) { + chart_x_axis_tick_label_position <- as.character(chart_x_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_position])[[1]] + new_list$x$state$x$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_styling <- chart_x_axis_tick_label_styling + new_list$x$state$x$tick_label_size <- chart_x_axis_tick_label_size + new_list$x$state$x$tick_label_color <- chart_x_axis_tick_label_color + new_list$x$state$x$tick_padding <- chart_x_axis_tick_padding + list_chart_x_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_x_axis_tick_label_angle)) { + if (!chart_x_axis_tick_label_angle %in% list_chart_x_axis_tick_label_angle) { + stop("`chart_x_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_angle)) { + chart_x_axis_tick_label_angle <- as.character(chart_x_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_angle])[[1]] + new_list$x$state$x$tick_label_angle <- named_list_value + } + } + } + } + list_chart_x_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_x_axis_tick_label_weight)) { + if (!chart_x_axis_tick_label_weight %in% list_chart_x_axis_tick_label_weight) { + stop("`chart_x_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_weight)) { + chart_x_axis_tick_label_weight <- as.character(chart_x_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_weight])[[1]] + new_list$x$state$x$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_max_lines <- chart_x_axis_tick_label_max_lines + new_list$x$state$x$tick_label_line_height <- chart_x_axis_tick_label_line_height + list_chart_x_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_x_axis_tick_label_space_mode)) { + if (!chart_x_axis_tick_label_space_mode %in% list_chart_x_axis_tick_label_space_mode) { + stop("`chart_x_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_label_space_mode)) { + chart_x_axis_tick_label_space_mode <- as.character(chart_x_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_label_space_mode])[[1]] + new_list$x$state$x$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_label_space <- chart_x_axis_tick_label_space + list_chart_x_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_x_axis_tick_mode)) { + if (!chart_x_axis_tick_mode %in% list_chart_x_axis_tick_mode) { + stop("`chart_x_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_mode)) { + chart_x_axis_tick_mode <- as.character(chart_x_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_x_axis_tick_mode])[[1]] + new_list$x$state$x$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$x$tick_number <- chart_x_axis_tick_number + if (length(chart_x_axis_tick_custom) > 1) { + new_list$x$state$x$tick_custom <- paste(chart_x_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$x$tick_custom <- chart_x_axis_tick_custom + } + + new_list$x$state$x$line_and_tick_color <- chart_x_axis_line_and_tick_color + new_list$x$state$x$line_and_tick_width <- chart_x_axis_line_and_tick_width + new_list$x$state$x$tick_length <- chart_x_axis_tick_length + list_chart_x_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_x_axis_tick_side)) { + if (!chart_x_axis_tick_side %in% list_chart_x_axis_tick_side) { + stop("`chart_x_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_x_axis_tick_side)) { + chart_x_axis_tick_side <- as.character(chart_x_axis_tick_side) + } + named_list_value <- unname(named_list[chart_x_axis_tick_side])[[1]] + new_list$x$state$x$tick_side <- named_list_value + } + } + } + } + new_list$x$state$x$line_visible <- chart_x_axis_line_visible + new_list$x$state$x$edge_padding <- chart_x_axis_edge_padding + list_chart_x_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_x_axis_gridlines_visible)) { + if (!chart_x_axis_gridlines_visible %in% list_chart_x_axis_gridlines_visible) { + stop("`chart_x_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_x_axis_gridlines_visible)) { + chart_x_axis_gridlines_visible <- as.character(chart_x_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_x_axis_gridlines_visible])[[1]] + new_list$x$state$x$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$x$gridlines_styling <- chart_x_axis_gridlines_styling + new_list$x$state$x$gridline_color <- chart_x_axis_gridline_color + list_chart_x_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_x_axis_gridline_style)) { + if (!chart_x_axis_gridline_style %in% list_chart_x_axis_gridline_style) { + stop("`chart_x_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_x_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_x_axis_gridline_style)) { + chart_x_axis_gridline_style <- as.character(chart_x_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_x_axis_gridline_style])[[1]] + new_list$x$state$x$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$x$gridline_width <- chart_x_axis_gridline_width + new_list$x$state$x$gridline_category_dividers <- chart_x_axis_gridline_category_dividers + new_list$x$state$x$gridline_category_dividers_extend <- chart_x_axis_gridline_category_dividers_extend + list_chart_y_axis_axis_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_axis_visible)) { + if (!chart_y_axis_axis_visible %in% list_chart_y_axis_axis_visible) { + stop("`chart_y_axis_axis_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_axis_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_axis_visible)) { + chart_y_axis_axis_visible <- as.character(chart_y_axis_axis_visible) + } + named_list_value <- unname(named_list[chart_y_axis_axis_visible])[[1]] + new_list$x$state$y$axis_visible <- named_list_value + } + } + } + } + list_chart_y_axis_numeric_scale_type <- c("linear", "log", NULL) + if (!is.null(chart_y_axis_numeric_scale_type)) { + if (!chart_y_axis_numeric_scale_type %in% list_chart_y_axis_numeric_scale_type) { + stop("`chart_y_axis_numeric_scale_type` must be one of: c('linear', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_numeric_scale_type %in% names(named_list)) { + if (is.logical(chart_y_axis_numeric_scale_type)) { + chart_y_axis_numeric_scale_type <- as.character(chart_y_axis_numeric_scale_type) + } + named_list_value <- unname(named_list[chart_y_axis_numeric_scale_type])[[1]] + new_list$x$state$y$numeric_scale_type <- named_list_value + } + } + } + } + new_list$x$state$y$linear_min <- chart_y_axis_linear_min + new_list$x$state$y$linear_max <- chart_y_axis_linear_max + new_list$x$state$y$log_min <- chart_y_axis_log_min + new_list$x$state$y$log_max <- chart_y_axis_log_max + new_list$x$state$y$datetime_min <- chart_y_axis_datetime_min + new_list$x$state$y$datetime_max <- chart_y_axis_datetime_max + new_list$x$state$y$flip <- chart_y_axis_flip + new_list$x$state$y$show_scale_settings <- chart_y_axis_show_scale_settings + list_chart_y_axis_nice <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_nice)) { + if (!chart_y_axis_nice %in% list_chart_y_axis_nice) { + stop("`chart_y_axis_nice` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_nice %in% names(named_list)) { + if (is.logical(chart_y_axis_nice)) { + chart_y_axis_nice <- as.character(chart_y_axis_nice) + } + named_list_value <- unname(named_list[chart_y_axis_nice])[[1]] + new_list$x$state$y$nice <- named_list_value + } + } + } + } + list_chart_y_axis_zero_axis <- c("auto", "on", "off", NULL) + if (!is.null(chart_y_axis_zero_axis)) { + if (!chart_y_axis_zero_axis %in% list_chart_y_axis_zero_axis) { + stop("`chart_y_axis_zero_axis` must be one of: c('auto', 'on', 'off')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "on": "on", "off": "off"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_zero_axis %in% names(named_list)) { + if (is.logical(chart_y_axis_zero_axis)) { + chart_y_axis_zero_axis <- as.character(chart_y_axis_zero_axis) + } + named_list_value <- unname(named_list[chart_y_axis_zero_axis])[[1]] + new_list$x$state$y$zero_axis <- named_list_value + } + } + } + } + list_chart_y_axis_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_y_axis_title_mode)) { + if (!chart_y_axis_title_mode %in% list_chart_y_axis_title_mode) { + stop("`chart_y_axis_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_title_mode)) { + chart_y_axis_title_mode <- as.character(chart_y_axis_title_mode) + } + named_list_value <- unname(named_list[chart_y_axis_title_mode])[[1]] + new_list$x$state$y$title_mode <- named_list_value + } + } + } + } + new_list$x$state$y$title <- chart_y_axis_title + new_list$x$state$y$title_styling <- chart_y_axis_title_styling + list_chart_y_axis_title_position <- c("side", "end", NULL) + if (!is.null(chart_y_axis_title_position)) { + if (!chart_y_axis_title_position %in% list_chart_y_axis_title_position) { + stop("`chart_y_axis_title_position` must be one of: c('side', 'end')") + } else { + if (length(jsonlite::fromJSON('{"side": "side", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"side": "side", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_position %in% names(named_list)) { + if (is.logical(chart_y_axis_title_position)) { + chart_y_axis_title_position <- as.character(chart_y_axis_title_position) + } + named_list_value <- unname(named_list[chart_y_axis_title_position])[[1]] + new_list$x$state$y$title_position <- named_list_value + } + } + } + } + list_chart_y_axis_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_title_weight)) { + if (!chart_y_axis_title_weight %in% list_chart_y_axis_title_weight) { + stop("`chart_y_axis_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_title_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_title_weight)) { + chart_y_axis_title_weight <- as.character(chart_y_axis_title_weight) + } + named_list_value <- unname(named_list[chart_y_axis_title_weight])[[1]] + new_list$x$state$y$title_weight <- named_list_value + } + } + } + } + new_list$x$state$y$title_color <- chart_y_axis_title_color + new_list$x$state$y$title_size <- chart_y_axis_title_size + new_list$x$state$y$title_padding <- chart_y_axis_title_padding + list_chart_y_axis_tick_label_position <- c("default", "above", "below", NULL) + if (!is.null(chart_y_axis_tick_label_position)) { + if (!chart_y_axis_tick_label_position %in% list_chart_y_axis_tick_label_position) { + stop("`chart_y_axis_tick_label_position` must be one of: c('default', 'above', 'below')") + } else { + if (length(jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}')) > 1) { + named_list <- jsonlite::fromJSON('{"default": "default", "above": "above", "below": "below"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_position %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_position)) { + chart_y_axis_tick_label_position <- as.character(chart_y_axis_tick_label_position) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_position])[[1]] + new_list$x$state$y$tick_label_position <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_styling <- chart_y_axis_tick_label_styling + new_list$x$state$y$tick_label_size <- chart_y_axis_tick_label_size + new_list$x$state$y$tick_label_color <- chart_y_axis_tick_label_color + new_list$x$state$y$tick_padding <- chart_y_axis_tick_padding + list_chart_y_axis_tick_label_angle <- c("0", "30", "45", "60", "90", NULL) + if (!is.null(chart_y_axis_tick_label_angle)) { + if (!chart_y_axis_tick_label_angle %in% list_chart_y_axis_tick_label_angle) { + stop("`chart_y_axis_tick_label_angle` must be one of: c('0', '30', '45', '60', '90')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "30": "30", "45": "45", "60": "60", "90": "90"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_angle %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_angle)) { + chart_y_axis_tick_label_angle <- as.character(chart_y_axis_tick_label_angle) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_angle])[[1]] + new_list$x$state$y$tick_label_angle <- named_list_value + } + } + } + } + list_chart_y_axis_tick_label_weight <- c("bold", "normal", NULL) + if (!is.null(chart_y_axis_tick_label_weight)) { + if (!chart_y_axis_tick_label_weight %in% list_chart_y_axis_tick_label_weight) { + stop("`chart_y_axis_tick_label_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_weight %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_weight)) { + chart_y_axis_tick_label_weight <- as.character(chart_y_axis_tick_label_weight) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_weight])[[1]] + new_list$x$state$y$tick_label_weight <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_max_lines <- chart_y_axis_tick_label_max_lines + new_list$x$state$y$tick_label_line_height <- chart_y_axis_tick_label_line_height + list_chart_y_axis_tick_label_space_mode <- c("auto", "max", "fixed", NULL) + if (!is.null(chart_y_axis_tick_label_space_mode)) { + if (!chart_y_axis_tick_label_space_mode %in% list_chart_y_axis_tick_label_space_mode) { + stop("`chart_y_axis_tick_label_space_mode` must be one of: c('auto', 'max', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "max": "max", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_label_space_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_label_space_mode)) { + chart_y_axis_tick_label_space_mode <- as.character(chart_y_axis_tick_label_space_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_label_space_mode])[[1]] + new_list$x$state$y$tick_label_space_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_label_space <- chart_y_axis_tick_label_space + list_chart_y_axis_tick_mode <- c("auto", "number", "custom", NULL) + if (!is.null(chart_y_axis_tick_mode)) { + if (!chart_y_axis_tick_mode %in% list_chart_y_axis_tick_mode) { + stop("`chart_y_axis_tick_mode` must be one of: c('auto', 'number', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "number": "number", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_mode %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_mode)) { + chart_y_axis_tick_mode <- as.character(chart_y_axis_tick_mode) + } + named_list_value <- unname(named_list[chart_y_axis_tick_mode])[[1]] + new_list$x$state$y$tick_mode <- named_list_value + } + } + } + } + new_list$x$state$y$tick_number <- chart_y_axis_tick_number + if (length(chart_y_axis_tick_custom) > 1) { + new_list$x$state$y$tick_custom <- paste(chart_y_axis_tick_custom, collapse = "\n") + } else { + new_list$x$state$y$tick_custom <- chart_y_axis_tick_custom + } + + new_list$x$state$y$line_and_tick_color <- chart_y_axis_line_and_tick_color + new_list$x$state$y$line_and_tick_width <- chart_y_axis_line_and_tick_width + new_list$x$state$y$tick_length <- chart_y_axis_tick_length + list_chart_y_axis_tick_side <- c("out", "in", NULL) + if (!is.null(chart_y_axis_tick_side)) { + if (!chart_y_axis_tick_side %in% list_chart_y_axis_tick_side) { + stop("`chart_y_axis_tick_side` must be one of: c('out', 'in')") + } else { + if (length(jsonlite::fromJSON('{"out": "out", "in": "in"}')) > 1) { + named_list <- jsonlite::fromJSON('{"out": "out", "in": "in"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_tick_side %in% names(named_list)) { + if (is.logical(chart_y_axis_tick_side)) { + chart_y_axis_tick_side <- as.character(chart_y_axis_tick_side) + } + named_list_value <- unname(named_list[chart_y_axis_tick_side])[[1]] + new_list$x$state$y$tick_side <- named_list_value + } + } + } + } + new_list$x$state$y$line_visible <- chart_y_axis_line_visible + new_list$x$state$y$edge_padding <- chart_y_axis_edge_padding + list_chart_y_axis_gridlines_visible <- c(TRUE, FALSE, NULL) + if (!is.null(chart_y_axis_gridlines_visible)) { + if (!chart_y_axis_gridlines_visible %in% list_chart_y_axis_gridlines_visible) { + stop("`chart_y_axis_gridlines_visible` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridlines_visible %in% names(named_list)) { + if (is.logical(chart_y_axis_gridlines_visible)) { + chart_y_axis_gridlines_visible <- as.character(chart_y_axis_gridlines_visible) + } + named_list_value <- unname(named_list[chart_y_axis_gridlines_visible])[[1]] + new_list$x$state$y$gridlines_visible <- named_list_value + } + } + } + } + new_list$x$state$y$gridlines_styling <- chart_y_axis_gridlines_styling + new_list$x$state$y$gridline_color <- chart_y_axis_gridline_color + list_chart_y_axis_gridline_style <- c("solid", "dash", "dot", "dot_dash", NULL) + if (!is.null(chart_y_axis_gridline_style)) { + if (!chart_y_axis_gridline_style %in% list_chart_y_axis_gridline_style) { + stop("`chart_y_axis_gridline_style` must be one of: c('solid', 'dash', 'dot', 'dot_dash')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dash": "dash", "dot": "dot", "dot_dash": "dot_dash"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_y_axis_gridline_style %in% names(named_list)) { + if (is.logical(chart_y_axis_gridline_style)) { + chart_y_axis_gridline_style <- as.character(chart_y_axis_gridline_style) + } + named_list_value <- unname(named_list[chart_y_axis_gridline_style])[[1]] + new_list$x$state$y$gridline_style <- named_list_value + } + } + } + } + new_list$x$state$y$gridline_width <- chart_y_axis_gridline_width + new_list$x$state$y$gridline_category_dividers <- chart_y_axis_gridline_category_dividers + new_list$x$state$y$gridline_category_dividers_extend <- chart_y_axis_gridline_category_dividers_extend + list_chart_categorical_legend_show_legend <- c(TRUE, FALSE, NULL) + if (!is.null(chart_categorical_legend_show_legend)) { + if (!chart_categorical_legend_show_legend %in% list_chart_categorical_legend_show_legend) { + stop("`chart_categorical_legend_show_legend` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_show_legend %in% names(named_list)) { + if (is.logical(chart_categorical_legend_show_legend)) { + chart_categorical_legend_show_legend <- as.character(chart_categorical_legend_show_legend) + } + named_list_value <- unname(named_list[chart_categorical_legend_show_legend])[[1]] + new_list$x$state$legend_categorical$show_legend <- named_list_value + } + } + } + } + list_chart_categorical_legend_title_mode <- c("auto", "custom", NULL) + if (!is.null(chart_categorical_legend_title_mode)) { + if (!chart_categorical_legend_title_mode %in% list_chart_categorical_legend_title_mode) { + stop("`chart_categorical_legend_title_mode` must be one of: c('auto', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_title_mode %in% names(named_list)) { + if (is.logical(chart_categorical_legend_title_mode)) { + chart_categorical_legend_title_mode <- as.character(chart_categorical_legend_title_mode) + } + named_list_value <- unname(named_list[chart_categorical_legend_title_mode])[[1]] + new_list$x$state$legend_categorical$title_mode <- named_list_value + } + } + } + } + new_list$x$state$legend_categorical$title <- chart_categorical_legend_title + new_list$x$state$legend_categorical$swatch_width <- chart_categorical_legend_swatch_width + new_list$x$state$legend_categorical$swatch_height <- chart_categorical_legend_swatch_height + new_list$x$state$legend_categorical$swatch_radius <- chart_categorical_legend_swatch_radius + new_list$x$state$legend_categorical$legend_items_padding <- chart_categorical_legend_legend_items_padding + new_list$x$state$legend_categorical$swatch_outline <- chart_categorical_legend_swatch_outline + new_list$x$state$legend_categorical$swatch_outline_color <- chart_categorical_legend_swatch_outline_color + if (length(chart_categorical_legend_order_override) > 1) { + new_list$x$state$legend_categorical$order_override <- paste(chart_categorical_legend_order_override, collapse = "\n") + } else { + new_list$x$state$legend_categorical$order_override <- chart_categorical_legend_order_override + } + + new_list$x$state$legend_categorical$icon_height <- chart_categorical_legend_icon_height + new_list$x$state$legend_categorical$icon_color <- chart_categorical_legend_icon_color + new_list$x$state$legend_categorical$max_width <- chart_categorical_legend_max_width + list_chart_categorical_legend_orientation <- c("horizontal", "vertical", NULL) + if (!is.null(chart_categorical_legend_orientation)) { + if (!chart_categorical_legend_orientation %in% list_chart_categorical_legend_orientation) { + stop("`chart_categorical_legend_orientation` must be one of: c('horizontal', 'vertical')") + } else { + if (length(jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}')) > 1) { + named_list <- jsonlite::fromJSON('{"horizontal": "horizontal", "vertical": "vertical"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_categorical_legend_orientation %in% names(named_list)) { + if (is.logical(chart_categorical_legend_orientation)) { + chart_categorical_legend_orientation <- as.character(chart_categorical_legend_orientation) + } + named_list_value <- unname(named_list[chart_categorical_legend_orientation])[[1]] + new_list$x$state$legend_categorical$orientation <- named_list_value + } + } + } + } + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_tournament_details.R b/R_package/R/set_tournament_details.R new file mode 100644 index 0000000..411cba6 --- /dev/null +++ b/R_package/R/set_tournament_details.R @@ -0,0 +1,2508 @@ +#' Set tournament chart details +#' @name set_tournament_details +#' @param min_round_width_mode Width mode. Choices: auto, fixed. Auto mode sets round width to the smallest it can be while still fitting text content. In Fixed mode you can choose a fixed minimum round width (text will be ellipsed if it does not fit). Flourish type hint: string, defaults to `NULL` +#' @param min_round_width_fixed Min stage width. The minimum width given to a specific stage (e.g. Quarterfinals), specified in px. Flourish type hint: number, defaults to `NULL` +#' @param inner_padding_vertical Box height. Flourish type hint: number, defaults to `NULL` +#' @param inner_padding_horizontal Box padding. Horizontal space on sides of box. Flourish type hint: number, defaults to `NULL` +#' @param link_width Horizontal space. Horizontal space between stages. Flourish type hint: number, defaults to `NULL` +#' @param outer_padding Vertical space. Vertical space between stages. Flourish type hint: number, defaults to `NULL` +#' @param winning_team_color Winning team. Flourish type hint: color, defaults to `NULL` +#' @param losing_team_color Losing team. Flourish type hint: color, defaults to `NULL` +#' @param upcoming_fill_color Upcoming match. Flourish type hint: color, defaults to `NULL` +#' @param boxes_stroke_color Outline color. Flourish type hint: color, defaults to `NULL` +#' @param boxes_stroke_width Outline width. Flourish type hint: number, defaults to `NULL` +#' @param boxes_roundness Roundness. Flourish type hint: number, defaults to `NULL` +#' @param winning_team_text_color Winning team. Flourish type hint: color, defaults to `NULL` +#' @param losing_team_text_color Losing team. Flourish type hint: color, defaults to `NULL` +#' @param font_size Size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param text_weight_mode Weight. Choices: winner_bold, regular, bold. Flourish type hint: string, defaults to `NULL` +#' @param link_thickness Thickness. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param link_color Color. Flourish type hint: color, defaults to `NULL` +#' @param link_radius Roundness. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param image_size Size. Specified as a % of the box for that match. Flourish type hint: number, defaults to `NULL` +#' @param image_scale Scale. Choices: contain, cover, zoom. Fill will not preserve the aspect ratio of images but stretch them to fill the area. Fit and Zoom both preserve the aspect ratio of images, but Fit ensures none of the image is cut off. Flourish type hint: string, defaults to `NULL` +#' @param image_zoom Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to `NULL` +#' @param image_shape Shape. Choices: circle, square. Flourish type hint: string, defaults to `NULL` +#' @param headings_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param headings_size Size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param headings_padding Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param headings_color Color. Flourish type hint: color, defaults to `NULL` +#' @param headings_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param headings_position Position. Choices: middle, start. Flourish type hint: string, defaults to `NULL` +#' @param navigation_icon_position Position. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param navigation_icon_mode Type. Choices: arrow, custom. Flourish type hint: string, defaults to `NULL` +#' @param navigation_icon_upload Upload icon. Upload a right-facing icon (your icon will be rotated for the left side). Flourish type hint: url, defaults to `NULL` +#' @param navigation_icon_size Size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to `NULL` +#' @param navigation_icon_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param popup_header_separator Header separator. Flourish type hint: string, defaults to `NULL` +#' @param animation_duration Duration. The duration, in seconds, of intro animation. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "tournament", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_tournament_data(gapminder) |> +#' set_tournament_details() +#' ) +#' @export + +set_tournament_details <- function( + ., + min_round_width_mode = NULL, + min_round_width_fixed = NULL, + inner_padding_vertical = NULL, + inner_padding_horizontal = NULL, + link_width = NULL, + outer_padding = NULL, + winning_team_color = NULL, + losing_team_color = NULL, + upcoming_fill_color = NULL, + boxes_stroke_color = NULL, + boxes_stroke_width = NULL, + boxes_roundness = NULL, + winning_team_text_color = NULL, + losing_team_text_color = NULL, + font_size = NULL, + text_weight_mode = NULL, + link_thickness = NULL, + link_color = NULL, + link_radius = NULL, + image_size = NULL, + image_scale = NULL, + image_zoom = NULL, + image_shape = NULL, + headings_enabled = NULL, + headings_size = NULL, + headings_padding = NULL, + headings_color = NULL, + headings_weight = NULL, + headings_position = NULL, + navigation_icon_position = NULL, + navigation_icon_mode = NULL, + navigation_icon_upload = NULL, + navigation_icon_size = NULL, + navigation_icon_color = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + popup_header_separator = NULL, + animation_duration = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "tournament") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/tournament")) { + stop("`set_tournament_details()` is not supported for this chart type.") + } + list_min_round_width_mode <- c("auto", "fixed", NULL) + if (!is.null(min_round_width_mode)) { + if (!min_round_width_mode %in% list_min_round_width_mode) { + stop("`min_round_width_mode` must be one of: c('auto', 'fixed')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fixed": "fixed"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && min_round_width_mode %in% names(named_list)) { + if (is.logical(min_round_width_mode)) { + min_round_width_mode <- as.character(min_round_width_mode) + } + named_list_value <- unname(named_list[min_round_width_mode])[[1]] + new_list$x$state$min_round_width_mode <- named_list_value + } + } + } + } + new_list$x$state$min_round_width_fixed <- min_round_width_fixed + new_list$x$state$inner_padding_vertical <- inner_padding_vertical + new_list$x$state$inner_padding_horizontal <- inner_padding_horizontal + new_list$x$state$link_width <- link_width + new_list$x$state$outer_padding <- outer_padding + new_list$x$state$winning_team_color <- winning_team_color + new_list$x$state$losing_team_color <- losing_team_color + new_list$x$state$upcoming_fill_color <- upcoming_fill_color + new_list$x$state$boxes_stroke_color <- boxes_stroke_color + new_list$x$state$boxes_stroke_width <- boxes_stroke_width + new_list$x$state$boxes_roundness <- boxes_roundness + new_list$x$state$winning_team_text_color <- winning_team_text_color + new_list$x$state$losing_team_text_color <- losing_team_text_color + new_list$x$state$font_size <- font_size + list_text_weight_mode <- c("winner_bold", "regular", "bold", NULL) + if (!is.null(text_weight_mode)) { + if (!text_weight_mode %in% list_text_weight_mode) { + stop("`text_weight_mode` must be one of: c('winner_bold', 'regular', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"winner_bold": "winner_bold", "regular": "regular", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"winner_bold": "winner_bold", "regular": "regular", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && text_weight_mode %in% names(named_list)) { + if (is.logical(text_weight_mode)) { + text_weight_mode <- as.character(text_weight_mode) + } + named_list_value <- unname(named_list[text_weight_mode])[[1]] + new_list$x$state$text_weight_mode <- named_list_value + } + } + } + } + new_list$x$state$link_thickness <- link_thickness + new_list$x$state$link_color <- link_color + new_list$x$state$link_radius <- link_radius + new_list$x$state$image_size <- image_size + list_image_scale <- c("contain", "cover", "zoom", NULL) + if (!is.null(image_scale)) { + if (!image_scale %in% list_image_scale) { + stop("`image_scale` must be one of: c('contain', 'cover', 'zoom')") + } else { + if (length(jsonlite::fromJSON('{"contain": "contain", "cover": "cover", "zoom": "zoom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"contain": "contain", "cover": "cover", "zoom": "zoom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_scale %in% names(named_list)) { + if (is.logical(image_scale)) { + image_scale <- as.character(image_scale) + } + named_list_value <- unname(named_list[image_scale])[[1]] + new_list$x$state$image_scale <- named_list_value + } + } + } + } + new_list$x$state$image_zoom <- image_zoom + list_image_shape <- c("circle", "square", NULL) + if (!is.null(image_shape)) { + if (!image_shape %in% list_image_shape) { + stop("`image_shape` must be one of: c('circle', 'square')") + } else { + if (length(jsonlite::fromJSON('{"circle": "circle", "square": "square"}')) > 1) { + named_list <- jsonlite::fromJSON('{"circle": "circle", "square": "square"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && image_shape %in% names(named_list)) { + if (is.logical(image_shape)) { + image_shape <- as.character(image_shape) + } + named_list_value <- unname(named_list[image_shape])[[1]] + new_list$x$state$image_shape <- named_list_value + } + } + } + } + list_headings_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(headings_enabled)) { + if (!headings_enabled %in% list_headings_enabled) { + stop("`headings_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && headings_enabled %in% names(named_list)) { + if (is.logical(headings_enabled)) { + headings_enabled <- as.character(headings_enabled) + } + named_list_value <- unname(named_list[headings_enabled])[[1]] + new_list$x$state$headings_enabled <- named_list_value + } + } + } + } + new_list$x$state$headings_size <- headings_size + new_list$x$state$headings_padding <- headings_padding + new_list$x$state$headings_color <- headings_color + list_headings_weight <- c("bold", "normal", NULL) + if (!is.null(headings_weight)) { + if (!headings_weight %in% list_headings_weight) { + stop("`headings_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && headings_weight %in% names(named_list)) { + if (is.logical(headings_weight)) { + headings_weight <- as.character(headings_weight) + } + named_list_value <- unname(named_list[headings_weight])[[1]] + new_list$x$state$headings_weight <- named_list_value + } + } + } + } + list_headings_position <- c("middle", "start", NULL) + if (!is.null(headings_position)) { + if (!headings_position %in% list_headings_position) { + stop("`headings_position` must be one of: c('middle', 'start')") + } else { + if (length(jsonlite::fromJSON('{"middle": "middle", "start": "start"}')) > 1) { + named_list <- jsonlite::fromJSON('{"middle": "middle", "start": "start"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && headings_position %in% names(named_list)) { + if (is.logical(headings_position)) { + headings_position <- as.character(headings_position) + } + named_list_value <- unname(named_list[headings_position])[[1]] + new_list$x$state$headings_position <- named_list_value + } + } + } + } + list_navigation_icon_position <- c("start", "center", "end", NULL) + if (!is.null(navigation_icon_position)) { + if (!navigation_icon_position %in% list_navigation_icon_position) { + stop("`navigation_icon_position` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && navigation_icon_position %in% names(named_list)) { + if (is.logical(navigation_icon_position)) { + navigation_icon_position <- as.character(navigation_icon_position) + } + named_list_value <- unname(named_list[navigation_icon_position])[[1]] + new_list$x$state$navigation_icon_position <- named_list_value + } + } + } + } + list_navigation_icon_mode <- c("arrow", "custom", NULL) + if (!is.null(navigation_icon_mode)) { + if (!navigation_icon_mode %in% list_navigation_icon_mode) { + stop("`navigation_icon_mode` must be one of: c('arrow', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"arrow": "arrow", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"arrow": "arrow", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && navigation_icon_mode %in% names(named_list)) { + if (is.logical(navigation_icon_mode)) { + navigation_icon_mode <- as.character(navigation_icon_mode) + } + named_list_value <- unname(named_list[navigation_icon_mode])[[1]] + new_list$x$state$navigation_icon_mode <- named_list_value + } + } + } + } + new_list$x$state$navigation_icon_upload <- navigation_icon_upload + new_list$x$state$navigation_icon_size <- navigation_icon_size + new_list$x$state$navigation_icon_color <- navigation_icon_color + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + new_list$x$state$popup_header_separator <- popup_header_separator + new_list$x$state$animation_duration <- animation_duration + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/set_word_cloud_details.R b/R_package/R/set_word_cloud_details.R new file mode 100644 index 0000000..4906d70 --- /dev/null +++ b/R_package/R/set_word_cloud_details.R @@ -0,0 +1,2789 @@ +#' Set word cloud chart details +#' @name set_word_cloud_details +#' @param using_tables Text input. Choices: `FALSE`, `TRUE`. Pasting in raw text is simplest but may be slow for large amounts of text. Flourish type hint: boolean, defaults to `NULL` +#' @param word_limit Word limit. Limits the number of words, in order of frequency. Leave blank to show all words in the data table. Flourish type hint: number, defaults to `NULL` +#' @param raw_text Text. Note that the raw text will be available in the HTML of the generated page. This occurs when using both Paste in raw text and Datasheet options. Flourish type hint: text, defaults to `NULL` +#' @param exclusions Exclude common words. Flourish type hint: boolean, defaults to `NULL` +#' @param excluded_words Exclude words. Flourish type hint: text, defaults to `NULL` +#' @param strip_trailing_s Strip all trailing “s” from words. e.g. "mother" and "mothers" are considered one word. This includes both apostrophe and quotation mark forms (s and s). Flourish type hint: boolean, defaults to `NULL` +#' @param convert_to_lowercase Convert all words to lowercase. e.g. "mother" and "Mother" are considered one word. This will also apply to the words in the Exclude words setting. Flourish type hint: boolean, defaults to `NULL` +#' @param cloud_font Font. Flourish type hint: font, defaults to `NULL` +#' @param text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param word_padding Spacing. Spacing between the words (in arbitrary units). Flourish type hint: number, defaults to `NULL` +#' @param random_seed Layout number. Change the number to try different word layouts. Flourish type hint: number, defaults to `NULL` +#' @param angle_min Min angle. Flourish type hint: number, defaults to `NULL` +#' @param angle_max Max angle. Flourish type hint: number, defaults to `NULL` +#' @param angle_number Number of angles. Flourish type hint: number, defaults to `NULL` +#' @param font_size_min Min size. In arbitrary units. Actual display size will depend in screen size and layout. Flourish type hint: number, defaults to `NULL` +#' @param font_size_max Max size. In arbitrary units. Actual display size will depend in screen size and layout. Flourish type hint: number, defaults to `NULL` +#' @param size_mode Scaling. Choices: linear, sqrt, log. This scale will determine the relationship in size between the biggest and the smallest word. Flourish type hint: string, defaults to `NULL` +#' @param height_mode Height mode. Choices: fill_space, aspect. In Fill space mode, the graphic will fill the container (which by default will be the standard Flourish responsive chart size). In Aspect ratio mode, you set the aspect ratio of the plot, and the container will be updated to accommodate it. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to `NULL` +#' @param aspect_ratio Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param aspect_ratio_mobile Aspect (mobile). Aspect ratio of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to `NULL` +#' @param aspect_ratio_breakpoint Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_categorical_palette Palette. Flourish type hint: colors, defaults to `NULL` +#' @param chart_color_scale_categorical_extend Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_categorical_custom_palette Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to `NULL` +#' @param chart_color_scale_numeric_type Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_binning Choices: `FALSE`, `TRUE`. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_bin_mode Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_bin_count Number of bins. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_bin_thresholds Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_sequential_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_sequential_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_sequential_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_palette Palette. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_reverse Reverse. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_min Minimum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_mid Midpoint color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_max Maximum color. Flourish type hint: color, defaults to `NULL` +#' @param chart_color_scale_diverging_color_space Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to `NULL` +#' @param chart_color_scale_diverging_custom_domain Domain. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_min Min. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_mid Mid. Flourish type hint: number, defaults to `NULL` +#' @param chart_color_scale_diverging_domain_max Max. Flourish type hint: number, defaults to `NULL` +#' @param animation_type Animation style. Choices: auto, fade, grow, none. Controls the animation on load. Auto mode will use Grow if there are fewer than 100 words visible, Fade if there are fewer than 500, and None if there are 500 or more. Flourish type hint: string, defaults to `NULL` +#' @param duration Duration. The time in seconds it takes for an individual word to move from the start position to end position. Flourish type hint: number, defaults to `NULL` +#' @param stagger Stagger. The time in seconds between the first and last word animations starting. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_prefix Prefix. Text to place in front of number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_suffix Suffix. Text to place after number. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_n_dec Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_advanced Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_negative_sign Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_strip_zeros Remove trailing zeros. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_strip_separator Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform_labels Multiply/divide values. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_number_date_format_transform Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_date_format_multiply_divide_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_date_format_exponentiate_constant Flourish type hint: number, defaults to `NULL` +#' @param chart_number_localization_input_decimal_separator Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to `NULL` +#' @param chart_number_localization_output_separators Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_mode Choices: none, popup, panel, both. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_is_custom Popup content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_popup_styles Show popup styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_custom_header Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_main Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_popup_custom_accessible Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_popup_width Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_align Align. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_radius Radius. Corner radius of popup. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_popup_header_type Header style. Choices: block, inline. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_header_background Background. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_header_text_color Text. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_popup_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_popup_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_popup_pointer Pointer. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_position Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_open_duration Open duration. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_side_fixed Always show. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_side_default_content Placeholder content. Flourish type hint: text, defaults to `NULL` +#' @param chart_popup_panel_is_custom Panel content. Choices: `FALSE`, `TRUE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_show_panel_styles Show panel styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_popup_panel_custom_header Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_custom_main Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to `NULL` +#' @param chart_popup_panel_width_overlay Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_overlay Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_width_side Width (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_height_side Height (%). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_width Max width (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_max_height Max height (px). Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_vertical_position Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_text_color Text color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_font_size Text size. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_align Alignment. Choices: start, center, end. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_background Fill color. Flourish type hint: color, defaults to `NULL` +#' @param chart_popup_panel_background_opacity Fill opacity. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_padding Padding. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_radius Radius. Corner radius of panel. Flourish type hint: number, defaults to `NULL` +#' @param chart_popup_panel_list_type List type. Choices: table, ul. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_label_weight Label weight. Choices: normal, bold. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_list_separator List separator. Choices: :, , , `
`. Flourish type hint: string, defaults to `NULL` +#' @param chart_popup_panel_shadow Shadow. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_body_font Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_font_color Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_color_enabled Color. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_image_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_background_color Background color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_background_image_src Image URL. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_background_image_size Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_background_image_position Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width_target Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_max_width Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_max_width_align Align. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_layout_order Layout order. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_space_between_sections_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_enabled Show borders around visualisation. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_border_top_width Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_top_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_top_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_right_width Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_right_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_right_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_bottom_width Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_bottom_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_bottom_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_border_left_width Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_border_left_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_border_left_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_read_direction Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_font_size_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_font_size_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_small Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_mobile_big Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_tablet Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_desktop Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_breakpoint_big_screen Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_align Alignment. Choices: left, center, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_title_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_title_font Title Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_title_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_title_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_title_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_title_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_subtitle_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_subtitle_font Subtitle Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_subtitle_size Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_subtitle_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_subtitle_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_subtitle_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_header_text_styling Styling. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_text_size Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_size_custom Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_text_line_height Line height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_text_space_above Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_text_space_above_custom Custom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_header_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_border_space Space. Space between border and header text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_enabled Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_header_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_header_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_align Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_inside Position. Choices: top, left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_position_outside Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_header_logo_margin_top Top. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_right Right. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_bottom Bottom. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_header_logo_margin_left Left. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_align Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_text_size Size. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_text_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_styling Advanced footer styles. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_font Font. Flourish type hint: font, defaults to `NULL` +#' @param chart_layout_footer_text_weight Weight. Choices: bold, normal. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_multiple_sources Multiple sources. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_source_name_2 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_2 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_name_3 Source name. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_url_3 Source url. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_source_label Source label. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_note Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_footer_note_secondary Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to `NULL` +#' @param chart_layout_advanced_note_styling Advanced. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_timestamp_format Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_enabled Image. Choices: `TRUE`, `FALSE`. Flourish type hint: boolean, defaults to `NULL` +#' @param chart_layout_footer_logo_src Image. Flourish type hint: url, defaults to `NULL` +#' @param chart_layout_footer_logo_src_light Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to `NULL` +#' @param chart_layout_footer_logo_alt Alt text. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_link_url Link. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_logo_height Height. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_margin Margin. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_logo_order Position. Choices: left, right. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_align_vertical V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_width Width. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_footer_border_color Color. Flourish type hint: color, defaults to `NULL` +#' @param chart_layout_footer_border_style Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_footer_border_space Space. Space between border and footer text. Flourish type hint: number, defaults to `NULL` +#' @param chart_layout_screenreader_text_primary Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to `NULL` +#' @param chart_layout_screenreader_label Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to `NULL` +#' @param chart_layout_screenreader_hide_primary Screenreader mode for main visual container. Choices: `TRUE`, `FALSE`. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to `NULL` +#' @param . The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph). +#' @return A Flourish chart +#' @examples +#' try( +#' flourish(chart_type = "word_cloud", api_key = Sys.getenv("FLOURISH_API_KEY")) |> +#' bind_word_cloud_data(gapminder) |> +#' set_word_cloud_details() +#' ) +#' @export + +set_word_cloud_details <- function( + ., + using_tables = NULL, + word_limit = NULL, + raw_text = NULL, + exclusions = NULL, + excluded_words = NULL, + strip_trailing_s = NULL, + convert_to_lowercase = NULL, + cloud_font = NULL, + text_color = NULL, + word_padding = NULL, + random_seed = NULL, + angle_min = NULL, + angle_max = NULL, + angle_number = NULL, + font_size_min = NULL, + font_size_max = NULL, + size_mode = NULL, + height_mode = NULL, + aspect_ratio = NULL, + aspect_ratio_mobile = NULL, + aspect_ratio_breakpoint = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + animation_type = NULL, + duration = NULL, + stagger = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL) { + details_error(., "word_cloud") + + old_list <- . + new_list <- list() + + if (isTRUE(old_list$x$template != "@flourish/word-cloud")) { + stop("`set_word_cloud_details()` is not supported for this chart type.") + } + list_using_tables <- c(FALSE, TRUE, NULL) + if (!is.null(using_tables)) { + if (!using_tables %in% list_using_tables) { + stop("`using_tables` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && using_tables %in% names(named_list)) { + if (is.logical(using_tables)) { + using_tables <- as.character(using_tables) + } + named_list_value <- unname(named_list[using_tables])[[1]] + new_list$x$state$using_tables <- named_list_value + } + } + } + } + new_list$x$state$word_limit <- word_limit + if (length(raw_text) > 1) { + new_list$x$state$raw_text <- paste(raw_text, collapse = "\n") + } else { + new_list$x$state$raw_text <- raw_text + } + + new_list$x$state$exclusions <- exclusions + if (length(excluded_words) > 1) { + new_list$x$state$excluded_words <- paste(excluded_words, collapse = "\n") + } else { + new_list$x$state$excluded_words <- excluded_words + } + + new_list$x$state$strip_trailing_s <- strip_trailing_s + new_list$x$state$convert_to_lowercase <- convert_to_lowercase + new_list$x$state$cloud_font <- cloud_font + new_list$x$state$text_color <- text_color + new_list$x$state$word_padding <- word_padding + new_list$x$state$random_seed <- random_seed + new_list$x$state$angle_min <- angle_min + new_list$x$state$angle_max <- angle_max + new_list$x$state$angle_number <- angle_number + new_list$x$state$font_size_min <- font_size_min + new_list$x$state$font_size_max <- font_size_max + list_size_mode <- c("linear", "sqrt", "log", NULL) + if (!is.null(size_mode)) { + if (!size_mode %in% list_size_mode) { + stop("`size_mode` must be one of: c('linear', 'sqrt', 'log')") + } else { + if (length(jsonlite::fromJSON('{"linear": "linear", "sqrt": "sqrt", "log": "log"}')) > 1) { + named_list <- jsonlite::fromJSON('{"linear": "linear", "sqrt": "sqrt", "log": "log"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && size_mode %in% names(named_list)) { + if (is.logical(size_mode)) { + size_mode <- as.character(size_mode) + } + named_list_value <- unname(named_list[size_mode])[[1]] + new_list$x$state$size_mode <- named_list_value + } + } + } + } + list_height_mode <- c("fill_space", "aspect", NULL) + if (!is.null(height_mode)) { + if (!height_mode %in% list_height_mode) { + stop("`height_mode` must be one of: c('fill_space', 'aspect')") + } else { + if (length(jsonlite::fromJSON('{"fill_space": "fill_space", "aspect": "aspect"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fill_space": "fill_space", "aspect": "aspect"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && height_mode %in% names(named_list)) { + if (is.logical(height_mode)) { + height_mode <- as.character(height_mode) + } + named_list_value <- unname(named_list[height_mode])[[1]] + new_list$x$state$height_mode <- named_list_value + } + } + } + } + new_list$x$state$aspect_ratio <- aspect_ratio + new_list$x$state$aspect_ratio_mobile <- aspect_ratio_mobile + new_list$x$state$aspect_ratio_breakpoint <- aspect_ratio_breakpoint + if (length(chart_color_scale_categorical_palette) > 1) { + new_list$x$state$color$categorical_palette <- paste(chart_color_scale_categorical_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_palette <- chart_color_scale_categorical_palette + } + + new_list$x$state$color$categorical_extend <- chart_color_scale_categorical_extend + if (length(chart_color_scale_categorical_custom_palette) > 1) { + new_list$x$state$color$categorical_custom_palette <- paste(chart_color_scale_categorical_custom_palette, collapse = "\n") + } else { + new_list$x$state$color$categorical_custom_palette <- chart_color_scale_categorical_custom_palette + } + + list_chart_color_scale_numeric_type <- c("sequential", "diverging", NULL) + if (!is.null(chart_color_scale_numeric_type)) { + if (!chart_color_scale_numeric_type %in% list_chart_color_scale_numeric_type) { + stop("`chart_color_scale_numeric_type` must be one of: c('sequential', 'diverging')") + } else { + if (length(jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}')) > 1) { + named_list <- jsonlite::fromJSON('{"sequential": "sequential", "diverging": "diverging"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_numeric_type %in% names(named_list)) { + if (is.logical(chart_color_scale_numeric_type)) { + chart_color_scale_numeric_type <- as.character(chart_color_scale_numeric_type) + } + named_list_value <- unname(named_list[chart_color_scale_numeric_type])[[1]] + new_list$x$state$color$numeric_type <- named_list_value + } + } + } + } + list_chart_color_scale_binning <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_binning)) { + if (!chart_color_scale_binning %in% list_chart_color_scale_binning) { + stop("`chart_color_scale_binning` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_binning %in% names(named_list)) { + if (is.logical(chart_color_scale_binning)) { + chart_color_scale_binning <- as.character(chart_color_scale_binning) + } + named_list_value <- unname(named_list[chart_color_scale_binning])[[1]] + new_list$x$state$color$binning <- named_list_value + } + } + } + } + list_chart_color_scale_bin_mode <- c("fixed", "quantile", "custom", NULL) + if (!is.null(chart_color_scale_bin_mode)) { + if (!chart_color_scale_bin_mode %in% list_chart_color_scale_bin_mode) { + stop("`chart_color_scale_bin_mode` must be one of: c('fixed', 'quantile', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"fixed": "fixed", "quantile": "quantile", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_bin_mode %in% names(named_list)) { + if (is.logical(chart_color_scale_bin_mode)) { + chart_color_scale_bin_mode <- as.character(chart_color_scale_bin_mode) + } + named_list_value <- unname(named_list[chart_color_scale_bin_mode])[[1]] + new_list$x$state$color$bin_mode <- named_list_value + } + } + } + } + new_list$x$state$color$bin_count <- chart_color_scale_bin_count + new_list$x$state$color$bin_thresholds <- chart_color_scale_bin_thresholds + new_list$x$state$color$sequential_palette <- chart_color_scale_sequential_palette + new_list$x$state$color$sequential_reverse <- chart_color_scale_sequential_reverse + new_list$x$state$color$sequential_custom_min <- chart_color_scale_sequential_custom_min + new_list$x$state$color$sequential_custom_max <- chart_color_scale_sequential_custom_max + list_chart_color_scale_sequential_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_sequential_color_space)) { + if (!chart_color_scale_sequential_color_space %in% list_chart_color_scale_sequential_color_space) { + stop("`chart_color_scale_sequential_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_color_space)) { + chart_color_scale_sequential_color_space <- as.character(chart_color_scale_sequential_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_color_space])[[1]] + new_list$x$state$color$sequential_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_sequential_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_sequential_custom_domain)) { + if (!chart_color_scale_sequential_custom_domain %in% list_chart_color_scale_sequential_custom_domain) { + stop("`chart_color_scale_sequential_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_sequential_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_sequential_custom_domain)) { + chart_color_scale_sequential_custom_domain <- as.character(chart_color_scale_sequential_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_sequential_custom_domain])[[1]] + new_list$x$state$color$sequential_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$sequential_domain_min <- chart_color_scale_sequential_domain_min + new_list$x$state$color$sequential_domain_max <- chart_color_scale_sequential_domain_max + new_list$x$state$color$diverging_palette <- chart_color_scale_diverging_palette + new_list$x$state$color$diverging_reverse <- chart_color_scale_diverging_reverse + new_list$x$state$color$diverging_custom_min <- chart_color_scale_diverging_custom_min + new_list$x$state$color$diverging_custom_mid <- chart_color_scale_diverging_custom_mid + new_list$x$state$color$diverging_custom_max <- chart_color_scale_diverging_custom_max + list_chart_color_scale_diverging_color_space <- c("rgb", "lab", "hcl", "hsl", NULL) + if (!is.null(chart_color_scale_diverging_color_space)) { + if (!chart_color_scale_diverging_color_space %in% list_chart_color_scale_diverging_color_space) { + stop("`chart_color_scale_diverging_color_space` must be one of: c('rgb', 'lab', 'hcl', 'hsl')") + } else { + if (length(jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"rgb": "rgb", "lab": "lab", "hcl": "hcl", "hsl": "hsl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_color_space %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_color_space)) { + chart_color_scale_diverging_color_space <- as.character(chart_color_scale_diverging_color_space) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_color_space])[[1]] + new_list$x$state$color$diverging_color_space <- named_list_value + } + } + } + } + list_chart_color_scale_diverging_custom_domain <- c(FALSE, TRUE, NULL) + if (!is.null(chart_color_scale_diverging_custom_domain)) { + if (!chart_color_scale_diverging_custom_domain %in% list_chart_color_scale_diverging_custom_domain) { + stop("`chart_color_scale_diverging_custom_domain` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_color_scale_diverging_custom_domain %in% names(named_list)) { + if (is.logical(chart_color_scale_diverging_custom_domain)) { + chart_color_scale_diverging_custom_domain <- as.character(chart_color_scale_diverging_custom_domain) + } + named_list_value <- unname(named_list[chart_color_scale_diverging_custom_domain])[[1]] + new_list$x$state$color$diverging_custom_domain <- named_list_value + } + } + } + } + new_list$x$state$color$diverging_domain_min <- chart_color_scale_diverging_domain_min + new_list$x$state$color$diverging_domain_mid <- chart_color_scale_diverging_domain_mid + new_list$x$state$color$diverging_domain_max <- chart_color_scale_diverging_domain_max + list_animation_type <- c("auto", "fade", "grow", "none", NULL) + if (!is.null(animation_type)) { + if (!animation_type %in% list_animation_type) { + stop("`animation_type` must be one of: c('auto', 'fade', 'grow', 'none')") + } else { + if (length(jsonlite::fromJSON('{"auto": "auto", "fade": "fade", "grow": "grow", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"auto": "auto", "fade": "fade", "grow": "grow", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && animation_type %in% names(named_list)) { + if (is.logical(animation_type)) { + animation_type <- as.character(animation_type) + } + named_list_value <- unname(named_list[animation_type])[[1]] + new_list$x$state$animation_type <- named_list_value + } + } + } + } + new_list$x$state$duration <- duration + new_list$x$state$stagger <- stagger + new_list$x$state$number_format$prefix <- chart_number_date_format_prefix + new_list$x$state$number_format$suffix <- chart_number_date_format_suffix + new_list$x$state$number_format$n_dec <- chart_number_date_format_n_dec + new_list$x$state$number_format$advanced <- chart_number_date_format_advanced + list_chart_number_date_format_negative_sign <- c("-$nk", "$-nk", "($nk)", "$(n)k", "none", NULL) + if (!is.null(chart_number_date_format_negative_sign)) { + if (!chart_number_date_format_negative_sign %in% list_chart_number_date_format_negative_sign) { + stop("`chart_number_date_format_negative_sign` must be one of: c('-$nk', '$-nk', '($nk)', '$(n)k', 'none')") + } else { + if (length(jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"-$nk": "-$nk", "$-nk": "$-nk", "($nk)": "($nk)", "$(n)k": "$(n)k", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_negative_sign %in% names(named_list)) { + if (is.logical(chart_number_date_format_negative_sign)) { + chart_number_date_format_negative_sign <- as.character(chart_number_date_format_negative_sign) + } + named_list_value <- unname(named_list[chart_number_date_format_negative_sign])[[1]] + new_list$x$state$number_format$negative_sign <- named_list_value + } + } + } + } + new_list$x$state$number_format$strip_zeros <- chart_number_date_format_strip_zeros + new_list$x$state$number_format$strip_separator <- chart_number_date_format_strip_separator + new_list$x$state$number_format$transform_labels <- chart_number_date_format_transform_labels + list_chart_number_date_format_transform <- c("multiply", "divide", "exponentiate", NULL) + if (!is.null(chart_number_date_format_transform)) { + if (!chart_number_date_format_transform %in% list_chart_number_date_format_transform) { + stop("`chart_number_date_format_transform` must be one of: c('multiply', 'divide', 'exponentiate')") + } else { + if (length(jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}')) > 1) { + named_list <- jsonlite::fromJSON('{"multiply": "multiply", "divide": "divide", "exponentiate": "exponentiate"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_date_format_transform %in% names(named_list)) { + if (is.logical(chart_number_date_format_transform)) { + chart_number_date_format_transform <- as.character(chart_number_date_format_transform) + } + named_list_value <- unname(named_list[chart_number_date_format_transform])[[1]] + new_list$x$state$number_format$transform <- named_list_value + } + } + } + } + new_list$x$state$number_format$multiply_divide_constant <- chart_number_date_format_multiply_divide_constant + new_list$x$state$number_format$exponentiate_constant <- chart_number_date_format_exponentiate_constant + list_chart_number_localization_input_decimal_separator <- c(".", ",", NULL) + if (!is.null(chart_number_localization_input_decimal_separator)) { + if (!chart_number_localization_input_decimal_separator %in% list_chart_number_localization_input_decimal_separator) { + stop("`chart_number_localization_input_decimal_separator` must be one of: c('.', ',')") + } else { + if (length(jsonlite::fromJSON('{".": ".", ",": ","}')) > 1) { + named_list <- jsonlite::fromJSON('{".": ".", ",": ","}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_input_decimal_separator %in% names(named_list)) { + if (is.logical(chart_number_localization_input_decimal_separator)) { + chart_number_localization_input_decimal_separator <- as.character(chart_number_localization_input_decimal_separator) + } + named_list_value <- unname(named_list[chart_number_localization_input_decimal_separator])[[1]] + new_list$x$state$localization$input_decimal_separator <- named_list_value + } + } + } + } + list_chart_number_localization_output_separators <- c(",.", ".,", ".", ",", " .", " ,", NULL) + if (!is.null(chart_number_localization_output_separators)) { + if (!chart_number_localization_output_separators %in% list_chart_number_localization_output_separators) { + stop("`chart_number_localization_output_separators` must be one of: c(',.', '.,', '.', ',', ' .', ' ,')") + } else { + if (length(jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}')) > 1) { + named_list <- jsonlite::fromJSON('{",.": ",.", ".,": ".,", ".": ".", ",": ",", " .": " .", " ,": " ,"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_number_localization_output_separators %in% names(named_list)) { + if (is.logical(chart_number_localization_output_separators)) { + chart_number_localization_output_separators <- as.character(chart_number_localization_output_separators) + } + named_list_value <- unname(named_list[chart_number_localization_output_separators])[[1]] + new_list$x$state$localization$output_separators <- named_list_value + } + } + } + } + list_chart_popup_mode <- c("none", "popup", "panel", "both", NULL) + if (!is.null(chart_popup_mode)) { + if (!chart_popup_mode %in% list_chart_popup_mode) { + stop("`chart_popup_mode` must be one of: c('none', 'popup', 'panel', 'both')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "popup": "popup", "panel": "panel", "both": "both"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_mode %in% names(named_list)) { + if (is.logical(chart_popup_mode)) { + chart_popup_mode <- as.character(chart_popup_mode) + } + named_list_value <- unname(named_list[chart_popup_mode])[[1]] + new_list$x$state$popup$mode <- named_list_value + } + } + } + } + list_chart_popup_popup_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_popup_is_custom)) { + if (!chart_popup_popup_is_custom %in% list_chart_popup_popup_is_custom) { + stop("`chart_popup_popup_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_popup_is_custom)) { + chart_popup_popup_is_custom <- as.character(chart_popup_popup_is_custom) + } + named_list_value <- unname(named_list[chart_popup_popup_is_custom])[[1]] + new_list$x$state$popup$popup_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_popup_styles <- chart_popup_show_popup_styles + if (length(chart_popup_popup_custom_header) > 1) { + new_list$x$state$popup$popup_custom_header <- paste(chart_popup_popup_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_header <- chart_popup_popup_custom_header + } + + if (length(chart_popup_popup_custom_main) > 1) { + new_list$x$state$popup$popup_custom_main <- paste(chart_popup_popup_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_main <- chart_popup_popup_custom_main + } + + if (length(chart_popup_popup_custom_accessible) > 1) { + new_list$x$state$popup$popup_custom_accessible <- paste(chart_popup_popup_custom_accessible, collapse = "\n") + } else { + new_list$x$state$popup$popup_custom_accessible <- chart_popup_popup_custom_accessible + } + + new_list$x$state$popup$popup_width <- chart_popup_popup_width + new_list$x$state$popup$popup_font_size <- chart_popup_popup_font_size + new_list$x$state$popup$popup_text_color <- chart_popup_popup_text_color + list_chart_popup_popup_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_popup_align)) { + if (!chart_popup_popup_align %in% list_chart_popup_popup_align) { + stop("`chart_popup_popup_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_align %in% names(named_list)) { + if (is.logical(chart_popup_popup_align)) { + chart_popup_popup_align <- as.character(chart_popup_popup_align) + } + named_list_value <- unname(named_list[chart_popup_popup_align])[[1]] + new_list$x$state$popup$popup_align <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_background <- chart_popup_popup_background + new_list$x$state$popup$popup_background_opacity <- chart_popup_popup_background_opacity + new_list$x$state$popup$popup_padding <- chart_popup_popup_padding + new_list$x$state$popup$popup_radius <- chart_popup_popup_radius + list_chart_popup_popup_header_type <- c("block", "inline", NULL) + if (!is.null(chart_popup_popup_header_type)) { + if (!chart_popup_popup_header_type %in% list_chart_popup_popup_header_type) { + stop("`chart_popup_popup_header_type` must be one of: c('block', 'inline')") + } else { + if (length(jsonlite::fromJSON('{"block": "block", "inline": "inline"}')) > 1) { + named_list <- jsonlite::fromJSON('{"block": "block", "inline": "inline"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_header_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_header_type)) { + chart_popup_popup_header_type <- as.character(chart_popup_popup_header_type) + } + named_list_value <- unname(named_list[chart_popup_popup_header_type])[[1]] + new_list$x$state$popup$popup_header_type <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_header_background <- chart_popup_popup_header_background + new_list$x$state$popup$popup_header_text_color <- chart_popup_popup_header_text_color + list_chart_popup_popup_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_popup_list_type)) { + if (!chart_popup_popup_list_type %in% list_chart_popup_popup_list_type) { + stop("`chart_popup_popup_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_type %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_type)) { + chart_popup_popup_list_type <- as.character(chart_popup_popup_list_type) + } + named_list_value <- unname(named_list[chart_popup_popup_list_type])[[1]] + new_list$x$state$popup$popup_list_type <- named_list_value + } + } + } + } + list_chart_popup_popup_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_popup_list_label_weight)) { + if (!chart_popup_popup_list_label_weight %in% list_chart_popup_popup_list_label_weight) { + stop("`chart_popup_popup_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_label_weight)) { + chart_popup_popup_list_label_weight <- as.character(chart_popup_popup_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_popup_list_label_weight])[[1]] + new_list$x$state$popup$popup_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_popup_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_popup_list_separator)) { + if (!chart_popup_popup_list_separator %in% list_chart_popup_popup_list_separator) { + stop("`chart_popup_popup_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_popup_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_popup_list_separator)) { + chart_popup_popup_list_separator <- as.character(chart_popup_popup_list_separator) + } + named_list_value <- unname(named_list[chart_popup_popup_list_separator])[[1]] + new_list$x$state$popup$popup_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$popup_shadow <- chart_popup_popup_shadow + new_list$x$state$popup$popup_pointer <- chart_popup_popup_pointer + list_chart_popup_panel_position <- c("overlay", "left", "right", "top", "bottom", NULL) + if (!is.null(chart_popup_panel_position)) { + if (!chart_popup_panel_position %in% list_chart_popup_panel_position) { + stop("`chart_popup_panel_position` must be one of: c('overlay', 'left', 'right', 'top', 'bottom')") + } else { + if (length(jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"overlay": "overlay", "left": "left", "right": "right", "top": "top", "bottom": "bottom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_position)) { + chart_popup_panel_position <- as.character(chart_popup_panel_position) + } + named_list_value <- unname(named_list[chart_popup_panel_position])[[1]] + new_list$x$state$popup$panel_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_open_duration <- chart_popup_panel_open_duration + new_list$x$state$popup$panel_side_fixed <- chart_popup_panel_side_fixed + if (length(chart_popup_panel_side_default_content) > 1) { + new_list$x$state$popup$panel_side_default_content <- paste(chart_popup_panel_side_default_content, collapse = "\n") + } else { + new_list$x$state$popup$panel_side_default_content <- chart_popup_panel_side_default_content + } + + list_chart_popup_panel_is_custom <- c(FALSE, TRUE, NULL) + if (!is.null(chart_popup_panel_is_custom)) { + if (!chart_popup_panel_is_custom %in% list_chart_popup_panel_is_custom) { + stop("`chart_popup_panel_is_custom` must be one of: c(FALSE, TRUE)") + } else { + if (length(jsonlite::fromJSON('{"false": false, "true": true}')) > 1) { + named_list <- jsonlite::fromJSON('{"false": false, "true": true}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_is_custom %in% names(named_list)) { + if (is.logical(chart_popup_panel_is_custom)) { + chart_popup_panel_is_custom <- as.character(chart_popup_panel_is_custom) + } + named_list_value <- unname(named_list[chart_popup_panel_is_custom])[[1]] + new_list$x$state$popup$panel_is_custom <- named_list_value + } + } + } + } + new_list$x$state$popup$show_panel_styles <- chart_popup_show_panel_styles + if (length(chart_popup_panel_custom_header) > 1) { + new_list$x$state$popup$panel_custom_header <- paste(chart_popup_panel_custom_header, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_header <- chart_popup_panel_custom_header + } + + if (length(chart_popup_panel_custom_main) > 1) { + new_list$x$state$popup$panel_custom_main <- paste(chart_popup_panel_custom_main, collapse = "\n") + } else { + new_list$x$state$popup$panel_custom_main <- chart_popup_panel_custom_main + } + + new_list$x$state$popup$panel_width_overlay <- chart_popup_panel_width_overlay + new_list$x$state$popup$panel_height_overlay <- chart_popup_panel_height_overlay + new_list$x$state$popup$panel_width_side <- chart_popup_panel_width_side + new_list$x$state$popup$panel_height_side <- chart_popup_panel_height_side + new_list$x$state$popup$panel_max_width <- chart_popup_panel_max_width + new_list$x$state$popup$panel_max_height <- chart_popup_panel_max_height + list_chart_popup_panel_vertical_position <- c("click", "center", NULL) + if (!is.null(chart_popup_panel_vertical_position)) { + if (!chart_popup_panel_vertical_position %in% list_chart_popup_panel_vertical_position) { + stop("`chart_popup_panel_vertical_position` must be one of: c('click', 'center')") + } else { + if (length(jsonlite::fromJSON('{"click": "click", "center": "center"}')) > 1) { + named_list <- jsonlite::fromJSON('{"click": "click", "center": "center"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_vertical_position %in% names(named_list)) { + if (is.logical(chart_popup_panel_vertical_position)) { + chart_popup_panel_vertical_position <- as.character(chart_popup_panel_vertical_position) + } + named_list_value <- unname(named_list[chart_popup_panel_vertical_position])[[1]] + new_list$x$state$popup$panel_vertical_position <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_text_color <- chart_popup_panel_text_color + new_list$x$state$popup$panel_font_size <- chart_popup_panel_font_size + list_chart_popup_panel_align <- c("start", "center", "end", NULL) + if (!is.null(chart_popup_panel_align)) { + if (!chart_popup_panel_align %in% list_chart_popup_panel_align) { + stop("`chart_popup_panel_align` must be one of: c('start', 'center', 'end')") + } else { + if (length(jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"start": "start", "center": "center", "end": "end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_align %in% names(named_list)) { + if (is.logical(chart_popup_panel_align)) { + chart_popup_panel_align <- as.character(chart_popup_panel_align) + } + named_list_value <- unname(named_list[chart_popup_panel_align])[[1]] + new_list$x$state$popup$panel_align <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_background <- chart_popup_panel_background + new_list$x$state$popup$panel_background_opacity <- chart_popup_panel_background_opacity + new_list$x$state$popup$panel_padding <- chart_popup_panel_padding + new_list$x$state$popup$panel_radius <- chart_popup_panel_radius + list_chart_popup_panel_list_type <- c("table", "ul", NULL) + if (!is.null(chart_popup_panel_list_type)) { + if (!chart_popup_panel_list_type %in% list_chart_popup_panel_list_type) { + stop("`chart_popup_panel_list_type` must be one of: c('table', 'ul')") + } else { + if (length(jsonlite::fromJSON('{"table": "table", "ul": "ul"}')) > 1) { + named_list <- jsonlite::fromJSON('{"table": "table", "ul": "ul"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_type %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_type)) { + chart_popup_panel_list_type <- as.character(chart_popup_panel_list_type) + } + named_list_value <- unname(named_list[chart_popup_panel_list_type])[[1]] + new_list$x$state$popup$panel_list_type <- named_list_value + } + } + } + } + list_chart_popup_panel_list_label_weight <- c("normal", "bold", NULL) + if (!is.null(chart_popup_panel_list_label_weight)) { + if (!chart_popup_panel_list_label_weight %in% list_chart_popup_panel_list_label_weight) { + stop("`chart_popup_panel_list_label_weight` must be one of: c('normal', 'bold')") + } else { + if (length(jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}')) > 1) { + named_list <- jsonlite::fromJSON('{"normal": "normal", "bold": "bold"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_label_weight %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_label_weight)) { + chart_popup_panel_list_label_weight <- as.character(chart_popup_panel_list_label_weight) + } + named_list_value <- unname(named_list[chart_popup_panel_list_label_weight])[[1]] + new_list$x$state$popup$panel_list_label_weight <- named_list_value + } + } + } + } + list_chart_popup_panel_list_separator <- c(": ", " ", " ", "
", NULL) + if (!is.null(chart_popup_panel_list_separator)) { + if (!chart_popup_panel_list_separator %in% list_chart_popup_panel_list_separator) { + stop("`chart_popup_panel_list_separator` must be one of: c(': ', ' ', ' ', '
')") + } else { + if (length(jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}')) > 1) { + named_list <- jsonlite::fromJSON('{": ": ": ", " \u2013 ": " \u2013 ", " ": " ", "
": "
"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_popup_panel_list_separator %in% names(named_list)) { + if (is.logical(chart_popup_panel_list_separator)) { + chart_popup_panel_list_separator <- as.character(chart_popup_panel_list_separator) + } + named_list_value <- unname(named_list[chart_popup_panel_list_separator])[[1]] + new_list$x$state$popup$panel_list_separator <- named_list_value + } + } + } + } + new_list$x$state$popup$panel_shadow <- chart_popup_panel_shadow + new_list$x$state$layout$body_font <- chart_layout_body_font + new_list$x$state$layout$font_color <- chart_layout_font_color + list_chart_layout_background_color_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_color_enabled)) { + if (!chart_layout_background_color_enabled %in% list_chart_layout_background_color_enabled) { + stop("`chart_layout_background_color_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_color_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_color_enabled)) { + chart_layout_background_color_enabled <- as.character(chart_layout_background_color_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_color_enabled])[[1]] + new_list$x$state$layout$background_color_enabled <- named_list_value + } + } + } + } + list_chart_layout_background_image_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_background_image_enabled)) { + if (!chart_layout_background_image_enabled %in% list_chart_layout_background_image_enabled) { + stop("`chart_layout_background_image_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_enabled %in% names(named_list)) { + if (is.logical(chart_layout_background_image_enabled)) { + chart_layout_background_image_enabled <- as.character(chart_layout_background_image_enabled) + } + named_list_value <- unname(named_list[chart_layout_background_image_enabled])[[1]] + new_list$x$state$layout$background_image_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$background_color <- chart_layout_background_color + new_list$x$state$layout$background_image_src <- chart_layout_background_image_src + list_chart_layout_background_image_size <- c("cover", "contain", "auto", "100% 100%", NULL) + if (!is.null(chart_layout_background_image_size)) { + if (!chart_layout_background_image_size %in% list_chart_layout_background_image_size) { + stop("`chart_layout_background_image_size` must be one of: c('cover', 'contain', 'auto', '100% 100%')") + } else { + if (length(jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}')) > 1) { + named_list <- jsonlite::fromJSON('{"cover": "cover", "contain": "contain", "auto": "auto", "100% 100%": "100% 100%"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_size %in% names(named_list)) { + if (is.logical(chart_layout_background_image_size)) { + chart_layout_background_image_size <- as.character(chart_layout_background_image_size) + } + named_list_value <- unname(named_list[chart_layout_background_image_size])[[1]] + new_list$x$state$layout$background_image_size <- named_list_value + } + } + } + } + list_chart_layout_background_image_position <- c("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right", NULL) + if (!is.null(chart_layout_background_image_position)) { + if (!chart_layout_background_image_position %in% list_chart_layout_background_image_position) { + stop("`chart_layout_background_image_position` must be one of: c('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right')") + } else { + if (length(jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top left": "top left", "top center": "top center", "top right": "top right", "center left": "center left", "center center": "center center", "center right": "center right", "bottom left": "bottom left", "bottom center": "bottom center", "bottom right": "bottom right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_background_image_position %in% names(named_list)) { + if (is.logical(chart_layout_background_image_position)) { + chart_layout_background_image_position <- as.character(chart_layout_background_image_position) + } + named_list_value <- unname(named_list[chart_layout_background_image_position])[[1]] + new_list$x$state$layout$background_image_position <- named_list_value + } + } + } + } + list_chart_layout_max_width_target <- c("none", "wrapper", "primary", NULL) + if (!is.null(chart_layout_max_width_target)) { + if (!chart_layout_max_width_target %in% list_chart_layout_max_width_target) { + stop("`chart_layout_max_width_target` must be one of: c('none', 'wrapper', 'primary')") + } else { + if (length(jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}')) > 1) { + named_list <- jsonlite::fromJSON('{"none": "none", "wrapper": "wrapper", "primary": "primary"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_target %in% names(named_list)) { + if (is.logical(chart_layout_max_width_target)) { + chart_layout_max_width_target <- as.character(chart_layout_max_width_target) + } + named_list_value <- unname(named_list[chart_layout_max_width_target])[[1]] + new_list$x$state$layout$max_width_target <- named_list_value + } + } + } + } + new_list$x$state$layout$max_width <- chart_layout_max_width + list_chart_layout_max_width_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_max_width_align)) { + if (!chart_layout_max_width_align %in% list_chart_layout_max_width_align) { + stop("`chart_layout_max_width_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_max_width_align %in% names(named_list)) { + if (is.logical(chart_layout_max_width_align)) { + chart_layout_max_width_align <- as.character(chart_layout_max_width_align) + } + named_list_value <- unname(named_list[chart_layout_max_width_align])[[1]] + new_list$x$state$layout$max_width_align <- named_list_value + } + } + } + } + new_list$x$state$layout$layout_order <- chart_layout_layout_order + list_chart_layout_space_between_sections <- c("0.5", "1", "1.5", "custom", NULL) + if (!is.null(chart_layout_space_between_sections)) { + if (!chart_layout_space_between_sections %in% list_chart_layout_space_between_sections) { + stop("`chart_layout_space_between_sections` must be one of: c('0.5', '1', '1.5', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0.5": "0.5", "1": "1", "1.5": "1.5", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_space_between_sections %in% names(named_list)) { + if (is.logical(chart_layout_space_between_sections)) { + chart_layout_space_between_sections <- as.character(chart_layout_space_between_sections) + } + named_list_value <- unname(named_list[chart_layout_space_between_sections])[[1]] + new_list$x$state$layout$space_between_sections <- named_list_value + } + } + } + } + new_list$x$state$layout$space_between_sections_custom <- chart_layout_space_between_sections_custom + new_list$x$state$layout$margin_top <- chart_layout_margin_top + new_list$x$state$layout$margin_right <- chart_layout_margin_right + new_list$x$state$layout$margin_bottom <- chart_layout_margin_bottom + new_list$x$state$layout$margin_left <- chart_layout_margin_left + new_list$x$state$layout$border$enabled <- chart_layout_border_enabled + new_list$x$state$layout$border$top$width <- chart_layout_border_top_width + list_chart_layout_border_top_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_top_style)) { + if (!chart_layout_border_top_style %in% list_chart_layout_border_top_style) { + stop("`chart_layout_border_top_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_top_style %in% names(named_list)) { + if (is.logical(chart_layout_border_top_style)) { + chart_layout_border_top_style <- as.character(chart_layout_border_top_style) + } + named_list_value <- unname(named_list[chart_layout_border_top_style])[[1]] + new_list$x$state$layout$border$top$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$top$color <- chart_layout_border_top_color + new_list$x$state$layout$border$right$width <- chart_layout_border_right_width + list_chart_layout_border_right_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_right_style)) { + if (!chart_layout_border_right_style %in% list_chart_layout_border_right_style) { + stop("`chart_layout_border_right_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_right_style %in% names(named_list)) { + if (is.logical(chart_layout_border_right_style)) { + chart_layout_border_right_style <- as.character(chart_layout_border_right_style) + } + named_list_value <- unname(named_list[chart_layout_border_right_style])[[1]] + new_list$x$state$layout$border$right$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$right$color <- chart_layout_border_right_color + new_list$x$state$layout$border$bottom$width <- chart_layout_border_bottom_width + list_chart_layout_border_bottom_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_bottom_style)) { + if (!chart_layout_border_bottom_style %in% list_chart_layout_border_bottom_style) { + stop("`chart_layout_border_bottom_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_bottom_style %in% names(named_list)) { + if (is.logical(chart_layout_border_bottom_style)) { + chart_layout_border_bottom_style <- as.character(chart_layout_border_bottom_style) + } + named_list_value <- unname(named_list[chart_layout_border_bottom_style])[[1]] + new_list$x$state$layout$border$bottom$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$bottom$color <- chart_layout_border_bottom_color + new_list$x$state$layout$border$left$width <- chart_layout_border_left_width + list_chart_layout_border_left_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_border_left_style)) { + if (!chart_layout_border_left_style %in% list_chart_layout_border_left_style) { + stop("`chart_layout_border_left_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_border_left_style %in% names(named_list)) { + if (is.logical(chart_layout_border_left_style)) { + chart_layout_border_left_style <- as.character(chart_layout_border_left_style) + } + named_list_value <- unname(named_list[chart_layout_border_left_style])[[1]] + new_list$x$state$layout$border$left$style <- named_list_value + } + } + } + } + new_list$x$state$layout$border$left$color <- chart_layout_border_left_color + list_chart_layout_read_direction <- c("ltr", "rtl", NULL) + if (!is.null(chart_layout_read_direction)) { + if (!chart_layout_read_direction %in% list_chart_layout_read_direction) { + stop("`chart_layout_read_direction` must be one of: c('ltr', 'rtl')") + } else { + if (length(jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}')) > 1) { + named_list <- jsonlite::fromJSON('{"ltr": "ltr", "rtl": "rtl"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_read_direction %in% names(named_list)) { + if (is.logical(chart_layout_read_direction)) { + chart_layout_read_direction <- as.character(chart_layout_read_direction) + } + named_list_value <- unname(named_list[chart_layout_read_direction])[[1]] + new_list$x$state$layout$read_direction <- named_list_value + } + } + } + } + new_list$x$state$layout$font_size_mobile_small <- chart_layout_font_size_mobile_small + new_list$x$state$layout$font_size_mobile_big <- chart_layout_font_size_mobile_big + new_list$x$state$layout$font_size_tablet <- chart_layout_font_size_tablet + new_list$x$state$layout$font_size_desktop <- chart_layout_font_size_desktop + new_list$x$state$layout$font_size_big_screen <- chart_layout_font_size_big_screen + new_list$x$state$layout$breakpoint_mobile_small <- chart_layout_breakpoint_mobile_small + new_list$x$state$layout$breakpoint_mobile_big <- chart_layout_breakpoint_mobile_big + new_list$x$state$layout$breakpoint_tablet <- chart_layout_breakpoint_tablet + new_list$x$state$layout$breakpoint_desktop <- chart_layout_breakpoint_desktop + new_list$x$state$layout$breakpoint_big_screen <- chart_layout_breakpoint_big_screen + list_chart_layout_header_align <- c("left", "center", "right", NULL) + if (!is.null(chart_layout_header_align)) { + if (!chart_layout_header_align %in% list_chart_layout_header_align) { + stop("`chart_layout_header_align` must be one of: c('left', 'center', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_align %in% names(named_list)) { + if (is.logical(chart_layout_header_align)) { + chart_layout_header_align <- as.character(chart_layout_header_align) + } + named_list_value <- unname(named_list[chart_layout_header_align])[[1]] + new_list$x$state$layout$header_align <- named_list_value + } + } + } + } + if (length(chart_layout_title) > 1) { + new_list$x$state$layout$title <- paste(chart_layout_title, collapse = "\n") + } else { + new_list$x$state$layout$title <- chart_layout_title + } + + new_list$x$state$layout$title_styling <- chart_layout_title_styling + new_list$x$state$layout$title_font <- chart_layout_title_font + list_chart_layout_title_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_title_size)) { + if (!chart_layout_title_size %in% list_chart_layout_title_size) { + stop("`chart_layout_title_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_size %in% names(named_list)) { + if (is.logical(chart_layout_title_size)) { + chart_layout_title_size <- as.character(chart_layout_title_size) + } + named_list_value <- unname(named_list[chart_layout_title_size])[[1]] + new_list$x$state$layout$title_size <- named_list_value + } + } + } + } + new_list$x$state$layout$title_size_custom <- chart_layout_title_size_custom + list_chart_layout_title_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_title_weight)) { + if (!chart_layout_title_weight %in% list_chart_layout_title_weight) { + stop("`chart_layout_title_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_weight %in% names(named_list)) { + if (is.logical(chart_layout_title_weight)) { + chart_layout_title_weight <- as.character(chart_layout_title_weight) + } + named_list_value <- unname(named_list[chart_layout_title_weight])[[1]] + new_list$x$state$layout$title_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$title_color <- chart_layout_title_color + new_list$x$state$layout$title_line_height <- chart_layout_title_line_height + list_chart_layout_title_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_title_space_above)) { + if (!chart_layout_title_space_above %in% list_chart_layout_title_space_above) { + stop("`chart_layout_title_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_title_space_above %in% names(named_list)) { + if (is.logical(chart_layout_title_space_above)) { + chart_layout_title_space_above <- as.character(chart_layout_title_space_above) + } + named_list_value <- unname(named_list[chart_layout_title_space_above])[[1]] + new_list$x$state$layout$title_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$title_space_above_custom <- chart_layout_title_space_above_custom + if (length(chart_layout_subtitle) > 1) { + new_list$x$state$layout$subtitle <- paste(chart_layout_subtitle, collapse = "\n") + } else { + new_list$x$state$layout$subtitle <- chart_layout_subtitle + } + + new_list$x$state$layout$subtitle_styling <- chart_layout_subtitle_styling + new_list$x$state$layout$subtitle_font <- chart_layout_subtitle_font + list_chart_layout_subtitle_size <- c("1.4", "1.6", "2", "custom", NULL) + if (!is.null(chart_layout_subtitle_size)) { + if (!chart_layout_subtitle_size %in% list_chart_layout_subtitle_size) { + stop("`chart_layout_subtitle_size` must be one of: c('1.4', '1.6', '2', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.4": "1.4", "1.6": "1.6", "2": "2", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_size %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_size)) { + chart_layout_subtitle_size <- as.character(chart_layout_subtitle_size) + } + named_list_value <- unname(named_list[chart_layout_subtitle_size])[[1]] + new_list$x$state$layout$subtitle_size <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_size_custom <- chart_layout_subtitle_size_custom + list_chart_layout_subtitle_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_subtitle_weight)) { + if (!chart_layout_subtitle_weight %in% list_chart_layout_subtitle_weight) { + stop("`chart_layout_subtitle_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_weight %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_weight)) { + chart_layout_subtitle_weight <- as.character(chart_layout_subtitle_weight) + } + named_list_value <- unname(named_list[chart_layout_subtitle_weight])[[1]] + new_list$x$state$layout$subtitle_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_color <- chart_layout_subtitle_color + new_list$x$state$layout$subtitle_line_height <- chart_layout_subtitle_line_height + list_chart_layout_subtitle_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_subtitle_space_above)) { + if (!chart_layout_subtitle_space_above %in% list_chart_layout_subtitle_space_above) { + stop("`chart_layout_subtitle_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_subtitle_space_above %in% names(named_list)) { + if (is.logical(chart_layout_subtitle_space_above)) { + chart_layout_subtitle_space_above <- as.character(chart_layout_subtitle_space_above) + } + named_list_value <- unname(named_list[chart_layout_subtitle_space_above])[[1]] + new_list$x$state$layout$subtitle_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$subtitle_space_above_custom <- chart_layout_subtitle_space_above_custom + if (length(chart_layout_header_text) > 1) { + new_list$x$state$layout$header_text <- paste(chart_layout_header_text, collapse = "\n") + } else { + new_list$x$state$layout$header_text <- chart_layout_header_text + } + + new_list$x$state$layout$header_text_styling <- chart_layout_header_text_styling + list_chart_layout_header_text_size <- c("1.2", "1.4", "1.6", "custom", NULL) + if (!is.null(chart_layout_header_text_size)) { + if (!chart_layout_header_text_size %in% list_chart_layout_header_text_size) { + stop("`chart_layout_header_text_size` must be one of: c('1.2', '1.4', '1.6', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"1.2": "1.2", "1.4": "1.4", "1.6": "1.6", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_size %in% names(named_list)) { + if (is.logical(chart_layout_header_text_size)) { + chart_layout_header_text_size <- as.character(chart_layout_header_text_size) + } + named_list_value <- unname(named_list[chart_layout_header_text_size])[[1]] + new_list$x$state$layout$header_text_size <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_size_custom <- chart_layout_header_text_size_custom + list_chart_layout_header_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_header_text_weight)) { + if (!chart_layout_header_text_weight %in% list_chart_layout_header_text_weight) { + stop("`chart_layout_header_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_header_text_weight)) { + chart_layout_header_text_weight <- as.character(chart_layout_header_text_weight) + } + named_list_value <- unname(named_list[chart_layout_header_text_weight])[[1]] + new_list$x$state$layout$header_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_color <- chart_layout_header_text_color + new_list$x$state$layout$header_text_line_height <- chart_layout_header_text_line_height + list_chart_layout_header_text_space_above <- c("0", "0.5", "1", "custom", NULL) + if (!is.null(chart_layout_header_text_space_above)) { + if (!chart_layout_header_text_space_above %in% list_chart_layout_header_text_space_above) { + stop("`chart_layout_header_text_space_above` must be one of: c('0', '0.5', '1', 'custom')") + } else { + if (length(jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}')) > 1) { + named_list <- jsonlite::fromJSON('{"0": "0", "0.5": "0.5", "1": "1", "custom": "custom"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_text_space_above %in% names(named_list)) { + if (is.logical(chart_layout_header_text_space_above)) { + chart_layout_header_text_space_above <- as.character(chart_layout_header_text_space_above) + } + named_list_value <- unname(named_list[chart_layout_header_text_space_above])[[1]] + new_list$x$state$layout$header_text_space_above <- named_list_value + } + } + } + } + new_list$x$state$layout$header_text_space_above_custom <- chart_layout_header_text_space_above_custom + list_chart_layout_header_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_header_border)) { + if (!chart_layout_header_border %in% list_chart_layout_header_border) { + stop("`chart_layout_header_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border %in% names(named_list)) { + if (is.logical(chart_layout_header_border)) { + chart_layout_header_border <- as.character(chart_layout_header_border) + } + named_list_value <- unname(named_list[chart_layout_header_border])[[1]] + new_list$x$state$layout$header_border <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_width <- chart_layout_header_border_width + new_list$x$state$layout$header_border_color <- chart_layout_header_border_color + list_chart_layout_header_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_header_border_style)) { + if (!chart_layout_header_border_style %in% list_chart_layout_header_border_style) { + stop("`chart_layout_header_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_border_style %in% names(named_list)) { + if (is.logical(chart_layout_header_border_style)) { + chart_layout_header_border_style <- as.character(chart_layout_header_border_style) + } + named_list_value <- unname(named_list[chart_layout_header_border_style])[[1]] + new_list$x$state$layout$header_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$header_border_space <- chart_layout_header_border_space + list_chart_layout_header_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_header_logo_enabled)) { + if (!chart_layout_header_logo_enabled %in% list_chart_layout_header_logo_enabled) { + stop("`chart_layout_header_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_enabled)) { + chart_layout_header_logo_enabled <- as.character(chart_layout_header_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_header_logo_enabled])[[1]] + new_list$x$state$layout$header_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_src <- chart_layout_header_logo_src + new_list$x$state$layout$header_logo_alt <- chart_layout_header_logo_alt + new_list$x$state$layout$header_logo_link_url <- chart_layout_header_logo_link_url + new_list$x$state$layout$header_logo_height <- chart_layout_header_logo_height + list_chart_layout_header_logo_align <- c("inside", "outside", NULL) + if (!is.null(chart_layout_header_logo_align)) { + if (!chart_layout_header_logo_align %in% list_chart_layout_header_logo_align) { + stop("`chart_layout_header_logo_align` must be one of: c('inside', 'outside')") + } else { + if (length(jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}')) > 1) { + named_list <- jsonlite::fromJSON('{"inside": "inside", "outside": "outside"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_align %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_align)) { + chart_layout_header_logo_align <- as.character(chart_layout_header_logo_align) + } + named_list_value <- unname(named_list[chart_layout_header_logo_align])[[1]] + new_list$x$state$layout$header_logo_align <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_inside <- c("top", "left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_inside)) { + if (!chart_layout_header_logo_position_inside %in% list_chart_layout_header_logo_position_inside) { + stop("`chart_layout_header_logo_position_inside` must be one of: c('top', 'left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_inside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_inside)) { + chart_layout_header_logo_position_inside <- as.character(chart_layout_header_logo_position_inside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_inside])[[1]] + new_list$x$state$layout$header_logo_position_inside <- named_list_value + } + } + } + } + list_chart_layout_header_logo_position_outside <- c("left", "right", NULL) + if (!is.null(chart_layout_header_logo_position_outside)) { + if (!chart_layout_header_logo_position_outside %in% list_chart_layout_header_logo_position_outside) { + stop("`chart_layout_header_logo_position_outside` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_header_logo_position_outside %in% names(named_list)) { + if (is.logical(chart_layout_header_logo_position_outside)) { + chart_layout_header_logo_position_outside <- as.character(chart_layout_header_logo_position_outside) + } + named_list_value <- unname(named_list[chart_layout_header_logo_position_outside])[[1]] + new_list$x$state$layout$header_logo_position_outside <- named_list_value + } + } + } + } + new_list$x$state$layout$header_logo_margin_top <- chart_layout_header_logo_margin_top + new_list$x$state$layout$header_logo_margin_right <- chart_layout_header_logo_margin_right + new_list$x$state$layout$header_logo_margin_bottom <- chart_layout_header_logo_margin_bottom + new_list$x$state$layout$header_logo_margin_left <- chart_layout_header_logo_margin_left + list_chart_layout_footer_align <- c("left", "center", "right", "justify", NULL) + if (!is.null(chart_layout_footer_align)) { + if (!chart_layout_footer_align %in% list_chart_layout_footer_align) { + stop("`chart_layout_footer_align` must be one of: c('left', 'center', 'right', 'justify')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "center": "center", "right": "right", "justify": "justify"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align %in% names(named_list)) { + if (is.logical(chart_layout_footer_align)) { + chart_layout_footer_align <- as.character(chart_layout_footer_align) + } + named_list_value <- unname(named_list[chart_layout_footer_align])[[1]] + new_list$x$state$layout$footer_align <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_text_size <- chart_layout_footer_text_size + new_list$x$state$layout$footer_text_color <- chart_layout_footer_text_color + new_list$x$state$layout$footer_styling <- chart_layout_footer_styling + new_list$x$state$layout$footer_font <- chart_layout_footer_font + list_chart_layout_footer_text_weight <- c("bold", "normal", NULL) + if (!is.null(chart_layout_footer_text_weight)) { + if (!chart_layout_footer_text_weight %in% list_chart_layout_footer_text_weight) { + stop("`chart_layout_footer_text_weight` must be one of: c('bold', 'normal')") + } else { + if (length(jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}')) > 1) { + named_list <- jsonlite::fromJSON('{"bold": "bold", "normal": "normal"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_text_weight %in% names(named_list)) { + if (is.logical(chart_layout_footer_text_weight)) { + chart_layout_footer_text_weight <- as.character(chart_layout_footer_text_weight) + } + named_list_value <- unname(named_list[chart_layout_footer_text_weight])[[1]] + new_list$x$state$layout$footer_text_weight <- named_list_value + } + } + } + } + new_list$x$state$layout$source_name <- chart_layout_source_name + new_list$x$state$layout$source_url <- chart_layout_source_url + new_list$x$state$layout$multiple_sources <- chart_layout_multiple_sources + new_list$x$state$layout$source_name_2 <- chart_layout_source_name_2 + new_list$x$state$layout$source_url_2 <- chart_layout_source_url_2 + new_list$x$state$layout$source_name_3 <- chart_layout_source_name_3 + new_list$x$state$layout$source_url_3 <- chart_layout_source_url_3 + new_list$x$state$layout$source_label <- chart_layout_source_label + if (length(chart_layout_footer_note) > 1) { + new_list$x$state$layout$footer_note <- paste(chart_layout_footer_note, collapse = "\n") + } else { + new_list$x$state$layout$footer_note <- chart_layout_footer_note + } + + if (length(chart_layout_footer_note_secondary) > 1) { + new_list$x$state$layout$footer_note_secondary <- paste(chart_layout_footer_note_secondary, collapse = "\n") + } else { + new_list$x$state$layout$footer_note_secondary <- chart_layout_footer_note_secondary + } + + new_list$x$state$layout$advanced_note_styling <- chart_layout_advanced_note_styling + list_chart_layout_footer_timestamp_format <- c("%H:%M:%S", "%I:%M %p", "%H:%M", "%H:%M %p", "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y", "%d %b %Y", "%m/%d/%Y", "%d/%m/%Y", "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", NULL) + if (!is.null(chart_layout_footer_timestamp_format)) { + if (!chart_layout_footer_timestamp_format %in% list_chart_layout_footer_timestamp_format) { + stop("`chart_layout_footer_timestamp_format` must be one of: c('%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S')") + } else { + if (length(jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}')) > 1) { + named_list <- jsonlite::fromJSON('{"%H:%M:%S": "%H:%M:%S", "%I:%M %p": "%I:%M %p", "%H:%M": "%H:%M", "%H:%M %p": "%H:%M %p", "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", "%d %b %Y": "%d %b %Y", "%m/%d/%Y": "%m/%d/%Y", "%d/%m/%Y": "%d/%m/%Y", "%m-%d-%Y": "%m-%d-%Y", "%d-%m-%Y": "%d-%m-%Y", "%Y-%m-%d": "%Y-%m-%d", "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_timestamp_format %in% names(named_list)) { + if (is.logical(chart_layout_footer_timestamp_format)) { + chart_layout_footer_timestamp_format <- as.character(chart_layout_footer_timestamp_format) + } + named_list_value <- unname(named_list[chart_layout_footer_timestamp_format])[[1]] + new_list$x$state$layout$footer_timestamp_format <- named_list_value + } + } + } + } + list_chart_layout_footer_logo_enabled <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_footer_logo_enabled)) { + if (!chart_layout_footer_logo_enabled %in% list_chart_layout_footer_logo_enabled) { + stop("`chart_layout_footer_logo_enabled` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_enabled %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_enabled)) { + chart_layout_footer_logo_enabled <- as.character(chart_layout_footer_logo_enabled) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_enabled])[[1]] + new_list$x$state$layout$footer_logo_enabled <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_logo_src <- chart_layout_footer_logo_src + new_list$x$state$layout$footer_logo_src_light <- chart_layout_footer_logo_src_light + new_list$x$state$layout$footer_logo_alt <- chart_layout_footer_logo_alt + new_list$x$state$layout$footer_logo_link_url <- chart_layout_footer_logo_link_url + new_list$x$state$layout$footer_logo_height <- chart_layout_footer_logo_height + new_list$x$state$layout$footer_logo_margin <- chart_layout_footer_logo_margin + list_chart_layout_footer_logo_order <- c("left", "right", NULL) + if (!is.null(chart_layout_footer_logo_order)) { + if (!chart_layout_footer_logo_order %in% list_chart_layout_footer_logo_order) { + stop("`chart_layout_footer_logo_order` must be one of: c('left', 'right')") + } else { + if (length(jsonlite::fromJSON('{"left": "left", "right": "right"}')) > 1) { + named_list <- jsonlite::fromJSON('{"left": "left", "right": "right"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_logo_order %in% names(named_list)) { + if (is.logical(chart_layout_footer_logo_order)) { + chart_layout_footer_logo_order <- as.character(chart_layout_footer_logo_order) + } + named_list_value <- unname(named_list[chart_layout_footer_logo_order])[[1]] + new_list$x$state$layout$footer_logo_order <- named_list_value + } + } + } + } + list_chart_layout_footer_align_vertical <- c("flex-start", "center", "flex-end", NULL) + if (!is.null(chart_layout_footer_align_vertical)) { + if (!chart_layout_footer_align_vertical %in% list_chart_layout_footer_align_vertical) { + stop("`chart_layout_footer_align_vertical` must be one of: c('flex-start', 'center', 'flex-end')") + } else { + if (length(jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}')) > 1) { + named_list <- jsonlite::fromJSON('{"flex-start": "flex-start", "center": "center", "flex-end": "flex-end"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_align_vertical %in% names(named_list)) { + if (is.logical(chart_layout_footer_align_vertical)) { + chart_layout_footer_align_vertical <- as.character(chart_layout_footer_align_vertical) + } + named_list_value <- unname(named_list[chart_layout_footer_align_vertical])[[1]] + new_list$x$state$layout$footer_align_vertical <- named_list_value + } + } + } + } + list_chart_layout_footer_border <- c("top", "bottom", "top_and_bottom", "none", NULL) + if (!is.null(chart_layout_footer_border)) { + if (!chart_layout_footer_border %in% list_chart_layout_footer_border) { + stop("`chart_layout_footer_border` must be one of: c('top', 'bottom', 'top_and_bottom', 'none')") + } else { + if (length(jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}')) > 1) { + named_list <- jsonlite::fromJSON('{"top": "top", "bottom": "bottom", "top_and_bottom": "top_and_bottom", "none": "none"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border %in% names(named_list)) { + if (is.logical(chart_layout_footer_border)) { + chart_layout_footer_border <- as.character(chart_layout_footer_border) + } + named_list_value <- unname(named_list[chart_layout_footer_border])[[1]] + new_list$x$state$layout$footer_border <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_width <- chart_layout_footer_border_width + new_list$x$state$layout$footer_border_color <- chart_layout_footer_border_color + list_chart_layout_footer_border_style <- c("solid", "dashed", "dotted", NULL) + if (!is.null(chart_layout_footer_border_style)) { + if (!chart_layout_footer_border_style %in% list_chart_layout_footer_border_style) { + stop("`chart_layout_footer_border_style` must be one of: c('solid', 'dashed', 'dotted')") + } else { + if (length(jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}')) > 1) { + named_list <- jsonlite::fromJSON('{"solid": "solid", "dashed": "dashed", "dotted": "dotted"}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_footer_border_style %in% names(named_list)) { + if (is.logical(chart_layout_footer_border_style)) { + chart_layout_footer_border_style <- as.character(chart_layout_footer_border_style) + } + named_list_value <- unname(named_list[chart_layout_footer_border_style])[[1]] + new_list$x$state$layout$footer_border_style <- named_list_value + } + } + } + } + new_list$x$state$layout$footer_border_space <- chart_layout_footer_border_space + if (length(chart_layout_screenreader_text_primary) > 1) { + new_list$x$state$layout$screenreader_text_primary <- paste(chart_layout_screenreader_text_primary, collapse = "\n") + } else { + new_list$x$state$layout$screenreader_text_primary <- chart_layout_screenreader_text_primary + } + + new_list$x$state$layout$screenreader_label <- chart_layout_screenreader_label + list_chart_layout_screenreader_hide_primary <- c(TRUE, FALSE, NULL) + if (!is.null(chart_layout_screenreader_hide_primary)) { + if (!chart_layout_screenreader_hide_primary %in% list_chart_layout_screenreader_hide_primary) { + stop("`chart_layout_screenreader_hide_primary` must be one of: c(TRUE, FALSE)") + } else { + if (length(jsonlite::fromJSON('{"true": true, "false": false}')) > 1) { + named_list <- jsonlite::fromJSON('{"true": true, "false": false}') + # Get the names of the list + names_list <- names(named_list) + # Convert names to boolean values only if they are "true" or "false" + boolean_names <- sapply(names_list, function(x) { + if (x == "true") { + return("TRUE") + } else if (x == "false") { + return("FALSE") + } else { + return(x) # Return the original name if it's not "true" or "false" + } + }) + # Set the names of the list to boolean values + names(named_list) <- boolean_names + if (length(named_list) > 1 && chart_layout_screenreader_hide_primary %in% names(named_list)) { + if (is.logical(chart_layout_screenreader_hide_primary)) { + chart_layout_screenreader_hide_primary <- as.character(chart_layout_screenreader_hide_primary) + } + named_list_value <- unname(named_list[chart_layout_screenreader_hide_primary])[[1]] + new_list$x$state$layout$screenreader_hide_primary <- named_list_value + } + } + } + } + deep_merge(old_list, new_list) +} diff --git a/R_package/R/sysdata.rda b/R_package/R/sysdata.rda new file mode 100644 index 0000000000000000000000000000000000000000..6ba4b17e364321efe3451ff4af66e9f4a031b067 GIT binary patch literal 1093 zcmV-L1iJe|T4*^jL0KkKS;?jrXaEHwf5iX)|L{Nu{oq6Z5J120|L{Nn0Du4i&;*_C zCGPFlf?ho%b=XLyF*J?pGf7X>%6_T(DZNM!)P@s7Kmq!rKxhdvDd~!6000_2K=lEq zs5CSh1cZp1Nc~MFKm*b;GGqWWXaVXC1X4_zMwv{f>Yk=e>JWN?pa9S`03M)3lBelS zHmSW+)YH@h#XTSmGyn}WXlMdXxW64)QtJg*=?XA643Q;{^GVnzP7Re28f*h zZcby>CUY9Sqy*8C>8cR{2n#EJ*&z@V zK?s1D!ZbvgNPu^go>08*_NM2_w8uVkU7NXczkOyJ5Z#3ti=u=Q_f~gS*rX^)Wh-u! z!rbr81?i=!5{LkZK;lWqIMx6f;9m8F&Y@!gvqe&c?PUcDQ;m{1DI9CK5-(3TzujEk zch5x&C?UCX?#!85Y%KM#lN(BA7Ncx1{l>g?R1l7`$3E~mtT*}(9ufWoEMcMXF8rMO|l!?sA8 zI31d^ZzyL3c{|(o+(R+MYR#K%v4(Vrh~ylWLCe4#tq{waA|e<$hgiv@p{pbotgde{ zgI{}g&$S$yob-+|wy14T)Efs{aF}9rVT>uMMO8+TBm|HozG(|@5H;@idR`Ubh5~7E z6JGex9cL`E%w5ug>de`*V8zpO3*Z4}2u7Q9<{=TbBthdWa3OId2{}qu+n7VOW6(o7;GSGvnELFn3J|3+qg+jN9>#DL4u%7{HO;UpL zYOvh)2@SY0YVkPpx|xpm2KMJl%FzI?WYB00Gz|dJpb;p9NxdoNO;BNpr7!@4 z0(zQY017&%4^JC38Q>s$;3PcNl?5zfDd+tDFG3U&ZG~_M0M0;SS15RlLLn(ns4pWW z#9?C;jxM~mgi-{c48vp_e2{blga;Zsgvd}xS^=RizlDhjfVSKVtJ1CW<8>{*wa_7k z8EcA;L9zfFR1}D)NRT5)0;M9LzYiq=9HNe;40L#s2a%Mvn*?g*y_FIRt~hpE{LROu zG}{>4d(jBq`51w@RlSy8kYlPO7&5cyGD$GN1Wvk6t4Lm;v`I2GnI?GP=_iPgmyo42 zz+@PS#_A!681TCMFD|wu5hpFI9gM$n1h;40g8#@atvco%Y_nTi6DlRvX6n}E2=h~Y z+*VVDXF+-pThLyOc_gHO5+GQTNV}*AB}*Q(g1{naq!vI#6OW>bjC4|=RXV7kq)}pl zCITV^pVjvKA5B_v<{h1UMQk?0ZHnDjY_`gdGFx`rc~0vogH(Z_%@VjepV2B3xMtA9 z@KDOfR7Xjj->~UHYV9DneL*Bdku4KT;QsnQ|26MX;}Ac~=Mlw11VHJ|9(=rUd6EPS z&?E>TO**4KMvZWRAfqqd$XW1}oXB8?q`Hb4E}F!bAJk}?-A!EjNJ|eA3-&>N6tgr=zh@c~ zk>)lsZr!=#$pw%_ zbkWIdoTQ{dX|g#jLb^j^Y8v**Bw*kiMomqu*(fa8Sl(e4ps|mqn?K&Caj^5-C?fHd z=1|(9%d~Dmb_OUe^F8LMT*#vu5ZEEcIV1?~#j>$&t=>#Hc+%=YSel!}-^wxrGlm#g zROwJzu_hhRz0*-;pcEj43O8$+^zPW&)m)w@BKvCg`>%c8 zuczMo@4oBk^ajqkx&nX_g#nu6(@9kUR9^bqeVIuqNhwNFilT`^iF?E*&i4BIx4r-Y z#!vuW_q-|V&_08%-N1c49)_#ieQTZ5-(KzSZMCj_wd~98>9UjzgKtP!?F$B#TWC^mEO_F&ALV98hO)(Q1XeJE? zrU)8(qtZ5{^-s}_Q`(Fq@M)q`^FY%S(ofSS&`i(WsI$Y^3@(A4zQ^k|PH^rrPsQ)%j+O*2&To>R$+Y?HvkXaZ@G zlhnq7dXsvLG($|Dka-6pO$mTB0jcV30MI50fSE8RCJCmRVW166 zG)$T_Y3PhbGBg83^h`{rfgY0+1Z2ri!ZgY1Z2$&|k(!xMMI;bFnFA!in9xH*CYdzA zQ_ui3(8ywHW`UwMf@zZg&@>a%Nv2IbN`Iuxr>2bqO%us9%@p3IXoD%V)6l22F*L%S z0%?IyOsW1z_$K87{*5vCDZx`#2N&ntzkn1{A7mexEP2QeIeBssuiB-R1PO&ryv9&1BD*_sY3sjRwI8Ov?L$`*e>L1BQa0Of3kQG{O?Je zGidJDGK4H#86Pcs9IxcsQRhdmq3QCY*24y0$kus4AQ6)D51V*$Vu@FEZ zX%PqnNRud(q=2yz1f>!s42U8XRj8#hQeY5aXOSjRAQl2qB_W6*6e*ryW>Nv6N#_Tl zu~M~ym8{gUQoUGGddf%|@T8|wP^3@{DP9zs0SHpfO+=!Z4&% zQYxu-wo+*+5>kqaQ96+&Bn^cMT1=%%z|~S@Xi_i1nYhl(3M<5HxNq$~`Of6O{p9vL zcMGDd0wuHx8)jEe`Zk|0{HS}-3IZJO(;!6ht+&4Bap!p)R>KkA;WIy{IfSqQ6y>1- z(?`q2;kJ{4pkQE76!#znK)8WWJpRYFx$FJD&Y%jft<~eOeHStPxLfwa&%vmoBj58o z-JlKr0lvTwu>h_v16kC4-S+dO)o_1**sg*e9_6avxQ0RTyPK2-g(!N-wMBme||gY4$F-}Ne%*ttgl1kbT` zl`|Df+DU`u~B~f=M)N$H+=~Y!){U(XpLepJV4M+O@0UZV_&k zxd_S$v#%?b(pp|rNsYXIQrjZMSDfRGDtB2J@Q&c`4S;8JMfP!?<}J>lXMpBjCbs14 zHk>B+M|xVnubE`IpL51trK`5xx5*$w74j8k^ZnmjHXN&X-#~#s1{#H>znY)tp|7 zj|0_IpZjwzfw2jw&nZBGZE4-|QhKTMP+8g%C(bIOX!*3Bf@+t4jeDexa#O_h`t(Oj zPgV{QK5NbtGjvkI{`;Jo!(nT@duhV3j3ZAPo%Zvnb<*iEueKXkHGb?oW*cu1S2%h3 zeETidI&4zIHI_`4>f;>JB}zUek0-`;YbzSXfL{$UBiHSUL+zDjSWk(gbc9AXryYsK z=2Y_u^mf;X?0hp9w_FT}WUmFo^8O@5?vlbJ`a+F0c+Tg$)Fj+{ab)o-={=gR5VM-A zs!R5G{OF1MOpT2%qW$jqtiDe(>YO{Dfa1_Y`~AP?FP~U_nr;K712;OY4MAFqLTAxC z%T7_kvNUn7-m6F8awNL_8uNCUch(uIFR4_ViWlhl zzHG9Gqu}a=M`bl}=xl{nPoloegXz$rHA39|Q*4YyE>iMuTxMu@*Z!fY>()Dw>0b;^ zxJY&FJ<$a;>RtYy6zu=2MbGcgZ#@RApZHDs^y?8;_fn)~G>>dE_E{z*6?ZuMJK55! zy~-4aVx!U2K=@D*1n<FpxKI#t(JwVr>c;-b;3waJIjG zR3qe#Lk{tE^Bc7hEuX|dCC0h0Ufu1!mNQ-N!~@&WwCZ+>J8cgZG99sruAOh20rTR2 zXcW-axh2FQ0*A{d#(9d?*OJOUQw75xjH3nok>DTH63KGA>>NQ`t~O`-slFUnxU7!Xcb|jg+;sep zv41x{4W^pGZV|@blY)7!fAqLbo9>Fw$a^=A?(O~)CA@)pgZk!jchjtutd_~U?O+H6 zZJ_+n!!GAQT}Yo$pTsY~T>5aYf9jZTzaF;6NylW_jADDFa-$aTT{(66)o{E+p*m+v zsvn1^@h!t`%IzZ^qbJpD6YR6W%C7m}Tql2E{COaZWpyW*r&jyvheVH8)-JAK{e2|sgihK`Bk}L*d$v+97(ObFS@h}_PqwA!3eDzG>H7v_ zW0OE}VND9Z;-sc$`$22LGIbJ_+87fQOyE2@N&L?_Iz%XY)3``PS)i7ADmhNpS8^Y$ zg%-N;-c5k_zWXszXW@C8s58wqiW%UCq*Rt#>ax!q05!e1@I93Oghn!>jZbUfAOS5w zF!JCUAdD0Bb{QZ6;>l`q%vrY7;M72=U+WvrZ)AVkiVjSf&xa?hNGObA7{tgphZuEX z+TM8H)hp7L6Kd4^!Q^|odAv{Ai493QgOr*0&dKM%n>VUY!Te^1WWPT&Z~0GR@;LDH z22Mj*EOq-Ow3j^ZFEU+)j~CCcXF_reV{_Em{p_gK2(;hJd&5k_xFQ1|pt3neR{#9( zVVP^s+)}z~l<3mp2HC%TY+9wraEOJ#J^bp9fp1AK=l_(m57?X%5428@l~%vH5S`fT zWJ-T8;N6GOiPEq9l$%wlKc=ON*!KUHcG+=LxQ70rt9c9mM;FaNyGR5OEon_wv&If| zhRCEJR>o@oZ0_Ki{3HLZw%bi)i{2%-$3CDT52E=fCYDD*xQ#jL@W6kQ)rSv zYYX`O=D#%{#4p(-y51Tg2RH*PaLEwYPDYR0)%GQDFg-_W(E~m^VO=P^#Mj#|g>S1h zzpp6rLHM8pXWG}!>F7|rTJ@JaZ+H4V>-G}#3aDTHxd8sy0YUrF1Jb~t8At)!W8BSC zm7L3MoyW)CZym>I8v9=>w^8)R5MUCpz?ixv;sK29P?DAP?b6|9ZRp~}Y~X?8M)(RP zY1&2F#`Ii$rcT?v!g+RO=KtJW{=E;i^!{$bxGEmJ06F*v%Dc%G3$XzJvz!HwKj3b# z&<_?nj^)3g?{m`jH8@(=rx^RIuUpwf2oNV2g+T9rRDn=79`uw%d~5`TK=dswvA%5z zpcEfrz(NoJEv@eeq!=fc&zs_S_c`1+WD_v8K64`1(f5De*_=Oo1R!NZ9`i4PG?rhN z9g6cc_0=xCZylklm8Amt9u|JE2rknR|A)OeJ0bu`$XNyeog-K&%+7WrJ$j?N9){_I z9(mer1@YHAdFSlEKa;38Pc6c<;!Rg8@1aeIKp_BtKq{RJPea9Jd|by4+~DE=t1POaz}I4NEO>)?)jM<{2iAYCtnAp8jJoTmC|%Au-)02 z$eAvck1Hn4FI((mmQ3-z+j$*lXHq=%XZe1XV*l&5&;SJ@ydM@9Y~2mb$xG@kZ1bV~?vv5D&9e*B1 z58Q7&p&MnDY+uPv8zd7gbxjohY?{pW;OGFg0{{~B`2Yg*4NqXR((n39ns*~Ve=Y>P zM8mGmZ+JvuZq0NO#z0>>H1?w+H)-)Vo2h2vksU%lyLbDdu<;$lfS&gm=4JnzD0l>d zKum{_N6K_JaG7Op(eZj25fdi_YIZG94H6Bk%03{PNb7AAXFsD zKfZY?Y^&tFnC+6d&3WqjLl+6ugc&~-&8#ZuCJCBPopL_Wu)}=TE zmZwej8J+jCnctR9e}~m&oC0`HW5(YAgUCqmf?xtz=?_UPY(RiZABx9v;2?pmYRVgY zHHGJEuV`EZ0oO>x|BkR5w+61a1r#Fjf_9Nqq>MoPH$JwzzR{7cnlU04ucG7jeyV{s znL9ff;oHDP2GLB4PC9R1TY->Z07SSU?8sPBm?V5n=*ZVZhn;t~gn0RwWlxf{b8&rQ z7BXU!T)s+5r#-1&`NTb3SDV$^Rb*#=Svom{aQ73An)#LczycK1=CzHp!z|8D2O)&z zrm(}n1QIw~XVBa!XOmW2yv$W!Z2WLv5e5h-h$f04NN-<%A<=EI%0Ia=$$g}O3GOoM zZT9;#Sa+aR?uW6_-obG=GKQ~=!{^`5aQ=&CO9Kehc8rS;pV=oT(0p(JxEWYoHt-K} zZduhX30jKMF84RJwnfvlAy)E(UZFLf4%qo2#i@nv)fWp{EJ}GT!>u9_Md7Avz_`q$dHLQBQ!A{hb=jlVCl zJ13+9e`?U;vJxA@V+QT-pK!y!(oz2TmT*-?$10DESK~=(VP16E_|QY$bPje_E@|Wv z?BU~O%cEfOBa46w*fNXSGI=W@J+P;e^$cbdQdC0Wfn06+We=nPLH>h`Q#~WSG55Fq znC$PIWB z-cONM!LThC-Bta1K?oCS-c;Ibxhk9-vdLO;;q|$Q*3ds?B-m^Sgscx5GzZ`H%%sA+ z?%0aUL+V8HSI~^zg5A_)=1Kjg??1oyyPC~r?yLA}<=n%q4EJ%aMjfMpgvjj~$1e~B zZ;DS-YqaC!Cw@v9u?RqRD9w2>ZoX)H($4;mfj(OQ;8%r4A*T+0+6ooAB7@b~#?$+o z2RhW~fM0Vd_O$D-C5Qo3<2~d(%>N`yKNjihae=w3pj$!pawhM7Fa48=<52(fT5INn z@rjQH9yj401d*IdLK3AQ?NDOU{IWtZjD!>s6x zM@=TVbR#pwApmB^o_8jP^+|JJAn&#y}Zm~(QXwNv9@XnL#yN1;&0D$J}(frKq z^lMvgy^Q>lg5c9B$DEP188z>?EYJU$nHd~IbQH@DhUz?9zUxJ!!N2vZddQZJpGT+33I_c)8O}C^~8H=o)KAixij4M1oHU}+aG3PdRapT@jw;eHFTGmCl2}>unByJ>h8h8I{m5P()Dq4>1y z#M2X+oEYk^#aH`6vZs+ru6=HoXUjwo1{#mz_=vTmBZv`_`6Js+g#Cpw zX-p-=+USHB$+cr2!@ZV1azBf#u0G!dcJF4f((=6W6(U*Rt;dLOP3berK*NFTOR9Lz zn8aAR`)4P}^j3Sz*F2m>0KlNr@G4^6!2e37gK+tl)AQ}(w^w?+Uz4R!+Ix5euDr8U%zH9}2quQln$duv z0-%_C$N!g?**>>%5Jr9Boy?rmsr8GBwkH%+w>~A5*DiKkH;sE%s$%3*U9-6Hu zU8}r;9AGz+B9h&e6Ro*WgFa=9q1nXAp%~C+pMGJx_BsdB$Fib#f( zNxz)#!M|(qzfg(l7tcU*#N-lz5Li0dJ7Rfq*A~sRjfmJvR{1#YXF?DFBkh?H;NcGa zR88y0D|?l7`7(X}!+nqPq_#|1{f#Lf6j=(zQkDHNG803nU&hU_KyGn!%z)9A}aO>k}0;b3uqM;6qo>4{{PF!7+8CcFjPpw zvcfN>DaFH&Wi=tXgp^+ET4XVWQYd~ju=o0HSxa8&-ZrSlIe+HI7Tnwe1ONhMY#~So z%#botN_ZFED$4Pi%Ks1dKF8kYw(aw4>Uh=iJwbiuzV)7pG#e=k{1_yY8M27%Dsl_& zG4ze7JJ)ajx+(QFJa(4uhc{ob))OD8>^52{Nr(jV_0AjDexR0ikj6j)0^G@VYxf^H zP7?k#Q6n%Dx24)SN{y5NQfFA}^M=3f*!%e-8{&zpEqYdoPI-?ix1SC|>|`VZtbz3C z009VDXK&2v`}St8H>w=}WFD@+FaQNkR2>P<@RzY}q78EfF0%7|jK#OOh-odM!bgQ9 z#E3t523u`@&EE)Yizdra}>PDztxJLD#?Qo#M&G}#h3zP{9_buxQvC90B8*9Ap_3S+7-;5;gb?fJupj>BDWUhT(#sZdKGH)BrCb)H1j zw8H%*L~|n$j^pJuJ0oSpcQ$dpYqQVyV(YCdlJm!B@RC)O%dK{{f1j6s0_I*LOM#Ko zzw$S=oVWdVE6ARSv;}1@9WG?HPj0)_m6Gwg(LO;Ng5M+{6x^mCp%s}3(>j4Qt5noL zAysv!A!z7`ZeS=ekbna{1Ea{WiNPq!^7l6~Vuwg1z)3p_oD=hY~DdNls-e+Az#bTmu8BZ{N?ArMeQSUnT zvqdRghknU;1wNM}X*^=4y&rEnXf_V<+Sm<1Qd6%g50a z?#p+}*&cVZzCGU)?Yt2geYRz?%9Q~b%k1r6_*8gsa@h#!!nQD6-2SVz^ep+1)OkPv zSInZ#3XH!^PM7$TpGLHYynnz?LUetfb&|DNb3wJ|@`xlt5P%N+Eax?n^8`I^G$bh?=Wed1G+n<>LRD-502r zGcX6gRUH58th&+mv=D=(H`A*u>bDAr(;`|(*QOn_?!g8}*?zqs1S@(S^ro>G!PP2E z`mHZ$5{p!u5FGA(F!9L|&$mm-^N$OFqEN{&JR* zMr0p-BYLKp(G<^NZ_M%LQpk@Vzij>7q=Zs*@)ehIZ&K>{P*T-iLR+2BLrhHPHJilH z)1wramxg@eJTDzV4O3@TJ~LM{-W88cSgf1;NL?JFK2w%{vBp@_gi*AX3^nji67Px* zbL0zV$dxY|lNCBz3O3)U$$OG9l*ri6MMTa|TGX%dB-BJAvokum4CYxotocZDj47TX zD6_DM=T2!9%T2+o(3Pu|^FY`ZgIKpZlvFR(7F6)$$tjz0u5$~Tvxc5s6-r^Xwpn_k zGt^KC9#`8)n6^OCc;`#BVP9!dUOpbgh=i3gaxxMYR>lgA0h@T3jJ=9%>jp9YcpT6$ zEiY$3Df~=9DVtK!%)wVi5bp~A#)GRU+PN_q;Ph{6z^QIT)FxNr>2!RR<5ps z8c9{E$TtAWNVi0o!85a3j-NE;f~^8*xT>~U!txavm?>OyM_F4bY;!FKrHrp5`x)bNmQ%hH!Dz?Uc!8)_GFej2!x1d0#hPqw;r9|8`tOcBn zQ+fijZ66J?XlaD97G})a&c`fD*%e-mW8>Ot7zC0quujEQ9G$Gils$7aGSI~&G*SjY z`+8J#3x#O0@!7;R^fn0^LFSmARRb86793*|>K(?WR+`kKa!7R_SMgL)NXV{+RK|Jp zKLcx8^li08C0u<;*vd;9EX}z==JnymZnni%KV!x{>zD;9HVO2V9O z6tNEIRgkhOM$sZ24`6te=;T{dJvgI;qgKddb@BFA#VH}}Br2`x^7W~!)GC9KvQM63 z8WO~2Gu5@aCT?qNRl?>ID1}pfUhaMs?hR9Qt6Z0|%hS_XI+a8T4(HhpLs;liELhb? zxoqk_DuAYLvZZRQ=(3V8i|AcFk)%f_KSf%(`#Yf>OSl)Ymb}=UDF>IdgU~*{7;>fP ztZWWyS)_f99LpCNs59S0#^oX=ADxzuuXPeV7p&7AUzi*AB+xx#x#U}1e2zu!6rDAE z&!oxx08P0ml9JX++3W?&6Fh_+`M#Vz+vghH(M5PL1CuS87Qk@k%g;_)5&S)oM;1U#_xJ$G**MDA= zjQNu?Xp8RyH`RnC^hJxbb@P=%YJcS1_hw`Qy+7B&bK!*wIme_ELpM+ zS-bh6LuWp?w#$H#OamFBlPXTQ zmGaIJOOR5em#WNj2$@3iCybtNmo-`{M*PI3p5=QL2d_4zs$(NYivkFvvq(%|V$Sbd zYe3rH;HcqDdX<#w1bEsc!6p1AtF-j6Go#nFXXN^I(C5?laVAPn8&I*HwiEM+{x?fB zKC_ceYagojh2?kOz8;qgqP*Uj0-V>3-hQ{~;9_rE_xvb5E@WQ0!<~0ldq1JUy-MSB z>a~c@saR>|r}I=MaCu#5NsOAz>?Tj=TFzT)qJq+#=T@8BEf%fe(413sdLf?zE>qt0 zfrszSsLJ;!m^I8s;!f&U*;I>XzV;R1H{|Y+>bJ}|tmqcnA>K;R^}cQWr$ei{;=Lxr z-odXuQTo)p(x&ftTED9%xpu=>=a&`jE=KAJu@+b5uMvG8Lnj%m^hBp?lxT&y_4K~-*a`);!2>)-u#Si*w`W8_e-%%>EB=7 ztlQS4xx{aDRP-B|Pe)Z_bwxnxsg2*qm9@n4O7JOvNZKxZo~Eb;Pp5J|L5;<(FSl6i z+56W&O5}1|+UmIMovqsArNpN3TxcC+u8i*+)~bUu2Uc2BQAJYu7SjDt(&E?b+=A0En}K_0x$F2Q z`LmIq_OYqP`)j;}@W1CuUVgXFS0~Zt@bhcV<5!_@-$A&_;a$AacDcwG<@2BX=HK26 z%^bUpTY=e~o}Tafzw*>Ydm2wIdTbU95r06M;#NMXz4MGEzi(C_Yb1{~o_eg2+j7$x z{Qnil1M9K3adT)T+qVd~2_}_1o8B{`mzT1WSUvRi1H{(C*M+9n+&=Ax-9>p4iXZDs zOs7{KxjeVMa#(L-lnHj?nbb&@O|o=>UxY{{&ad0uqW#RlD`v`F*#A4K{2YdQMj1Fd zdJ32Qc$9{uO>k)8ZnsX(o+tOTOKA_x`IfC;TS?c7-40zen*SkI8LdwR5rQGyVUWLg z5-oeaH`060O9Rzil|7WDvxve*(wg2y*Ut~zw@^i%L+n7d`kEx5oPAs-nk_GDu@S9z z?IHX{>yOb#I_pU}9W~MH$6~4*U8aJlgv0*vnlL6U?C37srRdPPzV)dd64z-HA^cu> zz7@vQ@w;3r0G4UrLOZpys65x=RQB3Bnr!CW*CrV{Cnv3R2DZ4hxi~M*o$4)Ji%gxW zQkS!%0^ZJxzDwt<1RtzFS8v17hnT#fz-C3NSdQ+- zOG@jG;;?+zAglhKyB|^$%nB2Y(YbkiA9K@eKh6P$34@=euXPcV`_#%a{m<|>QK#0s zszt_y1aBN{D{dr-=a|iE6$x1btrlhbRb)}q?#ngfB5A*@WKwBa@?CrFUf%O})7vYr z;s;8;{G6N4b(6G~*TB_6yyHgyyaVq!QQ0+lY=|lL)GEh6LcYhd#hLq7|320+p(_(c zLxCNdkXi4ecPg>r*<_tirBU4~Z5AT$7b~kTHMbBi$n2NtR67^Tza^GszVF40z2%V1 z)zV~3CU90|HwodY!`fW#E)@k>=!r9}^XfL7?~~fEla~7#t2^{yhF5IYE#1(D#iE7u zMM_pYDDud2I<2qUb9T_X_6OwM&nG`&#kYC-CW{a6L8cp<)Jr?wWoMJPl|(}*VkR*Q z=53W>ONjpEGvEAe;?!X13ZbfE^ygTsiO*`D#_2-jBfU$aT1;0e<)9Le3pI#Tk_wJiqo8>xcN0>Qswj{nlj+1 z{g`mmRgbpYMLin5TF37-VXfDM@q?FA%F8srS3jq|mY%rVn0P!_?w~quP~dlMM0k%~ z{+*3gME}G}EI0R5#tJukCO=tp@o}~tuAa!Oo?3j@dOtCZ>+|#GDz$jsdK|V5NiCf_ zdDc_XHmP2k&9QcUie)RcBOG;hdZX^!gHc+l{qw(Xu(@b%Rh9ncKUgHTYo1+jTwJ~5wk z{biHh@%GmybleQy2_2gETi57ov9O!-SMeYsy7ok(iZB)4!22Avxm&y@QkuN@nmuAw z3Try~{rbp0M%{u8uSPB5ZJI6VJkgYBwwtA7_9$o1=k$qQ_~B_M zo0wY2bUPzK%~II$w0*~7X$yXnU+eI^mI?eNW6_*#TAd8~-)T;}Y~Rfk1fd`m0*HVj z0ScR1YsXcI0rY`HDg#g)csT%28nOk@63)*%+2lrOC|fL3n}QK0A#F|mxwa+3`L#LR}{Ah0DC?h=$RY;u`PjpLYIGPEHA zZtLaz?s~qq&asOJL=Nl>(*xTBlIp?et-A_Az=M(o?hF8)AQ7M>5IYw>90rRS%@%sA zPPx)=&d0hFKts8N)l0ng!!9w#NsB+ zoJhi8emTT!2k1Tl!~?eXfb9AV;5gMy+969ausEQ2kaM8p!REo#TG9{Vu?LR^!SUm_ zjL&QJeV9B2thwL!u9oGi@4VR3^%IB$MKb#p5yWs0n2&^@s(!U9#V%*6@L|xyh4S9~ z_-Mxxf^LKlfQ|pf(qQn<&9f;r++e~QP9OVaUhJu8DHcXHEn^6%fP+a@rRcVv2S+w8 zv5kVyDed$=H3h5}c&QhyteT;m9;5s|dG%*Tr_YP~}BUJ)c;$RB6;qJ&3i-AuLCz{~Lu9s;P+ zpNBJ0n}>wn;O$`Cu+lrufBj_ffZb`(1Ix+jznMyvba@fJ5G6ce8fbNRVm#>(C0YtdMUY^ zX!OKE(H$CRYd$9@j5I&Pn-!8O@DWQ?fe@_3l+>X=0DH4$q z6?VWQFhGkU#(zgAaJAHN{5<28j;G6c9y%P&YP@S7UWtqsDjH^OgZ~!}y zI6!AFfW+Y3{`t5Fu!5*I0K%1`6#M|UBnk`P>&|2FN3io5u0V-mg`D$E<1&25F|We| z&dH;YV7!O|LNIp^gp46eq5k;4pyamRQjSCtgY_Y2^sK@WhBOMC)(nF z{T#!H$9S_HL>fH&gS*;Dy=o+J(707kx99ge4;x+R@|AfmH2SPdNa8*zaogBFA7{M- zR+H7=IDH^I7&LO7UkD7v#C33Rz2eghHVsmgQG^QYvgIkNEhR7IE2LnGe55A8&(Qu> z3+`Y2{@Y=MP$(w-L94O^qNjv`s4?XiXyrMbOY5VcG)r=O;9?8E8|P-UaKGI>SY@im4Z(`z7d;V@dpt(1FbemrkuW?~cl= zj(MhQmI?$EL=cmO1VQVOPdefnQ1nzL`!x%T;LF|K6@y44hBnLSDSSdOa8 zF)sxKN0DU+kJvcCnF1{{DlwezpEVs;bZ5-WBeQMqj54Ljrs#)F+Z6w!26}FnL#W33 zJ8*W;)bnQ<9^>7ZF(Bl+pnBS}2bBlP2Scu{bp|rMo|0pw_%{>u@Hv-2j?F5Rs^IKe z_N3i?X`~9h9Yte1W!iEMF#l+P2Y?vj28^cD0HP4(KCe?_+j^4l>q2-~Ae>g6Q8Czx zbGhdQ7={`c1C=w#xjwsm+Zw^Ewad(0T=_gVT|sRCW5Kxw0e~EkGtTIv7(_Kvn0T#0 zCPu8Fux(U499kA7MY!1W$|4SGZANT}_NoTBw1ONuzl~FfMlZ1v%V7c_q#eKSU1|(= z*Kfi6CA&R4yZL;ofjwZZd{rpCgPI3g59kJ9caUh{xjKN%-#*H~)dzJ1fS0IengUXF zR+h}Qcd*k88=I1cN?Zj#yvW0gAZEzV0+&8o-8D*@x|bi;(9k)ZhBB(&y+TUPfCy5E z7`xdetd#Zkx7J4xEWEG2LboZlrCn?=5Owa+tgjRsvO2^D6lf%!CYmh}M@G6NPMQ~s z0uNJ<2BVz^p#kS924H9ghj<1Lh8ocs>0Y3_LrQB3MAhlc&Ka_o90Gw~J2E|Ub|MyK zap#PD_nZ|;p~GY&-Xz{5E(t zAomD`#VDo}WllwaGCOv`BSlm;W#|<8&>-=A-3`5M#{I!j9>N%NNk0xstL?N|bheMD z8wVf0@;{L&w;@Q`XjLCds7^`4QB+5G6d=izivc))XQQPV8t@SJ8|wzJj7Pem+)h!0 z=sY3^8!iWm1_7AG!F0)kBRULbNT>}!WvPz57-56FQ+ZeH$AdQJw4`2-NQT&a|rkF{#fj;;>rZNO~h|| zx7^O%z1rbY8^l~kaTjgUK=QDi>}J77ss>Decu8`w-lIDOAi@{?m@*TbgTamd7XJpj zikGzqsRD0sH%Q08XCcPI@KC*vw?e0n9 z>Lfbilrl8Nm_t>K5Cwr3wO6$A* z7P-ozQ5#z#DE5s6i6Sot%ta6y0w9j#c3E_D8H$$Sx&v4nXa;|`5se431_9(fdVXy1 zKc5s0kUr($tI!RYPHX*F=O|~b#+P%qP|%YcIo|`ehT`fnGAot8WGzX_{knApS3ruB z6=jl>6nq#&DssL&PcK(HQ1G?G5`UfJ_C2q)pW{cgEw00A@r2>l1ChHaq{elflp^BsYAF{f<2d3Jl0hqOQ6hBIP_ z!HTIjp_|bxebrQD!+&<=*1GKU9ODvlO@ZwW*^BSBxAb}J30@}Nz{0dM_9~cIoPY&N z{Y`33C)h(<9C2hdza~; z49<50e_@@oCZU*Xf8ZZajyPcTBujur({Jpt(mbdW{wzs59~fNj+|uaMS0v6L>Zn_) z6P$6YJc@ud_)we~paEf^*^kT^*^*jhts6JOb7K#WRX%%3X&^{OO~t+F^`+FJHF4fI zRCsGsIQ!3!LgUhay;|)d-;R>%(SH%sv$n%&wRPvUe4zUTFL5C8aqbc7vsTw{ z1~#*t-`okgY-L6TKj2kdckN|`_PIx~=%TqZ9-UB-(}?3E`v3)HUff1*UD_ca02Tnk z5KiG=R>3IxZOn!t=Ka@$Ih_DJlDQhuQ4=%NECvv67byZf52?4=`x)GCnXU?*Wp;dFz?rCG#WEpEKw5`4DRe(3% zNZ)I?OXPmfpZsh68>qiP@L*i_Vv)J-2iroR-tepUKzz{hh)}3lTm4dE5u|lORtJ6A zhJ>(y1Et(;VlIK4jL{pe=Kss$sphsdVV!?vfn%_(o5@n6RQWDf2Pu5$5!2I>!#41t^*FmIqW z0ld))LZpGdf{*|rfCVxBq1oHsQl!5?cwfVCZBLuG+wDKlFZl`MH&6Ip1{PGtrdZb{ z=56^BxP2AQige^z5&HrX+`vHn>UeXbL2?%E*Wf%^R1?2Lz#$6(uRP8GCa?!84p15a z(s0Pord3ErN_KJv6q-QpHGmwnz|ajKz&tk2V0UiQYr0@`+vVGn;N`e*Qs=sD9$Tm| z-?Axc5cB{5OVHIEhE8_1-^bDim2IP^eb&=iHVQAb*I(16LfNSY;S2ym0Rm$#pvVP7 zj@`kgq6x92h*H4KDkj>?@-PSj=*zp=oe*@=Yx_q@c z{jOfm6SVL0d37)`3aOvlcaE1^@_V0u2g76R0Cxaj7zP2d2c-dEghXQ_XMhBdH{7c} znTrkQZH8fUk(=nw|^r|iG+ePz@h+#4^J zou8ZP^hYmWNtfAk-`{}Wa9)<}@992266vap1`He+Fbn{|I?!;SKa*dr2Z0BY2W0IPm|c*%A}MpTJM>uBQTplA4-f`KyI^;WTNm-Xkfp54rnAqXm0$k^Jc zWSix=xgNdkt~s3qB^Ki*TRO_3%O{{90bk2&1!1IenI?h{$NrS%4fpwhnG=Qgb07l4 z#T)om(r*D>-^?(TJ6@)C-vxo=K;9~z_$lX z3*PkC5%>G0?Nc`m2v+2^>GF3M|E=0T7$npzv)|Ej@QpZ(Tk`mb88m^^?! z->K|d^qPD&jmoX(2L`O(i8Xl$lACi}Zo;l%ArS zDNdv*3Q~YdDN>*^iPWkM3R0x%Ql%=B$w`!=aAu}}Wma%!2f+uz2R00Wqye1_bRwb< zq$z|_6o{w{Dcgepq8}=g#3?v9P<8;-r~|MDv_g=kbO-i>RY}Dn34yeWurQ>Q+kvwN z*MtNqyaQ+stQrBN9-tc#Yyr&!Y7OKY*fayogJ~#I6txDpG69e>0mOrc-@ z#2i@ z@H$ra;s4pm-6`1Kw~YT;M_pZ*cg)b!EBN1x`A~;JC00bi({C}iNAKv#Fx~oaXr+eGd za*W8@rzbL%Ff~D-2C9&xM>+uWwE>(SL)wr%SPs_lSO?z|C%oXf8}>`1 zl}vY4K_U*2moql*Jn*kFhJnpI+kVb_!~O)1uR)01~)_3m^g>KXc6n!Tht{ zC8ph+(|#ZASO;^r!-K8e@|QmE8Mt{Eo^Q6+-vDla-$BiT0Of(+0CIrRDLg`uBLLD4 zSQJ8F5DGMq0F>Sb02S^;>qW=Y$9Gb#idQqp$!q&L?C(@Ad7bt({p#GO$mN+FLQE2u z^&||Gg(N~aB_J7rnLv^x3}X<0oZsKqj@|E=JfckveM%(204`mA(MSN3TC~(kv+I3b z>|}Mf*Lj59OR_NvKm!2k0f2P)t(3sf3;>B4pmN|d1B3yb5Vrw@WDJ3T83RBt4B*TI zlm-FM%&JomqyYC|(gQFx0A~k&0e~67fM*By$Q%UPn&8M7fNIbTfx^fi+59{_#fOp7 zd!kYJao$!(Tj*2}{n%F5udRjfvDY78k>%Dt7_sFvN@EnkUjgE#26&Q?4C+h_11GIV z-CS#D<90h#%H#$B5-0#eU;rYF3nV5Hh#)tg&ReR$-q)6R=~R8T{SE{j^cV*g41w7m zNI%x#9z+-i91biUa6NE0uzxT%0NH~`HcDlqG!FC(%5wnkAlQQ-dZ226`2aY(z&ykN zidP1x4geX!sso1xs5_81kbA&ugLwwX2N(>2v$qE94de#k8ojw>4UNoxy-v&O{CWM) z&Bkr_iT|(T`0&2DZd0ME{^nFSG708cHl5W`#-Y|dK>5X&R{#)%_Vh=+z4+%nmxPYf z{QUa^a%u?x+Jk%s_yQ@C1_8)}ywBM{Gz0eEwAe6G000ULpNAJSqT%l;R->bdQR%*Z@Z1!@1f;@A2`SEE zHga?#GEjse2HEwZ1yU`plg3QxL@_MUfC(%BC$BuQ0WO{3!DC`W55x)02bhC6^(fnN zxpU105I~I?NCr?0f$?-XJ${qz_%D2A7rW0t`F@Lh*W=< zCJta5FdP^)0gw##6DH2}^HP;99OANja`gT3y0UH6FN zx2z{W=wQDsk99H)jfYQ+?El~4s?Cwa0mf+Wlab24ROi{KyB8tXU+M^ehTtC7fk17sKO8=j4*^7qt}ja zPem(VZ>;4_J|7RZ`@WUij*Ip;q_-26!0GwzP9FpJGCdeP79bv!AAA|WZ{X%Y8rYC< zfYJ}h4*(8;9l09-L#GD_48Y~V%LADQE6)RD128o~-#|qm8o=j3Y5?W|<1l~T>;5)9 zuh*B>Z~hhD!|d<(e$yH7c80T}^DFVVoHW<{eV)(uOu88Pc)DF)&iUjmmA?%L-kue6 zhC79Ho@P7!HFA8+&AOzm(ZzB$27n734q5@o0|3|qy8q@wlJfDFOfG>Qhxd7ey*-C9 zG{r>Y!tJ|~$j3U4PrrQ>}71McRrU(EOlpC)sI zJFmi|l)nQqnSf^~LJ$!|e`JXo%Ec~zs>jw^19`Jw-Dq?GAw*>b{C_LTU)3_k{%b-Z z14sa)z(*OtdUu~2rv}%H2M7)Lx^yvrx__eof#dQzDz*K4Ts(7g%e*sP!6BV4X=++) z&S#rdlT(&USLclA$LpBW?N+44+H?o=Qb+S64`X3w#sM}U^0#q74bU49bzT5F_&M-t z0pNkP^L&mr&(86F{Mx>5ug`z^{BHyF^46JiI9{Ah3wz5)^!-M!9N+;1dEtQlI;wI4 zSB_hesfrb;frsXf;MsD-1NDI*00J7p+dF*fKEM^wbaUM*t{`z1Be{_@T!vXibIzyV zgb)Pm??E+Ngr=|j@{$d-fh5{3h3z78noU*zj`#m_o%i>MG)NcHVyK!-SK)7t)j$kKyUbe=q?Gvs#K%4#1unU0uS(}J#hK;K&+(jV&mdBO4$XFnV%!hYj$bCUx)IdEIS4&!ah>F_u3o+gv7-MR}_ua z`_`#c?i8llV`(he?!ROD*L$*v9zT;@?VEQ z01zCgrtA z=`)H0Ny4d5y&g)a$C_D)9(yM}mI;A0%Na-~iI}V6xH?C7axdAr)Z&`n#UXq>wHa^P zg2Clo{5*B8y-3s3Gbi;`ks6k(xRi8{>!M3ECL}$CPqT|P>byf`Bxy(kS)rzV!`zMG zIjSMF#HI|~EyG!m&Hl(^gdn{h_P0Gp_)i#Mz(5O+6uRVh8&g0+R)b5wg#Fnz-xM-3 zlS*Yc{=1de=~s)5oR4m@>x5^>YWU^A92|m;tUkel|7hUJdsS$>RX3PzeJ?&?EkUk1 z#vrCTp#SN&e5#|$@~b}Y`Ny=>vukY`8fP&mIk4D6#iWkTrc*no-gUj1)&D`N80xkG zg7@$G%)s>VcNXd>_Mfgl_jZT;{fv+;(5`lkyk?~W3solO4t1Xwr46}UzFweU$8JH)EH_HX-$LXw&wSu3RYel@sPz9HQq|tI z`18xN9B)U}5j9pa6qskhm+X>w3c#l!FO0lM{RW!8_O-?h4Jd1xA~}tia;UDcs2@XZ`L1kve!|vs0nqgYbg^U^mNnZXak~QX>NN> zq+u5;(S^{p_2+%SYi)amXT0tP3Ano5G9kx(rO8y;ezP5yR^9Js*zK?0#DIr8 zI?RHO+tNS$NEo=N7)ShXCR2Nsjd zXm}2Pyo=_ql4K6NC;o>|a7fdR!=K?M;CkI2xxb0_vB#UJuz%(*(=MGyb&Fz{?YKHg zxWYCw#C=8`0sb|`&>7+d14Gr9?>OgTuE|Q$%kFT6mXpgmQ$sq8r#|POk7aAjL?GR{ z11>n9!@gjHX{Vmyom}y`+PE8<{?pM5{W;PuHS^dSHHq|tjVV$1}1-8w{04AWYU|FZr&yvNyVKIETv z^xtS(Wf=1@jY={Wuky9u0T7~tv1jG>9fC1MMO*QO7rd4tSzAQ+#{82ffwW``TsG%n zJ`<=KOksbpC!lNlX(tKZG>F2prb`>pHUjS(>;5M25Kha(({cJ7C4ulndZqdJBU#19 zJctK(JAtiI=-5*`+I+$1BH&CSCDihpuZq!)$QThug^iDc+~g-DnGzc!^L|6EzfJc} zXPmE0wsVGy8ek7@Z0$;=*gvEd~ROTEK{wJ!e000XgP=x_X zUfYfp)Jxlp?c`n}GEC9VIJU#TINNY;$(4)ycLp0wy&?ywQ*?D&40cn!^}GE< zO0$LhKk-jFc>PvN?-^Xz^Iheht*O>V_?E%&fP_a|?#JLG{O31wMMX#z8HC~x zu!maO|9n%@$Pk6A_7G+9Gp6j3Vf1h^P*J;CNGxRka9d4Cd(apHeGb69!rvpdWGy6{ z)nz=7A<98!Fd1z4kp(!{UBp2ZL1p7hh&V0?(ni=Yg^Q=kneLZ_eB*Ss!Kp7l;UG8; zgju_Kz?gJ9SytUSYuO%}&-`n4m!9pkdt^9vuITzL+p%c)o9!{8lqY3l_Vi>#-SYK1 zV{>j2^~$FY9^jN{@!${#Nq@*r+=gOH`Lf9nfYG{M>;ExezF_%P1S=t;r!~ze3`01( zjxDg(ug%uE#D`+rjDJg=S6oElVjqr#ILo_dn#LM2=>pdAxc~Bw`yQu!@I}g@w zKl4=BS>0#V-djP{pHw`csI7K`#F4Yc{#ku>p2^M$b_R2O57G>RfEt!0X>g%L2sylz zx5#^UnI`C#t|aV_A$A7A3j^gT=8Sch(xhMieWak%Ia&48SSpK7@GjHewKI3T=t+IH zYYqZCS#E<`iCm6-f4o}GuNvFN%$P!@uylY%)~NnVNE204zU_) z*V2Am)>8#}?Fh4n-f-LTVN5NID5BK6Jp$8E^sd}O!S;aQ131aDdoUG|GQLsMI2!q2xrQdu)@a(M3FCT%Lm(w_y>$c5|J-f%Xx^DXoabVN% z7OF;|@Og_Fo;)o3q5%->wm=-C>^JZFFt!R7jt10H8pfnkmIS@rygyCm)?JI-sZew$ z#<%==G~Ka**+mG?U;PFH>WlVpzqn5{f%cH@8m19 z#64Vf^u;3Od}+hYVI()Ui=CyiifIB0gCWB)3oYjA`zQE4Q}C5VxhlzN8x4HBPEQ2M zE`+Nn>%Y`V6OZ+aGi|gU*mUwW#=;mrY@_qhN|0;3;~P%ESV*F}w5hAD8mGmr>KvX8 z*SIpJ&Dv{Wb_;Iu`1xFS&`oWJ{%!INF?5H@*x2xbS#1KbV?S+d^@IS|m90`p2*Dgc zATRI4xE-A5blDv-alkPpsQrDvN1}m9aJ?j_wxJ zXP%79Ovkq2;61{*7Ru@iV*&2X+2bmkNHPYlO;E1)`PN%)E^*JYcim3h-JZ7%zk?{x zf(mgAq_?)t0p@@NaM}`U@%xPxhe{V~gL#O1HP0wz;DZJp1OWg{Uy+IEVNmp{E2JCw z;1^jkekX-P9q#tZ-iI(v@1Xxtyd6R^McHsC=)P`r_7#RVUt z>LQd*-hIlnwLg=sgwR03jC$w@hLwh9E{42)mg-5g0-61|L_h?NdB+WhcZ68q0g
    VWlu0hhF<^I{g}g}IMKc;V$6pfI@CNMscRUg0xi?NDrqVU!!#OheQGiRsPon( zB2QKhWtZk@Y^o-8t1iwCYo_OalA@iUSJW=_%Z9=YqO|?7dVA>g4g7VL?cuGmlrN~H ze2SBL0J1I;3hNE*%WQBujH=o1PLD3zjyIV|nI)gUQ}3P3^aK^q;s6xD7lx$y3VS?tiqDNX zX=s85!n*r@-JgQu8|81C{z3tMA1ev+N{htP z4wRt)2^Abb5QG30t8VBx@1`i4p$s{w2zm%kVeWlpq5z(F`QIDA8-T-Nl{Glnb=UK8 zr={*ovG$->DztsJ9yDP|y0Mgmh{3$@+7mZmJfT4OgIAi|OVN8ZriY{ z>2=raG5ofMg)i9Ds9I|rwEObChC^#o;jG0tInhK~E?iI`UPQRcoTwl-7$6J zF>!H1$?YeK%ig9eBT6{;hyWly&Gi&P-r!m68-KVMlRzMFWj$tKFD%mgbq86zfPEtJ zS9m6Y%BCsni;L`7fi;dI#f+HiF7!hk92|dEdDCuf+?fm2Ue<| z`qy25x(-PGK)(MLXx6K`taST>u5^)J`!{C7M;=#z!47ZSTx0x4M}?TnK7MZa|LVwq z1hbgD0N5QB8BA_@?&plN$s+n>vqN-#h!Xi1QJamT_+9`D76b0@O+7x!t`H=@x2Rwj zBCl9a6n)4t6K$X8>Oc0Y|4p5eI0p-$^ST^-+9~OPK?DE~rw)A4a-6aLhblR7b2FuG zyIGxdwE~{Z3J}&|nj4&;0!(g0K42yC1bngzE5X=z$-P+|Q54ZSdc;4}xuU z(f`&xkZsVSu19LBsQ~=a3#vI2mhfkP_Vi`l0~0`8frlPt72JB-Wu>^eXESHmBafWr zP@0~ed27D6ne46zaa!WTk`%rzgYZ}r03^aQ;}Avg!FVm@jH-U8#6dd0tU7l zTInTc#S#H;_;WiQDo`&?-#x^)x7t`Abu5CrMN`f*KaAR=Ah1dZ1c#8{6{m0_TF6JV z@oYqfKJ?7IMZXVK)axav_qdGd7yQM~NA5^Em|`fUJ6S)EZr%3Xa1&}aSKSK*zCzZ| zdy!sb?{fzqrEq$O1DT{r&Nw>`q)3Tqc9}f`EvOl?sK#ZQSke-J?{0XISE3_FBtnIq z0(nui74O{=$#nT3Pu^4f(Bl@)J^wOL_&TbaE~3X%0wMq@Gh4`4efwok8<28^`Ov<< zO@A-|9GQ&>@z73@8&iY;1STLteKCF(|8b#hlUWkG#c|Hh9vk}(oMA$REPya}lhyMl&o6%z^@}=ye~S!@08kOMm6;zE0PJL`qJq?DY{To^>+}yxKjAQa_?~1juV4 zz5J6vw|lF$v(}&L9N!M2_bw7#=0sYZ9dm*?>6OjAu+!CkorTRW zEl&Z`F8_b2B5)HFQaF160gTp{U};^pva(%Wv5)}(CLTp@Inkxq{Ry=gc^L^$(UuPA z4_!ju)Sd49)GsVHs^SeMFlqyV2d-AiS73SS^Gc?PAOd7>!~S7ri3cjF1>5w#$tb{|DJKSC=AYi}$UXv-lATo}ebSjxTqRU%- zPP}FfRE~DXbn}XjFvpgjzS;y&x|z!QWHWDZZqZmzKM-)T&v#nG5CR|&GBXRs%k1P^ z$*v3gBP<5;S9wtpRnk&8dgjIx=iSBc06_!*3ZrvYhyIKzw`-}>8nSvoFQtV*F32s5 z+f^|q#J>X_k-I_65}!Yds7XY{3S>5PUQd@fG`J*>?}swjug8M>85g#kfn-Y%597%j z+`HlC;@^D2EeGO|%T#&hnrUJf2vrDp_&TrLOr?pqbAk|mhZc!j`Y!cK+M^>Yud*aU z5GvW^>EU)ui-uE_?sW`5#b!DF_R}RLl$IS$};;BCXv3;KAS|XvBumu<@90 zJ;;OFnJ+i)0t$k+f0HkA<;g1;U_mZ$H=Vqme}?E^b@Ct`_%*DR6@z=*;;>52{7fTT zuH)iMnjadZ=E_62Lvo15H*AI45(DpCM$lpR)+Nmp!{F<)-CE(?{`DMoairG6c=L9bY4AHGVNo7mM=gNENxItj{L9veR!WJpbbL=+pwKH)e z_e2sGD<1maKkod`kp?7$O`H>@+KXaBz2EZ)7O6e)2SWuviR^-YeR}Ke9h`LzG9#Zo zoW(U)h=9xmbZ`*p+P^Hci|kEdWMwiMX?HDs_37MK;-ydYFBaPi-KG9R1-~}8Qr}kh zP4yfQ4>xc^U+PAlfzbc;bD!cc(#q^Y5OU$Y98>d&ksp^I1vy5wCD7{7YNHdiLg2tMurb( z5CWFjAPtrZ0jcdk(K@O}nR-QFv>% zg#Qrku?p}2f;eSN1{kdPq zMO&@qc2jiP1G$zd7ei?mO+t-;g^&br^f^4n@sf)d@;D4~6l$fEP(lLdgc z(}$As%9&f@Iq7DbugrB9(J+(`SlzNij5o3Ibh9^I3Z|tMxiey|0725dPmnxdB&;<* zre$ArF&%?Jas#rlvvDZ!Fx6yu5{ZY5lwoE56jbddrP}Eu2qW59LI4BEQHA3e*lZ!K zc0=`7(1>*TS&&~Gb-UNfO|+h$B>jGGk566BNRy;FcIZ51g|R)T$`sYxQ3}rIrLmp< zTa`=4S)v&MopYFXgmOG??vRVowprUJjRJ2U0l|RP--qr_DJnED!Sn$LKmldsWK>J! zOVGa09YHskj=a8^B#`@?E2o7(z299gvqgDuC=&+K_D4}?wog~*dQIr-RWpPF^8?Pk zh4&b+-KfjHmTTSPUeX-^05UNPK{Gv@n6I}=h2t7~axAY1&ktldKg(SEqd(H;c4^lk z`g3w{&6OD8Dg}UoSMqEeddqFf9tr{j5Pfg$?jn_OmzsF)LpBm-;Cv(oTTx`>pr&zA zJ!ze|Y;#fkgGG;HM?QW~+h_{OyfUFY2I}l@Ugh5=(Lj5zKIJf`O>~$o-s^X0*3|HK zcP}6)bY}>R8Y(GY{#w}6D;VMU$jSao6}=*Ef+rC81Q$ksx;P{e;~zwrmUYWQ^(Qg9AJ%}ZRXKo7~--sM>;G3g=5cOZ&U{6amv<2 zO|%^JCp~7D(D%1X!1*Iv9VUQt?bQ_XSlmgGE$tiC#xcJmFn|9{AmfI=p&f1jAtC#u zI&p8eG|%lh7zUco*zi6(J0(7Opex&1z$s@6c)z5wpws9$?s;Cm^Jx1BMLYnB5o$GT z>Hhj0Q`TdA&bn>xnkyzCJqPf!L(jxynN<7Y2n;qaMkIBY0K;B5%$D|x4By?5vT_|;1n`yP(DfNac zduN#+I(Zt~y*I!2t9Y42z?0>pJFr`1ne=};dGEV(V!82*98MvOO@!bWVgv#aa{qqR zRp~yTUvgm2_pq*fT0W8o#=K98%qF66T(t2(*zxovI{0I5Z_?AO4_@tMta_kL^K5TFS1gf0%qi0NVf)H6@9r{SY zaTb=7wC9aU>AkIyrKyHz6oF@iA!8dd*;@XJC(?SEyI#6_^8;i|LYnz1zt-Pp52m4A zomVz16?U?I1Kiod;q%LT1{IqE8E{Csi2(>e0h-fQmj2S^osmms=5!^2;DtqE4r|B- zY^M5+sLKfsyR!QjSOY5`hDcAKYA4Px#q>n)Td*mqr2W3zM#m!sm(Hx_%LidBafGlU zB!qT{Tgb656VN+gj87~89<_`S0M!ACo=>m}^4LY9&s=g6@J zuGClIA~~`9Q%aiO4&b1CTKcOinl3Nf#20L&19Fri9nwY6p;y;ED(jd~TJ~gXMo?hm zQ=PeKLZ}5}HLh&(>n^fKjWKp@{P8*!o5t?Q>@DV{hw^|i6E%((4-)O$s#cdSs1R=G zKF!+YLh*c+4U0$5rd=K_YXY?ph%c1N^SKf=CzXIvVLFr0ZF0F#p~k@5xDre8u18@4 z^pwHH>)6_v1f1U`z4@Wtopss{5Yjgt2Y)w_JC}2c-8ih>er;pJy&&eX%$cg>I*5KR z2Ya{wjpwF8M4piT$OykYWf?(zh(}8DD^}m#7=S_m2E9JV^WgqANBsD2cmS2mp1+j4 zZ1h~4?VDbbZD!`zgWb;z2t|GZAcxcq61?gWbL{wGwHbr}00I@vifE(DN7sHBdF5HB zhNEqH)cB6=!RimjYWf)GG9AvM??&zFcD}&&+rQHJm-nJY%2&c?fK5qOJm@;XtMs0} z1zDCNcOmA1cdb@nMthDZZ!z};b(Nl4UJ)Rgpl6+Gf%k2Am-8KsAb7K7_Se0Pw6QF# z^XINQi+5HH$-;}#dKOaZgBXu~Xb3{~W1hFw^(BC)gdUW3zC!oq_igKw*u>}@oBl18 zYv4*Lo5ymJ%u(4yeSk&LS2Nn)&C1#j-WSv3HM47*L#BLzy?nTj~Cp6Q_S4^RMvp~gA{ zh$~*D)TkfU%+tSEWN2>G6^z0l%i$K3`Xe$6`?4#UE?*p7P)f~>;n(A=&66(;p+Ln; za&mo}1&D_Qo^5nnlE52`^q&{e$)o#s+!((-Oo$Ak3SCJMeU~UoWLv&C!tnIl_n~y;t=|z(08+{;4S?g~SzaLlAc@ zD{|DZlhU3^JCM1KItH&|-z5s&H#hHJ4}d4f#d?u95wdX2xb=36e^x%>0JG~iEBF*#^VKq6 zBZ3qL(*A)ww(Md63xsIHgm+5_^$h)+hRL|wYF^&9+_VSElxim298+>=6O%jT7ViE9 zE+{#^O>pbwRQ}z&^t+E0Ma{4>5$W=3(|=sz_w~FAeLWTTYt~+oLSerBJ89Z|&m^zN zeJ@UpK>jvazeGUBvc8Sfr>Fo&RO@f-3BJjk4vyk~Y*YjY56tg{EU`cV0syGM0w%3Q zVC1`~-E#0RA&I3et<%SD>N(PpG{T(db>nzfk4Wmh>~|1~U-|f&l?d!*zgd;Me8wkB z`!iu(oo&K~M*aLn-t+KsYPp^G`+HZ@%nn?E45M1{I%@`ir0vJY{gibu_0xmLor{6e zp6uJX`A>fmG3;qZmk9M*OUE$?JGMF$$ta+1+8otluc*c|e)V5^dz8Qst_A`DUSOv# zZtf|zk5$Yt4c?s2?El&5mB+T|fY(*Fbgg_$^*bfkaX08>{5NP6lHTlXp5`~KznNtF zAB}486AgZ8k`f;$mquuL?IfPg^1{r*-GugOQ*P$a&jIx9Yr zSby}t>xX#i_B)mNKExgUlKGic-8G>wAc61ViX zoHc_~AFmt+zIqnvKx(->-~#{=C@0(50AH0emQQLD{hKR&Hk!5<@jmkZo!(& z)pZ66y5kQ6$m!eKDk4Vrjvx@2*N9!yQego?0D@uKs=c(^gRREnJ>`L5)X6>kCzvSf zBB1Y)=`;@s{402~>z>kYRs<*)A}sjzsJO?xmv1|MOIVj%-BxYn0(nN7`(szanAP9E zaFWkhIQZ06TuZjuek1Z~{Vd7NF}>`{%gwdR`=ULKzi1+N_g-DY9xO200W>p{uiV~k zH<=P35O!=Yd)IuF(#5Ru(Ry7QcICPxv-@-NN6v4Ld)^PLD)Q%VTYt5_rGw1FfPqzE zK>fYrXr)%zM$Hq;lkdhEicuKJ&b z*2vz{e{WYxyy|YfjQ5K`P72F^zt4Mwc_;g?da`hMe;puW!4HGu02PeZ({W-jaIT3_ zdYZW=U?Bn)$!bf>7dg3zLP(emba4MvvX+yn*6>=VwEzIWP8-Uu@h6O}IoG{XXR>|z z%I-_cre|+eC3+pGI)ujB)Lv`U?wImQ=+u3x|7TCrGq2UWW&Lxw6gh0xe{RQqF%o-1 zRn{fSZMO0@<}xd=#?sEAlBrOP+AlWdC(r;5buyhhvUNH9m`ejhb`Ai94*J%P4EvNr zpm*%pZv8RQ zEZ-YnJ*zHXn=|Zkwosj{ML+40ij$s|00DyJcjhJGCOFYf|F138oA(27YUz03;w%3l z__R`%kflH%0d}@u9HgsW{kB&AvkU5C;@;%xZTpPGHGl_d`G^PwO=dz|obgCrApc}$ zPkdyb+5h9+oxe=JlMhVF8v`iUYoW55&C_prl8$=Dl1*T=_a>H*7pk#FK3!B=PrR?W zJIyW7is|x|17wPoK3H_7`JVUhcjvpnyoy6Tbm6L7)Aq0T((1eWblWK#lUfB3zP`bU zm_vj}gdt8{L7^?iaYg8?=Ij}}jtz}6)7w@jG{~w{nd*NbsRmPC&eI#p>bL+zdpffW zue&+MqbbT^`u)=57N*@`%t8CIef5y2Dk>9~mm)H)bWMWNUpr)swA3{xge8-Jd{fCJiJO(W!xQ?_^7m5|O5gczfLI9QX`k%LXe2Uw{h#`4mdGyo$XhZ_HDhiw%k)+P_q zCbK~)Hc$0fbU+b1g(xynl-bB?3iEq59UYOqdUx5=7O(v@_cfefi!@rw+QL%O{j}M8ut-- zHij80fB@yESd1a`nudWU0sx%g9p%xdUGn~u2i~6mLHZqbrk-=&JAuj(=m=H($h%Tp z{Bx*QETtx`R|y~BRNl0j=@0P&w?2}w{^|2`X}x@5{A=j^x=v}g78zU*a`*LQeOfqm zuWWBGSrw#SyrbH3;Z^Qx7@=CpqD)rm^&`-o-)Gc5KVJUw*+}MlY5$A4BAh5l3StjE E09{FMJpcdz literal 0 HcmV?d00001 diff --git a/R_package/inst/README.md b/R_package/inst/README.md new file mode 100644 index 0000000..d88c8dc --- /dev/null +++ b/R_package/inst/README.md @@ -0,0 +1,3 @@ +## README + +The htmlwidgets folder applies the JavaScript necessary for the R package to talk to the Flourish Live API and vice-versa. \ No newline at end of file diff --git a/R_package/inst/extdata/flourish_api_documentation.csv b/R_package/inst/extdata/flourish_api_documentation.csv new file mode 100644 index 0000000..2d0de9b --- /dev/null +++ b/R_package/inst/extdata/flourish_api_documentation.csv @@ -0,0 +1,51 @@ +,template_name,template_id,template_version,chart_type,url +0,bar chart race,@flourish/bar-chart-race,15.6.0,bar_race,https://app.flourish.studio/@flourish/bar-chart-race/15.6.0#api +1,draw the line chart,@flourish/draw-the-line,6.2.0,draw_the_line,https://app.flourish.studio/@flourish/draw-the-line/6.2.0#api +2,sports,@flourish/sports,6.5.1,sports,https://app.flourish.studio/@flourish/sports/6.5.1#api +3,parliament chart,@flourish/parliament-chart,7.5.0,parliament,https://app.flourish.studio/@flourish/parliament-chart/7.5.0#api +4,sankey diagram,@flourish/sankey,10.4.0,sankey,https://app.flourish.studio/@flourish/sankey/10.4.0#api +5,progress chart,@flourish/progress,1.3.1,progress,https://app.flourish.studio/@flourish/progress/1.3.1#api +6,pictogram,@flourish/pictogram,5.3.1,pictogram,https://app.flourish.studio/@flourish/pictogram/5.3.1#api +7,cards,@flourish/cards,10.6.2,cards,https://app.flourish.studio/@flourish/cards/10.6.2#api +8,gauge,@flourish/gauge,1.5.0,gauge,https://app.flourish.studio/@flourish/gauge/1.5.0#api +9,slope chart,@flourish/slope-chart,12.8.1,slope,https://app.flourish.studio/@flourish/slope-chart/12.8.1#api +10,survey,@flourish/survey,12.8.1,survey,https://app.flourish.studio/@flourish/survey/12.8.1#api +11,network graph,@flourish/network-graph,11.6.0,network,https://app.flourish.studio/@flourish/network-graph/11.6.0#api +12,election results chart,@flourish/election-results-chart,8.7.1,election_results,https://app.flourish.studio/@flourish/election-results-chart/8.7.1#api +13,line chart race,@flourish/horserace,15.4.0,horserace,https://app.flourish.studio/@flourish/horserace/15.4.0#api +14,timeline,@flourish/timeline,1.8.0,timeline,https://app.flourish.studio/@flourish/timeline/1.8.0#api +15,bubble chart,@flourish/bubble-chart,1.8.1,bubble,https://app.flourish.studio/@flourish/bubble-chart/1.8.1#api +16,gantt chart,@flourish/gantt,8.7.1,gantt,https://app.flourish.studio/@flourish/gantt/8.7.1#api +17,word cloud,@flourish/word-cloud,3.8.0,word_cloud,https://app.flourish.studio/@flourish/word-cloud/3.8.0#api +18,table,@flourish/table,16.4.0,table,https://app.flourish.studio/@flourish/table/16.4.0#api +19,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,line,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +20,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,area_stacked,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +21,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,area_prop,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +22,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,area,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +23,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,area_stacked_stream,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +24,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,column_grouped,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +25,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,column_stacked,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +26,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,column_stacked_prop,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +27,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,column_waterfall,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +28,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,bar_grouped,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +29,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,bar_stacked,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +30,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,bar_stacked_prop,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +31,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,bar_waterfall,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +32,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,donut,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +33,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,column_grouped_line,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +34,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,column_stacked_line,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +35,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,column_stacked_prop_line,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +36,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,area_stacked_line,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +37,"line, bar and pie charts",@flourish/line-bar-pie,27.8.1,line_line,https://app.flourish.studio/@flourish/line-bar-pie/27.8.1#api +38,sports race,@flourish/sports-race,2.3.0,sports_race,https://app.flourish.studio/@flourish/sports-race/2.3.0#api +39,tournament,@flourish/tournament,1.5.1,tournament,https://app.flourish.studio/@flourish/tournament/1.5.1#api +40,scatter,@flourish/scatter,20.4.1,scatter,https://app.flourish.studio/@flourish/scatter/20.4.1#api +41,chord diagram,@flourish/chord-diagram,8.4.0,chord_diagram,https://app.flourish.studio/@flourish/chord-diagram/8.4.0#api +42,marimekko,@flourish/marimekko,2.3.1,marimekko,https://app.flourish.studio/@flourish/marimekko/2.3.1#api +43,quiz,@flourish/quiz,7.5.0,quiz,https://app.flourish.studio/@flourish/quiz/7.5.0#api +44,hierarchy,@flourish/hierarchy,19.6.1,treemap,https://app.flourish.studio/@flourish/hierarchy/19.6.1#api +45,hierarchy,@flourish/hierarchy,19.6.1,circlepacking,https://app.flourish.studio/@flourish/hierarchy/19.6.1#api +46,hierarchy,@flourish/hierarchy,19.6.1,sunburst,https://app.flourish.studio/@flourish/hierarchy/19.6.1#api +47,hierarchy,@flourish/hierarchy,19.6.1,bar,https://app.flourish.studio/@flourish/hierarchy/19.6.1#api +48,hierarchy,@flourish/hierarchy,19.6.1,radialtree,https://app.flourish.studio/@flourish/hierarchy/19.6.1#api +49,radar chart,@flourish/radar,3.6.1,radar,https://app.flourish.studio/@flourish/radar/3.6.1#api diff --git a/R_package/inst/extdata/gapminder.csv b/R_package/inst/extdata/gapminder.csv new file mode 100644 index 0000000..04fc1a4 --- /dev/null +++ b/R_package/inst/extdata/gapminder.csv @@ -0,0 +1,1705 @@ +"","country","continent","year","lifeExp","pop","gdpPercap" +"1","Afghanistan","Asia",1952,28.801,8425333,779.4453145 +"2","Afghanistan","Asia",1957,30.332,9240934,820.8530296 +"3","Afghanistan","Asia",1962,31.997,10267083,853.10071 +"4","Afghanistan","Asia",1967,34.02,11537966,836.1971382 +"5","Afghanistan","Asia",1972,36.088,13079460,739.9811058 +"6","Afghanistan","Asia",1977,38.438,14880372,786.11336 +"7","Afghanistan","Asia",1982,39.854,12881816,978.0114388 +"8","Afghanistan","Asia",1987,40.822,13867957,852.3959448 +"9","Afghanistan","Asia",1992,41.674,16317921,649.3413952 +"10","Afghanistan","Asia",1997,41.763,22227415,635.341351 +"11","Afghanistan","Asia",2002,42.129,25268405,726.7340548 +"12","Afghanistan","Asia",2007,43.828,31889923,974.5803384 +"13","Albania","Europe",1952,55.23,1282697,1601.056136 +"14","Albania","Europe",1957,59.28,1476505,1942.284244 +"15","Albania","Europe",1962,64.82,1728137,2312.888958 +"16","Albania","Europe",1967,66.22,1984060,2760.196931 +"17","Albania","Europe",1972,67.69,2263554,3313.422188 +"18","Albania","Europe",1977,68.93,2509048,3533.00391 +"19","Albania","Europe",1982,70.42,2780097,3630.880722 +"20","Albania","Europe",1987,72,3075321,3738.932735 +"21","Albania","Europe",1992,71.581,3326498,2497.437901 +"22","Albania","Europe",1997,72.95,3428038,3193.054604 +"23","Albania","Europe",2002,75.651,3508512,4604.211737 +"24","Albania","Europe",2007,76.423,3600523,5937.029526 +"25","Algeria","Africa",1952,43.077,9279525,2449.008185 +"26","Algeria","Africa",1957,45.685,10270856,3013.976023 +"27","Algeria","Africa",1962,48.303,11000948,2550.81688 +"28","Algeria","Africa",1967,51.407,12760499,3246.991771 +"29","Algeria","Africa",1972,54.518,14760787,4182.663766 +"30","Algeria","Africa",1977,58.014,17152804,4910.416756 +"31","Algeria","Africa",1982,61.368,20033753,5745.160213 +"32","Algeria","Africa",1987,65.799,23254956,5681.358539 +"33","Algeria","Africa",1992,67.744,26298373,5023.216647 +"34","Algeria","Africa",1997,69.152,29072015,4797.295051 +"35","Algeria","Africa",2002,70.994,31287142,5288.040382 +"36","Algeria","Africa",2007,72.301,33333216,6223.367465 +"37","Angola","Africa",1952,30.015,4232095,3520.610273 +"38","Angola","Africa",1957,31.999,4561361,3827.940465 +"39","Angola","Africa",1962,34,4826015,4269.276742 +"40","Angola","Africa",1967,35.985,5247469,5522.776375 +"41","Angola","Africa",1972,37.928,5894858,5473.288005 +"42","Angola","Africa",1977,39.483,6162675,3008.647355 +"43","Angola","Africa",1982,39.942,7016384,2756.953672 +"44","Angola","Africa",1987,39.906,7874230,2430.208311 +"45","Angola","Africa",1992,40.647,8735988,2627.845685 +"46","Angola","Africa",1997,40.963,9875024,2277.140884 +"47","Angola","Africa",2002,41.003,10866106,2773.287312 +"48","Angola","Africa",2007,42.731,12420476,4797.231267 +"49","Argentina","Americas",1952,62.485,17876956,5911.315053 +"50","Argentina","Americas",1957,64.399,19610538,6856.856212 +"51","Argentina","Americas",1962,65.142,21283783,7133.166023 +"52","Argentina","Americas",1967,65.634,22934225,8052.953021 +"53","Argentina","Americas",1972,67.065,24779799,9443.038526 +"54","Argentina","Americas",1977,68.481,26983828,10079.02674 +"55","Argentina","Americas",1982,69.942,29341374,8997.897412 +"56","Argentina","Americas",1987,70.774,31620918,9139.671389 +"57","Argentina","Americas",1992,71.868,33958947,9308.41871 +"58","Argentina","Americas",1997,73.275,36203463,10967.28195 +"59","Argentina","Americas",2002,74.34,38331121,8797.640716 +"60","Argentina","Americas",2007,75.32,40301927,12779.37964 +"61","Australia","Oceania",1952,69.12,8691212,10039.59564 +"62","Australia","Oceania",1957,70.33,9712569,10949.64959 +"63","Australia","Oceania",1962,70.93,10794968,12217.22686 +"64","Australia","Oceania",1967,71.1,11872264,14526.12465 +"65","Australia","Oceania",1972,71.93,13177000,16788.62948 +"66","Australia","Oceania",1977,73.49,14074100,18334.19751 +"67","Australia","Oceania",1982,74.74,15184200,19477.00928 +"68","Australia","Oceania",1987,76.32,16257249,21888.88903 +"69","Australia","Oceania",1992,77.56,17481977,23424.76683 +"70","Australia","Oceania",1997,78.83,18565243,26997.93657 +"71","Australia","Oceania",2002,80.37,19546792,30687.75473 +"72","Australia","Oceania",2007,81.235,20434176,34435.36744 +"73","Austria","Europe",1952,66.8,6927772,6137.076492 +"74","Austria","Europe",1957,67.48,6965860,8842.59803 +"75","Austria","Europe",1962,69.54,7129864,10750.72111 +"76","Austria","Europe",1967,70.14,7376998,12834.6024 +"77","Austria","Europe",1972,70.63,7544201,16661.6256 +"78","Austria","Europe",1977,72.17,7568430,19749.4223 +"79","Austria","Europe",1982,73.18,7574613,21597.08362 +"80","Austria","Europe",1987,74.94,7578903,23687.82607 +"81","Austria","Europe",1992,76.04,7914969,27042.01868 +"82","Austria","Europe",1997,77.51,8069876,29095.92066 +"83","Austria","Europe",2002,78.98,8148312,32417.60769 +"84","Austria","Europe",2007,79.829,8199783,36126.4927 +"85","Bahrain","Asia",1952,50.939,120447,9867.084765 +"86","Bahrain","Asia",1957,53.832,138655,11635.79945 +"87","Bahrain","Asia",1962,56.923,171863,12753.27514 +"88","Bahrain","Asia",1967,59.923,202182,14804.6727 +"89","Bahrain","Asia",1972,63.3,230800,18268.65839 +"90","Bahrain","Asia",1977,65.593,297410,19340.10196 +"91","Bahrain","Asia",1982,69.052,377967,19211.14731 +"92","Bahrain","Asia",1987,70.75,454612,18524.02406 +"93","Bahrain","Asia",1992,72.601,529491,19035.57917 +"94","Bahrain","Asia",1997,73.925,598561,20292.01679 +"95","Bahrain","Asia",2002,74.795,656397,23403.55927 +"96","Bahrain","Asia",2007,75.635,708573,29796.04834 +"97","Bangladesh","Asia",1952,37.484,46886859,684.2441716 +"98","Bangladesh","Asia",1957,39.348,51365468,661.6374577 +"99","Bangladesh","Asia",1962,41.216,56839289,686.3415538 +"100","Bangladesh","Asia",1967,43.453,62821884,721.1860862 +"101","Bangladesh","Asia",1972,45.252,70759295,630.2336265 +"102","Bangladesh","Asia",1977,46.923,80428306,659.8772322 +"103","Bangladesh","Asia",1982,50.009,93074406,676.9818656 +"104","Bangladesh","Asia",1987,52.819,103764241,751.9794035 +"105","Bangladesh","Asia",1992,56.018,113704579,837.8101643 +"106","Bangladesh","Asia",1997,59.412,123315288,972.7700352 +"107","Bangladesh","Asia",2002,62.013,135656790,1136.39043 +"108","Bangladesh","Asia",2007,64.062,150448339,1391.253792 +"109","Belgium","Europe",1952,68,8730405,8343.105127 +"110","Belgium","Europe",1957,69.24,8989111,9714.960623 +"111","Belgium","Europe",1962,70.25,9218400,10991.20676 +"112","Belgium","Europe",1967,70.94,9556500,13149.04119 +"113","Belgium","Europe",1972,71.44,9709100,16672.14356 +"114","Belgium","Europe",1977,72.8,9821800,19117.97448 +"115","Belgium","Europe",1982,73.93,9856303,20979.84589 +"116","Belgium","Europe",1987,75.35,9870200,22525.56308 +"117","Belgium","Europe",1992,76.46,10045622,25575.57069 +"118","Belgium","Europe",1997,77.53,10199787,27561.19663 +"119","Belgium","Europe",2002,78.32,10311970,30485.88375 +"120","Belgium","Europe",2007,79.441,10392226,33692.60508 +"121","Benin","Africa",1952,38.223,1738315,1062.7522 +"122","Benin","Africa",1957,40.358,1925173,959.6010805 +"123","Benin","Africa",1962,42.618,2151895,949.4990641 +"124","Benin","Africa",1967,44.885,2427334,1035.831411 +"125","Benin","Africa",1972,47.014,2761407,1085.796879 +"126","Benin","Africa",1977,49.19,3168267,1029.161251 +"127","Benin","Africa",1982,50.904,3641603,1277.897616 +"128","Benin","Africa",1987,52.337,4243788,1225.85601 +"129","Benin","Africa",1992,53.919,4981671,1191.207681 +"130","Benin","Africa",1997,54.777,6066080,1232.975292 +"131","Benin","Africa",2002,54.406,7026113,1372.877931 +"132","Benin","Africa",2007,56.728,8078314,1441.284873 +"133","Bolivia","Americas",1952,40.414,2883315,2677.326347 +"134","Bolivia","Americas",1957,41.89,3211738,2127.686326 +"135","Bolivia","Americas",1962,43.428,3593918,2180.972546 +"136","Bolivia","Americas",1967,45.032,4040665,2586.886053 +"137","Bolivia","Americas",1972,46.714,4565872,2980.331339 +"138","Bolivia","Americas",1977,50.023,5079716,3548.097832 +"139","Bolivia","Americas",1982,53.859,5642224,3156.510452 +"140","Bolivia","Americas",1987,57.251,6156369,2753.69149 +"141","Bolivia","Americas",1992,59.957,6893451,2961.699694 +"142","Bolivia","Americas",1997,62.05,7693188,3326.143191 +"143","Bolivia","Americas",2002,63.883,8445134,3413.26269 +"144","Bolivia","Americas",2007,65.554,9119152,3822.137084 +"145","Bosnia and Herzegovina","Europe",1952,53.82,2791000,973.5331948 +"146","Bosnia and Herzegovina","Europe",1957,58.45,3076000,1353.989176 +"147","Bosnia and Herzegovina","Europe",1962,61.93,3349000,1709.683679 +"148","Bosnia and Herzegovina","Europe",1967,64.79,3585000,2172.352423 +"149","Bosnia and Herzegovina","Europe",1972,67.45,3819000,2860.16975 +"150","Bosnia and Herzegovina","Europe",1977,69.86,4086000,3528.481305 +"151","Bosnia and Herzegovina","Europe",1982,70.69,4172693,4126.613157 +"152","Bosnia and Herzegovina","Europe",1987,71.14,4338977,4314.114757 +"153","Bosnia and Herzegovina","Europe",1992,72.178,4256013,2546.781445 +"154","Bosnia and Herzegovina","Europe",1997,73.244,3607000,4766.355904 +"155","Bosnia and Herzegovina","Europe",2002,74.09,4165416,6018.975239 +"156","Bosnia and Herzegovina","Europe",2007,74.852,4552198,7446.298803 +"157","Botswana","Africa",1952,47.622,442308,851.2411407 +"158","Botswana","Africa",1957,49.618,474639,918.2325349 +"159","Botswana","Africa",1962,51.52,512764,983.6539764 +"160","Botswana","Africa",1967,53.298,553541,1214.709294 +"161","Botswana","Africa",1972,56.024,619351,2263.611114 +"162","Botswana","Africa",1977,59.319,781472,3214.857818 +"163","Botswana","Africa",1982,61.484,970347,4551.14215 +"164","Botswana","Africa",1987,63.622,1151184,6205.88385 +"165","Botswana","Africa",1992,62.745,1342614,7954.111645 +"166","Botswana","Africa",1997,52.556,1536536,8647.142313 +"167","Botswana","Africa",2002,46.634,1630347,11003.60508 +"168","Botswana","Africa",2007,50.728,1639131,12569.85177 +"169","Brazil","Americas",1952,50.917,56602560,2108.944355 +"170","Brazil","Americas",1957,53.285,65551171,2487.365989 +"171","Brazil","Americas",1962,55.665,76039390,3336.585802 +"172","Brazil","Americas",1967,57.632,88049823,3429.864357 +"173","Brazil","Americas",1972,59.504,100840058,4985.711467 +"174","Brazil","Americas",1977,61.489,114313951,6660.118654 +"175","Brazil","Americas",1982,63.336,128962939,7030.835878 +"176","Brazil","Americas",1987,65.205,142938076,7807.095818 +"177","Brazil","Americas",1992,67.057,155975974,6950.283021 +"178","Brazil","Americas",1997,69.388,168546719,7957.980824 +"179","Brazil","Americas",2002,71.006,179914212,8131.212843 +"180","Brazil","Americas",2007,72.39,190010647,9065.800825 +"181","Bulgaria","Europe",1952,59.6,7274900,2444.286648 +"182","Bulgaria","Europe",1957,66.61,7651254,3008.670727 +"183","Bulgaria","Europe",1962,69.51,8012946,4254.337839 +"184","Bulgaria","Europe",1967,70.42,8310226,5577.0028 +"185","Bulgaria","Europe",1972,70.9,8576200,6597.494398 +"186","Bulgaria","Europe",1977,70.81,8797022,7612.240438 +"187","Bulgaria","Europe",1982,71.08,8892098,8224.191647 +"188","Bulgaria","Europe",1987,71.34,8971958,8239.854824 +"189","Bulgaria","Europe",1992,71.19,8658506,6302.623438 +"190","Bulgaria","Europe",1997,70.32,8066057,5970.38876 +"191","Bulgaria","Europe",2002,72.14,7661799,7696.777725 +"192","Bulgaria","Europe",2007,73.005,7322858,10680.79282 +"193","Burkina Faso","Africa",1952,31.975,4469979,543.2552413 +"194","Burkina Faso","Africa",1957,34.906,4713416,617.1834648 +"195","Burkina Faso","Africa",1962,37.814,4919632,722.5120206 +"196","Burkina Faso","Africa",1967,40.697,5127935,794.8265597 +"197","Burkina Faso","Africa",1972,43.591,5433886,854.7359763 +"198","Burkina Faso","Africa",1977,46.137,5889574,743.3870368 +"199","Burkina Faso","Africa",1982,48.122,6634596,807.1985855 +"200","Burkina Faso","Africa",1987,49.557,7586551,912.0631417 +"201","Burkina Faso","Africa",1992,50.26,8878303,931.7527731 +"202","Burkina Faso","Africa",1997,50.324,10352843,946.2949618 +"203","Burkina Faso","Africa",2002,50.65,12251209,1037.645221 +"204","Burkina Faso","Africa",2007,52.295,14326203,1217.032994 +"205","Burundi","Africa",1952,39.031,2445618,339.2964587 +"206","Burundi","Africa",1957,40.533,2667518,379.5646281 +"207","Burundi","Africa",1962,42.045,2961915,355.2032273 +"208","Burundi","Africa",1967,43.548,3330989,412.9775136 +"209","Burundi","Africa",1972,44.057,3529983,464.0995039 +"210","Burundi","Africa",1977,45.91,3834415,556.1032651 +"211","Burundi","Africa",1982,47.471,4580410,559.603231 +"212","Burundi","Africa",1987,48.211,5126023,621.8188189 +"213","Burundi","Africa",1992,44.736,5809236,631.6998778 +"214","Burundi","Africa",1997,45.326,6121610,463.1151478 +"215","Burundi","Africa",2002,47.36,7021078,446.4035126 +"216","Burundi","Africa",2007,49.58,8390505,430.0706916 +"217","Cambodia","Asia",1952,39.417,4693836,368.4692856 +"218","Cambodia","Asia",1957,41.366,5322536,434.0383364 +"219","Cambodia","Asia",1962,43.415,6083619,496.9136476 +"220","Cambodia","Asia",1967,45.415,6960067,523.4323142 +"221","Cambodia","Asia",1972,40.317,7450606,421.6240257 +"222","Cambodia","Asia",1977,31.22,6978607,524.9721832 +"223","Cambodia","Asia",1982,50.957,7272485,624.4754784 +"224","Cambodia","Asia",1987,53.914,8371791,683.8955732 +"225","Cambodia","Asia",1992,55.803,10150094,682.3031755 +"226","Cambodia","Asia",1997,56.534,11782962,734.28517 +"227","Cambodia","Asia",2002,56.752,12926707,896.2260153 +"228","Cambodia","Asia",2007,59.723,14131858,1713.778686 +"229","Cameroon","Africa",1952,38.523,5009067,1172.667655 +"230","Cameroon","Africa",1957,40.428,5359923,1313.048099 +"231","Cameroon","Africa",1962,42.643,5793633,1399.607441 +"232","Cameroon","Africa",1967,44.799,6335506,1508.453148 +"233","Cameroon","Africa",1972,47.049,7021028,1684.146528 +"234","Cameroon","Africa",1977,49.355,7959865,1783.432873 +"235","Cameroon","Africa",1982,52.961,9250831,2367.983282 +"236","Cameroon","Africa",1987,54.985,10780667,2602.664206 +"237","Cameroon","Africa",1992,54.314,12467171,1793.163278 +"238","Cameroon","Africa",1997,52.199,14195809,1694.337469 +"239","Cameroon","Africa",2002,49.856,15929988,1934.011449 +"240","Cameroon","Africa",2007,50.43,17696293,2042.09524 +"241","Canada","Americas",1952,68.75,14785584,11367.16112 +"242","Canada","Americas",1957,69.96,17010154,12489.95006 +"243","Canada","Americas",1962,71.3,18985849,13462.48555 +"244","Canada","Americas",1967,72.13,20819767,16076.58803 +"245","Canada","Americas",1972,72.88,22284500,18970.57086 +"246","Canada","Americas",1977,74.21,23796400,22090.88306 +"247","Canada","Americas",1982,75.76,25201900,22898.79214 +"248","Canada","Americas",1987,76.86,26549700,26626.51503 +"249","Canada","Americas",1992,77.95,28523502,26342.88426 +"250","Canada","Americas",1997,78.61,30305843,28954.92589 +"251","Canada","Americas",2002,79.77,31902268,33328.96507 +"252","Canada","Americas",2007,80.653,33390141,36319.23501 +"253","Central African Republic","Africa",1952,35.463,1291695,1071.310713 +"254","Central African Republic","Africa",1957,37.464,1392284,1190.844328 +"255","Central African Republic","Africa",1962,39.475,1523478,1193.068753 +"256","Central African Republic","Africa",1967,41.478,1733638,1136.056615 +"257","Central African Republic","Africa",1972,43.457,1927260,1070.013275 +"258","Central African Republic","Africa",1977,46.775,2167533,1109.374338 +"259","Central African Republic","Africa",1982,48.295,2476971,956.7529907 +"260","Central African Republic","Africa",1987,50.485,2840009,844.8763504 +"261","Central African Republic","Africa",1992,49.396,3265124,747.9055252 +"262","Central African Republic","Africa",1997,46.066,3696513,740.5063317 +"263","Central African Republic","Africa",2002,43.308,4048013,738.6906068 +"264","Central African Republic","Africa",2007,44.741,4369038,706.016537 +"265","Chad","Africa",1952,38.092,2682462,1178.665927 +"266","Chad","Africa",1957,39.881,2894855,1308.495577 +"267","Chad","Africa",1962,41.716,3150417,1389.817618 +"268","Chad","Africa",1967,43.601,3495967,1196.810565 +"269","Chad","Africa",1972,45.569,3899068,1104.103987 +"270","Chad","Africa",1977,47.383,4388260,1133.98495 +"271","Chad","Africa",1982,49.517,4875118,797.9081006 +"272","Chad","Africa",1987,51.051,5498955,952.386129 +"273","Chad","Africa",1992,51.724,6429417,1058.0643 +"274","Chad","Africa",1997,51.573,7562011,1004.961353 +"275","Chad","Africa",2002,50.525,8835739,1156.18186 +"276","Chad","Africa",2007,50.651,10238807,1704.063724 +"277","Chile","Americas",1952,54.745,6377619,3939.978789 +"278","Chile","Americas",1957,56.074,7048426,4315.622723 +"279","Chile","Americas",1962,57.924,7961258,4519.094331 +"280","Chile","Americas",1967,60.523,8858908,5106.654313 +"281","Chile","Americas",1972,63.441,9717524,5494.024437 +"282","Chile","Americas",1977,67.052,10599793,4756.763836 +"283","Chile","Americas",1982,70.565,11487112,5095.665738 +"284","Chile","Americas",1987,72.492,12463354,5547.063754 +"285","Chile","Americas",1992,74.126,13572994,7596.125964 +"286","Chile","Americas",1997,75.816,14599929,10118.05318 +"287","Chile","Americas",2002,77.86,15497046,10778.78385 +"288","Chile","Americas",2007,78.553,16284741,13171.63885 +"289","China","Asia",1952,44,556263527,400.448611 +"290","China","Asia",1957,50.54896,637408000,575.9870009 +"291","China","Asia",1962,44.50136,665770000,487.6740183 +"292","China","Asia",1967,58.38112,754550000,612.7056934 +"293","China","Asia",1972,63.11888,862030000,676.9000921 +"294","China","Asia",1977,63.96736,943455000,741.2374699 +"295","China","Asia",1982,65.525,1000281000,962.4213805 +"296","China","Asia",1987,67.274,1084035000,1378.904018 +"297","China","Asia",1992,68.69,1164970000,1655.784158 +"298","China","Asia",1997,70.426,1230075000,2289.234136 +"299","China","Asia",2002,72.028,1280400000,3119.280896 +"300","China","Asia",2007,72.961,1318683096,4959.114854 +"301","Colombia","Americas",1952,50.643,12350771,2144.115096 +"302","Colombia","Americas",1957,55.118,14485993,2323.805581 +"303","Colombia","Americas",1962,57.863,17009885,2492.351109 +"304","Colombia","Americas",1967,59.963,19764027,2678.729839 +"305","Colombia","Americas",1972,61.623,22542890,3264.660041 +"306","Colombia","Americas",1977,63.837,25094412,3815.80787 +"307","Colombia","Americas",1982,66.653,27764644,4397.575659 +"308","Colombia","Americas",1987,67.768,30964245,4903.2191 +"309","Colombia","Americas",1992,68.421,34202721,5444.648617 +"310","Colombia","Americas",1997,70.313,37657830,6117.361746 +"311","Colombia","Americas",2002,71.682,41008227,5755.259962 +"312","Colombia","Americas",2007,72.889,44227550,7006.580419 +"313","Comoros","Africa",1952,40.715,153936,1102.990936 +"314","Comoros","Africa",1957,42.46,170928,1211.148548 +"315","Comoros","Africa",1962,44.467,191689,1406.648278 +"316","Comoros","Africa",1967,46.472,217378,1876.029643 +"317","Comoros","Africa",1972,48.944,250027,1937.577675 +"318","Comoros","Africa",1977,50.939,304739,1172.603047 +"319","Comoros","Africa",1982,52.933,348643,1267.100083 +"320","Comoros","Africa",1987,54.926,395114,1315.980812 +"321","Comoros","Africa",1992,57.939,454429,1246.90737 +"322","Comoros","Africa",1997,60.66,527982,1173.618235 +"323","Comoros","Africa",2002,62.974,614382,1075.811558 +"324","Comoros","Africa",2007,65.152,710960,986.1478792 +"325","Congo, Dem. Rep.","Africa",1952,39.143,14100005,780.5423257 +"326","Congo, Dem. Rep.","Africa",1957,40.652,15577932,905.8602303 +"327","Congo, Dem. Rep.","Africa",1962,42.122,17486434,896.3146335 +"328","Congo, Dem. Rep.","Africa",1967,44.056,19941073,861.5932424 +"329","Congo, Dem. Rep.","Africa",1972,45.989,23007669,904.8960685 +"330","Congo, Dem. Rep.","Africa",1977,47.804,26480870,795.757282 +"331","Congo, Dem. Rep.","Africa",1982,47.784,30646495,673.7478181 +"332","Congo, Dem. Rep.","Africa",1987,47.412,35481645,672.774812 +"333","Congo, Dem. Rep.","Africa",1992,45.548,41672143,457.7191807 +"334","Congo, Dem. Rep.","Africa",1997,42.587,47798986,312.188423 +"335","Congo, Dem. Rep.","Africa",2002,44.966,55379852,241.1658765 +"336","Congo, Dem. Rep.","Africa",2007,46.462,64606759,277.5518587 +"337","Congo, Rep.","Africa",1952,42.111,854885,2125.621418 +"338","Congo, Rep.","Africa",1957,45.053,940458,2315.056572 +"339","Congo, Rep.","Africa",1962,48.435,1047924,2464.783157 +"340","Congo, Rep.","Africa",1967,52.04,1179760,2677.939642 +"341","Congo, Rep.","Africa",1972,54.907,1340458,3213.152683 +"342","Congo, Rep.","Africa",1977,55.625,1536769,3259.178978 +"343","Congo, Rep.","Africa",1982,56.695,1774735,4879.507522 +"344","Congo, Rep.","Africa",1987,57.47,2064095,4201.194937 +"345","Congo, Rep.","Africa",1992,56.433,2409073,4016.239529 +"346","Congo, Rep.","Africa",1997,52.962,2800947,3484.164376 +"347","Congo, Rep.","Africa",2002,52.97,3328795,3484.06197 +"348","Congo, Rep.","Africa",2007,55.322,3800610,3632.557798 +"349","Costa Rica","Americas",1952,57.206,926317,2627.009471 +"350","Costa Rica","Americas",1957,60.026,1112300,2990.010802 +"351","Costa Rica","Americas",1962,62.842,1345187,3460.937025 +"352","Costa Rica","Americas",1967,65.424,1588717,4161.727834 +"353","Costa Rica","Americas",1972,67.849,1834796,5118.146939 +"354","Costa Rica","Americas",1977,70.75,2108457,5926.876967 +"355","Costa Rica","Americas",1982,73.45,2424367,5262.734751 +"356","Costa Rica","Americas",1987,74.752,2799811,5629.915318 +"357","Costa Rica","Americas",1992,75.713,3173216,6160.416317 +"358","Costa Rica","Americas",1997,77.26,3518107,6677.045314 +"359","Costa Rica","Americas",2002,78.123,3834934,7723.447195 +"360","Costa Rica","Americas",2007,78.782,4133884,9645.06142 +"361","Cote d'Ivoire","Africa",1952,40.477,2977019,1388.594732 +"362","Cote d'Ivoire","Africa",1957,42.469,3300000,1500.895925 +"363","Cote d'Ivoire","Africa",1962,44.93,3832408,1728.869428 +"364","Cote d'Ivoire","Africa",1967,47.35,4744870,2052.050473 +"365","Cote d'Ivoire","Africa",1972,49.801,6071696,2378.201111 +"366","Cote d'Ivoire","Africa",1977,52.374,7459574,2517.736547 +"367","Cote d'Ivoire","Africa",1982,53.983,9025951,2602.710169 +"368","Cote d'Ivoire","Africa",1987,54.655,10761098,2156.956069 +"369","Cote d'Ivoire","Africa",1992,52.044,12772596,1648.073791 +"370","Cote d'Ivoire","Africa",1997,47.991,14625967,1786.265407 +"371","Cote d'Ivoire","Africa",2002,46.832,16252726,1648.800823 +"372","Cote d'Ivoire","Africa",2007,48.328,18013409,1544.750112 +"373","Croatia","Europe",1952,61.21,3882229,3119.23652 +"374","Croatia","Europe",1957,64.77,3991242,4338.231617 +"375","Croatia","Europe",1962,67.13,4076557,5477.890018 +"376","Croatia","Europe",1967,68.5,4174366,6960.297861 +"377","Croatia","Europe",1972,69.61,4225310,9164.090127 +"378","Croatia","Europe",1977,70.64,4318673,11305.38517 +"379","Croatia","Europe",1982,70.46,4413368,13221.82184 +"380","Croatia","Europe",1987,71.52,4484310,13822.58394 +"381","Croatia","Europe",1992,72.527,4494013,8447.794873 +"382","Croatia","Europe",1997,73.68,4444595,9875.604515 +"383","Croatia","Europe",2002,74.876,4481020,11628.38895 +"384","Croatia","Europe",2007,75.748,4493312,14619.22272 +"385","Cuba","Americas",1952,59.421,6007797,5586.53878 +"386","Cuba","Americas",1957,62.325,6640752,6092.174359 +"387","Cuba","Americas",1962,65.246,7254373,5180.75591 +"388","Cuba","Americas",1967,68.29,8139332,5690.268015 +"389","Cuba","Americas",1972,70.723,8831348,5305.445256 +"390","Cuba","Americas",1977,72.649,9537988,6380.494966 +"391","Cuba","Americas",1982,73.717,9789224,7316.918107 +"392","Cuba","Americas",1987,74.174,10239839,7532.924763 +"393","Cuba","Americas",1992,74.414,10723260,5592.843963 +"394","Cuba","Americas",1997,76.151,10983007,5431.990415 +"395","Cuba","Americas",2002,77.158,11226999,6340.646683 +"396","Cuba","Americas",2007,78.273,11416987,8948.102923 +"397","Czech Republic","Europe",1952,66.87,9125183,6876.14025 +"398","Czech Republic","Europe",1957,69.03,9513758,8256.343918 +"399","Czech Republic","Europe",1962,69.9,9620282,10136.86713 +"400","Czech Republic","Europe",1967,70.38,9835109,11399.44489 +"401","Czech Republic","Europe",1972,70.29,9862158,13108.4536 +"402","Czech Republic","Europe",1977,70.71,10161915,14800.16062 +"403","Czech Republic","Europe",1982,70.96,10303704,15377.22855 +"404","Czech Republic","Europe",1987,71.58,10311597,16310.4434 +"405","Czech Republic","Europe",1992,72.4,10315702,14297.02122 +"406","Czech Republic","Europe",1997,74.01,10300707,16048.51424 +"407","Czech Republic","Europe",2002,75.51,10256295,17596.21022 +"408","Czech Republic","Europe",2007,76.486,10228744,22833.30851 +"409","Denmark","Europe",1952,70.78,4334000,9692.385245 +"410","Denmark","Europe",1957,71.81,4487831,11099.65935 +"411","Denmark","Europe",1962,72.35,4646899,13583.31351 +"412","Denmark","Europe",1967,72.96,4838800,15937.21123 +"413","Denmark","Europe",1972,73.47,4991596,18866.20721 +"414","Denmark","Europe",1977,74.69,5088419,20422.9015 +"415","Denmark","Europe",1982,74.63,5117810,21688.04048 +"416","Denmark","Europe",1987,74.8,5127024,25116.17581 +"417","Denmark","Europe",1992,75.33,5171393,26406.73985 +"418","Denmark","Europe",1997,76.11,5283663,29804.34567 +"419","Denmark","Europe",2002,77.18,5374693,32166.50006 +"420","Denmark","Europe",2007,78.332,5468120,35278.41874 +"421","Djibouti","Africa",1952,34.812,63149,2669.529475 +"422","Djibouti","Africa",1957,37.328,71851,2864.969076 +"423","Djibouti","Africa",1962,39.693,89898,3020.989263 +"424","Djibouti","Africa",1967,42.074,127617,3020.050513 +"425","Djibouti","Africa",1972,44.366,178848,3694.212352 +"426","Djibouti","Africa",1977,46.519,228694,3081.761022 +"427","Djibouti","Africa",1982,48.812,305991,2879.468067 +"428","Djibouti","Africa",1987,50.04,311025,2880.102568 +"429","Djibouti","Africa",1992,51.604,384156,2377.156192 +"430","Djibouti","Africa",1997,53.157,417908,1895.016984 +"431","Djibouti","Africa",2002,53.373,447416,1908.260867 +"432","Djibouti","Africa",2007,54.791,496374,2082.481567 +"433","Dominican Republic","Americas",1952,45.928,2491346,1397.717137 +"434","Dominican Republic","Americas",1957,49.828,2923186,1544.402995 +"435","Dominican Republic","Americas",1962,53.459,3453434,1662.137359 +"436","Dominican Republic","Americas",1967,56.751,4049146,1653.723003 +"437","Dominican Republic","Americas",1972,59.631,4671329,2189.874499 +"438","Dominican Republic","Americas",1977,61.788,5302800,2681.9889 +"439","Dominican Republic","Americas",1982,63.727,5968349,2861.092386 +"440","Dominican Republic","Americas",1987,66.046,6655297,2899.842175 +"441","Dominican Republic","Americas",1992,68.457,7351181,3044.214214 +"442","Dominican Republic","Americas",1997,69.957,7992357,3614.101285 +"443","Dominican Republic","Americas",2002,70.847,8650322,4563.808154 +"444","Dominican Republic","Americas",2007,72.235,9319622,6025.374752 +"445","Ecuador","Americas",1952,48.357,3548753,3522.110717 +"446","Ecuador","Americas",1957,51.356,4058385,3780.546651 +"447","Ecuador","Americas",1962,54.64,4681707,4086.114078 +"448","Ecuador","Americas",1967,56.678,5432424,4579.074215 +"449","Ecuador","Americas",1972,58.796,6298651,5280.99471 +"450","Ecuador","Americas",1977,61.31,7278866,6679.62326 +"451","Ecuador","Americas",1982,64.342,8365850,7213.791267 +"452","Ecuador","Americas",1987,67.231,9545158,6481.776993 +"453","Ecuador","Americas",1992,69.613,10748394,7103.702595 +"454","Ecuador","Americas",1997,72.312,11911819,7429.455877 +"455","Ecuador","Americas",2002,74.173,12921234,5773.044512 +"456","Ecuador","Americas",2007,74.994,13755680,6873.262326 +"457","Egypt","Africa",1952,41.893,22223309,1418.822445 +"458","Egypt","Africa",1957,44.444,25009741,1458.915272 +"459","Egypt","Africa",1962,46.992,28173309,1693.335853 +"460","Egypt","Africa",1967,49.293,31681188,1814.880728 +"461","Egypt","Africa",1972,51.137,34807417,2024.008147 +"462","Egypt","Africa",1977,53.319,38783863,2785.493582 +"463","Egypt","Africa",1982,56.006,45681811,3503.729636 +"464","Egypt","Africa",1987,59.797,52799062,3885.46071 +"465","Egypt","Africa",1992,63.674,59402198,3794.755195 +"466","Egypt","Africa",1997,67.217,66134291,4173.181797 +"467","Egypt","Africa",2002,69.806,73312559,4754.604414 +"468","Egypt","Africa",2007,71.338,80264543,5581.180998 +"469","El Salvador","Americas",1952,45.262,2042865,3048.3029 +"470","El Salvador","Americas",1957,48.57,2355805,3421.523218 +"471","El Salvador","Americas",1962,52.307,2747687,3776.803627 +"472","El Salvador","Americas",1967,55.855,3232927,4358.595393 +"473","El Salvador","Americas",1972,58.207,3790903,4520.246008 +"474","El Salvador","Americas",1977,56.696,4282586,5138.922374 +"475","El Salvador","Americas",1982,56.604,4474873,4098.344175 +"476","El Salvador","Americas",1987,63.154,4842194,4140.442097 +"477","El Salvador","Americas",1992,66.798,5274649,4444.2317 +"478","El Salvador","Americas",1997,69.535,5783439,5154.825496 +"479","El Salvador","Americas",2002,70.734,6353681,5351.568666 +"480","El Salvador","Americas",2007,71.878,6939688,5728.353514 +"481","Equatorial Guinea","Africa",1952,34.482,216964,375.6431231 +"482","Equatorial Guinea","Africa",1957,35.983,232922,426.0964081 +"483","Equatorial Guinea","Africa",1962,37.485,249220,582.8419714 +"484","Equatorial Guinea","Africa",1967,38.987,259864,915.5960025 +"485","Equatorial Guinea","Africa",1972,40.516,277603,672.4122571 +"486","Equatorial Guinea","Africa",1977,42.024,192675,958.5668124 +"487","Equatorial Guinea","Africa",1982,43.662,285483,927.8253427 +"488","Equatorial Guinea","Africa",1987,45.664,341244,966.8968149 +"489","Equatorial Guinea","Africa",1992,47.545,387838,1132.055034 +"490","Equatorial Guinea","Africa",1997,48.245,439971,2814.480755 +"491","Equatorial Guinea","Africa",2002,49.348,495627,7703.4959 +"492","Equatorial Guinea","Africa",2007,51.579,551201,12154.08975 +"493","Eritrea","Africa",1952,35.928,1438760,328.9405571 +"494","Eritrea","Africa",1957,38.047,1542611,344.1618859 +"495","Eritrea","Africa",1962,40.158,1666618,380.9958433 +"496","Eritrea","Africa",1967,42.189,1820319,468.7949699 +"497","Eritrea","Africa",1972,44.142,2260187,514.3242082 +"498","Eritrea","Africa",1977,44.535,2512642,505.7538077 +"499","Eritrea","Africa",1982,43.89,2637297,524.8758493 +"500","Eritrea","Africa",1987,46.453,2915959,521.1341333 +"501","Eritrea","Africa",1992,49.991,3668440,582.8585102 +"502","Eritrea","Africa",1997,53.378,4058319,913.47079 +"503","Eritrea","Africa",2002,55.24,4414865,765.3500015 +"504","Eritrea","Africa",2007,58.04,4906585,641.3695236 +"505","Ethiopia","Africa",1952,34.078,20860941,362.1462796 +"506","Ethiopia","Africa",1957,36.667,22815614,378.9041632 +"507","Ethiopia","Africa",1962,40.059,25145372,419.4564161 +"508","Ethiopia","Africa",1967,42.115,27860297,516.1186438 +"509","Ethiopia","Africa",1972,43.515,30770372,566.2439442 +"510","Ethiopia","Africa",1977,44.51,34617799,556.8083834 +"511","Ethiopia","Africa",1982,44.916,38111756,577.8607471 +"512","Ethiopia","Africa",1987,46.684,42999530,573.7413142 +"513","Ethiopia","Africa",1992,48.091,52088559,421.3534653 +"514","Ethiopia","Africa",1997,49.402,59861301,515.8894013 +"515","Ethiopia","Africa",2002,50.725,67946797,530.0535319 +"516","Ethiopia","Africa",2007,52.947,76511887,690.8055759 +"517","Finland","Europe",1952,66.55,4090500,6424.519071 +"518","Finland","Europe",1957,67.49,4324000,7545.415386 +"519","Finland","Europe",1962,68.75,4491443,9371.842561 +"520","Finland","Europe",1967,69.83,4605744,10921.63626 +"521","Finland","Europe",1972,70.87,4639657,14358.8759 +"522","Finland","Europe",1977,72.52,4738902,15605.42283 +"523","Finland","Europe",1982,74.55,4826933,18533.15761 +"524","Finland","Europe",1987,74.83,4931729,21141.01223 +"525","Finland","Europe",1992,75.7,5041039,20647.16499 +"526","Finland","Europe",1997,77.13,5134406,23723.9502 +"527","Finland","Europe",2002,78.37,5193039,28204.59057 +"528","Finland","Europe",2007,79.313,5238460,33207.0844 +"529","France","Europe",1952,67.41,42459667,7029.809327 +"530","France","Europe",1957,68.93,44310863,8662.834898 +"531","France","Europe",1962,70.51,47124000,10560.48553 +"532","France","Europe",1967,71.55,49569000,12999.91766 +"533","France","Europe",1972,72.38,51732000,16107.19171 +"534","France","Europe",1977,73.83,53165019,18292.63514 +"535","France","Europe",1982,74.89,54433565,20293.89746 +"536","France","Europe",1987,76.34,55630100,22066.44214 +"537","France","Europe",1992,77.46,57374179,24703.79615 +"538","France","Europe",1997,78.64,58623428,25889.78487 +"539","France","Europe",2002,79.59,59925035,28926.03234 +"540","France","Europe",2007,80.657,61083916,30470.0167 +"541","Gabon","Africa",1952,37.003,420702,4293.476475 +"542","Gabon","Africa",1957,38.999,434904,4976.198099 +"543","Gabon","Africa",1962,40.489,455661,6631.459222 +"544","Gabon","Africa",1967,44.598,489004,8358.761987 +"545","Gabon","Africa",1972,48.69,537977,11401.94841 +"546","Gabon","Africa",1977,52.79,706367,21745.57328 +"547","Gabon","Africa",1982,56.564,753874,15113.36194 +"548","Gabon","Africa",1987,60.19,880397,11864.40844 +"549","Gabon","Africa",1992,61.366,985739,13522.15752 +"550","Gabon","Africa",1997,60.461,1126189,14722.84188 +"551","Gabon","Africa",2002,56.761,1299304,12521.71392 +"552","Gabon","Africa",2007,56.735,1454867,13206.48452 +"553","Gambia","Africa",1952,30,284320,485.2306591 +"554","Gambia","Africa",1957,32.065,323150,520.9267111 +"555","Gambia","Africa",1962,33.896,374020,599.650276 +"556","Gambia","Africa",1967,35.857,439593,734.7829124 +"557","Gambia","Africa",1972,38.308,517101,756.0868363 +"558","Gambia","Africa",1977,41.842,608274,884.7552507 +"559","Gambia","Africa",1982,45.58,715523,835.8096108 +"560","Gambia","Africa",1987,49.265,848406,611.6588611 +"561","Gambia","Africa",1992,52.644,1025384,665.6244126 +"562","Gambia","Africa",1997,55.861,1235767,653.7301704 +"563","Gambia","Africa",2002,58.041,1457766,660.5855997 +"564","Gambia","Africa",2007,59.448,1688359,752.7497265 +"565","Germany","Europe",1952,67.5,69145952,7144.114393 +"566","Germany","Europe",1957,69.1,71019069,10187.82665 +"567","Germany","Europe",1962,70.3,73739117,12902.46291 +"568","Germany","Europe",1967,70.8,76368453,14745.62561 +"569","Germany","Europe",1972,71,78717088,18016.18027 +"570","Germany","Europe",1977,72.5,78160773,20512.92123 +"571","Germany","Europe",1982,73.8,78335266,22031.53274 +"572","Germany","Europe",1987,74.847,77718298,24639.18566 +"573","Germany","Europe",1992,76.07,80597764,26505.30317 +"574","Germany","Europe",1997,77.34,82011073,27788.88416 +"575","Germany","Europe",2002,78.67,82350671,30035.80198 +"576","Germany","Europe",2007,79.406,82400996,32170.37442 +"577","Ghana","Africa",1952,43.149,5581001,911.2989371 +"578","Ghana","Africa",1957,44.779,6391288,1043.561537 +"579","Ghana","Africa",1962,46.452,7355248,1190.041118 +"580","Ghana","Africa",1967,48.072,8490213,1125.69716 +"581","Ghana","Africa",1972,49.875,9354120,1178.223708 +"582","Ghana","Africa",1977,51.756,10538093,993.2239571 +"583","Ghana","Africa",1982,53.744,11400338,876.032569 +"584","Ghana","Africa",1987,55.729,14168101,847.0061135 +"585","Ghana","Africa",1992,57.501,16278738,925.060154 +"586","Ghana","Africa",1997,58.556,18418288,1005.245812 +"587","Ghana","Africa",2002,58.453,20550751,1111.984578 +"588","Ghana","Africa",2007,60.022,22873338,1327.60891 +"589","Greece","Europe",1952,65.86,7733250,3530.690067 +"590","Greece","Europe",1957,67.86,8096218,4916.299889 +"591","Greece","Europe",1962,69.51,8448233,6017.190733 +"592","Greece","Europe",1967,71,8716441,8513.097016 +"593","Greece","Europe",1972,72.34,8888628,12724.82957 +"594","Greece","Europe",1977,73.68,9308479,14195.52428 +"595","Greece","Europe",1982,75.24,9786480,15268.42089 +"596","Greece","Europe",1987,76.67,9974490,16120.52839 +"597","Greece","Europe",1992,77.03,10325429,17541.49634 +"598","Greece","Europe",1997,77.869,10502372,18747.69814 +"599","Greece","Europe",2002,78.256,10603863,22514.2548 +"600","Greece","Europe",2007,79.483,10706290,27538.41188 +"601","Guatemala","Americas",1952,42.023,3146381,2428.237769 +"602","Guatemala","Americas",1957,44.142,3640876,2617.155967 +"603","Guatemala","Americas",1962,46.954,4208858,2750.364446 +"604","Guatemala","Americas",1967,50.016,4690773,3242.531147 +"605","Guatemala","Americas",1972,53.738,5149581,4031.408271 +"606","Guatemala","Americas",1977,56.029,5703430,4879.992748 +"607","Guatemala","Americas",1982,58.137,6395630,4820.49479 +"608","Guatemala","Americas",1987,60.782,7326406,4246.485974 +"609","Guatemala","Americas",1992,63.373,8486949,4439.45084 +"610","Guatemala","Americas",1997,66.322,9803875,4684.313807 +"611","Guatemala","Americas",2002,68.978,11178650,4858.347495 +"612","Guatemala","Americas",2007,70.259,12572928,5186.050003 +"613","Guinea","Africa",1952,33.609,2664249,510.1964923 +"614","Guinea","Africa",1957,34.558,2876726,576.2670245 +"615","Guinea","Africa",1962,35.753,3140003,686.3736739 +"616","Guinea","Africa",1967,37.197,3451418,708.7595409 +"617","Guinea","Africa",1972,38.842,3811387,741.6662307 +"618","Guinea","Africa",1977,40.762,4227026,874.6858643 +"619","Guinea","Africa",1982,42.891,4710497,857.2503577 +"620","Guinea","Africa",1987,45.552,5650262,805.5724718 +"621","Guinea","Africa",1992,48.576,6990574,794.3484384 +"622","Guinea","Africa",1997,51.455,8048834,869.4497668 +"623","Guinea","Africa",2002,53.676,8807818,945.5835837 +"624","Guinea","Africa",2007,56.007,9947814,942.6542111 +"625","Guinea-Bissau","Africa",1952,32.5,580653,299.850319 +"626","Guinea-Bissau","Africa",1957,33.489,601095,431.7904566 +"627","Guinea-Bissau","Africa",1962,34.488,627820,522.0343725 +"628","Guinea-Bissau","Africa",1967,35.492,601287,715.5806402 +"629","Guinea-Bissau","Africa",1972,36.486,625361,820.2245876 +"630","Guinea-Bissau","Africa",1977,37.465,745228,764.7259628 +"631","Guinea-Bissau","Africa",1982,39.327,825987,838.1239671 +"632","Guinea-Bissau","Africa",1987,41.245,927524,736.4153921 +"633","Guinea-Bissau","Africa",1992,43.266,1050938,745.5398706 +"634","Guinea-Bissau","Africa",1997,44.873,1193708,796.6644681 +"635","Guinea-Bissau","Africa",2002,45.504,1332459,575.7047176 +"636","Guinea-Bissau","Africa",2007,46.388,1472041,579.231743 +"637","Haiti","Americas",1952,37.579,3201488,1840.366939 +"638","Haiti","Americas",1957,40.696,3507701,1726.887882 +"639","Haiti","Americas",1962,43.59,3880130,1796.589032 +"640","Haiti","Americas",1967,46.243,4318137,1452.057666 +"641","Haiti","Americas",1972,48.042,4698301,1654.456946 +"642","Haiti","Americas",1977,49.923,4908554,1874.298931 +"643","Haiti","Americas",1982,51.461,5198399,2011.159549 +"644","Haiti","Americas",1987,53.636,5756203,1823.015995 +"645","Haiti","Americas",1992,55.089,6326682,1456.309517 +"646","Haiti","Americas",1997,56.671,6913545,1341.726931 +"647","Haiti","Americas",2002,58.137,7607651,1270.364932 +"648","Haiti","Americas",2007,60.916,8502814,1201.637154 +"649","Honduras","Americas",1952,41.912,1517453,2194.926204 +"650","Honduras","Americas",1957,44.665,1770390,2220.487682 +"651","Honduras","Americas",1962,48.041,2090162,2291.156835 +"652","Honduras","Americas",1967,50.924,2500689,2538.269358 +"653","Honduras","Americas",1972,53.884,2965146,2529.842345 +"654","Honduras","Americas",1977,57.402,3055235,3203.208066 +"655","Honduras","Americas",1982,60.909,3669448,3121.760794 +"656","Honduras","Americas",1987,64.492,4372203,3023.096699 +"657","Honduras","Americas",1992,66.399,5077347,3081.694603 +"658","Honduras","Americas",1997,67.659,5867957,3160.454906 +"659","Honduras","Americas",2002,68.565,6677328,3099.72866 +"660","Honduras","Americas",2007,70.198,7483763,3548.330846 +"661","Hong Kong, China","Asia",1952,60.96,2125900,3054.421209 +"662","Hong Kong, China","Asia",1957,64.75,2736300,3629.076457 +"663","Hong Kong, China","Asia",1962,67.65,3305200,4692.648272 +"664","Hong Kong, China","Asia",1967,70,3722800,6197.962814 +"665","Hong Kong, China","Asia",1972,72,4115700,8315.928145 +"666","Hong Kong, China","Asia",1977,73.6,4583700,11186.14125 +"667","Hong Kong, China","Asia",1982,75.45,5264500,14560.53051 +"668","Hong Kong, China","Asia",1987,76.2,5584510,20038.47269 +"669","Hong Kong, China","Asia",1992,77.601,5829696,24757.60301 +"670","Hong Kong, China","Asia",1997,80,6495918,28377.63219 +"671","Hong Kong, China","Asia",2002,81.495,6762476,30209.01516 +"672","Hong Kong, China","Asia",2007,82.208,6980412,39724.97867 +"673","Hungary","Europe",1952,64.03,9504000,5263.673816 +"674","Hungary","Europe",1957,66.41,9839000,6040.180011 +"675","Hungary","Europe",1962,67.96,10063000,7550.359877 +"676","Hungary","Europe",1967,69.5,10223422,9326.64467 +"677","Hungary","Europe",1972,69.76,10394091,10168.65611 +"678","Hungary","Europe",1977,69.95,10637171,11674.83737 +"679","Hungary","Europe",1982,69.39,10705535,12545.99066 +"680","Hungary","Europe",1987,69.58,10612740,12986.47998 +"681","Hungary","Europe",1992,69.17,10348684,10535.62855 +"682","Hungary","Europe",1997,71.04,10244684,11712.7768 +"683","Hungary","Europe",2002,72.59,10083313,14843.93556 +"684","Hungary","Europe",2007,73.338,9956108,18008.94444 +"685","Iceland","Europe",1952,72.49,147962,7267.688428 +"686","Iceland","Europe",1957,73.47,165110,9244.001412 +"687","Iceland","Europe",1962,73.68,182053,10350.15906 +"688","Iceland","Europe",1967,73.73,198676,13319.89568 +"689","Iceland","Europe",1972,74.46,209275,15798.06362 +"690","Iceland","Europe",1977,76.11,221823,19654.96247 +"691","Iceland","Europe",1982,76.99,233997,23269.6075 +"692","Iceland","Europe",1987,77.23,244676,26923.20628 +"693","Iceland","Europe",1992,78.77,259012,25144.39201 +"694","Iceland","Europe",1997,78.95,271192,28061.09966 +"695","Iceland","Europe",2002,80.5,288030,31163.20196 +"696","Iceland","Europe",2007,81.757,301931,36180.78919 +"697","India","Asia",1952,37.373,372000000,546.5657493 +"698","India","Asia",1957,40.249,409000000,590.061996 +"699","India","Asia",1962,43.605,454000000,658.3471509 +"700","India","Asia",1967,47.193,506000000,700.7706107 +"701","India","Asia",1972,50.651,567000000,724.032527 +"702","India","Asia",1977,54.208,634000000,813.337323 +"703","India","Asia",1982,56.596,708000000,855.7235377 +"704","India","Asia",1987,58.553,788000000,976.5126756 +"705","India","Asia",1992,60.223,872000000,1164.406809 +"706","India","Asia",1997,61.765,959000000,1458.817442 +"707","India","Asia",2002,62.879,1034172547,1746.769454 +"708","India","Asia",2007,64.698,1110396331,2452.210407 +"709","Indonesia","Asia",1952,37.468,82052000,749.6816546 +"710","Indonesia","Asia",1957,39.918,90124000,858.9002707 +"711","Indonesia","Asia",1962,42.518,99028000,849.2897701 +"712","Indonesia","Asia",1967,45.964,109343000,762.4317721 +"713","Indonesia","Asia",1972,49.203,121282000,1111.107907 +"714","Indonesia","Asia",1977,52.702,136725000,1382.702056 +"715","Indonesia","Asia",1982,56.159,153343000,1516.872988 +"716","Indonesia","Asia",1987,60.137,169276000,1748.356961 +"717","Indonesia","Asia",1992,62.681,184816000,2383.140898 +"718","Indonesia","Asia",1997,66.041,199278000,3119.335603 +"719","Indonesia","Asia",2002,68.588,211060000,2873.91287 +"720","Indonesia","Asia",2007,70.65,223547000,3540.651564 +"721","Iran","Asia",1952,44.869,17272000,3035.326002 +"722","Iran","Asia",1957,47.181,19792000,3290.257643 +"723","Iran","Asia",1962,49.325,22874000,4187.329802 +"724","Iran","Asia",1967,52.469,26538000,5906.731805 +"725","Iran","Asia",1972,55.234,30614000,9613.818607 +"726","Iran","Asia",1977,57.702,35480679,11888.59508 +"727","Iran","Asia",1982,59.62,43072751,7608.334602 +"728","Iran","Asia",1987,63.04,51889696,6642.881371 +"729","Iran","Asia",1992,65.742,60397973,7235.653188 +"730","Iran","Asia",1997,68.042,63327987,8263.590301 +"731","Iran","Asia",2002,69.451,66907826,9240.761975 +"732","Iran","Asia",2007,70.964,69453570,11605.71449 +"733","Iraq","Asia",1952,45.32,5441766,4129.766056 +"734","Iraq","Asia",1957,48.437,6248643,6229.333562 +"735","Iraq","Asia",1962,51.457,7240260,8341.737815 +"736","Iraq","Asia",1967,54.459,8519282,8931.459811 +"737","Iraq","Asia",1972,56.95,10061506,9576.037596 +"738","Iraq","Asia",1977,60.413,11882916,14688.23507 +"739","Iraq","Asia",1982,62.038,14173318,14517.90711 +"740","Iraq","Asia",1987,65.044,16543189,11643.57268 +"741","Iraq","Asia",1992,59.461,17861905,3745.640687 +"742","Iraq","Asia",1997,58.811,20775703,3076.239795 +"743","Iraq","Asia",2002,57.046,24001816,4390.717312 +"744","Iraq","Asia",2007,59.545,27499638,4471.061906 +"745","Ireland","Europe",1952,66.91,2952156,5210.280328 +"746","Ireland","Europe",1957,68.9,2878220,5599.077872 +"747","Ireland","Europe",1962,70.29,2830000,6631.597314 +"748","Ireland","Europe",1967,71.08,2900100,7655.568963 +"749","Ireland","Europe",1972,71.28,3024400,9530.772896 +"750","Ireland","Europe",1977,72.03,3271900,11150.98113 +"751","Ireland","Europe",1982,73.1,3480000,12618.32141 +"752","Ireland","Europe",1987,74.36,3539900,13872.86652 +"753","Ireland","Europe",1992,75.467,3557761,17558.81555 +"754","Ireland","Europe",1997,76.122,3667233,24521.94713 +"755","Ireland","Europe",2002,77.783,3879155,34077.04939 +"756","Ireland","Europe",2007,78.885,4109086,40675.99635 +"757","Israel","Asia",1952,65.39,1620914,4086.522128 +"758","Israel","Asia",1957,67.84,1944401,5385.278451 +"759","Israel","Asia",1962,69.39,2310904,7105.630706 +"760","Israel","Asia",1967,70.75,2693585,8393.741404 +"761","Israel","Asia",1972,71.63,3095893,12786.93223 +"762","Israel","Asia",1977,73.06,3495918,13306.61921 +"763","Israel","Asia",1982,74.45,3858421,15367.0292 +"764","Israel","Asia",1987,75.6,4203148,17122.47986 +"765","Israel","Asia",1992,76.93,4936550,18051.52254 +"766","Israel","Asia",1997,78.269,5531387,20896.60924 +"767","Israel","Asia",2002,79.696,6029529,21905.59514 +"768","Israel","Asia",2007,80.745,6426679,25523.2771 +"769","Italy","Europe",1952,65.94,47666000,4931.404155 +"770","Italy","Europe",1957,67.81,49182000,6248.656232 +"771","Italy","Europe",1962,69.24,50843200,8243.58234 +"772","Italy","Europe",1967,71.06,52667100,10022.40131 +"773","Italy","Europe",1972,72.19,54365564,12269.27378 +"774","Italy","Europe",1977,73.48,56059245,14255.98475 +"775","Italy","Europe",1982,74.98,56535636,16537.4835 +"776","Italy","Europe",1987,76.42,56729703,19207.23482 +"777","Italy","Europe",1992,77.44,56840847,22013.64486 +"778","Italy","Europe",1997,78.82,57479469,24675.02446 +"779","Italy","Europe",2002,80.24,57926999,27968.09817 +"780","Italy","Europe",2007,80.546,58147733,28569.7197 +"781","Jamaica","Americas",1952,58.53,1426095,2898.530881 +"782","Jamaica","Americas",1957,62.61,1535090,4756.525781 +"783","Jamaica","Americas",1962,65.61,1665128,5246.107524 +"784","Jamaica","Americas",1967,67.51,1861096,6124.703451 +"785","Jamaica","Americas",1972,69,1997616,7433.889293 +"786","Jamaica","Americas",1977,70.11,2156814,6650.195573 +"787","Jamaica","Americas",1982,71.21,2298309,6068.05135 +"788","Jamaica","Americas",1987,71.77,2326606,6351.237495 +"789","Jamaica","Americas",1992,71.766,2378618,7404.923685 +"790","Jamaica","Americas",1997,72.262,2531311,7121.924704 +"791","Jamaica","Americas",2002,72.047,2664659,6994.774861 +"792","Jamaica","Americas",2007,72.567,2780132,7320.880262 +"793","Japan","Asia",1952,63.03,86459025,3216.956347 +"794","Japan","Asia",1957,65.5,91563009,4317.694365 +"795","Japan","Asia",1962,68.73,95831757,6576.649461 +"796","Japan","Asia",1967,71.43,100825279,9847.788607 +"797","Japan","Asia",1972,73.42,107188273,14778.78636 +"798","Japan","Asia",1977,75.38,113872473,16610.37701 +"799","Japan","Asia",1982,77.11,118454974,19384.10571 +"800","Japan","Asia",1987,78.67,122091325,22375.94189 +"801","Japan","Asia",1992,79.36,124329269,26824.89511 +"802","Japan","Asia",1997,80.69,125956499,28816.58499 +"803","Japan","Asia",2002,82,127065841,28604.5919 +"804","Japan","Asia",2007,82.603,127467972,31656.06806 +"805","Jordan","Asia",1952,43.158,607914,1546.907807 +"806","Jordan","Asia",1957,45.669,746559,1886.080591 +"807","Jordan","Asia",1962,48.126,933559,2348.009158 +"808","Jordan","Asia",1967,51.629,1255058,2741.796252 +"809","Jordan","Asia",1972,56.528,1613551,2110.856309 +"810","Jordan","Asia",1977,61.134,1937652,2852.351568 +"811","Jordan","Asia",1982,63.739,2347031,4161.415959 +"812","Jordan","Asia",1987,65.869,2820042,4448.679912 +"813","Jordan","Asia",1992,68.015,3867409,3431.593647 +"814","Jordan","Asia",1997,69.772,4526235,3645.379572 +"815","Jordan","Asia",2002,71.263,5307470,3844.917194 +"816","Jordan","Asia",2007,72.535,6053193,4519.461171 +"817","Kenya","Africa",1952,42.27,6464046,853.540919 +"818","Kenya","Africa",1957,44.686,7454779,944.4383152 +"819","Kenya","Africa",1962,47.949,8678557,896.9663732 +"820","Kenya","Africa",1967,50.654,10191512,1056.736457 +"821","Kenya","Africa",1972,53.559,12044785,1222.359968 +"822","Kenya","Africa",1977,56.155,14500404,1267.613204 +"823","Kenya","Africa",1982,58.766,17661452,1348.225791 +"824","Kenya","Africa",1987,59.339,21198082,1361.936856 +"825","Kenya","Africa",1992,59.285,25020539,1341.921721 +"826","Kenya","Africa",1997,54.407,28263827,1360.485021 +"827","Kenya","Africa",2002,50.992,31386842,1287.514732 +"828","Kenya","Africa",2007,54.11,35610177,1463.249282 +"829","Korea, Dem. Rep.","Asia",1952,50.056,8865488,1088.277758 +"830","Korea, Dem. Rep.","Asia",1957,54.081,9411381,1571.134655 +"831","Korea, Dem. Rep.","Asia",1962,56.656,10917494,1621.693598 +"832","Korea, Dem. Rep.","Asia",1967,59.942,12617009,2143.540609 +"833","Korea, Dem. Rep.","Asia",1972,63.983,14781241,3701.621503 +"834","Korea, Dem. Rep.","Asia",1977,67.159,16325320,4106.301249 +"835","Korea, Dem. Rep.","Asia",1982,69.1,17647518,4106.525293 +"836","Korea, Dem. Rep.","Asia",1987,70.647,19067554,4106.492315 +"837","Korea, Dem. Rep.","Asia",1992,69.978,20711375,3726.063507 +"838","Korea, Dem. Rep.","Asia",1997,67.727,21585105,1690.756814 +"839","Korea, Dem. Rep.","Asia",2002,66.662,22215365,1646.758151 +"840","Korea, Dem. Rep.","Asia",2007,67.297,23301725,1593.06548 +"841","Korea, Rep.","Asia",1952,47.453,20947571,1030.592226 +"842","Korea, Rep.","Asia",1957,52.681,22611552,1487.593537 +"843","Korea, Rep.","Asia",1962,55.292,26420307,1536.344387 +"844","Korea, Rep.","Asia",1967,57.716,30131000,2029.228142 +"845","Korea, Rep.","Asia",1972,62.612,33505000,3030.87665 +"846","Korea, Rep.","Asia",1977,64.766,36436000,4657.22102 +"847","Korea, Rep.","Asia",1982,67.123,39326000,5622.942464 +"848","Korea, Rep.","Asia",1987,69.81,41622000,8533.088805 +"849","Korea, Rep.","Asia",1992,72.244,43805450,12104.27872 +"850","Korea, Rep.","Asia",1997,74.647,46173816,15993.52796 +"851","Korea, Rep.","Asia",2002,77.045,47969150,19233.98818 +"852","Korea, Rep.","Asia",2007,78.623,49044790,23348.13973 +"853","Kuwait","Asia",1952,55.565,160000,108382.3529 +"854","Kuwait","Asia",1957,58.033,212846,113523.1329 +"855","Kuwait","Asia",1962,60.47,358266,95458.11176 +"856","Kuwait","Asia",1967,64.624,575003,80894.88326 +"857","Kuwait","Asia",1972,67.712,841934,109347.867 +"858","Kuwait","Asia",1977,69.343,1140357,59265.47714 +"859","Kuwait","Asia",1982,71.309,1497494,31354.03573 +"860","Kuwait","Asia",1987,74.174,1891487,28118.42998 +"861","Kuwait","Asia",1992,75.19,1418095,34932.91959 +"862","Kuwait","Asia",1997,76.156,1765345,40300.61996 +"863","Kuwait","Asia",2002,76.904,2111561,35110.10566 +"864","Kuwait","Asia",2007,77.588,2505559,47306.98978 +"865","Lebanon","Asia",1952,55.928,1439529,4834.804067 +"866","Lebanon","Asia",1957,59.489,1647412,6089.786934 +"867","Lebanon","Asia",1962,62.094,1886848,5714.560611 +"868","Lebanon","Asia",1967,63.87,2186894,6006.983042 +"869","Lebanon","Asia",1972,65.421,2680018,7486.384341 +"870","Lebanon","Asia",1977,66.099,3115787,8659.696836 +"871","Lebanon","Asia",1982,66.983,3086876,7640.519521 +"872","Lebanon","Asia",1987,67.926,3089353,5377.091329 +"873","Lebanon","Asia",1992,69.292,3219994,6890.806854 +"874","Lebanon","Asia",1997,70.265,3430388,8754.96385 +"875","Lebanon","Asia",2002,71.028,3677780,9313.93883 +"876","Lebanon","Asia",2007,71.993,3921278,10461.05868 +"877","Lesotho","Africa",1952,42.138,748747,298.8462121 +"878","Lesotho","Africa",1957,45.047,813338,335.9971151 +"879","Lesotho","Africa",1962,47.747,893143,411.8006266 +"880","Lesotho","Africa",1967,48.492,996380,498.6390265 +"881","Lesotho","Africa",1972,49.767,1116779,496.5815922 +"882","Lesotho","Africa",1977,52.208,1251524,745.3695408 +"883","Lesotho","Africa",1982,55.078,1411807,797.2631074 +"884","Lesotho","Africa",1987,57.18,1599200,773.9932141 +"885","Lesotho","Africa",1992,59.685,1803195,977.4862725 +"886","Lesotho","Africa",1997,55.558,1982823,1186.147994 +"887","Lesotho","Africa",2002,44.593,2046772,1275.184575 +"888","Lesotho","Africa",2007,42.592,2012649,1569.331442 +"889","Liberia","Africa",1952,38.48,863308,575.5729961 +"890","Liberia","Africa",1957,39.486,975950,620.9699901 +"891","Liberia","Africa",1962,40.502,1112796,634.1951625 +"892","Liberia","Africa",1967,41.536,1279406,713.6036483 +"893","Liberia","Africa",1972,42.614,1482628,803.0054535 +"894","Liberia","Africa",1977,43.764,1703617,640.3224383 +"895","Liberia","Africa",1982,44.852,1956875,572.1995694 +"896","Liberia","Africa",1987,46.027,2269414,506.1138573 +"897","Liberia","Africa",1992,40.802,1912974,636.6229191 +"898","Liberia","Africa",1997,42.221,2200725,609.1739508 +"899","Liberia","Africa",2002,43.753,2814651,531.4823679 +"900","Liberia","Africa",2007,45.678,3193942,414.5073415 +"901","Libya","Africa",1952,42.723,1019729,2387.54806 +"902","Libya","Africa",1957,45.289,1201578,3448.284395 +"903","Libya","Africa",1962,47.808,1441863,6757.030816 +"904","Libya","Africa",1967,50.227,1759224,18772.75169 +"905","Libya","Africa",1972,52.773,2183877,21011.49721 +"906","Libya","Africa",1977,57.442,2721783,21951.21176 +"907","Libya","Africa",1982,62.155,3344074,17364.27538 +"908","Libya","Africa",1987,66.234,3799845,11770.5898 +"909","Libya","Africa",1992,68.755,4364501,9640.138501 +"910","Libya","Africa",1997,71.555,4759670,9467.446056 +"911","Libya","Africa",2002,72.737,5368585,9534.677467 +"912","Libya","Africa",2007,73.952,6036914,12057.49928 +"913","Madagascar","Africa",1952,36.681,4762912,1443.011715 +"914","Madagascar","Africa",1957,38.865,5181679,1589.20275 +"915","Madagascar","Africa",1962,40.848,5703324,1643.38711 +"916","Madagascar","Africa",1967,42.881,6334556,1634.047282 +"917","Madagascar","Africa",1972,44.851,7082430,1748.562982 +"918","Madagascar","Africa",1977,46.881,8007166,1544.228586 +"919","Madagascar","Africa",1982,48.969,9171477,1302.878658 +"920","Madagascar","Africa",1987,49.35,10568642,1155.441948 +"921","Madagascar","Africa",1992,52.214,12210395,1040.67619 +"922","Madagascar","Africa",1997,54.978,14165114,986.2958956 +"923","Madagascar","Africa",2002,57.286,16473477,894.6370822 +"924","Madagascar","Africa",2007,59.443,19167654,1044.770126 +"925","Malawi","Africa",1952,36.256,2917802,369.1650802 +"926","Malawi","Africa",1957,37.207,3221238,416.3698064 +"927","Malawi","Africa",1962,38.41,3628608,427.9010856 +"928","Malawi","Africa",1967,39.487,4147252,495.5147806 +"929","Malawi","Africa",1972,41.766,4730997,584.6219709 +"930","Malawi","Africa",1977,43.767,5637246,663.2236766 +"931","Malawi","Africa",1982,45.642,6502825,632.8039209 +"932","Malawi","Africa",1987,47.457,7824747,635.5173634 +"933","Malawi","Africa",1992,49.42,10014249,563.2000145 +"934","Malawi","Africa",1997,47.495,10419991,692.2758103 +"935","Malawi","Africa",2002,45.009,11824495,665.4231186 +"936","Malawi","Africa",2007,48.303,13327079,759.3499101 +"937","Malaysia","Asia",1952,48.463,6748378,1831.132894 +"938","Malaysia","Asia",1957,52.102,7739235,1810.066992 +"939","Malaysia","Asia",1962,55.737,8906385,2036.884944 +"940","Malaysia","Asia",1967,59.371,10154878,2277.742396 +"941","Malaysia","Asia",1972,63.01,11441462,2849.09478 +"942","Malaysia","Asia",1977,65.256,12845381,3827.921571 +"943","Malaysia","Asia",1982,68,14441916,4920.355951 +"944","Malaysia","Asia",1987,69.5,16331785,5249.802653 +"945","Malaysia","Asia",1992,70.693,18319502,7277.912802 +"946","Malaysia","Asia",1997,71.938,20476091,10132.90964 +"947","Malaysia","Asia",2002,73.044,22662365,10206.97794 +"948","Malaysia","Asia",2007,74.241,24821286,12451.6558 +"949","Mali","Africa",1952,33.685,3838168,452.3369807 +"950","Mali","Africa",1957,35.307,4241884,490.3821867 +"951","Mali","Africa",1962,36.936,4690372,496.1743428 +"952","Mali","Africa",1967,38.487,5212416,545.0098873 +"953","Mali","Africa",1972,39.977,5828158,581.3688761 +"954","Mali","Africa",1977,41.714,6491649,686.3952693 +"955","Mali","Africa",1982,43.916,6998256,618.0140641 +"956","Mali","Africa",1987,46.364,7634008,684.1715576 +"957","Mali","Africa",1992,48.388,8416215,739.014375 +"958","Mali","Africa",1997,49.903,9384984,790.2579846 +"959","Mali","Africa",2002,51.818,10580176,951.4097518 +"960","Mali","Africa",2007,54.467,12031795,1042.581557 +"961","Mauritania","Africa",1952,40.543,1022556,743.1159097 +"962","Mauritania","Africa",1957,42.338,1076852,846.1202613 +"963","Mauritania","Africa",1962,44.248,1146757,1055.896036 +"964","Mauritania","Africa",1967,46.289,1230542,1421.145193 +"965","Mauritania","Africa",1972,48.437,1332786,1586.851781 +"966","Mauritania","Africa",1977,50.852,1456688,1497.492223 +"967","Mauritania","Africa",1982,53.599,1622136,1481.150189 +"968","Mauritania","Africa",1987,56.145,1841240,1421.603576 +"969","Mauritania","Africa",1992,58.333,2119465,1361.369784 +"970","Mauritania","Africa",1997,60.43,2444741,1483.136136 +"971","Mauritania","Africa",2002,62.247,2828858,1579.019543 +"972","Mauritania","Africa",2007,64.164,3270065,1803.151496 +"973","Mauritius","Africa",1952,50.986,516556,1967.955707 +"974","Mauritius","Africa",1957,58.089,609816,2034.037981 +"975","Mauritius","Africa",1962,60.246,701016,2529.067487 +"976","Mauritius","Africa",1967,61.557,789309,2475.387562 +"977","Mauritius","Africa",1972,62.944,851334,2575.484158 +"978","Mauritius","Africa",1977,64.93,913025,3710.982963 +"979","Mauritius","Africa",1982,66.711,992040,3688.037739 +"980","Mauritius","Africa",1987,68.74,1042663,4783.586903 +"981","Mauritius","Africa",1992,69.745,1096202,6058.253846 +"982","Mauritius","Africa",1997,70.736,1149818,7425.705295 +"983","Mauritius","Africa",2002,71.954,1200206,9021.815894 +"984","Mauritius","Africa",2007,72.801,1250882,10956.99112 +"985","Mexico","Americas",1952,50.789,30144317,3478.125529 +"986","Mexico","Americas",1957,55.19,35015548,4131.546641 +"987","Mexico","Americas",1962,58.299,41121485,4581.609385 +"988","Mexico","Americas",1967,60.11,47995559,5754.733883 +"989","Mexico","Americas",1972,62.361,55984294,6809.40669 +"990","Mexico","Americas",1977,65.032,63759976,7674.929108 +"991","Mexico","Americas",1982,67.405,71640904,9611.147541 +"992","Mexico","Americas",1987,69.498,80122492,8688.156003 +"993","Mexico","Americas",1992,71.455,88111030,9472.384295 +"994","Mexico","Americas",1997,73.67,95895146,9767.29753 +"995","Mexico","Americas",2002,74.902,102479927,10742.44053 +"996","Mexico","Americas",2007,76.195,108700891,11977.57496 +"997","Mongolia","Asia",1952,42.244,800663,786.5668575 +"998","Mongolia","Asia",1957,45.248,882134,912.6626085 +"999","Mongolia","Asia",1962,48.251,1010280,1056.353958 +"1000","Mongolia","Asia",1967,51.253,1149500,1226.04113 +"1001","Mongolia","Asia",1972,53.754,1320500,1421.741975 +"1002","Mongolia","Asia",1977,55.491,1528000,1647.511665 +"1003","Mongolia","Asia",1982,57.489,1756032,2000.603139 +"1004","Mongolia","Asia",1987,60.222,2015133,2338.008304 +"1005","Mongolia","Asia",1992,61.271,2312802,1785.402016 +"1006","Mongolia","Asia",1997,63.625,2494803,1902.2521 +"1007","Mongolia","Asia",2002,65.033,2674234,2140.739323 +"1008","Mongolia","Asia",2007,66.803,2874127,3095.772271 +"1009","Montenegro","Europe",1952,59.164,413834,2647.585601 +"1010","Montenegro","Europe",1957,61.448,442829,3682.259903 +"1011","Montenegro","Europe",1962,63.728,474528,4649.593785 +"1012","Montenegro","Europe",1967,67.178,501035,5907.850937 +"1013","Montenegro","Europe",1972,70.636,527678,7778.414017 +"1014","Montenegro","Europe",1977,73.066,560073,9595.929905 +"1015","Montenegro","Europe",1982,74.101,562548,11222.58762 +"1016","Montenegro","Europe",1987,74.865,569473,11732.51017 +"1017","Montenegro","Europe",1992,75.435,621621,7003.339037 +"1018","Montenegro","Europe",1997,75.445,692651,6465.613349 +"1019","Montenegro","Europe",2002,73.981,720230,6557.194282 +"1020","Montenegro","Europe",2007,74.543,684736,9253.896111 +"1021","Morocco","Africa",1952,42.873,9939217,1688.20357 +"1022","Morocco","Africa",1957,45.423,11406350,1642.002314 +"1023","Morocco","Africa",1962,47.924,13056604,1566.353493 +"1024","Morocco","Africa",1967,50.335,14770296,1711.04477 +"1025","Morocco","Africa",1972,52.862,16660670,1930.194975 +"1026","Morocco","Africa",1977,55.73,18396941,2370.619976 +"1027","Morocco","Africa",1982,59.65,20198730,2702.620356 +"1028","Morocco","Africa",1987,62.677,22987397,2755.046991 +"1029","Morocco","Africa",1992,65.393,25798239,2948.047252 +"1030","Morocco","Africa",1997,67.66,28529501,2982.101858 +"1031","Morocco","Africa",2002,69.615,31167783,3258.495584 +"1032","Morocco","Africa",2007,71.164,33757175,3820.17523 +"1033","Mozambique","Africa",1952,31.286,6446316,468.5260381 +"1034","Mozambique","Africa",1957,33.779,7038035,495.5868333 +"1035","Mozambique","Africa",1962,36.161,7788944,556.6863539 +"1036","Mozambique","Africa",1967,38.113,8680909,566.6691539 +"1037","Mozambique","Africa",1972,40.328,9809596,724.9178037 +"1038","Mozambique","Africa",1977,42.495,11127868,502.3197334 +"1039","Mozambique","Africa",1982,42.795,12587223,462.2114149 +"1040","Mozambique","Africa",1987,42.861,12891952,389.8761846 +"1041","Mozambique","Africa",1992,44.284,13160731,410.8968239 +"1042","Mozambique","Africa",1997,46.344,16603334,472.3460771 +"1043","Mozambique","Africa",2002,44.026,18473780,633.6179466 +"1044","Mozambique","Africa",2007,42.082,19951656,823.6856205 +"1045","Myanmar","Asia",1952,36.319,20092996,331 +"1046","Myanmar","Asia",1957,41.905,21731844,350 +"1047","Myanmar","Asia",1962,45.108,23634436,388 +"1048","Myanmar","Asia",1967,49.379,25870271,349 +"1049","Myanmar","Asia",1972,53.07,28466390,357 +"1050","Myanmar","Asia",1977,56.059,31528087,371 +"1051","Myanmar","Asia",1982,58.056,34680442,424 +"1052","Myanmar","Asia",1987,58.339,38028578,385 +"1053","Myanmar","Asia",1992,59.32,40546538,347 +"1054","Myanmar","Asia",1997,60.328,43247867,415 +"1055","Myanmar","Asia",2002,59.908,45598081,611 +"1056","Myanmar","Asia",2007,62.069,47761980,944 +"1057","Namibia","Africa",1952,41.725,485831,2423.780443 +"1058","Namibia","Africa",1957,45.226,548080,2621.448058 +"1059","Namibia","Africa",1962,48.386,621392,3173.215595 +"1060","Namibia","Africa",1967,51.159,706640,3793.694753 +"1061","Namibia","Africa",1972,53.867,821782,3746.080948 +"1062","Namibia","Africa",1977,56.437,977026,3876.485958 +"1063","Namibia","Africa",1982,58.968,1099010,4191.100511 +"1064","Namibia","Africa",1987,60.835,1278184,3693.731337 +"1065","Namibia","Africa",1992,61.999,1554253,3804.537999 +"1066","Namibia","Africa",1997,58.909,1774766,3899.52426 +"1067","Namibia","Africa",2002,51.479,1972153,4072.324751 +"1068","Namibia","Africa",2007,52.906,2055080,4811.060429 +"1069","Nepal","Asia",1952,36.157,9182536,545.8657229 +"1070","Nepal","Asia",1957,37.686,9682338,597.9363558 +"1071","Nepal","Asia",1962,39.393,10332057,652.3968593 +"1072","Nepal","Asia",1967,41.472,11261690,676.4422254 +"1073","Nepal","Asia",1972,43.971,12412593,674.7881296 +"1074","Nepal","Asia",1977,46.748,13933198,694.1124398 +"1075","Nepal","Asia",1982,49.594,15796314,718.3730947 +"1076","Nepal","Asia",1987,52.537,17917180,775.6324501 +"1077","Nepal","Asia",1992,55.727,20326209,897.7403604 +"1078","Nepal","Asia",1997,59.426,23001113,1010.892138 +"1079","Nepal","Asia",2002,61.34,25873917,1057.206311 +"1080","Nepal","Asia",2007,63.785,28901790,1091.359778 +"1081","Netherlands","Europe",1952,72.13,10381988,8941.571858 +"1082","Netherlands","Europe",1957,72.99,11026383,11276.19344 +"1083","Netherlands","Europe",1962,73.23,11805689,12790.84956 +"1084","Netherlands","Europe",1967,73.82,12596822,15363.25136 +"1085","Netherlands","Europe",1972,73.75,13329874,18794.74567 +"1086","Netherlands","Europe",1977,75.24,13852989,21209.0592 +"1087","Netherlands","Europe",1982,76.05,14310401,21399.46046 +"1088","Netherlands","Europe",1987,76.83,14665278,23651.32361 +"1089","Netherlands","Europe",1992,77.42,15174244,26790.94961 +"1090","Netherlands","Europe",1997,78.03,15604464,30246.13063 +"1091","Netherlands","Europe",2002,78.53,16122830,33724.75778 +"1092","Netherlands","Europe",2007,79.762,16570613,36797.93332 +"1093","New Zealand","Oceania",1952,69.39,1994794,10556.57566 +"1094","New Zealand","Oceania",1957,70.26,2229407,12247.39532 +"1095","New Zealand","Oceania",1962,71.24,2488550,13175.678 +"1096","New Zealand","Oceania",1967,71.52,2728150,14463.91893 +"1097","New Zealand","Oceania",1972,71.89,2929100,16046.03728 +"1098","New Zealand","Oceania",1977,72.22,3164900,16233.7177 +"1099","New Zealand","Oceania",1982,73.84,3210650,17632.4104 +"1100","New Zealand","Oceania",1987,74.32,3317166,19007.19129 +"1101","New Zealand","Oceania",1992,76.33,3437674,18363.32494 +"1102","New Zealand","Oceania",1997,77.55,3676187,21050.41377 +"1103","New Zealand","Oceania",2002,79.11,3908037,23189.80135 +"1104","New Zealand","Oceania",2007,80.204,4115771,25185.00911 +"1105","Nicaragua","Americas",1952,42.314,1165790,3112.363948 +"1106","Nicaragua","Americas",1957,45.432,1358828,3457.415947 +"1107","Nicaragua","Americas",1962,48.632,1590597,3634.364406 +"1108","Nicaragua","Americas",1967,51.884,1865490,4643.393534 +"1109","Nicaragua","Americas",1972,55.151,2182908,4688.593267 +"1110","Nicaragua","Americas",1977,57.47,2554598,5486.371089 +"1111","Nicaragua","Americas",1982,59.298,2979423,3470.338156 +"1112","Nicaragua","Americas",1987,62.008,3344353,2955.984375 +"1113","Nicaragua","Americas",1992,65.843,4017939,2170.151724 +"1114","Nicaragua","Americas",1997,68.426,4609572,2253.023004 +"1115","Nicaragua","Americas",2002,70.836,5146848,2474.548819 +"1116","Nicaragua","Americas",2007,72.899,5675356,2749.320965 +"1117","Niger","Africa",1952,37.444,3379468,761.879376 +"1118","Niger","Africa",1957,38.598,3692184,835.5234025 +"1119","Niger","Africa",1962,39.487,4076008,997.7661127 +"1120","Niger","Africa",1967,40.118,4534062,1054.384891 +"1121","Niger","Africa",1972,40.546,5060262,954.2092363 +"1122","Niger","Africa",1977,41.291,5682086,808.8970728 +"1123","Niger","Africa",1982,42.598,6437188,909.7221354 +"1124","Niger","Africa",1987,44.555,7332638,668.3000228 +"1125","Niger","Africa",1992,47.391,8392818,581.182725 +"1126","Niger","Africa",1997,51.313,9666252,580.3052092 +"1127","Niger","Africa",2002,54.496,11140655,601.0745012 +"1128","Niger","Africa",2007,56.867,12894865,619.6768924 +"1129","Nigeria","Africa",1952,36.324,33119096,1077.281856 +"1130","Nigeria","Africa",1957,37.802,37173340,1100.592563 +"1131","Nigeria","Africa",1962,39.36,41871351,1150.927478 +"1132","Nigeria","Africa",1967,41.04,47287752,1014.514104 +"1133","Nigeria","Africa",1972,42.821,53740085,1698.388838 +"1134","Nigeria","Africa",1977,44.514,62209173,1981.951806 +"1135","Nigeria","Africa",1982,45.826,73039376,1576.97375 +"1136","Nigeria","Africa",1987,46.886,81551520,1385.029563 +"1137","Nigeria","Africa",1992,47.472,93364244,1619.848217 +"1138","Nigeria","Africa",1997,47.464,106207839,1624.941275 +"1139","Nigeria","Africa",2002,46.608,119901274,1615.286395 +"1140","Nigeria","Africa",2007,46.859,135031164,2013.977305 +"1141","Norway","Europe",1952,72.67,3327728,10095.42172 +"1142","Norway","Europe",1957,73.44,3491938,11653.97304 +"1143","Norway","Europe",1962,73.47,3638919,13450.40151 +"1144","Norway","Europe",1967,74.08,3786019,16361.87647 +"1145","Norway","Europe",1972,74.34,3933004,18965.05551 +"1146","Norway","Europe",1977,75.37,4043205,23311.34939 +"1147","Norway","Europe",1982,75.97,4114787,26298.63531 +"1148","Norway","Europe",1987,75.89,4186147,31540.9748 +"1149","Norway","Europe",1992,77.32,4286357,33965.66115 +"1150","Norway","Europe",1997,78.32,4405672,41283.16433 +"1151","Norway","Europe",2002,79.05,4535591,44683.97525 +"1152","Norway","Europe",2007,80.196,4627926,49357.19017 +"1153","Oman","Asia",1952,37.578,507833,1828.230307 +"1154","Oman","Asia",1957,40.08,561977,2242.746551 +"1155","Oman","Asia",1962,43.165,628164,2924.638113 +"1156","Oman","Asia",1967,46.988,714775,4720.942687 +"1157","Oman","Asia",1972,52.143,829050,10618.03855 +"1158","Oman","Asia",1977,57.367,1004533,11848.34392 +"1159","Oman","Asia",1982,62.728,1301048,12954.79101 +"1160","Oman","Asia",1987,67.734,1593882,18115.22313 +"1161","Oman","Asia",1992,71.197,1915208,18616.70691 +"1162","Oman","Asia",1997,72.499,2283635,19702.05581 +"1163","Oman","Asia",2002,74.193,2713462,19774.83687 +"1164","Oman","Asia",2007,75.64,3204897,22316.19287 +"1165","Pakistan","Asia",1952,43.436,41346560,684.5971438 +"1166","Pakistan","Asia",1957,45.557,46679944,747.0835292 +"1167","Pakistan","Asia",1962,47.67,53100671,803.3427418 +"1168","Pakistan","Asia",1967,49.8,60641899,942.4082588 +"1169","Pakistan","Asia",1972,51.929,69325921,1049.938981 +"1170","Pakistan","Asia",1977,54.043,78152686,1175.921193 +"1171","Pakistan","Asia",1982,56.158,91462088,1443.429832 +"1172","Pakistan","Asia",1987,58.245,105186881,1704.686583 +"1173","Pakistan","Asia",1992,60.838,120065004,1971.829464 +"1174","Pakistan","Asia",1997,61.818,135564834,2049.350521 +"1175","Pakistan","Asia",2002,63.61,153403524,2092.712441 +"1176","Pakistan","Asia",2007,65.483,169270617,2605.94758 +"1177","Panama","Americas",1952,55.191,940080,2480.380334 +"1178","Panama","Americas",1957,59.201,1063506,2961.800905 +"1179","Panama","Americas",1962,61.817,1215725,3536.540301 +"1180","Panama","Americas",1967,64.071,1405486,4421.009084 +"1181","Panama","Americas",1972,66.216,1616384,5364.249663 +"1182","Panama","Americas",1977,68.681,1839782,5351.912144 +"1183","Panama","Americas",1982,70.472,2036305,7009.601598 +"1184","Panama","Americas",1987,71.523,2253639,7034.779161 +"1185","Panama","Americas",1992,72.462,2484997,6618.74305 +"1186","Panama","Americas",1997,73.738,2734531,7113.692252 +"1187","Panama","Americas",2002,74.712,2990875,7356.031934 +"1188","Panama","Americas",2007,75.537,3242173,9809.185636 +"1189","Paraguay","Americas",1952,62.649,1555876,1952.308701 +"1190","Paraguay","Americas",1957,63.196,1770902,2046.154706 +"1191","Paraguay","Americas",1962,64.361,2009813,2148.027146 +"1192","Paraguay","Americas",1967,64.951,2287985,2299.376311 +"1193","Paraguay","Americas",1972,65.815,2614104,2523.337977 +"1194","Paraguay","Americas",1977,66.353,2984494,3248.373311 +"1195","Paraguay","Americas",1982,66.874,3366439,4258.503604 +"1196","Paraguay","Americas",1987,67.378,3886512,3998.875695 +"1197","Paraguay","Americas",1992,68.225,4483945,4196.411078 +"1198","Paraguay","Americas",1997,69.4,5154123,4247.400261 +"1199","Paraguay","Americas",2002,70.755,5884491,3783.674243 +"1200","Paraguay","Americas",2007,71.752,6667147,4172.838464 +"1201","Peru","Americas",1952,43.902,8025700,3758.523437 +"1202","Peru","Americas",1957,46.263,9146100,4245.256698 +"1203","Peru","Americas",1962,49.096,10516500,4957.037982 +"1204","Peru","Americas",1967,51.445,12132200,5788.09333 +"1205","Peru","Americas",1972,55.448,13954700,5937.827283 +"1206","Peru","Americas",1977,58.447,15990099,6281.290855 +"1207","Peru","Americas",1982,61.406,18125129,6434.501797 +"1208","Peru","Americas",1987,64.134,20195924,6360.943444 +"1209","Peru","Americas",1992,66.458,22430449,4446.380924 +"1210","Peru","Americas",1997,68.386,24748122,5838.347657 +"1211","Peru","Americas",2002,69.906,26769436,5909.020073 +"1212","Peru","Americas",2007,71.421,28674757,7408.905561 +"1213","Philippines","Asia",1952,47.752,22438691,1272.880995 +"1214","Philippines","Asia",1957,51.334,26072194,1547.944844 +"1215","Philippines","Asia",1962,54.757,30325264,1649.552153 +"1216","Philippines","Asia",1967,56.393,35356600,1814.12743 +"1217","Philippines","Asia",1972,58.065,40850141,1989.37407 +"1218","Philippines","Asia",1977,60.06,46850962,2373.204287 +"1219","Philippines","Asia",1982,62.082,53456774,2603.273765 +"1220","Philippines","Asia",1987,64.151,60017788,2189.634995 +"1221","Philippines","Asia",1992,66.458,67185766,2279.324017 +"1222","Philippines","Asia",1997,68.564,75012988,2536.534925 +"1223","Philippines","Asia",2002,70.303,82995088,2650.921068 +"1224","Philippines","Asia",2007,71.688,91077287,3190.481016 +"1225","Poland","Europe",1952,61.31,25730551,4029.329699 +"1226","Poland","Europe",1957,65.77,28235346,4734.253019 +"1227","Poland","Europe",1962,67.64,30329617,5338.752143 +"1228","Poland","Europe",1967,69.61,31785378,6557.152776 +"1229","Poland","Europe",1972,70.85,33039545,8006.506993 +"1230","Poland","Europe",1977,70.67,34621254,9508.141454 +"1231","Poland","Europe",1982,71.32,36227381,8451.531004 +"1232","Poland","Europe",1987,70.98,37740710,9082.351172 +"1233","Poland","Europe",1992,70.99,38370697,7738.881247 +"1234","Poland","Europe",1997,72.75,38654957,10159.58368 +"1235","Poland","Europe",2002,74.67,38625976,12002.23908 +"1236","Poland","Europe",2007,75.563,38518241,15389.92468 +"1237","Portugal","Europe",1952,59.82,8526050,3068.319867 +"1238","Portugal","Europe",1957,61.51,8817650,3774.571743 +"1239","Portugal","Europe",1962,64.39,9019800,4727.954889 +"1240","Portugal","Europe",1967,66.6,9103000,6361.517993 +"1241","Portugal","Europe",1972,69.26,8970450,9022.247417 +"1242","Portugal","Europe",1977,70.41,9662600,10172.48572 +"1243","Portugal","Europe",1982,72.77,9859650,11753.84291 +"1244","Portugal","Europe",1987,74.06,9915289,13039.30876 +"1245","Portugal","Europe",1992,74.86,9927680,16207.26663 +"1246","Portugal","Europe",1997,75.97,10156415,17641.03156 +"1247","Portugal","Europe",2002,77.29,10433867,19970.90787 +"1248","Portugal","Europe",2007,78.098,10642836,20509.64777 +"1249","Puerto Rico","Americas",1952,64.28,2227000,3081.959785 +"1250","Puerto Rico","Americas",1957,68.54,2260000,3907.156189 +"1251","Puerto Rico","Americas",1962,69.62,2448046,5108.34463 +"1252","Puerto Rico","Americas",1967,71.1,2648961,6929.277714 +"1253","Puerto Rico","Americas",1972,72.16,2847132,9123.041742 +"1254","Puerto Rico","Americas",1977,73.44,3080828,9770.524921 +"1255","Puerto Rico","Americas",1982,73.75,3279001,10330.98915 +"1256","Puerto Rico","Americas",1987,74.63,3444468,12281.34191 +"1257","Puerto Rico","Americas",1992,73.911,3585176,14641.58711 +"1258","Puerto Rico","Americas",1997,74.917,3759430,16999.4333 +"1259","Puerto Rico","Americas",2002,77.778,3859606,18855.60618 +"1260","Puerto Rico","Americas",2007,78.746,3942491,19328.70901 +"1261","Reunion","Africa",1952,52.724,257700,2718.885295 +"1262","Reunion","Africa",1957,55.09,308700,2769.451844 +"1263","Reunion","Africa",1962,57.666,358900,3173.72334 +"1264","Reunion","Africa",1967,60.542,414024,4021.175739 +"1265","Reunion","Africa",1972,64.274,461633,5047.658563 +"1266","Reunion","Africa",1977,67.064,492095,4319.804067 +"1267","Reunion","Africa",1982,69.885,517810,5267.219353 +"1268","Reunion","Africa",1987,71.913,562035,5303.377488 +"1269","Reunion","Africa",1992,73.615,622191,6101.255823 +"1270","Reunion","Africa",1997,74.772,684810,6071.941411 +"1271","Reunion","Africa",2002,75.744,743981,6316.1652 +"1272","Reunion","Africa",2007,76.442,798094,7670.122558 +"1273","Romania","Europe",1952,61.05,16630000,3144.613186 +"1274","Romania","Europe",1957,64.1,17829327,3943.370225 +"1275","Romania","Europe",1962,66.8,18680721,4734.997586 +"1276","Romania","Europe",1967,66.8,19284814,6470.866545 +"1277","Romania","Europe",1972,69.21,20662648,8011.414402 +"1278","Romania","Europe",1977,69.46,21658597,9356.39724 +"1279","Romania","Europe",1982,69.66,22356726,9605.314053 +"1280","Romania","Europe",1987,69.53,22686371,9696.273295 +"1281","Romania","Europe",1992,69.36,22797027,6598.409903 +"1282","Romania","Europe",1997,69.72,22562458,7346.547557 +"1283","Romania","Europe",2002,71.322,22404337,7885.360081 +"1284","Romania","Europe",2007,72.476,22276056,10808.47561 +"1285","Rwanda","Africa",1952,40,2534927,493.3238752 +"1286","Rwanda","Africa",1957,41.5,2822082,540.2893983 +"1287","Rwanda","Africa",1962,43,3051242,597.4730727 +"1288","Rwanda","Africa",1967,44.1,3451079,510.9637142 +"1289","Rwanda","Africa",1972,44.6,3992121,590.5806638 +"1290","Rwanda","Africa",1977,45,4657072,670.0806011 +"1291","Rwanda","Africa",1982,46.218,5507565,881.5706467 +"1292","Rwanda","Africa",1987,44.02,6349365,847.991217 +"1293","Rwanda","Africa",1992,23.599,7290203,737.0685949 +"1294","Rwanda","Africa",1997,36.087,7212583,589.9445051 +"1295","Rwanda","Africa",2002,43.413,7852401,785.6537648 +"1296","Rwanda","Africa",2007,46.242,8860588,863.0884639 +"1297","Sao Tome and Principe","Africa",1952,46.471,60011,879.5835855 +"1298","Sao Tome and Principe","Africa",1957,48.945,61325,860.7369026 +"1299","Sao Tome and Principe","Africa",1962,51.893,65345,1071.551119 +"1300","Sao Tome and Principe","Africa",1967,54.425,70787,1384.840593 +"1301","Sao Tome and Principe","Africa",1972,56.48,76595,1532.985254 +"1302","Sao Tome and Principe","Africa",1977,58.55,86796,1737.561657 +"1303","Sao Tome and Principe","Africa",1982,60.351,98593,1890.218117 +"1304","Sao Tome and Principe","Africa",1987,61.728,110812,1516.525457 +"1305","Sao Tome and Principe","Africa",1992,62.742,125911,1428.777814 +"1306","Sao Tome and Principe","Africa",1997,63.306,145608,1339.076036 +"1307","Sao Tome and Principe","Africa",2002,64.337,170372,1353.09239 +"1308","Sao Tome and Principe","Africa",2007,65.528,199579,1598.435089 +"1309","Saudi Arabia","Asia",1952,39.875,4005677,6459.554823 +"1310","Saudi Arabia","Asia",1957,42.868,4419650,8157.591248 +"1311","Saudi Arabia","Asia",1962,45.914,4943029,11626.41975 +"1312","Saudi Arabia","Asia",1967,49.901,5618198,16903.04886 +"1313","Saudi Arabia","Asia",1972,53.886,6472756,24837.42865 +"1314","Saudi Arabia","Asia",1977,58.69,8128505,34167.7626 +"1315","Saudi Arabia","Asia",1982,63.012,11254672,33693.17525 +"1316","Saudi Arabia","Asia",1987,66.295,14619745,21198.26136 +"1317","Saudi Arabia","Asia",1992,68.768,16945857,24841.61777 +"1318","Saudi Arabia","Asia",1997,70.533,21229759,20586.69019 +"1319","Saudi Arabia","Asia",2002,71.626,24501530,19014.54118 +"1320","Saudi Arabia","Asia",2007,72.777,27601038,21654.83194 +"1321","Senegal","Africa",1952,37.278,2755589,1450.356983 +"1322","Senegal","Africa",1957,39.329,3054547,1567.653006 +"1323","Senegal","Africa",1962,41.454,3430243,1654.988723 +"1324","Senegal","Africa",1967,43.563,3965841,1612.404632 +"1325","Senegal","Africa",1972,45.815,4588696,1597.712056 +"1326","Senegal","Africa",1977,48.879,5260855,1561.769116 +"1327","Senegal","Africa",1982,52.379,6147783,1518.479984 +"1328","Senegal","Africa",1987,55.769,7171347,1441.72072 +"1329","Senegal","Africa",1992,58.196,8307920,1367.899369 +"1330","Senegal","Africa",1997,60.187,9535314,1392.368347 +"1331","Senegal","Africa",2002,61.6,10870037,1519.635262 +"1332","Senegal","Africa",2007,63.062,12267493,1712.472136 +"1333","Serbia","Europe",1952,57.996,6860147,3581.459448 +"1334","Serbia","Europe",1957,61.685,7271135,4981.090891 +"1335","Serbia","Europe",1962,64.531,7616060,6289.629157 +"1336","Serbia","Europe",1967,66.914,7971222,7991.707066 +"1337","Serbia","Europe",1972,68.7,8313288,10522.06749 +"1338","Serbia","Europe",1977,70.3,8686367,12980.66956 +"1339","Serbia","Europe",1982,70.162,9032824,15181.0927 +"1340","Serbia","Europe",1987,71.218,9230783,15870.87851 +"1341","Serbia","Europe",1992,71.659,9826397,9325.068238 +"1342","Serbia","Europe",1997,72.232,10336594,7914.320304 +"1343","Serbia","Europe",2002,73.213,10111559,7236.075251 +"1344","Serbia","Europe",2007,74.002,10150265,9786.534714 +"1345","Sierra Leone","Africa",1952,30.331,2143249,879.7877358 +"1346","Sierra Leone","Africa",1957,31.57,2295678,1004.484437 +"1347","Sierra Leone","Africa",1962,32.767,2467895,1116.639877 +"1348","Sierra Leone","Africa",1967,34.113,2662190,1206.043465 +"1349","Sierra Leone","Africa",1972,35.4,2879013,1353.759762 +"1350","Sierra Leone","Africa",1977,36.788,3140897,1348.285159 +"1351","Sierra Leone","Africa",1982,38.445,3464522,1465.010784 +"1352","Sierra Leone","Africa",1987,40.006,3868905,1294.447788 +"1353","Sierra Leone","Africa",1992,38.333,4260884,1068.696278 +"1354","Sierra Leone","Africa",1997,39.897,4578212,574.6481576 +"1355","Sierra Leone","Africa",2002,41.012,5359092,699.489713 +"1356","Sierra Leone","Africa",2007,42.568,6144562,862.5407561 +"1357","Singapore","Asia",1952,60.396,1127000,2315.138227 +"1358","Singapore","Asia",1957,63.179,1445929,2843.104409 +"1359","Singapore","Asia",1962,65.798,1750200,3674.735572 +"1360","Singapore","Asia",1967,67.946,1977600,4977.41854 +"1361","Singapore","Asia",1972,69.521,2152400,8597.756202 +"1362","Singapore","Asia",1977,70.795,2325300,11210.08948 +"1363","Singapore","Asia",1982,71.76,2651869,15169.16112 +"1364","Singapore","Asia",1987,73.56,2794552,18861.53081 +"1365","Singapore","Asia",1992,75.788,3235865,24769.8912 +"1366","Singapore","Asia",1997,77.158,3802309,33519.4766 +"1367","Singapore","Asia",2002,78.77,4197776,36023.1054 +"1368","Singapore","Asia",2007,79.972,4553009,47143.17964 +"1369","Slovak Republic","Europe",1952,64.36,3558137,5074.659104 +"1370","Slovak Republic","Europe",1957,67.45,3844277,6093.26298 +"1371","Slovak Republic","Europe",1962,70.33,4237384,7481.107598 +"1372","Slovak Republic","Europe",1967,70.98,4442238,8412.902397 +"1373","Slovak Republic","Europe",1972,70.35,4593433,9674.167626 +"1374","Slovak Republic","Europe",1977,70.45,4827803,10922.66404 +"1375","Slovak Republic","Europe",1982,70.8,5048043,11348.54585 +"1376","Slovak Republic","Europe",1987,71.08,5199318,12037.26758 +"1377","Slovak Republic","Europe",1992,71.38,5302888,9498.467723 +"1378","Slovak Republic","Europe",1997,72.71,5383010,12126.23065 +"1379","Slovak Republic","Europe",2002,73.8,5410052,13638.77837 +"1380","Slovak Republic","Europe",2007,74.663,5447502,18678.31435 +"1381","Slovenia","Europe",1952,65.57,1489518,4215.041741 +"1382","Slovenia","Europe",1957,67.85,1533070,5862.276629 +"1383","Slovenia","Europe",1962,69.15,1582962,7402.303395 +"1384","Slovenia","Europe",1967,69.18,1646912,9405.489397 +"1385","Slovenia","Europe",1972,69.82,1694510,12383.4862 +"1386","Slovenia","Europe",1977,70.97,1746919,15277.03017 +"1387","Slovenia","Europe",1982,71.063,1861252,17866.72175 +"1388","Slovenia","Europe",1987,72.25,1945870,18678.53492 +"1389","Slovenia","Europe",1992,73.64,1999210,14214.71681 +"1390","Slovenia","Europe",1997,75.13,2011612,17161.10735 +"1391","Slovenia","Europe",2002,76.66,2011497,20660.01936 +"1392","Slovenia","Europe",2007,77.926,2009245,25768.25759 +"1393","Somalia","Africa",1952,32.978,2526994,1135.749842 +"1394","Somalia","Africa",1957,34.977,2780415,1258.147413 +"1395","Somalia","Africa",1962,36.981,3080153,1369.488336 +"1396","Somalia","Africa",1967,38.977,3428839,1284.73318 +"1397","Somalia","Africa",1972,40.973,3840161,1254.576127 +"1398","Somalia","Africa",1977,41.974,4353666,1450.992513 +"1399","Somalia","Africa",1982,42.955,5828892,1176.807031 +"1400","Somalia","Africa",1987,44.501,6921858,1093.244963 +"1401","Somalia","Africa",1992,39.658,6099799,926.9602964 +"1402","Somalia","Africa",1997,43.795,6633514,930.5964284 +"1403","Somalia","Africa",2002,45.936,7753310,882.0818218 +"1404","Somalia","Africa",2007,48.159,9118773,926.1410683 +"1405","South Africa","Africa",1952,45.009,14264935,4725.295531 +"1406","South Africa","Africa",1957,47.985,16151549,5487.104219 +"1407","South Africa","Africa",1962,49.951,18356657,5768.729717 +"1408","South Africa","Africa",1967,51.927,20997321,7114.477971 +"1409","South Africa","Africa",1972,53.696,23935810,7765.962636 +"1410","South Africa","Africa",1977,55.527,27129932,8028.651439 +"1411","South Africa","Africa",1982,58.161,31140029,8568.266228 +"1412","South Africa","Africa",1987,60.834,35933379,7825.823398 +"1413","South Africa","Africa",1992,61.888,39964159,7225.069258 +"1414","South Africa","Africa",1997,60.236,42835005,7479.188244 +"1415","South Africa","Africa",2002,53.365,44433622,7710.946444 +"1416","South Africa","Africa",2007,49.339,43997828,9269.657808 +"1417","Spain","Europe",1952,64.94,28549870,3834.034742 +"1418","Spain","Europe",1957,66.66,29841614,4564.80241 +"1419","Spain","Europe",1962,69.69,31158061,5693.843879 +"1420","Spain","Europe",1967,71.44,32850275,7993.512294 +"1421","Spain","Europe",1972,73.06,34513161,10638.75131 +"1422","Spain","Europe",1977,74.39,36439000,13236.92117 +"1423","Spain","Europe",1982,76.3,37983310,13926.16997 +"1424","Spain","Europe",1987,76.9,38880702,15764.98313 +"1425","Spain","Europe",1992,77.57,39549438,18603.06452 +"1426","Spain","Europe",1997,78.77,39855442,20445.29896 +"1427","Spain","Europe",2002,79.78,40152517,24835.47166 +"1428","Spain","Europe",2007,80.941,40448191,28821.0637 +"1429","Sri Lanka","Asia",1952,57.593,7982342,1083.53203 +"1430","Sri Lanka","Asia",1957,61.456,9128546,1072.546602 +"1431","Sri Lanka","Asia",1962,62.192,10421936,1074.47196 +"1432","Sri Lanka","Asia",1967,64.266,11737396,1135.514326 +"1433","Sri Lanka","Asia",1972,65.042,13016733,1213.39553 +"1434","Sri Lanka","Asia",1977,65.949,14116836,1348.775651 +"1435","Sri Lanka","Asia",1982,68.757,15410151,1648.079789 +"1436","Sri Lanka","Asia",1987,69.011,16495304,1876.766827 +"1437","Sri Lanka","Asia",1992,70.379,17587060,2153.739222 +"1438","Sri Lanka","Asia",1997,70.457,18698655,2664.477257 +"1439","Sri Lanka","Asia",2002,70.815,19576783,3015.378833 +"1440","Sri Lanka","Asia",2007,72.396,20378239,3970.095407 +"1441","Sudan","Africa",1952,38.635,8504667,1615.991129 +"1442","Sudan","Africa",1957,39.624,9753392,1770.337074 +"1443","Sudan","Africa",1962,40.87,11183227,1959.593767 +"1444","Sudan","Africa",1967,42.858,12716129,1687.997641 +"1445","Sudan","Africa",1972,45.083,14597019,1659.652775 +"1446","Sudan","Africa",1977,47.8,17104986,2202.988423 +"1447","Sudan","Africa",1982,50.338,20367053,1895.544073 +"1448","Sudan","Africa",1987,51.744,24725960,1507.819159 +"1449","Sudan","Africa",1992,53.556,28227588,1492.197043 +"1450","Sudan","Africa",1997,55.373,32160729,1632.210764 +"1451","Sudan","Africa",2002,56.369,37090298,1993.398314 +"1452","Sudan","Africa",2007,58.556,42292929,2602.394995 +"1453","Swaziland","Africa",1952,41.407,290243,1148.376626 +"1454","Swaziland","Africa",1957,43.424,326741,1244.708364 +"1455","Swaziland","Africa",1962,44.992,370006,1856.182125 +"1456","Swaziland","Africa",1967,46.633,420690,2613.101665 +"1457","Swaziland","Africa",1972,49.552,480105,3364.836625 +"1458","Swaziland","Africa",1977,52.537,551425,3781.410618 +"1459","Swaziland","Africa",1982,55.561,649901,3895.384018 +"1460","Swaziland","Africa",1987,57.678,779348,3984.839812 +"1461","Swaziland","Africa",1992,58.474,962344,3553.0224 +"1462","Swaziland","Africa",1997,54.289,1054486,3876.76846 +"1463","Swaziland","Africa",2002,43.869,1130269,4128.116943 +"1464","Swaziland","Africa",2007,39.613,1133066,4513.480643 +"1465","Sweden","Europe",1952,71.86,7124673,8527.844662 +"1466","Sweden","Europe",1957,72.49,7363802,9911.878226 +"1467","Sweden","Europe",1962,73.37,7561588,12329.44192 +"1468","Sweden","Europe",1967,74.16,7867931,15258.29697 +"1469","Sweden","Europe",1972,74.72,8122293,17832.02464 +"1470","Sweden","Europe",1977,75.44,8251648,18855.72521 +"1471","Sweden","Europe",1982,76.42,8325260,20667.38125 +"1472","Sweden","Europe",1987,77.19,8421403,23586.92927 +"1473","Sweden","Europe",1992,78.16,8718867,23880.01683 +"1474","Sweden","Europe",1997,79.39,8897619,25266.59499 +"1475","Sweden","Europe",2002,80.04,8954175,29341.63093 +"1476","Sweden","Europe",2007,80.884,9031088,33859.74835 +"1477","Switzerland","Europe",1952,69.62,4815000,14734.23275 +"1478","Switzerland","Europe",1957,70.56,5126000,17909.48973 +"1479","Switzerland","Europe",1962,71.32,5666000,20431.0927 +"1480","Switzerland","Europe",1967,72.77,6063000,22966.14432 +"1481","Switzerland","Europe",1972,73.78,6401400,27195.11304 +"1482","Switzerland","Europe",1977,75.39,6316424,26982.29052 +"1483","Switzerland","Europe",1982,76.21,6468126,28397.71512 +"1484","Switzerland","Europe",1987,77.41,6649942,30281.70459 +"1485","Switzerland","Europe",1992,78.03,6995447,31871.5303 +"1486","Switzerland","Europe",1997,79.37,7193761,32135.32301 +"1487","Switzerland","Europe",2002,80.62,7361757,34480.95771 +"1488","Switzerland","Europe",2007,81.701,7554661,37506.41907 +"1489","Syria","Asia",1952,45.883,3661549,1643.485354 +"1490","Syria","Asia",1957,48.284,4149908,2117.234893 +"1491","Syria","Asia",1962,50.305,4834621,2193.037133 +"1492","Syria","Asia",1967,53.655,5680812,1881.923632 +"1493","Syria","Asia",1972,57.296,6701172,2571.423014 +"1494","Syria","Asia",1977,61.195,7932503,3195.484582 +"1495","Syria","Asia",1982,64.59,9410494,3761.837715 +"1496","Syria","Asia",1987,66.974,11242847,3116.774285 +"1497","Syria","Asia",1992,69.249,13219062,3340.542768 +"1498","Syria","Asia",1997,71.527,15081016,4014.238972 +"1499","Syria","Asia",2002,73.053,17155814,4090.925331 +"1500","Syria","Asia",2007,74.143,19314747,4184.548089 +"1501","Taiwan","Asia",1952,58.5,8550362,1206.947913 +"1502","Taiwan","Asia",1957,62.4,10164215,1507.86129 +"1503","Taiwan","Asia",1962,65.2,11918938,1822.879028 +"1504","Taiwan","Asia",1967,67.5,13648692,2643.858681 +"1505","Taiwan","Asia",1972,69.39,15226039,4062.523897 +"1506","Taiwan","Asia",1977,70.59,16785196,5596.519826 +"1507","Taiwan","Asia",1982,72.16,18501390,7426.354774 +"1508","Taiwan","Asia",1987,73.4,19757799,11054.56175 +"1509","Taiwan","Asia",1992,74.26,20686918,15215.6579 +"1510","Taiwan","Asia",1997,75.25,21628605,20206.82098 +"1511","Taiwan","Asia",2002,76.99,22454239,23235.42329 +"1512","Taiwan","Asia",2007,78.4,23174294,28718.27684 +"1513","Tanzania","Africa",1952,41.215,8322925,716.6500721 +"1514","Tanzania","Africa",1957,42.974,9452826,698.5356073 +"1515","Tanzania","Africa",1962,44.246,10863958,722.0038073 +"1516","Tanzania","Africa",1967,45.757,12607312,848.2186575 +"1517","Tanzania","Africa",1972,47.62,14706593,915.9850592 +"1518","Tanzania","Africa",1977,49.919,17129565,962.4922932 +"1519","Tanzania","Africa",1982,50.608,19844382,874.2426069 +"1520","Tanzania","Africa",1987,51.535,23040630,831.8220794 +"1521","Tanzania","Africa",1992,50.44,26605473,825.682454 +"1522","Tanzania","Africa",1997,48.466,30686889,789.1862231 +"1523","Tanzania","Africa",2002,49.651,34593779,899.0742111 +"1524","Tanzania","Africa",2007,52.517,38139640,1107.482182 +"1525","Thailand","Asia",1952,50.848,21289402,757.7974177 +"1526","Thailand","Asia",1957,53.63,25041917,793.5774148 +"1527","Thailand","Asia",1962,56.061,29263397,1002.199172 +"1528","Thailand","Asia",1967,58.285,34024249,1295.46066 +"1529","Thailand","Asia",1972,60.405,39276153,1524.358936 +"1530","Thailand","Asia",1977,62.494,44148285,1961.224635 +"1531","Thailand","Asia",1982,64.597,48827160,2393.219781 +"1532","Thailand","Asia",1987,66.084,52910342,2982.653773 +"1533","Thailand","Asia",1992,67.298,56667095,4616.896545 +"1534","Thailand","Asia",1997,67.521,60216677,5852.625497 +"1535","Thailand","Asia",2002,68.564,62806748,5913.187529 +"1536","Thailand","Asia",2007,70.616,65068149,7458.396327 +"1537","Togo","Africa",1952,38.596,1219113,859.8086567 +"1538","Togo","Africa",1957,41.208,1357445,925.9083202 +"1539","Togo","Africa",1962,43.922,1528098,1067.53481 +"1540","Togo","Africa",1967,46.769,1735550,1477.59676 +"1541","Togo","Africa",1972,49.759,2056351,1649.660188 +"1542","Togo","Africa",1977,52.887,2308582,1532.776998 +"1543","Togo","Africa",1982,55.471,2644765,1344.577953 +"1544","Togo","Africa",1987,56.941,3154264,1202.201361 +"1545","Togo","Africa",1992,58.061,3747553,1034.298904 +"1546","Togo","Africa",1997,58.39,4320890,982.2869243 +"1547","Togo","Africa",2002,57.561,4977378,886.2205765 +"1548","Togo","Africa",2007,58.42,5701579,882.9699438 +"1549","Trinidad and Tobago","Americas",1952,59.1,662850,3023.271928 +"1550","Trinidad and Tobago","Americas",1957,61.8,764900,4100.3934 +"1551","Trinidad and Tobago","Americas",1962,64.9,887498,4997.523971 +"1552","Trinidad and Tobago","Americas",1967,65.4,960155,5621.368472 +"1553","Trinidad and Tobago","Americas",1972,65.9,975199,6619.551419 +"1554","Trinidad and Tobago","Americas",1977,68.3,1039009,7899.554209 +"1555","Trinidad and Tobago","Americas",1982,68.832,1116479,9119.528607 +"1556","Trinidad and Tobago","Americas",1987,69.582,1191336,7388.597823 +"1557","Trinidad and Tobago","Americas",1992,69.862,1183669,7370.990932 +"1558","Trinidad and Tobago","Americas",1997,69.465,1138101,8792.573126 +"1559","Trinidad and Tobago","Americas",2002,68.976,1101832,11460.60023 +"1560","Trinidad and Tobago","Americas",2007,69.819,1056608,18008.50924 +"1561","Tunisia","Africa",1952,44.6,3647735,1468.475631 +"1562","Tunisia","Africa",1957,47.1,3950849,1395.232468 +"1563","Tunisia","Africa",1962,49.579,4286552,1660.30321 +"1564","Tunisia","Africa",1967,52.053,4786986,1932.360167 +"1565","Tunisia","Africa",1972,55.602,5303507,2753.285994 +"1566","Tunisia","Africa",1977,59.837,6005061,3120.876811 +"1567","Tunisia","Africa",1982,64.048,6734098,3560.233174 +"1568","Tunisia","Africa",1987,66.894,7724976,3810.419296 +"1569","Tunisia","Africa",1992,70.001,8523077,4332.720164 +"1570","Tunisia","Africa",1997,71.973,9231669,4876.798614 +"1571","Tunisia","Africa",2002,73.042,9770575,5722.895655 +"1572","Tunisia","Africa",2007,73.923,10276158,7092.923025 +"1573","Turkey","Europe",1952,43.585,22235677,1969.10098 +"1574","Turkey","Europe",1957,48.079,25670939,2218.754257 +"1575","Turkey","Europe",1962,52.098,29788695,2322.869908 +"1576","Turkey","Europe",1967,54.336,33411317,2826.356387 +"1577","Turkey","Europe",1972,57.005,37492953,3450.69638 +"1578","Turkey","Europe",1977,59.507,42404033,4269.122326 +"1579","Turkey","Europe",1982,61.036,47328791,4241.356344 +"1580","Turkey","Europe",1987,63.108,52881328,5089.043686 +"1581","Turkey","Europe",1992,66.146,58179144,5678.348271 +"1582","Turkey","Europe",1997,68.835,63047647,6601.429915 +"1583","Turkey","Europe",2002,70.845,67308928,6508.085718 +"1584","Turkey","Europe",2007,71.777,71158647,8458.276384 +"1585","Uganda","Africa",1952,39.978,5824797,734.753484 +"1586","Uganda","Africa",1957,42.571,6675501,774.3710692 +"1587","Uganda","Africa",1962,45.344,7688797,767.2717398 +"1588","Uganda","Africa",1967,48.051,8900294,908.9185217 +"1589","Uganda","Africa",1972,51.016,10190285,950.735869 +"1590","Uganda","Africa",1977,50.35,11457758,843.7331372 +"1591","Uganda","Africa",1982,49.849,12939400,682.2662268 +"1592","Uganda","Africa",1987,51.509,15283050,617.7244065 +"1593","Uganda","Africa",1992,48.825,18252190,644.1707969 +"1594","Uganda","Africa",1997,44.578,21210254,816.559081 +"1595","Uganda","Africa",2002,47.813,24739869,927.7210018 +"1596","Uganda","Africa",2007,51.542,29170398,1056.380121 +"1597","United Kingdom","Europe",1952,69.18,50430000,9979.508487 +"1598","United Kingdom","Europe",1957,70.42,51430000,11283.17795 +"1599","United Kingdom","Europe",1962,70.76,53292000,12477.17707 +"1600","United Kingdom","Europe",1967,71.36,54959000,14142.85089 +"1601","United Kingdom","Europe",1972,72.01,56079000,15895.11641 +"1602","United Kingdom","Europe",1977,72.76,56179000,17428.74846 +"1603","United Kingdom","Europe",1982,74.04,56339704,18232.42452 +"1604","United Kingdom","Europe",1987,75.007,56981620,21664.78767 +"1605","United Kingdom","Europe",1992,76.42,57866349,22705.09254 +"1606","United Kingdom","Europe",1997,77.218,58808266,26074.53136 +"1607","United Kingdom","Europe",2002,78.471,59912431,29478.99919 +"1608","United Kingdom","Europe",2007,79.425,60776238,33203.26128 +"1609","United States","Americas",1952,68.44,157553000,13990.48208 +"1610","United States","Americas",1957,69.49,171984000,14847.12712 +"1611","United States","Americas",1962,70.21,186538000,16173.14586 +"1612","United States","Americas",1967,70.76,198712000,19530.36557 +"1613","United States","Americas",1972,71.34,209896000,21806.03594 +"1614","United States","Americas",1977,73.38,220239000,24072.63213 +"1615","United States","Americas",1982,74.65,232187835,25009.55914 +"1616","United States","Americas",1987,75.02,242803533,29884.35041 +"1617","United States","Americas",1992,76.09,256894189,32003.93224 +"1618","United States","Americas",1997,76.81,272911760,35767.43303 +"1619","United States","Americas",2002,77.31,287675526,39097.09955 +"1620","United States","Americas",2007,78.242,301139947,42951.65309 +"1621","Uruguay","Americas",1952,66.071,2252965,5716.766744 +"1622","Uruguay","Americas",1957,67.044,2424959,6150.772969 +"1623","Uruguay","Americas",1962,68.253,2598466,5603.357717 +"1624","Uruguay","Americas",1967,68.468,2748579,5444.61962 +"1625","Uruguay","Americas",1972,68.673,2829526,5703.408898 +"1626","Uruguay","Americas",1977,69.481,2873520,6504.339663 +"1627","Uruguay","Americas",1982,70.805,2953997,6920.223051 +"1628","Uruguay","Americas",1987,71.918,3045153,7452.398969 +"1629","Uruguay","Americas",1992,72.752,3149262,8137.004775 +"1630","Uruguay","Americas",1997,74.223,3262838,9230.240708 +"1631","Uruguay","Americas",2002,75.307,3363085,7727.002004 +"1632","Uruguay","Americas",2007,76.384,3447496,10611.46299 +"1633","Venezuela","Americas",1952,55.088,5439568,7689.799761 +"1634","Venezuela","Americas",1957,57.907,6702668,9802.466526 +"1635","Venezuela","Americas",1962,60.77,8143375,8422.974165 +"1636","Venezuela","Americas",1967,63.479,9709552,9541.474188 +"1637","Venezuela","Americas",1972,65.712,11515649,10505.25966 +"1638","Venezuela","Americas",1977,67.456,13503563,13143.95095 +"1639","Venezuela","Americas",1982,68.557,15620766,11152.41011 +"1640","Venezuela","Americas",1987,70.19,17910182,9883.584648 +"1641","Venezuela","Americas",1992,71.15,20265563,10733.92631 +"1642","Venezuela","Americas",1997,72.146,22374398,10165.49518 +"1643","Venezuela","Americas",2002,72.766,24287670,8605.047831 +"1644","Venezuela","Americas",2007,73.747,26084662,11415.80569 +"1645","Vietnam","Asia",1952,40.412,26246839,605.0664917 +"1646","Vietnam","Asia",1957,42.887,28998543,676.2854478 +"1647","Vietnam","Asia",1962,45.363,33796140,772.0491602 +"1648","Vietnam","Asia",1967,47.838,39463910,637.1232887 +"1649","Vietnam","Asia",1972,50.254,44655014,699.5016441 +"1650","Vietnam","Asia",1977,55.764,50533506,713.5371196 +"1651","Vietnam","Asia",1982,58.816,56142181,707.2357863 +"1652","Vietnam","Asia",1987,62.82,62826491,820.7994449 +"1653","Vietnam","Asia",1992,67.662,69940728,989.0231487 +"1654","Vietnam","Asia",1997,70.672,76048996,1385.896769 +"1655","Vietnam","Asia",2002,73.017,80908147,1764.456677 +"1656","Vietnam","Asia",2007,74.249,85262356,2441.576404 +"1657","West Bank and Gaza","Asia",1952,43.16,1030585,1515.592329 +"1658","West Bank and Gaza","Asia",1957,45.671,1070439,1827.067742 +"1659","West Bank and Gaza","Asia",1962,48.127,1133134,2198.956312 +"1660","West Bank and Gaza","Asia",1967,51.631,1142636,2649.715007 +"1661","West Bank and Gaza","Asia",1972,56.532,1089572,3133.409277 +"1662","West Bank and Gaza","Asia",1977,60.765,1261091,3682.831494 +"1663","West Bank and Gaza","Asia",1982,64.406,1425876,4336.032082 +"1664","West Bank and Gaza","Asia",1987,67.046,1691210,5107.197384 +"1665","West Bank and Gaza","Asia",1992,69.718,2104779,6017.654756 +"1666","West Bank and Gaza","Asia",1997,71.096,2826046,7110.667619 +"1667","West Bank and Gaza","Asia",2002,72.37,3389578,4515.487575 +"1668","West Bank and Gaza","Asia",2007,73.422,4018332,3025.349798 +"1669","Yemen, Rep.","Asia",1952,32.548,4963829,781.7175761 +"1670","Yemen, Rep.","Asia",1957,33.97,5498090,804.8304547 +"1671","Yemen, Rep.","Asia",1962,35.18,6120081,825.6232006 +"1672","Yemen, Rep.","Asia",1967,36.984,6740785,862.4421463 +"1673","Yemen, Rep.","Asia",1972,39.848,7407075,1265.047031 +"1674","Yemen, Rep.","Asia",1977,44.175,8403990,1829.765177 +"1675","Yemen, Rep.","Asia",1982,49.113,9657618,1977.55701 +"1676","Yemen, Rep.","Asia",1987,52.922,11219340,1971.741538 +"1677","Yemen, Rep.","Asia",1992,55.599,13367997,1879.496673 +"1678","Yemen, Rep.","Asia",1997,58.02,15826497,2117.484526 +"1679","Yemen, Rep.","Asia",2002,60.308,18701257,2234.820827 +"1680","Yemen, Rep.","Asia",2007,62.698,22211743,2280.769906 +"1681","Zambia","Africa",1952,42.038,2672000,1147.388831 +"1682","Zambia","Africa",1957,44.077,3016000,1311.956766 +"1683","Zambia","Africa",1962,46.023,3421000,1452.725766 +"1684","Zambia","Africa",1967,47.768,3900000,1777.077318 +"1685","Zambia","Africa",1972,50.107,4506497,1773.498265 +"1686","Zambia","Africa",1977,51.386,5216550,1588.688299 +"1687","Zambia","Africa",1982,51.821,6100407,1408.678565 +"1688","Zambia","Africa",1987,50.821,7272406,1213.315116 +"1689","Zambia","Africa",1992,46.1,8381163,1210.884633 +"1690","Zambia","Africa",1997,40.238,9417789,1071.353818 +"1691","Zambia","Africa",2002,39.193,10595811,1071.613938 +"1692","Zambia","Africa",2007,42.384,11746035,1271.211593 +"1693","Zimbabwe","Africa",1952,48.451,3080907,406.8841148 +"1694","Zimbabwe","Africa",1957,50.469,3646340,518.7642681 +"1695","Zimbabwe","Africa",1962,52.358,4277736,527.2721818 +"1696","Zimbabwe","Africa",1967,53.995,4995432,569.7950712 +"1697","Zimbabwe","Africa",1972,55.635,5861135,799.3621758 +"1698","Zimbabwe","Africa",1977,57.674,6642107,685.5876821 +"1699","Zimbabwe","Africa",1982,60.363,7636524,788.8550411 +"1700","Zimbabwe","Africa",1987,62.351,9216418,706.1573059 +"1701","Zimbabwe","Africa",1992,60.377,10704340,693.4207856 +"1702","Zimbabwe","Africa",1997,46.809,11404948,792.4499603 +"1703","Zimbabwe","Africa",2002,39.989,11926563,672.0386227 +"1704","Zimbabwe","Africa",2007,43.487,12311143,469.7092981 diff --git a/R_package/inst/htmlwidgets/flourish-live.js b/R_package/inst/htmlwidgets/flourish-live.js new file mode 100644 index 0000000..ba48d33 --- /dev/null +++ b/R_package/inst/htmlwidgets/flourish-live.js @@ -0,0 +1,115 @@ +window.onerror = function (error, url, line) { + // add to the body tag a big red error message if one comes back from flourish js library + // this may be the only feedback that something is wrong with data format + var new_elem = document.createElement('div'); + new_elem.style.color = "red"; + new_elem.innerText = 'ERR:' + error + ' URL:' + url + ' L:' + line + document.body.insertAdjacentElement("afterbegin", new_elem); +}; + +HTMLWidgets.widget({ + name: 'flourish-live', + type: 'output', + factory: function (el, width, height) { + return { + renderValue: function (x) { + function replaceNullWithNaN(obj) { + for (let key in obj) { + if (obj.hasOwnProperty(key) && obj[key] === null) { + obj[key] = NaN; + } + } + } + function convert_to_wide(test) { + for (var i in test) { + if (typeof test[i] === 'object') { + // convert array of arrays to array of objects + test[i] = HTMLWidgets.dataframeToD3(test[i]) + test[i].forEach(obj => replaceNullWithNaN(obj)); + } + } + } + function isEmpty(value) { + return ( + value === null || + value === undefined || + value === '' || + (Array.isArray(value) && value.length === 0) || + (typeof value === 'object' && Object.keys(value).length === 0) + ); + } + function removeEmpty(obj) { + for (let key in obj) { + if (isEmpty(obj[key])) { + delete obj[key]; + } + } + return obj; + } + convert_to_wide(x.data); + convert_to_wide(x.base_data); + for (let key in x.bindings) { + if (x.bindings.hasOwnProperty(key)) { + let obj = x.bindings[key]; + for (let prop in obj) { + if (obj.hasOwnProperty(prop) && obj[prop] === "list") { + obj[prop] = []; + } + } + } + }; + let opts = { + template: x.template, // Template ID + version: x.version, // Template version + container: x.elementId, // Selector for target DOM element + chart_id: x.chart_id, // chart ID + api_key: x.api_key, // Go to account settings or contact support@flourish.studio to get an API key + bindings: x.bindings, + data: x.data, + state: x.state, + base_visualisation_data_format: "object" + } + if (x.base_visualisation_id) { + // base_visualisation_data_format can now be an array of arrays or array of objects as v5.0.2 of the API. + opts.base_visualisation_id = String(x.base_visualisation_id) + opts.bindings = x.bindings || x.base_bindings + opts.data = x.data || x.base_data + opts.metadata = x.metadata || x.base_metadata + // merge the two states together. If there is a replacement value for a key in x.base_state, replace with the value in x.state (set in the R/Python code) + opts.state = { ...x.base_state, ...x.state } + } + // Patch flourish code to use a pre-existing element to avoid RStudio security "feature" + // https://github.com/rstudio/rstudio/issues/12494 + // https://github.com/rstudio/rstudio/issues/12620 + // https://github.com/rstudio/rstudio/pull/12706 + var embedding = { + createEmbedIframe: () => { + return document.getElementById(x.chart_id) + }, + isFixedHeight: isFixedHeight, + getHeightForBreakpoint: getHeightForBreakpoint, + startEventListeners: startEventListeners, + notifyParentWindow: notifyParentWindow, + initScrolly: initScrolly, + createScrolly: createScrolly, + isSafari: isSafari, + initCustomerAnalytics: initCustomerAnalytics, + addAnalyticsListener: addAnalyticsListener, + sendCustomerAnalyticsMessage: sendCustomerAnalyticsMessage + }; + // comment out the following line to disable the rstudio hack + window.embedding = embedding; + // set the default html widget container height to 0. + var container_div_id = opts.container.substring(1); + document.getElementById(container_div_id).style.height = "0px"; + flourish_visualisation = new Fleet(opts); + if (x.base_visualisation_id && !flourish_visualisation.template_loaded){ + flourish_visualisation.template_loaded = true + } + }, + resize: function (width, height) { + // TODO: code to re-render the widget with a new size + } + }; + } +}); diff --git a/R_package/inst/htmlwidgets/flourish-live.yaml b/R_package/inst/htmlwidgets/flourish-live.yaml new file mode 100644 index 0000000..193e0ce --- /dev/null +++ b/R_package/inst/htmlwidgets/flourish-live.yaml @@ -0,0 +1,6 @@ +dependencies: + - name: flourish-live + version: 5.1.0 + src: htmlwidgets/lib/flourish-live + script: flourish-live-5.1.0.js + stylesheet: flourish.css diff --git a/R_package/inst/htmlwidgets/lib/flourish-live/flourish-live-5.1.0.js b/R_package/inst/htmlwidgets/lib/flourish-live/flourish-live-5.1.0.js new file mode 100644 index 0000000..235f2dd --- /dev/null +++ b/R_package/inst/htmlwidgets/lib/flourish-live/flourish-live-5.1.0.js @@ -0,0 +1,3379 @@ +'use strict'; + +function isArrayIndex(x) { + return (parseInt(x).toString() === "" + x) && (x >= 0); +} + + +function validateArrayBindings(column_bindings, columns_bindings) { + var mssg; + + var column_ok = Object.keys(column_bindings).every(function(key) { + return isArrayIndex(column_bindings[key]); + }); + + if (!column_ok) { + mssg = "All column_bindings values should be non-negative integers"; + throw new TypeError(mssg); + } + + var columns_ok = Object.keys(columns_bindings).every(function(key) { + var value = columns_bindings[key]; + return Array.isArray(value) ? value.every(isArrayIndex) : isArrayIndex(value); + }); + + if (!columns_ok) { + mssg = "All columns_bindings values should be non-negative integers or arrays thereof"; + throw new TypeError(mssg); + } +} + +function flourishifyData(input_data, column_bindings, columns_bindings) { + return input_data.map(function(d) { + var obj = {}; + + Object.keys(column_bindings).forEach(function(key) { + obj[key] = d[column_bindings[key]]; + }); + + Object.keys(columns_bindings).forEach(function(key) { + var a = columns_bindings[key]; + if (!Array.isArray(a)) a = [a]; + obj[key] = a.map(function(inner_key) { return d[inner_key]; }); + }); + + return obj; + }); +} + + +function flourishifyObjects(input_data, column_bindings, columns_bindings) { + column_bindings = column_bindings || {}; + columns_bindings = columns_bindings || {}; + + var data = flourishifyData(input_data, column_bindings, columns_bindings); + data.column_names = {}; + + Object.keys(column_bindings).forEach(function(key) { + data.column_names[key] = column_bindings[key]; + }); + + Object.keys(columns_bindings).forEach(function(key) { + var a = columns_bindings[key]; + data.column_names[key] = Array.isArray(a) ? a : [a]; + }); + + return data; +} + + +function flourishifyArrays(input_data, column_bindings, columns_bindings) { + column_bindings = column_bindings || {}; + columns_bindings = columns_bindings || {}; + validateArrayBindings(column_bindings, columns_bindings); + var old_headers = input_data[0]; + + var data = flourishifyData(input_data.slice(1), column_bindings, columns_bindings); + data.column_names = {}; + + Object.keys(column_bindings).forEach(function(key) { + data.column_names[key] = old_headers[column_bindings[key]]; + }); + + Object.keys(columns_bindings).forEach(function(key) { + var a = columns_bindings[key]; + data.column_names[key] = (Array.isArray(a) ? a : [a]).map(function(k) { + return old_headers[k]; + }); + }); + + return data; +} + + +function flourishify(input_data, column_bindings, columns_bindings) { + var fls = Array.isArray(input_data[0]) ? flourishifyArrays : flourishifyObjects; + return fls(input_data, column_bindings, columns_bindings); +} + +var t0 = new Date, + t1 = new Date; + +function newInterval(floori, offseti, count, field) { + + function interval(date) { + return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date; + } + + interval.floor = function(date) { + return floori(date = new Date(+date)), date; + }; + + interval.ceil = function(date) { + return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; + }; + + interval.round = function(date) { + var d0 = interval(date), + d1 = interval.ceil(date); + return date - d0 < d1 - date ? d0 : d1; + }; + + interval.offset = function(date, step) { + return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; + }; + + interval.range = function(start, stop, step) { + var range = [], previous; + start = interval.ceil(start); + step = step == null ? 1 : Math.floor(step); + if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date + do range.push(previous = new Date(+start)), offseti(start, step), floori(start); + while (previous < start && start < stop); + return range; + }; + + interval.filter = function(test) { + return newInterval(function(date) { + if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); + }, function(date, step) { + if (date >= date) { + if (step < 0) while (++step <= 0) { + while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty + } else while (--step >= 0) { + while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty + } + } + }); + }; + + if (count) { + interval.count = function(start, end) { + t0.setTime(+start), t1.setTime(+end); + floori(t0), floori(t1); + return Math.floor(count(t0, t1)); + }; + + interval.every = function(step) { + step = Math.floor(step); + return !isFinite(step) || !(step > 0) ? null + : !(step > 1) ? interval + : interval.filter(field + ? function(d) { return field(d) % step === 0; } + : function(d) { return interval.count(0, d) % step === 0; }); + }; + } + + return interval; +} + +var durationMinute = 6e4; +var durationDay = 864e5; +var durationWeek = 6048e5; + +var day = newInterval(function(date) { + date.setHours(0, 0, 0, 0); +}, function(date, step) { + date.setDate(date.getDate() + step); +}, function(start, end) { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay; +}, function(date) { + return date.getDate() - 1; +}); + +function weekday(i) { + return newInterval(function(date) { + date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); + date.setHours(0, 0, 0, 0); + }, function(date, step) { + date.setDate(date.getDate() + step * 7); + }, function(start, end) { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek; + }); +} + +var sunday = weekday(0); +var monday = weekday(1); +var tuesday = weekday(2); +var wednesday = weekday(3); +var thursday = weekday(4); +var friday = weekday(5); +var saturday = weekday(6); + +var year = newInterval(function(date) { + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); +}, function(date, step) { + date.setFullYear(date.getFullYear() + step); +}, function(start, end) { + return end.getFullYear() - start.getFullYear(); +}, function(date) { + return date.getFullYear(); +}); + +// An optimized implementation for this simple case. +year.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) { + date.setFullYear(Math.floor(date.getFullYear() / k) * k); + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); + }, function(date, step) { + date.setFullYear(date.getFullYear() + step * k); + }); +}; + +var utcDay = newInterval(function(date) { + date.setUTCHours(0, 0, 0, 0); +}, function(date, step) { + date.setUTCDate(date.getUTCDate() + step); +}, function(start, end) { + return (end - start) / durationDay; +}, function(date) { + return date.getUTCDate() - 1; +}); + +function utcWeekday(i) { + return newInterval(function(date) { + date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); + date.setUTCHours(0, 0, 0, 0); + }, function(date, step) { + date.setUTCDate(date.getUTCDate() + step * 7); + }, function(start, end) { + return (end - start) / durationWeek; + }); +} + +var utcSunday = utcWeekday(0); +var utcMonday = utcWeekday(1); +var utcTuesday = utcWeekday(2); +var utcWednesday = utcWeekday(3); +var utcThursday = utcWeekday(4); +var utcFriday = utcWeekday(5); +var utcSaturday = utcWeekday(6); + +var utcYear = newInterval(function(date) { + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); +}, function(date, step) { + date.setUTCFullYear(date.getUTCFullYear() + step); +}, function(start, end) { + return end.getUTCFullYear() - start.getUTCFullYear(); +}, function(date) { + return date.getUTCFullYear(); +}); + +// An optimized implementation for this simple case. +utcYear.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) { + date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); + }, function(date, step) { + date.setUTCFullYear(date.getUTCFullYear() + step * k); + }); +}; + +function localDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); + date.setFullYear(d.y); + return date; + } + return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); +} + +function utcDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); + date.setUTCFullYear(d.y); + return date; + } + return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); +} + +function newDate(y, m, d) { + return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0}; +} + +function formatLocale(locale) { + var locale_dateTime = locale.dateTime, + locale_date = locale.date, + locale_time = locale.time, + locale_periods = locale.periods, + locale_weekdays = locale.days, + locale_shortWeekdays = locale.shortDays, + locale_months = locale.months, + locale_shortMonths = locale.shortMonths; + + var periodRe = formatRe(locale_periods), + periodLookup = formatLookup(locale_periods), + weekdayRe = formatRe(locale_weekdays), + weekdayLookup = formatLookup(locale_weekdays), + shortWeekdayRe = formatRe(locale_shortWeekdays), + shortWeekdayLookup = formatLookup(locale_shortWeekdays), + monthRe = formatRe(locale_months), + monthLookup = formatLookup(locale_months), + shortMonthRe = formatRe(locale_shortMonths), + shortMonthLookup = formatLookup(locale_shortMonths); + + var formats = { + "a": formatShortWeekday, + "A": formatWeekday, + "b": formatShortMonth, + "B": formatMonth, + "c": null, + "d": formatDayOfMonth, + "e": formatDayOfMonth, + "f": formatMicroseconds, + "g": formatYearISO, + "G": formatFullYearISO, + "H": formatHour24, + "I": formatHour12, + "j": formatDayOfYear, + "L": formatMilliseconds, + "m": formatMonthNumber, + "M": formatMinutes, + "p": formatPeriod, + "q": formatQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatSeconds, + "u": formatWeekdayNumberMonday, + "U": formatWeekNumberSunday, + "V": formatWeekNumberISO, + "w": formatWeekdayNumberSunday, + "W": formatWeekNumberMonday, + "x": null, + "X": null, + "y": formatYear, + "Y": formatFullYear, + "Z": formatZone, + "%": formatLiteralPercent + }; + + var utcFormats = { + "a": formatUTCShortWeekday, + "A": formatUTCWeekday, + "b": formatUTCShortMonth, + "B": formatUTCMonth, + "c": null, + "d": formatUTCDayOfMonth, + "e": formatUTCDayOfMonth, + "f": formatUTCMicroseconds, + "g": formatUTCYearISO, + "G": formatUTCFullYearISO, + "H": formatUTCHour24, + "I": formatUTCHour12, + "j": formatUTCDayOfYear, + "L": formatUTCMilliseconds, + "m": formatUTCMonthNumber, + "M": formatUTCMinutes, + "p": formatUTCPeriod, + "q": formatUTCQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatUTCSeconds, + "u": formatUTCWeekdayNumberMonday, + "U": formatUTCWeekNumberSunday, + "V": formatUTCWeekNumberISO, + "w": formatUTCWeekdayNumberSunday, + "W": formatUTCWeekNumberMonday, + "x": null, + "X": null, + "y": formatUTCYear, + "Y": formatUTCFullYear, + "Z": formatUTCZone, + "%": formatLiteralPercent + }; + + var parses = { + "a": parseShortWeekday, + "A": parseWeekday, + "b": parseShortMonth, + "B": parseMonth, + "c": parseLocaleDateTime, + "d": parseDayOfMonth, + "e": parseDayOfMonth, + "f": parseMicroseconds, + "g": parseYear, + "G": parseFullYear, + "H": parseHour24, + "I": parseHour24, + "j": parseDayOfYear, + "L": parseMilliseconds, + "m": parseMonthNumber, + "M": parseMinutes, + "p": parsePeriod, + "q": parseQuarter, + "Q": parseUnixTimestamp, + "s": parseUnixTimestampSeconds, + "S": parseSeconds, + "u": parseWeekdayNumberMonday, + "U": parseWeekNumberSunday, + "V": parseWeekNumberISO, + "w": parseWeekdayNumberSunday, + "W": parseWeekNumberMonday, + "x": parseLocaleDate, + "X": parseLocaleTime, + "y": parseYear, + "Y": parseFullYear, + "Z": parseZone, + "%": parseLiteralPercent + }; + + // These recursive directive definitions must be deferred. + formats.x = newFormat(locale_date, formats); + formats.X = newFormat(locale_time, formats); + formats.c = newFormat(locale_dateTime, formats); + utcFormats.x = newFormat(locale_date, utcFormats); + utcFormats.X = newFormat(locale_time, utcFormats); + utcFormats.c = newFormat(locale_dateTime, utcFormats); + + function newFormat(specifier, formats) { + return function(date) { + var string = [], + i = -1, + j = 0, + n = specifier.length, + c, + pad, + format; + + if (!(date instanceof Date)) date = new Date(+date); + + while (++i < n) { + if (specifier.charCodeAt(i) === 37) { + string.push(specifier.slice(j, i)); + if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i); + else pad = c === "e" ? " " : "0"; + if (format = formats[c]) c = format(date, pad); + string.push(c); + j = i + 1; + } + } + + string.push(specifier.slice(j, i)); + return string.join(""); + }; + } + + function newParse(specifier, Z) { + return function(string) { + var d = newDate(1900, undefined, 1), + i = parseSpecifier(d, specifier, string += "", 0), + week, day$1; + if (i != string.length) return null; + + // If a UNIX timestamp is specified, return it. + if ("Q" in d) return new Date(d.Q); + if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0)); + + // If this is utcParse, never use the local timezone. + if (Z && !("Z" in d)) d.Z = 0; + + // The am-pm flag is 0 for AM, and 1 for PM. + if ("p" in d) d.H = d.H % 12 + d.p * 12; + + // If the month was not specified, inherit from the quarter. + if (d.m === undefined) d.m = "q" in d ? d.q : 0; + + // Convert day-of-week and week-of-year to day-of-year. + if ("V" in d) { + if (d.V < 1 || d.V > 53) return null; + if (!("w" in d)) d.w = 1; + if ("Z" in d) { + week = utcDate(newDate(d.y, 0, 1)), day$1 = week.getUTCDay(); + week = day$1 > 4 || day$1 === 0 ? utcMonday.ceil(week) : utcMonday(week); + week = utcDay.offset(week, (d.V - 1) * 7); + d.y = week.getUTCFullYear(); + d.m = week.getUTCMonth(); + d.d = week.getUTCDate() + (d.w + 6) % 7; + } else { + week = localDate(newDate(d.y, 0, 1)), day$1 = week.getDay(); + week = day$1 > 4 || day$1 === 0 ? monday.ceil(week) : monday(week); + week = day.offset(week, (d.V - 1) * 7); + d.y = week.getFullYear(); + d.m = week.getMonth(); + d.d = week.getDate() + (d.w + 6) % 7; + } + } else if ("W" in d || "U" in d) { + if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; + day$1 = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); + d.m = 0; + d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day$1 + 5) % 7 : d.w + d.U * 7 - (day$1 + 6) % 7; + } + + // If a time zone is specified, all fields are interpreted as UTC and then + // offset according to the specified time zone. + if ("Z" in d) { + d.H += d.Z / 100 | 0; + d.M += d.Z % 100; + return utcDate(d); + } + + // Otherwise, all fields are in local time. + return localDate(d); + }; + } + + function parseSpecifier(d, specifier, string, j) { + var i = 0, + n = specifier.length, + m = string.length, + c, + parse; + + while (i < n) { + if (j >= m) return -1; + c = specifier.charCodeAt(i++); + if (c === 37) { + c = specifier.charAt(i++); + parse = parses[c in pads ? specifier.charAt(i++) : c]; + if (!parse || ((j = parse(d, string, j)) < 0)) return -1; + } else if (c != string.charCodeAt(j++)) { + return -1; + } + } + + return j; + } + + function parsePeriod(d, string, i) { + var n = periodRe.exec(string.slice(i)); + return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseShortWeekday(d, string, i) { + var n = shortWeekdayRe.exec(string.slice(i)); + return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseWeekday(d, string, i) { + var n = weekdayRe.exec(string.slice(i)); + return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseShortMonth(d, string, i) { + var n = shortMonthRe.exec(string.slice(i)); + return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseMonth(d, string, i) { + var n = monthRe.exec(string.slice(i)); + return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseLocaleDateTime(d, string, i) { + return parseSpecifier(d, locale_dateTime, string, i); + } + + function parseLocaleDate(d, string, i) { + return parseSpecifier(d, locale_date, string, i); + } + + function parseLocaleTime(d, string, i) { + return parseSpecifier(d, locale_time, string, i); + } + + function formatShortWeekday(d) { + return locale_shortWeekdays[d.getDay()]; + } + + function formatWeekday(d) { + return locale_weekdays[d.getDay()]; + } + + function formatShortMonth(d) { + return locale_shortMonths[d.getMonth()]; + } + + function formatMonth(d) { + return locale_months[d.getMonth()]; + } + + function formatPeriod(d) { + return locale_periods[+(d.getHours() >= 12)]; + } + + function formatQuarter(d) { + return 1 + ~~(d.getMonth() / 3); + } + + function formatUTCShortWeekday(d) { + return locale_shortWeekdays[d.getUTCDay()]; + } + + function formatUTCWeekday(d) { + return locale_weekdays[d.getUTCDay()]; + } + + function formatUTCShortMonth(d) { + return locale_shortMonths[d.getUTCMonth()]; + } + + function formatUTCMonth(d) { + return locale_months[d.getUTCMonth()]; + } + + function formatUTCPeriod(d) { + return locale_periods[+(d.getUTCHours() >= 12)]; + } + + function formatUTCQuarter(d) { + return 1 + ~~(d.getUTCMonth() / 3); + } + + return { + format: function(specifier) { + var f = newFormat(specifier += "", formats); + f.toString = function() { return specifier; }; + return f; + }, + parse: function(specifier) { + var p = newParse(specifier += "", false); + p.toString = function() { return specifier; }; + return p; + }, + utcFormat: function(specifier) { + var f = newFormat(specifier += "", utcFormats); + f.toString = function() { return specifier; }; + return f; + }, + utcParse: function(specifier) { + var p = newParse(specifier += "", true); + p.toString = function() { return specifier; }; + return p; + } + }; +} + +var pads = {"-": "", "_": " ", "0": "0"}, + numberRe = /^\s*\d+/, // note: ignores next directive + percentRe = /^%/, + requoteRe = /[\\^$*+?|[\]().{}]/g; + +function pad(value, fill, width) { + var sign = value < 0 ? "-" : "", + string = (sign ? -value : value) + "", + length = string.length; + return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); +} + +function requote(s) { + return s.replace(requoteRe, "\\$&"); +} + +function formatRe(names) { + return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); +} + +function formatLookup(names) { + var map = {}, i = -1, n = names.length; + while (++i < n) map[names[i].toLowerCase()] = i; + return map; +} + +function parseWeekdayNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.w = +n[0], i + n[0].length) : -1; +} + +function parseWeekdayNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.u = +n[0], i + n[0].length) : -1; +} + +function parseWeekNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.U = +n[0], i + n[0].length) : -1; +} + +function parseWeekNumberISO(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.V = +n[0], i + n[0].length) : -1; +} + +function parseWeekNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.W = +n[0], i + n[0].length) : -1; +} + +function parseFullYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 4)); + return n ? (d.y = +n[0], i + n[0].length) : -1; +} + +function parseYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; +} + +function parseZone(d, string, i) { + var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); + return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; +} + +function parseQuarter(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; +} + +function parseMonthNumber(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.m = n[0] - 1, i + n[0].length) : -1; +} + +function parseDayOfMonth(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.d = +n[0], i + n[0].length) : -1; +} + +function parseDayOfYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; +} + +function parseHour24(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.H = +n[0], i + n[0].length) : -1; +} + +function parseMinutes(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.M = +n[0], i + n[0].length) : -1; +} + +function parseSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.S = +n[0], i + n[0].length) : -1; +} + +function parseMilliseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.L = +n[0], i + n[0].length) : -1; +} + +function parseMicroseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 6)); + return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; +} + +function parseLiteralPercent(d, string, i) { + var n = percentRe.exec(string.slice(i, i + 1)); + return n ? i + n[0].length : -1; +} + +function parseUnixTimestamp(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.Q = +n[0], i + n[0].length) : -1; +} + +function parseUnixTimestampSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.s = +n[0], i + n[0].length) : -1; +} + +function formatDayOfMonth(d, p) { + return pad(d.getDate(), p, 2); +} + +function formatHour24(d, p) { + return pad(d.getHours(), p, 2); +} + +function formatHour12(d, p) { + return pad(d.getHours() % 12 || 12, p, 2); +} + +function formatDayOfYear(d, p) { + return pad(1 + day.count(year(d), d), p, 3); +} + +function formatMilliseconds(d, p) { + return pad(d.getMilliseconds(), p, 3); +} + +function formatMicroseconds(d, p) { + return formatMilliseconds(d, p) + "000"; +} + +function formatMonthNumber(d, p) { + return pad(d.getMonth() + 1, p, 2); +} + +function formatMinutes(d, p) { + return pad(d.getMinutes(), p, 2); +} + +function formatSeconds(d, p) { + return pad(d.getSeconds(), p, 2); +} + +function formatWeekdayNumberMonday(d) { + var day = d.getDay(); + return day === 0 ? 7 : day; +} + +function formatWeekNumberSunday(d, p) { + return pad(sunday.count(year(d) - 1, d), p, 2); +} + +function dISO(d) { + var day = d.getDay(); + return (day >= 4 || day === 0) ? thursday(d) : thursday.ceil(d); +} + +function formatWeekNumberISO(d, p) { + d = dISO(d); + return pad(thursday.count(year(d), d) + (year(d).getDay() === 4), p, 2); +} + +function formatWeekdayNumberSunday(d) { + return d.getDay(); +} + +function formatWeekNumberMonday(d, p) { + return pad(monday.count(year(d) - 1, d), p, 2); +} + +function formatYear(d, p) { + return pad(d.getFullYear() % 100, p, 2); +} + +function formatYearISO(d, p) { + d = dISO(d); + return pad(d.getFullYear() % 100, p, 2); +} + +function formatFullYear(d, p) { + return pad(d.getFullYear() % 10000, p, 4); +} + +function formatFullYearISO(d, p) { + var day = d.getDay(); + d = (day >= 4 || day === 0) ? thursday(d) : thursday.ceil(d); + return pad(d.getFullYear() % 10000, p, 4); +} + +function formatZone(d) { + var z = d.getTimezoneOffset(); + return (z > 0 ? "-" : (z *= -1, "+")) + + pad(z / 60 | 0, "0", 2) + + pad(z % 60, "0", 2); +} + +function formatUTCDayOfMonth(d, p) { + return pad(d.getUTCDate(), p, 2); +} + +function formatUTCHour24(d, p) { + return pad(d.getUTCHours(), p, 2); +} + +function formatUTCHour12(d, p) { + return pad(d.getUTCHours() % 12 || 12, p, 2); +} + +function formatUTCDayOfYear(d, p) { + return pad(1 + utcDay.count(utcYear(d), d), p, 3); +} + +function formatUTCMilliseconds(d, p) { + return pad(d.getUTCMilliseconds(), p, 3); +} + +function formatUTCMicroseconds(d, p) { + return formatUTCMilliseconds(d, p) + "000"; +} + +function formatUTCMonthNumber(d, p) { + return pad(d.getUTCMonth() + 1, p, 2); +} + +function formatUTCMinutes(d, p) { + return pad(d.getUTCMinutes(), p, 2); +} + +function formatUTCSeconds(d, p) { + return pad(d.getUTCSeconds(), p, 2); +} + +function formatUTCWeekdayNumberMonday(d) { + var dow = d.getUTCDay(); + return dow === 0 ? 7 : dow; +} + +function formatUTCWeekNumberSunday(d, p) { + return pad(utcSunday.count(utcYear(d) - 1, d), p, 2); +} + +function UTCdISO(d) { + var day = d.getUTCDay(); + return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d); +} + +function formatUTCWeekNumberISO(d, p) { + d = UTCdISO(d); + return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2); +} + +function formatUTCWeekdayNumberSunday(d) { + return d.getUTCDay(); +} + +function formatUTCWeekNumberMonday(d, p) { + return pad(utcMonday.count(utcYear(d) - 1, d), p, 2); +} + +function formatUTCYear(d, p) { + return pad(d.getUTCFullYear() % 100, p, 2); +} + +function formatUTCYearISO(d, p) { + d = UTCdISO(d); + return pad(d.getUTCFullYear() % 100, p, 2); +} + +function formatUTCFullYear(d, p) { + return pad(d.getUTCFullYear() % 10000, p, 4); +} + +function formatUTCFullYearISO(d, p) { + var day = d.getUTCDay(); + d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d); + return pad(d.getUTCFullYear() % 10000, p, 4); +} + +function formatUTCZone() { + return "+0000"; +} + +function formatLiteralPercent() { + return "%"; +} + +function formatUnixTimestamp(d) { + return +d; +} + +function formatUnixTimestampSeconds(d) { + return Math.floor(+d / 1000); +} + +var locale; +var timeFormat; +var timeParse; +var utcFormat; +var utcParse; + +defaultLocale({ + dateTime: "%x, %X", + date: "%-m/%-d/%Y", + time: "%-I:%M:%S %p", + periods: ["AM", "PM"], + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] +}); + +function defaultLocale(definition) { + locale = formatLocale(definition); + timeFormat = locale.format; + timeParse = locale.parse; + utcFormat = locale.utcFormat; + utcParse = locale.utcParse; + return locale; +} + +function notAStringError(not_a_str) { + throw new TypeError("Expected a value of type string but got a value of type " + (typeof not_a_str)); +} + + +function shield(func) { + return function(str) { + if (typeof str !== "string") notAStringError(str); + str = str.trim(); + return str ? func(str) : null; + }; +} + +var EXAMPLE_DATETIME = new Date(1972, 3, 27, 19, 45, 5); // End of Apollo 16 mission + +var CUSTOM_FORMAT_REGEXES = { + // Regexes matching dates where the month would commonly be written with 4-letters + // e.g. Sept 21, june 09, July 7 + "%b %d": [ + { + regex: /^june\s(30|[12][0-9]|0?[1-9])$/i, // matches dates from June 0-30 + toDate: function(str) { return new Date(null, 5, str.split(/\s/)[1]); }, + }, + { + regex: /^july\s(3[01]|[12][0-9]|0?[1-9])$/i, // matches dates from July 0-31 + toDate: function(str) { return new Date(null, 6, str.split(/\s/)[1]); }, + }, + { + regex: /^sept\s(30|[12][0-9]|0?[1-9])$/i, // matches dates from September 0-30 using the 4-letter 'Sept' abbreviation + toDate: function(str) { return new Date(null, 8, str.split(/\s/)[1]); }, + }, + ], + // Regexes matching dates where the month would commonly be written with 4-letters + // e.g. 21 Sept, 09 june, 7 July + "%d %b": [ + { + regex: /^(0?[1-9]|[1-9][0-9])\sjune$/i, // matches dates from 0-99 June + toDate: function(str) { return new Date(null, 5, str.split(/\s/)[0]); }, + }, + { + regex: /^(0?[1-9]|[1-9][0-9])\sjuly$/i, // matches dates from 0-99 July + toDate: function(str) { return new Date(null, 6, str.split(/\s/)[0]); }, + }, + { + regex: /^(0?[1-9]|[1-9][0-9])\ssept$/i, // matches dates from 0-99 September using the 4-letter 'Sept' abbreviation + toDate: function(str) { return new Date(null, 8, str.split(/\s/)[0]); }, + }, + ], +}; + + +// Checks a string against datetime regexes for different strftime date formats so that +// non-standard datetime strings can still be parsed as dates by d3-time-parse +function customDatetimeParser(strftime_formats) { + return function(str) { + var parsed_datetime = null; + strftime_formats.forEach(function(strftime_format) { + var valid_datetime = str.match(strftime_format.regex); + if (valid_datetime) parsed_datetime = strftime_format.toDate(str); + }); + return parsed_datetime; + }; +} + +function createDatetimeInterpretation(format_string, secondaryTest) { + var parser = utcParse(format_string); + var formatter = utcFormat(format_string); + var test; + if (typeof secondaryTest === "function") { + test = shield(function(str) { + return (secondaryTest(str, parser(str) !== null)); + }); + } + else { + test = shield(function(str) { return parser(str) !== null; }); + } + + return Object.freeze({ + test: test, + parse: shield(function(str) { + return parser(str) || (CUSTOM_FORMAT_REGEXES[format_string] ? customDatetimeParser(CUSTOM_FORMAT_REGEXES[format_string])(str) : null); + }), + format: function(dt) { return formatter(dt); }, + type: "datetime", + description: format_string, + id: "datetime$" + format_string, + example: formatter(EXAMPLE_DATETIME) + }); +} + +var datetime_interpretations = Object.freeze([ + createDatetimeInterpretation("%Y-%m-%dT%H:%M:%S.%LZ"), // 1972-04-27T10:10:10.303Z + createDatetimeInterpretation("%Y-%m-%d %H:%M:%S"), // 1972-04-27 07:45:05 + createDatetimeInterpretation("%Y-%m-%dT%H:%M:%S"), // 1972-04-27T07:45:05 + createDatetimeInterpretation("%Y-%m-%dT%H:%M:%SZ"), // 1972-04-27T10:10:10Z + + createDatetimeInterpretation("%d/%m/%Y", function(str, passed_primary_test) { // 27/04/1972 + if (!passed_primary_test) return false; + var arr = str.split("/").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] >= 1000); + }), + createDatetimeInterpretation("%d/%m/%Y %H:%M", function(str, passed_primary_test) { // 27/04/1972 19:45 + if (!passed_primary_test) return false; + var arr = str.split(/[/ :]/).map(parseFloat); + return (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] >= 1000) && + (arr[3] >= 0 && arr[3] < 24) && (arr[4] >= 0 && arr[4] < 60); + }), + createDatetimeInterpretation("%d/%m/%y", function(str, passed_primary_test) { // 27/04/72 + if (!passed_primary_test) return false; + var arr = str.split("/").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (!isNaN(arr[2])); + }), + createDatetimeInterpretation("%m/%d/%Y", function(str, passed_primary_test) { // 04/27/1972 + if (!passed_primary_test) return false; + var arr = str.split("/").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (arr[2] >= 1000); + }), + createDatetimeInterpretation("%m/%d/%Y %H:%M", function(str, passed_primary_test) { // 04/27/1972 19:45 + if (!passed_primary_test) return false; + var arr = str.split(/[/ :]/).map(parseFloat); + return (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (arr[2] >= 1000) && + (arr[3] >= 0 && arr[3] < 24) && (arr[4] >= 0 && arr[4] < 60); + }), + createDatetimeInterpretation("%m/%d/%y", function(str, passed_primary_test) { // 04/27/72 + if (!passed_primary_test) return false; + var arr = str.split("/").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (!isNaN(arr[2])); + }), + createDatetimeInterpretation("%Y/%m/%d", function(str, passed_primary_test) { // 1972/04/27 + if (!passed_primary_test) return false; + var arr = str.split("/").map(parseFloat); + return (arr[0] >= 1000) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] > 0 && arr[2] <= 31); + }), + + createDatetimeInterpretation("%d-%m-%Y", function(str, passed_primary_test) { // 27-04-1972 + if (!passed_primary_test) return false; + var arr = str.split("-").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] >= 1000); + }), + createDatetimeInterpretation("%d-%m-%y", function(str, passed_primary_test) { // 27-04-72 + if (!passed_primary_test) return false; + var arr = str.split("-").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (!isNaN(arr[2])); + }), + + createDatetimeInterpretation("%d.%m.%Y", function(str, passed_primary_test) { // 27.04.1972 + if (!passed_primary_test) return false; + + var arr = str.split(".").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] >= 1000); + }), + + createDatetimeInterpretation("%m.%d.%y", function(str, passed_primary_test) { // 04.27.72 + if (!passed_primary_test) return false; + + var arr = str.split(".").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (!isNaN(arr[2])); + }), + + createDatetimeInterpretation("%m-%d-%Y", function(str, passed_primary_test) { // 04-27-1972 + if (!passed_primary_test) return false; + var arr = str.split("-").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (arr[2] >= 1000); + }), + createDatetimeInterpretation("%m-%d-%y", function(str, passed_primary_test) { // 04-27-72 + if (!passed_primary_test) return false; + var arr = str.split("-").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (!isNaN(arr[2])); + }), + createDatetimeInterpretation("%Y-%m-%d", function(str, passed_primary_test) { // 1972-04-27 + if (!passed_primary_test) return false; + var arr = str.split("-").map(parseFloat); + return (arr[0] >= 1000) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] > 0 && arr[2] <= 31); + }), + createDatetimeInterpretation("%Y-%m", function(str, passed_primary_test) { // 1972-04 + if (!passed_primary_test) return false; + var arr = str.split("-").map(parseFloat); + return (arr[0] >= 1000) && (arr[1] > 0 && arr[1] <= 12); + }), + + createDatetimeInterpretation("%d %b %Y", function(str, passed_primary_test) { // 27 Apr 1972 + if (!passed_primary_test) return false; + var arr = str.split(" ").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 31) && (arr[2] >= 1000); + }), + createDatetimeInterpretation("%d %B %Y", function(str, passed_primary_test) { // 27 April 1972 + if (!passed_primary_test) return false; + var arr = str.split(" ").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 31) && (arr[2] >= 1000); + }), + createDatetimeInterpretation("%d %b %y"), // 27 Apr 72 + createDatetimeInterpretation("%-d %b ’%y"), // 27 Apr ’72 + createDatetimeInterpretation("%d %B %y"), // 27 April 72 + createDatetimeInterpretation("%d-%b-%Y", function(str, passed_primary_test) { // 27-Apr-1972 + if (!passed_primary_test) return false; + var arr = str.split("-").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 31) && (arr[2] >= 1000); + }), + createDatetimeInterpretation("%d-%B-%Y", function(str, passed_primary_test) { // 27-April-1972 + if (!passed_primary_test) return false; + var arr = str.split("-").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 31) && (arr[2] >= 1000); + }), + createDatetimeInterpretation("%d-%b-%y"), // 27-Apr-72 + createDatetimeInterpretation("%d-%B-%y"), // 27-April-72 + + createDatetimeInterpretation("%m/%Y", function(str, passed_primary_test) { // 04/1972 + if (!passed_primary_test) return false; + var arr = str.split("/").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 12) && (arr[1] >= 1000); + }), + createDatetimeInterpretation("%m/%y"), // 04/72 + createDatetimeInterpretation("%b %Y", function(str, passed_primary_test) { // Apr 1972 + if (!passed_primary_test) return false; + var arr = str.split(" ").map(parseFloat); + return (arr[1] >= 1000); + }), + createDatetimeInterpretation("%B %Y", function(str, passed_primary_test) { // April 1972 + if (!passed_primary_test) return false; + var arr = str.split(" ").map(parseFloat); + return (arr[1] >= 1000); + }), + createDatetimeInterpretation("%b-%y"), // Apr-72 + createDatetimeInterpretation("%b %y"), // Apr 72 + createDatetimeInterpretation("%B %y"), // April 72 + createDatetimeInterpretation("%b '%y"), // Apr '72 + createDatetimeInterpretation("%B %-d %Y"), // April 27 1972 + + createDatetimeInterpretation("%d %b", function(str, passed_primary_test) { + if (passed_primary_test) return true; + return !!customDatetimeParser(CUSTOM_FORMAT_REGEXES["%d %b"])(str); + }), + createDatetimeInterpretation("%d %B"), // 27 April + createDatetimeInterpretation("%b %d", function(str, passed_primary_test) { + if (passed_primary_test) return true; + return !!customDatetimeParser(CUSTOM_FORMAT_REGEXES["%b %d"])(str); + }), + createDatetimeInterpretation("%B %d"), // April 27 + createDatetimeInterpretation("%d-%m", function(str, passed_primary_test) { // 27-04 + if (!passed_primary_test) return false; + var arr = str.split("-").map(parseFloat); + return (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12); + }), + createDatetimeInterpretation("%m-%d"), // 04-27 + createDatetimeInterpretation("%d/%m"), // 27/04 + createDatetimeInterpretation("%m/%d"), // 04/27 + createDatetimeInterpretation("%b %d %Y"), // Apr 27 1972 + createDatetimeInterpretation("%b %d %Y, %-I.%M%p"), // Apr 27 1972, 5.30PM + + createDatetimeInterpretation("%Y", function(str, passed_primary_test) { // 1972 + if (!passed_primary_test) return false; + var val = parseFloat(str); + return val > 1499 && val < 2200; + }), + createDatetimeInterpretation("%B"), // April + createDatetimeInterpretation("%b"), // Apr + + createDatetimeInterpretation("%X"), // 7:45:05 PM + createDatetimeInterpretation("%I:%M %p"), // 07:45 PM + createDatetimeInterpretation("%-I.%M%p"), // 7.45PM + createDatetimeInterpretation("%H:%M", function(str, passed_primary_test) { // 19:45 + if (!passed_primary_test) return false; + var arr = str.split(":").map(parseFloat); + return arr[0] >= 0 && arr[0] < 24; + }), + createDatetimeInterpretation("%H:%M:%S"), // 19:45:05 + createDatetimeInterpretation("%M:%S"), // 45:05 + createDatetimeInterpretation("%-I%p"), // 7PM + + createDatetimeInterpretation("Q%q %Y", function(str, passed_primary_test) { // Q2 1972 + if (!passed_primary_test) return false; + return str.replace(/\s/g, "").length === 6; + }), + createDatetimeInterpretation("%Y Q%q", function(str, passed_primary_test) { // 1972 Q2 + if (!passed_primary_test) return false; + return str.replace(/\s/g, "").length === 6; + }) +]); + +function formatDecimal(x) { + return Math.abs(x = Math.round(x)) >= 1e21 + ? x.toLocaleString("en").replace(/,/g, "") + : x.toString(10); +} + +// Computes the decimal coefficient and exponent of the specified number x with +// significant digits p, where x is positive and p is in [1, 21] or undefined. +// For example, formatDecimalParts(1.23) returns ["123", 0]. +function formatDecimalParts(x, p) { + if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity + var i, coefficient = x.slice(0, i); + + // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ + // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). + return [ + coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, + +x.slice(i + 1) + ]; +} + +function exponent(x) { + return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN; +} + +function formatGroup(grouping, thousands) { + return function(value, width) { + var i = value.length, + t = [], + j = 0, + g = grouping[0], + length = 0; + + while (i > 0 && g > 0) { + if (length + g + 1 > width) g = Math.max(1, width - length); + t.push(value.substring(i -= g, i + g)); + if ((length += g + 1) > width) break; + g = grouping[j = (j + 1) % grouping.length]; + } + + return t.reverse().join(thousands); + }; +} + +function formatNumerals(numerals) { + return function(value) { + return value.replace(/[0-9]/g, function(i) { + return numerals[+i]; + }); + }; +} + +// [[fill]align][sign][symbol][0][width][,][.precision][~][type] +var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; + +function formatSpecifier(specifier) { + if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); + var match; + return new FormatSpecifier({ + fill: match[1], + align: match[2], + sign: match[3], + symbol: match[4], + zero: match[5], + width: match[6], + comma: match[7], + precision: match[8] && match[8].slice(1), + trim: match[9], + type: match[10] + }); +} + +formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof + +function FormatSpecifier(specifier) { + this.fill = specifier.fill === undefined ? " " : specifier.fill + ""; + this.align = specifier.align === undefined ? ">" : specifier.align + ""; + this.sign = specifier.sign === undefined ? "-" : specifier.sign + ""; + this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + ""; + this.zero = !!specifier.zero; + this.width = specifier.width === undefined ? undefined : +specifier.width; + this.comma = !!specifier.comma; + this.precision = specifier.precision === undefined ? undefined : +specifier.precision; + this.trim = !!specifier.trim; + this.type = specifier.type === undefined ? "" : specifier.type + ""; +} + +FormatSpecifier.prototype.toString = function() { + return this.fill + + this.align + + this.sign + + this.symbol + + (this.zero ? "0" : "") + + (this.width === undefined ? "" : Math.max(1, this.width | 0)) + + (this.comma ? "," : "") + + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) + + (this.trim ? "~" : "") + + this.type; +}; + +// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. +function formatTrim(s) { + out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { + switch (s[i]) { + case ".": i0 = i1 = i; break; + case "0": if (i0 === 0) i0 = i; i1 = i; break; + default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break; + } + } + return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; +} + +var prefixExponent; + +function formatPrefixAuto(x, p) { + var d = formatDecimalParts(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1], + i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, + n = coefficient.length; + return i === n ? coefficient + : i > n ? coefficient + new Array(i - n + 1).join("0") + : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) + : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y! +} + +function formatRounded(x, p) { + var d = formatDecimalParts(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1]; + return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient + : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) + : coefficient + new Array(exponent - coefficient.length + 2).join("0"); +} + +var formatTypes = { + "%": function(x, p) { return (x * 100).toFixed(p); }, + "b": function(x) { return Math.round(x).toString(2); }, + "c": function(x) { return x + ""; }, + "d": formatDecimal, + "e": function(x, p) { return x.toExponential(p); }, + "f": function(x, p) { return x.toFixed(p); }, + "g": function(x, p) { return x.toPrecision(p); }, + "o": function(x) { return Math.round(x).toString(8); }, + "p": function(x, p) { return formatRounded(x * 100, p); }, + "r": formatRounded, + "s": formatPrefixAuto, + "X": function(x) { return Math.round(x).toString(16).toUpperCase(); }, + "x": function(x) { return Math.round(x).toString(16); } +}; + +function identity(x) { + return x; +} + +var map = Array.prototype.map, + prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]; + +function formatLocale$1(locale) { + var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""), + currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "", + currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "", + decimal = locale.decimal === undefined ? "." : locale.decimal + "", + numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)), + percent = locale.percent === undefined ? "%" : locale.percent + "", + minus = locale.minus === undefined ? "-" : locale.minus + "", + nan = locale.nan === undefined ? "NaN" : locale.nan + ""; + + function newFormat(specifier) { + specifier = formatSpecifier(specifier); + + var fill = specifier.fill, + align = specifier.align, + sign = specifier.sign, + symbol = specifier.symbol, + zero = specifier.zero, + width = specifier.width, + comma = specifier.comma, + precision = specifier.precision, + trim = specifier.trim, + type = specifier.type; + + // The "n" type is an alias for ",g". + if (type === "n") comma = true, type = "g"; + + // The "" type, and any invalid type, is an alias for ".12~g". + else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g"; + + // If zero fill is specified, padding goes after sign and before digits. + if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "="; + + // Compute the prefix and suffix. + // For SI-prefix, the suffix is lazily computed. + var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", + suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; + + // What format function should we use? + // Is this an integer type? + // Can this type generate exponential notation? + var formatType = formatTypes[type], + maybeSuffix = /[defgprs%]/.test(type); + + // Set the default precision if not specified, + // or clamp the specified precision to the supported range. + // For significant precision, it must be in [1, 21]. + // For fixed precision, it must be in [0, 20]. + precision = precision === undefined ? 6 + : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) + : Math.max(0, Math.min(20, precision)); + + function format(value) { + var valuePrefix = prefix, + valueSuffix = suffix, + i, n, c; + + if (type === "c") { + valueSuffix = formatType(value) + valueSuffix; + value = ""; + } else { + value = +value; + + // Determine the sign. -0 is not less than 0, but 1 / -0 is! + var valueNegative = value < 0 || 1 / value < 0; + + // Perform the initial formatting. + value = isNaN(value) ? nan : formatType(Math.abs(value), precision); + + // Trim insignificant zeros. + if (trim) value = formatTrim(value); + + // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign. + if (valueNegative && +value === 0 && sign !== "+") valueNegative = false; + + // Compute the prefix and suffix. + valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; + valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); + + // Break the formatted value into the integer “value” part that can be + // grouped, and fractional or exponential “suffix” part that is not. + if (maybeSuffix) { + i = -1, n = value.length; + while (++i < n) { + if (c = value.charCodeAt(i), 48 > c || c > 57) { + valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; + value = value.slice(0, i); + break; + } + } + } + } + + // If the fill character is not "0", grouping is applied before padding. + if (comma && !zero) value = group(value, Infinity); + + // Compute the padding. + var length = valuePrefix.length + value.length + valueSuffix.length, + padding = length < width ? new Array(width - length + 1).join(fill) : ""; + + // If the fill character is "0", grouping is applied after padding. + if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; + + // Reconstruct the final output based on the desired alignment. + switch (align) { + case "<": value = valuePrefix + value + valueSuffix + padding; break; + case "=": value = valuePrefix + padding + value + valueSuffix; break; + case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break; + default: value = padding + valuePrefix + value + valueSuffix; break; + } + + return numerals(value); + } + + format.toString = function() { + return specifier + ""; + }; + + return format; + } + + function formatPrefix(specifier, value) { + var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), + e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3, + k = Math.pow(10, -e), + prefix = prefixes[8 + e / 3]; + return function(value) { + return f(k * value) + prefix; + }; + } + + return { + format: newFormat, + formatPrefix: formatPrefix + }; +} + +function getFormatFunction(interp) { + var decimal = interp.decimal_mark; + var thousands = interp.thousand_separator; + var locale = formatLocale$1({decimal: decimal, thousands: thousands, grouping: [3], currency: ["", ""]}); + var format, specifier; + + return function(value, spec) { + if (value === null) return ""; + if (!spec) spec = ",.2f"; + if (spec !== specifier) { + specifier = spec; + format = locale.format(specifier); + } + return format(value); + }; +} + + +// https://stackoverflow.com/a/16148273 +var comma_point = { + test: shield(function(str) { return /^(\+|-)?\d{1,3}(,\d{3})*(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(str.trim()); }), + parse: shield(function(str) { return parseFloat(str.replace(/,/g, "")); }), + description: "Comma thousand separator, point decimal mark", + thousand_separator: ",", + decimal_mark: ".", + id: "number$comma_point", + example: "12,235.56" +}; + +var space_point = { + test: shield(function(str) { return /^(\+|-)?\d{1,3}(\s\d{3})*(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(str.trim()); }), + parse: shield(function(str) { return parseFloat(str.replace(/\s/g, "")); }), + description: "Space thousand separator, point decimal mark", + thousand_separator: " ", + decimal_mark: ".", + id: "number$space_point", + example: "12 235.56" +}; + +var none_point = { + test: shield(function(str) { return /^(\+|-)?\d+(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(str.trim()); }), + parse: shield(function(str) { return parseFloat(str); }), + description: "No thousand separator, point decimal mark", + thousand_separator: "", + decimal_mark: ".", + id: "number$none_point", + example: "12235.56" +}; + + +var point_comma = { + test: shield(function(str) { return /^(\+|-)?\d{1,3}(\.\d{3})*(,\d+)?((e|E)(\+|-)?\d+)?$/.test(str.trim()); }), + parse: shield(function(str) { return parseFloat(str.replace(/\./g, "").replace(/,/, ".")); }), + description: "Point thousand separator, comma decimal mark", + thousand_separator: ".", + decimal_mark: ",", + id: "number$point_comma", + example: "12.235,56" +}; + +var space_comma = { + test: shield(function(str) { return /^(\+|-)?\d{1,3}(\s\d{3})*(,\d+)?((e|E)(\+|-)?\d+)?$/.test(str.trim()); }), + parse: shield(function(str) { return parseFloat(str.replace(/\s/g, "").replace(/,/, ".")); }), + description: "Space thousand separator, comma decimal mark", + thousand_separator: " ", + decimal_mark: ",", + id: "number$space_comma", + example: "12 235,56" +}; + +var none_comma = { + test: shield(function(str) { return /^(\+|-)?\d+(,\d+)?((e|E)(\+|-)?\d+)?$/.test(str.trim()); }), + parse: shield(function(str) { return parseFloat(str.replace(/,/, ".")); }), + description: "No thousand separator, comma decimal mark", + thousand_separator: "", + decimal_mark: ",", + id: "number$none_comma", + example: "12235,56" +}; + + +var number_interpretations = Object.freeze([ + comma_point, + space_point, + point_comma, + space_comma, + none_point, + none_comma +]); + +number_interpretations.forEach(function(interp) { + interp.type = "number"; + interp.format = getFormatFunction(interp); + Object.freeze(interp); +}); + +var string_interpretation = Object.freeze({ + test: function(str) { return typeof str === "string" ? true : notAStringError(str); }, + parse: function(str) { return typeof str === "string" ? str : notAStringError(str); }, + format: function(str) { if (typeof str === "string") return str; }, + type: "string", + description: "Arbitrary string", + id: "string$arbitrary_string" +}); + +var INTERPRETATION_OPTIONS = Object.freeze({ + datetime: datetime_interpretations, + number: number_interpretations, +}); + +var DEFAULT_INTERPRETATIONS_ARRAY = Object.freeze([ "datetime", "number", "string" ]); + +var DEFAULT_OPTIONS = Object.freeze({ + n_max: 250, + n_failing_values: 0, + failure_fraction: 5 / 100, + sort: true +}); + +var OPTION_KEYS = Object.freeze(Object.keys(DEFAULT_OPTIONS)); + + +function snakeToCamel(snake_string) { + return snake_string.replace(/_(\w)/g, function(match, capture) { + return capture.toUpperCase(); + }); +} + + +function noSort(a, b) { return a.index - b.index; } +function sortBySuccess(a, b) { return b.n_success - a.n_success || noSort(a, b); } + + +function trim(value) { + return ("" + value).trim(); +} + + +function createAccessorFunction(accessor) { + if (accessor === undefined) return function(value) { return trim(value); }; + if (typeof accessor === "function") return function(value, index) { return trim(accessor(value, index)); }; + return function(value) { return trim(value["" + accessor]); }; +} + + +function createInterpreter(interpretations_array) { + if (!interpretations_array) interpretations_array = DEFAULT_INTERPRETATIONS_ARRAY; + else if (!Array.isArray(interpretations_array)) interpretations_array = [interpretations_array]; + + var interpretations = interpretations_array.reduce(function(arr, interp_string) { + var interps = INTERPRETATION_OPTIONS[interp_string]; + if (interps) Array.prototype.push.apply(arr, interps); + return arr; + }, []); + + var include_string = interpretations_array.indexOf("string") !== -1; + + var options = OPTION_KEYS.reduce(function(obj, key) { + obj[key] = DEFAULT_OPTIONS[key]; + return obj; + }, {}); + + var interpreter = function(input_array, accessor) { + accessor = createAccessorFunction(accessor); + var data = input_array.map(accessor).filter(function(x) { return x; }); + if (!data.length) return include_string ? [string_interpretation] : []; + var n = Math.min(options.n_max, data.length); + var n_max_failure = Math.floor(n * options.failure_fraction); + var n_failing_values = options.n_failing_values; + var sortMethod = options.sort ? sortBySuccess : noSort; + + var valid_interpreters = interpretations.slice() + .reduce(function(keep, interp, index) { + var n_fail = i = 0; + var failing_values = []; + var complete_failure = false; + + for (var i = 0; i < n; i++) { + var val = data[i]; + var is_valid = interp.test(val); + if (is_valid) continue; + if (++n_fail > n_max_failure) complete_failure = true; + else if (failing_values.indexOf(val) === -1) { + failing_values.push(val); + if (failing_values.length > n_failing_values) complete_failure = true; + } + if (complete_failure) break; + } + + if (!complete_failure) keep.push({ interp: interp, n_success: n - n_fail, index: index }); + + return keep; + }, []) + .sort(sortMethod) + .map(function(valid) { + return valid.interp; + }); + + if (include_string) valid_interpreters.push(string_interpretation); + + return valid_interpreters; + }; + + OPTION_KEYS.forEach(function(option) { + interpreter[snakeToCamel(option)] = function(value) { + if (value === undefined) return options[option]; + options[option] = value; + return interpreter; + }; + }); + + return interpreter; +} + + +createInterpreter.DATETIME_IDS = Object.freeze(datetime_interpretations.map(function(d) { return d.id; })); +createInterpreter.NUMBER_IDS = Object.freeze(number_interpretations.map(function(d) { return d.id; })); +createInterpreter.STRING_IDS = Object.freeze([string_interpretation.id]); + + +createInterpreter.getInterpretation = (function() { + var interpretations = datetime_interpretations.concat(number_interpretations, string_interpretation); + var lookup = interpretations.reduce(function(l, d) { l[d.id] = d; return l; }, {}); + return function(id) { return lookup[id]; }; +})(); + + +createInterpreter._createAccessorFunction = createAccessorFunction; + +/* * * * * * GENERATED FILE - DO NOT EDIT * * * * * * + * * * * * * GENERATED FILE - DO NOT EDIT * * * * * * + * * * * * * GENERATED FILE - DO NOT EDIT * * * * * */ + +var localizations = { + "de": { + credits: { + "default": "Erstellt mit Flourish", + }, + }, + "en": { + credits: { + "default": { text: "A Flourish data visualization", url: "https://flourish.studio/" }, + "annotator": { text: "Interactive content by Flourish", url: "https://app.flourish.studio/@flourish/svg-annotator" }, + "bar-chart-race": { text: "A Flourish bar chart race", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bubble-chart": { text: "A Flourish bubble chart", url: "https://flourish.studio/blog/introducing-bubble-chart-template/" }, + "cards": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/cards-template/" }, + "chart": { text: "A Flourish chart", url: "https://flourish.studio/visualisations/line-bar-pie-charts/" }, + "chord": { text: "A Flourish chord diagram", url: "https://flourish.studio/blog/how-to-make-a-chord-diagram/" }, + "countdown": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/number-ticker-countdown-templates/" }, + "data-explorer": { text: "A Flourish data explorer", url: "https://flourish.studio/blog/data-explorer-template/" }, + "draw": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/draw-the-line-chart/" }, + "election": { text: "A Flourish election chart", url: "https://app.flourish.studio/@flourish/election-results-chart" }, + "gantt": { text: "A Flourish gantt chart", url: "https://flourish.studio/blog/gantt-chart-template/" }, + "gauge": { text: "A Flourish gauge visualization", url: "https://flourish.studio/visualisations/gauge/" }, + "globe": { text: "A Flourish connections globe", url: "https://flourish.studio/visualisations/maps/" }, + "heatmap": { text: "A Flourish heatmap", url: "https://flourish.studio/visualisations/heatmaps/" }, + "hierarchy": { text: "A Flourish hierarchy chart", url: "https://flourish.studio/visualisations/treemaps/" }, + "map": { text: "A Flourish map", url: "https://flourish.studio/visualisations/maps/" }, + "marimekko": { text: "A Flourish marimekko chart", url: "https://flourish.studio/visualisations/marimekko-charts/" }, + "model": { text: "Interactive content by Flourish", url: "https://app.flourish.studio/@flourish/3d-viewer" }, + "network": { text: "A Flourish network chart", url: "https://flourish.studio/visualisations/network-charts/" }, + "number-ticker": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/number-ticker-countdown-templates/" }, + "parliament": { text: "A Flourish election chart", url: "https://flourish.studio/blog/how-to-make-parliament-chart/" }, + "photo-slider": { text: "Interactive content by Flourish", url: "https://app.flourish.studio/@flourish/photo-slider" }, + "pictogram": { text: "A Flourish pictogram", url: "https://flourish.studio/blog/pictogram-isotype/" }, + "quiz": { text: "A Flourish quiz", url: "https://app.flourish.studio/@flourish/quiz" }, + "radar": { text: "A Flourish radar chart", url: "https://flourish.studio/blog/create-online-radar-spider-charts/" }, + "ranking": { text: "A Flourish line chart race", url: "https://flourish.studio/blog/line-chart-race-updates/" }, + "sankey": { text: "A Flourish sankey chart", url: "https://flourish.studio/visualisations/sankey-charts/" }, + "scatter": { text: "A Flourish scatter chart", url: "https://flourish.studio/visualisations/scatter-charts/" }, + "slope": { text: "A Flourish slope chart", url: "https://flourish.studio/visualisations/slope-charts/" }, + "sports": { text: "A Flourish sports visualization", url: "https://app.flourish.studio/@flourish/sports-race" }, + "survey": { text: "A Flourish survey visualization", url: "https://flourish.studio/visualisations/survey-data/" }, + "table": { text: "A Flourish table", url: "https://flourish.studio/visualisations/create-a-table/" }, + "timeline": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/responsive-interactive-timeline/" }, + "text-annotator": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/text-annotator-template/" }, + "tournament": { text: "Interactive content by Flourish", url: "https://flourish.studio/visualisations/tournament-chart/" }, + "word-cloud": { text: "A Flourish data visualization", url: "https://flourish.studio/blog/online-wordcloud-custom-fonts/" }, + } + }, + "es": { + credits: { + "default": "Creado con Flourish", + "bar_race": { text: "Creado con Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bar-chart-race": { text: "Creado con Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + }, + }, + "fr": { + credits: { + "default": "Créé avec Flourish", + "bar_race": { text: "Créé avec Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bar-chart-race": { text: "Créé avec Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + }, + }, + "it": { + credits: { + "default": "Creato con Flourish", + "bar_race": { text: "Creato con Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bar-chart-race": { text: "Creato con Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + } + }, + "mi": { + credits: { + "default": "Hangaia ki te Flourish", + "bar_race": { text: "Hangaia ki te Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bar-chart-race": { text: "Hangaia ki te Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + }, + }, + "nl": { + credits: { + "default": "Gemaakt met Flourish", + "bar_race": { text: "Gemaakt met Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bar-chart-race": { text: "Gemaakt met Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + }, + }, + "pt": { + "default": "Feito com Flourish", + "bar_race": { text: "Feito com Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/"}, + "bar-chart-race": { text: "Feito com Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/"} + } +}; + +/* * * * * * GENERATED FILE - DO NOT EDIT * * * * * * + * * * * * * GENERATED FILE - DO NOT EDIT * * * * * * + * * * * * * GENERATED FILE - DO NOT EDIT * * * * * */ + +function createFlourishCredit(credit_url, query_string, public_url, credit_text) { + credit_url = credit_url || "https://flourish.studio", + query_string = query_string || "?utm_source=api&utm_campaign=" + window.location.href, + public_url = public_url || "https://public.flourish.studio/", + credit_text = credit_text || "A Flourish data visualization"; + + var credit = document.createElement("div"); + credit.setAttribute("class", "flourish-credit"); + credit.setAttribute("style", "width:100%!important;margin:0 0 4px!important;text-align:right!important;font-family:Helvetica,sans-serif!important;color:#888!important;font-size:11px!important;font-weight:bold!important;font-style:normal!important;-webkit-font-smoothing:antialiased!important;box-shadow:none!important;"); + + var a = document.createElement("a"); + a.setAttribute("href", credit_url + query_string); + a.setAttribute("target", "_top"); + a.setAttribute("style", "display:inline-block!important;text-decoration:none!important;font:inherit!important;color:inherit!important;border:none!important;margin:0 5px!important;box-shadow:none!important;"); + credit.appendChild(a); + + var img = document.createElement("img"); + img.setAttribute("alt", "Flourish logo"); + img.setAttribute("src", public_url + "resources/bosh.svg"); + img.setAttribute("style", "font:inherit!important;width:auto!important;height:12px!important;border:none!important;margin:0 2px 0!important;vertical-align:middle!important;display:inline-block!important;box-shadow:none!important;"); + a.appendChild(img); + + var span = document.createElement("span"); + span.setAttribute("style", "font:inherit!important;color:#888!important;vertical-align:middle!important;display:inline-block!important;box-shadow:none!important;"); + span.appendChild(document.createTextNode(credit_text)); + a.appendChild(span); + + return credit; +} + +function getLocalizedCreditTextAndUrl(lang, credit_key) { + var credit_text, credit_url; + lang = lang || "en", credit_key = credit_key || ""; + credit_text = localizations[lang].credits[credit_key] || localizations.en.credits[credit_key] || localizations.en.credits.default; + if (typeof credit_text == "object") { + if (credit_text.url) credit_url = credit_text.url; + credit_text = credit_text.text; + } + return { + credit_text: credit_text, + credit_url: credit_url + }; +} + +/* * * * * * GENERATED FILE - DO NOT EDIT * * * * * * + * * * * * * GENERATED FILE - DO NOT EDIT * * * * * * + * * * * * * GENERATED FILE - DO NOT EDIT * * * * * */ + +// Embedded code - must work in IE +var enabled = false; + +function getLocationData() { + var data = {}; + if (window._Flourish_template_id) { + data.template_id = window._Flourish_template_id; + } + if (window.Flourish && window.Flourish.app && window.Flourish.app.loaded_template_id) { + data.template_id = window.Flourish.app.loaded_template_id; + } + + if (window._Flourish_visualisation_id) { + data.visualisation_id = window._Flourish_visualisation_id; + } + if (window.Flourish && window.Flourish.app && window.Flourish.app.loaded_visualisation) { + data.visualisation_id = window.Flourish.app.loaded_visualisation.id; + } + + if (window.Flourish && window.Flourish.app && window.Flourish.app.story) { + data.story_id = window.Flourish.app.story.id; + data.slide_count = window.Flourish.app.story.slides.length; + } + + if (window.Flourish && window.Flourish.app && window.Flourish.app.current_slide) { + // One indexed + data.slide_index = window.Flourish.app.current_slide.index + 1; + } + return data; +} + +function sendCustomerAnalyticsMessage(message) { + if (!enabled) return; + if (window.top === window.self) return; + + var embedded_window = window; + if (embedded_window.location.pathname === "srcdoc") embedded_window = embedded_window.parent; + + var location_data = getLocationData(); + + var message_with_metadata = { + sender: "Flourish", + method: "customerAnalytics" + }; + + for (var key in location_data) { + if (location_data.hasOwnProperty(key)) { + message_with_metadata[key] = location_data[key]; + } + } + + for (var key in message) { + if (message.hasOwnProperty(key)) { + message_with_metadata[key] = message[key]; + } + } + + embedded_window.parent.postMessage(JSON.stringify(message_with_metadata), "*"); +} + +function addAnalyticsListener(callback) { + if (typeof callback !== "function") { + throw new Error("Analytics callback is not a function"); + } + window.Flourish._analytics_listeners.push(callback); +} + +function initCustomerAnalytics() { + enabled = true; + + var events = [ + { + event_name: "click", + action_name: "click", + use_capture: true + }, + { + event_name: "keydown", + action_name: "key_down", + use_capture: true + }, + { + event_name: "mouseenter", + action_name: "mouse_enter", + use_capture: false + }, + { + event_name: "mouseleave", + action_name: "mouse_leave", + use_capture: false + } + ]; + + events.forEach(function(event) { + document.body.addEventListener(event.event_name, function() { + sendCustomerAnalyticsMessage({ + action: event.action_name + }); + }, event.use_capture); + }); +} + +/* * * * * * GENERATED FILE - DO NOT EDIT * * * * * * + * * * * * * GENERATED FILE - DO NOT EDIT * * * * * * + * * * * * * GENERATED FILE - DO NOT EDIT * * * * * */ + +function parseQueryParams() { + // Query string parameters + var location = window.location; + // We use srcdoc to load the decrypted content for password-protected projects, + // which creates a nested window. + if (location.href == "about:srcdoc") location = window.parent.location; + var params = {}; + (function (query, re, match) { + while (match = re.exec(query)) { + params[decodeURIComponent(match[1])] = decodeURIComponent(match[2]); + } + })(location.search.substring(1).replace(/\+/g, "%20"), /([^&=]+)=?([^&]*)/g); + return params; +} + +/* * * * * * GENERATED FILE - DO NOT EDIT * * * * * * + * * * * * * GENERATED FILE - DO NOT EDIT * * * * * * + * * * * * * GENERATED FILE - DO NOT EDIT * * * * * */ + +var is_fixed_height; +var is_amp; + +function isFixedHeight() { + if (is_fixed_height == undefined) { + var params = parseQueryParams(); + // "referrer" in params implies this is an Embedly embed + // Check whether embedding site is known to support dynamic resizing + if ("referrer" in params) is_fixed_height = /^https:\/\/medium.com\//.test(params.referrer); + else is_fixed_height = !("auto" in params); + } + return is_fixed_height; +} + +function getHeightForBreakpoint(width) { + var breakpoint_width = width || window.innerWidth; + if (breakpoint_width > 999) return 650; + if (breakpoint_width > 599) return 575; + return 400; +} + +function initScrolly(opts) { + if (!opts) return; + if (window.top === window.self) return; + var embedded_window = window; + if (embedded_window.location.pathname == "srcdoc") embedded_window = embedded_window.parent; + var message = { + sender: "Flourish", + method: "scrolly", + }; + if (opts) { + for (var name in opts) message[name] = opts[name]; + } + embedded_window.parent.postMessage(JSON.stringify(message), "*"); +} + +function notifyParentWindow(height, opts) { + if (window.top === window.self) return; + var embedded_window = window; + if (embedded_window.location.pathname == "srcdoc") embedded_window = embedded_window.parent; + if (is_amp) { + // Message is not stringified for AMP + height = parseInt(height, 10); + embedded_window.parent.postMessage({ + sentinel: "amp", + type: "embed-size", + height: height, + }, "*"); + return; + } + var message = { + sender: "Flourish", + context: "iframe.resize", + method: "resize", // backwards compatibility + height: height, + src: embedded_window.location.toString(), + }; + if (opts) { + for (var name in opts) message[name] = opts[name]; + } + embedded_window.parent.postMessage(JSON.stringify(message), "*"); +} + +function isSafari() { + // Some example user agents: + // Safari iOS: Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1 + // Chrome OS X: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 + // Embedded WkWebview on iOS: Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16D5039a + return (navigator.userAgent.indexOf("Safari") !== -1 || navigator.userAgent.indexOf("iPhone") !== -1) && navigator.userAgent.indexOf("Chrome") == -1; +} + +function isString(s) { + return typeof s === "string" || s instanceof String; +} + +function isPossibleHeight(n) { + if (typeof n === "number") { + return !isNaN(n) && (n >= 0); + } + else if (isString(n)) { + // First regex checks there is at least one digit in n and rejectsedge cases like "" and "px" that would pass second regex + // Given first regex, second regex makes sure that n is either a pure number or a number with a valid CSS unit + // Units based on https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths plus % + return /\d/.test(n) && /^[0-9]*(\.[0-9]*)?(cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%)?$/i.test(n); + } + return false; +} + +function validateWarnMessage(message) { + if (message.method !== "warn") { + console.warn("BUG: validateWarnMessage called for method" + message.method); + return false; + } + if ((message.message != null) && !isString(message.message)) return false; + if ((message.explanation != null) && !isString(message.explanation)) return false; + return true; +} + +function validateResizeMessage(message) { + if (message.method !== "resize") { + console.warn("BUG: validateResizeMessage called for method" + message.method); + return false; + } + if (!isString(message.src)) return false; + if (!isString(message.context)) return false; + if (!isPossibleHeight(message.height)) return false; + return true; +} + +function validateSetSettingMessage(_message) { + throw new Error("Validation for setSetting is not implemented yet; see issue #4328"); +} + +function validateScrolly(message) { + if (message.method !== "scrolly") { + console.warn("BUG: validateScrolly called for method" + message.method); + return false; + } + if (!Array.isArray(message.slides)) return false; + return true; +} + +function validateCustomerAnalyticsMessage(message) { + if (message.method !== "customerAnalytics") { + console.warn("BUG: validateCustomerAnalyticsMessage called for method" + message.method); + return false; + } + // We don't consume customer analytics messages; they're just passed + // on, and their structure is up to the customer, so there's no + // point in validating them. + return true; +} + +function validateRequestUpload(message) { + if (message.method !== "request-upload") { + console.warn("BUG: validateResizeMessage called for method" + message.method); + return false; + } + // FIXME: when adding validation for setSetting (see above) we should + // also validate that this is a valid setting name of appropriate type + if (!isString(message.name)) return false; + if (!(message.accept == null || isString(message.accept))) return false; + return true; +} + +function getMessageValidators(methods) { + var available_message_validators = { + "warn": validateWarnMessage, + "resize": validateResizeMessage, + "setSetting": validateSetSettingMessage, + "customerAnalytics": validateCustomerAnalyticsMessage, + "request-upload": validateRequestUpload, + "scrolly": validateScrolly + }; + var validators = {}; + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + if (available_message_validators[method]) { + validators[method] = available_message_validators[method]; + } + else { + throw new Error("No validator found for method " + method); + } + } + return validators; +} + +function startEventListeners(callback, allowed_methods, embed_domain) { + var message_validators = getMessageValidators(allowed_methods); + window.addEventListener("message", function(event) { + var is_accepted_event_origin = (function () { + if (event.origin == document.location.origin) { + return true; + } + // If company has configured a custom origin for downloaded projects, allow it + if (embed_domain) { + const origin = event.origin.toLowerCase(); + embed_domain = embed_domain.toLowerCase(); + + // Allow the domain itself… + if (origin.endsWith("//" + embed_domain)) return true; + + // and subdomains + if (origin.endsWith("." + embed_domain)) return true; + } + if (event.origin.match(/\/\/localhost:\d+$|\/\/(?:public|app)\.flourish.devlocal$|\/\/flourish-api\.com$|\.flourish\.(?:local(:\d+)?|net|rocks|studio)$|\.uri\.sh$|\/\/flourish-user-templates\.com$/)) { + return true; + } + return false; + })(); + + // event.source is null when the message is sent by an extension + // https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#Using_window.postMessage_in_extensions + if (event.source == null) return; + if (!is_accepted_event_origin) return; + var message; + try { + message = typeof event.data === "object" ? event.data : JSON.parse(event.data); + } + catch (e) { + console.warn("Unexpected non-JSON message: " + JSON.stringify(event.data)); + return; + } + if (message.sender !== "Flourish") return; + if (!message.method) { + console.warn("The 'method' property was missing from message", message); + return; + } + if (!Object.prototype.hasOwnProperty.call(message_validators, message.method)) { + console.warn("No validator implemented for message", message); + return; + } + if (!message_validators[message.method](message)) { + console.warn("Validation failed for the message", message); + return; + } + var frames = document.querySelectorAll("iframe"); + for (var i=0; i < frames.length; i++) { + if (frames[i].contentWindow == event.source || frames[i].contentWindow == event.source.parent) { + callback(message, frames[i]); + return; + } + } + console.warn("could not find frame", message); + }); + + if (isSafari()) { + window.addEventListener("resize", onSafariWindowResize); + onSafariWindowResize(); + } +} + +function onSafariWindowResize() { + // Ensure all iframes without explicit width attribute are sized to fit their container + var containers = document.querySelectorAll(".flourish-embed"); + for (var i=0; i < containers.length; i++) { + var container = containers[i]; + if (container.getAttribute("data-width")) continue; + var iframe = container.querySelector("iframe"); + // When embeds are dynamically loaded, we might have a container without a + // loaded iframe yet + if (!iframe) continue; + var computed_style = window.getComputedStyle(container); + var width = container.offsetWidth - parseFloat(computed_style.paddingLeft) - parseFloat(computed_style.paddingRight); + iframe.style.width = width + "px"; + } +} + +function createScrolly(iframe, slides) { + var parent = iframe.parentNode; + + // Fallback to avoid any situation where the scrolly gets initialised twice + if (parent.classList.contains("fl-scrolly-wrapper")) { + console.warn("createScrolly is being called more than once per story. This should not happen."); + return; + } + + parent.classList.add("fl-scrolly-wrapper"); + parent.style.position = "relative"; + parent.style.paddingBottom = "1px"; + parent.style.transform = "translate3d(0, 0, 0)"; // Workaround for Safari https://stackoverflow.com/questions/50224855/not-respecting-z-index-on-safari-with-position-sticky + + iframe.style.position = "sticky"; + var h = parent.getAttribute("data-height") || null; + if (!h) { // Scrollies require fixed height to work well, so if not height set … + h = "80vh"; // … use a sensible fallback + iframe.style.height = h; // And update the iframe height directly + } + iframe.style.top = "calc(50vh - " + h + "/2)"; + + var credit = parent.querySelector(".flourish-credit"); + if (credit) { + credit.style.position = "sticky"; + credit.style.top = "calc(50vh + " + h + "/2)"; + } + + slides.forEach(function(d, i) { + var has_content = typeof d == "string" && d.trim() != ""; + var step = document.createElement("div"); + step.setAttribute("data-slide", i); + step.classList.add("fl-scrolly-caption"); + step.style.position = "relative"; + step.style.transform = "translate3d(0,0,0)"; // Workaround for Safari https://stackoverflow.com/questions/50224855/not-respecting-z-index-on-safari-with-position-sticky + step.style.textAlign= "center"; + step.style.maxWidth = "500px"; + step.style.height = "auto"; + step.style.marginTop = "0"; + step.style.marginBottom = has_content ? "100vh" : "50vh"; + step.style.marginLeft = "auto"; + step.style.marginRight = "auto"; + var caption = document.createElement("div"); + caption.innerHTML = d; + caption.style.visibility = has_content ? "" : "hidden"; + caption.style.display = "inline-block"; + caption.style.paddingTop = "1.25em"; + caption.style.paddingRight = "1.25em"; + caption.style.paddingBottom = "1.25em"; + caption.style.paddingLeft = "1.25em"; + caption.style.background = "rgba(255,255,255,0.9)"; + caption.style.boxShadow = "0px 0px 10px rgba(0,0,0,0.2)"; + caption.style.borderRadius = "10px"; + caption.style.textAlign = "center"; + caption.style.maxWidth = "100%"; + caption.style.margin = "0 20px"; + caption.style.overflowX = "hidden"; + step.appendChild(caption); + parent.appendChild(step); + }); + initIntersection(parent); +} + +function initIntersection(container) { + var t = "0%"; // Trigger when hits viewport; could be set by user in the future + var observer = new IntersectionObserver(function(entries) { + entries.forEach(function(entry) { + if (entry.isIntersecting) { + var iframe = container.querySelector("iframe"); + if (iframe) iframe.src = iframe.src.replace(/#slide-.*/, "") + "#slide-" + entry.target.getAttribute("data-slide"); + } + }); + }, { rootMargin: "0px 0px -" + t + " 0px" }); + + var steps = container.querySelectorAll(".fl-scrolly-caption"); + for (var i = 0; i < steps.length; i++) { + observer.observe(steps[i]); + } + + // Set a max width on any images in the captions, to avoid ugly overflowing + // in the rare cases where the + // This won't happen much, but it is possible to paste an image into a + // story caption, so better to handle this nicely since there's no other + // way for the user to set it. + var images = container.querySelectorAll(".fl-scrolly-caption img"); + images.forEach(function(img) { img.style.maxWidth = "100%"; }); +} + + +function createEmbedIframe(embed_url, container, width, height, play_on_load) { + var iframe = document.createElement("iframe"); + iframe.setAttribute("scrolling", "no"); + iframe.setAttribute("frameborder", "0"); + iframe.setAttribute("title", "Interactive or visual content"); + iframe.setAttribute("sandbox", "allow-same-origin allow-forms allow-scripts allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation"); + container.appendChild(iframe); + + // If the iframe doesn't have an offset parent, either the element or a parent + // is set to display: none. This can cause problems with visualisation loading, so + // we need to poll for the iframe being displayed before loading the visualisation. + // FIXME: In Chrome, fixed position elements also return null for `offsetParent`. + // The chances of an embed which is both position: fixed and display: none are + // pretty small, so fuhgeddaboudit . If it's an issue in the future, we'll have to + // recurse through the parent elements to make sure the iframe is displaying. + if (iframe.offsetParent || getComputedStyle(iframe).position === "fixed") { + setIframeContent(embed_url, container, iframe, width, height, play_on_load); + } + else { + var poll_item = { + embed_url: embed_url, + container: container, + iframe: iframe, + width: width, + height: height, + play_on_load: play_on_load + }; + // If this is the first embed on the page which is isn't displayed, set up a + // list of hidden iframes to poll + if (!window._flourish_poll_items) { + window._flourish_poll_items = [poll_item]; + } + else { + // Otherwise, add this to the list of iframes which are being polled + window._flourish_poll_items.push(poll_item); + } + + if (window._flourish_poll_items.length > 1) { + // If there were already items in the array then we have already started + // polling in a different embed script, so we can return. This iframe will + // have its contents set by the other embed script. + return iframe; + } + + // Poll to see whether any of the iframes have started displaying + var interval = setInterval(function() { + window._flourish_poll_items = window._flourish_poll_items.filter(function(item) { + if (!item.iframe.offsetParent) { + // It's still not displaying, so return true to leave it in the array + return true; + } + + // It's displaying, so set the content, and return false to remove it from + // the array + setIframeContent(item.embed_url, item.container, item.iframe, item.width, item.height, item.play_on_load); + return false; + }); + + if (!window._flourish_poll_items.length) { + // All of the iframes are displaying, so we can stop polling. If another + // embed is added later, a new interval will be created by that embed script. + clearInterval(interval); + } + }, 500); + } + return iframe; +} + +function setIframeContent(embed_url, container, iframe, width, height, play_on_load) { + var width_in_px; + if (width && typeof width === "number") { + width_in_px = width; + width = "" + width + "px"; + } + // The regular expression below detects widths that have been explicitly + // expressed in px units. (It turns out CSS is more complicated than you may + // have realised.) + else if (width && width.match(/^[ \t\r\n\f]*([+-]?\d+|\d*\.\d+(?:[eE][+-]?\d+)?)(?:\\?[Pp]|\\0{0,4}[57]0(?:\r\n|[ \t\r\n\f])?)(?:\\?[Xx]|\\0{0,4}[57]8(?:\r\n|[ \t\r\n\f])?)[ \t\r\n\f]*$/)) { + width_in_px = parseFloat(width); + } + + if (height && typeof height === "number") height = "" + height + "px"; + // Odd design decision in Safari means need to set fixed width rather than % + // as will try and size iframe to content otherwise. Must also set scrolling=no + if (width) iframe.style.width = width; + else if (isSafari()) iframe.style.width = container.offsetWidth + "px"; + else iframe.style.width = "100%"; + + var fixed_height = !!height; + if (!fixed_height) { + if (embed_url.match(/\?/)) embed_url += "&auto=1"; + else embed_url += "?auto=1"; + // For initial height, use our standard breakpoints, based on the explicit + // pixel width if we know it, or the iframe's measured width if not. + height = getHeightForBreakpoint(width_in_px || iframe.offsetWidth) + "px"; + } + + if (height) { + if (height.charAt(height.length - 1) === "%") { + height = (parseFloat(height) / 100) * container.parentNode.offsetHeight + "px"; + } + iframe.style.height = height; + } + + iframe.setAttribute("src", embed_url + (play_on_load ? "#play-on-load" : "")); + + return iframe; +} + +function initEmbedding() { + is_amp = window.location.hash == "#amp=1"; + return { + createEmbedIframe: createEmbedIframe, + isFixedHeight: isFixedHeight, + getHeightForBreakpoint: getHeightForBreakpoint, + startEventListeners: startEventListeners, + notifyParentWindow: notifyParentWindow, + initScrolly: initScrolly, + createScrolly: createScrolly, + isSafari: isSafari, + initCustomerAnalytics: initCustomerAnalytics, + addAnalyticsListener: addAnalyticsListener, + sendCustomerAnalyticsMessage: sendCustomerAnalyticsMessage + }; +} + +var VERSION = "5.1.0"; + +var DEFAULTS = { + api_url: "https://flourish-api.com/api/v1/live", + public_bucket_prefix: "https://public.flourish.studio/", + base_visualisation_data_format: "array", +}; + +// Properties that cannot (yet) be changed on update(): +var IMMUTABLE_PROPERTIES = [ + "api_key", "template", "version", "container", "base_visualisation_id" +]; + +// Lookup for templates that the API script has loaded on to the page. +// This is needed for the update method to identify whether a particular +// call to Flourish.update(opts) is for a typed template. +var template_lookup = {}; + +function stringify(o) { + if (!o && o !== 0) return ""; + else if (typeof o === "object") { + for (var k in o) o[k] = stringify(o[k]); + return o; + } + else return "" + o; +} + +function shallowCopy(o) { + var r = {}; + for (var k in o) r[k] = o[k]; + return r; +} + +function isObject(x) { + return !Array.isArray(x) && typeof x === "object" && x != null; +} + +// Expects an object at the top level. +// Does not deep-copy arrays, which is okay here +// since the data structures we expect to receive +// have arrays only of strings. +function deepCopy(obj) { + if (obj == null) return obj; + var copy = {}; + for (var k in obj) { + if (Array.isArray(obj[k])) { + copy[k] = obj[k].slice(); + } + else if (isObject(obj[k])) { + copy[k] = deepCopy(obj[k]); + } + else { + copy[k] = obj[k]; + } + } + return copy; +} + +var embedding = null; + +function getColumnTypeMetadata(column) { + const interpreter = createInterpreter(); + const interpretation = interpreter(column)[0]; + + return { + type: interpretation.type, + type_id: interpretation.id, + output_format_id: interpretation.id, + }; +} + +function Fleet(opts) { + this._validateOpts(opts); + + this.template_loaded = false; + this.metadata_loaded = false; + this.company_state = null; + this.template_settings = null; + this._queued_methods = []; + + for (var prop in DEFAULTS) { + if (!opts.hasOwnProperty(prop)) opts[prop] = DEFAULTS[prop]; + } + + if (opts.base_visualisation_id) { + var that = this; + this._loadBaseVisualisation(opts, function(error, base) { + if (error) { + console.error(error.message); + return; + } + opts = mergeObjects(base, opts); + that._loadFleet(opts); + }); + } + else { + this._loadFleet(opts); + } +} + +Fleet.prototype._loadBaseVisualisation = function Fleet__loadBaseVisualisation(opts, callback) { + var xhr = new XMLHttpRequest(); + xhr.addEventListener("load", function() { + if (this.status != 200) { + var error = new Error("Fetching the base visualisation failed"); + return callback(error); + } + var parsed_json = JSON.parse(this.responseText); + return callback(null, parsed_json); + }); + + const data_format = opts.base_visualisation_data_format; + if (!["array", "object"].includes(data_format)) { + return callback( + new Error(`The base_visualisation_data_format parameter must be either "array" or "object"`) + ); + } + const path = data_format == "array" ? "/visualisation.json" : "/visualisation-object.json"; + + xhr.open("GET", opts.public_bucket_prefix + "visualisation/" + opts.base_visualisation_id + path); + xhr.send(); +}; + +Fleet.prototype._loadFleet = function Fleet__loadFleet(opts) { + this.original_properties = {}; + for (var i = 0; i < IMMUTABLE_PROPERTIES.length; i++) { + var k = IMMUTABLE_PROPERTIES[i]; + this.original_properties[k] = opts[k]; + } + + if (!embedding) embedding = initEmbedding(); + var embed_url = opts.api_url + "/template" + + "?api_key=" + opts.api_key + + "&api_version=" + encodeURIComponent(VERSION) + + "&template=" + encodeURIComponent(opts.template) + + "&version=" + opts.version; + + var container = (typeof opts.container === "string") ? document.querySelector(opts.container) : opts.container; + + this.iframe = embedding.createEmbedIframe(embed_url, container, opts.width, opts.height, false); + + var that = this; + this.iframe.addEventListener("load", function() { + that.template_loaded = true; + if (that.metadata_loaded) { + that._init( + { + state: opts.state, + data: that._data, + typed_template: that.typed_template, + }, + opts.callback + ); + } + }); + + embedding.startEventListeners( + function(message, frame) { + if (message.method == "resize") { + var height = message.height; + var type = typeof height; + // Add "px" if height is a number or a string representing a pure number + if (type === "number" || (type === "string" && !isNaN(height))) message.height += "px"; + frame.style.height = message.height; + } + }, + ["resize"] + ); + + var xhr = new XMLHttpRequest(); + xhr.addEventListener("load", function () { + if (this.status === 500) { + console.error(JSON.parse(this.responseText)); + return; + } + if (this.status != 200) { + console.error("Fetching the template and data bindings from the server failed"); + return; + } + var parsed_json = JSON.parse(this.responseText); + + that.typed_template = parsed_json.typed_template; + + // Store a reference to the template in the templates_loaded lookup object, + // for future reference by the update method. + if (!template_lookup[opts.template]) template_lookup[opts.template] = {}; + if (template_lookup[opts.template][opts.version] === undefined) { + template_lookup[opts.template][opts.version] = that.typed_template; + } + + that._prepareDataBindings(parsed_json.data_bindings); + that.template_settings = parsed_json.settings || {}; + that.company_state = that._getCompanyState(parsed_json.company_custom); + that.metadata_loaded = true; + that._prepareData(opts); + if (that.template_loaded) { + that._init( + { + state: opts.state, + data: that._data, + typed_template: that.typed_template, + }, + opts.callback + ); + } + + if (!parsed_json.hide_credit) { + var template_name = opts.template.replace(/^@?flourish\//, ""); + var local_credits = getLocalizedCreditTextAndUrl(opts.lang, template_name); + var credit = createFlourishCredit(local_credits.credit_url, + null, null, local_credits.credit_text); + container.appendChild(credit); + } + }); + + xhr.open("GET", opts.api_url + "/metadata?api_key=" + opts.api_key + "&template=" + encodeURIComponent(opts.template) + "&version=" + opts.version); + xhr.send(); +}; + +// Calculate the base state which the state passed to the API is +// merged over. This will return an empty object unless the API key +// owner is in a company with custom settings. +Fleet.prototype._getCompanyState = function Fleet__getCompanyState(company_custom) { + if (!company_custom) return {}; + return company_custom.settings || {}; +}; + +function isNonArrayObject(o) { + return (o instanceof Object) && !Array.isArray(o) && o !== null; +} + +function mergeObjects(o1, o2) { + // Deep clone the first object so we won't modify it on merging: + var k, v, result = JSON.parse(JSON.stringify(o1)); + for (k in o2) { + v = o2[k]; + // If both corresponding values are objects, recursively + // merge them, otherwise o2's value is used: + if (isNonArrayObject(result[k]) && isNonArrayObject(v)) { + result[k] = mergeObjects(result[k], v); + } + else result[k] = v; + } + return result; +} + +Fleet.prototype._mergeState = function Fleet__mergeState(state) { + return mergeObjects(this.company_state, state); +}; + +Fleet.prototype._prepareDataBindings = function Fleet__prepareDataBindings(data_bindings_array) { + var data_bindings = {}; + + for (var i = 0; i < data_bindings_array.length; i++) { + var d = data_bindings_array[i]; + if (typeof d === "string") continue; + + if (!(d.dataset in data_bindings)) { + data_bindings[d.dataset] = []; + } + data_bindings[d.dataset].push(d); + } + + this._data_bindings = data_bindings; + this._parsed_bindings = {}; + + for (var dataset in data_bindings) { + this._parseDataset(dataset); + } +}; + +Fleet.prototype._parseDataset = function Fleet__parseDataset(dataset) { + if (!this._parsed_bindings[dataset]) { + var kd = this._parsed_bindings[dataset] = { + dataset: dataset, + mandatory_keys: [], + optional_keys: [], + columns_keys: [], + default_values: {}, + has_mandatory_key: false + }; + + var data_bindings = this._data_bindings; + for (var key in data_bindings[dataset]) { + var d = data_bindings[dataset][key]; + switch (d.type) { + case "column": + if (!d.optional) { + kd.mandatory_keys.push(d.key); + kd.has_mandatory_key = true; + } + else { + kd.optional_keys.push(d.key); + } + break; + + case "columns": + kd.default_values[d.key] = []; + kd.columns_keys.push(d.key); + break; + } + } + } +}; + +Fleet.prototype._getColumnNames = function Fleet__getColumnNames(kd, column_names, optional_keys_used, number_of_columns) { + var result = {}; + + var dataset = kd.dataset; + var column_name; + for (var i = 0; i < kd.mandatory_keys.length; i++) { + var mandatory_key = kd.mandatory_keys[i]; + column_name = (column_names && column_names[dataset] && column_names[dataset][mandatory_key]) || mandatory_key; + + result[mandatory_key] = column_name; + } + + for (var i = 0; i < kd.optional_keys.length; i++) { + var optional_key = kd.optional_keys[i]; + if (!optional_keys_used[optional_key]) continue; + column_name = (column_names && column_names[dataset] && column_names[dataset][optional_key]) || optional_key; + + result[optional_key] = column_name; + } + + for (var i = 0; i < kd.columns_keys.length; i++) { + var columns_key = kd.columns_keys[i]; + if (column_names && column_names[dataset] && column_names[dataset][columns_key]) { + column_name = column_names[dataset][columns_key]; + if (typeof column_name === "string") column_name = [column_name]; + if (!Array.isArray(column_name) || column_name.length != number_of_columns[columns_key]) { + throw new Error("Flourish: number of column names (" + column_name.length + + ") does not match the number of columns (" + number_of_columns[columns_key] + + ") for dataset “" + dataset + "” and key “" + columns_key + "”"); + } + } + else { + column_name = []; + for (var j = 0; j < number_of_columns[columns_key]; j++) { + column_name.push(columns_key + " " + (j+1)); + } + } + + result[columns_key] = column_name; + } + + return result; +}; + +// TODO: test with untyped template + +/** Returns metadata and interpretations (useful for parsing the data in a column) for bound columns in the dataset */ +Fleet.prototype._getColumnTypesForDataset = function Fleet__getColumnTypesForDataset(data, bindings, column_type_overrides) { + const all_bindings = Object.entries(bindings.column_bindings).concat(Object.entries(bindings.columns_bindings)); + const metadata = {}; + const interpretations = {}; + + for (const [binding_name, binding_value] of all_bindings) { + const is_multicolumn_binding = Array.isArray(binding_value); + + // bound_columns_identifiers is an array of column indexes or column names, + // depending on if the data is in the 'array-of-arrays' or the 'array-of-objects' format. + const bound_columns_identifiers = is_multicolumn_binding ? binding_value : [binding_value]; + + for (let i = 0; i < bound_columns_identifiers.length; i++) { + // If the data is in 'array-of-arrays' format, column_key should be a column index. + // If the data is in 'array-of-objects' format, column_key should be a binding name. + const column_key = bound_columns_identifiers[i]; + let type_override = column_type_overrides[column_key]; + + const column_type_metadata = getColumnTypeMetadata( + data.map(row => is_multicolumn_binding ? row[binding_name][i] : row[binding_name]) + ); + + // If the current column has a type override, add it to the metadata obj + if (type_override) { + // If one or more required keys are missing from the override object, + // interpret the column and get them from the interpretation object. + const required_keys = ["type", "type_id"]; + const override_keys = Object.keys(type_override); + const missing_required_keys = required_keys.filter(required_key => !override_keys.includes(required_key)); + + if (missing_required_keys.length) { + console.warn( + `Metadata for column '${column_key}' is missing a '${missing_required_keys.join("' and '")}' property.` + + " Flourish will interpret and populate the missing properties." + ); + + missing_required_keys.forEach(function(missing_key) { + type_override[missing_key] = column_type_metadata[missing_key]; + }); + } + + // If an output_format_id isn't set in the override, make it the same as the type_id + if (!override_keys.includes("output_format_id")) { + type_override.output_format_id = type_override.type_id; + } + + if (!validateMetadata(type_override, column_key)) { + throw new Error(`Metadata for column '${column_key}' is invalid.`); + } + + if (is_multicolumn_binding) { + if (!metadata[binding_name]) metadata[binding_name] = []; + if (!interpretations[binding_name]) interpretations[binding_name] = []; + metadata[binding_name].push(type_override); + interpretations[binding_name].push(createInterpreter.getInterpretation(type_override.type_id)); + } + else { + metadata[binding_name] = type_override; + interpretations[binding_name] = createInterpreter.getInterpretation(type_override.type_id); + } + } + // If there are no user-specified types for a column on a multi-column + // binding, interpret the column and add the type info to the metadata obj + else if (is_multicolumn_binding) { + if (!metadata[binding_name]) metadata[binding_name] = []; + if (!interpretations[binding_name]) interpretations[binding_name] = []; + + const interpretation = createInterpreter.getInterpretation(column_type_metadata.type_id); + metadata[binding_name].push(column_type_metadata); + interpretations[binding_name].push(interpretation); + } + // If there are no user-specified types for a column on a single column + // binding, interpret the column type and add it to the metadata obj + else { + metadata[binding_name] = column_type_metadata; + interpretations[binding_name] = createInterpreter.getInterpretation(column_type_metadata.type_id); + } + } + + // Empty multi-column data bindings should still add an empty array + // to the metadata object + if (is_multicolumn_binding && !bound_columns_identifiers.length) { + metadata[binding_name] = []; + } + } + return { metadata, interpretations }; +}; + +function validateMetadata(metadata, identifier_) { + var identifier = identifier_ ? "Validation error in Column '" + identifier_ + "':" : ""; + + // output_format_id is optional, so make sure if it's not provided, it + // uses type_id for testing purposes + if (!metadata.output_format_id) metadata.output_format_id = metadata.type_id; + + const required_keys = ["type", "type_id"]; + const metadata_keys = Object.keys(metadata); + const missing_required_keys = required_keys.filter(required_key => !metadata_keys.includes(required_key)); + if (missing_required_keys.length) { + console.error(identifier, "Metadata is missing required key: ", missing_required_keys.join(" and "), metadata); + return false; + } + if (Object.values(metadata).some(v => typeof v != "string")) { + console.error(identifier, "All properties in metadata need to be string", metadata); + return false; + } + if (!["string", "number", "datetime"].includes(metadata.type)) { + console.error(identifier, "Metadata 'type' property needs to be one of 'string', 'datetime' or 'number'", metadata); + return false; + } + var type_id_type = metadata.type_id.split("$")[0]; + var output_id_type = metadata.output_format_id.split("$")[0]; + if (!(type_id_type === output_id_type && output_id_type === metadata.type)) { + var type_id_mismatch = type_id_type !== metadata.type; + var output_id_mismatch = output_id_type !== type_id_type; + if (type_id_mismatch) console.error(identifier, "Metadata 'type_id' type should match 'type'", metadata); + if (output_id_mismatch) console.error(identifier, "Metadata 'output_format_id' type should match 'type_id'", metadata); + + return false; + } + return true; +} + +/** Parse data values according to the data types of their columns */ +Fleet.prototype._parseTypedDataForDataset = function Fleet__parseTypedDataForDataset(data, types) { + const parsed_data = data.map(row => { + return Object.keys(row).reduce((parsed_data, binding) => { + if (Array.isArray(row[binding])) { + parsed_data[binding] = row[binding].map((value, i) => { + if (typeof value === "number") return value; + else return types[binding][i].parse(value); + }); + } + else if (typeof row[binding] === "number") parsed_data[binding] = row[binding]; + else parsed_data[binding] = types[binding].parse(row[binding]); + + return parsed_data; + }, {}); + }); + + // Mapping through data removes doesn't transfer its named keys (like 'column_names') + // to the parsed copy - so we copy those keys across now + const data_keys = Object.keys(data); + const parsed_data_keys = Object.keys(parsed_data); + + // Compare the length of parsed_data with data to see if any keys are missing + if (parsed_data_keys.length -1 !== data_keys.length) { + // Add the missing keys to parsed_data + for (var i = 0; i < data_keys.length; i++) { + if (!parsed_data_keys.includes(data_keys[i])) { + parsed_data[data_keys[i]] = data[data_keys[i]]; + } + } + } + return parsed_data; +}; + +function arrayToObjectKeys(arr) { + return arr.reduce(function(obj, key) { + obj[key] = true; + return obj; + }, {}); +} + +function getOrCreateDataset(data, dataset) { + if (!data[dataset]) { + data[dataset] = []; + data[dataset].column_names = {}; + } + return data[dataset]; +} + +function splitBindings(dataset, bindings, kd) { + var result = { column_bindings: {}, columns_bindings: {} }; + for (var k in bindings) { + var v = bindings[k]; + // FIXME: make a simple object lookup in kd instead of repeatedly iterating over these arrays + if (kd.columns_keys.indexOf(k) >= 0) { + result.columns_bindings[k] = v; + } + else if (kd.mandatory_keys.indexOf(k) >= 0 || kd.optional_keys.indexOf(k) >= 0) { + result.column_bindings[k] = v; + } + else { + throw new Error("Flourish: unknown binding “" + k + "” found for dataset “" + dataset + "”"); + } + } + return result; +} + +function addMissingColumnNames(dataset, parsed_bindings, data_bindings) { + var column_names = dataset.column_names; + var mandatory_keys = arrayToObjectKeys(parsed_bindings.mandatory_keys); + for (var i = 0; i < data_bindings.length; i++) { + var binding = data_bindings[i]; + var key = binding.key; + if (column_names[key] !== undefined) continue; + if (binding.type === "columns") column_names[key] = []; + else if (mandatory_keys[key]) column_names[key] = binding.name; + } +} + +// This function will take a row from a dataset in the shape that +// Flourish expects and do the following: +// - add default values for any columns or optional column types +// - do a number of checks for consistency of the data, and throw +// an exception on finding any inconsistency +// - record which optional keys have been used in the +// optional_keys_used object. +// - record the expected number of values for each columns type +function fixRow(d, kd, optional_keys_used, number_of_columns) { + // Assign default values + for (var k in kd.default_values) { + if (!(k in d)) d[k] = kd.default_values[k]; + } + + // Check that mandatory keys are present in each row + for (var j = 0; j < kd.mandatory_keys.length; j++) { + var mandatory_key = kd.mandatory_keys[j]; + if (!(mandatory_key in d)) { + throw new Error("required key “" + mandatory_key + "” is missing"); + } + } + + // Check that optional keys are used or not used consistently, + // and record which are used in the optional_keys_used object. + for (var j = 0; j < kd.optional_keys.length; j++) { + var optional_key = kd.optional_keys[j]; + if (optional_key in optional_keys_used) { + if (optional_keys_used[optional_key] != (optional_key in d)) { + throw new Error("the optional key “" + optional_key + "” is used in some rows but not in others"); + } + } + else { + optional_keys_used[optional_key] = (optional_key in d); + } + } + + // Check that columns keys are used consistently, and record + // how many columns each uses, in the number_of_columns object. + // + // TODO: Should we support having an inconsistent number of entries in a columns key? + // We could assume the longest array determines the length. + for (var j = 0; j < kd.columns_keys.length; j++) { + var columns_key = kd.columns_keys[j]; + + // If an atomic value is passed where an array is expected, treat it + // as a single-element array. + if (typeof d[columns_key] !== "object") { + d[columns_key] = [ d[columns_key] ]; + } + if (columns_key in number_of_columns) { + if (number_of_columns[columns_key] != (d[columns_key].length)) { + throw new Error("the columns key “" + columns_key + "” has an inconsistent number of entries"); + } + } + else { + number_of_columns[columns_key] = d[columns_key].length; + } + } +} + +Fleet.prototype._prepareData = function Fleet__prepareData(opts) { + if ("column_names" in opts) this.column_names = deepCopy(opts.column_names); + if (opts.bindings) { + this._prepareDataFromExternalFormat(opts.data, opts.bindings, opts.metadata || {}); + } + else { + this._prepareDataFlourishShape(opts.data, this.column_names); // TODO: make this work with column types + } +}; + +Fleet.prototype._prepareDataFromExternalFormat = function Fleet__prepareDataFromExternalFormat(data, bindings, column_types) { + this._data = {}; + + for (var dataset in bindings) { + var kd = this._parsed_bindings[dataset]; // kd is short for “key data” + var bindings_object = splitBindings(dataset, bindings[dataset], kd); + var reshaped_data = flourishify(data[dataset] || [], bindings_object.column_bindings, bindings_object.columns_bindings); + + var number_of_columns = {}; + var optional_keys_used = {}; + for (var i = 0; i < reshaped_data.length; i++) { + try { + fixRow(reshaped_data[i], kd, optional_keys_used, number_of_columns, dataset); + } + catch (e) { + throw new Error("Flourish: in dataset “" + dataset + "”, " + e.message); + } + } + + if (this.typed_template) { + const { metadata, interpretations } = this._getColumnTypesForDataset(reshaped_data, bindings_object, column_types[dataset] || {}); + const parsed_data = this._parseTypedDataForDataset(reshaped_data, interpretations); + parsed_data.metadata = metadata; // append column types to the parsed data object + reshaped_data = parsed_data; + } + + this._data[dataset] = reshaped_data; + } + + // Fill in missing datasets and column names + for (var dataset in this._data_bindings) { + var d = getOrCreateDataset(this._data, dataset); + var parsed_bindings = this._parsed_bindings[dataset]; + var data_bindings = this._data_bindings[dataset]; + addMissingColumnNames(d, parsed_bindings, data_bindings); + } +}; + +Fleet.prototype._prepareDataFlourishShape = function Fleet__prepareDataFlourishShape(data, column_names) { + var data_bindings = this._data_bindings; + + for (var dataset in data) { + if (!(dataset in data_bindings)) { + throw new Error("Flourish: the dataset “" + dataset + "” is not supported by this template"); + } + } + + this._data = {}; + for (var dataset in data_bindings) { + var kd = this._parsed_bindings[dataset]; // kd is short for “key data” + + if (kd.has_mandatory_key && !(dataset in data)) { + throw new Error("Flourish: the dataset “" + dataset + "” must be specified"); + } + + var number_of_columns = {}; + var optional_keys_used = {}; + this._data[dataset] = []; + for (var i = 0; i < data[dataset].length; i++) { + var d = shallowCopy(data[dataset][i]); + this._data[dataset].push(d); + try { + fixRow(d, kd, optional_keys_used, number_of_columns); + } + catch (e) { + throw new Error("Flourish: in dataset “" + dataset + "”, " + e.message); + } + } + + this._data[dataset].column_names = this._getColumnNames(kd, column_names, optional_keys_used, number_of_columns); + } +}; + +Fleet.prototype._init = function Fleet__init(opts, callback) { + var that = this; + that._send("setFixedHeight", null, function() { + that._draw(opts, function() { + if (callback) callback(that); + + for (var i = 0; i < that._queued_methods.length; i++) { + var m = that._queued_methods[i]; + m[0].apply(that, m.slice(1)); + } + that._queued_methods = null; + }); + }); +}; + +Fleet.prototype._queue = function Fleet__queue() { + // Convert the pseudo-array arguments to a real array args. + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + + // If initialisation is complete and the queued methods + // have already been run, then run this method immediately + // rather than queueing it. + if (!this._queued_methods) { + args[0].apply(this, args.slice(1)); + return; + } + + // Otherwise add it to the queue + this._queued_methods.push(args); +}; + +function wrapInQueue(f) { + return function() { + var args = [ f ]; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + this._queue.apply(this, args); + }; +} + +Fleet.prototype._send = function Fleet__send(method, argument, callback) { + var channel = new MessageChannel(); + channel.port1.onmessage = callback; + + this.iframe.contentWindow.postMessage({ + sender: "Flourish", + method: method, + argument: argument + }, "*", [channel.port2]); +}; + +Fleet.prototype.snapshot = wrapInQueue(function Fleet_snapshot(snapshot_opts, callback) { + const scale = +(snapshot_opts.scale || 1); + if (isNaN(scale)) { + return callback(new Error(`Malformed image scale “${snapshot_opts.scale}”`)); + } + if (typeof snapshot_opts.download !== "boolean") { + return callback(new Error(`The “download” option must be a boolean, not “${snapshot_opts.download}}”`)); + } + const download = !!snapshot_opts.download; + let format = (snapshot_opts.format || "png"); + if (!["png", "jpeg", "svg"].includes(format)) { + return callback(new Error(`Unknown image format “${snapshot_opts.format}” - must be one of “png”, “jpeg” or “svg”`)); + } + const filename = snapshot_opts.filename || "Flourish API image"; + if (typeof filename !== "string") { + return callback(new Error(`Filename must be a string (not “${filename}”)`)); + } + const width = this.iframe.clientWidth; + const height = this.iframe.clientHeight; + + return this._send("snapshot", { + download, + filename, + format, + scale, + width, + height, + }, (event) => { + if (event.data.result.status === "error") { + return callback(event.data.result.error); + } + return callback(null, event.data.result); + }); +}); + +Fleet.prototype._draw = function Fleet_draw(opts, callback) { + return this._send("sync", { + draw: true, + state: this._mergeState(opts.state), + data: opts.typed_template ? opts.data : stringify(opts.data), + }, callback); +}; + +Fleet.prototype._update = function Fleet__update(opts, callback) { + var argument = { + update: true, + state: this._mergeState(opts.state) + }; + if (opts.data) { + argument.data = opts.typed_template ? opts.data : stringify(opts.data); + } + return this._send("sync", argument, callback); +}; + +Fleet.prototype._validateOpts = function Fleet__validateOpts(opts, update) { + if (update) { + for (var i = 0; i < IMMUTABLE_PROPERTIES.length; i++) { + var k = IMMUTABLE_PROPERTIES[i]; + if (k in opts && opts[k] != this.original_properties[k]) { + throw new Error("Flourish: changing the '" + k + "' is not yet supported"); + } + } + } + + if (opts.bindings && opts.column_names) { + throw new Error( + "Flourish: you must supply exactly one of opts.bindings and opts.column_names - " + + "these correspond to different ways that your data might be shaped" + ); + } + + if (opts.metadata && (typeof opts.metadata !== "object" || Array.isArray(opts.metadata) || opts.metadata === null)) { + throw new Error("Flourish: opts.metadata must be an object"); + } +}; + +Fleet.prototype.getState = wrapInQueue(function Fleet_getState(callback) { + return this._send("getState", null, function(obj) { + if (!("data" in obj) || !("result" in obj.data)) { + return callback(new Error("Template state not found")); + } + return callback(null, obj.data.result); + }); +}); + +Fleet.prototype.update = wrapInQueue(function Fleet_update(opts, callback) { + this._validateOpts(opts, true); + const { template, version } = this.original_properties; + opts.typed_template = template_lookup[template][version]; // flag if the template being updated is typed + // FIXME (?): one might conceivably want to change the bindings or + // column names on update, in which case _prepareData should be + // re-run on the data which was last passed in. We're not sure + // that we want to support this, however - it'd mean keeping an + // extra copy of the passed in data in memory. + if ("data" in opts) { + this._prepareData(opts); + return this._update({ state: opts.state, data: this._data, typed_template: opts.typed_template }, callback); + } + return this._update({ state: opts.state }, callback); +}); +//# sourceMappingURL=flourish-live.js.map diff --git a/R_package/inst/htmlwidgets/lib/flourish-live/flourish-live.js.map b/R_package/inst/htmlwidgets/lib/flourish-live/flourish-live.js.map new file mode 100644 index 0000000..bb8269f --- /dev/null +++ b/R_package/inst/htmlwidgets/lib/flourish-live/flourish-live.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flourish-live.js","sources":["../node_modules/@flourish/transform-data/src/utils/validation.js","../node_modules/@flourish/transform-data/src/lib/flourishify.js","../node_modules/d3-time/src/interval.js","../node_modules/d3-time/src/duration.js","../node_modules/d3-time/src/day.js","../node_modules/d3-time/src/week.js","../node_modules/d3-time/src/year.js","../node_modules/d3-time/src/utcDay.js","../node_modules/d3-time/src/utcWeek.js","../node_modules/d3-time/src/utcYear.js","../node_modules/d3-time-format/src/locale.js","../node_modules/d3-time-format/src/defaultLocale.js","../node_modules/@flourish/interpreter/src/types/common.js","../node_modules/@flourish/interpreter/src/types/datetime.js","../node_modules/d3-format/src/formatDecimal.js","../node_modules/d3-format/src/exponent.js","../node_modules/d3-format/src/formatGroup.js","../node_modules/d3-format/src/formatNumerals.js","../node_modules/d3-format/src/formatSpecifier.js","../node_modules/d3-format/src/formatTrim.js","../node_modules/d3-format/src/formatPrefixAuto.js","../node_modules/d3-format/src/formatRounded.js","../node_modules/d3-format/src/formatTypes.js","../node_modules/d3-format/src/identity.js","../node_modules/d3-format/src/locale.js","../node_modules/@flourish/interpreter/src/types/number.js","../node_modules/@flourish/interpreter/src/types/string.js","../node_modules/@flourish/interpreter/src/index.js","../src/live/embed/localizations.js","../src/live/embed/credit.js","../src/live/embed/customer_analytics.js","../src/live/embed/parse_query_params.js","../src/live/embed/embedding.js","../src/live/index.js"],"sourcesContent":["function isArrayIndex(x) {\n\treturn (parseInt(x).toString() === \"\" + x) && (x >= 0);\n}\n\n\nfunction validateArrayBindings(column_bindings, columns_bindings) {\n\tvar mssg;\n\n\tvar column_ok = Object.keys(column_bindings).every(function(key) {\n\t\treturn isArrayIndex(column_bindings[key]);\n\t});\n\n\tif (!column_ok) {\n\t\tmssg = \"All column_bindings values should be non-negative integers\";\n\t\tthrow new TypeError(mssg);\n\t}\n\n\tvar columns_ok = Object.keys(columns_bindings).every(function(key) {\n\t\tvar value = columns_bindings[key];\n\t\treturn Array.isArray(value) ? value.every(isArrayIndex) : isArrayIndex(value);\n\t});\n\n\tif (!columns_ok) {\n\t\tmssg = \"All columns_bindings values should be non-negative integers or arrays thereof\";\n\t\tthrow new TypeError(mssg);\n\t}\n}\n\n\nexport { validateArrayBindings };\n","import { validateArrayBindings } from \"../utils/validation\";\n\n\nfunction flourishifyData(input_data, column_bindings, columns_bindings) {\n\treturn input_data.map(function(d) {\n\t\tvar obj = {};\n\n\t\tObject.keys(column_bindings).forEach(function(key) {\n\t\t\tobj[key] = d[column_bindings[key]];\n\t\t});\n\n\t\tObject.keys(columns_bindings).forEach(function(key) {\n\t\t\tvar a = columns_bindings[key];\n\t\t\tif (!Array.isArray(a)) a = [a];\n\t\t\tobj[key] = a.map(function(inner_key) { return d[inner_key]; });\n\t\t});\n\n\t\treturn obj;\n\t});\n}\n\n\nfunction flourishifyObjects(input_data, column_bindings, columns_bindings) {\n\tcolumn_bindings = column_bindings || {};\n\tcolumns_bindings = columns_bindings || {};\n\n\tvar data = flourishifyData(input_data, column_bindings, columns_bindings);\n\tdata.column_names = {};\n\n\tObject.keys(column_bindings).forEach(function(key) {\n\t\tdata.column_names[key] = column_bindings[key];\n\t});\n\n\tObject.keys(columns_bindings).forEach(function(key) {\n\t\tvar a = columns_bindings[key];\n\t\tdata.column_names[key] = Array.isArray(a) ? a : [a];\n\t});\n\n\treturn data;\n}\n\n\nfunction flourishifyArrays(input_data, column_bindings, columns_bindings) {\n\tcolumn_bindings = column_bindings || {};\n\tcolumns_bindings = columns_bindings || {};\n\tvalidateArrayBindings(column_bindings, columns_bindings);\n\tvar old_headers = input_data[0];\n\n\tvar data = flourishifyData(input_data.slice(1), column_bindings, columns_bindings);\n\tdata.column_names = {};\n\n\tObject.keys(column_bindings).forEach(function(key) {\n\t\tdata.column_names[key] = old_headers[column_bindings[key]];\n\t});\n\n\tObject.keys(columns_bindings).forEach(function(key) {\n\t\tvar a = columns_bindings[key];\n\t\tdata.column_names[key] = (Array.isArray(a) ? a : [a]).map(function(k) {\n\t\t\treturn old_headers[k];\n\t\t});\n\t});\n\n\treturn data;\n}\n\n\nfunction flourishify(input_data, column_bindings, columns_bindings) {\n\tvar fls = Array.isArray(input_data[0]) ? flourishifyArrays : flourishifyObjects;\n\treturn fls(input_data, column_bindings, columns_bindings);\n}\n\n\nexport { flourishifyObjects, flourishifyArrays, flourishify };\n","var t0 = new Date,\n t1 = new Date;\n\nexport default function newInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = function(date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function(date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [], previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = function(step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? function(d) { return field(d) % step === 0; }\n : function(d) { return interval.count(0, d) % step === 0; });\n };\n }\n\n return interval;\n}\n","export var durationSecond = 1e3;\nexport var durationMinute = 6e4;\nexport var durationHour = 36e5;\nexport var durationDay = 864e5;\nexport var durationWeek = 6048e5;\n","import interval from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nvar day = interval(function(date) {\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setDate(date.getDate() + step);\n}, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n}, function(date) {\n return date.getDate() - 1;\n});\n\nexport default day;\nexport var days = day.range;\n","import interval from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction weekday(i) {\n return interval(function(date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\n\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;\n","import interval from \"./interval.js\";\n\nvar year = interval(function(date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n}, function(date) {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport default year;\nexport var years = year.range;\n","import interval from \"./interval.js\";\nimport {durationDay} from \"./duration.js\";\n\nvar utcDay = interval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n return (end - start) / durationDay;\n}, function(date) {\n return date.getUTCDate() - 1;\n});\n\nexport default utcDay;\nexport var utcDays = utcDay.range;\n","import interval from \"./interval.js\";\nimport {durationWeek} from \"./duration.js\";\n\nfunction utcWeekday(i) {\n return interval(function(date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / durationWeek;\n });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\n\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;\n","import interval from \"./interval.js\";\n\nvar utcYear = interval(function(date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;\n","import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n var map = {}, i = -1, n = names.length;\n while (++i < n) map[names[i].toLowerCase()] = i;\n return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n","function notAStringError(not_a_str) {\n\tthrow new TypeError(\"Expected a value of type string but got a value of type \" + (typeof not_a_str));\n}\n\n\nfunction shield(func) {\n\treturn function(str) {\n\t\tif (typeof str !== \"string\") notAStringError(str);\n\t\tstr = str.trim();\n\t\treturn str ? func(str) : null;\n\t};\n}\n\n\nexport { shield, notAStringError };\n","import { utcParse, utcFormat } from \"d3-time-format\";\nimport { shield } from \"./common.js\";\n\nvar EXAMPLE_DATETIME = new Date(1972, 3, 27, 19, 45, 5); // End of Apollo 16 mission\n\nvar CUSTOM_FORMAT_REGEXES = {\n\t// Regexes matching dates where the month would commonly be written with 4-letters\n\t// e.g. Sept 21, june 09, July 7\n\t\"%b %d\": [\n\t\t{\n\t\t\tregex: /^june\\s(30|[12][0-9]|0?[1-9])$/i, // matches dates from June 0-30\n\t\t\ttoDate: function(str) { return new Date(null, 5, str.split(/\\s/)[1]); },\n\t\t},\n\t\t{\n\t\t\tregex: /^july\\s(3[01]|[12][0-9]|0?[1-9])$/i, // matches dates from July 0-31\n\t\t\ttoDate: function(str) { return new Date(null, 6, str.split(/\\s/)[1]); },\n\t\t},\n\t\t{\n\t\t\tregex: /^sept\\s(30|[12][0-9]|0?[1-9])$/i, // matches dates from September 0-30 using the 4-letter 'Sept' abbreviation\n\t\t\ttoDate: function(str) { return new Date(null, 8, str.split(/\\s/)[1]); },\n\t\t},\n\t],\n\t// Regexes matching dates where the month would commonly be written with 4-letters\n\t// e.g. 21 Sept, 09 june, 7 July\n\t\"%d %b\": [\n\t\t{\n\t\t\tregex: /^(0?[1-9]|[1-9][0-9])\\sjune$/i, // matches dates from 0-99 June\n\t\t\ttoDate: function(str) { return new Date(null, 5, str.split(/\\s/)[0]); },\n\t\t},\n\t\t{\n\t\t\tregex: /^(0?[1-9]|[1-9][0-9])\\sjuly$/i, // matches dates from 0-99 July\n\t\t\ttoDate: function(str) { return new Date(null, 6, str.split(/\\s/)[0]); },\n\t\t},\n\t\t{\n\t\t\tregex: /^(0?[1-9]|[1-9][0-9])\\ssept$/i, // matches dates from 0-99 September using the 4-letter 'Sept' abbreviation\n\t\t\ttoDate: function(str) { return new Date(null, 8, str.split(/\\s/)[0]); },\n\t\t},\n\t],\n};\n\n\n// Checks a string against datetime regexes for different strftime date formats so that\n// non-standard datetime strings can still be parsed as dates by d3-time-parse\nfunction customDatetimeParser(strftime_formats) {\n\treturn function(str) {\n\t\tvar parsed_datetime = null;\n\t\tstrftime_formats.forEach(function(strftime_format) {\n\t\t\tvar valid_datetime = str.match(strftime_format.regex);\n\t\t\tif (valid_datetime) parsed_datetime = strftime_format.toDate(str);\n\t\t});\n\t\treturn parsed_datetime;\n\t};\n}\n\nfunction createDatetimeInterpretation(format_string, secondaryTest) {\n\tvar parser = utcParse(format_string);\n\tvar formatter = utcFormat(format_string);\n\tvar test;\n\tif (typeof secondaryTest === \"function\") {\n\t\ttest = shield(function(str) {\n\t\t\treturn (secondaryTest(str, parser(str) !== null));\n\t\t});\n\t}\n\telse {\n\t\ttest = shield(function(str) { return parser(str) !== null; });\n\t}\n\n\treturn Object.freeze({\n\t\ttest: test,\n\t\tparse: shield(function(str) {\n\t\t\treturn parser(str) || (CUSTOM_FORMAT_REGEXES[format_string] ? customDatetimeParser(CUSTOM_FORMAT_REGEXES[format_string])(str) : null);\n\t\t}),\n\t\tformat: function(dt) { return formatter(dt); },\n\t\ttype: \"datetime\",\n\t\tdescription: format_string,\n\t\tid: \"datetime$\" + format_string,\n\t\texample: formatter(EXAMPLE_DATETIME)\n\t});\n}\n\nvar datetime_interpretations = Object.freeze([\n\tcreateDatetimeInterpretation(\"%Y-%m-%dT%H:%M:%S.%LZ\"), // 1972-04-27T10:10:10.303Z\n\tcreateDatetimeInterpretation(\"%Y-%m-%d %H:%M:%S\"), // 1972-04-27 07:45:05\n\tcreateDatetimeInterpretation(\"%Y-%m-%dT%H:%M:%S\"), // 1972-04-27T07:45:05\n\tcreateDatetimeInterpretation(\"%Y-%m-%dT%H:%M:%SZ\"), // 1972-04-27T10:10:10Z\n\n\tcreateDatetimeInterpretation(\"%d/%m/%Y\", function(str, passed_primary_test) { // 27/04/1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"/\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] >= 1000);\n\t}),\n\tcreateDatetimeInterpretation(\"%d/%m/%Y %H:%M\", function(str, passed_primary_test) { // 27/04/1972 19:45\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(/[/ :]/).map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] >= 1000) &&\n\t\t\t(arr[3] >= 0 && arr[3] < 24) && (arr[4] >= 0 && arr[4] < 60);\n\t}),\n\tcreateDatetimeInterpretation(\"%d/%m/%y\", function(str, passed_primary_test) { // 27/04/72\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"/\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (!isNaN(arr[2]));\n\t}),\n\tcreateDatetimeInterpretation(\"%m/%d/%Y\", function(str, passed_primary_test) { // 04/27/1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"/\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (arr[2] >= 1000);\n\t}),\n\tcreateDatetimeInterpretation(\"%m/%d/%Y %H:%M\", function(str, passed_primary_test) { // 04/27/1972 19:45\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(/[/ :]/).map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (arr[2] >= 1000) &&\n\t\t\t(arr[3] >= 0 && arr[3] < 24) && (arr[4] >= 0 && arr[4] < 60);\n\t}),\n\tcreateDatetimeInterpretation(\"%m/%d/%y\", function(str, passed_primary_test) { // 04/27/72\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"/\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (!isNaN(arr[2]));\n\t}),\n\tcreateDatetimeInterpretation(\"%Y/%m/%d\", function(str, passed_primary_test) { // 1972/04/27\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"/\").map(parseFloat);\n\t\treturn (arr[0] >= 1000) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] > 0 && arr[2] <= 31);\n\t}),\n\n\tcreateDatetimeInterpretation(\"%d-%m-%Y\", function(str, passed_primary_test) { // 27-04-1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"-\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] >= 1000);\n\t}),\n\tcreateDatetimeInterpretation(\"%d-%m-%y\", function(str, passed_primary_test) { // 27-04-72\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"-\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (!isNaN(arr[2]));\n\t}),\n\n\tcreateDatetimeInterpretation(\"%d.%m.%Y\", function(str, passed_primary_test) { // 27.04.1972\n\t\tif (!passed_primary_test) return false;\n\n\t\tvar arr = str.split(\".\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] >= 1000);\n\t}),\n\n\tcreateDatetimeInterpretation(\"%m.%d.%y\", function(str, passed_primary_test) { // 04.27.72\n\t\tif (!passed_primary_test) return false;\n\n\t\tvar arr = str.split(\".\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (!isNaN(arr[2]));\n\t}),\n\n\tcreateDatetimeInterpretation(\"%m-%d-%Y\", function(str, passed_primary_test) { // 04-27-1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"-\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (arr[2] >= 1000);\n\t}),\n\tcreateDatetimeInterpretation(\"%m-%d-%y\", function(str, passed_primary_test) { // 04-27-72\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"-\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 12) && (arr[1] > 0 && arr[1] <= 31) && (!isNaN(arr[2]));\n\t}),\n\tcreateDatetimeInterpretation(\"%Y-%m-%d\", function(str, passed_primary_test) { // 1972-04-27\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"-\").map(parseFloat);\n\t\treturn (arr[0] >= 1000) && (arr[1] > 0 && arr[1] <= 12) && (arr[2] > 0 && arr[2] <= 31);\n\t}),\n\tcreateDatetimeInterpretation(\"%Y-%m\", function(str, passed_primary_test) { // 1972-04\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"-\").map(parseFloat);\n\t\treturn (arr[0] >= 1000) && (arr[1] > 0 && arr[1] <= 12);\n\t}),\n\n\tcreateDatetimeInterpretation(\"%d %b %Y\", function(str, passed_primary_test) { // 27 Apr 1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\" \").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 31) && (arr[2] >= 1000);\n\t}),\n\tcreateDatetimeInterpretation(\"%d %B %Y\", function(str, passed_primary_test) { // 27 April 1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\" \").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 31) && (arr[2] >= 1000);\n\t}),\n\tcreateDatetimeInterpretation(\"%d %b %y\"), // 27 Apr 72\n\tcreateDatetimeInterpretation(\"%-d %b ’%y\"), // 27 Apr ’72\n\tcreateDatetimeInterpretation(\"%d %B %y\"), // 27 April 72\n\tcreateDatetimeInterpretation(\"%d-%b-%Y\", function(str, passed_primary_test) { // 27-Apr-1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"-\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 31) && (arr[2] >= 1000);\n\t}),\n\tcreateDatetimeInterpretation(\"%d-%B-%Y\", function(str, passed_primary_test) { // 27-April-1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"-\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 31) && (arr[2] >= 1000);\n\t}),\n\tcreateDatetimeInterpretation(\"%d-%b-%y\"), // 27-Apr-72\n\tcreateDatetimeInterpretation(\"%d-%B-%y\"), // 27-April-72\n\n\tcreateDatetimeInterpretation(\"%m/%Y\", function(str, passed_primary_test) { // 04/1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"/\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 12) && (arr[1] >= 1000);\n\t}),\n\tcreateDatetimeInterpretation(\"%m/%y\"), // 04/72\n\tcreateDatetimeInterpretation(\"%b %Y\", function(str, passed_primary_test) { // Apr 1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\" \").map(parseFloat);\n\t\treturn (arr[1] >= 1000);\n\t}),\n\tcreateDatetimeInterpretation(\"%B %Y\", function(str, passed_primary_test) { // April 1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\" \").map(parseFloat);\n\t\treturn (arr[1] >= 1000);\n\t}),\n\tcreateDatetimeInterpretation(\"%b-%y\"), // Apr-72\n\tcreateDatetimeInterpretation(\"%b %y\"), // Apr 72\n\tcreateDatetimeInterpretation(\"%B %y\"), // April 72\n\tcreateDatetimeInterpretation(\"%b '%y\"), // Apr '72\n\tcreateDatetimeInterpretation(\"%B %-d %Y\"), // April 27 1972\n\n\tcreateDatetimeInterpretation(\"%d %b\", function(str, passed_primary_test) {\n\t\tif (passed_primary_test) return true;\n\t\treturn !!customDatetimeParser(CUSTOM_FORMAT_REGEXES[\"%d %b\"])(str);\n\t}),\n\tcreateDatetimeInterpretation(\"%d %B\"), // 27 April\n\tcreateDatetimeInterpretation(\"%b %d\", function(str, passed_primary_test) {\n\t\tif (passed_primary_test) return true;\n\t\treturn !!customDatetimeParser(CUSTOM_FORMAT_REGEXES[\"%b %d\"])(str);\n\t}),\n\tcreateDatetimeInterpretation(\"%B %d\"), // April 27\n\tcreateDatetimeInterpretation(\"%d-%m\", function(str, passed_primary_test) { // 27-04\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\"-\").map(parseFloat);\n\t\treturn (arr[0] > 0 && arr[0] <= 31) && (arr[1] > 0 && arr[1] <= 12);\n\t}),\n\tcreateDatetimeInterpretation(\"%m-%d\"), // 04-27\n\tcreateDatetimeInterpretation(\"%d/%m\"), // 27/04\n\tcreateDatetimeInterpretation(\"%m/%d\"), // 04/27\n\tcreateDatetimeInterpretation(\"%b %d %Y\"), // Apr 27 1972\n\tcreateDatetimeInterpretation(\"%b %d %Y, %-I.%M%p\"), // Apr 27 1972, 5.30PM\n\n\tcreateDatetimeInterpretation(\"%Y\", function(str, passed_primary_test) { // 1972\n\t\tif (!passed_primary_test) return false;\n\t\tvar val = parseFloat(str);\n\t\treturn val > 1499 && val < 2200;\n\t}),\n\tcreateDatetimeInterpretation(\"%B\"), // April\n\tcreateDatetimeInterpretation(\"%b\"), // Apr\n\n\tcreateDatetimeInterpretation(\"%X\"), // 7:45:05 PM\n\tcreateDatetimeInterpretation(\"%I:%M %p\"), // 07:45 PM\n\tcreateDatetimeInterpretation(\"%-I.%M%p\"), // 7.45PM\n\tcreateDatetimeInterpretation(\"%H:%M\", function(str, passed_primary_test) { // 19:45\n\t\tif (!passed_primary_test) return false;\n\t\tvar arr = str.split(\":\").map(parseFloat);\n\t\treturn arr[0] >= 0 && arr[0] < 24;\n\t}),\n\tcreateDatetimeInterpretation(\"%H:%M:%S\"), // 19:45:05\n\tcreateDatetimeInterpretation(\"%M:%S\"), // 45:05\n\tcreateDatetimeInterpretation(\"%-I%p\"), // 7PM\n\n\tcreateDatetimeInterpretation(\"Q%q %Y\", function(str, passed_primary_test) { // Q2 1972\n\t\tif (!passed_primary_test) return false;\n\t\treturn str.replace(/\\s/g, \"\").length === 6;\n\t}),\n\tcreateDatetimeInterpretation(\"%Y Q%q\", function(str, passed_primary_test) { // 1972 Q2\n\t\tif (!passed_primary_test) return false;\n\t\treturn str.replace(/\\s/g, \"\").length === 6;\n\t})\n]);\n\n\nexport { datetime_interpretations };\n","export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n","export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n","export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": function(x, p) { return (x * 100).toFixed(p); },\n \"b\": function(x) { return Math.round(x).toString(2); },\n \"c\": function(x) { return x + \"\"; },\n \"d\": formatDecimal,\n \"e\": function(x, p) { return x.toExponential(p); },\n \"f\": function(x, p) { return x.toFixed(p); },\n \"g\": function(x, p) { return x.toPrecision(p); },\n \"o\": function(x) { return Math.round(x).toString(8); },\n \"p\": function(x, p) { return formatRounded(x * 100, p); },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n \"x\": function(x) { return Math.round(x).toString(16); }\n};\n","export default function(x) {\n return x;\n}\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n","import { shield } from \"./common.js\";\nimport { formatLocale } from \"d3-format\";\n\n\nfunction getFormatFunction(interp) {\n\tvar decimal = interp.decimal_mark;\n\tvar thousands = interp.thousand_separator;\n\tvar locale = formatLocale({decimal: decimal, thousands: thousands, grouping: [3], currency: [\"\", \"\"]});\n\tvar format, specifier;\n\n\treturn function(value, spec) {\n\t\tif (value === null) return \"\";\n\t\tif (!spec) spec = \",.2f\";\n\t\tif (spec !== specifier) {\n\t\t\tspecifier = spec;\n\t\t\tformat = locale.format(specifier);\n\t\t}\n\t\treturn format(value);\n\t};\n}\n\n\n// https://stackoverflow.com/a/16148273\nvar comma_point = {\n\ttest: shield(function(str) { return /^(\\+|-)?\\d{1,3}(,\\d{3})*(\\.\\d+)?((e|E)(\\+|-)?\\d+)?$/.test(str.trim()); }),\n\tparse: shield(function(str) { return parseFloat(str.replace(/,/g, \"\")); }),\n\tdescription: \"Comma thousand separator, point decimal mark\",\n\tthousand_separator: \",\",\n\tdecimal_mark: \".\",\n\tid: \"number$comma_point\",\n\texample: \"12,235.56\"\n};\n\nvar space_point = {\n\ttest: shield(function(str) { return /^(\\+|-)?\\d{1,3}(\\s\\d{3})*(\\.\\d+)?((e|E)(\\+|-)?\\d+)?$/.test(str.trim()); }),\n\tparse: shield(function(str) { return parseFloat(str.replace(/\\s/g, \"\")); }),\n\tdescription: \"Space thousand separator, point decimal mark\",\n\tthousand_separator: \" \",\n\tdecimal_mark: \".\",\n\tid: \"number$space_point\",\n\texample: \"12 235.56\"\n};\n\nvar none_point = {\n\ttest: shield(function(str) { return /^(\\+|-)?\\d+(\\.\\d+)?((e|E)(\\+|-)?\\d+)?$/.test(str.trim()); }),\n\tparse: shield(function(str) { return parseFloat(str); }),\n\tdescription: \"No thousand separator, point decimal mark\",\n\tthousand_separator: \"\",\n\tdecimal_mark: \".\",\n\tid: \"number$none_point\",\n\texample: \"12235.56\"\n};\n\n\nvar point_comma = {\n\ttest: shield(function(str) { return /^(\\+|-)?\\d{1,3}(\\.\\d{3})*(,\\d+)?((e|E)(\\+|-)?\\d+)?$/.test(str.trim()); }),\n\tparse: shield(function(str) { return parseFloat(str.replace(/\\./g, \"\").replace(/,/, \".\")); }),\n\tdescription: \"Point thousand separator, comma decimal mark\",\n\tthousand_separator: \".\",\n\tdecimal_mark: \",\",\n\tid: \"number$point_comma\",\n\texample: \"12.235,56\"\n};\n\nvar space_comma = {\n\ttest: shield(function(str) { return /^(\\+|-)?\\d{1,3}(\\s\\d{3})*(,\\d+)?((e|E)(\\+|-)?\\d+)?$/.test(str.trim()); }),\n\tparse: shield(function(str) { return parseFloat(str.replace(/\\s/g, \"\").replace(/,/, \".\")); }),\n\tdescription: \"Space thousand separator, comma decimal mark\",\n\tthousand_separator: \" \",\n\tdecimal_mark: \",\",\n\tid: \"number$space_comma\",\n\texample: \"12 235,56\"\n};\n\nvar none_comma = {\n\ttest: shield(function(str) { return /^(\\+|-)?\\d+(,\\d+)?((e|E)(\\+|-)?\\d+)?$/.test(str.trim()); }),\n\tparse: shield(function(str) { return parseFloat(str.replace(/,/, \".\")); }),\n\tdescription: \"No thousand separator, comma decimal mark\",\n\tthousand_separator: \"\",\n\tdecimal_mark: \",\",\n\tid: \"number$none_comma\",\n\texample: \"12235,56\"\n};\n\n\nvar number_interpretations = Object.freeze([\n\tcomma_point,\n\tspace_point,\n\tpoint_comma,\n\tspace_comma,\n\tnone_point,\n\tnone_comma\n]);\n\nnumber_interpretations.forEach(function(interp) {\n\tinterp.type = \"number\";\n\tinterp.format = getFormatFunction(interp);\n\tObject.freeze(interp);\n});\n\n\nexport { number_interpretations };\n","import { notAStringError } from \"./common.js\";\n\n\nvar string_interpretation = Object.freeze({\n\ttest: function(str) { return typeof str === \"string\" ? true : notAStringError(str); },\n\tparse: function(str) { return typeof str === \"string\" ? str : notAStringError(str); },\n\tformat: function(str) { if (typeof str === \"string\") return str; },\n\ttype: \"string\",\n\tdescription: \"Arbitrary string\",\n\tid: \"string$arbitrary_string\"\n});\n\n\nexport { string_interpretation };\n","import { datetime_interpretations } from \"./types/datetime.js\";\nimport { number_interpretations } from \"./types/number.js\";\nimport { string_interpretation } from \"./types/string.js\";\n\nvar INTERPRETATION_OPTIONS = Object.freeze({\n\tdatetime: datetime_interpretations,\n\tnumber: number_interpretations,\n});\n\nvar DEFAULT_INTERPRETATIONS_ARRAY = Object.freeze([ \"datetime\", \"number\", \"string\" ]);\n\nvar DEFAULT_OPTIONS = Object.freeze({\n\tn_max: 250,\n\tn_failing_values: 0,\n\tfailure_fraction: 5 / 100,\n\tsort: true\n});\n\nvar OPTION_KEYS = Object.freeze(Object.keys(DEFAULT_OPTIONS));\n\n\nfunction snakeToCamel(snake_string) {\n\treturn snake_string.replace(/_(\\w)/g, function(match, capture) {\n\t\treturn capture.toUpperCase();\n\t});\n}\n\n\nfunction noSort(a, b) { return a.index - b.index; }\nfunction sortBySuccess(a, b) { return b.n_success - a.n_success || noSort(a, b); }\n\n\nfunction trim(value) {\n\treturn (\"\" + value).trim();\n}\n\n\nfunction createAccessorFunction(accessor) {\n\tif (accessor === undefined) return function(value) { return trim(value); };\n\tif (typeof accessor === \"function\") return function(value, index) { return trim(accessor(value, index)); };\n\treturn function(value) { return trim(value[\"\" + accessor]); };\n}\n\n\nexport function createInterpreter(interpretations_array) {\n\tif (!interpretations_array) interpretations_array = DEFAULT_INTERPRETATIONS_ARRAY;\n\telse if (!Array.isArray(interpretations_array)) interpretations_array = [interpretations_array];\n\n\tvar interpretations = interpretations_array.reduce(function(arr, interp_string) {\n\t\tvar interps = INTERPRETATION_OPTIONS[interp_string];\n\t\tif (interps) Array.prototype.push.apply(arr, interps);\n\t\treturn arr;\n\t}, []);\n\n\tvar include_string = interpretations_array.indexOf(\"string\") !== -1;\n\n\tvar options = OPTION_KEYS.reduce(function(obj, key) {\n\t\tobj[key] = DEFAULT_OPTIONS[key];\n\t\treturn obj;\n\t}, {});\n\n\tvar interpreter = function(input_array, accessor) {\n\t\taccessor = createAccessorFunction(accessor);\n\t\tvar data = input_array.map(accessor).filter(function(x) { return x; });\n\t\tif (!data.length) return include_string ? [string_interpretation] : [];\n\t\tvar n = Math.min(options.n_max, data.length);\n\t\tvar n_max_failure = Math.floor(n * options.failure_fraction);\n\t\tvar n_failing_values = options.n_failing_values;\n\t\tvar sortMethod = options.sort ? sortBySuccess : noSort;\n\n\t\tvar valid_interpreters = interpretations.slice()\n\t\t.reduce(function(keep, interp, index) {\n\t\t\tvar n_fail = i = 0;\n\t\t\tvar failing_values = [];\n\t\t\tvar complete_failure = false;\n\n\t\t\tfor (var i = 0; i < n; i++) {\n\t\t\t\tvar val = data[i];\n\t\t\t\tvar is_valid = interp.test(val);\n\t\t\t\tif (is_valid) continue;\n\t\t\t\tif (++n_fail > n_max_failure) complete_failure = true;\n\t\t\t\telse if (failing_values.indexOf(val) === -1) {\n\t\t\t\t\tfailing_values.push(val);\n\t\t\t\t\tif (failing_values.length > n_failing_values) complete_failure = true;\n\t\t\t\t}\n\t\t\t\tif (complete_failure) break;\n\t\t\t}\n\n\t\t\tif (!complete_failure) keep.push({ interp: interp, n_success: n - n_fail, index: index });\n\n\t\t\treturn keep;\n\t\t}, [])\n\t\t.sort(sortMethod)\n\t\t.map(function(valid) {\n\t\t\treturn valid.interp;\n\t\t});\n\n\t\tif (include_string) valid_interpreters.push(string_interpretation);\n\n\t\treturn valid_interpreters;\n\t};\n\n\tOPTION_KEYS.forEach(function(option) {\n\t\tinterpreter[snakeToCamel(option)] = function(value) {\n\t\t\tif (value === undefined) return options[option];\n\t\t\toptions[option] = value;\n\t\t\treturn interpreter;\n\t\t};\n\t});\n\n\treturn interpreter;\n}\n\n\ncreateInterpreter.DATETIME_IDS = Object.freeze(datetime_interpretations.map(function(d) { return d.id; }));\ncreateInterpreter.NUMBER_IDS = Object.freeze(number_interpretations.map(function(d) { return d.id; }));\ncreateInterpreter.STRING_IDS = Object.freeze([string_interpretation.id]);\n\n\ncreateInterpreter.getInterpretation = (function() {\n\tvar interpretations = datetime_interpretations.concat(number_interpretations, string_interpretation);\n\tvar lookup = interpretations.reduce(function(l, d) { l[d.id] = d;\treturn l;\t}, {});\n\treturn function(id) { return lookup[id]; };\n})();\n\n\ncreateInterpreter._createAccessorFunction = createAccessorFunction;\n\n\nexport var recognised_formats = INTERPRETATION_OPTIONS;\n\n","/* * * * * * GENERATED FILE - DO NOT EDIT * * * * * *\n * * * * * * GENERATED FILE - DO NOT EDIT * * * * * *\n * * * * * * GENERATED FILE - DO NOT EDIT * * * * * */\n \nexport default {\n\t\"de\": {\n\t\tcredits: {\n\t\t\t\"default\": \"Erstellt mit Flourish\",\n\t\t},\n\t},\n\t\"en\": {\n\t\tcredits: {\n\t\t\t\"default\": { text: \"A Flourish data visualization\", url: \"https://flourish.studio/\" },\n\t\t\t\"annotator\": { text: \"Interactive content by Flourish\", url: \"https://app.flourish.studio/@flourish/svg-annotator\" },\n\t\t\t\"bar-chart-race\": { text: \"A Flourish bar chart race\", url: \"https://flourish.studio/visualisations/bar-chart-race/\" },\n\t\t\t\"bubble-chart\": { text: \"A Flourish bubble chart\", url: \"https://flourish.studio/blog/introducing-bubble-chart-template/\" },\n\t\t\t\"cards\": { text: \"Interactive content by Flourish\", url: \"https://flourish.studio/blog/cards-template/\" },\n\t\t\t\"chart\": { text: \"A Flourish chart\", url: \"https://flourish.studio/visualisations/line-bar-pie-charts/\" },\n\t\t\t\"chord\": { text: \"A Flourish chord diagram\", url: \"https://flourish.studio/blog/how-to-make-a-chord-diagram/\" },\n\t\t\t\"countdown\": { text: \"Interactive content by Flourish\", url: \"https://flourish.studio/blog/number-ticker-countdown-templates/\" },\n\t\t\t\"data-explorer\": { text: \"A Flourish data explorer\", url: \"https://flourish.studio/blog/data-explorer-template/\" },\n\t\t\t\"draw\": { text: \"Interactive content by Flourish\", url: \"https://flourish.studio/blog/draw-the-line-chart/\" },\n\t\t\t\"election\": { text: \"A Flourish election chart\", url: \"https://app.flourish.studio/@flourish/election-results-chart\" },\n\t\t\t\"gantt\": { text: \"A Flourish gantt chart\", url: \"https://flourish.studio/blog/gantt-chart-template/\" },\n\t\t\t\"gauge\": { text: \"A Flourish gauge visualization\", url: \"https://flourish.studio/visualisations/gauge/\" },\n\t\t\t\"globe\": { text: \"A Flourish connections globe\", url: \"https://flourish.studio/visualisations/maps/\" },\n\t\t\t\"heatmap\": { text: \"A Flourish heatmap\", url: \"https://flourish.studio/visualisations/heatmaps/\" },\n\t\t\t\"hierarchy\": { text: \"A Flourish hierarchy chart\", url: \"https://flourish.studio/visualisations/treemaps/\" },\n\t\t\t\"map\": { text: \"A Flourish map\", url: \"https://flourish.studio/visualisations/maps/\" },\n\t\t\t\"marimekko\": { text: \"A Flourish marimekko chart\", url: \"https://flourish.studio/visualisations/marimekko-charts/\" },\n\t\t\t\"model\": { text: \"Interactive content by Flourish\", url: \"https://app.flourish.studio/@flourish/3d-viewer\" },\n\t\t\t\"network\": { text: \"A Flourish network chart\", url: \"https://flourish.studio/visualisations/network-charts/\" },\n\t\t\t\"number-ticker\": { text: \"Interactive content by Flourish\", url: \"https://flourish.studio/blog/number-ticker-countdown-templates/\" },\n\t\t\t\"parliament\": { text: \"A Flourish election chart\", url: \"https://flourish.studio/blog/how-to-make-parliament-chart/\" },\n\t\t\t\"photo-slider\": { text: \"Interactive content by Flourish\", url: \"https://app.flourish.studio/@flourish/photo-slider\" },\n\t\t\t\"pictogram\": { text: \"A Flourish pictogram\", url: \"https://flourish.studio/blog/pictogram-isotype/\" },\n\t\t\t\"quiz\": { text: \"A Flourish quiz\", url: \"https://app.flourish.studio/@flourish/quiz\" },\n\t\t\t\"radar\": { text: \"A Flourish radar chart\", url: \"https://flourish.studio/blog/create-online-radar-spider-charts/\" },\n\t\t\t\"ranking\": { text: \"A Flourish line chart race\", url: \"https://flourish.studio/blog/line-chart-race-updates/\" },\n\t\t\t\"sankey\": { text: \"A Flourish sankey chart\", url: \"https://flourish.studio/visualisations/sankey-charts/\" },\n\t\t\t\"scatter\": { text: \"A Flourish scatter chart\", url: \"https://flourish.studio/visualisations/scatter-charts/\" },\n\t\t\t\"slope\": { text: \"A Flourish slope chart\", url: \"https://flourish.studio/visualisations/slope-charts/\" },\n\t\t\t\"sports\": { text: \"A Flourish sports visualization\", url: \"https://app.flourish.studio/@flourish/sports-race\" },\n\t\t\t\"survey\": { text: \"A Flourish survey visualization\", url: \"https://flourish.studio/visualisations/survey-data/\" },\n\t\t\t\"table\": { text: \"A Flourish table\", url: \"https://flourish.studio/visualisations/create-a-table/\" },\n\t\t\t\"timeline\": { text: \"Interactive content by Flourish\", url: \"https://flourish.studio/blog/responsive-interactive-timeline/\" },\n\t\t\t\"text-annotator\": { text: \"Interactive content by Flourish\", url: \"https://flourish.studio/blog/text-annotator-template/\" },\n\t\t\t\"tournament\": { text: \"Interactive content by Flourish\", url: \"https://flourish.studio/visualisations/tournament-chart/\" },\n\t\t\t\"word-cloud\": { text: \"A Flourish data visualization\", url: \"https://flourish.studio/blog/online-wordcloud-custom-fonts/\" },\n\t\t}\n\t},\n\t\"es\": {\n\t\tcredits: {\n\t\t\t\"default\": \"Creado con Flourish\",\n\t\t\t\"bar_race\": { text: \"Creado con Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\" },\n\t\t\t\"bar-chart-race\": { text: \"Creado con Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\" },\n\t\t},\n\t},\n\t\"fr\": {\n\t\tcredits: {\n\t\t\t\"default\": \"Créé avec Flourish\",\n\t\t\t\"bar_race\": { text: \"Créé avec Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\" },\n\t\t\t\"bar-chart-race\": { text: \"Créé avec Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\" },\n\t\t},\n\t},\n\t\"it\": {\n\t\tcredits: {\n\t\t\t\"default\": \"Creato con Flourish\",\n\t\t\t\"bar_race\": { text: \"Creato con Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\" },\n\t\t\t\"bar-chart-race\": { text: \"Creato con Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\" },\n\t\t}\n\t},\n\t\"mi\": {\n\t\tcredits: {\n\t\t\t\"default\": \"Hangaia ki te Flourish\",\n\t\t\t\"bar_race\": { text: \"Hangaia ki te Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\" },\n\t\t\t\"bar-chart-race\": { text: \"Hangaia ki te Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\" },\n\t\t},\n\t},\n\t\"nl\": {\n\t\tcredits: {\n\t\t\t\"default\": \"Gemaakt met Flourish\",\n\t\t\t\"bar_race\": { text: \"Gemaakt met Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\" },\n\t\t\t\"bar-chart-race\": { text: \"Gemaakt met Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\" },\n\t\t},\n\t},\n\t\"pt\": {\n\t\t\"default\": \"Feito com Flourish\",\n\t\t\"bar_race\": { text: \"Feito com Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\"},\n\t\t\"bar-chart-race\": { text: \"Feito com Flourish\", url: \"https://flourish.studio/visualisations/bar-chart-race/\"}\n\t}\n};\n","/* * * * * * GENERATED FILE - DO NOT EDIT * * * * * *\n * * * * * * GENERATED FILE - DO NOT EDIT * * * * * *\n * * * * * * GENERATED FILE - DO NOT EDIT * * * * * */\n \nimport localizations from \"./localizations\";\n\nexport function createFlourishCredit(credit_url, query_string, public_url, credit_text) {\n\tcredit_url = credit_url || \"https://flourish.studio\",\n\tquery_string = query_string || \"?utm_source=api&utm_campaign=\" + window.location.href,\n\tpublic_url = public_url || \"https://public.flourish.studio/\",\n\tcredit_text = credit_text || \"A Flourish data visualization\";\n\n\tvar credit = document.createElement(\"div\");\n\tcredit.setAttribute(\"class\", \"flourish-credit\");\n\tcredit.setAttribute(\"style\", \"width:100%!important;margin:0 0 4px!important;text-align:right!important;font-family:Helvetica,sans-serif!important;color:#888!important;font-size:11px!important;font-weight:bold!important;font-style:normal!important;-webkit-font-smoothing:antialiased!important;box-shadow:none!important;\");\n\n\tvar a = document.createElement(\"a\");\n\ta.setAttribute(\"href\", credit_url + query_string);\n\ta.setAttribute(\"target\", \"_top\");\n\ta.setAttribute(\"style\", \"display:inline-block!important;text-decoration:none!important;font:inherit!important;color:inherit!important;border:none!important;margin:0 5px!important;box-shadow:none!important;\");\n\tcredit.appendChild(a);\n\n\tvar img = document.createElement(\"img\");\n\timg.setAttribute(\"alt\", \"Flourish logo\");\n\timg.setAttribute(\"src\", public_url + \"resources/bosh.svg\");\n\timg.setAttribute(\"style\", \"font:inherit!important;width:auto!important;height:12px!important;border:none!important;margin:0 2px 0!important;vertical-align:middle!important;display:inline-block!important;box-shadow:none!important;\");\n\ta.appendChild(img);\n\n\tvar span = document.createElement(\"span\");\n\tspan.setAttribute(\"style\", \"font:inherit!important;color:#888!important;vertical-align:middle!important;display:inline-block!important;box-shadow:none!important;\");\n\tspan.appendChild(document.createTextNode(credit_text));\n\ta.appendChild(span);\n\n\treturn credit;\n}\n\nexport function getLocalizedCreditTextAndUrl(lang, credit_key) {\n\tvar credit_text, credit_url;\n\tlang = lang || \"en\", credit_key = credit_key || \"\";\n\tcredit_text = localizations[lang].credits[credit_key] || localizations.en.credits[credit_key] || localizations.en.credits.default;\n\tif (typeof credit_text == \"object\") {\n\t\tif (credit_text.url) credit_url = credit_text.url;\n\t\tcredit_text = credit_text.text;\n\t}\n\treturn {\n\t\tcredit_text: credit_text,\n\t\tcredit_url: credit_url\n\t};\n}\n","/* * * * * * GENERATED FILE - DO NOT EDIT * * * * * *\n * * * * * * GENERATED FILE - DO NOT EDIT * * * * * *\n * * * * * * GENERATED FILE - DO NOT EDIT * * * * * */\n \n// Embedded code - must work in IE\nvar enabled = false;\n\nfunction getLocationData() {\n\tvar data = {};\n\tif (window._Flourish_template_id) {\n\t\tdata.template_id = window._Flourish_template_id;\n\t}\n\tif (window.Flourish && window.Flourish.app && window.Flourish.app.loaded_template_id) {\n\t\tdata.template_id = window.Flourish.app.loaded_template_id;\n\t}\n\n\tif (window._Flourish_visualisation_id) {\n\t\tdata.visualisation_id = window._Flourish_visualisation_id;\n\t}\n\tif (window.Flourish && window.Flourish.app && window.Flourish.app.loaded_visualisation) {\n\t\tdata.visualisation_id = window.Flourish.app.loaded_visualisation.id;\n\t}\n\n\tif (window.Flourish && window.Flourish.app && window.Flourish.app.story) {\n\t\tdata.story_id = window.Flourish.app.story.id;\n\t\tdata.slide_count = window.Flourish.app.story.slides.length;\n\t}\n\n\tif (window.Flourish && window.Flourish.app && window.Flourish.app.current_slide) {\n\t\t// One indexed\n\t\tdata.slide_index = window.Flourish.app.current_slide.index + 1;\n\t}\n\treturn data;\n}\n\nexport function sendCustomerAnalyticsMessage(message) {\n\tif (!enabled) return;\n\tif (window.top === window.self) return;\n\n\tvar embedded_window = window;\n\tif (embedded_window.location.pathname === \"srcdoc\") embedded_window = embedded_window.parent;\n\n\tvar location_data = getLocationData();\n\n\tvar message_with_metadata = {\n\t\tsender: \"Flourish\",\n\t\tmethod: \"customerAnalytics\"\n\t};\n\n\tfor (var key in location_data) {\n\t\tif (location_data.hasOwnProperty(key)) {\n\t\t\tmessage_with_metadata[key] = location_data[key];\n\t\t}\n\t}\n\n\tfor (var key in message) {\n\t\tif (message.hasOwnProperty(key)) {\n\t\t\tmessage_with_metadata[key] = message[key];\n\t\t}\n\t}\n\n\tembedded_window.parent.postMessage(JSON.stringify(message_with_metadata), \"*\");\n}\n\nexport function addAnalyticsListener(callback) {\n\tif (typeof callback !== \"function\") {\n\t\tthrow new Error(\"Analytics callback is not a function\");\n\t}\n\twindow.Flourish._analytics_listeners.push(callback);\n}\n\nexport function removeAnalyticsListener(callback) {\n\tif (typeof callback !== \"function\") {\n\t\tthrow new Error(\"Analytics callback is not a function\");\n\t}\n\n\twindow.Flourish._analytics_listeners = window.Flourish._analytics_listeners.filter(function(listener) {\n\t\treturn callback !== listener;\n\t});\n}\n\nexport function dispatchAnalyticsEvent(message) {\n\t// If the window.Flourish object hasn't been created by the customer, they\n\t// can't be listening for analytics events\n\tif (!window.Flourish) return;\n\n\twindow.Flourish._analytics_listeners.forEach(function(listener) {\n\t\tlistener(message);\n\t});\n}\n\nexport function initCustomerAnalytics() {\n\tenabled = true;\n\n\tvar events = [\n\t\t{\n\t\t\tevent_name: \"click\",\n\t\t\taction_name: \"click\",\n\t\t\tuse_capture: true\n\t\t},\n\t\t{\n\t\t\tevent_name: \"keydown\",\n\t\t\taction_name: \"key_down\",\n\t\t\tuse_capture: true\n\t\t},\n\t\t{\n\t\t\tevent_name: \"mouseenter\",\n\t\t\taction_name: \"mouse_enter\",\n\t\t\tuse_capture: false\n\t\t},\n\t\t{\n\t\t\tevent_name: \"mouseleave\",\n\t\t\taction_name: \"mouse_leave\",\n\t\t\tuse_capture: false\n\t\t}\n\t];\n\n\tevents.forEach(function(event) {\n\t\tdocument.body.addEventListener(event.event_name, function() {\n\t\t\tsendCustomerAnalyticsMessage({\n\t\t\t\taction: event.action_name\n\t\t\t});\n\t\t}, event.use_capture);\n\t});\n}\n\n","/* * * * * * GENERATED FILE - DO NOT EDIT * * * * * *\n * * * * * * GENERATED FILE - DO NOT EDIT * * * * * *\n * * * * * * GENERATED FILE - DO NOT EDIT * * * * * */\n \nexport default parseQueryParams;\n\nfunction parseQueryParams() {\n\t// Query string parameters\n\tvar location = window.location;\n\t// We use srcdoc to load the decrypted content for password-protected projects,\n\t// which creates a nested window.\n\tif (location.href == \"about:srcdoc\") location = window.parent.location;\n\tvar params = {};\n\t(function (query, re, match) {\n\t\twhile (match = re.exec(query)) {\n\t\t\tparams[decodeURIComponent(match[1])] = decodeURIComponent(match[2]);\n\t\t}\n\t})(location.search.substring(1).replace(/\\+/g, \"%20\"), /([^&=]+)=?([^&]*)/g);\n\treturn params;\n}\n","/* * * * * * GENERATED FILE - DO NOT EDIT * * * * * *\n * * * * * * GENERATED FILE - DO NOT EDIT * * * * * *\n * * * * * * GENERATED FILE - DO NOT EDIT * * * * * */\n \n/* This file is used by the story player, and must be IE-compatible */\n\nimport {\n\tinitCustomerAnalytics,\n\taddAnalyticsListener,\n\tsendCustomerAnalyticsMessage\n} from \"./customer_analytics\";\nimport parseQueryParams from \"./parse_query_params\";\n\nvar is_fixed_height;\nvar is_amp;\n\nfunction isFixedHeight() {\n\tif (is_fixed_height == undefined) {\n\t\tvar params = parseQueryParams();\n\t\t// \"referrer\" in params implies this is an Embedly embed\n\t\t// Check whether embedding site is known to support dynamic resizing\n\t\tif (\"referrer\" in params) is_fixed_height = /^https:\\/\\/medium.com\\//.test(params.referrer);\n\t\telse is_fixed_height = !(\"auto\" in params);\n\t}\n\treturn is_fixed_height;\n}\n\nfunction getHeightForBreakpoint(width) {\n\tvar breakpoint_width = width || window.innerWidth;\n\tif (breakpoint_width > 999) return 650;\n\tif (breakpoint_width > 599) return 575;\n\treturn 400;\n}\n\nfunction initScrolly(opts) {\n\tif (!opts) return;\n\tif (window.top === window.self) return;\n\tvar embedded_window = window;\n\tif (embedded_window.location.pathname == \"srcdoc\") embedded_window = embedded_window.parent;\n\tvar message = {\n\t\tsender: \"Flourish\",\n\t\tmethod: \"scrolly\",\n\t};\n\tif (opts) {\n\t\tfor (var name in opts) message[name] = opts[name];\n\t}\n\tembedded_window.parent.postMessage(JSON.stringify(message), \"*\");\n}\n\nfunction notifyParentWindow(height, opts) {\n\tif (window.top === window.self) return;\n\tvar embedded_window = window;\n\tif (embedded_window.location.pathname == \"srcdoc\") embedded_window = embedded_window.parent;\n\tif (is_amp) {\n\t\t// Message is not stringified for AMP\n\t\theight = parseInt(height, 10);\n\t\tembedded_window.parent.postMessage({\n\t\t\tsentinel: \"amp\",\n\t\t\ttype: \"embed-size\",\n\t\t\theight: height,\n\t\t}, \"*\");\n\t\treturn;\n\t}\n\tvar message = {\n\t\tsender: \"Flourish\",\n\t\tcontext: \"iframe.resize\",\n\t\tmethod: \"resize\", // backwards compatibility\n\t\theight: height,\n\t\tsrc: embedded_window.location.toString(),\n\t};\n\tif (opts) {\n\t\tfor (var name in opts) message[name] = opts[name];\n\t}\n\tembedded_window.parent.postMessage(JSON.stringify(message), \"*\");\n}\n\nfunction isSafari() {\n\t// Some example user agents:\n\t// Safari iOS: Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1\n\t// Chrome OS X: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\n\t// Embedded WkWebview on iOS: Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16D5039a\n\treturn (navigator.userAgent.indexOf(\"Safari\") !== -1 || navigator.userAgent.indexOf(\"iPhone\") !== -1) && navigator.userAgent.indexOf(\"Chrome\") == -1;\n}\n\nfunction isString(s) {\n\treturn typeof s === \"string\" || s instanceof String;\n}\n\nfunction isPossibleHeight(n) {\n\tif (typeof n === \"number\") {\n\t\treturn !isNaN(n) && (n >= 0);\n\t}\n\telse if (isString(n)) {\n\t\t// First regex checks there is at least one digit in n and rejectsedge cases like \"\" and \"px\" that would pass second regex\n\t\t// Given first regex, second regex makes sure that n is either a pure number or a number with a valid CSS unit\n\t\t// Units based on https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths plus %\n\t\treturn /\\d/.test(n) && /^[0-9]*(\\.[0-9]*)?(cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%)?$/i.test(n);\n\t}\n\treturn false;\n}\n\nfunction validateWarnMessage(message) {\n\tif (message.method !== \"warn\") {\n\t\tconsole.warn(\"BUG: validateWarnMessage called for method\" + message.method);\n\t\treturn false;\n\t}\n\tif ((message.message != null) && !isString(message.message)) return false;\n\tif ((message.explanation != null) && !isString(message.explanation)) return false;\n\treturn true;\n}\n\nfunction validateResizeMessage(message) {\n\tif (message.method !== \"resize\") {\n\t\tconsole.warn(\"BUG: validateResizeMessage called for method\" + message.method);\n\t\treturn false;\n\t}\n\tif (!isString(message.src)) return false;\n\tif (!isString(message.context)) return false;\n\tif (!isPossibleHeight(message.height)) return false;\n\treturn true;\n}\n\nfunction validateSetSettingMessage(_message) {\n\tthrow new Error(\"Validation for setSetting is not implemented yet; see issue #4328\");\n}\n\nfunction validateScrolly(message) {\n\tif (message.method !== \"scrolly\") {\n\t\tconsole.warn(\"BUG: validateScrolly called for method\" + message.method);\n\t\treturn false;\n\t}\n\tif (!Array.isArray(message.slides)) return false;\n\treturn true;\n}\n\nfunction validateCustomerAnalyticsMessage(message) {\n\tif (message.method !== \"customerAnalytics\") {\n\t\tconsole.warn(\"BUG: validateCustomerAnalyticsMessage called for method\" + message.method);\n\t\treturn false;\n\t}\n\t// We don't consume customer analytics messages; they're just passed\n\t// on, and their structure is up to the customer, so there's no\n\t// point in validating them.\n\treturn true;\n}\n\nfunction validateRequestUpload(message) {\n\tif (message.method !== \"request-upload\") {\n\t\tconsole.warn(\"BUG: validateResizeMessage called for method\" + message.method);\n\t\treturn false;\n\t}\n\t// FIXME: when adding validation for setSetting (see above) we should\n\t// also validate that this is a valid setting name of appropriate type\n\tif (!isString(message.name)) return false;\n\tif (!(message.accept == null || isString(message.accept))) return false;\n\treturn true;\n}\n\nfunction getMessageValidators(methods) {\n\tvar available_message_validators = {\n\t\t\"warn\": validateWarnMessage,\n\t\t\"resize\": validateResizeMessage,\n\t\t\"setSetting\": validateSetSettingMessage,\n\t\t\"customerAnalytics\": validateCustomerAnalyticsMessage,\n\t\t\"request-upload\": validateRequestUpload,\n\t\t\"scrolly\": validateScrolly\n\t};\n\tvar validators = {};\n\tfor (var i = 0; i < methods.length; i++) {\n\t\tvar method = methods[i];\n\t\tif (available_message_validators[method]) {\n\t\t\tvalidators[method] = available_message_validators[method];\n\t\t}\n\t\telse {\n\t\t\tthrow new Error(\"No validator found for method \" + method);\n\t\t}\n\t}\n\treturn validators;\n}\n\nfunction startEventListeners(callback, allowed_methods, embed_domain) {\n\tvar message_validators = getMessageValidators(allowed_methods);\n\twindow.addEventListener(\"message\", function(event) {\n\t\tvar is_accepted_event_origin = (function () {\n\t\t\tif (event.origin == document.location.origin) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// If company has configured a custom origin for downloaded projects, allow it\n\t\t\tif (embed_domain) {\n\t\t\t\tconst origin = event.origin.toLowerCase();\n\t\t\t\tembed_domain = embed_domain.toLowerCase();\n\n\t\t\t\t// Allow the domain itself…\n\t\t\t\tif (origin.endsWith(\"//\" + embed_domain)) return true;\n\n\t\t\t\t// and subdomains\n\t\t\t\tif (origin.endsWith(\".\" + embed_domain)) return true;\n\t\t\t}\n\t\t\tif (event.origin.match(/\\/\\/localhost:\\d+$|\\/\\/(?:public|app)\\.flourish.devlocal$|\\/\\/flourish-api\\.com$|\\.flourish\\.(?:local(:\\d+)?|net|rocks|studio)$|\\.uri\\.sh$|\\/\\/flourish-user-templates\\.com$/)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t})();\n\n\t\t// event.source is null when the message is sent by an extension\n\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#Using_window.postMessage_in_extensions\n\t\tif (event.source == null) return;\n\t\tif (!is_accepted_event_origin) return;\n\t\tvar message;\n\t\ttry {\n\t\t\tmessage = typeof event.data === \"object\" ? event.data : JSON.parse(event.data);\n\t\t}\n\t\tcatch (e) {\n\t\t\tconsole.warn(\"Unexpected non-JSON message: \" + JSON.stringify(event.data));\n\t\t\treturn;\n\t\t}\n\t\tif (message.sender !== \"Flourish\") return;\n\t\tif (!message.method) {\n\t\t\tconsole.warn(\"The 'method' property was missing from message\", message);\n\t\t\treturn;\n\t\t}\n\t\tif (!Object.prototype.hasOwnProperty.call(message_validators, message.method)) {\n\t\t\tconsole.warn(\"No validator implemented for message\", message);\n\t\t\treturn;\n\t\t}\n\t\tif (!message_validators[message.method](message)) {\n\t\t\tconsole.warn(\"Validation failed for the message\", message);\n\t\t\treturn;\n\t\t}\n\t\tvar frames = document.querySelectorAll(\"iframe\");\n\t\tfor (var i=0; i < frames.length; i++) {\n\t\t\tif (frames[i].contentWindow == event.source || frames[i].contentWindow == event.source.parent) {\n\t\t\t\tcallback(message, frames[i]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconsole.warn(\"could not find frame\", message);\n\t});\n\n\tif (isSafari()) {\n\t\twindow.addEventListener(\"resize\", onSafariWindowResize);\n\t\tonSafariWindowResize();\n\t}\n}\n\nfunction onSafariWindowResize() {\n\t// Ensure all iframes without explicit width attribute are sized to fit their container\n\tvar containers = document.querySelectorAll(\".flourish-embed\");\n\tfor (var i=0; i < containers.length; i++) {\n\t\tvar container = containers[i];\n\t\tif (container.getAttribute(\"data-width\")) continue;\n\t\tvar iframe = container.querySelector(\"iframe\");\n\t\t// When embeds are dynamically loaded, we might have a container without a\n\t\t// loaded iframe yet\n\t\tif (!iframe) continue;\n\t\tvar computed_style = window.getComputedStyle(container);\n\t\tvar width = container.offsetWidth - parseFloat(computed_style.paddingLeft) - parseFloat(computed_style.paddingRight);\n\t\tiframe.style.width = width + \"px\";\n\t}\n}\n\nfunction createScrolly(iframe, slides) {\n\tvar parent = iframe.parentNode;\n\n\t// Fallback to avoid any situation where the scrolly gets initialised twice\n\tif (parent.classList.contains(\"fl-scrolly-wrapper\")) {\n\t\tconsole.warn(\"createScrolly is being called more than once per story. This should not happen.\");\n\t\treturn;\n\t}\n\n\tparent.classList.add(\"fl-scrolly-wrapper\");\n\tparent.style.position = \"relative\";\n\tparent.style.paddingBottom = \"1px\";\n\tparent.style.transform = \"translate3d(0, 0, 0)\"; // Workaround for Safari https://stackoverflow.com/questions/50224855/not-respecting-z-index-on-safari-with-position-sticky\n\n\tiframe.style.position = \"sticky\";\n\tvar h = parent.getAttribute(\"data-height\") || null;\n\tif (!h) { // Scrollies require fixed height to work well, so if not height set …\n\t\th = \"80vh\"; // … use a sensible fallback\n\t\tiframe.style.height = h; // And update the iframe height directly\n\t}\n\tiframe.style.top = \"calc(50vh - \" + h + \"/2)\";\n\n\tvar credit = parent.querySelector(\".flourish-credit\");\n\tif (credit) {\n\t\tcredit.style.position = \"sticky\";\n\t\tcredit.style.top = \"calc(50vh + \" + h + \"/2)\";\n\t}\n\n\tslides.forEach(function(d, i) {\n\t\tvar has_content = typeof d == \"string\" && d.trim() != \"\";\n\t\tvar step = document.createElement(\"div\");\n\t\tstep.setAttribute(\"data-slide\", i);\n\t\tstep.classList.add(\"fl-scrolly-caption\");\n\t\tstep.style.position = \"relative\";\n\t\tstep.style.transform = \"translate3d(0,0,0)\"; // Workaround for Safari https://stackoverflow.com/questions/50224855/not-respecting-z-index-on-safari-with-position-sticky\n\t\tstep.style.textAlign= \"center\";\n\t\tstep.style.maxWidth = \"500px\";\n\t\tstep.style.height = \"auto\";\n\t\tstep.style.marginTop = \"0\";\n\t\tstep.style.marginBottom = has_content ? \"100vh\" : \"50vh\";\n\t\tstep.style.marginLeft = \"auto\";\n\t\tstep.style.marginRight = \"auto\";\n\t\tvar caption = document.createElement(\"div\");\n\t\tcaption.innerHTML = d;\n\t\tcaption.style.visibility = has_content ? \"\" : \"hidden\";\n\t\tcaption.style.display = \"inline-block\";\n\t\tcaption.style.paddingTop = \"1.25em\";\n\t\tcaption.style.paddingRight = \"1.25em\";\n\t\tcaption.style.paddingBottom = \"1.25em\";\n\t\tcaption.style.paddingLeft = \"1.25em\";\n\t\tcaption.style.background = \"rgba(255,255,255,0.9)\";\n\t\tcaption.style.boxShadow = \"0px 0px 10px rgba(0,0,0,0.2)\";\n\t\tcaption.style.borderRadius = \"10px\";\n\t\tcaption.style.textAlign = \"center\";\n\t\tcaption.style.maxWidth = \"100%\";\n\t\tcaption.style.margin = \"0 20px\";\n\t\tcaption.style.overflowX = \"hidden\";\n\t\tstep.appendChild(caption);\n\t\tparent.appendChild(step);\n\t});\n\tinitIntersection(parent);\n}\n\nfunction initIntersection(container) {\n\tvar t = \"0%\"; // Trigger when hits viewport; could be set by user in the future\n\tvar observer = new IntersectionObserver(function(entries) {\n\t\tentries.forEach(function(entry) {\n\t\t\tif (entry.isIntersecting) {\n\t\t\t\tvar iframe = container.querySelector(\"iframe\");\n\t\t\t\tif (iframe) iframe.src = iframe.src.replace(/#slide-.*/, \"\") + \"#slide-\" + entry.target.getAttribute(\"data-slide\");\n\t\t\t}\n\t\t});\n\t}, { rootMargin: \"0px 0px -\" + t + \" 0px\" });\n\n\tvar steps = container.querySelectorAll(\".fl-scrolly-caption\");\n\tfor (var i = 0; i < steps.length; i++) {\n\t\tobserver.observe(steps[i]);\n\t}\n\n\t// Set a max width on any images in the captions, to avoid ugly overflowing\n\t// in the rare cases where the\n\t// This won't happen much, but it is possible to paste an image into a\n\t// story caption, so better to handle this nicely since there's no other\n\t// way for the user to set it.\n\tvar images = container.querySelectorAll(\".fl-scrolly-caption img\");\n\timages.forEach(function(img) { img.style.maxWidth = \"100%\"; });\n}\n\n\nfunction createEmbedIframe(embed_url, container, width, height, play_on_load) {\n\tvar iframe = document.createElement(\"iframe\");\n\tiframe.setAttribute(\"scrolling\", \"no\");\n\tiframe.setAttribute(\"frameborder\", \"0\");\n\tiframe.setAttribute(\"title\", \"Interactive or visual content\");\n\tiframe.setAttribute(\"sandbox\", \"allow-same-origin allow-forms allow-scripts allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation\");\n\tcontainer.appendChild(iframe);\n\n\t// If the iframe doesn't have an offset parent, either the element or a parent\n\t// is set to display: none. This can cause problems with visualisation loading, so\n\t// we need to poll for the iframe being displayed before loading the visualisation.\n\t// FIXME: In Chrome, fixed position elements also return null for `offsetParent`.\n\t// The chances of an embed which is both position: fixed and display: none are\n\t// pretty small, so fuhgeddaboudit . If it's an issue in the future, we'll have to\n\t// recurse through the parent elements to make sure the iframe is displaying.\n\tif (iframe.offsetParent || getComputedStyle(iframe).position === \"fixed\") {\n\t\tsetIframeContent(embed_url, container, iframe, width, height, play_on_load);\n\t}\n\telse {\n\t\tvar poll_item = {\n\t\t\tembed_url: embed_url,\n\t\t\tcontainer: container,\n\t\t\tiframe: iframe,\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\tplay_on_load: play_on_load\n\t\t};\n\t\t// If this is the first embed on the page which is isn't displayed, set up a\n\t\t// list of hidden iframes to poll\n\t\tif (!window._flourish_poll_items) {\n\t\t\twindow._flourish_poll_items = [poll_item];\n\t\t}\n\t\telse {\n\t\t\t// Otherwise, add this to the list of iframes which are being polled\n\t\t\twindow._flourish_poll_items.push(poll_item);\n\t\t}\n\n\t\tif (window._flourish_poll_items.length > 1) {\n\t\t\t// If there were already items in the array then we have already started\n\t\t\t// polling in a different embed script, so we can return. This iframe will\n\t\t\t// have its contents set by the other embed script.\n\t\t\treturn iframe;\n\t\t}\n\n\t\t// Poll to see whether any of the iframes have started displaying\n\t\tvar interval = setInterval(function() {\n\t\t\twindow._flourish_poll_items = window._flourish_poll_items.filter(function(item) {\n\t\t\t\tif (!item.iframe.offsetParent) {\n\t\t\t\t\t// It's still not displaying, so return true to leave it in the array\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// It's displaying, so set the content, and return false to remove it from\n\t\t\t\t// the array\n\t\t\t\tsetIframeContent(item.embed_url, item.container, item.iframe, item.width, item.height, item.play_on_load);\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\tif (!window._flourish_poll_items.length) {\n\t\t\t\t// All of the iframes are displaying, so we can stop polling. If another\n\t\t\t\t// embed is added later, a new interval will be created by that embed script.\n\t\t\t\tclearInterval(interval);\n\t\t\t}\n\t\t}, 500);\n\t}\n\treturn iframe;\n}\n\nfunction setIframeContent(embed_url, container, iframe, width, height, play_on_load) {\n\tvar width_in_px;\n\tif (width && typeof width === \"number\") {\n\t\twidth_in_px = width;\n\t\twidth = \"\" + width + \"px\";\n\t}\n\t// The regular expression below detects widths that have been explicitly\n\t// expressed in px units. (It turns out CSS is more complicated than you may\n\t// have realised.)\n\telse if (width && width.match(/^[ \\t\\r\\n\\f]*([+-]?\\d+|\\d*\\.\\d+(?:[eE][+-]?\\d+)?)(?:\\\\?[Pp]|\\\\0{0,4}[57]0(?:\\r\\n|[ \\t\\r\\n\\f])?)(?:\\\\?[Xx]|\\\\0{0,4}[57]8(?:\\r\\n|[ \\t\\r\\n\\f])?)[ \\t\\r\\n\\f]*$/)) {\n\t\twidth_in_px = parseFloat(width);\n\t}\n\n\tif (height && typeof height === \"number\") height = \"\" + height + \"px\";\n\t// Odd design decision in Safari means need to set fixed width rather than %\n\t// as will try and size iframe to content otherwise. Must also set scrolling=no\n\tif (width) iframe.style.width = width;\n\telse if (isSafari()) iframe.style.width = container.offsetWidth + \"px\";\n\telse iframe.style.width = \"100%\";\n\n\tvar fixed_height = !!height;\n\tif (!fixed_height) {\n\t\tif (embed_url.match(/\\?/)) embed_url += \"&auto=1\";\n\t\telse embed_url += \"?auto=1\";\n\t\t// For initial height, use our standard breakpoints, based on the explicit\n\t\t// pixel width if we know it, or the iframe's measured width if not.\n\t\theight = getHeightForBreakpoint(width_in_px || iframe.offsetWidth) + \"px\";\n\t}\n\n\tif (height) {\n\t\tif (height.charAt(height.length - 1) === \"%\") {\n\t\t\theight = (parseFloat(height) / 100) * container.parentNode.offsetHeight + \"px\";\n\t\t}\n\t\tiframe.style.height = height;\n\t}\n\n\tiframe.setAttribute(\"src\", embed_url + (play_on_load ? \"#play-on-load\" : \"\"));\n\n\treturn iframe;\n}\n\nfunction initEmbedding() {\n\tis_amp = window.location.hash == \"#amp=1\";\n\treturn {\n\t\tcreateEmbedIframe: createEmbedIframe,\n\t\tisFixedHeight: isFixedHeight,\n\t\tgetHeightForBreakpoint: getHeightForBreakpoint,\n\t\tstartEventListeners: startEventListeners,\n\t\tnotifyParentWindow: notifyParentWindow,\n\t\tinitScrolly: initScrolly,\n\t\tcreateScrolly: createScrolly,\n\t\tisSafari: isSafari,\n\t\tinitCustomerAnalytics: initCustomerAnalytics,\n\t\taddAnalyticsListener: addAnalyticsListener,\n\t\tsendCustomerAnalyticsMessage: sendCustomerAnalyticsMessage\n\t};\n}\n\nexport default initEmbedding;\n","import { flourishify } from \"@flourish/transform-data\";\nimport { createInterpreter } from \"@flourish/interpreter\";\n\nimport { createFlourishCredit, getLocalizedCreditTextAndUrl } from \"./embed/credit\";\nimport initEmbedding from \"./embed/embedding\";\n\nvar VERSION = \"5.1.0\";\n\nvar DEFAULTS = {\n\tapi_url: \"https://flourish-api.com/api/v1/live\",\n\tpublic_bucket_prefix: \"https://public.flourish.studio/\",\n\tbase_visualisation_data_format: \"array\",\n};\n\n// Properties that cannot (yet) be changed on update():\nvar IMMUTABLE_PROPERTIES = [\n\t\"api_key\", \"template\", \"version\", \"container\", \"base_visualisation_id\"\n];\n\n// Lookup for templates that the API script has loaded on to the page.\n// This is needed for the update method to identify whether a particular\n// call to Flourish.update(opts) is for a typed template.\nvar template_lookup = {};\n\nfunction stringify(o) {\n\tif (!o && o !== 0) return \"\";\n\telse if (typeof o === \"object\") {\n\t\tfor (var k in o) o[k] = stringify(o[k]);\n\t\treturn o;\n\t}\n\telse return \"\" + o;\n}\n\nfunction shallowCopy(o) {\n\tvar r = {};\n\tfor (var k in o) r[k] = o[k];\n\treturn r;\n}\n\nfunction isObject(x) {\n\treturn !Array.isArray(x) && typeof x === \"object\" && x != null;\n}\n\n// Expects an object at the top level.\n// Does not deep-copy arrays, which is okay here\n// since the data structures we expect to receive\n// have arrays only of strings.\nfunction deepCopy(obj) {\n\tif (obj == null) return obj;\n\tvar copy = {};\n\tfor (var k in obj) {\n\t\tif (Array.isArray(obj[k])) {\n\t\t\tcopy[k] = obj[k].slice();\n\t\t}\n\t\telse if (isObject(obj[k])) {\n\t\t\tcopy[k] = deepCopy(obj[k]);\n\t\t}\n\t\telse {\n\t\t\tcopy[k] = obj[k];\n\t\t}\n\t}\n\treturn copy;\n}\n\nvar embedding = null;\n\nfunction getColumnTypeMetadata(column) {\n\tconst interpreter = createInterpreter();\n\tconst interpretation = interpreter(column)[0];\n\n\treturn {\n\t\ttype: interpretation.type,\n\t\ttype_id: interpretation.id,\n\t\toutput_format_id: interpretation.id,\n\t};\n}\n\nfunction Fleet(opts) {\n\tthis._validateOpts(opts);\n\n\tthis.template_loaded = false;\n\tthis.metadata_loaded = false;\n\tthis.company_state = null;\n\tthis.template_settings = null;\n\tthis._queued_methods = [];\n\n\tfor (var prop in DEFAULTS) {\n\t\tif (!opts.hasOwnProperty(prop)) opts[prop] = DEFAULTS[prop];\n\t}\n\n\tif (opts.base_visualisation_id) {\n\t\tvar that = this;\n\t\tthis._loadBaseVisualisation(opts, function(error, base) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(error.message);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\topts = mergeObjects(base, opts);\n\t\t\tthat._loadFleet(opts);\n\t\t});\n\t}\n\telse {\n\t\tthis._loadFleet(opts);\n\t}\n}\n\nFleet.prototype._loadBaseVisualisation = function Fleet__loadBaseVisualisation(opts, callback) {\n\tvar xhr = new XMLHttpRequest();\n\txhr.addEventListener(\"load\", function() {\n\t\tif (this.status != 200) {\n\t\t\tvar error = new Error(\"Fetching the base visualisation failed\");\n\t\t\treturn callback(error);\n\t\t}\n\t\tvar parsed_json = JSON.parse(this.responseText);\n\t\treturn callback(null, parsed_json);\n\t});\n\n\tconst data_format = opts.base_visualisation_data_format;\n\tif (![\"array\", \"object\"].includes(data_format)) {\n\t\treturn callback(\n\t\t\tnew Error(`The base_visualisation_data_format parameter must be either \"array\" or \"object\"`)\n\t\t);\n\t}\n\tconst path = data_format == \"array\" ? \"/visualisation.json\" : \"/visualisation-object.json\";\n\n\txhr.open(\"GET\", opts.public_bucket_prefix + \"visualisation/\" + opts.base_visualisation_id + path);\n\txhr.send();\n};\n\nFleet.prototype._loadFleet = function Fleet__loadFleet(opts) {\n\tthis.original_properties = {};\n\tfor (var i = 0; i < IMMUTABLE_PROPERTIES.length; i++) {\n\t\tvar k = IMMUTABLE_PROPERTIES[i];\n\t\tthis.original_properties[k] = opts[k];\n\t}\n\n\tif (!embedding) embedding = initEmbedding();\n\tvar embed_url = opts.api_url + \"/template\" +\n\t\t\"?api_key=\" + opts.api_key +\n\t\t\"&api_version=\" + encodeURIComponent(VERSION) +\n\t\t\"&template=\" + encodeURIComponent(opts.template) +\n\t\t\"&version=\" + opts.version;\n\n\tvar container = (typeof opts.container === \"string\") ? document.querySelector(opts.container) : opts.container;\n\n\tthis.iframe = embedding.createEmbedIframe(embed_url, container, opts.width, opts.height, false);\n\n\tvar that = this;\n\tthis.iframe.addEventListener(\"load\", function() {\n\t\tthat.template_loaded = true;\n\t\tif (that.metadata_loaded) {\n\t\t\tthat._init(\n\t\t\t\t{\n\t\t\t\t\tstate: opts.state,\n\t\t\t\t\tdata: that._data,\n\t\t\t\t\ttyped_template: that.typed_template,\n\t\t\t\t},\n\t\t\t\topts.callback\n\t\t\t);\n\t\t}\n\t});\n\n\tembedding.startEventListeners(\n\t\tfunction(message, frame) {\n\t\t\tif (message.method == \"resize\") {\n\t\t\t\tvar height = message.height;\n\t\t\t\tvar type = typeof height;\n\t\t\t\t// Add \"px\" if height is a number or a string representing a pure number\n\t\t\t\tif (type === \"number\" || (type === \"string\" && !isNaN(height))) message.height += \"px\";\n\t\t\t\tframe.style.height = message.height;\n\t\t\t}\n\t\t},\n\t\t[\"resize\"]\n\t);\n\n\tvar xhr = new XMLHttpRequest();\n\txhr.addEventListener(\"load\", function () {\n\t\tif (this.status === 500) {\n\t\t\tconsole.error(JSON.parse(this.responseText));\n\t\t\treturn;\n\t\t}\n\t\tif (this.status != 200) {\n\t\t\tconsole.error(\"Fetching the template and data bindings from the server failed\");\n\t\t\treturn;\n\t\t}\n\t\tvar parsed_json = JSON.parse(this.responseText);\n\n\t\tthat.typed_template = parsed_json.typed_template;\n\n\t\t// Store a reference to the template in the templates_loaded lookup object,\n\t\t// for future reference by the update method.\n\t\tif (!template_lookup[opts.template]) template_lookup[opts.template] = {};\n\t\tif (template_lookup[opts.template][opts.version] === undefined) {\n\t\t\ttemplate_lookup[opts.template][opts.version] = that.typed_template;\n\t\t}\n\n\t\tthat._prepareDataBindings(parsed_json.data_bindings);\n\t\tthat.template_settings = parsed_json.settings || {};\n\t\tthat.company_state = that._getCompanyState(parsed_json.company_custom);\n\t\tthat.metadata_loaded = true;\n\t\tthat._prepareData(opts);\n\t\tif (that.template_loaded) {\n\t\t\tthat._init(\n\t\t\t\t{\n\t\t\t\t\tstate: opts.state,\n\t\t\t\t\tdata: that._data,\n\t\t\t\t\ttyped_template: that.typed_template,\n\t\t\t\t},\n\t\t\t\topts.callback\n\t\t\t);\n\t\t}\n\n\t\tif (!parsed_json.hide_credit) {\n\t\t\tvar template_name = opts.template.replace(/^@?flourish\\//, \"\");\n\t\t\tvar local_credits = getLocalizedCreditTextAndUrl(opts.lang, template_name);\n\t\t\tvar credit = createFlourishCredit(local_credits.credit_url,\n\t\t\t\tnull, null, local_credits.credit_text);\n\t\t\tcontainer.appendChild(credit);\n\t\t}\n\t});\n\n\txhr.open(\"GET\", opts.api_url + \"/metadata?api_key=\" + opts.api_key + \"&template=\" + encodeURIComponent(opts.template) + \"&version=\" + opts.version);\n\txhr.send();\n};\n\n// Calculate the base state which the state passed to the API is\n// merged over. This will return an empty object unless the API key\n// owner is in a company with custom settings.\nFleet.prototype._getCompanyState = function Fleet__getCompanyState(company_custom) {\n\tif (!company_custom) return {};\n\treturn company_custom.settings || {};\n};\n\nfunction isNonArrayObject(o) {\n\treturn (o instanceof Object) && !Array.isArray(o) && o !== null;\n}\n\nfunction mergeObjects(o1, o2) {\n\t// Deep clone the first object so we won't modify it on merging:\n\tvar k, v, result = JSON.parse(JSON.stringify(o1));\n\tfor (k in o2) {\n\t\tv = o2[k];\n\t\t// If both corresponding values are objects, recursively\n\t\t// merge them, otherwise o2's value is used:\n\t\tif (isNonArrayObject(result[k]) && isNonArrayObject(v)) {\n\t\t\tresult[k] = mergeObjects(result[k], v);\n\t\t}\n\t\telse result[k] = v;\n\t}\n\treturn result;\n}\n\nFleet.prototype._mergeState = function Fleet__mergeState(state) {\n\treturn mergeObjects(this.company_state, state);\n};\n\nFleet.prototype._prepareDataBindings = function Fleet__prepareDataBindings(data_bindings_array) {\n\tvar data_bindings = {};\n\n\tfor (var i = 0; i < data_bindings_array.length; i++) {\n\t\tvar d = data_bindings_array[i];\n\t\tif (typeof d === \"string\") continue;\n\n\t\tif (!(d.dataset in data_bindings)) {\n\t\t\tdata_bindings[d.dataset] = [];\n\t\t}\n\t\tdata_bindings[d.dataset].push(d);\n\t}\n\n\tthis._data_bindings = data_bindings;\n\tthis._parsed_bindings = {};\n\n\tfor (var dataset in data_bindings) {\n\t\tthis._parseDataset(dataset);\n\t}\n};\n\nFleet.prototype._parseDataset = function Fleet__parseDataset(dataset) {\n\tif (!this._parsed_bindings[dataset]) {\n\t\tvar kd = this._parsed_bindings[dataset] = {\n\t\t\tdataset: dataset,\n\t\t\tmandatory_keys: [],\n\t\t\toptional_keys: [],\n\t\t\tcolumns_keys: [],\n\t\t\tdefault_values: {},\n\t\t\thas_mandatory_key: false\n\t\t};\n\n\t\tvar data_bindings = this._data_bindings;\n\t\tfor (var key in data_bindings[dataset]) {\n\t\t\tvar d = data_bindings[dataset][key];\n\t\t\tswitch (d.type) {\n\t\t\t\tcase \"column\":\n\t\t\t\t\tif (!d.optional) {\n\t\t\t\t\t\tkd.mandatory_keys.push(d.key);\n\t\t\t\t\t\tkd.has_mandatory_key = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tkd.optional_keys.push(d.key);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"columns\":\n\t\t\t\t\tkd.default_values[d.key] = [];\n\t\t\t\t\tkd.columns_keys.push(d.key);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n};\n\nFleet.prototype._getColumnNames = function Fleet__getColumnNames(kd, column_names, optional_keys_used, number_of_columns) {\n\tvar result = {};\n\n\tvar dataset = kd.dataset;\n\tvar column_name;\n\tfor (var i = 0; i < kd.mandatory_keys.length; i++) {\n\t\tvar mandatory_key = kd.mandatory_keys[i];\n\t\tcolumn_name = (column_names && column_names[dataset] && column_names[dataset][mandatory_key]) || mandatory_key;\n\n\t\tresult[mandatory_key] = column_name;\n\t}\n\n\tfor (var i = 0; i < kd.optional_keys.length; i++) {\n\t\tvar optional_key = kd.optional_keys[i];\n\t\tif (!optional_keys_used[optional_key]) continue;\n\t\tcolumn_name = (column_names && column_names[dataset] && column_names[dataset][optional_key]) || optional_key;\n\n\t\tresult[optional_key] = column_name;\n\t}\n\n\tfor (var i = 0; i < kd.columns_keys.length; i++) {\n\t\tvar columns_key = kd.columns_keys[i];\n\t\tif (column_names && column_names[dataset] && column_names[dataset][columns_key]) {\n\t\t\tcolumn_name = column_names[dataset][columns_key];\n\t\t\tif (typeof column_name === \"string\") column_name = [column_name];\n\t\t\tif (!Array.isArray(column_name) || column_name.length != number_of_columns[columns_key]) {\n\t\t\t\tthrow new Error(\"Flourish: number of column names (\" + column_name.length\n\t\t\t\t\t+ \") does not match the number of columns (\" + number_of_columns[columns_key]\n\t\t\t\t\t+ \") for dataset “\" + dataset + \"” and key “\" + columns_key + \"”\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tcolumn_name = [];\n\t\t\tfor (var j = 0; j < number_of_columns[columns_key]; j++) {\n\t\t\t\tcolumn_name.push(columns_key + \" \" + (j+1));\n\t\t\t}\n\t\t}\n\n\t\tresult[columns_key] = column_name;\n\t}\n\n\treturn result;\n};\n\n// TODO: test with untyped template\n\n/** Returns metadata and interpretations (useful for parsing the data in a column) for bound columns in the dataset */\nFleet.prototype._getColumnTypesForDataset = function Fleet__getColumnTypesForDataset(data, bindings, column_type_overrides) {\n\tconst all_bindings = Object.entries(bindings.column_bindings).concat(Object.entries(bindings.columns_bindings));\n\tconst metadata = {};\n\tconst interpretations = {};\n\n\tfor (const [binding_name, binding_value] of all_bindings) {\n\t\tconst is_multicolumn_binding = Array.isArray(binding_value);\n\n\t\t// bound_columns_identifiers is an array of column indexes or column names,\n\t\t// depending on if the data is in the 'array-of-arrays' or the 'array-of-objects' format.\n\t\tconst bound_columns_identifiers = is_multicolumn_binding ? binding_value : [binding_value];\n\n\t\tfor (let i = 0; i < bound_columns_identifiers.length; i++) {\n\t\t\t// If the data is in 'array-of-arrays' format, column_key should be a column index.\n\t\t\t// If the data is in 'array-of-objects' format, column_key should be a binding name.\n\t\t\tconst column_key = bound_columns_identifiers[i];\n\t\t\tlet type_override = column_type_overrides[column_key];\n\n\t\t\tconst column_type_metadata = getColumnTypeMetadata(\n\t\t\t\tdata.map(row => is_multicolumn_binding ? row[binding_name][i] : row[binding_name])\n\t\t\t);\n\n\t\t\t// If the current column has a type override, add it to the metadata obj\n\t\t\tif (type_override) {\n\t\t\t\t// If one or more required keys are missing from the override object,\n\t\t\t\t// interpret the column and get them from the interpretation object.\n\t\t\t\tconst required_keys = [\"type\", \"type_id\"];\n\t\t\t\tconst override_keys = Object.keys(type_override);\n\t\t\t\tconst missing_required_keys = required_keys.filter(required_key => !override_keys.includes(required_key));\n\n\t\t\t\tif (missing_required_keys.length) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t`Metadata for column '${column_key}' is missing a '${missing_required_keys.join(\"' and '\")}' property.`\n\t\t\t\t\t\t+ \" Flourish will interpret and populate the missing properties.\"\n\t\t\t\t\t);\n\n\t\t\t\t\tmissing_required_keys.forEach(function(missing_key) {\n\t\t\t\t\t\ttype_override[missing_key] = column_type_metadata[missing_key];\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// If an output_format_id isn't set in the override, make it the same as the type_id\n\t\t\t\tif (!override_keys.includes(\"output_format_id\")) {\n\t\t\t\t\ttype_override.output_format_id = type_override.type_id;\n\t\t\t\t}\n\n\t\t\t\tif (!validateMetadata(type_override, column_key)) {\n\t\t\t\t\tthrow new Error(`Metadata for column '${column_key}' is invalid.`);\n\t\t\t\t}\n\n\t\t\t\tif (is_multicolumn_binding) {\n\t\t\t\t\tif (!metadata[binding_name]) metadata[binding_name] = [];\n\t\t\t\t\tif (!interpretations[binding_name]) interpretations[binding_name] = [];\n\t\t\t\t\tmetadata[binding_name].push(type_override);\n\t\t\t\t\tinterpretations[binding_name].push(createInterpreter.getInterpretation(type_override.type_id));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmetadata[binding_name] = type_override;\n\t\t\t\t\tinterpretations[binding_name] = createInterpreter.getInterpretation(type_override.type_id);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If there are no user-specified types for a column on a multi-column\n\t\t\t// binding, interpret the column and add the type info to the metadata obj\n\t\t\telse if (is_multicolumn_binding) {\n\t\t\t\tif (!metadata[binding_name]) metadata[binding_name] = [];\n\t\t\t\tif (!interpretations[binding_name]) interpretations[binding_name] = [];\n\n\t\t\t\tconst interpretation = createInterpreter.getInterpretation(column_type_metadata.type_id);\n\t\t\t\tmetadata[binding_name].push(column_type_metadata);\n\t\t\t\tinterpretations[binding_name].push(interpretation);\n\t\t\t}\n\t\t\t// If there are no user-specified types for a column on a single column\n\t\t\t// binding, interpret the column type and add it to the metadata obj\n\t\t\telse {\n\t\t\t\tmetadata[binding_name] = column_type_metadata;\n\t\t\t\tinterpretations[binding_name] = createInterpreter.getInterpretation(column_type_metadata.type_id);\n\t\t\t}\n\t\t}\n\n\t\t// Empty multi-column data bindings should still add an empty array\n\t\t// to the metadata object\n\t\tif (is_multicolumn_binding && !bound_columns_identifiers.length) {\n\t\t\tmetadata[binding_name] = [];\n\t\t}\n\t}\n\treturn { metadata, interpretations };\n};\n\nfunction validateMetadata(metadata, identifier_) {\n\tvar identifier = identifier_ ? \"Validation error in Column '\" + identifier_ + \"':\" : \"\";\n\n\t// output_format_id is optional, so make sure if it's not provided, it\n\t// uses type_id for testing purposes\n\tif (!metadata.output_format_id) metadata.output_format_id = metadata.type_id;\n\n\tconst required_keys = [\"type\", \"type_id\"];\n\tconst metadata_keys = Object.keys(metadata);\n\tconst missing_required_keys = required_keys.filter(required_key => !metadata_keys.includes(required_key));\n\tif (missing_required_keys.length) {\n\t\tconsole.error(identifier, \"Metadata is missing required key: \", missing_required_keys.join(\" and \"), metadata);\n\t\treturn false;\n\t}\n\tif (Object.values(metadata).some(v => typeof v != \"string\")) {\n\t\tconsole.error(identifier, \"All properties in metadata need to be string\", metadata);\n\t\treturn false;\n\t}\n\tif (![\"string\", \"number\", \"datetime\"].includes(metadata.type)) {\n\t\tconsole.error(identifier, \"Metadata 'type' property needs to be one of 'string', 'datetime' or 'number'\", metadata);\n\t\treturn false;\n\t}\n\tvar type_id_type = metadata.type_id.split(\"$\")[0];\n\tvar output_id_type = metadata.output_format_id.split(\"$\")[0];\n\tif (!(type_id_type === output_id_type && output_id_type === metadata.type)) {\n\t\tvar type_id_mismatch = type_id_type !== metadata.type;\n\t\tvar output_id_mismatch = output_id_type !== type_id_type;\n\t\tif (type_id_mismatch) console.error(identifier, \"Metadata 'type_id' type should match 'type'\", metadata);\n\t\tif (output_id_mismatch) console.error(identifier, \"Metadata 'output_format_id' type should match 'type_id'\", metadata);\n\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n/** Parse data values according to the data types of their columns */\nFleet.prototype._parseTypedDataForDataset = function Fleet__parseTypedDataForDataset(data, types) {\n\tconst parsed_data = data.map(row => {\n\t\treturn Object.keys(row).reduce((parsed_data, binding) => {\n\t\t\tif (Array.isArray(row[binding])) {\n\t\t\t\tparsed_data[binding] = row[binding].map((value, i) => {\n\t\t\t\t\tif (typeof value === \"number\") return value;\n\t\t\t\t\telse return types[binding][i].parse(value);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse if (typeof row[binding] === \"number\") parsed_data[binding] = row[binding];\n\t\t\telse parsed_data[binding] = types[binding].parse(row[binding]);\n\n\t\t\treturn parsed_data;\n\t\t}, {});\n\t});\n\n\t// Mapping through data removes doesn't transfer its named keys (like 'column_names')\n\t// to the parsed copy - so we copy those keys across now\n\tconst data_keys = Object.keys(data);\n\tconst parsed_data_keys = Object.keys(parsed_data);\n\n\t// Compare the length of parsed_data with data to see if any keys are missing\n\tif (parsed_data_keys.length -1 !== data_keys.length) {\n\t\t// Add the missing keys to parsed_data\n\t\tfor (var i = 0; i < data_keys.length; i++) {\n\t\t\tif (!parsed_data_keys.includes(data_keys[i])) {\n\t\t\t\tparsed_data[data_keys[i]] = data[data_keys[i]];\n\t\t\t}\n\t\t}\n\t}\n\treturn parsed_data;\n};\n\nfunction arrayToObjectKeys(arr) {\n\treturn arr.reduce(function(obj, key) {\n\t\tobj[key] = true;\n\t\treturn obj;\n\t}, {});\n}\n\nfunction getOrCreateDataset(data, dataset) {\n\tif (!data[dataset]) {\n\t\tdata[dataset] = [];\n\t\tdata[dataset].column_names = {};\n\t}\n\treturn data[dataset];\n}\n\nfunction splitBindings(dataset, bindings, kd) {\n\tvar result = { column_bindings: {}, columns_bindings: {} };\n\tfor (var k in bindings) {\n\t\tvar v = bindings[k];\n\t\t// FIXME: make a simple object lookup in kd instead of repeatedly iterating over these arrays\n\t\tif (kd.columns_keys.indexOf(k) >= 0) {\n\t\t\tresult.columns_bindings[k] = v;\n\t\t}\n\t\telse if (kd.mandatory_keys.indexOf(k) >= 0 || kd.optional_keys.indexOf(k) >= 0) {\n\t\t\tresult.column_bindings[k] = v;\n\t\t}\n\t\telse {\n\t\t\tthrow new Error(\"Flourish: unknown binding “\" + k + \"” found for dataset “\" + dataset + \"”\");\n\t\t}\n\t}\n\treturn result;\n}\n\nfunction addMissingColumnNames(dataset, parsed_bindings, data_bindings) {\n\tvar column_names = dataset.column_names;\n\tvar mandatory_keys = arrayToObjectKeys(parsed_bindings.mandatory_keys);\n\tfor (var i = 0; i < data_bindings.length; i++) {\n\t\tvar binding = data_bindings[i];\n\t\tvar key = binding.key;\n\t\tif (column_names[key] !== undefined) continue;\n\t\tif (binding.type === \"columns\") column_names[key] = [];\n\t\telse if (mandatory_keys[key]) column_names[key] = binding.name;\n\t}\n}\n\n// This function will take a row from a dataset in the shape that\n// Flourish expects and do the following:\n// - add default values for any columns or optional column types\n// - do a number of checks for consistency of the data, and throw\n// an exception on finding any inconsistency\n// - record which optional keys have been used in the\n// optional_keys_used object.\n// - record the expected number of values for each columns type\nfunction fixRow(d, kd, optional_keys_used, number_of_columns) {\n\t// Assign default values\n\tfor (var k in kd.default_values) {\n\t\tif (!(k in d)) d[k] = kd.default_values[k];\n\t}\n\n\t// Check that mandatory keys are present in each row\n\tfor (var j = 0; j < kd.mandatory_keys.length; j++) {\n\t\tvar mandatory_key = kd.mandatory_keys[j];\n\t\tif (!(mandatory_key in d)) {\n\t\t\tthrow new Error(\"required key “\" + mandatory_key + \"” is missing\");\n\t\t}\n\t}\n\n\t// Check that optional keys are used or not used consistently,\n\t// and record which are used in the optional_keys_used object.\n\tfor (var j = 0; j < kd.optional_keys.length; j++) {\n\t\tvar optional_key = kd.optional_keys[j];\n\t\tif (optional_key in optional_keys_used) {\n\t\t\tif (optional_keys_used[optional_key] != (optional_key in d)) {\n\t\t\t\tthrow new Error(\"the optional key “\" + optional_key + \"” is used in some rows but not in others\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\toptional_keys_used[optional_key] = (optional_key in d);\n\t\t}\n\t}\n\n\t// Check that columns keys are used consistently, and record\n\t// how many columns each uses, in the number_of_columns object.\n\t//\n\t// TODO: Should we support having an inconsistent number of entries in a columns key?\n\t// We could assume the longest array determines the length.\n\tfor (var j = 0; j < kd.columns_keys.length; j++) {\n\t\tvar columns_key = kd.columns_keys[j];\n\n\t\t// If an atomic value is passed where an array is expected, treat it\n\t\t// as a single-element array.\n\t\tif (typeof d[columns_key] !== \"object\") {\n\t\t\td[columns_key] = [ d[columns_key] ];\n\t\t}\n\t\tif (columns_key in number_of_columns) {\n\t\t\tif (number_of_columns[columns_key] != (d[columns_key].length)) {\n\t\t\t\tthrow new Error(\"the columns key “\" + columns_key + \"” has an inconsistent number of entries\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tnumber_of_columns[columns_key] = d[columns_key].length;\n\t\t}\n\t}\n}\n\nFleet.prototype._prepareData = function Fleet__prepareData(opts) {\n\tif (\"column_names\" in opts) this.column_names = deepCopy(opts.column_names);\n\tif (opts.bindings) {\n\t\tthis._prepareDataFromExternalFormat(opts.data, opts.bindings, opts.metadata || {});\n\t}\n\telse {\n\t\tthis._prepareDataFlourishShape(opts.data, this.column_names); // TODO: make this work with column types\n\t}\n};\n\nFleet.prototype._prepareDataFromExternalFormat = function Fleet__prepareDataFromExternalFormat(data, bindings, column_types) {\n\tthis._data = {};\n\n\tfor (var dataset in bindings) {\n\t\tvar kd = this._parsed_bindings[dataset]; // kd is short for “key data”\n\t\tvar bindings_object = splitBindings(dataset, bindings[dataset], kd);\n\t\tvar reshaped_data = flourishify(data[dataset] || [], bindings_object.column_bindings, bindings_object.columns_bindings);\n\n\t\tvar number_of_columns = {};\n\t\tvar optional_keys_used = {};\n\t\tfor (var i = 0; i < reshaped_data.length; i++) {\n\t\t\ttry {\n\t\t\t\tfixRow(reshaped_data[i], kd, optional_keys_used, number_of_columns, dataset);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tthrow new Error(\"Flourish: in dataset “\" + dataset + \"”, \" + e.message);\n\t\t\t}\n\t\t}\n\n\t\tif (this.typed_template) {\n\t\t\tconst { metadata, interpretations } = this._getColumnTypesForDataset(reshaped_data, bindings_object, column_types[dataset] || {});\n\t\t\tconst parsed_data = this._parseTypedDataForDataset(reshaped_data, interpretations);\n\t\t\tparsed_data.metadata = metadata; // append column types to the parsed data object\n\t\t\treshaped_data = parsed_data;\n\t\t}\n\n\t\tthis._data[dataset] = reshaped_data;\n\t}\n\n\t// Fill in missing datasets and column names\n\tfor (var dataset in this._data_bindings) {\n\t\tvar d = getOrCreateDataset(this._data, dataset);\n\t\tvar parsed_bindings = this._parsed_bindings[dataset];\n\t\tvar data_bindings = this._data_bindings[dataset];\n\t\taddMissingColumnNames(d, parsed_bindings, data_bindings);\n\t}\n};\n\nFleet.prototype._prepareDataFlourishShape = function Fleet__prepareDataFlourishShape(data, column_names) {\n\tvar data_bindings = this._data_bindings;\n\n\tfor (var dataset in data) {\n\t\tif (!(dataset in data_bindings)) {\n\t\t\tthrow new Error(\"Flourish: the dataset “\" + dataset + \"” is not supported by this template\");\n\t\t}\n\t}\n\n\tthis._data = {};\n\tfor (var dataset in data_bindings) {\n\t\tvar kd = this._parsed_bindings[dataset]; // kd is short for “key data”\n\n\t\tif (kd.has_mandatory_key && !(dataset in data)) {\n\t\t\tthrow new Error(\"Flourish: the dataset “\" + dataset + \"” must be specified\");\n\t\t}\n\n\t\tvar number_of_columns = {};\n\t\tvar optional_keys_used = {};\n\t\tthis._data[dataset] = [];\n\t\tfor (var i = 0; i < data[dataset].length; i++) {\n\t\t\tvar d = shallowCopy(data[dataset][i]);\n\t\t\tthis._data[dataset].push(d);\n\t\t\ttry {\n\t\t\t\tfixRow(d, kd, optional_keys_used, number_of_columns);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tthrow new Error(\"Flourish: in dataset “\" + dataset + \"”, \" + e.message);\n\t\t\t}\n\t\t}\n\n\t\tthis._data[dataset].column_names = this._getColumnNames(kd, column_names, optional_keys_used, number_of_columns);\n\t}\n};\n\nFleet.prototype._init = function Fleet__init(opts, callback) {\n\tvar that = this;\n\tthat._send(\"setFixedHeight\", null, function() {\n\t\tthat._draw(opts, function() {\n\t\t\tif (callback) callback(that);\n\n\t\t\tfor (var i = 0; i < that._queued_methods.length; i++) {\n\t\t\t\tvar m = that._queued_methods[i];\n\t\t\t\tm[0].apply(that, m.slice(1));\n\t\t\t}\n\t\t\tthat._queued_methods = null;\n\t\t});\n\t});\n};\n\nFleet.prototype._queue = function Fleet__queue() {\n\t// Convert the pseudo-array arguments to a real array args.\n\tvar args = [];\n\tfor (var i = 0; i < arguments.length; i++) {\n\t\targs.push(arguments[i]);\n\t}\n\n\t// If initialisation is complete and the queued methods\n\t// have already been run, then run this method immediately\n\t// rather than queueing it.\n\tif (!this._queued_methods) {\n\t\targs[0].apply(this, args.slice(1));\n\t\treturn;\n\t}\n\n\t// Otherwise add it to the queue\n\tthis._queued_methods.push(args);\n};\n\nfunction wrapInQueue(f) {\n\treturn function() {\n\t\tvar args = [ f ];\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\targs.push(arguments[i]);\n\t\t}\n\t\tthis._queue.apply(this, args);\n\t};\n}\n\nFleet.prototype._send = function Fleet__send(method, argument, callback) {\n\tvar channel = new MessageChannel();\n\tchannel.port1.onmessage = callback;\n\n\tthis.iframe.contentWindow.postMessage({\n\t\tsender: \"Flourish\",\n\t\tmethod: method,\n\t\targument: argument\n\t}, \"*\", [channel.port2]);\n};\n\nFleet.prototype.snapshot = wrapInQueue(function Fleet_snapshot(snapshot_opts, callback) {\n\tconst scale = +(snapshot_opts.scale || 1);\n\tif (isNaN(scale)) {\n\t\treturn callback(new Error(`Malformed image scale “${snapshot_opts.scale}”`));\n\t}\n\tif (typeof snapshot_opts.download !== \"boolean\") {\n\t\treturn callback(new Error(`The “download” option must be a boolean, not “${snapshot_opts.download}}”`));\n\t}\n\tconst download = !!snapshot_opts.download;\n\tlet format = (snapshot_opts.format || \"png\");\n\tif (![\"png\", \"jpeg\", \"svg\"].includes(format)) {\n\t\treturn callback(new Error(`Unknown image format “${snapshot_opts.format}” - must be one of “png”, “jpeg” or “svg”`));\n\t}\n\tconst filename = snapshot_opts.filename || \"Flourish API image\";\n\tif (typeof filename !== \"string\") {\n\t\treturn callback(new Error(`Filename must be a string (not “${filename}”)`));\n\t}\n\tconst width = this.iframe.clientWidth;\n\tconst height = this.iframe.clientHeight;\n\n\treturn this._send(\"snapshot\", {\n\t\tdownload,\n\t\tfilename,\n\t\tformat,\n\t\tscale,\n\t\twidth,\n\t\theight,\n\t}, (event) => {\n\t\tif (event.data.result.status === \"error\") {\n\t\t\treturn callback(event.data.result.error);\n\t\t}\n\t\treturn callback(null, event.data.result);\n\t});\n});\n\nFleet.prototype._draw = function Fleet_draw(opts, callback) {\n\treturn this._send(\"sync\", {\n\t\tdraw: true,\n\t\tstate: this._mergeState(opts.state),\n\t\tdata: opts.typed_template ? opts.data : stringify(opts.data),\n\t}, callback);\n};\n\nFleet.prototype._update = function Fleet__update(opts, callback) {\n\tvar argument = {\n\t\tupdate: true,\n\t\tstate: this._mergeState(opts.state)\n\t};\n\tif (opts.data) {\n\t\targument.data = opts.typed_template ? opts.data : stringify(opts.data);\n\t}\n\treturn this._send(\"sync\", argument, callback);\n};\n\nFleet.prototype._validateOpts = function Fleet__validateOpts(opts, update) {\n\tif (update) {\n\t\tfor (var i = 0; i < IMMUTABLE_PROPERTIES.length; i++) {\n\t\t\tvar k = IMMUTABLE_PROPERTIES[i];\n\t\t\tif (k in opts && opts[k] != this.original_properties[k]) {\n\t\t\t\tthrow new Error(\"Flourish: changing the '\" + k + \"' is not yet supported\");\n\t\t\t}\n\t\t}\n\t}\n\n\tif (opts.bindings && opts.column_names) {\n\t\tthrow new Error(\n\t\t\t\"Flourish: you must supply exactly one of opts.bindings and opts.column_names - \" +\n\t\t\t\"these correspond to different ways that your data might be shaped\"\n\t\t);\n\t}\n\n\tif (opts.metadata && (typeof opts.metadata !== \"object\" || Array.isArray(opts.metadata) || opts.metadata === null)) {\n\t\tthrow new Error(\"Flourish: opts.metadata must be an object\");\n\t}\n};\n\nFleet.prototype.getState = wrapInQueue(function Fleet_getState(callback) {\n\treturn this._send(\"getState\", null, function(obj) {\n\t\tif (!(\"data\" in obj) || !(\"result\" in obj.data)) {\n\t\t\treturn callback(new Error(\"Template state not found\"));\n\t\t}\n\t\treturn callback(null, obj.data.result);\n\t});\n});\n\nFleet.prototype.update = wrapInQueue(function Fleet_update(opts, callback) {\n\tthis._validateOpts(opts, true);\n\tconst { template, version } = this.original_properties;\n\topts.typed_template = template_lookup[template][version]; // flag if the template being updated is typed\n\t// FIXME (?): one might conceivably want to change the bindings or\n\t// column names on update, in which case _prepareData should be\n\t// re-run on the data which was last passed in. We're not sure\n\t// that we want to support this, however - it'd mean keeping an\n\t// extra copy of the passed in data in memory.\n\tif (\"data\" in opts) {\n\t\tthis._prepareData(opts);\n\t\treturn this._update({ state: opts.state, data: this._data, typed_template: opts.typed_template }, callback);\n\t}\n\treturn this._update({ state: opts.state }, callback);\n});\n\nexport default {\n\tVERSION: VERSION,\n\tLive: Fleet\n};\n"],"names":["interval","day","timeMonday","timeDay","timeYear","timeSunday","timeThursday","formatLocale"],"mappings":";;;CAAA,SAAS,YAAY,CAAC,CAAC,EAAE;CACzB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;CACxD,CAAC;AACD;AACA;CACA,SAAS,qBAAqB,CAAC,eAAe,EAAE,gBAAgB,EAAE;CAClE,CAAC,IAAI,IAAI,CAAC;AACV;CACA,CAAC,IAAI,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE;CAClE,EAAE,OAAO,YAAY,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;CAC5C,EAAE,CAAC,CAAC;AACJ;CACA,CAAC,IAAI,CAAC,SAAS,EAAE;CACjB,EAAE,IAAI,GAAG,4DAA4D,CAAC;CACtE,EAAE,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;CAC5B,EAAE;AACF;CACA,CAAC,IAAI,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE;CACpE,EAAE,IAAI,KAAK,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;CACpC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;CAChF,EAAE,CAAC,CAAC;AACJ;CACA,CAAC,IAAI,CAAC,UAAU,EAAE;CAClB,EAAE,IAAI,GAAG,+EAA+E,CAAC;CACzF,EAAE,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;CAC5B,EAAE;CACF;;CCvBA,SAAS,eAAe,CAAC,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE;CACxE,CAAC,OAAO,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;CACnC,EAAE,IAAI,GAAG,GAAG,EAAE,CAAC;AACf;CACA,EAAE,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,EAAE;CACrD,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;CACtC,GAAG,CAAC,CAAC;AACL;CACA,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,EAAE;CACtD,GAAG,IAAI,CAAC,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;CACjC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,SAAS,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;CAClE,GAAG,CAAC,CAAC;AACL;CACA,EAAE,OAAO,GAAG,CAAC;CACb,EAAE,CAAC,CAAC;CACJ,CAAC;AACD;AACA;CACA,SAAS,kBAAkB,CAAC,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE;CAC3E,CAAC,eAAe,GAAG,eAAe,IAAI,EAAE,CAAC;CACzC,CAAC,gBAAgB,GAAG,gBAAgB,IAAI,EAAE,CAAC;AAC3C;CACA,CAAC,IAAI,IAAI,GAAG,eAAe,CAAC,UAAU,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAAC;CAC3E,CAAC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;AACxB;CACA,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,EAAE;CACpD,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;CAChD,EAAE,CAAC,CAAC;AACJ;CACA,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,EAAE;CACrD,EAAE,IAAI,CAAC,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;CAChC,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACtD,EAAE,CAAC,CAAC;AACJ;CACA,CAAC,OAAO,IAAI,CAAC;CACb,CAAC;AACD;AACA;CACA,SAAS,iBAAiB,CAAC,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE;CAC1E,CAAC,eAAe,GAAG,eAAe,IAAI,EAAE,CAAC;CACzC,CAAC,gBAAgB,GAAG,gBAAgB,IAAI,EAAE,CAAC;CAC3C,CAAC,qBAAqB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;CAC1D,CAAC,IAAI,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AACjC;CACA,CAAC,IAAI,IAAI,GAAG,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAAC;CACpF,CAAC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;AACxB;CACA,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,EAAE;CACpD,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7D,EAAE,CAAC,CAAC;AACJ;CACA,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,EAAE;CACrD,EAAE,IAAI,CAAC,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;CAChC,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE;CACxE,GAAG,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;CACzB,GAAG,CAAC,CAAC;CACL,EAAE,CAAC,CAAC;AACJ;CACA,CAAC,OAAO,IAAI,CAAC;CACb,CAAC;AACD;AACA;CACA,SAAS,WAAW,CAAC,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE;CACpE,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;CACjF,CAAC,OAAO,GAAG,CAAC,UAAU,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAAC;CAC3D;;CCrEA,IAAI,EAAE,GAAG,IAAI,IAAI;CACjB,IAAI,EAAE,GAAG,IAAI,IAAI,CAAC;AAClB;CACe,SAAS,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE;AACnE;CACA,EAAE,SAAS,QAAQ,CAAC,IAAI,EAAE;CAC1B,IAAI,OAAO,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC,MAAM,KAAK,CAAC,GAAG,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;CACpF,GAAG;AACH;CACA,EAAE,QAAQ,CAAC,KAAK,GAAG,SAAS,IAAI,EAAE;CAClC,IAAI,OAAO,MAAM,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;CAChD,GAAG,CAAC;AACJ;CACA,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,IAAI,EAAE;CACjC,IAAI,OAAO,MAAM,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;CACnF,GAAG,CAAC;AACJ;CACA,EAAE,QAAQ,CAAC,KAAK,GAAG,SAAS,IAAI,EAAE;CAClC,IAAI,IAAI,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC;CAC3B,QAAQ,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CACjC,IAAI,OAAO,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC;CAC3C,GAAG,CAAC;AACJ;CACA,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,IAAI,EAAE,IAAI,EAAE;CACzC,IAAI,OAAO,OAAO,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,IAAI,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;CACtF,GAAG,CAAC;AACJ;CACA,EAAE,QAAQ,CAAC,KAAK,GAAG,SAAS,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE;CAC/C,IAAI,IAAI,KAAK,GAAG,EAAE,EAAE,QAAQ,CAAC;CAC7B,IAAI,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;CACjC,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;CAC/C,IAAI,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC;CACrD,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CACpF,WAAW,QAAQ,GAAG,KAAK,IAAI,KAAK,GAAG,IAAI,EAAE;CAC7C,IAAI,OAAO,KAAK,CAAC;CACjB,GAAG,CAAC;AACJ;CACA,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,IAAI,EAAE;CACnC,IAAI,OAAO,WAAW,CAAC,SAAS,IAAI,EAAE;CACtC,MAAM,IAAI,IAAI,IAAI,IAAI,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;CACjF,KAAK,EAAE,SAAS,IAAI,EAAE,IAAI,EAAE;CAC5B,MAAM,IAAI,IAAI,IAAI,IAAI,EAAE;CACxB,QAAQ,IAAI,IAAI,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE;CAC1C,UAAU,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;CACnD,SAAS,MAAM,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE;CACnC,UAAU,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;CACnD,SAAS;CACT,OAAO;CACP,KAAK,CAAC,CAAC;CACP,GAAG,CAAC;AACJ;CACA,EAAE,IAAI,KAAK,EAAE;CACb,IAAI,QAAQ,CAAC,KAAK,GAAG,SAAS,KAAK,EAAE,GAAG,EAAE;CAC1C,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;CAC3C,MAAM,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;CAC7B,MAAM,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;CACvC,KAAK,CAAC;AACN;CACA,IAAI,QAAQ,CAAC,KAAK,GAAG,SAAS,IAAI,EAAE;CACpC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;CAC9B,MAAM,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI;CAClD,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,GAAG,QAAQ;CAClC,YAAY,QAAQ,CAAC,MAAM,CAAC,KAAK;CACjC,gBAAgB,SAAS,CAAC,EAAE,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE;CAC7D,gBAAgB,SAAS,CAAC,EAAE,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;CAC3E,KAAK,CAAC;CACN,GAAG;AACH;CACA,EAAE,OAAO,QAAQ,CAAC;CAClB;;CCpEO,IAAI,cAAc,GAAG,GAAG,CAAC;CAEzB,IAAI,WAAW,GAAG,KAAK,CAAC;CACxB,IAAI,YAAY,GAAG,MAAM;;CCDhC,IAAI,GAAG,GAAGA,WAAQ,CAAC,SAAS,IAAI,EAAE;CAClC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC5B,CAAC,EAAE,SAAS,IAAI,EAAE,IAAI,EAAE;CACxB,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;CACtC,CAAC,EAAE,SAAS,KAAK,EAAE,GAAG,EAAE;CACxB,EAAE,OAAO,CAAC,GAAG,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,iBAAiB,EAAE,GAAG,KAAK,CAAC,iBAAiB,EAAE,IAAI,cAAc,IAAI,WAAW,CAAC;CAC9G,CAAC,EAAE,SAAS,IAAI,EAAE;CAClB,EAAE,OAAO,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC,CAAC;;CCRF,SAAS,OAAO,CAAC,CAAC,EAAE;CACpB,EAAE,OAAOA,WAAQ,CAAC,SAAS,IAAI,EAAE;CACjC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;CAC/D,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC9B,GAAG,EAAE,SAAS,IAAI,EAAE,IAAI,EAAE;CAC1B,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;CAC5C,GAAG,EAAE,SAAS,KAAK,EAAE,GAAG,EAAE;CAC1B,IAAI,OAAO,CAAC,GAAG,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,iBAAiB,EAAE,GAAG,KAAK,CAAC,iBAAiB,EAAE,IAAI,cAAc,IAAI,YAAY,CAAC;CACjH,GAAG,CAAC,CAAC;CACL,CAAC;AACD;CACO,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACxB,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACxB,IAAI,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACzB,IAAI,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAC3B,IAAI,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAC1B,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACxB,IAAI,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC;;CClBhC,IAAI,IAAI,GAAGA,WAAQ,CAAC,SAAS,IAAI,EAAE;CACnC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACtB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC5B,CAAC,EAAE,SAAS,IAAI,EAAE,IAAI,EAAE;CACxB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,CAAC;CAC9C,CAAC,EAAE,SAAS,KAAK,EAAE,GAAG,EAAE;CACxB,EAAE,OAAO,GAAG,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;CACjD,CAAC,EAAE,SAAS,IAAI,EAAE;CAClB,EAAE,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;CAC5B,CAAC,CAAC,CAAC;AACH;CACA;CACA,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE;CACzB,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,GAAGA,WAAQ,CAAC,SAAS,IAAI,EAAE;CACnF,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7D,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACxB,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC9B,GAAG,EAAE,SAAS,IAAI,EAAE,IAAI,EAAE;CAC1B,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;CACpD,GAAG,CAAC,CAAC;CACL,CAAC;;CCnBD,IAAI,MAAM,GAAGA,WAAQ,CAAC,SAAS,IAAI,EAAE;CACrC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC/B,CAAC,EAAE,SAAS,IAAI,EAAE,IAAI,EAAE;CACxB,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,CAAC;CAC5C,CAAC,EAAE,SAAS,KAAK,EAAE,GAAG,EAAE;CACxB,EAAE,OAAO,CAAC,GAAG,GAAG,KAAK,IAAI,WAAW,CAAC;CACrC,CAAC,EAAE,SAAS,IAAI,EAAE;CAClB,EAAE,OAAO,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;CAC/B,CAAC,CAAC;;CCRF,SAAS,UAAU,CAAC,CAAC,EAAE;CACvB,EAAE,OAAOA,WAAQ,CAAC,SAAS,IAAI,EAAE;CACjC,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;CACxE,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACjC,GAAG,EAAE,SAAS,IAAI,EAAE,IAAI,EAAE;CAC1B,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;CAClD,GAAG,EAAE,SAAS,KAAK,EAAE,GAAG,EAAE;CAC1B,IAAI,OAAO,CAAC,GAAG,GAAG,KAAK,IAAI,YAAY,CAAC;CACxC,GAAG,CAAC,CAAC;CACL,CAAC;AACD;CACO,IAAI,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;CAC9B,IAAI,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;CAC9B,IAAI,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;CAC/B,IAAI,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;CACjC,IAAI,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;CAChC,IAAI,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;CAC9B,IAAI,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC;;CClBtC,IAAI,OAAO,GAAGA,WAAQ,CAAC,SAAS,IAAI,EAAE;CACtC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACzB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC/B,CAAC,EAAE,SAAS,IAAI,EAAE,IAAI,EAAE;CACxB,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,CAAC;CACpD,CAAC,EAAE,SAAS,KAAK,EAAE,GAAG,EAAE;CACxB,EAAE,OAAO,GAAG,CAAC,cAAc,EAAE,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;CACvD,CAAC,EAAE,SAAS,IAAI,EAAE;CAClB,EAAE,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;CAC/B,CAAC,CAAC,CAAC;AACH;CACA;CACA,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE;CAC5B,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,GAAGA,WAAQ,CAAC,SAAS,IAAI,EAAE;CACnF,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CACnE,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3B,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACjC,GAAG,EAAE,SAAS,IAAI,EAAE,IAAI,EAAE;CAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;CAC1D,GAAG,CAAC,CAAC;CACL,CAAC;;CCTD,SAAS,SAAS,CAAC,CAAC,EAAE;CACtB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE;CAC7B,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1D,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1B,IAAI,OAAO,IAAI,CAAC;CAChB,GAAG;CACH,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CACrD,CAAC;AACD;CACA,SAAS,OAAO,CAAC,CAAC,EAAE;CACpB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE;CAC7B,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACpE,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC7B,IAAI,OAAO,IAAI,CAAC;CAChB,GAAG;CACH,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/D,CAAC;AACD;CACA,SAAS,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;CAC1B,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACpD,CAAC;AACD;CACe,SAAS,YAAY,CAAC,MAAM,EAAE;CAC7C,EAAE,IAAI,eAAe,GAAG,MAAM,CAAC,QAAQ;CACvC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI;CAC/B,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI;CAC/B,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO;CACrC,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI;CACnC,MAAM,oBAAoB,GAAG,MAAM,CAAC,SAAS;CAC7C,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM;CACnC,MAAM,kBAAkB,GAAG,MAAM,CAAC,WAAW,CAAC;AAC9C;CACA,EAAE,IAAI,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC;CACzC,MAAM,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC;CACjD,MAAM,SAAS,GAAG,QAAQ,CAAC,eAAe,CAAC;CAC3C,MAAM,aAAa,GAAG,YAAY,CAAC,eAAe,CAAC;CACnD,MAAM,cAAc,GAAG,QAAQ,CAAC,oBAAoB,CAAC;CACrD,MAAM,kBAAkB,GAAG,YAAY,CAAC,oBAAoB,CAAC;CAC7D,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;CACvC,MAAM,WAAW,GAAG,YAAY,CAAC,aAAa,CAAC;CAC/C,MAAM,YAAY,GAAG,QAAQ,CAAC,kBAAkB,CAAC;CACjD,MAAM,gBAAgB,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;AAC1D;CACA,EAAE,IAAI,OAAO,GAAG;CAChB,IAAI,GAAG,EAAE,kBAAkB;CAC3B,IAAI,GAAG,EAAE,aAAa;CACtB,IAAI,GAAG,EAAE,gBAAgB;CACzB,IAAI,GAAG,EAAE,WAAW;CACpB,IAAI,GAAG,EAAE,IAAI;CACb,IAAI,GAAG,EAAE,gBAAgB;CACzB,IAAI,GAAG,EAAE,gBAAgB;CACzB,IAAI,GAAG,EAAE,kBAAkB;CAC3B,IAAI,GAAG,EAAE,aAAa;CACtB,IAAI,GAAG,EAAE,iBAAiB;CAC1B,IAAI,GAAG,EAAE,YAAY;CACrB,IAAI,GAAG,EAAE,YAAY;CACrB,IAAI,GAAG,EAAE,eAAe;CACxB,IAAI,GAAG,EAAE,kBAAkB;CAC3B,IAAI,GAAG,EAAE,iBAAiB;CAC1B,IAAI,GAAG,EAAE,aAAa;CACtB,IAAI,GAAG,EAAE,YAAY;CACrB,IAAI,GAAG,EAAE,aAAa;CACtB,IAAI,GAAG,EAAE,mBAAmB;CAC5B,IAAI,GAAG,EAAE,0BAA0B;CACnC,IAAI,GAAG,EAAE,aAAa;CACtB,IAAI,GAAG,EAAE,yBAAyB;CAClC,IAAI,GAAG,EAAE,sBAAsB;CAC/B,IAAI,GAAG,EAAE,mBAAmB;CAC5B,IAAI,GAAG,EAAE,yBAAyB;CAClC,IAAI,GAAG,EAAE,sBAAsB;CAC/B,IAAI,GAAG,EAAE,IAAI;CACb,IAAI,GAAG,EAAE,IAAI;CACb,IAAI,GAAG,EAAE,UAAU;CACnB,IAAI,GAAG,EAAE,cAAc;CACvB,IAAI,GAAG,EAAE,UAAU;CACnB,IAAI,GAAG,EAAE,oBAAoB;CAC7B,GAAG,CAAC;AACJ;CACA,EAAE,IAAI,UAAU,GAAG;CACnB,IAAI,GAAG,EAAE,qBAAqB;CAC9B,IAAI,GAAG,EAAE,gBAAgB;CACzB,IAAI,GAAG,EAAE,mBAAmB;CAC5B,IAAI,GAAG,EAAE,cAAc;CACvB,IAAI,GAAG,EAAE,IAAI;CACb,IAAI,GAAG,EAAE,mBAAmB;CAC5B,IAAI,GAAG,EAAE,mBAAmB;CAC5B,IAAI,GAAG,EAAE,qBAAqB;CAC9B,IAAI,GAAG,EAAE,gBAAgB;CACzB,IAAI,GAAG,EAAE,oBAAoB;CAC7B,IAAI,GAAG,EAAE,eAAe;CACxB,IAAI,GAAG,EAAE,eAAe;CACxB,IAAI,GAAG,EAAE,kBAAkB;CAC3B,IAAI,GAAG,EAAE,qBAAqB;CAC9B,IAAI,GAAG,EAAE,oBAAoB;CAC7B,IAAI,GAAG,EAAE,gBAAgB;CACzB,IAAI,GAAG,EAAE,eAAe;CACxB,IAAI,GAAG,EAAE,gBAAgB;CACzB,IAAI,GAAG,EAAE,mBAAmB;CAC5B,IAAI,GAAG,EAAE,0BAA0B;CACnC,IAAI,GAAG,EAAE,gBAAgB;CACzB,IAAI,GAAG,EAAE,4BAA4B;CACrC,IAAI,GAAG,EAAE,yBAAyB;CAClC,IAAI,GAAG,EAAE,sBAAsB;CAC/B,IAAI,GAAG,EAAE,4BAA4B;CACrC,IAAI,GAAG,EAAE,yBAAyB;CAClC,IAAI,GAAG,EAAE,IAAI;CACb,IAAI,GAAG,EAAE,IAAI;CACb,IAAI,GAAG,EAAE,aAAa;CACtB,IAAI,GAAG,EAAE,iBAAiB;CAC1B,IAAI,GAAG,EAAE,aAAa;CACtB,IAAI,GAAG,EAAE,oBAAoB;CAC7B,GAAG,CAAC;AACJ;CACA,EAAE,IAAI,MAAM,GAAG;CACf,IAAI,GAAG,EAAE,iBAAiB;CAC1B,IAAI,GAAG,EAAE,YAAY;CACrB,IAAI,GAAG,EAAE,eAAe;CACxB,IAAI,GAAG,EAAE,UAAU;CACnB,IAAI,GAAG,EAAE,mBAAmB;CAC5B,IAAI,GAAG,EAAE,eAAe;CACxB,IAAI,GAAG,EAAE,eAAe;CACxB,IAAI,GAAG,EAAE,iBAAiB;CAC1B,IAAI,GAAG,EAAE,SAAS;CAClB,IAAI,GAAG,EAAE,aAAa;CACtB,IAAI,GAAG,EAAE,WAAW;CACpB,IAAI,GAAG,EAAE,WAAW;CACpB,IAAI,GAAG,EAAE,cAAc;CACvB,IAAI,GAAG,EAAE,iBAAiB;CAC1B,IAAI,GAAG,EAAE,gBAAgB;CACzB,IAAI,GAAG,EAAE,YAAY;CACrB,IAAI,GAAG,EAAE,WAAW;CACpB,IAAI,GAAG,EAAE,YAAY;CACrB,IAAI,GAAG,EAAE,kBAAkB;CAC3B,IAAI,GAAG,EAAE,yBAAyB;CAClC,IAAI,GAAG,EAAE,YAAY;CACrB,IAAI,GAAG,EAAE,wBAAwB;CACjC,IAAI,GAAG,EAAE,qBAAqB;CAC9B,IAAI,GAAG,EAAE,kBAAkB;CAC3B,IAAI,GAAG,EAAE,wBAAwB;CACjC,IAAI,GAAG,EAAE,qBAAqB;CAC9B,IAAI,GAAG,EAAE,eAAe;CACxB,IAAI,GAAG,EAAE,eAAe;CACxB,IAAI,GAAG,EAAE,SAAS;CAClB,IAAI,GAAG,EAAE,aAAa;CACtB,IAAI,GAAG,EAAE,SAAS;CAClB,IAAI,GAAG,EAAE,mBAAmB;CAC5B,GAAG,CAAC;AACJ;CACA;CACA,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;CAC9C,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;CAC9C,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;CAClD,EAAE,UAAU,CAAC,CAAC,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;CACpD,EAAE,UAAU,CAAC,CAAC,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;CACpD,EAAE,UAAU,CAAC,CAAC,GAAG,SAAS,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AACxD;CACA,EAAE,SAAS,SAAS,CAAC,SAAS,EAAE,OAAO,EAAE;CACzC,IAAI,OAAO,SAAS,IAAI,EAAE;CAC1B,MAAM,IAAI,MAAM,GAAG,EAAE;CACrB,UAAU,CAAC,GAAG,CAAC,CAAC;CAChB,UAAU,CAAC,GAAG,CAAC;CACf,UAAU,CAAC,GAAG,SAAS,CAAC,MAAM;CAC9B,UAAU,CAAC;CACX,UAAU,GAAG;CACb,UAAU,MAAM,CAAC;AACjB;CACA,MAAM,IAAI,EAAE,IAAI,YAAY,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAC1D;CACA,MAAM,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE;CACtB,QAAQ,IAAI,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;CAC5C,UAAU,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAC7C,UAAU,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;CACzF,eAAe,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAC3C,UAAU,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;CACzD,UAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACzB,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACpB,SAAS;CACT,OAAO;AACP;CACA,MAAM,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACzC,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;CAC7B,KAAK,CAAC;CACN,GAAG;AACH;CACA,EAAE,SAAS,QAAQ,CAAC,SAAS,EAAE,CAAC,EAAE;CAClC,IAAI,OAAO,SAAS,MAAM,EAAE;CAC5B,MAAM,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;CACzC,UAAU,CAAC,GAAG,cAAc,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC;CAC3D,UAAU,IAAI,EAAEC,KAAG,CAAC;CACpB,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC;AAC1C;CACA;CACA,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACzC,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACvE;CACA;CACA,MAAM,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACpC;CACA;CACA,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AAC9C;CACA;CACA,MAAM,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACtD;CACA;CACA,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE;CACpB,QAAQ,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,OAAO,IAAI,CAAC;CAC7C,QAAQ,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACjC,QAAQ,IAAI,GAAG,IAAI,CAAC,EAAE;CACtB,UAAU,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAEA,KAAG,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;CACrE,UAAU,IAAI,GAAGA,KAAG,GAAG,CAAC,IAAIA,KAAG,KAAK,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;CAC/E,UAAU,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;CACpD,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;CACtC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;CACnC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;CAClD,SAAS,MAAM;CACf,UAAU,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAEA,KAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;CACpE,UAAU,IAAI,GAAGA,KAAG,GAAG,CAAC,IAAIA,KAAG,KAAK,CAAC,GAAGC,MAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAGA,MAAU,CAAC,IAAI,CAAC,CAAC;CACjF,UAAU,IAAI,GAAGC,GAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;CACrD,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;CACnC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;CAChC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;CAC/C,SAAS;CACT,OAAO,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE;CACvC,QAAQ,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACrE,QAAQF,KAAG,GAAG,GAAG,IAAI,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC1G,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAChB,QAAQ,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAACA,KAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAACA,KAAG,GAAG,CAAC,IAAI,CAAC,CAAC;CACjG,OAAO;AACP;CACA;CACA;CACA,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE;CACpB,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;CAC7B,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;CACzB,QAAQ,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;CAC1B,OAAO;AACP;CACA;CACA,MAAM,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;CAC1B,KAAK,CAAC;CACN,GAAG;AACH;CACA,EAAE,SAAS,cAAc,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE;CACnD,IAAI,IAAI,CAAC,GAAG,CAAC;CACb,QAAQ,CAAC,GAAG,SAAS,CAAC,MAAM;CAC5B,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM;CACzB,QAAQ,CAAC;CACT,QAAQ,KAAK,CAAC;AACd;CACA,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;CAClB,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;CAC5B,MAAM,CAAC,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;CACpC,MAAM,IAAI,CAAC,KAAK,EAAE,EAAE;CACpB,QAAQ,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;CAClC,QAAQ,KAAK,GAAG,MAAM,CAAC,CAAC,IAAI,IAAI,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC9D,QAAQ,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;CACjE,OAAO,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE;CAC9C,QAAQ,OAAO,CAAC,CAAC,CAAC;CAClB,OAAO;CACP,KAAK;AACL;CACA,IAAI,OAAO,CAAC,CAAC;CACb,GAAG;AACH;CACA,EAAE,SAAS,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACrC,IAAI,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CAC3C,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CAC9E,GAAG;AACH;CACA,EAAE,SAAS,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CAC3C,IAAI,IAAI,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CACjD,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACpF,GAAG;AACH;CACA,EAAE,SAAS,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACtC,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CAC5C,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CAC/E,GAAG;AACH;CACA,EAAE,SAAS,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACzC,IAAI,IAAI,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/C,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CAClF,GAAG;AACH;CACA,EAAE,SAAS,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACpC,IAAI,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1C,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CAC7E,GAAG;AACH;CACA,EAAE,SAAS,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CAC7C,IAAI,OAAO,cAAc,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;CACzD,GAAG;AACH;CACA,EAAE,SAAS,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACzC,IAAI,OAAO,cAAc,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;CACrD,GAAG;AACH;CACA,EAAE,SAAS,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACzC,IAAI,OAAO,cAAc,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;CACrD,GAAG;AACH;CACA,EAAE,SAAS,kBAAkB,CAAC,CAAC,EAAE;CACjC,IAAI,OAAO,oBAAoB,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAC5C,GAAG;AACH;CACA,EAAE,SAAS,aAAa,CAAC,CAAC,EAAE;CAC5B,IAAI,OAAO,eAAe,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CACvC,GAAG;AACH;CACA,EAAE,SAAS,gBAAgB,CAAC,CAAC,EAAE;CAC/B,IAAI,OAAO,kBAAkB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;CAC5C,GAAG;AACH;CACA,EAAE,SAAS,WAAW,CAAC,CAAC,EAAE;CAC1B,IAAI,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;CACvC,GAAG;AACH;CACA,EAAE,SAAS,YAAY,CAAC,CAAC,EAAE;CAC3B,IAAI,OAAO,cAAc,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;CACjD,GAAG;AACH;CACA,EAAE,SAAS,aAAa,CAAC,CAAC,EAAE;CAC5B,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;CACpC,GAAG;AACH;CACA,EAAE,SAAS,qBAAqB,CAAC,CAAC,EAAE;CACpC,IAAI,OAAO,oBAAoB,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;CAC/C,GAAG;AACH;CACA,EAAE,SAAS,gBAAgB,CAAC,CAAC,EAAE;CAC/B,IAAI,OAAO,eAAe,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;CAC1C,GAAG;AACH;CACA,EAAE,SAAS,mBAAmB,CAAC,CAAC,EAAE;CAClC,IAAI,OAAO,kBAAkB,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;CAC/C,GAAG;AACH;CACA,EAAE,SAAS,cAAc,CAAC,CAAC,EAAE;CAC7B,IAAI,OAAO,aAAa,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;CAC1C,GAAG;AACH;CACA,EAAE,SAAS,eAAe,CAAC,CAAC,EAAE;CAC9B,IAAI,OAAO,cAAc,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;CACpD,GAAG;AACH;CACA,EAAE,SAAS,gBAAgB,CAAC,CAAC,EAAE;CAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;CACvC,GAAG;AACH;CACA,EAAE,OAAO;CACT,IAAI,MAAM,EAAE,SAAS,SAAS,EAAE;CAChC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC,SAAS,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;CAClD,MAAM,CAAC,CAAC,QAAQ,GAAG,WAAW,EAAE,OAAO,SAAS,CAAC,EAAE,CAAC;CACpD,MAAM,OAAO,CAAC,CAAC;CACf,KAAK;CACL,IAAI,KAAK,EAAE,SAAS,SAAS,EAAE;CAC/B,MAAM,IAAI,CAAC,GAAG,QAAQ,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;CAC/C,MAAM,CAAC,CAAC,QAAQ,GAAG,WAAW,EAAE,OAAO,SAAS,CAAC,EAAE,CAAC;CACpD,MAAM,OAAO,CAAC,CAAC;CACf,KAAK;CACL,IAAI,SAAS,EAAE,SAAS,SAAS,EAAE;CACnC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC,SAAS,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC;CACrD,MAAM,CAAC,CAAC,QAAQ,GAAG,WAAW,EAAE,OAAO,SAAS,CAAC,EAAE,CAAC;CACpD,MAAM,OAAO,CAAC,CAAC;CACf,KAAK;CACL,IAAI,QAAQ,EAAE,SAAS,SAAS,EAAE;CAClC,MAAM,IAAI,CAAC,GAAG,QAAQ,CAAC,SAAS,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;CAC9C,MAAM,CAAC,CAAC,QAAQ,GAAG,WAAW,EAAE,OAAO,SAAS,CAAC,EAAE,CAAC;CACpD,MAAM,OAAO,CAAC,CAAC;CACf,KAAK;CACL,GAAG,CAAC;CACJ,CAAC;AACD;CACA,IAAI,IAAI,GAAG,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;CACxC,IAAI,QAAQ,GAAG,SAAS;CACxB,IAAI,SAAS,GAAG,IAAI;CACpB,IAAI,SAAS,GAAG,qBAAqB,CAAC;AACtC;CACA,SAAS,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;CACjC,EAAE,IAAI,IAAI,GAAG,KAAK,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE;CACjC,MAAM,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,KAAK,GAAG,KAAK,IAAI,EAAE;CAC3C,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;CAC7B,EAAE,OAAO,IAAI,IAAI,MAAM,GAAG,KAAK,GAAG,IAAI,KAAK,CAAC,KAAK,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;CAC9F,CAAC;AACD;CACA,SAAS,OAAO,CAAC,CAAC,EAAE;CACpB,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;CACtC,CAAC;AACD;CACA,SAAS,QAAQ,CAAC,KAAK,EAAE;CACzB,EAAE,OAAO,IAAI,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC;CACtE,CAAC;AACD;CACA,SAAS,YAAY,CAAC,KAAK,EAAE;CAC7B,EAAE,IAAI,GAAG,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;CACzC,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;CAClD,EAAE,OAAO,GAAG,CAAC;CACb,CAAC;AACD;CACA,SAAS,wBAAwB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CAChD,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,wBAAwB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CAChD,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,qBAAqB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CAC7C,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CAC1C,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,qBAAqB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CAC7C,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACrC,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACjC,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CAC9E,CAAC;AACD;CACA,SAAS,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACjC,EAAE,IAAI,CAAC,GAAG,8BAA8B,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACtE,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CAC/E,CAAC;AACD;CACA,SAAS,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACpC,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACxD,CAAC;AACD;CACA,SAAS,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACxC,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACpD,CAAC;AACD;CACA,SAAS,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACvC,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACtC,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CAC1D,CAAC;AACD;CACA,SAAS,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACnC,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACpC,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACpC,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACzC,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACzC,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACnE,CAAC;AACD;CACA,SAAS,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CAC3C,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACjD,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;CAClC,CAAC;AACD;CACA,SAAS,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CAC1C,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CACzC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,yBAAyB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;CACjD,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CACzC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;CACjD,CAAC;AACD;CACA,SAAS,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE;CAChC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAChC,CAAC;AACD;CACA,SAAS,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE;CAC5B,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACjC,CAAC;AACD;CACA,SAAS,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE;CAC5B,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC5C,CAAC;AACD;CACA,SAAS,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE;CAC/B,EAAE,OAAO,GAAG,CAAC,CAAC,GAAGE,GAAO,CAAC,KAAK,CAACC,IAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACtD,CAAC;AACD;CACA,SAAS,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE;CAClC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACxC,CAAC;AACD;CACA,SAAS,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE;CAClC,EAAE,OAAO,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC;CAC1C,CAAC;AACD;CACA,SAAS,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE;CACjC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACrC,CAAC;AACD;CACA,SAAS,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE;CAC7B,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACnC,CAAC;AACD;CACA,SAAS,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE;CAC7B,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACnC,CAAC;AACD;CACA,SAAS,yBAAyB,CAAC,CAAC,EAAE;CACtC,EAAE,IAAI,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;CACvB,EAAE,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CAC7B,CAAC;AACD;CACA,SAAS,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE;CACtC,EAAE,OAAO,GAAG,CAACC,MAAU,CAAC,KAAK,CAACD,IAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACzD,CAAC;AACD;CACA,SAAS,IAAI,CAAC,CAAC,EAAE;CACjB,EAAE,IAAI,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;CACvB,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAIE,QAAY,CAAC,CAAC,CAAC,GAAGA,QAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CAC1E,CAAC;AACD;CACA,SAAS,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE;CACnC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;CACd,EAAE,OAAO,GAAG,CAACA,QAAY,CAAC,KAAK,CAACF,IAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAIA,IAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACtF,CAAC;AACD;CACA,SAAS,yBAAyB,CAAC,CAAC,EAAE;CACtC,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;CACpB,CAAC;AACD;CACA,SAAS,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE;CACtC,EAAE,OAAO,GAAG,CAACF,MAAU,CAAC,KAAK,CAACE,IAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACzD,CAAC;AACD;CACA,SAAS,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE;CAC1B,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC1C,CAAC;AACD;CACA,SAAS,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE;CAC7B,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;CACd,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC1C,CAAC;AACD;CACA,SAAS,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE;CAC9B,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC5C,CAAC;AACD;CACA,SAAS,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE;CACjC,EAAE,IAAI,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;CACvB,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAIE,QAAY,CAAC,CAAC,CAAC,GAAGA,QAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACvE,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC5C,CAAC;AACD;CACA,SAAS,UAAU,CAAC,CAAC,EAAE;CACvB,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,CAAC;CAChC,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC;CACtC,QAAQ,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;CAC/B,QAAQ,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;CAC5B,CAAC;AACD;CACA,SAAS,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE;CACnC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACnC,CAAC;AACD;CACA,SAAS,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE;CAC/B,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACpC,CAAC;AACD;CACA,SAAS,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE;CAC/B,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC/C,CAAC;AACD;CACA,SAAS,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE;CAClC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACpD,CAAC;AACD;CACA,SAAS,qBAAqB,CAAC,CAAC,EAAE,CAAC,EAAE;CACrC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,kBAAkB,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3C,CAAC;AACD;CACA,SAAS,qBAAqB,CAAC,CAAC,EAAE,CAAC,EAAE;CACrC,EAAE,OAAO,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC;CAC7C,CAAC;AACD;CACA,SAAS,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE;CACpC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACxC,CAAC;AACD;CACA,SAAS,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE;CAChC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACtC,CAAC;AACD;CACA,SAAS,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE;CAChC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACtC,CAAC;AACD;CACA,SAAS,4BAA4B,CAAC,CAAC,EAAE;CACzC,EAAE,IAAI,GAAG,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC;CAC1B,EAAE,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CAC7B,CAAC;AACD;CACA,SAAS,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE;CACzC,EAAE,OAAO,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACvD,CAAC;AACD;CACA,SAAS,OAAO,CAAC,CAAC,EAAE;CACpB,EAAE,IAAI,GAAG,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC;CAC1B,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACxE,CAAC;AACD;CACA,SAAS,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE;CACtC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACjB,EAAE,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACtF,CAAC;AACD;CACA,SAAS,4BAA4B,CAAC,CAAC,EAAE;CACzC,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC;CACvB,CAAC;AACD;CACA,SAAS,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE;CACzC,EAAE,OAAO,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACvD,CAAC;AACD;CACA,SAAS,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE;CAC7B,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,cAAc,EAAE,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC7C,CAAC;AACD;CACA,SAAS,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE;CAChC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACjB,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,cAAc,EAAE,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC7C,CAAC;AACD;CACA,SAAS,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE;CACjC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,cAAc,EAAE,GAAG,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC/C,CAAC;AACD;CACA,SAAS,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE;CACpC,EAAE,IAAI,GAAG,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC;CAC1B,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACrE,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,cAAc,EAAE,GAAG,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC/C,CAAC;AACD;CACA,SAAS,aAAa,GAAG;CACzB,EAAE,OAAO,OAAO,CAAC;CACjB,CAAC;AACD;CACA,SAAS,oBAAoB,GAAG;CAChC,EAAE,OAAO,GAAG,CAAC;CACb,CAAC;AACD;CACA,SAAS,mBAAmB,CAAC,CAAC,EAAE;CAChC,EAAE,OAAO,CAAC,CAAC,CAAC;CACZ,CAAC;AACD;CACA,SAAS,0BAA0B,CAAC,CAAC,EAAE;CACvC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;CAC/B;;CCxrBA,IAAI,MAAM,CAAC;CACJ,IAAI,UAAU,CAAC;CACf,IAAI,SAAS,CAAC;CACd,IAAI,SAAS,CAAC;CACd,IAAI,QAAQ,CAAC;AACpB;CACA,aAAa,CAAC;CACd,EAAE,QAAQ,EAAE,QAAQ;CACpB,EAAE,IAAI,EAAE,YAAY;CACpB,EAAE,IAAI,EAAE,cAAc;CACtB,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;CACvB,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC;CACtF,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;CAC9D,EAAE,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC;CACpI,EAAE,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;CACnG,CAAC,CAAC,CAAC;AACH;CACe,SAAS,aAAa,CAAC,UAAU,EAAE;CAClD,EAAE,MAAM,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;CACpC,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;CAC7B,EAAE,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC;CAC3B,EAAE,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;CAC/B,EAAE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;CAC7B,EAAE,OAAO,MAAM,CAAC;CAChB;;CC1BA,SAAS,eAAe,CAAC,SAAS,EAAE;CACpC,CAAC,MAAM,IAAI,SAAS,CAAC,0DAA0D,IAAI,OAAO,SAAS,CAAC,CAAC,CAAC;CACtG,CAAC;AACD;AACA;CACA,SAAS,MAAM,CAAC,IAAI,EAAE;CACtB,CAAC,OAAO,SAAS,GAAG,EAAE;CACtB,EAAE,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC;CACpD,EAAE,GAAG,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;CACnB,EAAE,OAAO,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CAChC,EAAE,CAAC;CACH;;CCRA,IAAI,gBAAgB,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AACxD;CACA,IAAI,qBAAqB,GAAG;CAC5B;CACA;CACA,CAAC,OAAO,EAAE;CACV,EAAE;CACF,GAAG,KAAK,EAAE,iCAAiC;CAC3C,GAAG,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;CAC1E,GAAG;CACH,EAAE;CACF,GAAG,KAAK,EAAE,oCAAoC;CAC9C,GAAG,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;CAC1E,GAAG;CACH,EAAE;CACF,GAAG,KAAK,EAAE,iCAAiC;CAC3C,GAAG,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;CAC1E,GAAG;CACH,EAAE;CACF;CACA;CACA,CAAC,OAAO,EAAE;CACV,EAAE;CACF,GAAG,KAAK,EAAE,+BAA+B;CACzC,GAAG,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;CAC1E,GAAG;CACH,EAAE;CACF,GAAG,KAAK,EAAE,+BAA+B;CACzC,GAAG,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;CAC1E,GAAG;CACH,EAAE;CACF,GAAG,KAAK,EAAE,+BAA+B;CACzC,GAAG,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;CAC1E,GAAG;CACH,EAAE;CACF,CAAC,CAAC;AACF;AACA;CACA;CACA;CACA,SAAS,oBAAoB,CAAC,gBAAgB,EAAE;CAChD,CAAC,OAAO,SAAS,GAAG,EAAE;CACtB,EAAE,IAAI,eAAe,GAAG,IAAI,CAAC;CAC7B,EAAE,gBAAgB,CAAC,OAAO,CAAC,SAAS,eAAe,EAAE;CACrD,GAAG,IAAI,cAAc,GAAG,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;CACzD,GAAG,IAAI,cAAc,EAAE,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;CACrE,GAAG,CAAC,CAAC;CACL,EAAE,OAAO,eAAe,CAAC;CACzB,EAAE,CAAC;CACH,CAAC;AACD;CACA,SAAS,4BAA4B,CAAC,aAAa,EAAE,aAAa,EAAE;CACpE,CAAC,IAAI,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;CACtC,CAAC,IAAI,SAAS,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC;CAC1C,CAAC,IAAI,IAAI,CAAC;CACV,CAAC,IAAI,OAAO,aAAa,KAAK,UAAU,EAAE;CAC1C,EAAE,IAAI,GAAG,MAAM,CAAC,SAAS,GAAG,EAAE;CAC9B,GAAG,QAAQ,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,EAAE;CACrD,GAAG,CAAC,CAAC;CACL,EAAE;CACF,MAAM;CACN,EAAE,IAAI,GAAG,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC;CAChE,EAAE;AACF;CACA,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC;CACtB,EAAE,IAAI,EAAE,IAAI;CACZ,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE;CAC9B,GAAG,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,qBAAqB,CAAC,aAAa,CAAC,GAAG,oBAAoB,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;CACzI,GAAG,CAAC;CACJ,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE;CAChD,EAAE,IAAI,EAAE,UAAU;CAClB,EAAE,WAAW,EAAE,aAAa;CAC5B,EAAE,EAAE,EAAE,WAAW,GAAG,aAAa;CACjC,EAAE,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC;CACtC,EAAE,CAAC,CAAC;CACJ,CAAC;AACD;CACA,IAAI,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC;CAC7C,CAAC,4BAA4B,CAAC,uBAAuB,CAAC;CACtD,CAAC,4BAA4B,CAAC,mBAAmB,CAAC;CAClD,CAAC,4BAA4B,CAAC,mBAAmB,CAAC;CAClD,CAAC,4BAA4B,CAAC,oBAAoB,CAAC;AACnD;CACA,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;CAC1F,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,gBAAgB,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CACnF,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC/C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;CACzF,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;CAChE,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1F,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;CAC1F,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,gBAAgB,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CACnF,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC/C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;CACzF,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;CAChE,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1F,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;CAC1F,EAAE,CAAC;AACH;CACA,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;CAC1F,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1F,EAAE,CAAC;AACH;CACA,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;AACzC;CACA,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;CAC1F,EAAE,CAAC;AACH;CACA,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;AACzC;CACA,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1F,EAAE,CAAC;AACH;CACA,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;CAC1F,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1F,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;CAC1F,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,OAAO,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC1E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;CAC1D,EAAE,CAAC;AACH;CACA,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;CAC1D,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;CAC1D,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,CAAC;CACzC,CAAC,4BAA4B,CAAC,YAAY,CAAC;CAC3C,CAAC,4BAA4B,CAAC,UAAU,CAAC;CACzC,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;CAC1D,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC7E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;CAC1D,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,CAAC;CACzC,CAAC,4BAA4B,CAAC,UAAU,CAAC;AACzC;CACA,CAAC,4BAA4B,CAAC,OAAO,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC1E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;CAC1D,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,OAAO,CAAC;CACtC,CAAC,4BAA4B,CAAC,OAAO,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC1E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE;CAC1B,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,OAAO,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC1E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE;CAC1B,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,OAAO,CAAC;CACtC,CAAC,4BAA4B,CAAC,OAAO,CAAC;CACtC,CAAC,4BAA4B,CAAC,OAAO,CAAC;CACtC,CAAC,4BAA4B,CAAC,QAAQ,CAAC;CACvC,CAAC,4BAA4B,CAAC,WAAW,CAAC;AAC1C;CACA,CAAC,4BAA4B,CAAC,OAAO,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC1E,EAAE,IAAI,mBAAmB,EAAE,OAAO,IAAI,CAAC;CACvC,EAAE,OAAO,CAAC,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACrE,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,OAAO,CAAC;CACtC,CAAC,4BAA4B,CAAC,OAAO,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC1E,EAAE,IAAI,mBAAmB,EAAE,OAAO,IAAI,CAAC;CACvC,EAAE,OAAO,CAAC,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACrE,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,OAAO,CAAC;CACtC,CAAC,4BAA4B,CAAC,OAAO,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC1E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;CACtE,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,OAAO,CAAC;CACtC,CAAC,4BAA4B,CAAC,OAAO,CAAC;CACtC,CAAC,4BAA4B,CAAC,OAAO,CAAC;CACtC,CAAC,4BAA4B,CAAC,UAAU,CAAC;CACzC,CAAC,4BAA4B,CAAC,oBAAoB,CAAC;AACnD;CACA,CAAC,4BAA4B,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CACvE,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;CAC5B,EAAE,OAAO,GAAG,GAAG,IAAI,IAAI,GAAG,GAAG,IAAI,CAAC;CAClC,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,IAAI,CAAC;CACnC,CAAC,4BAA4B,CAAC,IAAI,CAAC;AACnC;CACA,CAAC,4BAA4B,CAAC,IAAI,CAAC;CACnC,CAAC,4BAA4B,CAAC,UAAU,CAAC;CACzC,CAAC,4BAA4B,CAAC,UAAU,CAAC;CACzC,CAAC,4BAA4B,CAAC,OAAO,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC1E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC3C,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;CACpC,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,UAAU,CAAC;CACzC,CAAC,4BAA4B,CAAC,OAAO,CAAC;CACtC,CAAC,4BAA4B,CAAC,OAAO,CAAC;AACtC;CACA,CAAC,4BAA4B,CAAC,QAAQ,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC3E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;CAC7C,EAAE,CAAC;CACH,CAAC,4BAA4B,CAAC,QAAQ,EAAE,SAAS,GAAG,EAAE,mBAAmB,EAAE;CAC3E,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,KAAK,CAAC;CACzC,EAAE,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;CAC7C,EAAE,CAAC;CACH,CAAC,CAAC;;CC3Qa,sBAAQ,CAAC,CAAC,EAAE;CAC3B,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI;CAC5C,QAAQ,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;CAChD,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;CACvB,CAAC;AACD;CACA;CACA;CACA;CACO,SAAS,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE;CACzC,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC;CAC/F,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACrC;CACA;CACA;CACA,EAAE,OAAO;CACT,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,WAAW;CAChF,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;CACnB,GAAG,CAAC;CACJ;;CCjBe,iBAAQ,CAAC,CAAC,EAAE;CAC3B,EAAE,OAAO,CAAC,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;CAC7D;;CCJe,oBAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE;CAC7C,EAAE,OAAO,SAAS,KAAK,EAAE,KAAK,EAAE;CAChC,IAAI,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM;CACxB,QAAQ,CAAC,GAAG,EAAE;CACd,QAAQ,CAAC,GAAG,CAAC;CACb,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;CACvB,QAAQ,MAAM,GAAG,CAAC,CAAC;AACnB;CACA,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;CAC3B,MAAM,IAAI,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,CAAC;CAClE,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC7C,MAAM,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,EAAE,MAAM;CAC3C,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;CAClD,KAAK;AACL;CACA,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;CACvC,GAAG,CAAC;CACJ;;CCjBe,uBAAQ,CAAC,QAAQ,EAAE;CAClC,EAAE,OAAO,SAAS,KAAK,EAAE;CACzB,IAAI,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE;CAC/C,MAAM,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1B,KAAK,CAAC,CAAC;CACP,GAAG,CAAC;CACJ;;CCNA;CACA,IAAI,EAAE,GAAG,0EAA0E,CAAC;AACpF;CACe,SAAS,eAAe,CAAC,SAAS,EAAE;CACnD,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAAC;CACrF,EAAE,IAAI,KAAK,CAAC;CACZ,EAAE,OAAO,IAAI,eAAe,CAAC;CAC7B,IAAI,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;CAClB,IAAI,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;CACnB,IAAI,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;CAClB,IAAI,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;CACpB,IAAI,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;CAClB,IAAI,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;CACnB,IAAI,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;CACnB,IAAI,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;CAC5C,IAAI,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;CAClB,IAAI,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;CACnB,GAAG,CAAC,CAAC;CACL,CAAC;AACD;CACA,eAAe,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;AACtD;CACO,SAAS,eAAe,CAAC,SAAS,EAAE;CAC3C,EAAE,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,KAAK,SAAS,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC;CACvE,EAAE,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,KAAK,SAAS,GAAG,GAAG,GAAG,SAAS,CAAC,KAAK,GAAG,EAAE,CAAC;CAC1E,EAAE,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,KAAK,SAAS,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC;CACvE,EAAE,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,KAAK,SAAS,GAAG,EAAE,GAAG,SAAS,CAAC,MAAM,GAAG,EAAE,CAAC;CAC5E,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC;CAC/B,EAAE,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,KAAK,SAAS,GAAG,SAAS,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC;CAC5E,EAAE,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC;CACjC,EAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,KAAK,SAAS,GAAG,SAAS,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC;CACxF,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC;CAC/B,EAAE,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,KAAK,SAAS,GAAG,EAAE,GAAG,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC;CACtE,CAAC;AACD;CACA,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAG,WAAW;CAChD,EAAE,OAAO,IAAI,CAAC,IAAI;CAClB,QAAQ,IAAI,CAAC,KAAK;CAClB,QAAQ,IAAI,CAAC,IAAI;CACjB,QAAQ,IAAI,CAAC,MAAM;CACnB,SAAS,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,EAAE,CAAC;CAC9B,SAAS,IAAI,CAAC,KAAK,KAAK,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;CACrE,SAAS,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,EAAE,CAAC;CAC/B,SAAS,IAAI,CAAC,SAAS,KAAK,SAAS,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;CACnF,SAAS,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,EAAE,CAAC;CAC9B,QAAQ,IAAI,CAAC,IAAI,CAAC;CAClB,CAAC;;CC9CD;CACe,mBAAQ,CAAC,CAAC,EAAE;CAC3B,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE;CAC9D,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC;CAChB,MAAM,KAAK,GAAG,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM;CACnC,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM;CACpD,MAAM,SAAS,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM;CAChE,KAAK;CACL,GAAG;CACH,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;CACvD;;CCRO,IAAI,cAAc,CAAC;AAC1B;CACe,yBAAQ,CAAC,CAAC,EAAE,CAAC,EAAE;CAC9B,EAAE,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACnC,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;CACxB,EAAE,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC;CACxB,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,MAAM,CAAC,GAAG,QAAQ,IAAI,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;CACnG,MAAM,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC;CAC7B,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,WAAW;CAC9B,QAAQ,CAAC,GAAG,CAAC,GAAG,WAAW,GAAG,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;CAC5D,QAAQ,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;CACpE,QAAQ,IAAI,GAAG,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC7F;;CCbe,sBAAQ,CAAC,CAAC,EAAE,CAAC,EAAE;CAC9B,EAAE,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACnC,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;CACxB,EAAE,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC;CACxB,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;CACtB,EAAE,OAAO,QAAQ,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,WAAW;CAC3E,QAAQ,WAAW,CAAC,MAAM,GAAG,QAAQ,GAAG,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;CACtH,QAAQ,WAAW,GAAG,IAAI,KAAK,CAAC,QAAQ,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;CAC7E;;ACNA,mBAAe;CACf,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;CACtD,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;CACxD,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE;CACrC,EAAE,GAAG,EAAE,aAAa;CACpB,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE;CACpD,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;CAC9C,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;CAClD,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;CACxD,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE;CAC3D,EAAE,GAAG,EAAE,aAAa;CACpB,EAAE,GAAG,EAAE,gBAAgB;CACvB,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE;CACvE,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE;CACzD,CAAC;;CClBc,iBAAQ,CAAC,CAAC,EAAE;CAC3B,EAAE,OAAO,CAAC,CAAC;CACX;;CCOA,IAAI,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG;CAC7B,IAAI,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACpF;CACe,uBAAQ,CAAC,MAAM,EAAE;CAChC,EAAE,IAAI,KAAK,GAAG,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;CAChK,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,KAAK,SAAS,GAAG,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE;CACnF,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,KAAK,SAAS,GAAG,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE;CACnF,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,KAAK,SAAS,GAAG,GAAG,GAAG,MAAM,CAAC,OAAO,GAAG,EAAE;CACxE,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;CAC7G,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,KAAK,SAAS,GAAG,GAAG,GAAG,MAAM,CAAC,OAAO,GAAG,EAAE;CACxE,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,KAAK,SAAS,GAAG,GAAG,GAAG,MAAM,CAAC,KAAK,GAAG,EAAE;CAClE,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,KAAK,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC;AAC/D;CACA,EAAE,SAAS,SAAS,CAAC,SAAS,EAAE;CAChC,IAAI,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;AAC3C;CACA,IAAI,IAAI,IAAI,GAAG,SAAS,CAAC,IAAI;CAC7B,QAAQ,KAAK,GAAG,SAAS,CAAC,KAAK;CAC/B,QAAQ,IAAI,GAAG,SAAS,CAAC,IAAI;CAC7B,QAAQ,MAAM,GAAG,SAAS,CAAC,MAAM;CACjC,QAAQ,IAAI,GAAG,SAAS,CAAC,IAAI;CAC7B,QAAQ,KAAK,GAAG,SAAS,CAAC,KAAK;CAC/B,QAAQ,KAAK,GAAG,SAAS,CAAC,KAAK;CAC/B,QAAQ,SAAS,GAAG,SAAS,CAAC,SAAS;CACvC,QAAQ,IAAI,GAAG,SAAS,CAAC,IAAI;CAC7B,QAAQ,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;AAC9B;CACA;CACA,IAAI,IAAI,IAAI,KAAK,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,GAAG,GAAG,CAAC;AAC/C;CACA;CACA,SAAS,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,SAAS,KAAK,SAAS,KAAK,SAAS,GAAG,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,GAAG,CAAC;AACtG;CACA;CACA,IAAI,IAAI,IAAI,KAAK,IAAI,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC;AACtF;CACA;CACA;CACA,IAAI,IAAI,MAAM,GAAG,MAAM,KAAK,GAAG,GAAG,cAAc,GAAG,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE;CACxH,QAAQ,MAAM,GAAG,MAAM,KAAK,GAAG,GAAG,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,OAAO,GAAG,EAAE,CAAC;AACpF;CACA;CACA;CACA;CACA,IAAI,IAAI,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC;CACtC,QAAQ,WAAW,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9C;CACA;CACA;CACA;CACA;CACA,IAAI,SAAS,GAAG,SAAS,KAAK,SAAS,GAAG,CAAC;CAC3C,UAAU,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;CACpE,UAAU,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC;AAC/C;CACA,IAAI,SAAS,MAAM,CAAC,KAAK,EAAE;CAC3B,MAAM,IAAI,WAAW,GAAG,MAAM;CAC9B,UAAU,WAAW,GAAG,MAAM;CAC9B,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAClB;CACA,MAAM,IAAI,IAAI,KAAK,GAAG,EAAE;CACxB,QAAQ,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC;CACtD,QAAQ,KAAK,GAAG,EAAE,CAAC;CACnB,OAAO,MAAM;CACb,QAAQ,KAAK,GAAG,CAAC,KAAK,CAAC;AACvB;CACA;CACA,QAAQ,IAAI,aAAa,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;AACvD;CACA;CACA,QAAQ,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AAC5E;CACA;CACA,QAAQ,IAAI,IAAI,EAAE,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAC5C;CACA;CACA,QAAQ,IAAI,aAAa,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,GAAG,EAAE,aAAa,GAAG,KAAK,CAAC;AACjF;CACA;CACA,QAAQ,WAAW,GAAG,CAAC,aAAa,IAAI,IAAI,KAAK,GAAG,GAAG,IAAI,GAAG,KAAK,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,GAAG,EAAE,GAAG,IAAI,IAAI,WAAW,CAAC;CAC/H,QAAQ,WAAW,GAAG,CAAC,IAAI,KAAK,GAAG,GAAG,QAAQ,CAAC,CAAC,GAAG,cAAc,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,WAAW,IAAI,aAAa,IAAI,IAAI,KAAK,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC;AACxI;CACA;CACA;CACA,QAAQ,IAAI,WAAW,EAAE;CACzB,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;CACnC,UAAU,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE;CAC1B,YAAY,IAAI,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE;CAC3D,cAAc,WAAW,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC;CACrG,cAAc,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACxC,cAAc,MAAM;CACpB,aAAa;CACb,WAAW;CACX,SAAS;CACT,OAAO;AACP;CACA;CACA,MAAM,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACzD;CACA;CACA,MAAM,IAAI,MAAM,GAAG,WAAW,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM;CACzE,UAAU,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,KAAK,CAAC,KAAK,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AACnF;CACA;CACA,MAAM,IAAI,KAAK,IAAI,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,KAAK,EAAE,OAAO,CAAC,MAAM,GAAG,KAAK,GAAG,WAAW,CAAC,MAAM,GAAG,QAAQ,CAAC,EAAE,OAAO,GAAG,EAAE,CAAC;AAC9H;CACA;CACA,MAAM,QAAQ,KAAK;CACnB,QAAQ,KAAK,GAAG,EAAE,KAAK,GAAG,WAAW,GAAG,KAAK,GAAG,WAAW,GAAG,OAAO,CAAC,CAAC,MAAM;CAC7E,QAAQ,KAAK,GAAG,EAAE,KAAK,GAAG,WAAW,GAAG,OAAO,GAAG,KAAK,GAAG,WAAW,CAAC,CAAC,MAAM;CAC7E,QAAQ,KAAK,GAAG,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,WAAW,GAAG,KAAK,GAAG,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;CAC5I,QAAQ,SAAS,KAAK,GAAG,OAAO,GAAG,WAAW,GAAG,KAAK,GAAG,WAAW,CAAC,CAAC,MAAM;CAC5E,OAAO;AACP;CACA,MAAM,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;CAC7B,KAAK;AACL;CACA,IAAI,MAAM,CAAC,QAAQ,GAAG,WAAW;CACjC,MAAM,OAAO,SAAS,GAAG,EAAE,CAAC;CAC5B,KAAK,CAAC;AACN;CACA,IAAI,OAAO,MAAM,CAAC;CAClB,GAAG;AACH;CACA,EAAE,SAAS,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE;CAC1C,IAAI,IAAI,CAAC,GAAG,SAAS,EAAE,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,IAAI,GAAG,GAAG,EAAE,SAAS,EAAE;CAChG,QAAQ,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;CAC1E,QAAQ,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;CAC5B,QAAQ,MAAM,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;CACrC,IAAI,OAAO,SAAS,KAAK,EAAE;CAC3B,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC;CACnC,KAAK,CAAC;CACN,GAAG;AACH;CACA,EAAE,OAAO;CACT,IAAI,MAAM,EAAE,SAAS;CACrB,IAAI,YAAY,EAAE,YAAY;CAC9B,GAAG,CAAC;CACJ;;CC/IA,SAAS,iBAAiB,CAAC,MAAM,EAAE;CACnC,CAAC,IAAI,OAAO,GAAG,MAAM,CAAC,YAAY,CAAC;CACnC,CAAC,IAAI,SAAS,GAAG,MAAM,CAAC,kBAAkB,CAAC;CAC3C,CAAC,IAAI,MAAM,GAAGC,cAAY,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;CACxG,CAAC,IAAI,MAAM,EAAE,SAAS,CAAC;AACvB;CACA,CAAC,OAAO,SAAS,KAAK,EAAE,IAAI,EAAE;CAC9B,EAAE,IAAI,KAAK,KAAK,IAAI,EAAE,OAAO,EAAE,CAAC;CAChC,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC;CAC3B,EAAE,IAAI,IAAI,KAAK,SAAS,EAAE;CAC1B,GAAG,SAAS,GAAG,IAAI,CAAC;CACpB,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;CACrC,GAAG;CACH,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;CACvB,EAAE,CAAC;CACH,CAAC;AACD;AACA;CACA;CACA,IAAI,WAAW,GAAG;CAClB,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,qDAAqD,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;CAC/G,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;CAC3E,CAAC,WAAW,EAAE,8CAA8C;CAC5D,CAAC,kBAAkB,EAAE,GAAG;CACxB,CAAC,YAAY,EAAE,GAAG;CAClB,CAAC,EAAE,EAAE,oBAAoB;CACzB,CAAC,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC;AACF;CACA,IAAI,WAAW,GAAG;CAClB,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,sDAAsD,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;CAChH,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;CAC5E,CAAC,WAAW,EAAE,8CAA8C;CAC5D,CAAC,kBAAkB,EAAE,GAAG;CACxB,CAAC,YAAY,EAAE,GAAG;CAClB,CAAC,EAAE,EAAE,oBAAoB;CACzB,CAAC,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC;AACF;CACA,IAAI,UAAU,GAAG;CACjB,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,wCAAwC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;CAClG,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;CACzD,CAAC,WAAW,EAAE,2CAA2C;CACzD,CAAC,kBAAkB,EAAE,EAAE;CACvB,CAAC,YAAY,EAAE,GAAG;CAClB,CAAC,EAAE,EAAE,mBAAmB;CACxB,CAAC,OAAO,EAAE,UAAU;CACpB,CAAC,CAAC;AACF;AACA;CACA,IAAI,WAAW,GAAG;CAClB,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,qDAAqD,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;CAC/G,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;CAC9F,CAAC,WAAW,EAAE,8CAA8C;CAC5D,CAAC,kBAAkB,EAAE,GAAG;CACxB,CAAC,YAAY,EAAE,GAAG;CAClB,CAAC,EAAE,EAAE,oBAAoB;CACzB,CAAC,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC;AACF;CACA,IAAI,WAAW,GAAG;CAClB,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,qDAAqD,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;CAC/G,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;CAC9F,CAAC,WAAW,EAAE,8CAA8C;CAC5D,CAAC,kBAAkB,EAAE,GAAG;CACxB,CAAC,YAAY,EAAE,GAAG;CAClB,CAAC,EAAE,EAAE,oBAAoB;CACzB,CAAC,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC;AACF;CACA,IAAI,UAAU,GAAG;CACjB,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,uCAAuC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;CACjG,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,GAAG,EAAE,EAAE,OAAO,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;CAC3E,CAAC,WAAW,EAAE,2CAA2C;CACzD,CAAC,kBAAkB,EAAE,EAAE;CACvB,CAAC,YAAY,EAAE,GAAG;CAClB,CAAC,EAAE,EAAE,mBAAmB;CACxB,CAAC,OAAO,EAAE,UAAU;CACpB,CAAC,CAAC;AACF;AACA;CACA,IAAI,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC;CAC3C,CAAC,WAAW;CACZ,CAAC,WAAW;CACZ,CAAC,WAAW;CACZ,CAAC,WAAW;CACZ,CAAC,UAAU;CACX,CAAC,UAAU;CACX,CAAC,CAAC,CAAC;AACH;CACA,sBAAsB,CAAC,OAAO,CAAC,SAAS,MAAM,EAAE;CAChD,CAAC,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;CACxB,CAAC,MAAM,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;CAC3C,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CACvB,CAAC,CAAC;;CC/FF,IAAI,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC;CAC1C,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,OAAO,GAAG,KAAK,QAAQ,GAAG,IAAI,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE;CACtF,CAAC,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,OAAO,GAAG,KAAK,QAAQ,GAAG,GAAG,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE;CACtF,CAAC,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,OAAO,GAAG,CAAC,EAAE;CACnE,CAAC,IAAI,EAAE,QAAQ;CACf,CAAC,WAAW,EAAE,kBAAkB;CAChC,CAAC,EAAE,EAAE,yBAAyB;CAC9B,CAAC,CAAC;;CCNF,IAAI,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC;CAC3C,CAAC,QAAQ,EAAE,wBAAwB;CACnC,CAAC,MAAM,EAAE,sBAAsB;CAC/B,CAAC,CAAC,CAAC;AACH;CACA,IAAI,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;AACtF;CACA,IAAI,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;CACpC,CAAC,KAAK,EAAE,GAAG;CACX,CAAC,gBAAgB,EAAE,CAAC;CACpB,CAAC,gBAAgB,EAAE,CAAC,GAAG,GAAG;CAC1B,CAAC,IAAI,EAAE,IAAI;CACX,CAAC,CAAC,CAAC;AACH;CACA,IAAI,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;AAC9D;AACA;CACA,SAAS,YAAY,CAAC,YAAY,EAAE;CACpC,CAAC,OAAO,YAAY,CAAC,OAAO,CAAC,QAAQ,EAAE,SAAS,KAAK,EAAE,OAAO,EAAE;CAChE,EAAE,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC;CAC/B,EAAE,CAAC,CAAC;CACJ,CAAC;AACD;AACA;CACA,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE;CACnD,SAAS,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;AAClF;AACA;CACA,SAAS,IAAI,CAAC,KAAK,EAAE;CACrB,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;CAC5B,CAAC;AACD;AACA;CACA,SAAS,sBAAsB,CAAC,QAAQ,EAAE;CAC1C,CAAC,IAAI,QAAQ,KAAK,SAAS,EAAE,OAAO,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;CAC5E,CAAC,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,OAAO,SAAS,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;CAC5G,CAAC,OAAO,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;CAC/D,CAAC;AACD;AACA;CACO,SAAS,iBAAiB,CAAC,qBAAqB,EAAE;CACzD,CAAC,IAAI,CAAC,qBAAqB,EAAE,qBAAqB,GAAG,6BAA6B,CAAC;CACnF,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE,qBAAqB,GAAG,CAAC,qBAAqB,CAAC,CAAC;AACjG;CACA,CAAC,IAAI,eAAe,GAAG,qBAAqB,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,aAAa,EAAE;CACjF,EAAE,IAAI,OAAO,GAAG,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACtD,EAAE,IAAI,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;CACxD,EAAE,OAAO,GAAG,CAAC;CACb,EAAE,EAAE,EAAE,CAAC,CAAC;AACR;CACA,CAAC,IAAI,cAAc,GAAG,qBAAqB,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACrE;CACA,CAAC,IAAI,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,GAAG,EAAE;CACrD,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;CAClC,EAAE,OAAO,GAAG,CAAC;CACb,EAAE,EAAE,EAAE,CAAC,CAAC;AACR;CACA,CAAC,IAAI,WAAW,GAAG,SAAS,WAAW,EAAE,QAAQ,EAAE;CACnD,EAAE,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAC;CAC9C,EAAE,IAAI,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;CACzE,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,cAAc,GAAG,CAAC,qBAAqB,CAAC,GAAG,EAAE,CAAC;CACzE,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;CAC/C,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC/D,EAAE,IAAI,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAClD,EAAE,IAAI,UAAU,GAAG,OAAO,CAAC,IAAI,GAAG,aAAa,GAAG,MAAM,CAAC;AACzD;CACA,EAAE,IAAI,kBAAkB,GAAG,eAAe,CAAC,KAAK,EAAE;CAClD,GAAG,MAAM,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;CACxC,GAAG,IAAI,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;CACtB,GAAG,IAAI,cAAc,GAAG,EAAE,CAAC;CAC3B,GAAG,IAAI,gBAAgB,GAAG,KAAK,CAAC;AAChC;CACA,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;CAC/B,IAAI,IAAI,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;CACtB,IAAI,IAAI,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;CACpC,IAAI,IAAI,QAAQ,EAAE,SAAS;CAC3B,IAAI,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC1D,SAAS,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;CACjD,KAAK,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;CAC9B,KAAK,IAAI,cAAc,CAAC,MAAM,GAAG,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC3E,KAAK;CACL,IAAI,IAAI,gBAAgB,EAAE,MAAM;CAChC,IAAI;AACJ;CACA,GAAG,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AAC7F;CACA,GAAG,OAAO,IAAI,CAAC;CACf,GAAG,EAAE,EAAE,CAAC;CACR,GAAG,IAAI,CAAC,UAAU,CAAC;CACnB,GAAG,GAAG,CAAC,SAAS,KAAK,EAAE;CACvB,GAAG,OAAO,KAAK,CAAC,MAAM,CAAC;CACvB,GAAG,CAAC,CAAC;AACL;CACA,EAAE,IAAI,cAAc,EAAE,kBAAkB,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AACrE;CACA,EAAE,OAAO,kBAAkB,CAAC;CAC5B,EAAE,CAAC;AACH;CACA,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,MAAM,EAAE;CACtC,EAAE,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,SAAS,KAAK,EAAE;CACtD,GAAG,IAAI,KAAK,KAAK,SAAS,EAAE,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;CACnD,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;CAC3B,GAAG,OAAO,WAAW,CAAC;CACtB,GAAG,CAAC;CACJ,EAAE,CAAC,CAAC;AACJ;CACA,CAAC,OAAO,WAAW,CAAC;CACpB,CAAC;AACD;AACA;CACA,iBAAiB,CAAC,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3G,iBAAiB,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CACvG,iBAAiB,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC,CAAC;AACzE;AACA;CACA,iBAAiB,CAAC,iBAAiB,GAAG,CAAC,WAAW;CAClD,CAAC,IAAI,eAAe,GAAG,wBAAwB,CAAC,MAAM,CAAC,sBAAsB,EAAE,qBAAqB,CAAC,CAAC;CACtG,CAAC,IAAI,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;CACpF,CAAC,OAAO,SAAS,EAAE,EAAE,EAAE,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;CAC5C,CAAC,GAAG,CAAC;AACL;AACA;CACA,iBAAiB,CAAC,uBAAuB,GAAG,sBAAsB;;CC9HlE;CACA;CACA;CACA;AACA,qBAAe;CACf,CAAC,IAAI,EAAE;CACP,EAAE,OAAO,EAAE;CACX,GAAG,SAAS,EAAE,uBAAuB;CACrC,GAAG;CACH,EAAE;CACF,CAAC,IAAI,EAAE;CACP,EAAE,OAAO,EAAE;CACX,GAAG,SAAS,EAAE,EAAE,IAAI,EAAE,+BAA+B,EAAE,GAAG,EAAE,0BAA0B,EAAE;CACxF,GAAG,WAAW,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,qDAAqD,EAAE;CACvH,GAAG,gBAAgB,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE,GAAG,EAAE,wDAAwD,EAAE;CACzH,GAAG,cAAc,EAAE,EAAE,IAAI,EAAE,yBAAyB,EAAE,GAAG,EAAE,iEAAiE,EAAE;CAC9H,GAAG,OAAO,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,8CAA8C,EAAE;CAC5G,GAAG,OAAO,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,6DAA6D,EAAE;CAC5G,GAAG,OAAO,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,GAAG,EAAE,2DAA2D,EAAE;CAClH,GAAG,WAAW,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,iEAAiE,EAAE;CACnI,GAAG,eAAe,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,GAAG,EAAE,sDAAsD,EAAE;CACrH,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,mDAAmD,EAAE;CAChH,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE,GAAG,EAAE,8DAA8D,EAAE;CACzH,GAAG,OAAO,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,GAAG,EAAE,oDAAoD,EAAE;CACzG,GAAG,OAAO,EAAE,EAAE,IAAI,EAAE,gCAAgC,EAAE,GAAG,EAAE,+CAA+C,EAAE;CAC5G,GAAG,OAAO,EAAE,EAAE,IAAI,EAAE,8BAA8B,EAAE,GAAG,EAAE,8CAA8C,EAAE;CACzG,GAAG,SAAS,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,kDAAkD,EAAE;CACrG,GAAG,WAAW,EAAE,EAAE,IAAI,EAAE,4BAA4B,EAAE,GAAG,EAAE,kDAAkD,EAAE;CAC/G,GAAG,KAAK,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,8CAA8C,EAAE;CACzF,GAAG,WAAW,EAAE,EAAE,IAAI,EAAE,4BAA4B,EAAE,GAAG,EAAE,0DAA0D,EAAE;CACvH,GAAG,OAAO,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,iDAAiD,EAAE;CAC/G,GAAG,SAAS,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,GAAG,EAAE,wDAAwD,EAAE;CACjH,GAAG,eAAe,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,iEAAiE,EAAE;CACvI,GAAG,YAAY,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE,GAAG,EAAE,4DAA4D,EAAE;CACzH,GAAG,cAAc,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,oDAAoD,EAAE;CACzH,GAAG,WAAW,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,GAAG,EAAE,iDAAiD,EAAE;CACxG,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,4CAA4C,EAAE;CACzF,GAAG,OAAO,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,GAAG,EAAE,iEAAiE,EAAE;CACtH,GAAG,SAAS,EAAE,EAAE,IAAI,EAAE,4BAA4B,EAAE,GAAG,EAAE,uDAAuD,EAAE;CAClH,GAAG,QAAQ,EAAE,EAAE,IAAI,EAAE,yBAAyB,EAAE,GAAG,EAAE,uDAAuD,EAAE;CAC9G,GAAG,SAAS,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,GAAG,EAAE,wDAAwD,EAAE;CACjH,GAAG,OAAO,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,GAAG,EAAE,sDAAsD,EAAE;CAC3G,GAAG,QAAQ,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,mDAAmD,EAAE;CAClH,GAAG,QAAQ,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,qDAAqD,EAAE;CACpH,GAAG,OAAO,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,wDAAwD,EAAE;CACvG,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,+DAA+D,EAAE;CAChI,GAAG,gBAAgB,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,uDAAuD,EAAE;CAC9H,GAAG,YAAY,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE,GAAG,EAAE,0DAA0D,EAAE;CAC7H,GAAG,YAAY,EAAE,EAAE,IAAI,EAAE,+BAA+B,EAAE,GAAG,EAAE,6DAA6D,EAAE;CAC9H,GAAG;CACH,EAAE;CACF,CAAC,IAAI,EAAE;CACP,EAAE,OAAO,EAAE;CACX,GAAG,SAAS,EAAE,qBAAqB;CACnC,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,GAAG,EAAE,wDAAwD,EAAE;CAC7G,GAAG,gBAAgB,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,GAAG,EAAE,wDAAwD,EAAE;CACnH,GAAG;CACH,EAAE;CACF,CAAC,IAAI,EAAE;CACP,EAAE,OAAO,EAAE;CACX,GAAG,SAAS,EAAE,oBAAoB;CAClC,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,wDAAwD,EAAE;CAC5G,GAAG,gBAAgB,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,wDAAwD,EAAE;CAClH,GAAG;CACH,EAAE;CACF,CAAC,IAAI,EAAE;CACP,EAAE,OAAO,EAAE;CACX,GAAG,SAAS,EAAE,qBAAqB;CACnC,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,GAAG,EAAE,wDAAwD,EAAE;CAC7G,GAAG,gBAAgB,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,GAAG,EAAE,wDAAwD,EAAE;CACnH,GAAG;CACH,EAAE;CACF,CAAC,IAAI,EAAE;CACP,EAAE,OAAO,EAAE;CACX,GAAG,SAAS,EAAE,wBAAwB;CACtC,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,GAAG,EAAE,wDAAwD,EAAE;CAChH,GAAG,gBAAgB,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,GAAG,EAAE,wDAAwD,EAAE;CACtH,GAAG;CACH,EAAE;CACF,CAAC,IAAI,EAAE;CACP,EAAE,OAAO,EAAE;CACX,GAAG,SAAS,EAAE,sBAAsB;CACpC,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,GAAG,EAAE,wDAAwD,EAAE;CAC9G,GAAG,gBAAgB,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,GAAG,EAAE,wDAAwD,EAAE;CACpH,GAAG;CACH,EAAE;CACF,CAAC,IAAI,EAAE;CACP,EAAE,SAAS,EAAE,oBAAoB;CACjC,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,wDAAwD,CAAC;CAC1G,EAAE,gBAAgB,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,wDAAwD,CAAC;CAChH,EAAE;CACF,CAAC;;CC3FD;CACA;CACA;AAGA;CACO,SAAS,oBAAoB,CAAC,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE;CACxF,CAAC,UAAU,GAAG,UAAU,IAAI,yBAAyB;CACrD,CAAC,YAAY,GAAG,YAAY,IAAI,+BAA+B,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI;CACtF,CAAC,UAAU,GAAG,UAAU,IAAI,iCAAiC;CAC7D,CAAC,WAAW,GAAG,WAAW,IAAI,+BAA+B,CAAC;AAC9D;CACA,CAAC,IAAI,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;CAC5C,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;CACjD,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,kSAAkS,CAAC,CAAC;AAClU;CACA,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;CACrC,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY,CAAC,CAAC;CACnD,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,sLAAsL,CAAC,CAAC;CACjN,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACvB;CACA,CAAC,IAAI,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;CACzC,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;CAC1C,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,oBAAoB,CAAC,CAAC;CAC5D,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,EAAE,4MAA4M,CAAC,CAAC;CACzO,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;AACpB;CACA,CAAC,IAAI,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;CAC3C,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,uIAAuI,CAAC,CAAC;CACrK,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;CACxD,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACrB;CACA,CAAC,OAAO,MAAM,CAAC;CACf,CAAC;AACD;CACO,SAAS,4BAA4B,CAAC,IAAI,EAAE,UAAU,EAAE;CAC/D,CAAC,IAAI,WAAW,EAAE,UAAU,CAAC;CAC7B,CAAC,IAAI,GAAG,IAAI,IAAI,IAAI,EAAE,UAAU,GAAG,UAAU,IAAI,EAAE,CAAC;CACpD,CAAC,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,aAAa,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,aAAa,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;CACnI,CAAC,IAAI,OAAO,WAAW,IAAI,QAAQ,EAAE;CACrC,EAAE,IAAI,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC;CACpD,EAAE,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC;CACjC,EAAE;CACF,CAAC,OAAO;CACR,EAAE,WAAW,EAAE,WAAW;CAC1B,EAAE,UAAU,EAAE,UAAU;CACxB,EAAE,CAAC;CACH;;CChDA;CACA;CACA;CACA;CACA;CACA,IAAI,OAAO,GAAG,KAAK,CAAC;AACpB;CACA,SAAS,eAAe,GAAG;CAC3B,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC;CACf,CAAC,IAAI,MAAM,CAAC,qBAAqB,EAAE;CACnC,EAAE,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,qBAAqB,CAAC;CAClD,EAAE;CACF,CAAC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,kBAAkB,EAAE;CACvF,EAAE,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,kBAAkB,CAAC;CAC5D,EAAE;AACF;CACA,CAAC,IAAI,MAAM,CAAC,0BAA0B,EAAE;CACxC,EAAE,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,0BAA0B,CAAC;CAC5D,EAAE;CACF,CAAC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,oBAAoB,EAAE;CACzF,EAAE,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,CAAC;CACtE,EAAE;AACF;CACA,CAAC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE;CAC1E,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;CAC/C,EAAE,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;CAC7D,EAAE;AACF;CACA,CAAC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,EAAE;CAClF;CACA,EAAE,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,GAAG,CAAC,CAAC;CACjE,EAAE;CACF,CAAC,OAAO,IAAI,CAAC;CACb,CAAC;AACD;CACO,SAAS,4BAA4B,CAAC,OAAO,EAAE;CACtD,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO;CACtB,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO;AACxC;CACA,CAAC,IAAI,eAAe,GAAG,MAAM,CAAC;CAC9B,CAAC,IAAI,eAAe,CAAC,QAAQ,CAAC,QAAQ,KAAK,QAAQ,EAAE,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC;AAC9F;CACA,CAAC,IAAI,aAAa,GAAG,eAAe,EAAE,CAAC;AACvC;CACA,CAAC,IAAI,qBAAqB,GAAG;CAC7B,EAAE,MAAM,EAAE,UAAU;CACpB,EAAE,MAAM,EAAE,mBAAmB;CAC7B,EAAE,CAAC;AACH;CACA,CAAC,KAAK,IAAI,GAAG,IAAI,aAAa,EAAE;CAChC,EAAE,IAAI,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;CACzC,GAAG,qBAAqB,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;CACnD,GAAG;CACH,EAAE;AACF;CACA,CAAC,KAAK,IAAI,GAAG,IAAI,OAAO,EAAE;CAC1B,EAAE,IAAI,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;CACnC,GAAG,qBAAqB,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;CAC7C,GAAG;CACH,EAAE;AACF;CACA,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,EAAE,GAAG,CAAC,CAAC;CAChF,CAAC;AACD;CACO,SAAS,oBAAoB,CAAC,QAAQ,EAAE;CAC/C,CAAC,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;CACrC,EAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;CAC1D,EAAE;CACF,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;CACrD,CAAC;AAqBD;CACO,SAAS,qBAAqB,GAAG;CACxC,CAAC,OAAO,GAAG,IAAI,CAAC;AAChB;CACA,CAAC,IAAI,MAAM,GAAG;CACd,EAAE;CACF,GAAG,UAAU,EAAE,OAAO;CACtB,GAAG,WAAW,EAAE,OAAO;CACvB,GAAG,WAAW,EAAE,IAAI;CACpB,GAAG;CACH,EAAE;CACF,GAAG,UAAU,EAAE,SAAS;CACxB,GAAG,WAAW,EAAE,UAAU;CAC1B,GAAG,WAAW,EAAE,IAAI;CACpB,GAAG;CACH,EAAE;CACF,GAAG,UAAU,EAAE,YAAY;CAC3B,GAAG,WAAW,EAAE,aAAa;CAC7B,GAAG,WAAW,EAAE,KAAK;CACrB,GAAG;CACH,EAAE;CACF,GAAG,UAAU,EAAE,YAAY;CAC3B,GAAG,WAAW,EAAE,aAAa;CAC7B,GAAG,WAAW,EAAE,KAAK;CACrB,GAAG;CACH,EAAE,CAAC;AACH;CACA,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,KAAK,EAAE;CAChC,EAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,EAAE,WAAW;CAC9D,GAAG,4BAA4B,CAAC;CAChC,IAAI,MAAM,EAAE,KAAK,CAAC,WAAW;CAC7B,IAAI,CAAC,CAAC;CACN,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CACxB,EAAE,CAAC,CAAC;CACJ;;CC5HA;CACA;CACA;AAGA;CACA,SAAS,gBAAgB,GAAG;CAC5B;CACA,CAAC,IAAI,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;CAChC;CACA;CACA,CAAC,IAAI,QAAQ,CAAC,IAAI,IAAI,cAAc,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;CACxE,CAAC,IAAI,MAAM,GAAG,EAAE,CAAC;CACjB,CAAC,CAAC,UAAU,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE;CAC9B,EAAE,OAAO,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;CACjC,GAAG,MAAM,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CACvE,GAAG;CACH,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,oBAAoB,CAAC,CAAC;CAC9E,CAAC,OAAO,MAAM,CAAC;CACf;;CCnBA;CACA;CACA;AAUA;CACA,IAAI,eAAe,CAAC;CACpB,IAAI,MAAM,CAAC;AACX;CACA,SAAS,aAAa,GAAG;CACzB,CAAC,IAAI,eAAe,IAAI,SAAS,EAAE;CACnC,EAAE,IAAI,MAAM,GAAG,gBAAgB,EAAE,CAAC;CAClC;CACA;CACA,EAAE,IAAI,UAAU,IAAI,MAAM,EAAE,eAAe,GAAG,yBAAyB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;CAC9F,OAAO,eAAe,GAAG,EAAE,MAAM,IAAI,MAAM,CAAC,CAAC;CAC7C,EAAE;CACF,CAAC,OAAO,eAAe,CAAC;CACxB,CAAC;AACD;CACA,SAAS,sBAAsB,CAAC,KAAK,EAAE;CACvC,CAAC,IAAI,gBAAgB,GAAG,KAAK,IAAI,MAAM,CAAC,UAAU,CAAC;CACnD,CAAC,IAAI,gBAAgB,GAAG,GAAG,EAAE,OAAO,GAAG,CAAC;CACxC,CAAC,IAAI,gBAAgB,GAAG,GAAG,EAAE,OAAO,GAAG,CAAC;CACxC,CAAC,OAAO,GAAG,CAAC;CACZ,CAAC;AACD;CACA,SAAS,WAAW,CAAC,IAAI,EAAE;CAC3B,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO;CACnB,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO;CACxC,CAAC,IAAI,eAAe,GAAG,MAAM,CAAC;CAC9B,CAAC,IAAI,eAAe,CAAC,QAAQ,CAAC,QAAQ,IAAI,QAAQ,EAAE,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC;CAC7F,CAAC,IAAI,OAAO,GAAG;CACf,EAAE,MAAM,EAAE,UAAU;CACpB,EAAE,MAAM,EAAE,SAAS;CACnB,EAAE,CAAC;CACH,CAAC,IAAI,IAAI,EAAE;CACX,EAAE,KAAK,IAAI,IAAI,IAAI,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;CACpD,EAAE;CACF,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC;CAClE,CAAC;AACD;CACA,SAAS,kBAAkB,CAAC,MAAM,EAAE,IAAI,EAAE;CAC1C,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO;CACxC,CAAC,IAAI,eAAe,GAAG,MAAM,CAAC;CAC9B,CAAC,IAAI,eAAe,CAAC,QAAQ,CAAC,QAAQ,IAAI,QAAQ,EAAE,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC;CAC7F,CAAC,IAAI,MAAM,EAAE;CACb;CACA,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;CAChC,EAAE,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC;CACrC,GAAG,QAAQ,EAAE,KAAK;CAClB,GAAG,IAAI,EAAE,YAAY;CACrB,GAAG,MAAM,EAAE,MAAM;CACjB,GAAG,EAAE,GAAG,CAAC,CAAC;CACV,EAAE,OAAO;CACT,EAAE;CACF,CAAC,IAAI,OAAO,GAAG;CACf,EAAE,MAAM,EAAE,UAAU;CACpB,EAAE,OAAO,EAAE,eAAe;CAC1B,EAAE,MAAM,EAAE,QAAQ;CAClB,EAAE,MAAM,EAAE,MAAM;CAChB,EAAE,GAAG,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,EAAE;CAC1C,EAAE,CAAC;CACH,CAAC,IAAI,IAAI,EAAE;CACX,EAAE,KAAK,IAAI,IAAI,IAAI,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;CACpD,EAAE;CACF,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC;CAClE,CAAC;AACD;CACA,SAAS,QAAQ,GAAG;CACpB;CACA;CACA;CACA;CACA,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;CACtJ,CAAC;AACD;CACA,SAAS,QAAQ,CAAC,CAAC,EAAE;CACrB,CAAC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,YAAY,MAAM,CAAC;CACrD,CAAC;AACD;CACA,SAAS,gBAAgB,CAAC,CAAC,EAAE;CAC7B,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;CAC5B,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;CAC/B,EAAE;CACF,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;CACvB;CACA;CACA;CACA,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,8EAA8E,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CAChH,EAAE;CACF,CAAC,OAAO,KAAK,CAAC;CACd,CAAC;AACD;CACA,SAAS,mBAAmB,CAAC,OAAO,EAAE;CACtC,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE;CAChC,EAAE,OAAO,CAAC,IAAI,CAAC,4CAA4C,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9E,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;CAC3E,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,KAAK,CAAC;CACnF,CAAC,OAAO,IAAI,CAAC;CACb,CAAC;AACD;CACA,SAAS,qBAAqB,CAAC,OAAO,EAAE;CACxC,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE;CAClC,EAAE,OAAO,CAAC,IAAI,CAAC,8CAA8C,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAChF,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1C,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;CAC9C,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,CAAC;CACrD,CAAC,OAAO,IAAI,CAAC;CACb,CAAC;AACD;CACA,SAAS,yBAAyB,CAAC,QAAQ,EAAE;CAC7C,CAAC,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;CACtF,CAAC;AACD;CACA,SAAS,eAAe,CAAC,OAAO,EAAE;CAClC,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE;CACnC,EAAE,OAAO,CAAC,IAAI,CAAC,wCAAwC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1E,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,CAAC;CAClD,CAAC,OAAO,IAAI,CAAC;CACb,CAAC;AACD;CACA,SAAS,gCAAgC,CAAC,OAAO,EAAE;CACnD,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,mBAAmB,EAAE;CAC7C,EAAE,OAAO,CAAC,IAAI,CAAC,yDAAyD,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3F,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF;CACA;CACA;CACA,CAAC,OAAO,IAAI,CAAC;CACb,CAAC;AACD;CACA,SAAS,qBAAqB,CAAC,OAAO,EAAE;CACxC,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,gBAAgB,EAAE;CAC1C,EAAE,OAAO,CAAC,IAAI,CAAC,8CAA8C,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAChF,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF;CACA;CACA,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,CAAC;CAC3C,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,IAAI,IAAI,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC;CACzE,CAAC,OAAO,IAAI,CAAC;CACb,CAAC;AACD;CACA,SAAS,oBAAoB,CAAC,OAAO,EAAE;CACvC,CAAC,IAAI,4BAA4B,GAAG;CACpC,EAAE,MAAM,EAAE,mBAAmB;CAC7B,EAAE,QAAQ,EAAE,qBAAqB;CACjC,EAAE,YAAY,EAAE,yBAAyB;CACzC,EAAE,mBAAmB,EAAE,gCAAgC;CACvD,EAAE,gBAAgB,EAAE,qBAAqB;CACzC,EAAE,SAAS,EAAE,eAAe;CAC5B,EAAE,CAAC;CACH,CAAC,IAAI,UAAU,GAAG,EAAE,CAAC;CACrB,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAC1C,EAAE,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAC1B,EAAE,IAAI,4BAA4B,CAAC,MAAM,CAAC,EAAE;CAC5C,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAAC;CAC7D,GAAG;CACH,OAAO;CACP,GAAG,MAAM,IAAI,KAAK,CAAC,gCAAgC,GAAG,MAAM,CAAC,CAAC;CAC9D,GAAG;CACH,EAAE;CACF,CAAC,OAAO,UAAU,CAAC;CACnB,CAAC;AACD;CACA,SAAS,mBAAmB,CAAC,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAE;CACtE,CAAC,IAAI,kBAAkB,GAAG,oBAAoB,CAAC,eAAe,CAAC,CAAC;CAChE,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,KAAK,EAAE;CACpD,EAAE,IAAI,wBAAwB,GAAG,CAAC,YAAY;CAC9C,GAAG,IAAI,KAAK,CAAC,MAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE;CACjD,IAAI,OAAO,IAAI,CAAC;CAChB,IAAI;CACJ;CACA,GAAG,IAAI,YAAY,EAAE;CACrB,IAAI,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;CAC9C,IAAI,YAAY,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC;AAC9C;CACA;CACA,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,YAAY,CAAC,EAAE,OAAO,IAAI,CAAC;AAC1D;CACA;CACA,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,YAAY,CAAC,EAAE,OAAO,IAAI,CAAC;CACzD,IAAI;CACJ,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,8KAA8K,CAAC,EAAE;CAC3M,IAAI,OAAO,IAAI,CAAC;CAChB,IAAI;CACJ,GAAG,OAAO,KAAK,CAAC;CAChB,GAAG,GAAG,CAAC;AACP;CACA;CACA;CACA,EAAE,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI,EAAE,OAAO;CACnC,EAAE,IAAI,CAAC,wBAAwB,EAAE,OAAO;CACxC,EAAE,IAAI,OAAO,CAAC;CACd,EAAE,IAAI;CACN,GAAG,OAAO,GAAG,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,GAAG,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;CAClF,GAAG;CACH,EAAE,OAAO,CAAC,EAAE;CACZ,GAAG,OAAO,CAAC,IAAI,CAAC,+BAA+B,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;CAC9E,GAAG,OAAO;CACV,GAAG;CACH,EAAE,IAAI,OAAO,CAAC,MAAM,KAAK,UAAU,EAAE,OAAO;CAC5C,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;CACvB,GAAG,OAAO,CAAC,IAAI,CAAC,gDAAgD,EAAE,OAAO,CAAC,CAAC;CAC3E,GAAG,OAAO;CACV,GAAG;CACH,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE;CACjF,GAAG,OAAO,CAAC,IAAI,CAAC,sCAAsC,EAAE,OAAO,CAAC,CAAC;CACjE,GAAG,OAAO;CACV,GAAG;CACH,EAAE,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE;CACpD,GAAG,OAAO,CAAC,IAAI,CAAC,mCAAmC,EAAE,OAAO,CAAC,CAAC;CAC9D,GAAG,OAAO;CACV,GAAG;CACH,EAAE,IAAI,MAAM,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;CACnD,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACxC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,aAAa,IAAI,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,aAAa,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE;CAClG,IAAI,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CACjC,IAAI,OAAO;CACX,IAAI;CACJ,GAAG;CACH,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;CAChD,EAAE,CAAC,CAAC;AACJ;CACA,CAAC,IAAI,QAAQ,EAAE,EAAE;CACjB,EAAE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;CAC1D,EAAE,oBAAoB,EAAE,CAAC;CACzB,EAAE;CACF,CAAC;AACD;CACA,SAAS,oBAAoB,GAAG;CAChC;CACA,CAAC,IAAI,UAAU,GAAG,QAAQ,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;CAC/D,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAC3C,EAAE,IAAI,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;CAChC,EAAE,IAAI,SAAS,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,SAAS;CACrD,EAAE,IAAI,MAAM,GAAG,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;CACjD;CACA;CACA,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS;CACxB,EAAE,IAAI,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;CAC1D,EAAE,IAAI,KAAK,GAAG,SAAS,CAAC,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,UAAU,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;CACvH,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;CACpC,EAAE;CACF,CAAC;AACD;CACA,SAAS,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE;CACvC,CAAC,IAAI,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC;CACA;CACA,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE;CACtD,EAAE,OAAO,CAAC,IAAI,CAAC,iFAAiF,CAAC,CAAC;CAClG,EAAE,OAAO;CACT,EAAE;AACF;CACA,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;CAC5C,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;CACpC,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC;CACpC,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,GAAG,sBAAsB,CAAC;AACjD;CACA,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;CAClC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC;CACpD,CAAC,IAAI,CAAC,CAAC,EAAE;CACT,EAAE,CAAC,GAAG,MAAM,CAAC;CACb,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;CAC1B,EAAE;CACF,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,cAAc,GAAG,CAAC,GAAG,KAAK,CAAC;AAC/C;CACA,CAAC,IAAI,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;CACvD,CAAC,IAAI,MAAM,EAAE;CACb,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;CACnC,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,cAAc,GAAG,CAAC,GAAG,KAAK,CAAC;CAChD,EAAE;AACF;CACA,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE;CAC/B,EAAE,IAAI,WAAW,GAAG,OAAO,CAAC,IAAI,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;CAC3D,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;CAC3C,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;CACrC,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;CAC3C,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;CACnC,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,oBAAoB,CAAC;CAC9C,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC;CACjC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;CAChC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;CAC7B,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC;CAC7B,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;CAC3D,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;CACjC,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC;CAClC,EAAE,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;CAC9C,EAAE,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC;CACxB,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,WAAW,GAAG,EAAE,GAAG,QAAQ,CAAC;CACzD,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,cAAc,CAAC;CACzC,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC;CACtC,EAAE,OAAO,CAAC,KAAK,CAAC,YAAY,GAAG,QAAQ,CAAC;CACxC,EAAE,OAAO,CAAC,KAAK,CAAC,aAAa,GAAG,QAAQ,CAAC;CACzC,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW,GAAG,QAAQ,CAAC;CACvC,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,uBAAuB,CAAC;CACrD,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,8BAA8B,CAAC;CAC3D,EAAE,OAAO,CAAC,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC;CACtC,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;CACrC,EAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;CAClC,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC;CAClC,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;CACrC,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;CAC5B,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;CAC3B,EAAE,CAAC,CAAC;CACJ,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;CAC1B,CAAC;AACD;CACA,SAAS,gBAAgB,CAAC,SAAS,EAAE;CACrC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACd,CAAC,IAAI,QAAQ,GAAG,IAAI,oBAAoB,CAAC,SAAS,OAAO,EAAE;CAC3D,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,KAAK,EAAE;CAClC,GAAG,IAAI,KAAK,CAAC,cAAc,EAAE;CAC7B,IAAI,IAAI,MAAM,GAAG,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;CACnD,IAAI,IAAI,MAAM,EAAE,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;CACvH,IAAI;CACJ,GAAG,CAAC,CAAC;CACL,EAAE,EAAE,EAAE,UAAU,EAAE,WAAW,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC;AAC9C;CACA,CAAC,IAAI,KAAK,GAAG,SAAS,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;CAC/D,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACxC,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CAC7B,EAAE;AACF;CACA;CACA;CACA;CACA;CACA;CACA,CAAC,IAAI,MAAM,GAAG,SAAS,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;CACpE,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;CAChE,CAAC;AACD;AACA;CACA,SAAS,iBAAiB,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE;CAC9E,CAAC,IAAI,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;CAC/C,CAAC,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;CACxC,CAAC,MAAM,CAAC,YAAY,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;CACzC,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,+BAA+B,CAAC,CAAC;CAC/D,CAAC,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,iJAAiJ,CAAC,CAAC;CACnL,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,CAAC,IAAI,MAAM,CAAC,YAAY,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,QAAQ,KAAK,OAAO,EAAE;CAC3E,EAAE,gBAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;CAC9E,EAAE;CACF,MAAM;CACN,EAAE,IAAI,SAAS,GAAG;CAClB,GAAG,SAAS,EAAE,SAAS;CACvB,GAAG,SAAS,EAAE,SAAS;CACvB,GAAG,MAAM,EAAE,MAAM;CACjB,GAAG,KAAK,EAAE,KAAK;CACf,GAAG,MAAM,EAAE,MAAM;CACjB,GAAG,YAAY,EAAE,YAAY;CAC7B,GAAG,CAAC;CACJ;CACA;CACA,EAAE,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE;CACpC,GAAG,MAAM,CAAC,oBAAoB,GAAG,CAAC,SAAS,CAAC,CAAC;CAC7C,GAAG;CACH,OAAO;CACP;CACA,GAAG,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;CAC/C,GAAG;AACH;CACA,EAAE,IAAI,MAAM,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE;CAC9C;CACA;CACA;CACA,GAAG,OAAO,MAAM,CAAC;CACjB,GAAG;AACH;CACA;CACA,EAAE,IAAI,QAAQ,GAAG,WAAW,CAAC,WAAW;CACxC,GAAG,MAAM,CAAC,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE;CACnF,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;CACnC;CACA,KAAK,OAAO,IAAI,CAAC;CACjB,KAAK;AACL;CACA;CACA;CACA,IAAI,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;CAC9G,IAAI,OAAO,KAAK,CAAC;CACjB,IAAI,CAAC,CAAC;AACN;CACA,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE;CAC5C;CACA;CACA,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC;CAC5B,IAAI;CACJ,GAAG,EAAE,GAAG,CAAC,CAAC;CACV,EAAE;CACF,CAAC,OAAO,MAAM,CAAC;CACf,CAAC;AACD;CACA,SAAS,gBAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE;CACrF,CAAC,IAAI,WAAW,CAAC;CACjB,CAAC,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;CACzC,EAAE,WAAW,GAAG,KAAK,CAAC;CACtB,EAAE,KAAK,GAAG,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC;CAC5B,EAAE;CACF;CACA;CACA;CACA,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,4JAA4J,CAAC,EAAE;CAC9L,EAAE,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;CAClC,EAAE;AACF;CACA,CAAC,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,MAAM,GAAG,EAAE,GAAG,MAAM,GAAG,IAAI,CAAC;CACvE;CACA;CACA,CAAC,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;CACvC,MAAM,IAAI,QAAQ,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;CACxE,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;AAClC;CACA,CAAC,IAAI,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;CAC7B,CAAC,IAAI,CAAC,YAAY,EAAE;CACpB,EAAE,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,IAAI,SAAS,CAAC;CACpD,OAAO,SAAS,IAAI,SAAS,CAAC;CAC9B;CACA;CACA,EAAE,MAAM,GAAG,sBAAsB,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;CAC5E,EAAE;AACF;CACA,CAAC,IAAI,MAAM,EAAE;CACb,EAAE,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;CAChD,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,SAAS,CAAC,UAAU,CAAC,YAAY,GAAG,IAAI,CAAC;CAClF,GAAG;CACH,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;CAC/B,EAAE;AACF;CACA,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,SAAS,IAAI,YAAY,GAAG,eAAe,GAAG,EAAE,CAAC,CAAC,CAAC;AAC/E;CACA,CAAC,OAAO,MAAM,CAAC;CACf,CAAC;AACD;CACA,SAAS,aAAa,GAAG;CACzB,CAAC,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC;CAC3C,CAAC,OAAO;CACR,EAAE,iBAAiB,EAAE,iBAAiB;CACtC,EAAE,aAAa,EAAE,aAAa;CAC9B,EAAE,sBAAsB,EAAE,sBAAsB;CAChD,EAAE,mBAAmB,EAAE,mBAAmB;CAC1C,EAAE,kBAAkB,EAAE,kBAAkB;CACxC,EAAE,WAAW,EAAE,WAAW;CAC1B,EAAE,aAAa,EAAE,aAAa;CAC9B,EAAE,QAAQ,EAAE,QAAQ;CACpB,EAAE,qBAAqB,EAAE,qBAAqB;CAC9C,EAAE,oBAAoB,EAAE,oBAAoB;CAC5C,EAAE,4BAA4B,EAAE,4BAA4B;CAC5D,EAAE,CAAC;CACH;;CCpdA,IAAI,OAAO,GAAG,OAAO,CAAC;AACtB;CACA,IAAI,QAAQ,GAAG;CACf,CAAC,OAAO,EAAE,sCAAsC;CAChD,CAAC,oBAAoB,EAAE,iCAAiC;CACxD,CAAC,8BAA8B,EAAE,OAAO;CACxC,CAAC,CAAC;AACF;CACA;CACA,IAAI,oBAAoB,GAAG;CAC3B,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,uBAAuB;CACvE,CAAC,CAAC;AACF;CACA;CACA;CACA;CACA,IAAI,eAAe,GAAG,EAAE,CAAC;AACzB;CACA,SAAS,SAAS,CAAC,CAAC,EAAE;CACtB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;CAC9B,MAAM,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;CACjC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1C,EAAE,OAAO,CAAC,CAAC;CACX,EAAE;CACF,MAAM,OAAO,EAAE,GAAG,CAAC,CAAC;CACpB,CAAC;AACD;CACA,SAAS,WAAW,CAAC,CAAC,EAAE;CACxB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;CACZ,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;CAC9B,CAAC,OAAO,CAAC,CAAC;CACV,CAAC;AACD;CACA,SAAS,QAAQ,CAAC,CAAC,EAAE;CACrB,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,IAAI,IAAI,CAAC;CAChE,CAAC;AACD;CACA;CACA;CACA;CACA;CACA,SAAS,QAAQ,CAAC,GAAG,EAAE;CACvB,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,OAAO,GAAG,CAAC;CAC7B,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC;CACf,CAAC,KAAK,IAAI,CAAC,IAAI,GAAG,EAAE;CACpB,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;CAC7B,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;CAC5B,GAAG;CACH,OAAO,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;CAC7B,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;CAC9B,GAAG;CACH,OAAO;CACP,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;CACpB,GAAG;CACH,EAAE;CACF,CAAC,OAAO,IAAI,CAAC;CACb,CAAC;AACD;CACA,IAAI,SAAS,GAAG,IAAI,CAAC;AACrB;CACA,SAAS,qBAAqB,CAAC,MAAM,EAAE;CACvC,CAAC,MAAM,WAAW,GAAG,iBAAiB,EAAE,CAAC;CACzC,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/C;CACA,CAAC,OAAO;CACR,EAAE,IAAI,EAAE,cAAc,CAAC,IAAI;CAC3B,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE;CAC5B,EAAE,gBAAgB,EAAE,cAAc,CAAC,EAAE;CACrC,EAAE,CAAC;CACH,CAAC;AACD;CACA,SAAS,KAAK,CAAC,IAAI,EAAE;CACrB,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AAC1B;CACA,CAAC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;CAC9B,CAAC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;CAC9B,CAAC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;CAC3B,CAAC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;CAC/B,CAAC,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;AAC3B;CACA,CAAC,KAAK,IAAI,IAAI,IAAI,QAAQ,EAAE;CAC5B,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;CAC9D,EAAE;AACF;CACA,CAAC,IAAI,IAAI,CAAC,qBAAqB,EAAE;CACjC,EAAE,IAAI,IAAI,GAAG,IAAI,CAAC;CAClB,EAAE,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,SAAS,KAAK,EAAE,IAAI,EAAE;CAC1D,GAAG,IAAI,KAAK,EAAE;CACd,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;CACjC,IAAI,OAAO;CACX,IAAI;CACJ,GAAG,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;CACnC,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;CACzB,GAAG,CAAC,CAAC;CACL,EAAE;CACF,MAAM;CACN,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;CACxB,EAAE;CACF,CAAC;AACD;CACA,KAAK,CAAC,SAAS,CAAC,sBAAsB,GAAG,SAAS,4BAA4B,CAAC,IAAI,EAAE,QAAQ,EAAE;CAC/F,CAAC,IAAI,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;CAChC,CAAC,GAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,WAAW;CACzC,EAAE,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,EAAE;CAC1B,GAAG,IAAI,KAAK,GAAG,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;CACnE,GAAG,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;CAC1B,GAAG;CACH,EAAE,IAAI,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;CAClD,EAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;CACrC,EAAE,CAAC,CAAC;AACJ;CACA,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,8BAA8B,CAAC;CACzD,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;CACjD,EAAE,OAAO,QAAQ;CACjB,GAAG,IAAI,KAAK,CAAC,CAAC,+EAA+E,CAAC,CAAC;CAC/F,GAAG,CAAC;CACJ,EAAE;CACF,CAAC,MAAM,IAAI,GAAG,WAAW,IAAI,OAAO,GAAG,qBAAqB,GAAG,4BAA4B,CAAC;AAC5F;CACA,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,oBAAoB,GAAG,gBAAgB,GAAG,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;CACnG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;CACZ,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,UAAU,GAAG,SAAS,gBAAgB,CAAC,IAAI,EAAE;CAC7D,CAAC,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC;CAC/B,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,oBAAoB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACvD,EAAE,IAAI,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;CAClC,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;CACxC,EAAE;AACF;CACA,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,aAAa,EAAE,CAAC;CAC7C,CAAC,IAAI,SAAS,GAAG,IAAI,CAAC,OAAO,GAAG,WAAW;CAC3C,EAAE,WAAW,GAAG,IAAI,CAAC,OAAO;CAC5B,EAAE,eAAe,GAAG,kBAAkB,CAAC,OAAO,CAAC;CAC/C,EAAE,YAAY,GAAG,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;CAClD,EAAE,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC;AAC7B;CACA,CAAC,IAAI,SAAS,GAAG,CAAC,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;AAChH;CACA,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACjG;CACA,CAAC,IAAI,IAAI,GAAG,IAAI,CAAC;CACjB,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,WAAW;CACjD,EAAE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;CAC9B,EAAE,IAAI,IAAI,CAAC,eAAe,EAAE;CAC5B,GAAG,IAAI,CAAC,KAAK;CACb,IAAI;CACJ,KAAK,KAAK,EAAE,IAAI,CAAC,KAAK;CACtB,KAAK,IAAI,EAAE,IAAI,CAAC,KAAK;CACrB,KAAK,cAAc,EAAE,IAAI,CAAC,cAAc;CACxC,KAAK;CACL,IAAI,IAAI,CAAC,QAAQ;CACjB,IAAI,CAAC;CACL,GAAG;CACH,EAAE,CAAC,CAAC;AACJ;CACA,CAAC,SAAS,CAAC,mBAAmB;CAC9B,EAAE,SAAS,OAAO,EAAE,KAAK,EAAE;CAC3B,GAAG,IAAI,OAAO,CAAC,MAAM,IAAI,QAAQ,EAAE;CACnC,IAAI,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAChC,IAAI,IAAI,IAAI,GAAG,OAAO,MAAM,CAAC;CAC7B;CACA,IAAI,IAAI,IAAI,KAAK,QAAQ,KAAK,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC;CAC3F,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CACxC,IAAI;CACJ,GAAG;CACH,EAAE,CAAC,QAAQ,CAAC;CACZ,EAAE,CAAC;AACH;CACA,CAAC,IAAI,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;CAChC,CAAC,GAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,YAAY;CAC1C,EAAE,IAAI,IAAI,CAAC,MAAM,KAAK,GAAG,EAAE;CAC3B,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;CAChD,GAAG,OAAO;CACV,GAAG;CACH,EAAE,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,EAAE;CAC1B,GAAG,OAAO,CAAC,KAAK,CAAC,gEAAgE,CAAC,CAAC;CACnF,GAAG,OAAO;CACV,GAAG;CACH,EAAE,IAAI,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAClD;CACA,EAAE,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;AACnD;CACA;CACA;CACA,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;CAC3E,EAAE,IAAI,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,SAAS,EAAE;CAClE,GAAG,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC;CACtE,GAAG;AACH;CACA,EAAE,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;CACvD,EAAE,IAAI,CAAC,iBAAiB,GAAG,WAAW,CAAC,QAAQ,IAAI,EAAE,CAAC;CACtD,EAAE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;CACzE,EAAE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;CAC9B,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;CAC1B,EAAE,IAAI,IAAI,CAAC,eAAe,EAAE;CAC5B,GAAG,IAAI,CAAC,KAAK;CACb,IAAI;CACJ,KAAK,KAAK,EAAE,IAAI,CAAC,KAAK;CACtB,KAAK,IAAI,EAAE,IAAI,CAAC,KAAK;CACrB,KAAK,cAAc,EAAE,IAAI,CAAC,cAAc;CACxC,KAAK;CACL,IAAI,IAAI,CAAC,QAAQ;CACjB,IAAI,CAAC;CACL,GAAG;AACH;CACA,EAAE,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;CAChC,GAAG,IAAI,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;CAClE,GAAG,IAAI,aAAa,GAAG,4BAA4B,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;CAC9E,GAAG,IAAI,MAAM,GAAG,oBAAoB,CAAC,aAAa,CAAC,UAAU;CAC7D,IAAI,IAAI,EAAE,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CAC3C,GAAG,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;CACjC,GAAG;CACH,EAAE,CAAC,CAAC;AACJ;CACA,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,GAAG,oBAAoB,GAAG,IAAI,CAAC,OAAO,GAAG,YAAY,GAAG,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;CACrJ,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;CACZ,CAAC,CAAC;AACF;CACA;CACA;CACA;CACA,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,SAAS,sBAAsB,CAAC,cAAc,EAAE;CACnF,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,CAAC;CAChC,CAAC,OAAO,cAAc,CAAC,QAAQ,IAAI,EAAE,CAAC;CACtC,CAAC,CAAC;AACF;CACA,SAAS,gBAAgB,CAAC,CAAC,EAAE;CAC7B,CAAC,OAAO,CAAC,CAAC,YAAY,MAAM,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;CACjE,CAAC;AACD;CACA,SAAS,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE;CAC9B;CACA,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;CACnD,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE;CACf,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;CACZ;CACA;CACA,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE;CAC1D,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC1C,GAAG;CACH,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACrB,EAAE;CACF,CAAC,OAAO,MAAM,CAAC;CACf,CAAC;AACD;CACA,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,SAAS,iBAAiB,CAAC,KAAK,EAAE;CAChE,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;CAChD,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,oBAAoB,GAAG,SAAS,0BAA0B,CAAC,mBAAmB,EAAE;CAChG,CAAC,IAAI,aAAa,GAAG,EAAE,CAAC;AACxB;CACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,mBAAmB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACtD,EAAE,IAAI,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;CACjC,EAAE,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,SAAS;AACtC;CACA,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,IAAI,aAAa,CAAC,EAAE;CACrC,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;CACjC,GAAG;CACH,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACnC,EAAE;AACF;CACA,CAAC,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;CACrC,CAAC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;AAC5B;CACA,CAAC,KAAK,IAAI,OAAO,IAAI,aAAa,EAAE;CACpC,EAAE,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;CAC9B,EAAE;CACF,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,aAAa,GAAG,SAAS,mBAAmB,CAAC,OAAO,EAAE;CACtE,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE;CACtC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,GAAG;CAC5C,GAAG,OAAO,EAAE,OAAO;CACnB,GAAG,cAAc,EAAE,EAAE;CACrB,GAAG,aAAa,EAAE,EAAE;CACpB,GAAG,YAAY,EAAE,EAAE;CACnB,GAAG,cAAc,EAAE,EAAE;CACrB,GAAG,iBAAiB,EAAE,KAAK;CAC3B,GAAG,CAAC;AACJ;CACA,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;CAC1C,EAAE,KAAK,IAAI,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE;CAC1C,GAAG,IAAI,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;CACvC,GAAG,QAAQ,CAAC,CAAC,IAAI;CACjB,IAAI,KAAK,QAAQ;CACjB,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE;CACtB,MAAM,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACpC,MAAM,EAAE,CAAC,iBAAiB,GAAG,IAAI,CAAC;CAClC,MAAM;CACN,UAAU;CACV,MAAM,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACnC,MAAM;CACN,KAAK,MAAM;AACX;CACA,IAAI,KAAK,SAAS;CAClB,KAAK,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;CACnC,KAAK,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACjC,KAAK,MAAM;CACX,IAAI;CACJ,GAAG;CACH,EAAE;CACF,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,eAAe,GAAG,SAAS,qBAAqB,CAAC,EAAE,EAAE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE;CAC1H,CAAC,IAAI,MAAM,GAAG,EAAE,CAAC;AACjB;CACA,CAAC,IAAI,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC;CAC1B,CAAC,IAAI,WAAW,CAAC;CACjB,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACpD,EAAE,IAAI,aAAa,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;CAC3C,EAAE,WAAW,GAAG,CAAC,YAAY,IAAI,YAAY,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,KAAK,aAAa,CAAC;AACjH;CACA,EAAE,MAAM,CAAC,aAAa,CAAC,GAAG,WAAW,CAAC;CACtC,EAAE;AACF;CACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACnD,EAAE,IAAI,YAAY,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CACzC,EAAE,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,SAAS;CAClD,EAAE,WAAW,GAAG,CAAC,YAAY,IAAI,YAAY,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,KAAK,YAAY,CAAC;AAC/G;CACA,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC;CACrC,EAAE;AACF;CACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAClD,EAAE,IAAI,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CACvC,EAAE,IAAI,YAAY,IAAI,YAAY,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,EAAE;CACnF,GAAG,WAAW,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC;CACpD,GAAG,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,WAAW,GAAG,CAAC,WAAW,CAAC,CAAC;CACpE,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC,MAAM,IAAI,iBAAiB,CAAC,WAAW,CAAC,EAAE;CAC5F,IAAI,MAAM,IAAI,KAAK,CAAC,oCAAoC,GAAG,WAAW,CAAC,MAAM;CAC7E,OAAO,0CAA0C,GAAG,iBAAiB,CAAC,WAAW,CAAC;CAClF,OAAO,iBAAiB,GAAG,OAAO,GAAG,aAAa,GAAG,WAAW,GAAG,GAAG,CAAC,CAAC;CACxE,IAAI;CACJ,GAAG;CACH,OAAO;CACP,GAAG,WAAW,GAAG,EAAE,CAAC;CACpB,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE;CAC5D,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAChD,IAAI;CACJ,GAAG;AACH;CACA,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC;CACpC,EAAE;AACF;CACA,CAAC,OAAO,MAAM,CAAC;CACf,CAAC,CAAC;AACF;CACA;AACA;CACA;CACA,KAAK,CAAC,SAAS,CAAC,yBAAyB,GAAG,SAAS,+BAA+B,CAAC,IAAI,EAAE,QAAQ,EAAE,qBAAqB,EAAE;CAC5H,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC;CACjH,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAC;CACrB,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAC5B;CACA,CAAC,KAAK,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,IAAI,YAAY,EAAE;CAC3D,EAAE,MAAM,sBAAsB,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAC9D;CACA;CACA;CACA,EAAE,MAAM,yBAAyB,GAAG,sBAAsB,GAAG,aAAa,GAAG,CAAC,aAAa,CAAC,CAAC;AAC7F;CACA,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,yBAAyB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAC7D;CACA;CACA,GAAG,MAAM,UAAU,GAAG,yBAAyB,CAAC,CAAC,CAAC,CAAC;CACnD,GAAG,IAAI,aAAa,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;AACzD;CACA,GAAG,MAAM,oBAAoB,GAAG,qBAAqB;CACrD,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,sBAAsB,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC;CACtF,IAAI,CAAC;AACL;CACA;CACA,GAAG,IAAI,aAAa,EAAE;CACtB;CACA;CACA,IAAI,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAC9C,IAAI,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;CACrD,IAAI,MAAM,qBAAqB,GAAG,aAAa,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC;AAC9G;CACA,IAAI,IAAI,qBAAqB,CAAC,MAAM,EAAE;CACtC,KAAK,OAAO,CAAC,IAAI;CACjB,MAAM,CAAC,qBAAqB,EAAE,UAAU,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC;CAC7G,QAAQ,+DAA+D;CACvE,MAAM,CAAC;AACP;CACA,KAAK,qBAAqB,CAAC,OAAO,CAAC,SAAS,WAAW,EAAE;CACzD,MAAM,aAAa,CAAC,WAAW,CAAC,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;CACrE,MAAM,CAAC,CAAC;CACR,KAAK;AACL;CACA;CACA,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE;CACrD,KAAK,aAAa,CAAC,gBAAgB,GAAG,aAAa,CAAC,OAAO,CAAC;CAC5D,KAAK;AACL;CACA,IAAI,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,UAAU,CAAC,EAAE;CACtD,KAAK,MAAM,IAAI,KAAK,CAAC,CAAC,qBAAqB,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;CACxE,KAAK;AACL;CACA,IAAI,IAAI,sBAAsB,EAAE;CAChC,KAAK,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;CAC9D,KAAK,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;CAC5E,KAAK,QAAQ,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;CAChD,KAAK,eAAe,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;CACpG,KAAK;CACL,SAAS;CACT,KAAK,QAAQ,CAAC,YAAY,CAAC,GAAG,aAAa,CAAC;CAC5C,KAAK,eAAe,CAAC,YAAY,CAAC,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;CAChG,KAAK;CACL,IAAI;CACJ;CACA;CACA,QAAQ,IAAI,sBAAsB,EAAE;CACpC,IAAI,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;CAC7D,IAAI,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;AAC3E;CACA,IAAI,MAAM,cAAc,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;CAC7F,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;CACtD,IAAI,eAAe,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;CACvD,IAAI;CACJ;CACA;CACA,QAAQ;CACR,IAAI,QAAQ,CAAC,YAAY,CAAC,GAAG,oBAAoB,CAAC;CAClD,IAAI,eAAe,CAAC,YAAY,CAAC,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;CACtG,IAAI;CACJ,GAAG;AACH;CACA;CACA;CACA,EAAE,IAAI,sBAAsB,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE;CACnE,GAAG,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;CAC/B,GAAG;CACH,EAAE;CACF,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;CACtC,CAAC,CAAC;AACF;CACA,SAAS,gBAAgB,CAAC,QAAQ,EAAE,WAAW,EAAE;CACjD,CAAC,IAAI,UAAU,GAAG,WAAW,GAAG,8BAA8B,GAAG,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;AACzF;CACA;CACA;CACA,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,OAAO,CAAC;AAC9E;CACA,CAAC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAC3C,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;CAC7C,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC;CAC3G,CAAC,IAAI,qBAAqB,CAAC,MAAM,EAAE;CACnC,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,oCAAoC,EAAE,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC;CACjH,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,QAAQ,CAAC,EAAE;CAC9D,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,8CAA8C,EAAE,QAAQ,CAAC,CAAC;CACtF,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;CAChE,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,8EAA8E,EAAE,QAAQ,CAAC,CAAC;CACtH,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF,CAAC,IAAI,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;CACnD,CAAC,IAAI,cAAc,GAAG,QAAQ,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;CAC9D,CAAC,IAAI,EAAE,YAAY,KAAK,cAAc,IAAI,cAAc,KAAK,QAAQ,CAAC,IAAI,CAAC,EAAE;CAC7E,EAAE,IAAI,gBAAgB,GAAG,YAAY,KAAK,QAAQ,CAAC,IAAI,CAAC;CACxD,EAAE,IAAI,kBAAkB,GAAG,cAAc,KAAK,YAAY,CAAC;CAC3D,EAAE,IAAI,gBAAgB,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,6CAA6C,EAAE,QAAQ,CAAC,CAAC;CAC3G,EAAE,IAAI,kBAAkB,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,yDAAyD,EAAE,QAAQ,CAAC,CAAC;AACzH;CACA,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF,CAAC,OAAO,IAAI,CAAC;CACb,CAAC;AACD;CACA;CACA,KAAK,CAAC,SAAS,CAAC,yBAAyB,GAAG,SAAS,+BAA+B,CAAC,IAAI,EAAE,KAAK,EAAE;CAClG,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI;CACrC,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,OAAO,KAAK;CAC3D,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE;CACpC,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK;CAC1D,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,OAAO,KAAK,CAAC;CACjD,UAAU,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;CAChD,KAAK,CAAC,CAAC;CACP,IAAI;CACJ,QAAQ,IAAI,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;CAClF,QAAQ,WAAW,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;AAClE;CACA,GAAG,OAAO,WAAW,CAAC;CACtB,GAAG,EAAE,EAAE,CAAC,CAAC;CACT,EAAE,CAAC,CAAC;AACJ;CACA;CACA;CACA,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CACrC,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACnD;CACA;CACA,CAAC,IAAI,gBAAgB,CAAC,MAAM,EAAE,CAAC,KAAK,SAAS,CAAC,MAAM,EAAE;CACtD;CACA,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAC7C,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE;CACjD,IAAI,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CACnD,IAAI;CACJ,GAAG;CACH,EAAE;CACF,CAAC,OAAO,WAAW,CAAC;CACpB,CAAC,CAAC;AACF;CACA,SAAS,iBAAiB,CAAC,GAAG,EAAE;CAChC,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,GAAG,EAAE;CACtC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CAClB,EAAE,OAAO,GAAG,CAAC;CACb,EAAE,EAAE,EAAE,CAAC,CAAC;CACR,CAAC;AACD;CACA,SAAS,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE;CAC3C,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;CACrB,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;CACrB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,YAAY,GAAG,EAAE,CAAC;CAClC,EAAE;CACF,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;CACtB,CAAC;AACD;CACA,SAAS,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;CAC9C,CAAC,IAAI,MAAM,GAAG,EAAE,eAAe,EAAE,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC;CAC5D,CAAC,KAAK,IAAI,CAAC,IAAI,QAAQ,EAAE;CACzB,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;CACtB;CACA,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;CACvC,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAClC,GAAG;CACH,OAAO,IAAI,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;CAClF,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACjC,GAAG;CACH,OAAO;CACP,GAAG,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,CAAC,GAAG,uBAAuB,GAAG,OAAO,GAAG,GAAG,CAAC,CAAC;CAChG,GAAG;CACH,EAAE;CACF,CAAC,OAAO,MAAM,CAAC;CACf,CAAC;AACD;CACA,SAAS,qBAAqB,CAAC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE;CACxE,CAAC,IAAI,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;CACzC,CAAC,IAAI,cAAc,GAAG,iBAAiB,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;CACxE,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAChD,EAAE,IAAI,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;CACjC,EAAE,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;CACxB,EAAE,IAAI,YAAY,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,SAAS;CAChD,EAAE,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;CACzD,OAAO,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CACjE,EAAE;CACF,CAAC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,SAAS,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,kBAAkB,EAAE,iBAAiB,EAAE;CAC9D;CACA,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,cAAc,EAAE;CAClC,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;CAC7C,EAAE;AACF;CACA;CACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACpD,EAAE,IAAI,aAAa,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;CAC3C,EAAE,IAAI,EAAE,aAAa,IAAI,CAAC,CAAC,EAAE;CAC7B,GAAG,MAAM,IAAI,KAAK,CAAC,gBAAgB,GAAG,aAAa,GAAG,cAAc,CAAC,CAAC;CACtE,GAAG;CACH,EAAE;AACF;CACA;CACA;CACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACnD,EAAE,IAAI,YAAY,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CACzC,EAAE,IAAI,YAAY,IAAI,kBAAkB,EAAE;CAC1C,GAAG,IAAI,kBAAkB,CAAC,YAAY,CAAC,KAAK,YAAY,IAAI,CAAC,CAAC,EAAE;CAChE,IAAI,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,YAAY,GAAG,0CAA0C,CAAC,CAAC;CACtG,IAAI;CACJ,GAAG;CACH,OAAO;CACP,GAAG,kBAAkB,CAAC,YAAY,CAAC,IAAI,YAAY,IAAI,CAAC,CAAC,CAAC;CAC1D,GAAG;CACH,EAAE;AACF;CACA;CACA;CACA;CACA;CACA;CACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAClD,EAAE,IAAI,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AACvC;CACA;CACA;CACA,EAAE,IAAI,OAAO,CAAC,CAAC,WAAW,CAAC,KAAK,QAAQ,EAAE;CAC1C,GAAG,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;CACvC,GAAG;CACH,EAAE,IAAI,WAAW,IAAI,iBAAiB,EAAE;CACxC,GAAG,IAAI,iBAAiB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,EAAE;CAClE,IAAI,MAAM,IAAI,KAAK,CAAC,mBAAmB,GAAG,WAAW,GAAG,yCAAyC,CAAC,CAAC;CACnG,IAAI;CACJ,GAAG;CACH,OAAO;CACP,GAAG,iBAAiB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;CAC1D,GAAG;CACH,EAAE;CACF,CAAC;AACD;CACA,KAAK,CAAC,SAAS,CAAC,YAAY,GAAG,SAAS,kBAAkB,CAAC,IAAI,EAAE;CACjE,CAAC,IAAI,cAAc,IAAI,IAAI,EAAE,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;CAC7E,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE;CACpB,EAAE,IAAI,CAAC,8BAA8B,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;CACrF,EAAE;CACF,MAAM;CACN,EAAE,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;CAC/D,EAAE;CACF,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,8BAA8B,GAAG,SAAS,oCAAoC,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE;CAC7H,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;AACjB;CACA,CAAC,KAAK,IAAI,OAAO,IAAI,QAAQ,EAAE;CAC/B,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;CAC1C,EAAE,IAAI,eAAe,GAAG,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;CACtE,EAAE,IAAI,aAAa,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,eAAe,CAAC,eAAe,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;AAC1H;CACA,EAAE,IAAI,iBAAiB,GAAG,EAAE,CAAC;CAC7B,EAAE,IAAI,kBAAkB,GAAG,EAAE,CAAC;CAC9B,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACjD,GAAG,IAAI;CACP,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;CACjF,IAAI;CACJ,GAAG,OAAO,CAAC,EAAE;CACb,IAAI,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;CAC5E,IAAI;CACJ,GAAG;AACH;CACA,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE;CAC3B,GAAG,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,yBAAyB,CAAC,aAAa,EAAE,eAAe,EAAE,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;CACrI,GAAG,MAAM,WAAW,GAAG,IAAI,CAAC,yBAAyB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;CACtF,GAAG,WAAW,CAAC,QAAQ,GAAG,QAAQ,CAAC;CACnC,GAAG,aAAa,GAAG,WAAW,CAAC;CAC/B,GAAG;AACH;CACA,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC;CACtC,EAAE;AACF;CACA;CACA,CAAC,KAAK,IAAI,OAAO,IAAI,IAAI,CAAC,cAAc,EAAE;CAC1C,EAAE,IAAI,CAAC,GAAG,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;CAClD,EAAE,IAAI,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACvD,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;CACnD,EAAE,qBAAqB,CAAC,CAAC,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;CAC3D,EAAE;CACF,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,yBAAyB,GAAG,SAAS,+BAA+B,CAAC,IAAI,EAAE,YAAY,EAAE;CACzG,CAAC,IAAI,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;AACzC;CACA,CAAC,KAAK,IAAI,OAAO,IAAI,IAAI,EAAE;CAC3B,EAAE,IAAI,EAAE,OAAO,IAAI,aAAa,CAAC,EAAE;CACnC,GAAG,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,GAAG,qCAAqC,CAAC,CAAC;CAChG,GAAG;CACH,EAAE;AACF;CACA,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;CACjB,CAAC,KAAK,IAAI,OAAO,IAAI,aAAa,EAAE;CACpC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAC1C;CACA,EAAE,IAAI,EAAE,CAAC,iBAAiB,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,EAAE;CAClD,GAAG,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,GAAG,qBAAqB,CAAC,CAAC;CAChF,GAAG;AACH;CACA,EAAE,IAAI,iBAAiB,GAAG,EAAE,CAAC;CAC7B,EAAE,IAAI,kBAAkB,GAAG,EAAE,CAAC;CAC9B,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;CAC3B,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACjD,GAAG,IAAI,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACzC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CAC/B,GAAG,IAAI;CACP,IAAI,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;CACzD,IAAI;CACJ,GAAG,OAAO,CAAC,EAAE;CACb,IAAI,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;CAC5E,IAAI;CACJ,GAAG;AACH;CACA,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;CACnH,EAAE;CACF,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,KAAK,GAAG,SAAS,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE;CAC7D,CAAC,IAAI,IAAI,GAAG,IAAI,CAAC;CACjB,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,IAAI,EAAE,WAAW;CAC/C,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW;CAC9B,GAAG,IAAI,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;AAChC;CACA,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACzD,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CACpC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CACjC,IAAI;CACJ,GAAG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;CAC/B,GAAG,CAAC,CAAC;CACL,EAAE,CAAC,CAAC;CACJ,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,SAAS,YAAY,GAAG;CACjD;CACA,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC;CACf,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAC5C,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1B,EAAE;AACF;CACA;CACA;CACA;CACA,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;CAC5B,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CACrC,EAAE,OAAO;CACT,EAAE;AACF;CACA;CACA,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC,CAAC;AACF;CACA,SAAS,WAAW,CAAC,CAAC,EAAE;CACxB,CAAC,OAAO,WAAW;CACnB,EAAE,IAAI,IAAI,GAAG,EAAE,CAAC,EAAE,CAAC;CACnB,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAC7C,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CAC3B,GAAG;CACH,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;CAChC,EAAE,CAAC;CACH,CAAC;AACD;CACA,KAAK,CAAC,SAAS,CAAC,KAAK,GAAG,SAAS,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE;CACzE,CAAC,IAAI,OAAO,GAAG,IAAI,cAAc,EAAE,CAAC;CACpC,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;AACpC;CACA,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC;CACvC,EAAE,MAAM,EAAE,UAAU;CACpB,EAAE,MAAM,EAAE,MAAM;CAChB,EAAE,QAAQ,EAAE,QAAQ;CACpB,EAAE,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,QAAQ,GAAG,WAAW,CAAC,SAAS,cAAc,CAAC,aAAa,EAAE,QAAQ,EAAE;CACxF,CAAC,MAAM,KAAK,GAAG,EAAE,aAAa,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;CAC3C,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE;CACnB,EAAE,OAAO,QAAQ,CAAC,IAAI,KAAK,CAAC,CAAC,uBAAuB,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/E,EAAE;CACF,CAAC,IAAI,OAAO,aAAa,CAAC,QAAQ,KAAK,SAAS,EAAE;CAClD,EAAE,OAAO,QAAQ,CAAC,IAAI,KAAK,CAAC,CAAC,8CAA8C,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAC1G,EAAE;CACF,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC;CAC3C,CAAC,IAAI,MAAM,IAAI,aAAa,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;CAC9C,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;CAC/C,EAAE,OAAO,QAAQ,CAAC,IAAI,KAAK,CAAC,CAAC,sBAAsB,EAAE,aAAa,CAAC,MAAM,CAAC,yCAAyC,CAAC,CAAC,CAAC,CAAC;CACvH,EAAE;CACF,CAAC,MAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,IAAI,oBAAoB,CAAC;CACjE,CAAC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;CACnC,EAAE,OAAO,QAAQ,CAAC,IAAI,KAAK,CAAC,CAAC,gCAAgC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAC9E,EAAE;CACF,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;CACvC,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;AACzC;CACA,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;CAC/B,EAAE,QAAQ;CACV,EAAE,QAAQ;CACV,EAAE,MAAM;CACR,EAAE,KAAK;CACP,EAAE,KAAK;CACP,EAAE,MAAM;CACR,EAAE,EAAE,CAAC,KAAK,KAAK;CACf,EAAE,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE;CAC5C,GAAG,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;CAC5C,GAAG;CACH,EAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;CAC3C,EAAE,CAAC,CAAC;CACJ,CAAC,CAAC,CAAC;AACH;CACA,KAAK,CAAC,SAAS,CAAC,KAAK,GAAG,SAAS,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE;CAC5D,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;CAC3B,EAAE,IAAI,EAAE,IAAI;CACZ,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;CACrC,EAAE,IAAI,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;CAC9D,EAAE,EAAE,QAAQ,CAAC,CAAC;CACd,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE;CACjE,CAAC,IAAI,QAAQ,GAAG;CAChB,EAAE,MAAM,EAAE,IAAI;CACd,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;CACrC,EAAE,CAAC;CACH,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE;CAChB,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CACzE,EAAE;CACF,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;CAC/C,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,aAAa,GAAG,SAAS,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE;CAC3E,CAAC,IAAI,MAAM,EAAE;CACb,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,oBAAoB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACxD,GAAG,IAAI,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;CACnC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE;CAC5D,IAAI,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC;CAC/E,IAAI;CACJ,GAAG;CACH,EAAE;AACF;CACA,CAAC,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,EAAE;CACzC,EAAE,MAAM,IAAI,KAAK;CACjB,GAAG,iFAAiF;CACpF,GAAG,mEAAmE;CACtE,GAAG,CAAC;CACJ,EAAE;AACF;CACA,CAAC,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,EAAE;CACrH,EAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;CAC/D,EAAE;CACF,CAAC,CAAC;AACF;CACA,KAAK,CAAC,SAAS,CAAC,QAAQ,GAAG,WAAW,CAAC,SAAS,cAAc,CAAC,QAAQ,EAAE;CACzE,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE,SAAS,GAAG,EAAE;CACnD,EAAE,IAAI,EAAE,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,QAAQ,IAAI,GAAG,CAAC,IAAI,CAAC,EAAE;CACnD,GAAG,OAAO,QAAQ,CAAC,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC,CAAC;CAC1D,GAAG;CACH,EAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;CACzC,EAAE,CAAC,CAAC;CACJ,CAAC,CAAC,CAAC;AACH;CACA,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,WAAW,CAAC,SAAS,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE;CAC3E,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;CAChC,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,mBAAmB,CAAC;CACxD,CAAC,IAAI,CAAC,cAAc,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC;CAC1D;CACA;CACA;CACA;CACA;CACA,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE;CACrB,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;CAC1B,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,EAAE,QAAQ,CAAC,CAAC;CAC9G,EAAE;CACF,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,QAAQ,CAAC,CAAC;CACtD,CAAC,CAAC,CAAC;AACH;AACA,aAAe;CACf,CAAC,OAAO,EAAE,OAAO;CACjB,CAAC,IAAI,EAAE,KAAK;CACZ,CAAC;;;;;;;;"} diff --git a/R_package/inst/htmlwidgets/lib/flourish-live/flourish.css b/R_package/inst/htmlwidgets/lib/flourish-live/flourish.css new file mode 100644 index 0000000..5228481 --- /dev/null +++ b/R_package/inst/htmlwidgets/lib/flourish-live/flourish.css @@ -0,0 +1,4 @@ +iframe { + border: none; + width: 100%; +} diff --git a/R_package/man/bind_audio_data.Rd b/R_package/man/bind_audio_data.Rd new file mode 100644 index 0000000..2c72bf1 --- /dev/null +++ b/R_package/man/bind_audio_data.Rd @@ -0,0 +1,64 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_audio_data.R +\name{bind_audio_data} +\alias{bind_audio_data} +\title{Bind audio data} +\usage{ +bind_audio_data( + ., + data = NULL, + url = NULL, + title = NULL, + subtitle = NULL, + filter = NULL, + url_input_format = NULL, + url_output_format = NULL, + subtitle_input_format = NULL, + subtitle_output_format = NULL, + title_input_format = NULL, + title_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{url}{Audio URL. The URL of a publicly readable MP3 file. Suggested data type hints: string. Flourish type hint: column} + +\item{title}{Audio title. Suggested data type hints: string. Flourish type hint: column} + +\item{subtitle}{Audio subtitle. Suggested data type hints: string. Flourish type hint: column} + +\item{filter}{Filter. Suggested data type hints: string, number. Flourish type hint: column} + +\item{url_input_format}{Formats/parses dates, strings, and numbers for the url column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{url_output_format}{Formats/parses dates, strings, and numbers for the url column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{subtitle_input_format}{Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{subtitle_output_format}{Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{title_input_format}{Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{title_output_format}{Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_input_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_output_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind audio data +} +\examples{ +try( + flourish(chart_type = "audio", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_audio_data(gapminder) +) +} diff --git a/R_package/man/bind_bar_chart_race_data.Rd b/R_package/man/bind_bar_chart_race_data.Rd new file mode 100644 index 0000000..15fe46a --- /dev/null +++ b/R_package/man/bind_bar_chart_race_data.Rd @@ -0,0 +1,103 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_bar_chart_race_data.R +\name{bind_bar_chart_race_data} +\alias{bind_bar_chart_race_data} +\title{Bind bar chart race data} +\usage{ +bind_bar_chart_race_data( + ., + data = NULL, + captions_data = NULL, + label = NULL, + values = NULL, + category = NULL, + image = NULL, + captions_from = NULL, + captions_to = NULL, + captions_text = NULL, + captions_image = NULL, + captions_image_input_format = NULL, + captions_image_output_format = NULL, + captions_text_input_format = NULL, + captions_text_output_format = NULL, + captions_to_input_format = NULL, + captions_to_output_format = NULL, + captions_from_input_format = NULL, + captions_from_output_format = NULL, + category_input_format = NULL, + category_output_format = NULL, + image_input_format = NULL, + image_output_format = NULL, + label_input_format = NULL, + label_output_format = NULL, + values_input_format = NULL, + values_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{captions_data}{Captions data.} + +\item{label}{Label. A column containing the names of the bars, e.g. countries or people. Suggested data type hints: string. Flourish type hint: column} + +\item{values}{Values. Multiple columns of numbers, each column representing a point in time Suggested data type hints: number. Flourish type hint: columns} + +\item{category}{Categories. Optional category column to color the bars Make sure the Color mode setting is set to By Category in the Bar colors settings panel. Suggested data type hints: string. Flourish type hint: column} + +\item{image}{Image. Optional column with URLs of images. Suggested data type hints: string. Flourish type hint: column} + +\item{captions_from}{Time to show. Must match the column headers in the main data sheet. Suggested data type hints: string, datetime. Flourish type hint: column} + +\item{captions_to}{Time to hide. Must match the column headers in the main data sheet. Suggested data type hints: string, datetime. Flourish type hint: column} + +\item{captions_text}{Text. Text or HTML to show. Suggested data type hints: string. Flourish type hint: column} + +\item{captions_image}{Image. Image to show. Add an image URL or right-click on a cell to upload an image. Suggested data type hints: string. Flourish type hint: column} + +\item{captions_image_input_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_image_output_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_text_input_format}{Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_text_output_format}{Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_to_input_format}{Formats/parses dates, strings, and numbers for the to column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_to_output_format}{Formats/parses dates, strings, and numbers for the to column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_from_input_format}{Formats/parses dates, strings, and numbers for the from column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_from_output_format}{Formats/parses dates, strings, and numbers for the from column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{category_input_format}{Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{category_output_format}{Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{image_input_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{image_output_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{label_input_format}{Formats/parses dates, strings, and numbers for the label column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{label_output_format}{Formats/parses dates, strings, and numbers for the label column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{values_input_format}{Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{values_output_format}{Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind bar chart race data +} +\examples{ +try( + flourish(chart_type = "bar_race", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_bar_chart_race_data(gapminder) +) +} diff --git a/R_package/man/bind_bubble_chart_data.Rd b/R_package/man/bind_bubble_chart_data.Rd new file mode 100644 index 0000000..ac6614d --- /dev/null +++ b/R_package/man/bind_bubble_chart_data.Rd @@ -0,0 +1,46 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_bubble_chart_data.R +\name{bind_bubble_chart_data} +\alias{bind_bubble_chart_data} +\title{Bind bubble chart data} +\usage{ +bind_bubble_chart_data( + ., + data = NULL, + label = NULL, + color = NULL, + size = NULL, + axis_values = NULL, + image = NULL, + metadata = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{label}{Label} + +\item{color}{Color by. Used to color the bubbles. Flourish type hint: column} + +\item{size}{Size by. Value for bubble size. Flourish type hint: column} + +\item{axis_values}{Axis values. Values used to plot the bubbles when the bubbles are aligned on an axis. Flourish type hint: column} + +\item{image}{Image. Images for bubbles. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Flourish type hint: columns} +} +\value{ +A Flourish chart +} +\description{ +Bind bubble chart data +} +\examples{ +try( + flourish(chart_type = "bubble", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_bubble_chart_data(gapminder) +) +} diff --git a/R_package/man/bind_calculator_data.Rd b/R_package/man/bind_calculator_data.Rd new file mode 100644 index 0000000..0571c5e --- /dev/null +++ b/R_package/man/bind_calculator_data.Rd @@ -0,0 +1,46 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_calculator_data.R +\name{bind_calculator_data} +\alias{bind_calculator_data} +\title{Bind calculator data} +\usage{ +bind_calculator_data( + ., + questions_data = NULL, + question_text = NULL, + question_type = NULL, + context_text = NULL, + image = NULL, + answers_raw = NULL, + fallback_value = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{questions_data}{Questions data.} + +\item{question_text}{Question text. The question text. Flourish type hint: column} + +\item{question_type}{Question type. The type of question. Choose from number input, text input, single response buttons, multi response buttons, dropdown, single date picker, range date picker, multi date picker, rating, single slider or range slider. Leave empty to just display text. Flourish type hint: column} + +\item{context_text}{Question context. Additional information. Flourish type hint: column} + +\item{image}{Image. Question background image. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column} + +\item{answers_raw}{Answers. Answer values separated by "::". Required for single and multi-response buttons, dropdown and rating questions. Rating answers can take optional labels per value noted as "Value >> Label" - for example, "1 >> Bad :: 2 :: 3 >> Good". Number inputs can take range specifications in the format "min: 0 :: max: 50 :: step: 2". Slider inputs can take slider specifications in the format "min: 0 :: max: 100 :: value: 10". Use two comma separated values for range sliders, eg.: "value: 1, 100". See the templates documentation for additional info. Flourish type hint: column} + +\item{fallback_value}{Fallback value. Fallback value to fill the answer input if left empty by the user. Works for all question types but sliders, which will always show the initial value. Flourish type hint: column} +} +\value{ +A Flourish chart +} +\description{ +Bind calculator data +} +\examples{ +try( + flourish(chart_type = "calculator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_calculator_data(gapminder) +) +} diff --git a/R_package/man/bind_cards_data.Rd b/R_package/man/bind_cards_data.Rd new file mode 100644 index 0000000..7cbfee4 --- /dev/null +++ b/R_package/man/bind_cards_data.Rd @@ -0,0 +1,100 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_cards_data.R +\name{bind_cards_data} +\alias{bind_cards_data} +\title{Bind cards data} +\usage{ +bind_cards_data( + ., + cards_data = NULL, + title = NULL, + image = NULL, + category = NULL, + subtitle = NULL, + text = NULL, + audio = NULL, + filter = NULL, + metadata = NULL, + audio_input_format = NULL, + audio_output_format = NULL, + category_input_format = NULL, + category_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + image_input_format = NULL, + image_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + subtitle_input_format = NULL, + subtitle_output_format = NULL, + text_input_format = NULL, + text_output_format = NULL, + title_input_format = NULL, + title_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{cards_data}{Cards data.} + +\item{title}{Title. Suggested data type hints: string. Flourish type hint: column} + +\item{image}{Image. Suggested data type hints: string. Flourish type hint: column} + +\item{category}{Categories. Optional category column to color the cards. Suggested data type hints: string. Flourish type hint: column} + +\item{subtitle}{Subtitle. Suggested data type hints: string. Flourish type hint: column} + +\item{text}{Text. Suggested data type hints: string. Flourish type hint: columns} + +\item{audio}{Audio. Add an audio file to the card, which will play when the card is clicked. This will disable popup behavior. Suggested data type hints: string. Flourish type hint: column} + +\item{filter}{Filter. Suggested data type hints: string, number, datetime. Flourish type hint: column} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panelsSuggested data type hints: string, number, datetime. Flourish type hint: columns} + +\item{audio_input_format}{Formats/parses dates, strings, and numbers for the audio column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{audio_output_format}{Formats/parses dates, strings, and numbers for the audio column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{category_input_format}{Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{category_output_format}{Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_input_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_output_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{image_input_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{image_output_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_input_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_output_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{subtitle_input_format}{Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{subtitle_output_format}{Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{text_input_format}{Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{text_output_format}{Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{title_input_format}{Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{title_output_format}{Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind cards data +} +\examples{ +try( + flourish(chart_type = "cards", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_cards_data(gapminder) +) +} diff --git a/R_package/man/bind_chord_diagram_data.Rd b/R_package/man/bind_chord_diagram_data.Rd new file mode 100644 index 0000000..4ed6763 --- /dev/null +++ b/R_package/man/bind_chord_diagram_data.Rd @@ -0,0 +1,37 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_chord_diagram_data.R +\name{bind_chord_diagram_data} +\alias{bind_chord_diagram_data} +\title{Bind chord diagram data} +\usage{ +bind_chord_diagram_data( + ., + connections_data = NULL, + source = NULL, + target = NULL, + value = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{connections_data}{Connections data.} + +\item{source}{Source} + +\item{target}{Target} + +\item{value}{Value. A number specifying the size of the flow. Flourish type hint: column} +} +\value{ +A Flourish chart +} +\description{ +Bind chord diagram data +} +\examples{ +try( + flourish(chart_type = "chord_diagram", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_chord_diagram_data(gapminder) +) +} diff --git a/R_package/man/bind_draw_the_line_data.Rd b/R_package/man/bind_draw_the_line_data.Rd new file mode 100644 index 0000000..53a478b --- /dev/null +++ b/R_package/man/bind_draw_the_line_data.Rd @@ -0,0 +1,37 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_draw_the_line_data.R +\name{bind_draw_the_line_data} +\alias{bind_draw_the_line_data} +\title{Bind draw the line chart data} +\usage{ +bind_draw_the_line_data( + ., + data = NULL, + x = NULL, + lines_reveal = NULL, + lines_fixed = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{x}{Time (x axis). Labels for the X axis. Flourish type hint: column} + +\item{lines_reveal}{Lines reveal} + +\item{lines_fixed}{Lines fixed} +} +\value{ +A Flourish chart +} +\description{ +Bind draw the line chart data +} +\examples{ +try( + flourish(chart_type = "draw_the_line", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_draw_the_line_data(gapminder) +) +} diff --git a/R_package/man/bind_election_results_chart_data.Rd b/R_package/man/bind_election_results_chart_data.Rd new file mode 100644 index 0000000..da09368 --- /dev/null +++ b/R_package/man/bind_election_results_chart_data.Rd @@ -0,0 +1,43 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_election_results_chart_data.R +\name{bind_election_results_chart_data} +\alias{bind_election_results_chart_data} +\title{Bind election results chart data} +\usage{ +bind_election_results_chart_data( + ., + values_now_data = NULL, + values_historical_data = NULL, + values_now_name = NULL, + values_now_values = NULL, + values_historical_name = NULL, + values_historical_values = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{values_now_data}{Values now data.} + +\item{values_historical_data}{Values historical data.} + +\item{values_now_name}{Region name. The name of the data series (eg. voting district). Flourish type hint: column} + +\item{values_now_values}{Results by party. One column per party, with party names as header rows. Flourish type hint: columns} + +\item{values_historical_name}{Region name. The name of the data series (eg. voting district). Flourish type hint: column} + +\item{values_historical_values}{Results by party. One column per party, with party names as header rows. Flourish type hint: columns} +} +\value{ +A Flourish chart +} +\description{ +Bind election results chart data +} +\examples{ +try( + flourish(chart_type = "election_results", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_election_results_chart_data(gapminder) +) +} diff --git a/R_package/man/bind_gantt_data.Rd b/R_package/man/bind_gantt_data.Rd new file mode 100644 index 0000000..8387cd1 --- /dev/null +++ b/R_package/man/bind_gantt_data.Rd @@ -0,0 +1,52 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_gantt_data.R +\name{bind_gantt_data} +\alias{bind_gantt_data} +\title{Bind gantt chart data} +\usage{ +bind_gantt_data( + ., + gantt_data = NULL, + start_date = NULL, + end_date = NULL, + task = NULL, + grouping = NULL, + color = NULL, + progress = NULL, + filter = NULL, + metadata = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{gantt_data}{Gantt data.} + +\item{start_date}{Start date} + +\item{end_date}{End date. The end date or time of the event. If working with days, the end date should be the first day after the end date. So if your event stretches from 1/1. and ends on the 5/1. your end date should be 6/1. This will mean your Gantt bar will stretch across the last day of your project or task. Flourish type hint: column} + +\item{task}{Task} + +\item{grouping}{Group. Select a categorical column to combine bars into groups on the Y axis. Flourish type hint: column} + +\item{color}{Color category. Select a categorical column; each unique value in the column will become a color. Flourish type hint: column} + +\item{progress}{Progress. Requires a number column with values between 0 and 1, representing the progress from 0 to 100\%. Flourish type hint: column} + +\item{filter}{Filter. If set, creates a filter menu or time slider. Flourish type hint: column} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panelsFlourish type hint: columns} +} +\value{ +A Flourish chart +} +\description{ +Bind gantt chart data +} +\examples{ +try( + flourish(chart_type = "gantt", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_gantt_data(gapminder) +) +} diff --git a/R_package/man/bind_gauge_data.Rd b/R_package/man/bind_gauge_data.Rd new file mode 100644 index 0000000..3b1426a --- /dev/null +++ b/R_package/man/bind_gauge_data.Rd @@ -0,0 +1,46 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_gauge_data.R +\name{bind_gauge_data} +\alias{bind_gauge_data} +\title{Bind gauge data} +\usage{ +bind_gauge_data( + ., + data = NULL, + name = NULL, + value = NULL, + name_input_format = NULL, + name_output_format = NULL, + value_input_format = NULL, + value_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{name}{Name} + +\item{value}{Value. One or more columns of numbers. Flourish type hint: columns} + +\item{name_input_format}{Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{name_output_format}{Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{value_input_format}{Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{value_output_format}{Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind gauge data +} +\examples{ +try( + flourish(chart_type = "gauge", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_gauge_data(gapminder) +) +} diff --git a/R_package/man/bind_hierarchy_data.Rd b/R_package/man/bind_hierarchy_data.Rd new file mode 100644 index 0000000..e2c9319 --- /dev/null +++ b/R_package/man/bind_hierarchy_data.Rd @@ -0,0 +1,64 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_hierarchy_data.R +\name{bind_hierarchy_data} +\alias{bind_hierarchy_data} +\title{Bind hierarchy data} +\usage{ +bind_hierarchy_data( + ., + data = NULL, + nest_columns = NULL, + size_columns = NULL, + filter = NULL, + popup_metadata = NULL, + nest_columns_input_format = NULL, + nest_columns_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + popup_metadata_input_format = NULL, + popup_metadata_output_format = NULL, + size_columns_input_format = NULL, + size_columns_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{nest_columns}{Categories/nesting. Choose one or more categorical columns to nest by. The data is nested in the same order as the chosen columns (e.g. C, B is different from B, C). Suggested data type hints: string. Flourish type hint: columns} + +\item{size_columns}{Size by. Optionally choose one or more numeric columns to size by. If more than one is chosen, a dropdown will appear in the visualization which lets the user choose. Rows with negative values are excluded. Suggested data type hints: number. Flourish type hint: columns} + +\item{filter}{Filter. Optionally choose a categorical column to filter by. Suggested data type hints: string, number, datetime. Flourish type hint: column} + +\item{popup_metadata}{Info for popups. One or more columns of information (text, image URLs , embedded charts etc) to include in popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns} + +\item{nest_columns_input_format}{Formats/parses dates, strings, and numbers for the nest_columns column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{nest_columns_output_format}{Formats/parses dates, strings, and numbers for the nest_columns column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_input_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_output_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{popup_metadata_input_format}{Formats/parses dates, strings, and numbers for the popup_metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{popup_metadata_output_format}{Formats/parses dates, strings, and numbers for the popup_metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{size_columns_input_format}{Formats/parses dates, strings, and numbers for the size_columns column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{size_columns_output_format}{Formats/parses dates, strings, and numbers for the size_columns column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind hierarchy data +} +\examples{ +try( + flourish(chart_type = "treemap", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_hierarchy_data(gapminder) +) +} diff --git a/R_package/man/bind_horserace_data.Rd b/R_package/man/bind_horserace_data.Rd new file mode 100644 index 0000000..0feac8e --- /dev/null +++ b/R_package/man/bind_horserace_data.Rd @@ -0,0 +1,112 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_horserace_data.R +\name{bind_horserace_data} +\alias{bind_horserace_data} +\title{Bind line chart race data} +\usage{ +bind_horserace_data( + ., + horserace_data = NULL, + captions_data = NULL, + horserace_name = NULL, + horserace_stages = NULL, + horserace_category = NULL, + horserace_pic = NULL, + horserace_filter = NULL, + captions_from = NULL, + captions_to = NULL, + captions_text = NULL, + captions_image = NULL, + captions_image_input_format = NULL, + captions_image_output_format = NULL, + captions_to_input_format = NULL, + captions_to_output_format = NULL, + captions_from_input_format = NULL, + captions_from_output_format = NULL, + captions_text_input_format = NULL, + captions_text_output_format = NULL, + horserace_category_input_format = NULL, + horserace_category_output_format = NULL, + horserace_filter_input_format = NULL, + horserace_filter_output_format = NULL, + horserace_pic_input_format = NULL, + horserace_pic_output_format = NULL, + horserace_name_input_format = NULL, + horserace_name_output_format = NULL, + horserace_stages_input_format = NULL, + horserace_stages_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{horserace_data}{Horserace data.} + +\item{captions_data}{Captions data.} + +\item{horserace_name}{Label. The name of each entrant. Suggested data type hints: string. Flourish type hint: column} + +\item{horserace_stages}{Values. Raw scores, which will be automatically converted to ranks. Column names will be used to populate the X axis of the chart. Suggested data type hints: number. Flourish type hint: columns} + +\item{horserace_category}{Color by. Select a column to color the lines by. If omitted, colors will be assigned per name. Suggested data type hints: string. Flourish type hint: column} + +\item{horserace_pic}{Image. Add an image URL or right-click on a cell to upload an image. Suggested data type hints: string. Flourish type hint: column} + +\item{horserace_filter}{Filter. Hide/show entrants based on the values in this column. Suggested data type hints: string, number, datetime. Flourish type hint: column} + +\item{captions_from}{Stage to show. Must match the column headers in the main datasheet. Suggested data type hints: string. Flourish type hint: column} + +\item{captions_to}{Stage to hide. Must match the column headers in the main datasheet. Suggested data type hints: string. Flourish type hint: column} + +\item{captions_text}{Text. Text or HTML to show. Suggested data type hints: string. Flourish type hint: column} + +\item{captions_image}{Image. Image to show. Suggested data type hints: string. Flourish type hint: column} + +\item{captions_image_input_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_image_output_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_to_input_format}{Formats/parses dates, strings, and numbers for the to column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_to_output_format}{Formats/parses dates, strings, and numbers for the to column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_from_input_format}{Formats/parses dates, strings, and numbers for the from column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_from_output_format}{Formats/parses dates, strings, and numbers for the from column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_text_input_format}{Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{captions_text_output_format}{Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{horserace_category_input_format}{Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{horserace_category_output_format}{Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{horserace_filter_input_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{horserace_filter_output_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{horserace_pic_input_format}{Formats/parses dates, strings, and numbers for the pic column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{horserace_pic_output_format}{Formats/parses dates, strings, and numbers for the pic column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{horserace_name_input_format}{Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{horserace_name_output_format}{Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{horserace_stages_input_format}{Formats/parses dates, strings, and numbers for the stages column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{horserace_stages_output_format}{Formats/parses dates, strings, and numbers for the stages column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind line chart race data +} +\examples{ +try( + flourish(chart_type = "horserace", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_horserace_data(gapminder) +) +} diff --git a/R_package/man/bind_interactive_svg_data.Rd b/R_package/man/bind_interactive_svg_data.Rd new file mode 100644 index 0000000..a0d88a4 --- /dev/null +++ b/R_package/man/bind_interactive_svg_data.Rd @@ -0,0 +1,49 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_interactive_svg_data.R +\name{bind_interactive_svg_data} +\alias{bind_interactive_svg_data} +\title{Bind interactive svg data} +\usage{ +bind_interactive_svg_data( + ., + data = NULL, + id = NULL, + reveal_id = NULL, + h3 = NULL, + h4 = NULL, + content = NULL, + link = NULL, + metadata = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{id}{ID. A column of IDs of elements in the uploaded SVG file. Flourish type hint: column} + +\item{reveal_id}{Reveal layer. A column to reveal when layer is clicked. Flourish type hint: column} + +\item{h3}{Heading 1. A column containing the main header. Flourish type hint: column} + +\item{h4}{Heading 2. A column containing a secondary header. Flourish type hint: column} + +\item{content}{Content. A column containing text or HTML to display. Flourish type hint: column} + +\item{link}{Link. A URL that can be opened when a layer is clicked. Any reveal layers or popups will be overridden. Flourish type hint: column} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Flourish type hint: columns} +} +\value{ +A Flourish chart +} +\description{ +Bind interactive svg data +} +\examples{ +try( + flourish(chart_type = "interactive_svg", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_interactive_svg_data(gapminder) +) +} diff --git a/R_package/man/bind_line_bar_pie_data.Rd b/R_package/man/bind_line_bar_pie_data.Rd new file mode 100644 index 0000000..e1ed3ce --- /dev/null +++ b/R_package/man/bind_line_bar_pie_data.Rd @@ -0,0 +1,73 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_line_bar_pie_data.R +\name{bind_line_bar_pie_data} +\alias{bind_line_bar_pie_data} +\title{Bind line, bar and pie charts data} +\usage{ +bind_line_bar_pie_data( + ., + data = NULL, + label = NULL, + value = NULL, + facet = NULL, + filter = NULL, + metadata = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + label_input_format = NULL, + label_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + value_input_format = NULL, + value_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{label}{Labels/time. A column of names, numbers or datetimes. Suggested data type hints: string, datetime, number. Flourish type hint: column} + +\item{value}{Values. One or more columns of numbers. The Preferred output format of the first column is used to format values. Suggested data type hints: number. Flourish type hint: columns} + +\item{facet}{Charts grid. If specified and Grid of charts view is on, creates a separate mini chart for each value found in the column. Suggested data type hints: string. Flourish type hint: column} + +\item{filter}{Row filter. Use this column to create a user-facing row control. To create a column filter, use the Series filter option in the settings panel instead. Suggested data type hints: string, datetime, number. Flourish type hint: column} + +\item{metadata}{Info for custom popups. One or more columns of information (text, image URLs , embedded charts etc) to include in custom popups and panels Suggested data type hints: string, datetime, number. Flourish type hint: columns} + +\item{facet_input_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{facet_output_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_input_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_output_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{label_input_format}{Formats/parses dates, strings, and numbers for the label column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{label_output_format}{Formats/parses dates, strings, and numbers for the label column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_input_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_output_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{value_input_format}{Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{value_output_format}{Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind line, bar and pie charts data +} +\examples{ +try( + flourish(chart_type = "line", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_line_bar_pie_data(gapminder) +) +} diff --git a/R_package/man/bind_marimekko_data.Rd b/R_package/man/bind_marimekko_data.Rd new file mode 100644 index 0000000..c13a4a6 --- /dev/null +++ b/R_package/man/bind_marimekko_data.Rd @@ -0,0 +1,91 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_marimekko_data.R +\name{bind_marimekko_data} +\alias{bind_marimekko_data} +\title{Bind marimekko data} +\usage{ +bind_marimekko_data( + ., + data = NULL, + name = NULL, + unstacked_value = NULL, + stacked_values = NULL, + facet = NULL, + category = NULL, + filter = NULL, + metadata = NULL, + category_input_format = NULL, + category_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + name_input_format = NULL, + name_output_format = NULL, + unstacked_value_input_format = NULL, + unstacked_value_output_format = NULL, + stacked_values_input_format = NULL, + stacked_values_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{name}{Name} + +\item{unstacked_value}{Unstacked value} + +\item{stacked_values}{Secondary metric. One or more numeric columns. Each column will form a segment of a stacked bar. Flourish type hint: columns} + +\item{facet}{Facet} + +\item{category}{Color category. Suggested data type hints: string. Flourish type hint: column} + +\item{filter}{Filter by. (Optional) Choose a categorical column to filter by. A dropdown will appear in the visualization. Suggested data type hints: string, number, datetime. Flourish type hint: column} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Suggested data type hints: number, string, datetime. Flourish type hint: columns} + +\item{category_input_format}{Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{category_output_format}{Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_input_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_output_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{facet_input_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{facet_output_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_input_format}{Formats/parses dates, strings, and numbers for the metadata column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_output_format}{Formats/parses dates, strings, and numbers for the metadata column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{name_input_format}{Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{name_output_format}{Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{unstacked_value_input_format}{Formats/parses dates, strings, and numbers for the unstacked_value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{unstacked_value_output_format}{Formats/parses dates, strings, and numbers for the unstacked_value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{stacked_values_input_format}{Formats/parses dates, strings, and numbers for the stacked_values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{stacked_values_output_format}{Formats/parses dates, strings, and numbers for the stacked_values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind marimekko data +} +\examples{ +try( + flourish(chart_type = "marimekko", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_marimekko_data(gapminder) +) +} diff --git a/R_package/man/bind_network_graph_data.Rd b/R_package/man/bind_network_graph_data.Rd new file mode 100644 index 0000000..30a2160 --- /dev/null +++ b/R_package/man/bind_network_graph_data.Rd @@ -0,0 +1,55 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_network_graph_data.R +\name{bind_network_graph_data} +\alias{bind_network_graph_data} +\title{Bind network graph data} +\usage{ +bind_network_graph_data( + ., + links_data = NULL, + nodes_data = NULL, + links_source = NULL, + links_target = NULL, + links_value = NULL, + nodes_id = NULL, + nodes_group = NULL, + nodes_size = NULL, + nodes_image = NULL, + nodes_metadata = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{links_data}{Links data.} + +\item{nodes_data}{Nodes data.} + +\item{links_source}{Links source} + +\item{links_target}{Links target} + +\item{links_value}{Size by. A numerical value used to set the thickness of the links. Flourish type hint: column} + +\item{nodes_id}{ID. A unique identifier for each point in the network. If not specified, point information will be extracted from the links sheet. Flourish type hint: column} + +\item{nodes_group}{Color by. A group to which the point belongs. If set, can be used to color the points. Ignored if ID not set. Flourish type hint: column} + +\item{nodes_size}{Size by. A numerical value used to size the points. Ignored if ID not set. Flourish type hint: column} + +\item{nodes_image}{Image. An image to go into the circle. Flourish type hint: column} + +\item{nodes_metadata}{Info for popups. One or more columns of information (text, image URLs , embedded charts etc) to include in popups and panels Ignored if ID not set. Flourish type hint: columns} +} +\value{ +A Flourish chart +} +\description{ +Bind network graph data +} +\examples{ +try( + flourish(chart_type = "network", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_network_graph_data(gapminder) +) +} diff --git a/R_package/man/bind_parliament_chart_data.Rd b/R_package/man/bind_parliament_chart_data.Rd new file mode 100644 index 0000000..b22b050 --- /dev/null +++ b/R_package/man/bind_parliament_chart_data.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_parliament_chart_data.R +\name{bind_parliament_chart_data} +\alias{bind_parliament_chart_data} +\title{Bind parliament chart data} +\usage{ +bind_parliament_chart_data(., data = NULL, party = NULL, seats = NULL) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{party}{Party} + +\item{seats}{Seats. This should point to the column with election data. Flourish type hint: columns} +} +\value{ +A Flourish chart +} +\description{ +Bind parliament chart data +} +\examples{ +try( + flourish(chart_type = "parliament", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_parliament_chart_data(gapminder) +) +} diff --git a/R_package/man/bind_pictogram_data.Rd b/R_package/man/bind_pictogram_data.Rd new file mode 100644 index 0000000..007e663 --- /dev/null +++ b/R_package/man/bind_pictogram_data.Rd @@ -0,0 +1,61 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_pictogram_data.R +\name{bind_pictogram_data} +\alias{bind_pictogram_data} +\title{Bind pictogram data} +\usage{ +bind_pictogram_data( + ., + data = NULL, + icons_data = NULL, + main_category = NULL, + sub_category = NULL, + values = NULL, + icon_id = NULL, + color = NULL, + metadata = NULL, + icons_id = NULL, + icons_path_string = NULL, + icons_width = NULL, + icons_height = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{icons_data}{Icons data.} + +\item{main_category}{Main category. The (categorical) column that defines the categories along the main axis. Flourish type hint: column} + +\item{sub_category}{Subcategory. The (categorical) column that defines the categories within each bar. Flourish type hint: column} + +\item{values}{Values. (Optional) Choose the numeric columns to determine the size of each bar. If more than 1 is chosen, a dropdown will appear in the visualization, which lets the user choose. Flourish type hint: columns} + +\item{icon_id}{Icon ID. IDs for joining icons in the Icons datasheet. Must contain IDs that match Icon ID values in Icons Set to the same column as the Main category or Subcategory. Flourish type hint: column} + +\item{color}{Color. The (categorical) column which determines the icon color. Set to the same column as the Main category or Subcategory. Flourish type hint: column} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Flourish type hint: columns} + +\item{icons_id}{Icon ID. Unique ID for joining icon path strings. Must contain IDs that match the Icon ID values in DataFlourish type hint: column} + +\item{icons_path_string}{Icon. Icon path string (e.g. "M10,10 l80,0 l0,80 l-80,0 z") or the name of a built-in icon (e.g. "female"). Flourish type hint: column} + +\item{icons_width}{Icon width. Icon width (in pixels). Flourish type hint: column} + +\item{icons_height}{Icon height. Icon height (in pixels). Flourish type hint: column} +} +\value{ +A Flourish chart +} +\description{ +Bind pictogram data +} +\examples{ +try( + flourish(chart_type = "pictogram", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_pictogram_data(gapminder) +) +} diff --git a/R_package/man/bind_quiz_data.Rd b/R_package/man/bind_quiz_data.Rd new file mode 100644 index 0000000..68581f0 --- /dev/null +++ b/R_package/man/bind_quiz_data.Rd @@ -0,0 +1,73 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_quiz_data.R +\name{bind_quiz_data} +\alias{bind_quiz_data} +\title{Bind quiz data} +\usage{ +bind_quiz_data( + ., + questions_data = NULL, + scores_data = NULL, + results_data = NULL, + questions_text = NULL, + questions_explanation = NULL, + questions_input_type = NULL, + questions_answers = NULL, + questions_suffix = NULL, + questions_choices = NULL, + scores_question = NULL, + scores_range = NULL, + scores_explanation = NULL, + scores_media = NULL, + results_range = NULL, + results_text = NULL, + results_media = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{questions_data}{Questions data.} + +\item{scores_data}{Scores data.} + +\item{results_data}{Results data.} + +\item{questions_text}{Text. Question text. Flourish type hint: column} + +\item{questions_explanation}{Explanation. A short text explanation accompanying the question. Flourish type hint: column} + +\item{questions_input_type}{Input type. Type of answer input, choose between slider or multiple choice Flourish type hint: column} + +\item{questions_answers}{Answers. The correct answer to the question. The score will be decided by the difference between this answer and your input. Its possible to select multiple columns with answers; this will create a dropdown list above the quiz where you can select which answer to compare to. Flourish type hint: columns} + +\item{questions_suffix}{Slider input suffix. Add a suffix after the value, eg. "\%" or "people" (only for slider input type). Flourish type hint: column} + +\item{questions_choices}{Multiple choice options. Options to show in multiple choice questions. Divide using "::" (eg. "Cat :: Dog :: Sheep :: Badger"). Flourish type hint: column} + +\item{scores_question}{Question. Question that the answer belongs to. Flourish type hint: column} + +\item{scores_range}{Answer. The answer to the question. This can be text for multiple choice questions. For slider answers, you can use numbers or number ranges, values could be "0-10" or "4" or "\emph{" to select all answers. You can also add multiple rows with score ranges per question; the more specific scores will take priority (e.g. it will choose "4" over "0-10" over "}"). Flourish type hint: column} + +\item{scores_explanation}{Text. Text to show after answering question. Flourish type hint: column} + +\item{scores_media}{Media. Picture to show after answering question. Flourish type hint: column} + +\item{results_range}{Points range. A range of points youre targeting. You can use numbers or number ranges, values could be "0-10" or "4" or "\emph{" to select all answers. You can also add multiple rows with score ranges per question; the more specific scores will take priority (e.g. it will choose "4" over "0-10" over "}"). Flourish type hint: column} + +\item{results_text}{Results text} + +\item{results_media}{Media. An image to show with the result. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column} +} +\value{ +A Flourish chart +} +\description{ +Bind quiz data +} +\examples{ +try( + flourish(chart_type = "quiz", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_quiz_data(gapminder) +) +} diff --git a/R_package/man/bind_radar_data.Rd b/R_package/man/bind_radar_data.Rd new file mode 100644 index 0000000..cfb4067 --- /dev/null +++ b/R_package/man/bind_radar_data.Rd @@ -0,0 +1,82 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_radar_data.R +\name{bind_radar_data} +\alias{bind_radar_data} +\title{Bind radar chart data} +\usage{ +bind_radar_data( + ., + data = NULL, + name = NULL, + values = NULL, + filter = NULL, + color_category = NULL, + facet = NULL, + metadata = NULL, + color_category_input_format = NULL, + color_category_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + name_input_format = NULL, + name_output_format = NULL, + values_input_format = NULL, + values_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{name}{Name. A text column containing a name for each radar. Suggested data type hints: string. Flourish type hint: column} + +\item{values}{Values. Select three or more numerical columns. Suggested data type hints: number. Flourish type hint: columns} + +\item{filter}{Filter. If set, creates a filter menu or time slider. Suggested data type hints: string, number, datetime. Flourish type hint: column} + +\item{color_category}{Color category. Add a category to color by If empty, the name column will be used for colors. Suggested data type hints: string. Flourish type hint: column} + +\item{facet}{Grid of charts (facet). Create one column for each grouping you want to allow. Suggested data type hints: string. Flourish type hint: columns} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Suggested data type hints: string, datetime, number. Flourish type hint: columns} + +\item{color_category_input_format}{Formats/parses dates, strings, and numbers for the color_category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{color_category_output_format}{Formats/parses dates, strings, and numbers for the color_category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_input_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_output_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{facet_input_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{facet_output_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_input_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_output_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{name_input_format}{Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{name_output_format}{Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{values_input_format}{Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{values_output_format}{Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind radar chart data +} +\examples{ +try( + flourish(chart_type = "radar", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_radar_data(gapminder) +) +} diff --git a/R_package/man/bind_sankey_data.Rd b/R_package/man/bind_sankey_data.Rd new file mode 100644 index 0000000..11fd15b --- /dev/null +++ b/R_package/man/bind_sankey_data.Rd @@ -0,0 +1,100 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_sankey_data.R +\name{bind_sankey_data} +\alias{bind_sankey_data} +\title{Bind sankey diagram data} +\usage{ +bind_sankey_data( + ., + data = NULL, + source = NULL, + target = NULL, + value = NULL, + filter = NULL, + facet = NULL, + step_from = NULL, + step_to = NULL, + metadata = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + source_input_format = NULL, + source_output_format = NULL, + step_from_input_format = NULL, + step_from_output_format = NULL, + step_to_input_format = NULL, + step_to_output_format = NULL, + target_input_format = NULL, + target_output_format = NULL, + value_input_format = NULL, + value_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{source}{Source. Suggested data type hints: string. Flourish type hint: column} + +\item{target}{Target. Suggested data type hints: string. Flourish type hint: column} + +\item{value}{Value of link. A numerical value used to set the thickness of the links. Suggested data type hints: number. Flourish type hint: column} + +\item{filter}{Filter. Suggested data type hints: string, number, datetime. Flourish type hint: column} + +\item{facet}{Grid of charts. Suggested data type hints: string. Flourish type hint: column} + +\item{step_from}{Step from. An integer(whole number) used to indicate where a link starts from (used only in Alluvial mode). Suggested data type hints: number. Flourish type hint: column} + +\item{step_to}{Step to. An integer(whole number) used to indicate where a link goes to (used only in Alluvial mode). Suggested data type hints: number. Flourish type hint: column} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Suggested data type hints: number, datetime, string. Flourish type hint: columns} + +\item{filter_input_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_output_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{facet_input_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{facet_output_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_input_format}{Formats/parses dates, strings, and numbers for the metadata column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_output_format}{Formats/parses dates, strings, and numbers for the metadata column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{source_input_format}{Formats/parses dates, strings, and numbers for the source column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{source_output_format}{Formats/parses dates, strings, and numbers for the source column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{step_from_input_format}{Formats/parses dates, strings, and numbers for the step_from column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{step_from_output_format}{Formats/parses dates, strings, and numbers for the step_from column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{step_to_input_format}{Formats/parses dates, strings, and numbers for the step_to column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{step_to_output_format}{Formats/parses dates, strings, and numbers for the step_to column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{target_input_format}{Formats/parses dates, strings, and numbers for the target column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{target_output_format}{Formats/parses dates, strings, and numbers for the target column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{value_input_format}{Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{value_output_format}{Formats/parses dates, strings, and numbers for the value column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind sankey diagram data +} +\examples{ +try( + flourish(chart_type = "sankey", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_sankey_data(gapminder) +) +} diff --git a/R_package/man/bind_scatter_data.Rd b/R_package/man/bind_scatter_data.Rd new file mode 100644 index 0000000..02bd0ea --- /dev/null +++ b/R_package/man/bind_scatter_data.Rd @@ -0,0 +1,127 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_scatter_data.R +\name{bind_scatter_data} +\alias{bind_scatter_data} +\title{Bind scatter data} +\usage{ +bind_scatter_data( + ., + data = NULL, + x = NULL, + y = NULL, + name = NULL, + color = NULL, + size = NULL, + shape = NULL, + facet = NULL, + slider = NULL, + series = NULL, + filter = NULL, + metadata = NULL, + color_input_format = NULL, + color_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + name_input_format = NULL, + name_output_format = NULL, + series_input_format = NULL, + series_output_format = NULL, + shape_input_format = NULL, + shape_output_format = NULL, + size_input_format = NULL, + size_output_format = NULL, + slider_input_format = NULL, + slider_output_format = NULL, + x_input_format = NULL, + x_output_format = NULL, + y_input_format = NULL, + y_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{x}{X values. Suggested data type hints: number, string, datetime. Flourish type hint: column} + +\item{y}{Y values. Suggested data type hints: number, string, datetime. Flourish type hint: column} + +\item{name}{Name. Select multiple columns if required to make a unique name. Suggested data type hints: string. Flourish type hint: columns} + +\item{color}{Color. Colors the dots based on numbers or categories. Suggested data type hints: string, number. Flourish type hint: column} + +\item{size}{Size. Sizes the dots based on the numbers. Suggested data type hints: number, string. Flourish type hint: column} + +\item{shape}{Shape. Sets the shape of the dots based on numbers or categories. Suggested data type hints: string. Flourish type hint: column} + +\item{facet}{Grid of charts (facet). Creates a mini chart for each value in the selected column. Suggested data type hints: string. Flourish type hint: column} + +\item{slider}{Time. Creates a time slider and connects/animates dots with the same name. Suggested data type hints: datetime, string, number. Flourish type hint: column} + +\item{series}{Series (connect with line). Group dots into series based on the contents of a column. Suggested data type hints: string. Flourish type hint: column} + +\item{filter}{Filter control. Creates a control based on the contents of any column. Suggested data type hints: string, number, datetime. Flourish type hint: column} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panelsSuggested data type hints: string, number, datetime. Flourish type hint: columns} + +\item{color_input_format}{Formats/parses dates, strings, and numbers for the color column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{color_output_format}{Formats/parses dates, strings, and numbers for the color column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_input_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_output_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{facet_input_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{facet_output_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_input_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_output_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{name_input_format}{Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{name_output_format}{Formats/parses dates, strings, and numbers for the name column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{series_input_format}{Formats/parses dates, strings, and numbers for the series column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{series_output_format}{Formats/parses dates, strings, and numbers for the series column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{shape_input_format}{Formats/parses dates, strings, and numbers for the shape column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{shape_output_format}{Formats/parses dates, strings, and numbers for the shape column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{size_input_format}{Formats/parses dates, strings, and numbers for the size column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{size_output_format}{Formats/parses dates, strings, and numbers for the size column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{slider_input_format}{Formats/parses dates, strings, and numbers for the slider column. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{slider_output_format}{Formats/parses dates, strings, and numbers for the slider column. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{x_input_format}{Formats/parses dates, strings, and numbers for the x column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{x_output_format}{Formats/parses dates, strings, and numbers for the x column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{y_input_format}{Formats/parses dates, strings, and numbers for the y column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{y_output_format}{Formats/parses dates, strings, and numbers for the y column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind scatter data +} +\examples{ +try( + flourish(chart_type = "scatter", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_scatter_data(gapminder) +) +} diff --git a/R_package/man/bind_slope_chart_data.Rd b/R_package/man/bind_slope_chart_data.Rd new file mode 100644 index 0000000..f365e63 --- /dev/null +++ b/R_package/man/bind_slope_chart_data.Rd @@ -0,0 +1,91 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_slope_chart_data.R +\name{bind_slope_chart_data} +\alias{bind_slope_chart_data} +\title{Bind slope chart data} +\usage{ +bind_slope_chart_data( + ., + data = NULL, + id = NULL, + values = NULL, + line_thickness = NULL, + filter = NULL, + color_category = NULL, + facet = NULL, + metadata = NULL, + color_category_input_format = NULL, + color_category_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + facet_input_format = NULL, + facet_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + line_thickness_input_format = NULL, + line_thickness_output_format = NULL, + id_input_format = NULL, + id_output_format = NULL, + values_input_format = NULL, + values_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{id}{Name. The name of the data series (eg. voting district, data mode). Flourish type hint: column} + +\item{values}{Values. Values for that data series (eg. \% of votes). Flourish type hint: column} + +\item{line_thickness}{Line thickness. Values for the thickness of line. Flourish type hint: column} + +\item{filter}{Filter. Suggested data type hints: string, number, datetime. Flourish type hint: column} + +\item{color_category}{Color category} + +\item{facet}{Facet} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns} + +\item{color_category_input_format}{Formats/parses dates, strings, and numbers for the color_category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{color_category_output_format}{Formats/parses dates, strings, and numbers for the color_category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_input_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_output_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{facet_input_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{facet_output_format}{Formats/parses dates, strings, and numbers for the facet column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_input_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_output_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{line_thickness_input_format}{Formats/parses dates, strings, and numbers for the line_thickness column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{line_thickness_output_format}{Formats/parses dates, strings, and numbers for the line_thickness column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{id_input_format}{Formats/parses dates, strings, and numbers for the id column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{id_output_format}{Formats/parses dates, strings, and numbers for the id column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{values_input_format}{Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{values_output_format}{Formats/parses dates, strings, and numbers for the values column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind slope chart data +} +\examples{ +try( + flourish(chart_type = "slope", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_slope_chart_data(gapminder) +) +} diff --git a/R_package/man/bind_sports_data.Rd b/R_package/man/bind_sports_data.Rd new file mode 100644 index 0000000..4c40e4c --- /dev/null +++ b/R_package/man/bind_sports_data.Rd @@ -0,0 +1,109 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_sports_data.R +\name{bind_sports_data} +\alias{bind_sports_data} +\title{Bind sports data} +\usage{ +bind_sports_data( + ., + positions_data = NULL, + info = NULL, + color = NULL, + size = NULL, + squad_number = NULL, + position_x = NULL, + position_y = NULL, + filter = NULL, + photo = NULL, + metadata = NULL, + color_input_format = NULL, + color_output_format = NULL, + filter_input_format = NULL, + filter_output_format = NULL, + photo_input_format = NULL, + photo_output_format = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + info_input_format = NULL, + info_output_format = NULL, + size_input_format = NULL, + size_output_format = NULL, + squad_number_input_format = NULL, + squad_number_output_format = NULL, + position_x_input_format = NULL, + position_x_output_format = NULL, + position_y_input_format = NULL, + position_y_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{positions_data}{Positions data.} + +\item{info}{Name. A name to include on a label and/or popup. Suggested data type hints: string, number. Flourish type hint: columns} + +\item{color}{Color by. An optional category column to color the dots by. For example if you have two different teams. Suggested data type hints: string. Flourish type hint: column} + +\item{size}{Size by. An optional numeric column to size the dots. Suggested data type hints: number. Flourish type hint: column} + +\item{squad_number}{Squad numbers. An optional squad number to appear within the dot. Suggested data type hints: number, string. Flourish type hint: column} + +\item{position_x}{X position. Use this to column to set the X position of a dot on the pitch when creating shot charts. This column is ignored when the setting Position points by is set to FormationSuggested data type hints: number. Flourish type hint: column} + +\item{position_y}{Y position. Use this to column to set the Y position of a dot on the pitch when creating shot charts. This column is ignored when the setting Position points by is set to FormationSuggested data type hints: number. Flourish type hint: column} + +\item{filter}{Filter by. Setting a column here will add a control to the visualization to filter the dots. For example you could filter by team. Suggested data type hints: string, number. Flourish type hint: column} + +\item{photo}{Image. Add an image to appear in the circles. To add an image, right click on a cell and click upload file Its also possible to add a image URL. Suggested data type hints: string. Flourish type hint: column} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns} + +\item{color_input_format}{Formats/parses dates, strings, and numbers for the color column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{color_output_format}{Formats/parses dates, strings, and numbers for the color column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_input_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{filter_output_format}{Formats/parses dates, strings, and numbers for the filter column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{photo_input_format}{Formats/parses dates, strings, and numbers for the photo column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{photo_output_format}{Formats/parses dates, strings, and numbers for the photo column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_input_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_output_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{info_input_format}{Formats/parses dates, strings, and numbers for the info column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{info_output_format}{Formats/parses dates, strings, and numbers for the info column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{size_input_format}{Formats/parses dates, strings, and numbers for the size column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{size_output_format}{Formats/parses dates, strings, and numbers for the size column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{squad_number_input_format}{Formats/parses dates, strings, and numbers for the squad_number column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{squad_number_output_format}{Formats/parses dates, strings, and numbers for the squad_number column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{position_x_input_format}{Formats/parses dates, strings, and numbers for the position_x column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{position_x_output_format}{Formats/parses dates, strings, and numbers for the position_x column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{position_y_input_format}{Formats/parses dates, strings, and numbers for the position_y column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{position_y_output_format}{Formats/parses dates, strings, and numbers for the position_y column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind sports data +} +\examples{ +try( + flourish(chart_type = "sports", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_sports_data(gapminder) +) +} diff --git a/R_package/man/bind_sports_race_data.Rd b/R_package/man/bind_sports_race_data.Rd new file mode 100644 index 0000000..4e4032b --- /dev/null +++ b/R_package/man/bind_sports_race_data.Rd @@ -0,0 +1,46 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_sports_race_data.R +\name{bind_sports_race_data} +\alias{bind_sports_race_data} +\title{Bind sports race data} +\usage{ +bind_sports_race_data( + ., + data = NULL, + name = NULL, + times = NULL, + start_image = NULL, + race_image = NULL, + finish_image = NULL, + color_category = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{name}{Name. Name of competitor. Flourish type hint: column} + +\item{times}{Times. One or more columns of numbers, representing splits or laps, or a whole race. Flourish type hint: columns} + +\item{start_image}{Start image. The image to use at the start of the race. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column} + +\item{race_image}{Racing image. The image to use while a participant is racing. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column} + +\item{finish_image}{Finish image. The image to use when the participant has finished the race. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column} + +\item{color_category}{Color category. Add a category to color participants by. If empty, the name column will be used for colors. Flourish type hint: column} +} +\value{ +A Flourish chart +} +\description{ +Bind sports race data +} +\examples{ +try( + flourish(chart_type = "sports_race", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_sports_race_data(gapminder) +) +} diff --git a/R_package/man/bind_survey_data.Rd b/R_package/man/bind_survey_data.Rd new file mode 100644 index 0000000..c123d46 --- /dev/null +++ b/R_package/man/bind_survey_data.Rd @@ -0,0 +1,103 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_survey_data.R +\name{bind_survey_data} +\alias{bind_survey_data} +\title{Bind survey data} +\usage{ +bind_survey_data( + ., + questions_data = NULL, + order_data = NULL, + labels_data = NULL, + colors_data = NULL, + places_data = NULL, + answer_groups_data = NULL, + questions_categorical = NULL, + questions_continuous = NULL, + questions_geo = NULL, + questions_label = NULL, + questions_column_filter = NULL, + questions_id = NULL, + questions_metadata = NULL, + order_categories = NULL, + labels_label = NULL, + labels_replacement = NULL, + colors_question = NULL, + colors_answer = NULL, + colors_color = NULL, + places_latitude = NULL, + places_longitude = NULL, + places_names = NULL, + answer_groups_group = NULL, + answer_groups_question = NULL, + answer_groups_display_as = NULL, + answer_groups_affirmative_answers = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{questions_data}{Questions data. The main data sheet. Each row in this table will become a dot in the graphic..} + +\item{order_data}{Order data. Groups by default appear in size or alphabetical order. You can override these with the "Group order" sheet..} + +\item{labels_data}{Labels data. Allows you to change how any phrase in the main data sheet is displayed in the graphic. Useful for shortening long questions, translating, etc..} + +\item{colors_data}{Colors data. Use this extra table if you want to specify specific colors in the context of specific questions. E.g. to make a red to green scale from "strongly diagree" to "strongly agree"..} + +\item{places_data}{Places data. A table of places found in the geographic columns of the main data sheet, each with latitude and longitude to plot it on the map.} + +\item{answer_groups_data}{Answer groups data. Grouped questions, in the form "Which of the following apply?", are made by combining mutiple yes/no columns in the main data sheet..} + +\item{questions_categorical}{Categorical columns. Each of these columns appears in the Group by, Shade by and Compare dropdowns. Flourish type hint: columns} + +\item{questions_continuous}{Continuous columns. Must contain numbers. Each of these columns appears in the Size by dropdown. Flourish type hint: columns} + +\item{questions_geo}{Geographic columns. Must contain place names matching those specified in the Places sheet. Set to blank to disable the map mode. Flourish type hint: columns} + +\item{questions_label}{Label. A column containing text (e.g. names or emoji) to write on the dots. Not recommended for datasets with more than a few hundred dots. Flourish type hint: column} + +\item{questions_column_filter}{Slider or menu. Add a time slider or menu to filter the data based on the contents of a single column. Flourish type hint: column} + +\item{questions_id}{Unique name/ID. Specify to allow animations between multiple occurrences of the same person or thing e.g. when using a time slider. Flourish type hint: column} + +\item{questions_metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panelsFlourish type hint: columns} + +\item{order_categories}{Order of answers. Use one column for each question or metric. Put the column header from the main data sheet at the top (e.g. "Do you agree?"), followed by the answers in the order you want (e.g. "disagree", "neutral", "agree"). Flourish type hint: columns} + +\item{labels_label}{Label. A column containing phrases from the main data sheet. Flourish type hint: column} + +\item{labels_replacement}{Replacement. A column containing the phrase to display. Flourish type hint: column} + +\item{colors_question}{Question. The column header (e.g. a survey question) exactly as it appears in the main data sheet. Flourish type hint: column} + +\item{colors_answer}{Answer. Use one column for each question or metric. Put the column header from the main datasheet at the top (e.g. "Do you agree?"), followed by the answers in the order you want (e.g. "disagree", "neutral", "agree"). Flourish type hint: column} + +\item{colors_color}{Color. A color name (e.g. orange, red) or code (e.g. #ff3300, #ff0000). Flourish type hint: column} + +\item{places_latitude}{Latitude. A column of latitude values. Flourish type hint: column} + +\item{places_longitude}{Longitude. A column of longitude values. Flourish type hint: column} + +\item{places_names}{Names. One or more columns of place names matching those in the main data sheet. Flourish type hint: columns} + +\item{answer_groups_group}{Group name. This column will contain the name of the grouped question Flourish type hint: column} + +\item{answer_groups_question}{Question. A question that matches exactly one of the questions in the datasheet. Flourish type hint: column} + +\item{answer_groups_display_as}{Display answer as. This will be the new text for the question. Flourish type hint: column} + +\item{answer_groups_affirmative_answers}{Answers to include. The respondent is included in the group if their answer to the question is one of the answers listed in these columns. Flourish type hint: columns} +} +\value{ +A Flourish chart +} +\description{ +Bind survey data +} +\examples{ +try( + flourish(chart_type = "survey", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_survey_data(gapminder) +) +} diff --git a/R_package/man/bind_svg_annotator_data.Rd b/R_package/man/bind_svg_annotator_data.Rd new file mode 100644 index 0000000..cac45c7 --- /dev/null +++ b/R_package/man/bind_svg_annotator_data.Rd @@ -0,0 +1,49 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_svg_annotator_data.R +\name{bind_svg_annotator_data} +\alias{bind_svg_annotator_data} +\title{Bind svg annotator data} +\usage{ +bind_svg_annotator_data( + ., + data = NULL, + id = NULL, + reveal_id = NULL, + h1 = NULL, + h2 = NULL, + content = NULL, + link = NULL, + metadata = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{id}{ID. A column of IDs of elements in the uploaded SVG file. Flourish type hint: column} + +\item{reveal_id}{Reveal layer. A column to reveal when layer is clicked. Flourish type hint: column} + +\item{h1}{Heading 1. A column containing the main header. Flourish type hint: column} + +\item{h2}{Heading 2. A column containing a secondary header. Flourish type hint: column} + +\item{content}{Content. A column containing text or HTML to display. Flourish type hint: column} + +\item{link}{Link. A URL that can be opened when a layer is clicked. Any reveal layers or popups will be overridden. Flourish type hint: column} + +\item{metadata}{Info for popups. One or more columns to display in popups and panels. Flourish type hint: columns} +} +\value{ +A Flourish chart +} +\description{ +Bind svg annotator data +} +\examples{ +try( + flourish(chart_type = "svg_annotator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_svg_annotator_data(gapminder) +) +} diff --git a/R_package/man/bind_table_data.Rd b/R_package/man/bind_table_data.Rd new file mode 100644 index 0000000..b267dd4 --- /dev/null +++ b/R_package/man/bind_table_data.Rd @@ -0,0 +1,37 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_table_data.R +\name{bind_table_data} +\alias{bind_table_data} +\title{Bind table data} +\usage{ +bind_table_data( + ., + rows_data = NULL, + columns = NULL, + columns_input_format = NULL, + columns_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{rows_data}{Rows data.} + +\item{columns}{Table values. The cell contents can by styled with html or markdown To style with markdown first make sure the Cell text styling setting in the Table section of the editor is on To add an image, right click on a cell and click Upload fileSuggested data type hints: string, number, datetime. Flourish type hint: columns} + +\item{columns_input_format}{Formats/parses dates, strings, and numbers for the columns column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{columns_output_format}{Formats/parses dates, strings, and numbers for the columns column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind table data +} +\examples{ +try( + flourish(chart_type = "table", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_table_data(gapminder) +) +} diff --git a/R_package/man/bind_text_annotator_data.Rd b/R_package/man/bind_text_annotator_data.Rd new file mode 100644 index 0000000..2f71982 --- /dev/null +++ b/R_package/man/bind_text_annotator_data.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_text_annotator_data.R +\name{bind_text_annotator_data} +\alias{bind_text_annotator_data} +\title{Bind text annotator data} +\usage{ +bind_text_annotator_data(., data = NULL, text = NULL, note = NULL) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{text}{Text. The piece of text you want to highlight. Note that text is case and space sensitive. Flourish type hint: column} + +\item{note}{Annotation. The annotation content. Flourish type hint: column} +} +\value{ +A Flourish chart +} +\description{ +Bind text annotator data +} +\examples{ +try( + flourish(chart_type = "text_annotator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_text_annotator_data(gapminder) +) +} diff --git a/R_package/man/bind_timeline_data.Rd b/R_package/man/bind_timeline_data.Rd new file mode 100644 index 0000000..e0f8b1f --- /dev/null +++ b/R_package/man/bind_timeline_data.Rd @@ -0,0 +1,100 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_timeline_data.R +\name{bind_timeline_data} +\alias{bind_timeline_data} +\title{Bind timeline data} +\usage{ +bind_timeline_data( + ., + data = NULL, + time_start = NULL, + time_end = NULL, + category = NULL, + title = NULL, + subtitle = NULL, + text = NULL, + image = NULL, + background = NULL, + background_input_format = NULL, + background_output_format = NULL, + category_input_format = NULL, + category_output_format = NULL, + time_end_input_format = NULL, + time_end_output_format = NULL, + image_input_format = NULL, + image_output_format = NULL, + time_start_input_format = NULL, + time_start_output_format = NULL, + subtitle_input_format = NULL, + subtitle_output_format = NULL, + text_input_format = NULL, + text_output_format = NULL, + title_input_format = NULL, + title_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{data}{Data.} + +\item{time_start}{Time start} + +\item{time_end}{End time. Sets the duration of the event in time scale mode. Flourish type hint: column} + +\item{category}{Category} + +\item{title}{Title. Title of the content. Suggested data type hints: string, number, datetime. Flourish type hint: column} + +\item{subtitle}{Subtitle. Subtitle of the content. Suggested data type hints: string, number, datetime. Flourish type hint: column} + +\item{text}{Text. Text to display inside the data point. Flourish type hint: column} + +\item{image}{Image. Main image for the event. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column} + +\item{background}{Background image. Background image for the event. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column} + +\item{background_input_format}{Formats/parses dates, strings, and numbers for the background column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{background_output_format}{Formats/parses dates, strings, and numbers for the background column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{category_input_format}{Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{category_output_format}{Formats/parses dates, strings, and numbers for the category column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{time_end_input_format}{Formats/parses dates, strings, and numbers for the time_end column. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{time_end_output_format}{Formats/parses dates, strings, and numbers for the time_end column. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{image_input_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{image_output_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{time_start_input_format}{Formats/parses dates, strings, and numbers for the time_start column. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{time_start_output_format}{Formats/parses dates, strings, and numbers for the time_start column. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{subtitle_input_format}{Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{subtitle_output_format}{Formats/parses dates, strings, and numbers for the subtitle column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{text_input_format}{Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{text_output_format}{Formats/parses dates, strings, and numbers for the text column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{title_input_format}{Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{title_output_format}{Formats/parses dates, strings, and numbers for the title column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind timeline data +} +\examples{ +try( + flourish(chart_type = "timeline", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_timeline_data(gapminder) +) +} diff --git a/R_package/man/bind_tournament_data.Rd b/R_package/man/bind_tournament_data.Rd new file mode 100644 index 0000000..b8ed055 --- /dev/null +++ b/R_package/man/bind_tournament_data.Rd @@ -0,0 +1,109 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_tournament_data.R +\name{bind_tournament_data} +\alias{bind_tournament_data} +\title{Bind tournament data} +\usage{ +bind_tournament_data( + ., + matches_data = NULL, + round = NULL, + team_a = NULL, + team_b = NULL, + winner = NULL, + score_a = NULL, + score_b = NULL, + metadata = NULL, + id = NULL, + image = NULL, + metadata_input_format = NULL, + metadata_output_format = NULL, + team_a_input_format = NULL, + team_a_output_format = NULL, + score_a_input_format = NULL, + score_a_output_format = NULL, + team_b_input_format = NULL, + team_b_output_format = NULL, + score_b_input_format = NULL, + score_b_output_format = NULL, + round_input_format = NULL, + round_output_format = NULL, + winner_input_format = NULL, + winner_output_format = NULL, + id_input_format = NULL, + id_output_format = NULL, + image_input_format = NULL, + image_output_format = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{matches_data}{Matches data. teams.} + +\item{round}{Stage. The stage of the tournament, for example "Round of 16" or "Semifinals". Flourish type hint: column} + +\item{team_a}{Participant A. The first participant or team in this match. Flourish type hint: column} + +\item{team_b}{Participant B. The second participant or team in this match. Flourish type hint: column} + +\item{winner}{Winner. The winning participant or team in this match. Must match the name of either Participant A or Participant B. If left blank, the template will assume that the match is upcoming. Flourish type hint: column} + +\item{score_a}{Participant A score. The score of Participant A in this match. Will appear along with the participants name in the box. Suggested data type hints: string, number. Flourish type hint: column} + +\item{score_b}{Participant B score. The score of Participant B in this match. Will appear along with the participants name in the box. Suggested data type hints: string, number. Flourish type hint: column} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs , embedded charts etc) to include in popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns} + +\item{id}{ID. Participant ID. Should match a participants name from the Matches sheet. Flourish type hint: column} + +\item{image}{Image. Image to render in the participant box. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column} + +\item{metadata_input_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{metadata_output_format}{Formats/parses dates, strings, and numbers for the metadata column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "\%Y-\%m-\%dT\%H:\%M:\%S.\%LZ", "\%d/\%m/\%Y", "\%d \%b", "\%-I\%p", "Q\%q \%Y", "\%Y Q\%q", and so on. All available formats noted in Flourish documentation: \url{https://developers.flourish.studio/api/create-visualisation/}.. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{team_a_input_format}{Formats/parses dates, strings, and numbers for the team_a column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{team_a_output_format}{Formats/parses dates, strings, and numbers for the team_a column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{score_a_input_format}{Formats/parses dates, strings, and numbers for the score_a column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{score_a_output_format}{Formats/parses dates, strings, and numbers for the score_a column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{team_b_input_format}{Formats/parses dates, strings, and numbers for the team_b column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{team_b_output_format}{Formats/parses dates, strings, and numbers for the team_b column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{score_b_input_format}{Formats/parses dates, strings, and numbers for the score_b column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{score_b_output_format}{Formats/parses dates, strings, and numbers for the score_b column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{round_input_format}{Formats/parses dates, strings, and numbers for the round column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{round_output_format}{Formats/parses dates, strings, and numbers for the round column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{winner_input_format}{Formats/parses dates, strings, and numbers for the winner column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{winner_output_format}{Formats/parses dates, strings, and numbers for the winner column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{id_input_format}{Formats/parses dates, strings, and numbers for the id column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{id_output_format}{Formats/parses dates, strings, and numbers for the id column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{image_input_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} + +\item{image_output_format}{Formats/parses dates, strings, and numbers for the image column. If string: any arbritrary string. Note: column metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format).} +} +\value{ +A Flourish chart +} +\description{ +Bind tournament data +} +\examples{ +try( + flourish(chart_type = "tournament", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_tournament_data(gapminder) +) +} diff --git a/R_package/man/bind_word_cloud_data.Rd b/R_package/man/bind_word_cloud_data.Rd new file mode 100644 index 0000000..45fc3d8 --- /dev/null +++ b/R_package/man/bind_word_cloud_data.Rd @@ -0,0 +1,40 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bind_word_cloud_data.R +\name{bind_word_cloud_data} +\alias{bind_word_cloud_data} +\title{Bind word cloud data} +\usage{ +bind_word_cloud_data( + ., + words_data = NULL, + word = NULL, + value = NULL, + category = NULL, + metadata = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{words_data}{Words data.} + +\item{word}{Word} + +\item{value}{Value} + +\item{category}{Category} + +\item{metadata}{Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Flourish type hint: columns} +} +\value{ +A Flourish chart +} +\description{ +Bind word cloud data +} +\examples{ +try( + flourish(chart_type = "word_cloud", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_word_cloud_data(gapminder) +) +} diff --git a/R_package/man/flourish.Rd b/R_package/man/flourish.Rd new file mode 100644 index 0000000..a9ba35a --- /dev/null +++ b/R_package/man/flourish.Rd @@ -0,0 +1,45 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/flourish.R +\name{flourish} +\alias{flourish} +\title{Plot a Flourish graph.} +\usage{ +flourish( + chart_type = NULL, + chart_description = NULL, + base_visualisation_id = NULL, + template_id = NULL, + template_version_number = NULL, + api_key = Sys.getenv("FLOURISH_API_KEY") +) +} +\arguments{ +\item{chart_type}{Required - a chart type string for each graph in Flourish's library. Preferred usage compared to \code{template_id} and \code{template_version}.} + +\item{chart_description}{Optional - a screen-reader description. A text alternative to the visual content that will only be visible to screen-readers, e.g. “The line chart shows China consistently higher than the other countries since 1990”. Do no replicate your title, since that will also be read by screenreaders.} + +\item{base_visualisation_id}{Optional - provide the numerical ID of an existing public (published) Flourish visualisation to reference it's configuration} + +\item{template_id}{Optional - the Flourish template ID, found at https://app.flourish.studio/@flourish. Use if you cannot use \code{chart_type}.} + +\item{template_version_number}{Optional - the template's version number. Also found at https://app.flourish.studio/@flourish. Use if you cannot use \code{chart_type}.} + +\item{api_key}{Required - our API key which can be generated within your profile account. Defaults to Sys.getenv("FLOURISH_API_KEY").} +} +\value{ +A Flourish chart +} +\description{ +Create a graph using Flourish's API (https://developers.flourish.studio/api/introduction/). +} +\examples{ +try( + flourish( + chart_type = "scatter", api_key = Sys.getenv("FLOURISH_API_KEY") + ) |> + bind_scatter_data( + data = subset(gapminder, year == 2007), + y = "gdpPercap", x = "lifeExp" + ) + ) +} diff --git a/R_package/man/flourish_api_documentation.Rd b/R_package/man/flourish_api_documentation.Rd new file mode 100644 index 0000000..dffc30b --- /dev/null +++ b/R_package/man/flourish_api_documentation.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{flourish_api_documentation} +\alias{flourish_api_documentation} +\title{Flourish template API documentation} +\format{ +A data frame with 57 rows and 3 columns: +\describe{ +\item{template_name}{Template name. Found in API documentation: \url{https://app.flourish.studio/@flourish}. } +\item{chart_type}{Chart type. One template may have multiple chart types.} +\item{url}{URL for template API documentation.} +} +} +\source{ +\url{https://flourish.studio/index.html} +} +\usage{ +flourish_api_documentation +} +\value{ +A data frame +} +\description{ +A data set containing template metadata about Flourish graphs +} +\examples{ +flourish_api_documentation +} +\keyword{datasets} diff --git a/R_package/man/gapminder.Rd b/R_package/man/gapminder.Rd new file mode 100644 index 0000000..495538d --- /dev/null +++ b/R_package/man/gapminder.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{gapminder} +\alias{gapminder} +\title{Gapminder data} +\format{ +A data frame with 1704 rows and 6 columns: +\describe{ +\item{country}{Country name.} +\item{continent}{Continent name.} +\item{year}{Year data was collected.} +\item{lifeExp}{Life expectancy.} +\item{pop}{Population size.} +\item{gdpPercap}{GDP per capita.} +} +} +\source{ +\url{https://www.gapminder.org/} +} +\usage{ +gapminder +} +\value{ +A data frame +} +\description{ +A data set containing Gapminder data used for vignettes +} +\examples{ +gapminder +} +\keyword{datasets} diff --git a/R_package/man/set_audio_details.Rd b/R_package/man/set_audio_details.Rd new file mode 100644 index 0000000..54bd14b --- /dev/null +++ b/R_package/man/set_audio_details.Rd @@ -0,0 +1,569 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_audio_details.R +\name{set_audio_details} +\alias{set_audio_details} +\title{Set audio chart details} +\usage{ +set_audio_details( + ., + audio_player_button_color = NULL, + audio_player_button_icon_color = NULL, + audio_player_button_size = NULL, + audio_player_button_roundness = NULL, + audio_player_progress_color = NULL, + audio_player_progress_bg_color = NULL, + audio_player_progress_height = NULL, + audio_player_progress_width = NULL, + audio_player_width = NULL, + audio_player_margin_top_bottom = NULL, + audio_player_show_text_styling = NULL, + audio_player_title_size = NULL, + audio_player_title_color = NULL, + audio_player_title_weight = NULL, + audio_player_subtitle_size = NULL, + audio_player_subtitle_color = NULL, + audio_player_subtitle_weight = NULL, + audio_player_time_size = NULL, + audio_player_time_color = NULL, + audio_player_time_weight = NULL, + audio_player_link_color = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{audio_player_button_color}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{audio_player_button_icon_color}{Icons. Flourish type hint: color, defaults to \code{NULL}} + +\item{audio_player_button_size}{Size. In rems, a multiple of base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{audio_player_button_roundness}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{audio_player_progress_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{audio_player_progress_bg_color}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{audio_player_progress_height}{Height. In rems, a multiple of base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{audio_player_progress_width}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{audio_player_width}{Width. In rems, a multiple of base font size. Leave blank to fill the available space. Flourish type hint: number, defaults to \code{NULL}} + +\item{audio_player_margin_top_bottom}{Space. Spacing above and below the player. In rems, a multiple of base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{audio_player_show_text_styling}{Show text styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{audio_player_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{audio_player_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{audio_player_title_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{audio_player_subtitle_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{audio_player_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{audio_player_subtitle_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{audio_player_time_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{audio_player_time_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{audio_player_time_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{audio_player_link_color}{Color. Where links are present (added by wrapping text in tags in the datasheet) this setting changes their text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set audio chart details +} +\examples{ +try( + flourish(chart_type = "audio", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_audio_data(gapminder) |> + set_audio_details() +) +} diff --git a/R_package/man/set_bar_chart_race_details.Rd b/R_package/man/set_bar_chart_race_details.Rd new file mode 100644 index 0000000..7538f6f --- /dev/null +++ b/R_package/man/set_bar_chart_race_details.Rd @@ -0,0 +1,935 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_bar_chart_race_details.R +\name{set_bar_chart_race_details} +\alias{set_bar_chart_race_details} +\title{Set bar chart race chart details} +\usage{ +set_bar_chart_race_details( + ., + column_chart = NULL, + number_of_bars = NULL, + bar_margin = NULL, + sort_enabled = NULL, + sort_ascending = NULL, + bars_advanced = NULL, + height_mode = NULL, + bar_height = NULL, + bar_min_value = NULL, + bar_empty_spaces = NULL, + color_mode = NULL, + color_single = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + color_single_overrides = NULL, + bar_opacity = NULL, + label_max_size = NULL, + label_mode = NULL, + label_color_in = NULL, + label_axis_width = NULL, + show_value = NULL, + label_color_out = NULL, + padding_right = NULL, + image_height = NULL, + image_width = NULL, + image_margin_right = NULL, + image_scale = NULL, + image_circle = NULL, + counter = NULL, + counter_font_size = NULL, + counter_color = NULL, + counter_line_height = NULL, + totaliser = NULL, + totaliser_font_size = NULL, + totaliser_color = NULL, + totaliser_label = NULL, + caption_background_color = NULL, + caption_border_color = NULL, + caption_opacity = NULL, + caption_padding = NULL, + caption_text_align = NULL, + caption_position = NULL, + caption_font_size = NULL, + caption_text_color = NULL, + caption_mode = NULL, + caption_image_width = NULL, + caption_image_position = NULL, + caption_space_between = NULL, + sort_control = NULL, + sort_descending_text = NULL, + sort_ascending_text = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + text_legend = NULL, + text_legend_title = NULL, + text_legend_subtitle = NULL, + text_legend_caption = NULL, + text_legend_bold = NULL, + axis_text_color = NULL, + axis_font_size = NULL, + axis_color = NULL, + axis_gridline_dash = NULL, + scale_type = NULL, + scale_min = NULL, + scale_max = NULL, + annotations_enabled = NULL, + annotations_content = NULL, + annotations_text_color = NULL, + annotations_text_size = NULL, + annotations_text_weight = NULL, + annotations_line_color = NULL, + annotations_line_opacity = NULL, + annotations_line_width = NULL, + annotations_line_dash = NULL, + annotations_align = NULL, + annotations_offset = NULL, + chart_timeline_controls_enabled = NULL, + chart_timeline_controls_style = NULL, + chart_timeline_controls_graph = NULL, + chart_timeline_controls_play_on_load = NULL, + chart_timeline_controls_loop = NULL, + chart_timeline_controls_duration = NULL, + chart_timeline_controls_duration_tween = NULL, + chart_timeline_controls_duration_wait_at_end = NULL, + chart_timeline_controls_axes_custom_enabled = NULL, + chart_timeline_controls_color_axes = NULL, + chart_timeline_controls_axis_font_size = NULL, + chart_timeline_controls_date_format_display = NULL, + chart_timeline_controls_axis_nice_x = NULL, + chart_timeline_controls_axis_nice_y = NULL, + chart_timeline_controls_scrubber_snap = NULL, + chart_timeline_controls_scrubber_snap_paused = NULL, + chart_timeline_controls_layout_settings = NULL, + chart_timeline_controls_margin_top = NULL, + chart_timeline_controls_margin_left = NULL, + chart_timeline_controls_margin_bottom = NULL, + chart_timeline_controls_margin_right = NULL, + chart_timeline_controls_playback_button_margin_right = NULL, + chart_timeline_controls_scrubber_height = NULL, + chart_timeline_controls_playback_button_margin_right_button = NULL, + chart_timeline_controls_graph_settings = NULL, + chart_timeline_controls_color_background = NULL, + chart_timeline_controls_graph_height = NULL, + chart_timeline_controls_curve = NULL, + chart_timeline_controls_playback_styling = NULL, + chart_timeline_controls_playback_button_button_color = NULL, + chart_timeline_controls_playback_button_button_size = NULL, + chart_timeline_controls_playback_button_icon_color = NULL, + chart_timeline_controls_playback_button_icon_size = NULL, + chart_timeline_controls_playback_button_label_size = NULL, + animation_duration = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + blank_cells = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{column_chart}{Chart style. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{number_of_bars}{No. bars. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_margin}{Spacing (Percentage). Spacing as a percentage of bar width. For example at "50" the bar height will equal bar spacing. Flourish type hint: number, defaults to \code{NULL}} + +\item{sort_enabled}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{sort_ascending}{Sort mode. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bars_advanced}{Show advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{height_mode}{Bar height. Choices: fill_space, specified. Flourish type hint: string, defaults to \code{NULL}} + +\item{bar_height}{Height. Height of the bar; expressed as a multiple of the base font size to make it responsive. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_min_value}{Hide bars below value. This will hide all bars that have a value below the number specified in this setting. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_empty_spaces}{When not enough bars. Choices: \code{TRUE}, \code{FALSE}. If enabled, the chart and bars will remain the same size as more bars enter the race. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{color_mode}{Color mode. Choices: category, bar, single. Whether to color by category (if you have a category column set in the datasheet), by each individual bar, or give every bar the same color. Flourish type hint: string, defaults to \code{NULL}} + +\item{color_single}{Single color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Color overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{color_single_overrides}{Color overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{bar_opacity}{Bar opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_max_size}{Max size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_mode}{Labels mode. Choices: bars, axis. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_color_in}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{label_axis_width}{Space. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{show_value}{Show values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_color_out}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{padding_right}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_height}{Height. As a percentage of bar height. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_width}{Width. As a percentage of bar height. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_margin_right}{Margin right. As a percentage of bar height. Use a negative value to get images to show to the right of the barFlourish type hint: number, defaults to \code{NULL}} + +\item{image_scale}{Image sizing. Choices: fill, fit, stretch. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_circle}{Shape. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{counter}{Show current time. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{counter_font_size}{Size (percentage of screen). Flourish type hint: number, defaults to \code{NULL}} + +\item{counter_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{counter_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{totaliser}{Show total. Shows the sum of all the values in the datasheet for the current time, including any bars not currently visible in the chart. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{totaliser_font_size}{Size (percentage of screen). Flourish type hint: number, defaults to \code{NULL}} + +\item{totaliser_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{totaliser_label}{Label. Flourish type hint: string, defaults to \code{NULL}} + +\item{caption_background_color}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{caption_border_color}{Border. Flourish type hint: color, defaults to \code{NULL}} + +\item{caption_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{caption_padding}{Padding. In rems multiples of the base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{caption_text_align}{Align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{caption_position}{Position. Choices: top-left, center-left, bottom-left, top-right, center-right, bottom-right, top-center, center-center, bottom-center. Flourish type hint: string, defaults to \code{NULL}} + +\item{caption_font_size}{Font size. In rems multiples of the base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{caption_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{caption_mode}{Content mode. Choices: text_legend, html. In Text with colors mode, any phrases matching category names will be automatically colored. In HTML mode, no colors will be applied, but you can include any HTML in the datasheet to add images, etc. Flourish type hint: string, defaults to \code{NULL}} + +\item{caption_image_width}{Width. As a percentage of the caption container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{caption_image_position}{Position. Choices: column, column-reverse, row, row-reverse. Flourish type hint: string, defaults to \code{NULL}} + +\item{caption_space_between}{Space between. Space between the image and text in rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{sort_control}{Show sort control. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{sort_descending_text}{“Highest” label. Flourish type hint: string, defaults to \code{NULL}} + +\item{sort_ascending_text}{“Lowest” label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_legend}{Choices: auto, custom, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_legend_title}{Title. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{text_legend_subtitle}{Subtitle. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{text_legend_caption}{Captions. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{text_legend_bold}{Bold. If checked, always use bold for colored items. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{axis_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{axis_font_size}{Text size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{axis_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{axis_gridline_dash}{Line dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{scale_type}{Type. Choices: auto, auto_fixed, manual. The dynamic scale type sets a dynamix X axis that will animate with the chart. The fixed or custom scale type sets a fixed maximum value on the X axis. Flourish type hint: string, defaults to \code{NULL}} + +\item{scale_min}{Min range. The axis will go from zero to this value, then be dynamic. Flourish type hint: number, defaults to \code{NULL}} + +\item{scale_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{annotations_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{annotations_content}{Annotations. One line per annotation. Syntax Annotation text :: Value on X axis Example Winner :: 250 Majority :: 200. Flourish type hint: text, defaults to \code{NULL}} + +\item{annotations_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{annotations_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{annotations_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{annotations_line_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{annotations_line_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{annotations_line_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{annotations_line_dash}{Dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{annotations_align}{Align. Choices: start, middle, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{annotations_offset}{Offset. Choices: above, on, below. Offset text mode. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_timeline_controls_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_style}{Style. Choices: timeline, button. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_timeline_controls_graph}{Show chart. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_play_on_load}{Play on load. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_loop}{Loop timeline. When turned on, the timeline will return to the beginning once complete. Otherwise, it will stop when it reaches the end. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_duration}{Timeline duration. Total duration of the timeline during normal playback in seconds. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_duration_tween}{Time jump duration. Duration of transitions between different points in time on the timeline. This is the transition you see in the story player when switching between slides with a different time on the timeline (in seconds). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_duration_wait_at_end}{Pause before loop. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_axes_custom_enabled}{Axis settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_color_axes}{Axes color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_timeline_controls_axis_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_date_format_display}{X axis date format. Choices:, \%Y-\%m-\%dT\%H:\%M:\%S.\%LZ, \%Y-\%m-\%d, \%m/\%d/\%Y, \%d/\%m/\%Y, \%d-\%b-\%y, \%m/\%Y, \%b \%Y, \%b \%y, \%B \%d, \%d \%b, \%Y, \%B, \%b, \%A, \%a, \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_timeline_controls_axis_nice_x}{Clean X axis. Rounds out the X axis so that its start and end values are nice, round dates. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_axis_nice_y}{Clean Y axis. Rounds out the Y axis so that its start and end values are nice, round numbers. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_scrubber_snap}{Snap when scrubbing. When turned on, you can only jump to values that are supplied in the dataset and nothing in between. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_scrubber_snap_paused}{Snap when paused. Activate to snap the timeline to the closest interval when non animating. This is useful for ensuring the data visible in the visualization always reflects the data you have supplied. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_layout_settings}{Layout settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_margin_right}{Space between button and timeline. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_scrubber_height}{Scrubber height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_margin_right_button}{Space between button and text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_graph_settings}{Chart settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_color_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_timeline_controls_graph_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_curve}{Curved lines. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_styling}{Play button settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_button_color}{Button color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_button_size}{Button size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_icon_color}{Icon color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_icon_size}{Icon size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_label_size}{Label size. Flourish type hint: number, defaults to \code{NULL}} + +\item{animation_duration}{Bar swap duration. Animation duration of the bars swapping, in seconds. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{blank_cells}{How to handle blank/invalid cells. Choices: interpolate, last_valid, zero, remove. Interpolate fills the gaps between the last and next valid values. Use last valid will use the last number for the bar. Treat as zero will set the value of the blank cell to zero. Remove bar will remove the bar for any blank/invalid cells. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set bar chart race chart details +} +\examples{ +try( + flourish(chart_type = "bar_race", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_bar_chart_race_data(gapminder) |> + set_bar_chart_race_details() +) +} diff --git a/R_package/man/set_bubble_chart_details.Rd b/R_package/man/set_bubble_chart_details.Rd new file mode 100644 index 0000000..a11edad --- /dev/null +++ b/R_package/man/set_bubble_chart_details.Rd @@ -0,0 +1,809 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_bubble_chart_details.R +\name{set_bubble_chart_details} +\alias{set_bubble_chart_details} +\title{Set bubble chart chart details} +\usage{ +set_bubble_chart_details( + ., + bubble_alignment = NULL, + margin_bubbles = NULL, + animation_duration = NULL, + height_mode = NULL, + aspect_ratio = NULL, + aspect_ratio_mobile = NULL, + aspect_ratio_breakpoint = NULL, + circle_background_color = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + circle_background_border = NULL, + image_opacity = NULL, + label_font_weight = NULL, + label_font_style = NULL, + label_font_case = NULL, + label_font_color = NULL, + label_shadow = NULL, + enable_highlighting = NULL, + selected_bubbles = NULL, + opacity_highlighted = NULL, + opacity_not_highlighted = NULL, + highlight_pictures = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + show_legend_axis = NULL, + axis_legend_title_mode = NULL, + axis_legend_title = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_size_legend_show_legend = NULL, + chart_size_legend_title_mode = NULL, + chart_size_legend_title = NULL, + chart_size_legend_shape_fill = NULL, + chart_size_legend_shape_stroke = NULL, + chart_size_legend_clip_height = NULL, + chart_size_legend_small_symbol_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{bubble_alignment}{Alignment of bubbles. Choices: center, axis. Flourish type hint: string, defaults to \code{NULL}} + +\item{margin_bubbles}{Space between bubbles. Flourish type hint: number, defaults to \code{NULL}} + +\item{animation_duration}{Animation duration. in seconds. Flourish type hint: number, defaults to \code{NULL}} + +\item{height_mode}{Height mode. Choices: fill_space, aspect. Fill space: the graphic will fill the container (which by default will be the the standard Flourish responsive chart size) Aspect ratio: sets the aspect of the chart. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to \code{NULL}} + +\item{aspect_ratio}{Aspect (desktop). Height of the plot as a proportion of its width, between 0 and 1. Flourish type hint: number, defaults to \code{NULL}} + +\item{aspect_ratio_mobile}{Aspect (mobile). Height of the plot as a proportion of its width, between 0 and 1. Flourish type hint: number, defaults to \code{NULL}} + +\item{aspect_ratio_breakpoint}{Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to \code{NULL}} + +\item{circle_background_color}{Color. Default color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{circle_background_border}{Border. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_font_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_font_style}{Style. Choices: normal, italic. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_font_case}{Case. Choices:, uppercase. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_font_color}{Color. Defaults to contrast coloring when no image is set. Flourish type hint: color, defaults to \code{NULL}} + +\item{label_shadow}{Text shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{enable_highlighting}{Enable highlighting. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{selected_bubbles}{Highlight bubbles. To highlight bubbles, write the name of each bubble on a new line. You can also create a story and highlight/unhighlight by clicking. Flourish type hint: text, defaults to \code{NULL}} + +\item{opacity_highlighted}{Opacity of highlighted bubble. Flourish type hint: number, defaults to \code{NULL}} + +\item{opacity_not_highlighted}{Opacity of all other bubbles. Flourish type hint: number, defaults to \code{NULL}} + +\item{highlight_pictures}{Show pictures only on highlighted bubbles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{show_legend_axis}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{axis_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{axis_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_size_legend_show_legend}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_size_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_size_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_size_legend_shape_fill}{Shape fill. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_size_legend_shape_stroke}{Shape stroke. Hint: set to same value as fill for no stroke. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_size_legend_clip_height}{Max height. Maximum height of shape ( relative to root font size ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_size_legend_small_symbol_size}{Small/large proportion. Proportion of the smallest symbols value compared to the biggest symbols value. 0.5 means its half the value of the big symbol. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_localization_input_decimal_separator}{Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_output_separators}{Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set bubble chart chart details +} +\examples{ +try( + flourish(chart_type = "bubble", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_bubble_chart_data(gapminder) |> + set_bubble_chart_details() +) +} diff --git a/R_package/man/set_calculator_details.Rd b/R_package/man/set_calculator_details.Rd new file mode 100644 index 0000000..fb826dd --- /dev/null +++ b/R_package/man/set_calculator_details.Rd @@ -0,0 +1,1070 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_calculator_details.R +\name{set_calculator_details} +\alias{set_calculator_details} +\title{Set calculator chart details} +\usage{ +set_calculator_details( + ., + question_flow = NULL, + design_border_type = NULL, + design_border_color = NULL, + design_background = NULL, + design_advanced = NULL, + design_align_horizontal = NULL, + design_align_vertical = NULL, + design_max_width = NULL, + design_margin_vertical = NULL, + design_padding_vertical = NULL, + design_padding_horizontal = NULL, + design_border_width = NULL, + design_border_style = NULL, + design_border_radius = NULL, + design_shadow = NULL, + design_shadow_color = NULL, + result_variables = NULL, + result_input = NULL, + result_advanced = NULL, + result_font_size = NULL, + result_font_size_custom = NULL, + result_font_color = NULL, + result_font_weight = NULL, + result_font_style = NULL, + result_border_type = NULL, + result_border_width = NULL, + result_border_style = NULL, + result_border_color = NULL, + result_bg_type = NULL, + result_bg_color = NULL, + result_bg_image_src = NULL, + result_bg_image_size = NULL, + design_question_font_size = NULL, + design_question_font_size_custom = NULL, + design_question_font_color = NULL, + design_question_font_weight = NULL, + design_question_font_style = NULL, + design_question_margin_vertical = NULL, + design_question_margin_horizontal = NULL, + design_question_padding = NULL, + design_context_font_size = NULL, + design_context_font_size_custom = NULL, + design_context_font_color = NULL, + design_context_font_weight = NULL, + design_context_font_style = NULL, + design_context_margin_vertical = NULL, + design_context_margin_horizontal = NULL, + design_question_bg_color = NULL, + design_question_bg_opacity = NULL, + design_question_border_radius = NULL, + design_answer_margin_vertical = NULL, + design_answer_margin_horizontal = NULL, + input_color = NULL, + input_background_color = NULL, + input_width = NULL, + number_input_placeholder = NULL, + text_input_placeholder = NULL, + input_input_advanced = NULL, + input_border_color = NULL, + input_border_radius = NULL, + input_border_width = NULL, + input_border_style = NULL, + input_align = NULL, + input_margin = NULL, + input_padding = NULL, + button_font_size = NULL, + button_font_size_custom = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + button_border_style = NULL, + button_container_width = NULL, + button_justify_content = NULL, + button_margin = NULL, + button_padding_factor = NULL, + dropdown_font_size = NULL, + dropdown_font_size_custom = NULL, + dropdown_placeholder = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + dropdown_padding_factor = NULL, + dropdown_border_style = NULL, + dropdown_font_weight = NULL, + dropdown_font_style = NULL, + dropdown_shadow = NULL, + dropdown_shadow_color = NULL, + date_format = NULL, + date_input_placeholder = NULL, + date_advanced = NULL, + date_width = NULL, + date_margin = NULL, + date_padding = NULL, + date_border_width = NULL, + date_border_style = NULL, + date_border_color = NULL, + date_border_radius = NULL, + date_align = NULL, + date_calendar_position_vertical = NULL, + date_calendar_position_horizontal = NULL, + rating_icon_type = NULL, + rating_icon_fill_base = NULL, + rating_icon_stroke_base = NULL, + rating_icon_fill_active = NULL, + rating_icon_stroke_active = NULL, + rating_advanced = NULL, + rating_icon_width = NULL, + rating_icon_height = NULL, + rating_icon_margin = NULL, + rating_icon_stroke_width = NULL, + rating_container_width = NULL, + rating_wrap_margin_vertical = NULL, + rating_wrap_margin_horizontal = NULL, + rating_wrap_padding_vertical = NULL, + rating_wrap_padding_horizontal = NULL, + rating_label_width = NULL, + rating_label_color = NULL, + rating_label_position = NULL, + chart_slider_filter_controls_handle_color = NULL, + chart_slider_filter_controls_track_active_color = NULL, + chart_slider_filter_controls_track_base_color = NULL, + chart_slider_filter_controls_handle_size = NULL, + chart_slider_filter_controls_ticks = NULL, + chart_slider_filter_controls_advanced = NULL, + chart_slider_filter_controls_container_width = NULL, + chart_slider_filter_controls_wrap_margin_vertical = NULL, + chart_slider_filter_controls_wrap_margin_horizontal = NULL, + chart_slider_filter_controls_track_height = NULL, + chart_slider_filter_controls_track_border_radius = NULL, + chart_slider_filter_controls_track_border_color = NULL, + chart_slider_filter_controls_track_border_width = NULL, + chart_slider_filter_controls_handle_shape = NULL, + chart_slider_filter_controls_handle_width = NULL, + chart_slider_filter_controls_handle_border_color = NULL, + chart_slider_filter_controls_handle_border_width = NULL, + chart_slider_filter_controls_handle_border_radius = NULL, + chart_slider_filter_controls_handle_box_shadow = NULL, + chart_slider_filter_controls_tooltips = NULL, + chart_slider_filter_controls_tooltip_background = NULL, + chart_slider_filter_controls_tick_color = NULL, + chart_slider_filter_controls_tick_padding = NULL, + chart_slider_filter_controls_tick_number_padding = NULL, + submit_comment_text = NULL, + submit_button_text = NULL, + submit_bg_type = NULL, + submit_bg_color = NULL, + submit_bg_image_src = NULL, + submit_border = NULL, + submit_bg_image_size = NULL, + submit_advanced = NULL, + submit_comment_font_size = NULL, + submit_comment_font_size_custom = NULL, + submit_comment_font_weight = NULL, + submit_comment_font_style = NULL, + submit_flex_direction = NULL, + submit_comment_font_color = NULL, + submit_comment_margin = NULL, + submit_button_font_size = NULL, + submit_button_font_size_custom = NULL, + submit_button_font_weight = NULL, + submit_button_font_style = NULL, + submit_button_margin = NULL, + submit_button_padding_factor = NULL, + submit_button_box_shadow = NULL, + submit_button_use_default_styles = NULL, + submit_button_bg_color = NULL, + submit_button_bg_color_hover = NULL, + submit_button_font_color = NULL, + submit_button_font_color_hover = NULL, + submit_button_border_style = NULL, + submit_button_border_color = NULL, + submit_button_border_width = NULL, + submit_button_border_transparency = NULL, + submit_button_border_radius = NULL, + design_controls_position = NULL, + design_controls_button_symbol_back = NULL, + design_controls_button_symbol_forward = NULL, + design_controls_button_font_color = NULL, + design_controls_button_font_size = NULL, + design_controls_advanced = NULL, + design_controls_button_margin = NULL, + design_controls_button_padding_factor = NULL, + design_controls_button_bg_color = NULL, + design_controls_button_bg_opacity = NULL, + design_controls_button_font_weight = NULL, + design_controls_button_font_style = NULL, + design_controls_button_border_width = NULL, + design_controls_button_border_style = NULL, + design_controls_button_border_color = NULL, + design_controls_button_border_radius = NULL, + design_progress_show = NULL, + design_progress_position = NULL, + design_progress_height = NULL, + design_progress_margin = NULL, + design_progress_bg_color = NULL, + design_progress_bg_opacity = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + external_write_enabled = NULL, + external_write_endpoint = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{question_flow}{Question flow. Choices: vertical, horizontal. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_border_type}{Border. Choices: border-bottom, border. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_border_color}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{design_background}{Background. The background color of the cards. If not set, the background color in Layout is used. Flourish type hint: color, defaults to \code{NULL}} + +\item{design_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{design_align_horizontal}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_align_vertical}{Position. Choices: start, center, flex-end. Set the vertical text position if the window height is fixed and the text doesnt stretch across the full vertical card space. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_max_width}{Max width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{design_margin_vertical}{Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_padding_vertical}{Vertical padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_padding_horizontal}{Horizontal padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_border_style}{Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_border_radius}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{design_shadow_color}{Shadow color. Shadow color as an RGBA value (red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). Flourish type hint: string, defaults to \code{NULL}} + +\item{result_variables}{Variables. Define variables to use in the Result field below. Set one variable per line in the format name = value Values can be: Numbers Text (single quotes for spaces) Question references like q_2 with the number representing the row number of each question in the Questions datasheet Previously defined variables (if wrapped into square brackets ) which will resolve to the answered value Excel functions, e.g., a = SUM(q_2, q_3) Flourish type hint: text, defaults to \code{NULL}} + +\item{result_input}{Result. Here you can compose your result view You have access to all variables you created above as well as all "q_" variables by referencing them in double curly braces like for example: \code{{{ my_variable }}} or \code{{{ q_6 }}} Flourish type hint: html, defaults to \code{NULL}} + +\item{result_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{result_font_size}{Text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{result_font_size_custom}{Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{result_font_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{result_font_weight}{Text weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{result_font_style}{Text style. Choices: normal, italic. Flourish type hint: string, defaults to \code{NULL}} + +\item{result_border_type}{Border. Choices: border-bottom, border. Flourish type hint: string, defaults to \code{NULL}} + +\item{result_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{result_border_style}{Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{result_border_color}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{result_bg_type}{Background. Choices: color, image. Flourish type hint: string, defaults to \code{NULL}} + +\item{result_bg_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{result_bg_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{result_bg_image_size}{Image size. Choices: auto, cover, contain. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_question_font_size}{Text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_question_font_size_custom}{Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_question_font_color}{Color. The text color used for your questions. If not set, the text color in Layout is used. Flourish type hint: color, defaults to \code{NULL}} + +\item{design_question_font_weight}{Text weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_question_font_style}{Text style. Choices: normal, italic. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_question_margin_vertical}{Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_question_margin_horizontal}{Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_question_padding}{Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_context_font_size}{Text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_context_font_size_custom}{Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_context_font_color}{Color. The text color used for your question context. If not set, the text color in Layout is used. Flourish type hint: color, defaults to \code{NULL}} + +\item{design_context_font_weight}{Text weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_context_font_style}{Text style. Choices: normal, italic. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_context_margin_vertical}{Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_context_margin_horizontal}{Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_question_bg_color}{Background color. The background color for your questions and context. To change the background color of the whole question card, go to the General design settings. Flourish type hint: color, defaults to \code{NULL}} + +\item{design_question_bg_opacity}{Background opacity. The opacity of the question background color. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_question_border_radius}{Roundness. The roundness of the question background container. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_answer_margin_vertical}{Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_answer_margin_horizontal}{Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{input_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{input_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{input_width}{Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{number_input_placeholder}{Number input placeholder. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_input_placeholder}{Text input placeholder. Flourish type hint: string, defaults to \code{NULL}} + +\item{input_input_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{input_border_color}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{input_border_radius}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{input_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{input_border_style}{Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{input_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{input_margin}{Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{input_padding}{Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{button_font_size}{Text size. Choices: 1, 1.2, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{button_font_size_custom}{Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{button_border_style}{Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{button_container_width}{Button group width (\%). The width of the button group as a percentage of the card width. Flourish type hint: number, defaults to \code{NULL}} + +\item{button_justify_content}{Align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{button_margin}{Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{button_padding_factor}{Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{dropdown_font_size}{Text size. Choices: 1, 1.2, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{dropdown_font_size_custom}{Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{dropdown_placeholder}{Placeholder. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{dropdown_padding_factor}{Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{dropdown_border_style}{Border look. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{dropdown_font_weight}{Text weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{dropdown_font_style}{Text style. Choices: normal, italic. Flourish type hint: string, defaults to \code{NULL}} + +\item{dropdown_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{dropdown_shadow_color}{Shadow color. Flourish type hint: string, defaults to \code{NULL}} + +\item{date_format}{Format. Choices: y-m-d, d/m/_y, d/m/y, j/n/_y, j/n/y, d-m-_y, d-m-y, j-n-_y, j-n-y, d.m._y, d.m.y, j.n._y, j.n.y, m/d/_y, m/d/y, n/j/_y, n/j/y, m-d-_y, m-d-y, n-j-_y, n-j-y, m j, _y, f j, _y. Flourish type hint: string, defaults to \code{NULL}} + +\item{date_input_placeholder}{Placeholder. Flourish type hint: string, defaults to \code{NULL}} + +\item{date_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{date_width}{Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{date_margin}{Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{date_padding}{Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{date_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{date_border_style}{Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{date_border_color}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{date_border_radius}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{date_align}{Text alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{date_calendar_position_vertical}{Calendar vertical position. Choices: auto, above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{date_calendar_position_horizontal}{Calendar horizontal position. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{rating_icon_type}{Choices: star, circle, check. Flourish type hint: string, defaults to \code{NULL}} + +\item{rating_icon_fill_base}{Base fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{rating_icon_stroke_base}{Base stroke color. Flourish type hint: color, defaults to \code{NULL}} + +\item{rating_icon_fill_active}{Active fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{rating_icon_stroke_active}{Active stroke color. Flourish type hint: color, defaults to \code{NULL}} + +\item{rating_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{rating_icon_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{rating_icon_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{rating_icon_margin}{Vertical margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{rating_icon_stroke_width}{Stroke width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{rating_container_width}{Rating group width (\%). The width of the rating group as a percentage of the card width. Flourish type hint: number, defaults to \code{NULL}} + +\item{rating_wrap_margin_vertical}{Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{rating_wrap_margin_horizontal}{Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{rating_wrap_padding_vertical}{Vertical padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{rating_wrap_padding_horizontal}{Horizontal padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{rating_label_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{rating_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{rating_label_position}{Position. Choices: above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_handle_color}{Handle color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_track_active_color}{Track active color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_track_base_color}{Track background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_handle_size}{Handle size. percentage of track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_ticks}{Range ticks. Display the minimum and the maximum of the range at the left and right. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_container_width}{Track width (\%). The width of the track as a percentage of the card width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_wrap_margin_vertical}{Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_wrap_margin_horizontal}{Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_track_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_track_border_radius}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_track_border_color}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_track_border_width}{Border width. The width of the border around the card, in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_handle_shape}{Shape. Choices: rectangle, circle. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_handle_width}{Width. \% of Size (the handle height). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_handle_border_color}{Stroke color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_handle_border_width}{Stroke width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_handle_border_radius}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_handle_box_shadow}{Box shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_tooltips}{Tooltip. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_tooltip_background}{Tooltip background. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_tick_color}{Tick color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_tick_padding}{Tick padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_tick_number_padding}{Number padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_comment_text}{Submit label. Flourish type hint: text, defaults to \code{NULL}} + +\item{submit_button_text}{Submit button text. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_bg_type}{Background. Choices: color, image. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_bg_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{submit_bg_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{submit_border}{Border. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{submit_bg_image_size}{Image size. Choices: auto, cover, contain. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{submit_comment_font_size}{Label size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_comment_font_size_custom}{Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_comment_font_weight}{Text weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_comment_font_style}{Text style. Choices: normal, italic. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_flex_direction}{Label position. Choices: column, column-reverse. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_comment_font_color}{Label color. Flourish type hint: color, defaults to \code{NULL}} + +\item{submit_comment_margin}{Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_button_font_size}{Button text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_button_font_size_custom}{Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_button_font_weight}{Button text weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_button_font_style}{Text style. Choices: normal, italic. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_button_margin}{Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_button_padding_factor}{Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_button_box_shadow}{Hover shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{submit_button_use_default_styles}{Use answer button styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{submit_button_bg_color}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{submit_button_bg_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{submit_button_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{submit_button_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{submit_button_border_style}{Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_button_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{submit_button_border_width}{Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_button_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_button_border_radius}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_controls_position}{Position. Choices: top_left, top_centre, top_right, bottom_left, bottom_centre, bottom_right. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_controls_button_symbol_back}{Back button. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_controls_button_symbol_forward}{Forward button. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_controls_button_font_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{design_controls_button_font_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_controls_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{design_controls_button_margin}{Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_controls_button_padding_factor}{Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_controls_button_bg_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{design_controls_button_bg_opacity}{Background opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_controls_button_font_weight}{Text weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_controls_button_font_style}{Text style. Choices: normal, italic. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_controls_button_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_controls_button_border_style}{Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_controls_button_border_color}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{design_controls_button_border_radius}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_progress_show}{Show progress bar. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{design_progress_position}{Position. Choices: top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{design_progress_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_progress_margin}{Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{design_progress_bg_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{design_progress_bg_opacity}{Background opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_localization_input_decimal_separator}{Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_output_separators}{Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to \code{NULL}} + +\item{external_write_enabled}{Store result data externally. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{external_write_endpoint}{Storage endpoint. Your external database, store, API or web app endpoint to post data to. If you were to use Google Sheets to store your data, please check the External write docs for integration help. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set calculator chart details +} +\examples{ +try( + flourish(chart_type = "calculator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_calculator_data(gapminder) |> + set_calculator_details() +) +} diff --git a/R_package/man/set_cards_details.Rd b/R_package/man/set_cards_details.Rd new file mode 100644 index 0000000..26fb86b --- /dev/null +++ b/R_package/man/set_cards_details.Rd @@ -0,0 +1,1127 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_cards_details.R +\name{set_cards_details} +\alias{set_cards_details} +\title{Set cards chart details} +\usage{ +set_cards_details( + ., + mode = NULL, + carousel_channel_background = NULL, + carousel_bar_background = NULL, + carousel_channel_height = NULL, + autoplay_enabled = NULL, + autoplay_duration = NULL, + autoplay_loop = NULL, + autoplay_pause_when = NULL, + autoplay_btn_visible = NULL, + autoplay_btn_position = NULL, + autoplay_btn_size = NULL, + autoplay_btn_background = NULL, + autoplay_btn_opacity = NULL, + autoplay_btn_color = NULL, + card_layout = NULL, + card_order = NULL, + card_width_portrait = NULL, + card_width_landscape = NULL, + card_width_stretch = NULL, + card_width_stretch_percent = NULL, + card_padding_top = NULL, + card_padding_right = NULL, + card_padding_bottom = NULL, + card_padding_left = NULL, + card_horizontal_margin = NULL, + card_vertical_margin = NULL, + card_border_color = NULL, + card_border_width = NULL, + card_shape = NULL, + card_radius = NULL, + card_shadow = NULL, + card_shadow_color = NULL, + card_shadow_blur = NULL, + template_customise = NULL, + template_simple_custom = NULL, + content_vertical_align = NULL, + content_horizontal_padding = NULL, + title_color = NULL, + title_fontsize = NULL, + title_weight = NULL, + title_advanced = NULL, + title_opacity = NULL, + title_space_above = NULL, + title_space_below = NULL, + title_lineheight = NULL, + title_minheight = NULL, + title_align = NULL, + subtitle_color = NULL, + subtitle_fontsize = NULL, + subtitle_weight = NULL, + subtitle_advanced = NULL, + subtitle_opacity = NULL, + subtitle_space_above = NULL, + subtitle_space_below = NULL, + subtitle_lineheight = NULL, + subtitle_minheight = NULL, + subtitle_align = NULL, + text_color = NULL, + text_fontsize = NULL, + text_weight = NULL, + text_advanced = NULL, + text_opacity = NULL, + text_space_between = NULL, + text_lineheight = NULL, + text_minheight = NULL, + text_align = NULL, + text_column_names = NULL, + text_column_separator = NULL, + text_column_weight = NULL, + text_column_separator_custom = NULL, + image_width_portrait = NULL, + image_width_landscape = NULL, + image_aspect_ratio = NULL, + image_sizing = NULL, + image_horizontal_margin = NULL, + image_vertical_margin = NULL, + card_space_between = NULL, + image_border_color = NULL, + image_border_width = NULL, + image_shape = NULL, + image_radius = NULL, + image_styling = NULL, + image_opacity = NULL, + image_contrast = NULL, + image_brightness = NULL, + image_blend_mode = NULL, + image_blackwhite = NULL, + image_missing = NULL, + image_missing_icon = NULL, + card_background_mode = NULL, + card_background_color = NULL, + card_background_mode_category = NULL, + card_background_color_category = NULL, + image_background_mode = NULL, + image_background_color = NULL, + image_background_mode_category = NULL, + image_background_color_category = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_filter_mode = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_show_all = NULL, + filter_show_all_text = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + audio_click = NULL, + audio_animation = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{mode}{View mode. Choices: grid, carousel. Flourish type hint: string, defaults to \code{NULL}} + +\item{carousel_channel_background}{Channel color. Flourish type hint: color, defaults to \code{NULL}} + +\item{carousel_bar_background}{Bar color. Flourish type hint: color, defaults to \code{NULL}} + +\item{carousel_channel_height}{Channel height. Flourish type hint: number, defaults to \code{NULL}} + +\item{autoplay_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{autoplay_duration}{Duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{autoplay_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{autoplay_pause_when}{Pause on interaction. Choices: never, hover, popup, hover_popup. Flourish type hint: string, defaults to \code{NULL}} + +\item{autoplay_btn_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{autoplay_btn_position}{Position. Choices: top_left, top_right, bottom_left, bottom_right. Flourish type hint: string, defaults to \code{NULL}} + +\item{autoplay_btn_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{autoplay_btn_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{autoplay_btn_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{autoplay_btn_color}{Icon. Flourish type hint: color, defaults to \code{NULL}} + +\item{card_layout}{Card layout. Choices: portrait, landscape, absolute. Flourish type hint: string, defaults to \code{NULL}} + +\item{card_order}{Card structure. Choices: stack-default, stack-2, stack-3, stack-4. Flourish type hint: string, defaults to \code{NULL}} + +\item{card_width_portrait}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_width_landscape}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_width_stretch}{Stretch cards to fill. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{card_width_stretch_percent}{Stretch. How much the cards are allowed to scale up to fill the space, in \%. When too much stretch would be required, cards are scaled down to add a column to the grid. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_padding_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_padding_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_padding_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_padding_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_horizontal_margin}{Horizontal. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_vertical_margin}{Vertical. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_border_color}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{card_border_width}{Weight. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_shape}{Shape. Choices: circle, square. Flourish type hint: string, defaults to \code{NULL}} + +\item{card_radius}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_shadow}{Shadow behind card. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{card_shadow_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{card_shadow_blur}{Blur. Flourish type hint: number, defaults to \code{NULL}} + +\item{template_customise}{Customize card HTML. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{template_simple_custom}{Custom HTML. Custom HTML can be used for flippable cards, text on hover, embedded Flourish charts, etc. Refer to columns using \code{{{column_name}}} If a column name has spaces, wrap in square brackets, like \verb{\{\{column name\}\}} If a column includes HTML, prevent escaping HTML by wrapping in triple curly brackets. For example: \code{{{{column_name}}}} Use handlebar syntax for conditions, etc. Flourish type hint: html, defaults to \code{NULL}} + +\item{content_vertical_align}{Vertical position. Choices: center, flex-start, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_horizontal_padding}{Horizontal space. Flourish type hint: number, defaults to \code{NULL}} + +\item{title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{title_fontsize}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{title_weight}{Weight. Choices: italic, normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{title_advanced}{Advanced settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{title_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{title_space_above}{Space above. Flourish type hint: number, defaults to \code{NULL}} + +\item{title_space_below}{Space below. Flourish type hint: number, defaults to \code{NULL}} + +\item{title_lineheight}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{title_minheight}{Min height. Flourish type hint: number, defaults to \code{NULL}} + +\item{title_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{subtitle_fontsize}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{subtitle_weight}{Weight. Choices: italic, normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{subtitle_advanced}{Advanced settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{subtitle_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{subtitle_space_above}{Space above. Flourish type hint: number, defaults to \code{NULL}} + +\item{subtitle_space_below}{Space below. Flourish type hint: number, defaults to \code{NULL}} + +\item{subtitle_lineheight}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{subtitle_minheight}{Min height. Flourish type hint: number, defaults to \code{NULL}} + +\item{subtitle_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{text_fontsize}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{text_weight}{Weight. Choices: italic, normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_advanced}{Advanced settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{text_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{text_space_between}{Space between. Flourish type hint: number, defaults to \code{NULL}} + +\item{text_lineheight}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{text_minheight}{Min height. Flourish type hint: number, defaults to \code{NULL}} + +\item{text_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_column_names}{Column names. Choices: \code{TRUE}, \code{FALSE}. To add column names before text entries. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{text_column_separator}{Column separator. Choices: :, -, \verb{
    }, other. Choose a separator between column names and text entries. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_column_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_column_separator_custom}{Other. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_width_portrait}{Width. As a percentage of the cards width. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_width_landscape}{Width. As a percentage of the cards width. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_aspect_ratio}{Aspect ratio. As a multiplier of the images width. For example: a value of 2, means the image height is 2 times the image width. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_sizing}{Image sizing. Choices: cover, contain. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_horizontal_margin}{Horizontal. As a percentage of the cards width. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_vertical_margin}{Vertical. As a percentage of the cards width. Flourish type hint: number, defaults to \code{NULL}} + +\item{card_space_between}{Space between image and text. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{image_border_width}{Weight. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_shape}{Shape. Choices: circle, square. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_radius}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_styling}{Advanced image styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{image_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_contrast}{Contrast. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_brightness}{Brightness. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_blend_mode}{Blend mode. Choices: normal, lighten, darken, overlay, screen, multiply. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_blackwhite}{Black and white. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{image_missing}{Missing images. Choices: hide, icon. What to show when theres a missing image. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_missing_icon}{Missing icon. Flourish type hint: url, defaults to \code{NULL}} + +\item{card_background_mode}{Card. Choices: transparent, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{card_background_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{card_background_mode_category}{Card. Choices: data, transparent, fixed. Choose Data if you want to base the color on the Categories column in your dataset. Flourish type hint: string, defaults to \code{NULL}} + +\item{card_background_color_category}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{image_background_mode}{Image. Choices: transparent, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_background_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{image_background_mode_category}{Image. Choices: data, transparent, fixed. Choose Data if you want to base the color on the Categories column in your dataset. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_background_color_category}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{legend_filter_mode}{Filter on click. Choices: none, single, multi. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_controls_spacing}{Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_show_all}{Include "All". Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_show_all_text}{“All” label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{audio_click}{Click while playing should:. Choices: replay, stop, pause. Flourish type hint: string, defaults to \code{NULL}} + +\item{audio_animation}{Animate while playing audio. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_enabled}{Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_whitelist}{Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. \code{layout.background_color}. Flourish type hint: text, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set cards chart details +} +\examples{ +try( + flourish(chart_type = "cards", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_cards_data(gapminder) |> + set_cards_details() +) +} diff --git a/R_package/man/set_chord_diagram_details.Rd b/R_package/man/set_chord_diagram_details.Rd new file mode 100644 index 0000000..ffff62f --- /dev/null +++ b/R_package/man/set_chord_diagram_details.Rd @@ -0,0 +1,644 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_chord_diagram_details.R +\name{set_chord_diagram_details} +\alias{set_chord_diagram_details} +\title{Set chord diagram chart details} +\usage{ +set_chord_diagram_details( + ., + opacity_default = NULL, + opacity_focused = NULL, + opacity_defocused = NULL, + selected_chords = NULL, + use_mouseover_label = NULL, + show_selected_label = NULL, + chord_labels_reponsive = NULL, + chord_label_font_size = NULL, + chord_label_font_size_min = NULL, + chord_label_font_size_max = NULL, + show_chord_stroke = NULL, + chord_stroke_color = NULL, + chord_stroke_opacity = NULL, + arc_thickness = NULL, + arc_spacing = NULL, + pad_angle = NULL, + label_alignment = NULL, + label_responsive = NULL, + label_font_size = NULL, + label_font_size_min = NULL, + label_font_size_max = NULL, + label_color = NULL, + use_label_color_arc = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + gradient_type = NULL, + chart_popup_show_popups = NULL, + chart_popup_is_custom = NULL, + chart_popup_custom_template = NULL, + chart_popup_show_pointer = NULL, + chart_popup_show_shadow = NULL, + chart_popup_style_popups = NULL, + chart_popup_text_color = NULL, + chart_popup_align = NULL, + chart_popup_text_size = NULL, + chart_popup_fill_color = NULL, + chart_popup_opacity = NULL, + chart_popup_padding = NULL, + chart_popup_border_radius = NULL, + chart_popup_max_width = NULL, + popup_type = NULL, + popup_content = NULL, + animation_speed = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_label_number_date_format_prefix = NULL, + chart_label_number_date_format_suffix = NULL, + chart_label_number_date_format_n_dec = NULL, + chart_label_number_date_format_advanced = NULL, + chart_label_number_date_format_negative_sign = NULL, + chart_label_number_date_format_strip_zeros = NULL, + chart_label_number_date_format_strip_separator = NULL, + chart_label_number_date_format_transform_labels = NULL, + chart_label_number_date_format_transform = NULL, + chart_label_number_date_format_multiply_divide_constant = NULL, + chart_label_number_date_format_exponentiate_constant = NULL, + chart_scale = NULL, + allow_resize = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{opacity_default}{Default opacity. Opacity for the default view. Flourish type hint: number, defaults to \code{NULL}} + +\item{opacity_focused}{Focused opacity. Opacity for the selected and/or hovered chords. Flourish type hint: number, defaults to \code{NULL}} + +\item{opacity_defocused}{Defocused opacity. Opacity for the background chords when one is in focus. Flourish type hint: number, defaults to \code{NULL}} + +\item{selected_chords}{Highlight chords. You can highlight all of an arcs chords by typing the name of the arc. Alternatively, you can highlight individual chords by typing the name of the two arcs that it connects using the format: Arc 1 >> Arc 2 If you wanted to highlight all chords from "Arc 3" and any chords between "Arc 1" and "Arc 2" you would write: Arc 3 Arc 1 >> Arc 2 If you wish to highlight/unhighlight in the story editor you can do so by clicking on chords. Flourish type hint: text, defaults to \code{NULL}} + +\item{use_mouseover_label}{Show chord values on hover. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{show_selected_label}{Keep chord values on click. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chord_labels_reponsive}{Label text size. Choices: \code{TRUE}, \code{FALSE}. Auto changes the label size based on the window size, subject to the specified min and max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chord_label_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chord_label_font_size_min}{Min size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chord_label_font_size_max}{Max size. Flourish type hint: number, defaults to \code{NULL}} + +\item{show_chord_stroke}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chord_stroke_color}{Stroke color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chord_stroke_opacity}{Stroke opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{arc_thickness}{Thickness. As a percentage of the radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{arc_spacing}{Space below. As a percentage of the radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{pad_angle}{Space between. In degrees. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_alignment}{Alignment. Choices: along_arcs, 90_rotated. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_responsive}{Label text size. Choices: \code{TRUE}, \code{FALSE}. Auto changes the label size based on the window size, subject to the specified min and max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_font_size_min}{Min size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_font_size_max}{Max size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_color}{Label color. Flourish type hint: color, defaults to \code{NULL}} + +\item{use_label_color_arc}{Make the arc label color the same as the arc color. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{gradient_type}{Chord color mode. Choices: linear_gradient, largest_end, smallest_end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_show_popups}{Popups. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_is_custom}{Popup contents. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_custom_template}{Popup content. The text to appear in the popup. You can use \code{{{column_name}}} to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_show_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_style_popups}{Custom styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_text_color}{Text colour. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_text_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_fill_color}{Fill colour. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_border_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{popup_type}{Position. Choices: directional, non_directional. Flourish type hint: string, defaults to \code{NULL}} + +\item{popup_content}{Popup description. Add a title or a discription to help explain your tooltip. Flourish type hint: text, defaults to \code{NULL}} + +\item{animation_speed}{Animation duration. The duration, in seconds, of transitions for example between two slides in a story Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_localization_input_decimal_separator}{Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_output_separators}{Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_label_number_date_format_prefix}{Prefix. Text to place in front of number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_label_number_date_format_suffix}{Suffix. Text to place after number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_label_number_date_format_n_dec}{Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_label_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_label_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_label_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_label_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_label_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_label_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_label_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_label_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_scale}{Chart scale. Flourish type hint: number, defaults to \code{NULL}} + +\item{allow_resize}{Allow embeds to resize. Checking this option allows the visualization to resize so the chord diagram is always a square without white space to the sides or top/bottom. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set chord diagram chart details +} +\examples{ +try( + flourish(chart_type = "chord_diagram", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_chord_diagram_data(gapminder) |> + set_chord_diagram_details() +) +} diff --git a/R_package/man/set_countdown_details.Rd b/R_package/man/set_countdown_details.Rd new file mode 100644 index 0000000..d434d94 --- /dev/null +++ b/R_package/man/set_countdown_details.Rd @@ -0,0 +1,436 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_countdown_details.R +\name{set_countdown_details} +\alias{set_countdown_details} +\title{Set countdown chart details} +\usage{ +set_countdown_details( + ., + date_day = NULL, + date_month = NULL, + date_year = NULL, + date_hour = NULL, + date_minute = NULL, + date_second = NULL, + before_content_mode = NULL, + before_content_custom = NULL, + after_content_mode = NULL, + after_content_custom = NULL, + countdown_size = NULL, + countdown_color = NULL, + countdown_weight = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{date_day}{Day. Flourish type hint: number, defaults to \code{NULL}} + +\item{date_month}{Month. Flourish type hint: number, defaults to \code{NULL}} + +\item{date_year}{Year. If your date is in the future, the tool will count down to it If its in the past, the tool will count up, showing the number of days that have passed since the date. Flourish type hint: number, defaults to \code{NULL}} + +\item{date_hour}{Hour. 0 to 23. Flourish type hint: number, defaults to \code{NULL}} + +\item{date_minute}{Minute. Flourish type hint: number, defaults to \code{NULL}} + +\item{date_second}{Second. Flourish type hint: number, defaults to \code{NULL}} + +\item{before_content_mode}{Text mode. Choices: auto, custom. Displays while counting down to the specified time/date. Flourish type hint: string, defaults to \code{NULL}} + +\item{before_content_custom}{Custom text before date/time reached. Can include any text or HTML Use \code{{{d}}} for days, \code{{{h}}} for hours, \code{{{m}}} for minutes and \code{{{s}}} for seconds. Flourish type hint: text, defaults to \code{NULL}} + +\item{after_content_mode}{Text mode. Choices: auto, custom. Displays while counting upwards after the specified time/date. Flourish type hint: string, defaults to \code{NULL}} + +\item{after_content_custom}{Custom text after date/time reached. Can include any text or HTML Use \code{{{d}}} for days, \code{{{h}}} for hours, \code{{{m}}} for minutes and \code{{{s}}} for seconds. Flourish type hint: text, defaults to \code{NULL}} + +\item{countdown_size}{Size. Measured in vw (percentage of view window). This makes sure the countdown always scales with the page. Flourish type hint: number, defaults to \code{NULL}} + +\item{countdown_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{countdown_weight}{Weight. Choices: 400, 600. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set countdown chart details +} +\examples{ +try( + flourish(chart_type = "countdown", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + set_countdown_details() +) +} diff --git a/R_package/man/set_draw_the_line_details.Rd b/R_package/man/set_draw_the_line_details.Rd new file mode 100644 index 0000000..44201f8 --- /dev/null +++ b/R_package/man/set_draw_the_line_details.Rd @@ -0,0 +1,986 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_draw_the_line_details.R +\name{set_draw_the_line_details} +\alias{set_draw_the_line_details} +\title{Set draw the line chart chart details} +\usage{ +set_draw_the_line_details( + ., + guess_lines_start = NULL, + guess_lines_width = NULL, + guess_lines_dot_radius = NULL, + guess_lines_dash = NULL, + fixed_lines_width = NULL, + fixed_lines_dot_radius = NULL, + line_curve = NULL, + guess_lines_panel_position = NULL, + message_styling = NULL, + message_background = NULL, + message_opacity = NULL, + message_color = NULL, + message_font_size = NULL, + message_border = NULL, + message_border_width = NULL, + message_border_radius = NULL, + message_shadow = NULL, + guess_lines_message_text = NULL, + scores_3_min = NULL, + scores_3_text = NULL, + scores_2_min = NULL, + scores_2_text = NULL, + scores_1_min = NULL, + scores_1_text = NULL, + scores_0_text = NULL, + guess_lines_submit_text = NULL, + submit_styling = NULL, + submit_background = NULL, + submit_opacity = NULL, + submit_color = NULL, + submit_font_size = NULL, + submit_border = NULL, + submit_border_width = NULL, + submit_border_radius = NULL, + submit_shadow = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + chart_background_background_color_enabled = NULL, + chart_background_background_image_enabled = NULL, + chart_background_background_color = NULL, + chart_background_background_image_src = NULL, + chart_background_background_image_size = NULL, + chart_background_background_image_position = NULL, + datetime_input_format = NULL, + date_format = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{guess_lines_start}{Percent to reveal. What percentage of the line to show before a user starts drawing. Flourish type hint: number, defaults to \code{NULL}} + +\item{guess_lines_width}{Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{guess_lines_dot_radius}{Dot radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{guess_lines_dash}{Drawing dash size. Only applies to the drawn section of the line. Set to zero for a solid line. Flourish type hint: number, defaults to \code{NULL}} + +\item{fixed_lines_width}{Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{fixed_lines_dot_radius}{Dot radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_curve}{Live curve. Choices: linear, step, curve. Flourish type hint: string, defaults to \code{NULL}} + +\item{guess_lines_panel_position}{Position. Choices: top, middle, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{message_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{message_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{message_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{message_color}{Font color. Flourish type hint: color, defaults to \code{NULL}} + +\item{message_font_size}{Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{message_border}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{message_border_width}{Border width. In pixels. Flourish type hint: number, defaults to \code{NULL}} + +\item{message_border_radius}{Border radius. In rems, a multiple of the panels font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{message_shadow}{Drop shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{guess_lines_message_text}{Text. Include \code{{{LINE}}} to show the lines name, in color. Flourish type hint: string, defaults to \code{NULL}} + +\item{scores_3_min}{\% error. Specified as the maximum percentage error allowed, relative to the total Y axis. Flourish type hint: number, defaults to \code{NULL}} + +\item{scores_3_text}{Text. Use \code{{{DIFF}}} to show the average gap from the users guess to the real data point. Flourish type hint: string, defaults to \code{NULL}} + +\item{scores_2_min}{\% error. Specified as the maximum percentage error allowed, relative to the total Y axis. Flourish type hint: number, defaults to \code{NULL}} + +\item{scores_2_text}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{scores_1_min}{\% error. Specified as the maximum percentage error allowed, relative to the total Y axis. Flourish type hint: number, defaults to \code{NULL}} + +\item{scores_1_text}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{scores_0_text}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{guess_lines_submit_text}{Text. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to \code{NULL}} + +\item{submit_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{submit_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{submit_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_color}{Font color. Flourish type hint: color, defaults to \code{NULL}} + +\item{submit_font_size}{Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_border}{Border colour. Flourish type hint: color, defaults to \code{NULL}} + +\item{submit_border_width}{Border width. In pixels. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_border_radius}{Border radius. In ems a multiple of the panels font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{submit_shadow}{Drop shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_axis_position}{Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_y_axis_position}{Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_zero_axis}{Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_position}{Position. Choices: default, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_side}{Tick side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_axis_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_zero_axis}{Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_title_position}{Position. Choices: side, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_position}{Position. Choices: default, above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_side}{Side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_background_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_background_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_background_background_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_background_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_background_background_image_size}{Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_background_background_image_position}{Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to \code{NULL}} + +\item{datetime_input_format}{Format in data sheet. Choices: auto, \%Y-\%m-\%dT\%H:\%M:\%S.\%LZ, \%Y-\%m-\%d, \%m/\%d/\%Y, \%d/\%m/\%Y, \%d-\%b-\%y, \%m/\%Y, \%m/\%y, \%b \%Y, \%b \%y, \%B \%d, \%d \%b, \%Y, \%y, \%B, \%b, \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M. The date/time format in the datasheet. Leave as Auto for Flourish to make a best guess. If it isnt in the list, you can enter a custom format using d3-time-format syntax. See NPM d3-data-format for details. Flourish type hint: string, defaults to \code{NULL}} + +\item{date_format}{Display format. Choices: auto, \%Y-\%m-\%dT\%H:\%M:\%S.\%LZ, \%Y-\%m-\%d, \%m/\%d/\%Y, \%d/\%m/\%Y, \%d-\%b-\%y, \%m/\%Y, \%m/\%y, \%b \%Y, \%b \%y, \%B \%d, \%d \%b, \%Y, \%y, \%B, \%b, \%A, \%a, \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M. The date/time format to show in the graphic. If it isnt in the list, you can enter a custom format using d3-time-format syntax. See NPM d3-data-format for details. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_input_decimal_separator}{Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_output_separators}{Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set draw the line chart chart details +} +\examples{ +try( + flourish(chart_type = "draw_the_line", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_draw_the_line_data(gapminder) |> + set_draw_the_line_details() +) +} diff --git a/R_package/man/set_election_results_chart_details.Rd b/R_package/man/set_election_results_chart_details.Rd new file mode 100644 index 0000000..6365535 --- /dev/null +++ b/R_package/man/set_election_results_chart_details.Rd @@ -0,0 +1,917 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_election_results_chart_details.R +\name{set_election_results_chart_details} +\alias{set_election_results_chart_details} +\title{Set election results chart chart details} +\usage{ +set_election_results_chart_details( + ., + bar_height = NULL, + bar_background = NULL, + show_party_name = NULL, + label_font_size = NULL, + label_font_color = NULL, + use_custom_scale = NULL, + custom_scale_max = NULL, + middle_line_position = NULL, + middle_line_content = NULL, + middle_line_text_color = NULL, + middle_line_dashoffset = NULL, + middle_line_width = NULL, + middle_line_color = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + legend_position = NULL, + hide_empty_legend_items = NULL, + placeholder_text = NULL, + subtitle_text = NULL, + value_change_abbreviation = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_label_number_date_format_prefix = NULL, + chart_label_number_date_format_suffix = NULL, + chart_label_number_date_format_n_dec = NULL, + chart_label_number_date_format_advanced = NULL, + chart_label_number_date_format_negative_sign = NULL, + chart_label_number_date_format_strip_zeros = NULL, + chart_label_number_date_format_strip_separator = NULL, + chart_label_number_date_format_transform_labels = NULL, + chart_label_number_date_format_transform = NULL, + chart_label_number_date_format_multiply_divide_constant = NULL, + chart_label_number_date_format_exponentiate_constant = NULL, + label_suffix = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{bar_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_background}{Background. Background color of part of chart thats not filled with data (ie. when filtering parties). Flourish type hint: color, defaults to \code{NULL}} + +\item{show_party_name}{Show party name. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{use_custom_scale}{Scale type. Choices: \code{FALSE}, \code{TRUE}. On default, will use the sum of all data points as the max value. Enable this setting to use a custom value. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{custom_scale_max}{Max value for scale. This will set the maximum value of the scale. Eg. the total amount of seats to be won in an election. Flourish type hint: number, defaults to \code{NULL}} + +\item{middle_line_position}{Position. Flourish type hint: number, defaults to \code{NULL}} + +\item{middle_line_content}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{middle_line_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{middle_line_dashoffset}{Dash width and offset. Length of dashes and spaces seperated by a comma for example, 2,2. Measured in pixels. Flourish type hint: string, defaults to \code{NULL}} + +\item{middle_line_width}{Thickness. Flourish type hint: number, defaults to \code{NULL}} + +\item{middle_line_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_controls_spacing}{Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{legend_position}{Position. Choices: below, above. Flourish type hint: string, defaults to \code{NULL}} + +\item{hide_empty_legend_items}{Hide zero-valued entries. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{placeholder_text}{No data placeholder text. Placeholder text if there is no data. Flourish type hint: string, defaults to \code{NULL}} + +\item{subtitle_text}{Text below results. Flourish type hint: string, defaults to \code{NULL}} + +\item{value_change_abbreviation}{Value change abbreviation. A suffix used to describe the change since the previous election. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. You can use various keywords to add informtion to custom popups. These include: \code{{{PARTY}}} : name of the party \code{{{CURRENT}}} : current value \code{{{HISTORICAL}}} : historical value \code{{{CHANGE}}} : change between the current and historical values Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. You can use various keywords to add informtion to custom popups. These include: \code{{{PARTY}}} : name of the party \code{{{CURRENT}}} : current value \code{{{HISTORICAL}}} : historical value \code{{{CHANGE}}} : change between the current and historical values Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_label_number_date_format_prefix}{Prefix. Text to place in front of number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_label_number_date_format_suffix}{Suffix. Text to place after number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_label_number_date_format_n_dec}{Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_label_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_label_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_label_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_label_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_label_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_label_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_label_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_label_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{label_suffix}{Historical label suffix. Suffix used to compare current and historical results. For example, "\%" when data measures vote shares, or "seats" when data measures seats won. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_input_decimal_separator}{Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_output_separators}{Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_enabled}{Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_whitelist}{Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. \code{layout.background_color}. Flourish type hint: text, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set election results chart chart details +} +\examples{ +try( + flourish(chart_type = "election_results", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_election_results_chart_data(gapminder) |> + set_election_results_chart_details() +) +} diff --git a/R_package/man/set_gantt_details.Rd b/R_package/man/set_gantt_details.Rd new file mode 100644 index 0000000..35fc078 --- /dev/null +++ b/R_package/man/set_gantt_details.Rd @@ -0,0 +1,1199 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_gantt_details.R +\name{set_gantt_details} +\alias{set_gantt_details} +\title{Set gantt chart chart details} +\usage{ +set_gantt_details( + ., + gantt_height = NULL, + gantt_padding = NULL, + border_radius = NULL, + border_width = NULL, + border_color = NULL, + gantt_progress = NULL, + gantt_text = NULL, + gantt_font_size = NULL, + gantt_text_color = NULL, + gantt_font_weight = NULL, + missing_value_label = NULL, + scale_type = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + color_single = NULL, + chart_background_color = NULL, + chart_background_opacity = NULL, + chart_background_panels = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + date_format = NULL, + format_locale = NULL, + format_weekday = NULL, + format_year = NULL, + format_month = NULL, + format_day = NULL, + format_hour = NULL, + format_minute = NULL, + y_font_size = NULL, + y_font_weight = NULL, + y_font_fill = NULL, + y_max_width = NULL, + y_text_dx = NULL, + y_text_dy = NULL, + y_gridline_color = NULL, + y_gridline_width = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_control_all = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_continous_legend_show_legend = NULL, + chart_continous_legend_title_mode = NULL, + chart_continous_legend_title = NULL, + chart_continous_legend_color_band_width = NULL, + chart_continous_legend_color_band_height = NULL, + chart_continous_legend_color_band_radius = NULL, + chart_continous_legend_binned_label_mode = NULL, + chart_continous_legend_binned_label_custom = NULL, + chart_continous_legend_legend_min = NULL, + chart_continous_legend_additional_min_label = NULL, + chart_continous_legend_legend_max = NULL, + chart_continous_legend_additional_max_label = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_axes_highlights_x_enabled = NULL, + chart_axes_highlights_x_lines = NULL, + chart_axes_highlights_x_line_color = NULL, + chart_axes_highlights_x_line_width = NULL, + chart_axes_highlights_x_line_dash = NULL, + chart_axes_highlights_x_areas = NULL, + chart_axes_highlights_x_area_color = NULL, + chart_axes_highlights_x_area_opacity = NULL, + chart_axes_highlights_x_area_texture = NULL, + chart_axes_highlights_x_label_vertical = NULL, + chart_axes_highlights_x_label_y_position = NULL, + chart_axes_highlights_x_label_x_position = NULL, + chart_axes_highlights_x_label_max_width = NULL, + chart_axes_highlights_x_font_size = NULL, + chart_axes_highlights_x_font_weight = NULL, + chart_axes_highlights_x_label_color = NULL, + chart_axes_highlights_x_shadow_color = NULL, + chart_axes_highlights_x_shadow_enabled = NULL, + chart_axes_highlights_y_enabled = NULL, + chart_axes_highlights_y_lines = NULL, + chart_axes_highlights_y_line_color = NULL, + chart_axes_highlights_y_line_width = NULL, + chart_axes_highlights_y_line_dash = NULL, + chart_axes_highlights_y_areas = NULL, + chart_axes_highlights_y_area_color = NULL, + chart_axes_highlights_y_area_opacity = NULL, + chart_axes_highlights_y_area_texture = NULL, + chart_axes_highlights_y_label_x_position = NULL, + chart_axes_highlights_y_label_y_position = NULL, + chart_axes_highlights_y_label_max_width = NULL, + chart_axes_highlights_y_font_size = NULL, + chart_axes_highlights_y_font_weight = NULL, + chart_axes_highlights_y_label_color = NULL, + chart_axes_highlights_y_shadow_color = NULL, + chart_axes_highlights_y_shadow_enabled = NULL, + animation_duration = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{gantt_height}{Height. Choose the height of each bar in rems (i.e. it will scale up and down in relation to screen size). Flourish type hint: number, defaults to \code{NULL}} + +\item{gantt_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{border_radius}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{border_color}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{gantt_progress}{Show progress. Choices: \code{TRUE}, \code{FALSE}. If enabled, each bar will be filled with an overlay relating to the value supplied in the Progress column. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{gantt_text}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{gantt_font_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{gantt_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{gantt_font_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{missing_value_label}{Label for missing values. If a bar dosent have a category, the legend will show the placeholder value.. Flourish type hint: string, defaults to \code{NULL}} + +\item{scale_type}{Scale type. Choices: categorical, numeric. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{color_single}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_background_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_background_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_background_panels}{Area. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_axis_position}{Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_y_axis_position}{Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_zero_axis}{Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_position}{Position. Choices: default, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_side}{Tick side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{date_format}{Format in data sheet. Choices: auto, \%Y-\%m-\%dT\%H:\%M:\%S.\%LZ, \%Y-\%m-\%d, \%m/\%d/\%Y, \%d/\%m/\%Y, \%d-\%b-\%y, \%m/\%Y, \%b \%Y, \%b \%y, \%B \%d, \%d \%b, \%Y, \%B, \%b, \%A, \%a, \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M. The date/time format in your datasheet. If it isnt in the list, you can enter a custom format using d3-time-format syntax. See npm - d3 time format for details. Flourish type hint: string, defaults to \code{NULL}} + +\item{format_locale}{Date and time locale. Choices: none, ady, af-_n_a, af-_z_a, af, ak, ar-_m_a, ar-_s_a, hy-_a_m, ay-_b_o, eu-_e_s, be-_b_y, bn-_b_d, bn-_i_n, bn, bs-_b_a, my, ck-_u_s, zh-_c_n, zh-_s_g, zh-_hans, zh-_h_k, zh-_t_w, zh-_hant, zh, gx-_g_r, nl-_b_e, nl-_n_l, nl, en-_a_u, en-_c_a, en-_i_n, en-_i_e, en@pirate, en-_z_a, en-_g_b, en-_u_d, en-_u_s, en, eo-_e_o, et-_e_e, fo-_f_o, fi-_f_i, fr-_b_e, fr-_c_a, fr-_f_r, fr-_c_h, fr, fy-_n_l, ff, gl-_e_s, ka-_g_e, de-_a_t, de-_d_e, de-_c_h, de, el-_g_r, el, gn-_p_y, gu-_i_n, ht, is-_i_s, is, ga-_i_e, ga, jv-_i_d, kab, kn-_i_n, kn, cak, kk-_k_z, tlh, ko-_k_r, ko, ku-_t_r, fb-_l_t, li-_n_l, dsb, lb, mk-_m_k, mk, mai, mg-_m_g, mn-_m_n, se-_n_o, nn-_n_o, no, oc, or-_i_n, ps-_a_f, i_r, pt-_b_r, pt-_p_t, pt, pa-_i_n, pa, qu-_p_e, rm-_c_h, sa-_i_n, sr-_r_s, sr, si-_l_k, sk-_s_k, sk, so-_s_o, es-_a_r, es-_c_l, es-_c_o, es-_e_c, es-_m_x, es-_n_i, es-_e_s, es-_u_s, es-_v_e, es, su, sw-_k_e, sw, tt-_r_u, th-_t_h, th, hsb, xh-_z_a, yi-_d_e, yi, zu-_z_a. The regional date/time format ( date locale ). You can specify each part of the format in the fields below. Flourish type hint: string, defaults to \code{NULL}} + +\item{format_weekday}{Weekday. Choices: none, narrow, short, long. Flourish type hint: string, defaults to \code{NULL}} + +\item{format_year}{Year. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to \code{NULL}} + +\item{format_month}{Month. Choices: none, numeric, 2-digit, narrow, short, long. Flourish type hint: string, defaults to \code{NULL}} + +\item{format_day}{Day. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to \code{NULL}} + +\item{format_hour}{Hour. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to \code{NULL}} + +\item{format_minute}{Minute. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to \code{NULL}} + +\item{y_font_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{y_font_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{y_font_fill}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{y_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{y_text_dx}{Horizontal padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{y_text_dy}{Vertical padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{y_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{y_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_control_all}{Name for "All". Leave blank to not include an "All" option. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_controls_spacing}{Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_show_legend}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_continous_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_color_band_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_continous_legend_color_band_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_continous_legend_color_band_radius}{Roundness. The radius of the corners of the color band (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_continous_legend_binned_label_mode}{Binned label mode. Choices: thresholds, centers, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_binned_label_custom}{Custom bin labels. List numeric values, separated by semi-colons. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_legend_min}{Legend min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_continous_legend_additional_min_label}{Custom min label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_legend_max}{Legend max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_continous_legend_additional_max_label}{Custom max label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_enabled}{Show highlights on the x axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_lines}{One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: \verb{My label :: 2012 :: line_color / text_color :: facet_name}. For example, \verb{My label :: 2012 :: #eb0000 / #0084bd :: Category 1}. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_dash}{Dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_areas}{One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, \verb{My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_color}{Area. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_opacity}{Area opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_texture}{Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_vertical}{Vertical. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_y_position}{Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_x_position}{X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_font_weight}{Font weight. Choices: regular, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_shadow_color}{Shadow. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_shadow_enabled}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_enabled}{Show highlights on the y axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_lines}{One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: \verb{My label :: 2012 :: line_color / text_color :: facet_name}. For example: \verb{My label :: 2012 :: #eb0000 / #0084bd :: Category 1}. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_width}{line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_dash}{Dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_areas}{One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: \verb{My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_color}{Area. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_opacity}{Area opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_texture}{Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_x_position}{X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_y_position}{Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_font_weight}{Font weight. Choices: regular, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_shadow_color}{Shadow. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_shadow_enabled}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{animation_duration}{Animation duration. The duration, in seconds, of transitions for example, on load of visualization or between two slides in a story Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set gantt chart chart details +} +\examples{ +try( + flourish(chart_type = "gantt", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_gantt_data(gapminder) |> + set_gantt_details() +) +} diff --git a/R_package/man/set_gauge_details.Rd b/R_package/man/set_gauge_details.Rd new file mode 100644 index 0000000..273c974 --- /dev/null +++ b/R_package/man/set_gauge_details.Rd @@ -0,0 +1,971 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_gauge_details.R +\name{set_gauge_details} +\alias{set_gauge_details} +\title{Set gauge chart details} +\usage{ +set_gauge_details( + ., + gauge_radial_extent = NULL, + gauge_radial_extent_custom = NULL, + gauge_width = NULL, + gauge_width_custom = NULL, + gauge_scale_domain = NULL, + gauge_scale_domain_min = NULL, + gauge_scale_domain_max = NULL, + gauge_color = NULL, + gauge_opacity = NULL, + gauge_border_color = NULL, + gauge_border_size = NULL, + height_mode = NULL, + aspect_ratio = NULL, + aspect_ratio_custom = NULL, + add_aspect_ratio_mobile = NULL, + breakpoint = NULL, + aspect_ratio_mobile = NULL, + aspect_ratio_mobile_custom = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + segment_width = NULL, + segment_width_custom = NULL, + segment_number = NULL, + segment_fixed_number = NULL, + segment_custom = NULL, + segment_labels = NULL, + segment_label_size = NULL, + segment_label_size_custom = NULL, + segment_label_weight = NULL, + segment_label_rotation = NULL, + segment_label_color = NULL, + segment_label_padding = NULL, + color_type = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + ticks_mode = NULL, + ticks_number = NULL, + ticks_custom = NULL, + ticks_width = NULL, + ticks_color = NULL, + ticks_length = NULL, + ticks_length_custom = NULL, + ticks_animation = NULL, + ticks_animation_duration = NULL, + intermediate_ticks = NULL, + intermediate_ticks_number = NULL, + intermediate_ticks_width = NULL, + ticks_direction = NULL, + label_position = NULL, + ticks_label_padding = NULL, + ticks_label_color = NULL, + label_rotation = NULL, + label_flip = NULL, + ticks_label_size = NULL, + ticks_label_size_custom = NULL, + ticks_label_weight = NULL, + needle_size = NULL, + needle_size_custom = NULL, + needle_hand_length = NULL, + needle_hand_length_custom = NULL, + needle_color = NULL, + needle_color_custom = NULL, + needle_centre_size = NULL, + needle_centre_size_custom = NULL, + needle_centre_stroke_width = NULL, + needle_centre_stroke = NULL, + needle_animation = NULL, + needle_animation_duration = NULL, + jitter = NULL, + jitter_speed = NULL, + gauge_text_align = NULL, + gauge_text_position = NULL, + gauge_text_position_flip = NULL, + gauge_name_size = NULL, + gauge_name_size_custom = NULL, + gauge_name_styling = NULL, + gauge_name_weight = NULL, + gauge_name_color = NULL, + gauge_name_color_custom = NULL, + gauge_name_space_above = NULL, + gauge_name_space_above_custom = NULL, + gauge_name_space_below = NULL, + gauge_name_space_below_custom = NULL, + gauge_value_size = NULL, + gauge_value_size_custom = NULL, + gauge_value_styling = NULL, + gauge_value_weight = NULL, + gauge_value_color = NULL, + gauge_value_color_custom = NULL, + gauge_value_space_above = NULL, + gauge_value_space_above_custom = NULL, + gauge_value_space_below = NULL, + gauge_value_space_below_custom = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{gauge_radial_extent}{Shape. Choices: 90, 180, 270, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_radial_extent_custom}{Angle. Flourish type hint: number, defaults to \code{NULL}} + +\item{gauge_width}{Inner radius. Choices: 1, 0.75, 0.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_width_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{gauge_scale_domain}{Range. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_scale_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{gauge_scale_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{gauge_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{gauge_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{gauge_border_color}{Border. Flourish type hint: color, defaults to \code{NULL}} + +\item{gauge_border_size}{Border size. Flourish type hint: number, defaults to \code{NULL}} + +\item{height_mode}{Height mode. Choices: auto, standard, aspect. Auto: sets the height based on the chart type, data and width. Standard: default Flourish responsive sizing. Aspect ratio: sets the aspect of each plot. This setting is ignored when embedded in a fixed-height context, such as a simple Iframe embedFlourish type hint: string, defaults to \code{NULL}} + +\item{aspect_ratio}{Aspect ratio. Choices: 0.75, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{aspect_ratio_custom}{Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{add_aspect_ratio_mobile}{Mobile aspect ratio. Choices: disabled, enabled. Flourish type hint: string, defaults to \code{NULL}} + +\item{breakpoint}{Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to \code{NULL}} + +\item{aspect_ratio_mobile}{Mobile aspect ratio. Choices: 0.75, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{aspect_ratio_mobile_custom}{Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_columns_fixed}{Grid mode. Choices: \code{FALSE}, \code{TRUE}. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_columns}{Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width}{Min gauge width. Determines the minimum size (in pixels) at which each gauge will appear. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width_fixed}{Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_custom_grid}{Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_custom_positions}{Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_facet_max_width}{Max gauge width. Determines the maximum size (in pixels) at which each gauge will appear. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_w}{Horizontal margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_h}{Vertical margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_animation}{On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_titles}{Show titles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_title_align}{Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_size}{Size. Relative to the width of the chart. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_unit}{Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_padding_top}{Space above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_padding_bottom}{Space below. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_bg}{Background. Choices: none, full, text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_bg_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_bg_padding}{Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to \code{NULL}} + +\item{segment_width}{Size. Choices: 0.1, 0.2, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{segment_width_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{segment_number}{Number. Choices: auto, fixed, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{segment_fixed_number}{Number. Flourish type hint: number, defaults to \code{NULL}} + +\item{segment_custom}{Two values per line in the following format 0 :: 5. Flourish type hint: text, defaults to \code{NULL}} + +\item{segment_labels}{One label per line. If the number of segments is Fixed, labels will be added to each segment according to the order they appear in the gauge. If the number of segments is Custom, labels will be added to each segment according to the order in the custom segments have been inputted. Flourish type hint: text, defaults to \code{NULL}} + +\item{segment_label_size}{Size. Choices: auto, 0.8, 1, 1.2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to \code{NULL}} + +\item{segment_label_size_custom}{Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{segment_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{segment_label_rotation}{Rotation. Choices: none, ring. Flourish type hint: string, defaults to \code{NULL}} + +\item{segment_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{segment_label_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{color_type}{Choices: categorical, numeric. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{ticks_mode}{Mode. Choices: none, auto, number, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{ticks_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{ticks_custom}{One tick value per line. Flourish type hint: text, defaults to \code{NULL}} + +\item{ticks_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{ticks_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{ticks_length}{Size. Choices: 0.1, 0.2, 0.3, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{ticks_length_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{ticks_animation}{Animation. Choices: disabled, enabled. Flourish type hint: string, defaults to \code{NULL}} + +\item{ticks_animation_duration}{Duration. The duration, in seconds, of the transitions for example, between two slides in a story Flourish type hint: number, defaults to \code{NULL}} + +\item{intermediate_ticks}{Intermediate ticks. Choices: off, on. Flourish type hint: string, defaults to \code{NULL}} + +\item{intermediate_ticks_number}{Number. Approximate number of intermediate ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{intermediate_ticks_width}{Size. As a proportion of the tick size. Flourish type hint: number, defaults to \code{NULL}} + +\item{ticks_direction}{Direction. Choices: inwards, outwards. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_position}{Position. Choices: inside, outside. Flourish type hint: string, defaults to \code{NULL}} + +\item{ticks_label_padding}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{ticks_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{label_rotation}{Rotation. Choices: none, auto, ring. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_flip}{Auto flip. Automatically flip when labels become less legible. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{ticks_label_size}{Size. Choices: 1, 1.5, 2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to \code{NULL}} + +\item{ticks_label_size_custom}{Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{ticks_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{needle_size}{Size. Choices: 0.03, 0.06, 0.09, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{needle_size_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{needle_hand_length}{Length. Choices: 0.5, 0.75, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{needle_hand_length_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{needle_color}{Color. Choices: gauge, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{needle_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{needle_centre_size}{Size. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{needle_centre_size_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{needle_centre_stroke_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{needle_centre_stroke}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{needle_animation}{Animation. Choices: disabled, enabled. Flourish type hint: string, defaults to \code{NULL}} + +\item{needle_animation_duration}{Duration. The duration, in seconds, of the transitions for example, between two slides in a story Flourish type hint: number, defaults to \code{NULL}} + +\item{jitter}{Amplitude. Choices: none, low, medium, high. Sets how much the gauge needle moves when it animates up and down. To turn off the animation click NoneFlourish type hint: string, defaults to \code{NULL}} + +\item{jitter_speed}{Speed. Flourish type hint: number, defaults to \code{NULL}} + +\item{gauge_text_align}{Alignment. Choices: start, middle, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_text_position}{Position. Choices: above, below, split. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_text_position_flip}{Flip order. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{gauge_name_size}{Size. Choices: 1, 1.5, 2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_name_size_custom}{Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{gauge_name_styling}{Change styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{gauge_name_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_name_color}{Color. Choices: gauge, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_name_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{gauge_name_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_name_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{gauge_name_space_below}{Space below. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_name_space_below_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{gauge_value_size}{Size. Choices: 1, 1.5, 2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_value_size_custom}{Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{gauge_value_styling}{Change styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{gauge_value_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_value_color}{Color. Choices: gauge, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_value_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{gauge_value_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_value_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{gauge_value_space_below}{Space below. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{gauge_value_space_below_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_controls_spacing}{Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set gauge chart details +} +\examples{ +try( + flourish(chart_type = "gauge", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_gauge_data(gapminder) |> + set_gauge_details() +) +} diff --git a/R_package/man/set_hierarchy_details.Rd b/R_package/man/set_hierarchy_details.Rd new file mode 100644 index 0000000..0d57ac8 --- /dev/null +++ b/R_package/man/set_hierarchy_details.Rd @@ -0,0 +1,1085 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_hierarchy_details.R +\name{set_hierarchy_details} +\alias{set_hierarchy_details} +\title{Set hierarchy chart details} +\usage{ +set_hierarchy_details( + ., + sort_by = NULL, + aggregation_type = NULL, + num_of_visible_levels = NULL, + auto_set_height = NULL, + treemap_aspect_ratio_normal = NULL, + treemap_aspect_ratio_narrow = NULL, + responsive_narrow_breakpoint = NULL, + treemap_type = NULL, + treemap_ratio = NULL, + cellPadding = NULL, + sunburst_depth_fade = NULL, + sunburst_labelling = NULL, + sunburst_inner_radius = NULL, + sunburst_show_zoomed_node_in_center = NULL, + bar_min_bar_thickness = NULL, + bar_max_bar_thickness = NULL, + bar_bar_padding = NULL, + bar_max_value = NULL, + radial_tree_outer_radius = NULL, + radial_tree_bar_length = NULL, + radial_tree_bar_width = NULL, + radial_tree_rotation = NULL, + label_color = NULL, + label_size = NULL, + min_label_size = NULL, + max_label_size = NULL, + label_padding = NULL, + label_case = NULL, + label_weight = NULL, + bar_axis_label_size = NULL, + bar_axis_labels_above = NULL, + bar_axis_label_space = NULL, + multi_line_labels = NULL, + show_value_labels = NULL, + bar_value_label_space = NULL, + value_label_bold = NULL, + value_label_relative_size = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + stroke_color = NULL, + axis_label_color = NULL, + radial_tree_colored_links = NULL, + radial_tree_link_color = NULL, + legend_mode = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_position = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + popup_active_levels = NULL, + filter_control_visibility = NULL, + filter_include_all = NULL, + filter_all_label = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + size_by_control_visibility = NULL, + chart_size_filter_controls_control_type = NULL, + chart_size_filter_controls_control_styles = NULL, + chart_size_filter_controls_control_title = NULL, + chart_size_filter_controls_button_group = NULL, + chart_size_filter_controls_button_group_width_mode = NULL, + chart_size_filter_controls_button_group_width_fixed = NULL, + chart_size_filter_controls_dropdown_width_mode = NULL, + chart_size_filter_controls_dropdown_width_fixed = NULL, + chart_size_filter_controls_slider_width = NULL, + chart_size_filter_controls_slider_max_label_width = NULL, + chart_size_filter_controls_slider_step_time = NULL, + chart_size_filter_controls_slider_loop = NULL, + chart_size_filter_controls_slider_restart_pause = NULL, + chart_size_filter_controls_sort = NULL, + ascend_button_visibility = NULL, + zoom_out_button_color = NULL, + zoom_out_arrow_color = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + animation_duration = NULL, + size_by_number_formatter_prefix = NULL, + size_by_number_formatter_suffix = NULL, + size_by_number_formatter_n_dec = NULL, + size_by_number_formatter_advanced = NULL, + size_by_number_formatter_negative_sign = NULL, + size_by_number_formatter_strip_zeros = NULL, + size_by_number_formatter_strip_separator = NULL, + size_by_number_formatter_transform_labels = NULL, + size_by_number_formatter_transform = NULL, + size_by_number_formatter_multiply_divide_constant = NULL, + size_by_number_formatter_exponentiate_constant = NULL, + filter_number_formatter_prefix = NULL, + filter_number_formatter_suffix = NULL, + filter_number_formatter_n_dec = NULL, + filter_number_formatter_advanced = NULL, + filter_number_formatter_negative_sign = NULL, + filter_number_formatter_strip_zeros = NULL, + filter_number_formatter_strip_separator = NULL, + filter_number_formatter_transform_labels = NULL, + filter_number_formatter_transform = NULL, + filter_number_formatter_multiply_divide_constant = NULL, + filter_number_formatter_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{sort_by}{Sort by. Choices: data, value, name. Sort cells by value or by name. (In the Circles layout, the circles are placed in the specified order following an approximately spiral path.). Flourish type hint: string, defaults to \code{NULL}} + +\item{aggregation_type}{Size cells by. Choices: sum, count. Flourish type hint: string, defaults to \code{NULL}} + +\item{num_of_visible_levels}{Depth. How many hierarchy levels are visible at once. Flourish type hint: number, defaults to \code{NULL}} + +\item{auto_set_height}{Automatic height. Choices: \code{TRUE}, \code{FALSE}. Whether responsive embeds can adjust their height automatically. Ignored in simple Iframe embeds, Canva and other fixed-height contexts. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{treemap_aspect_ratio_normal}{Aspect (desktop). Height of treemap, as \% of width. Flourish type hint: number, defaults to \code{NULL}} + +\item{treemap_aspect_ratio_narrow}{Aspect (mobile). Height of treemap, as \% of width. Flourish type hint: number, defaults to \code{NULL}} + +\item{responsive_narrow_breakpoint}{Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to \code{NULL}} + +\item{treemap_type}{Tile layout. Choices: treemap_binary, treemap_resquarify, treemap_slice, treemap_dice, treemap_slice_dice. Flourish type hint: string, defaults to \code{NULL}} + +\item{treemap_ratio}{Target. The target ratio between width and height, where 1 is sqaure and a large number is a tall or wide rectangle. Flourish type hint: number, defaults to \code{NULL}} + +\item{cellPadding}{Padding. Choices: low, medium, high. Flourish type hint: string, defaults to \code{NULL}} + +\item{sunburst_depth_fade}{Fade. How quickly the segments fade with hierachical depth. (Use 1 for no fade.). Flourish type hint: number, defaults to \code{NULL}} + +\item{sunburst_labelling}{Orientation. Choices: auto, radial, circular. How the labels should be oriented. Flourish type hint: string, defaults to \code{NULL}} + +\item{sunburst_inner_radius}{Hole size. As a \% of overall radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{sunburst_show_zoomed_node_in_center}{Show zoomed node in center. Show zoomed node as a circle in the center of the sunburst chart. (If not zoomed, the space is left blank.). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_min_bar_thickness}{Height. Minimum bar thickness in pixels. This also determines bar thickness if Automatic height is selected and container height isnt fixed. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_max_bar_thickness}{Max height. Maximum bar thickness in pixels. Applies when Automatic height is false. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_bar_padding}{Spacing. Distance between bars in pixels. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_max_value}{Max value. The maximum value represented by bar length (leave blank for auto-scaling). Flourish type hint: number, defaults to \code{NULL}} + +\item{radial_tree_outer_radius}{Outer radius (\%). Radius of outer nodes (as a percent of the container size). Flourish type hint: number, defaults to \code{NULL}} + +\item{radial_tree_bar_length}{Bar length (\%). Bar length (as a percent of the container size). Flourish type hint: number, defaults to \code{NULL}} + +\item{radial_tree_bar_width}{Bar width (pixels). Bar width in pixels. Flourish type hint: number, defaults to \code{NULL}} + +\item{radial_tree_rotation}{Rotation (degrees). Rotates the whole tree. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{label_size}{Label size. Label size in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{min_label_size}{Min size. Minimum label size, in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{max_label_size}{Max size. Max label size, in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{label_padding}{Padding. Padding between label and border, in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{label_case}{Label case. Choices: all_upper_case, all_lower_case, top_upper_case, bottom_upper_case. Determines whether labels are lower or upper case. Items at the top level of the hierarchy can have a different case to the remaining items. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_weight}{Label weight. Choices: all_normal, all_bold, top_bold, bottom_bold. Determines the font weight (normal or bold) of labels. Items at the top level of the hierarchy can have a different weight to the remaining items. Flourish type hint: string, defaults to \code{NULL}} + +\item{bar_axis_label_size}{Label size. Axis label size, in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_axis_labels_above}{Position. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_axis_label_space}{Width. Space available for axis labels, in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{multi_line_labels}{Wrap long labels. Display long labels across multiple lines where possible. Currently supported in treemap and circle packing. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{show_value_labels}{Show values. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_value_label_space}{Space. Space available for value labels, in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{value_label_bold}{Bold. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{value_label_relative_size}{Relative size. The size of the value label relative to the name label. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{stroke_color}{Stroke color. Flourish type hint: color, defaults to \code{NULL}} + +\item{axis_label_color}{Axis color. Flourish type hint: color, defaults to \code{NULL}} + +\item{radial_tree_colored_links}{Colored links. Use colored links. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{radial_tree_link_color}{Radial tree link color. Flourish type hint: color, defaults to \code{NULL}} + +\item{legend_mode}{Legend mode. Choices: on, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{legend_position}{Legend position. Choices: above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. The text to appear in the popup. You can use \code{{{column_name}}} to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. You can also use \code{{{NAME}}} to include the name of the current item, \code{{{VALUE}}} to include the value of the current item and \code{{{SIZEBY}}} to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{#if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}}. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. The text to appear in the popup. You can use \code{{{column_name}}} to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. You can also use \code{{{NAME}}} to include the name of the current item, \code{{{VALUE}}} to include the value of the current item and \code{{{SIZEBY}}} to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{#if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}}. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. The text to appear in the panel. You can use \code{{{column_name}}} to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the panel. You can also use \code{{{NAME}}} to include the name of the current item, \code{{{VALUE}}} to include the value of the current item and \code{{{SIZEBY}}} to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{#if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}}. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. The text to appear in the panel. You can use \code{{{column_name}}} to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the panel. You can also use \code{{{NAME}}} to include the name of the current item, \code{{{VALUE}}} to include the value of the current item and \code{{{SIZEBY}}} to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{#if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}}. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{popup_active_levels}{When to show popup or panel. Choices: all_levels, top_level, below_top_level, above_bottom_level, bottom_level. Specify which hierarchy levels popup is active on. Flourish type hint: string, defaults to \code{NULL}} + +\item{filter_control_visibility}{Visibility. Choices: always, editor, never. Sets whether the Filter is always visible, only visible when editing or never visible. Flourish type hint: string, defaults to \code{NULL}} + +\item{filter_include_all}{Include "All" in filter. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_all_label}{Filter All label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{size_by_control_visibility}{Visibility. Choices: always, editor, never. Sets whether the Size by control is always visible, only visible when editing or never visible. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_size_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_size_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_size_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_size_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_size_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_size_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_size_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_size_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_size_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_size_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_size_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_size_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_size_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_size_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{ascend_button_visibility}{Visibility. Choices: always, editor, never. Flourish type hint: string, defaults to \code{NULL}} + +\item{zoom_out_button_color}{Button. Flourish type hint: color, defaults to \code{NULL}} + +\item{zoom_out_arrow_color}{Arrow. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_filter_controls_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_controls_spacing}{Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{animation_duration}{Duration. The duration, in seconds, of transitions for example, between two slides in a storyFlourish type hint: number, defaults to \code{NULL}} + +\item{size_by_number_formatter_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{size_by_number_formatter_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{size_by_number_formatter_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{size_by_number_formatter_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{size_by_number_formatter_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{size_by_number_formatter_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{size_by_number_formatter_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{size_by_number_formatter_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{size_by_number_formatter_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{size_by_number_formatter_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{size_by_number_formatter_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{filter_number_formatter_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{filter_number_formatter_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{filter_number_formatter_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{filter_number_formatter_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_number_formatter_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{filter_number_formatter_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_number_formatter_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_number_formatter_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_number_formatter_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{filter_number_formatter_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{filter_number_formatter_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_enabled}{Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_whitelist}{Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. \code{layout.background_color}. Flourish type hint: text, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set hierarchy chart details +} +\examples{ +try( + flourish(chart_type = "treemap", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_hierarchy_data(gapminder) |> + set_hierarchy_details() +) +} diff --git a/R_package/man/set_horserace_details.Rd b/R_package/man/set_horserace_details.Rd new file mode 100644 index 0000000..535d3f8 --- /dev/null +++ b/R_package/man/set_horserace_details.Rd @@ -0,0 +1,1151 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_horserace_details.R +\name{set_horserace_details} +\alias{set_horserace_details} +\title{Set line chart race chart details} +\usage{ +set_horserace_details( + ., + play_mode = NULL, + zoom_steps_to_show = NULL, + value_type = NULL, + higher_scores_win = NULL, + ties_mode = NULL, + height_mode = NULL, + padding_top = NULL, + padding_right = NULL, + padding_bottom = NULL, + padding_left = NULL, + show_buttons = NULL, + show_replay = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_background_color = NULL, + chart_filter_controls_slider_font_color = NULL, + chart_filter_controls_slider_handle_color = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_margin = NULL, + chart_filter_controls_slider_handle_height = NULL, + chart_filter_controls_slider_track_height = NULL, + chart_filter_controls_slider_play_button = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_include_all = NULL, + label_ranks = NULL, + label_scores = NULL, + label_replay = NULL, + filter_all_label = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + color_mode = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + color_single = NULL, + color_single_overrides = NULL, + line_width = NULL, + line_opacity = NULL, + curve = NULL, + shade = NULL, + shade_width = NULL, + shade_opacity = NULL, + missing = NULL, + missing_opacity = NULL, + missing_width = NULL, + missing_stroke_dash = NULL, + start_circle_r = NULL, + end_circle_r = NULL, + end_circle_stroke = NULL, + circle_space_between = NULL, + end_circle_stroke_bg = NULL, + horse_images = NULL, + show_labels = NULL, + animate_scores = NULL, + rank_outside_picture = NULL, + label_divider = NULL, + rank_inside_color = NULL, + chart_labels_max_width = NULL, + chart_labels_overlap_mode = NULL, + chart_labels_spreading_margin = NULL, + chart_labels_data_point_margin = NULL, + chart_labels_show_only_labels = NULL, + chart_labels_text_color = NULL, + chart_labels_text_size = NULL, + chart_labels_text_bg_color = NULL, + chart_labels_text_bg_size = NULL, + chart_labels_text_line_height = NULL, + chart_labels_text_max_lines = NULL, + chart_labels_text_weight = NULL, + chart_labels_lines = NULL, + chart_labels_line_style = NULL, + chart_labels_line_color = NULL, + chart_labels_line_width = NULL, + chart_labels_line_range = NULL, + chart_labels_line_padding = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + zoom_y_axis = NULL, + caption_background_color = NULL, + caption_border_color = NULL, + caption_border_radius = NULL, + caption_opacity = NULL, + caption_padding = NULL, + caption_position = NULL, + caption_text_width = NULL, + caption_font_size = NULL, + caption_text_weight = NULL, + caption_text_color = NULL, + caption_mode = NULL, + caption_text_align_h = NULL, + caption_text_align_v = NULL, + caption_image_width = NULL, + caption_image_position = NULL, + caption_space_between = NULL, + stage_duration = NULL, + update_duration = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{play_mode}{Play mode. In All mode, the entire X axis is visible In Zoomed mode, the X axis is only visible for a specified amount of stages In Reveal mode, the X axis is visible from the start until the current stage Flourish type hint: string, defaults to \code{NULL}} + +\item{zoom_steps_to_show}{Visible stages. The number of time slices (each of which is column of data) to show on the X axis. When in Zoom mode, these time slices are shown to the left and right of the current time. In Reveal mode, these time slices are shown at the beginning. (Value is ignored if the number specified is greater than the number of stages in the data.). Flourish type hint: number, defaults to \code{NULL}} + +\item{value_type}{Chart mode to show on load. Choices: ranks, scores. Flourish type hint: string, defaults to \code{NULL}} + +\item{higher_scores_win}{Data type. Choices: \code{TRUE}, \code{FALSE}. Useful for data where lower scores beat higher scores e.g. race times. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{ties_mode}{Rank ties mode. Choices: competition, dense. What ranks should be given when there are ties? See Wikipedia for an explanation of names. Flourish type hint: string, defaults to \code{NULL}} + +\item{height_mode}{Height mode. Choices: auto, fixed, flexible. In Fill space mode, the lines will be spread out over the available chart height, which by default will be the standard Flourish chart sizes for any given screen width. In this mode, the circles/images may overlap if you have lots of lines. Match data mode will resize the embedded graphic so there is enough vertical space to avoid overlaps. (Note this wont have any effect if you embed the graphic as a fixed height.) Auto mode switches between the two modes depending on the number of lines. Flourish type hint: string, defaults to \code{NULL}} + +\item{padding_top}{Top. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{padding_right}{Right. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{padding_bottom}{Bottom. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{padding_left}{Left (mobile). In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{show_buttons}{Ranks/scores toggle. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{show_replay}{Replay button. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_background_color}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_margin}{Label width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_include_all}{Include “All” option. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_ranks}{“Ranks”. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_scores}{“Scores”. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_replay}{“Replay”. Flourish type hint: string, defaults to \code{NULL}} + +\item{filter_all_label}{“All”. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{color_mode}{Color mode. Choices: category, line, single. Whether to color by category (if you have a category column set in the Datasheet), by each individual line, or give every line the same color. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{color_single}{Single color. Flourish type hint: color, defaults to \code{NULL}} + +\item{color_single_overrides}{Color overrides. Type the label of the line whose color you want to set, a colon and then a color (using a name, hex-code or rgb). Multiple colors can be set using multiple lines. For example: China: red India: #4455AA Brazil: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{line_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{curve}{Curve. Choices: curve_linear, curve_monotone_x, curve_natural, curve_step, curve_step_after, curve_step_before. Flourish type hint: string, defaults to \code{NULL}} + +\item{shade}{Shading behind line. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{shade_width}{Width. Width in pixels. Flourish type hint: number, defaults to \code{NULL}} + +\item{shade_opacity}{Opacity. Set to a value between 0 and 1. Flourish type hint: number, defaults to \code{NULL}} + +\item{missing}{Lines between missing data points. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{missing_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{missing_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{missing_stroke_dash}{Stroke dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{start_circle_r}{Start radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{end_circle_r}{End radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{end_circle_stroke}{End stroke. Flourish type hint: number, defaults to \code{NULL}} + +\item{circle_space_between}{Space between. Minimum space between the circles. The space is ignored when the chart is set to fill available space. Flourish type hint: number, defaults to \code{NULL}} + +\item{end_circle_stroke_bg}{Stroke color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{horse_images}{Image inside circle. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{show_labels}{Show labels. Choices: always, hover, never. Flourish type hint: string, defaults to \code{NULL}} + +\item{animate_scores}{Animate scores. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{rank_outside_picture}{Value label position. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_divider}{Divider. The character between label and value. Flourish type hint: string, defaults to \code{NULL}} + +\item{rank_inside_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_labels_max_width}{Max label width. The maximum allowed label width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_overlap_mode}{Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_labels_spreading_margin}{Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_data_point_margin}{Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_show_only_labels}{Show only certain labels. Manually specify which labels youd like to display (one entry per line that should match entries in the Label column). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_labels_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_labels_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_text_bg_color}{Outline. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_labels_text_bg_size}{Outline width. As a \% of the font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_text_max_lines}{Max lines. The max number of lines for each label. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_text_weight}{Weight. Choices: 400, 700. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_labels_lines}{Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_labels_line_style}{Line style. Choices: straight, step. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_labels_line_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_labels_line_width}{Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_line_range}{Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_line_padding}{Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_axis_position}{Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_y_axis_position}{Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_zero_axis}{Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_position}{Position. Choices: default, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_side}{Tick side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_axis_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_zero_axis}{Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_title_position}{Position. Choices: side, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_position}{Position. Choices: default, above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_side}{Side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{zoom_y_axis}{Dynamic Y axis. Rescales the y axis when filtering or playing in zoomed mode. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{caption_background_color}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{caption_border_color}{Border. Flourish type hint: color, defaults to \code{NULL}} + +\item{caption_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{caption_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{caption_padding}{Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{caption_position}{Position. Choices: top-left, center-left, bottom-left, top-right, center-right, bottom-right, top-center, center-center, bottom-center. Flourish type hint: string, defaults to \code{NULL}} + +\item{caption_text_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{caption_font_size}{Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{caption_text_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{caption_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{caption_mode}{Content mode. Choices: text_legend, html. In Text with colors mode, any phrases matching category names will be automatically colored. In HTML mode, no colors will be applied, but you can include any HTML in the datasheet to add images, etc. Flourish type hint: string, defaults to \code{NULL}} + +\item{caption_text_align_h}{Horizontal align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{caption_text_align_v}{Vertical align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{caption_image_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{caption_image_position}{Position. Choices: column, column-reverse, row, row-reverse. Flourish type hint: string, defaults to \code{NULL}} + +\item{caption_space_between}{Space between. Space between image and text. Flourish type hint: number, defaults to \code{NULL}} + +\item{stage_duration}{Animation duration. The race animation length, in milliseconds per stage(A stage is equal to each column of your data). Flourish type hint: number, defaults to \code{NULL}} + +\item{update_duration}{Mode duration. The animation duration when change between ranks and scores modes. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set line chart race chart details +} +\examples{ +try( + flourish(chart_type = "horserace", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_horserace_data(gapminder) |> + set_horserace_details() +) +} diff --git a/R_package/man/set_interactive_svg_details.Rd b/R_package/man/set_interactive_svg_details.Rd new file mode 100644 index 0000000..8b0bcbf --- /dev/null +++ b/R_package/man/set_interactive_svg_details.Rd @@ -0,0 +1,614 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_interactive_svg_details.R +\name{set_interactive_svg_details} +\alias{set_interactive_svg_details} +\title{Set interactive svg chart details} +\usage{ +set_interactive_svg_details( + ., + svg_url = NULL, + svg_width_wide = NULL, + mobile_view = NULL, + mobile_breakpoint = NULL, + mobile_svg_mode = NULL, + mobile_svg_url = NULL, + mobile_svg_width = NULL, + mobile_content_mode = NULL, + clickable_svg_animation = NULL, + clickable_svg_animation_duration = NULL, + clickable_svg_animation_config = NULL, + clickable_svg_animation_attr = NULL, + clickable_svg_animation_values = NULL, + clickable_svg_animation_repeat = NULL, + text_panel_enabled = NULL, + h3_default = NULL, + h3_size = NULL, + h4_default = NULL, + h4_size = NULL, + content_default = NULL, + content_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + svg_reset_fonts = NULL, + show_css = NULL, + stylesheet = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{svg_url}{SVG file. Flourish type hint: url, defaults to \code{NULL}} + +\item{svg_width_wide}{Image width. The width in percentage of the image in standard wide-screen view. Flourish type hint: number, defaults to \code{NULL}} + +\item{mobile_view}{Different mobile view. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{mobile_breakpoint}{Breakpoint. The size in pixels at which to switch to mobile layout Flourish type hint: number, defaults to \code{NULL}} + +\item{mobile_svg_mode}{Image on mobile. Choices: none, same, different. Whether to show the image at all on mobile. Flourish type hint: string, defaults to \code{NULL}} + +\item{mobile_svg_url}{SVG file (mobile). Flourish type hint: url, defaults to \code{NULL}} + +\item{mobile_svg_width}{Width. The width in percentage of the image on a mobile view. Flourish type hint: number, defaults to \code{NULL}} + +\item{mobile_content_mode}{Mobile content mode. Choices: interactive, all, accordion. If turned on all content will display on load in mobile view. Flourish type hint: string, defaults to \code{NULL}} + +\item{clickable_svg_animation}{Animation clickable elements. Choices: off, animation. Flourish type hint: string, defaults to \code{NULL}} + +\item{clickable_svg_animation_duration}{Duration. The duration of the highlight animation on each clickable element. Flourish type hint: number, defaults to \code{NULL}} + +\item{clickable_svg_animation_config}{Advanced. Reveal settings to adjust the SVG Animation properties on clickable elements. See Mozilla docs for more detailsFlourish type hint: boolean, defaults to \code{NULL}} + +\item{clickable_svg_animation_attr}{Attribute. Flourish type hint: string, defaults to \code{NULL}} + +\item{clickable_svg_animation_values}{Values. Flourish type hint: string, defaults to \code{NULL}} + +\item{clickable_svg_animation_repeat}{Repeat. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_panel_enabled}{Text panel enabled. Disable to only show text in popups. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{h3_default}{Default heading. The text to show on load. Flourish type hint: text, defaults to \code{NULL}} + +\item{h3_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{h4_default}{Default subheading. The text to show on load. Flourish type hint: text, defaults to \code{NULL}} + +\item{h4_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_default}{Default text. The text to show on load. Flourish type hint: text, defaults to \code{NULL}} + +\item{content_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{svg_reset_fonts}{Override fonts in SVG. If enabled, font-family styles will be removed in the SVG, allowing the text to be inherited from the current theme or settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{show_css}{Edit CSS. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{stylesheet}{Custom styles. Use the CSS class .clickable-element to target all interactive elements. When one is clicked, it has the CSS class is .highlighted and the others are .faded. The text for each clickable element is inside a .text-block, which is also .accordion in accordion mode. Flourish type hint: code, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set interactive svg chart details +} +\examples{ +try( + flourish(chart_type = "interactive_svg", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_interactive_svg_data(gapminder) |> + set_interactive_svg_details() +) +} diff --git a/R_package/man/set_line_bar_pie_details.Rd b/R_package/man/set_line_bar_pie_details.Rd new file mode 100644 index 0000000..617cd52 --- /dev/null +++ b/R_package/man/set_line_bar_pie_details.Rd @@ -0,0 +1,2009 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_line_bar_pie_details.R +\name{set_line_bar_pie_details} +\alias{set_line_bar_pie_details} +\title{Set line, bar and pie charts chart details} +\usage{ +set_line_bar_pie_details( + ., + dual_axis = NULL, + secondary_series = NULL, + stack_sort = NULL, + facet_layout = NULL, + height_mode = NULL, + facet_aspect = NULL, + facet_aspect_mobile = NULL, + facet_aspect_breakpoint = NULL, + sort_mode = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + x_axis_matching = NULL, + x_axis_last_row_only = NULL, + y_axis_matching = NULL, + y_axis_first_col_only = NULL, + y2_axis_matching = NULL, + y2_axis_last_col_only = NULL, + series_filter_mode = NULL, + series_control_multi_text = NULL, + series_control_multi_none_text = NULL, + series_control_select_text = NULL, + max_series = NULL, + series_control_background = NULL, + series_control_text = NULL, + series_control_border = NULL, + series_control_pill_background = NULL, + series_control_pill_text = NULL, + series_control_pill_radius = NULL, + series_control_single_all = NULL, + series_control_single_all_text = NULL, + filter_rows_with_no_data = NULL, + chart_series_filter_controls_control_type = NULL, + chart_series_filter_controls_control_styles = NULL, + chart_series_filter_controls_control_title = NULL, + chart_series_filter_controls_button_group = NULL, + chart_series_filter_controls_button_group_width_mode = NULL, + chart_series_filter_controls_button_group_width_fixed = NULL, + chart_series_filter_controls_dropdown_width_mode = NULL, + chart_series_filter_controls_dropdown_width_fixed = NULL, + chart_series_filter_controls_slider_width = NULL, + chart_series_filter_controls_slider_max_label_width = NULL, + chart_series_filter_controls_slider_step_time = NULL, + chart_series_filter_controls_slider_loop = NULL, + chart_series_filter_controls_slider_restart_pause = NULL, + chart_series_filter_controls_sort = NULL, + row_filter_control_all = NULL, + row_filter_control_all_text = NULL, + chart_row_filter_controls_control_type = NULL, + chart_row_filter_controls_control_styles = NULL, + chart_row_filter_controls_control_title = NULL, + chart_row_filter_controls_button_group = NULL, + chart_row_filter_controls_button_group_width_mode = NULL, + chart_row_filter_controls_button_group_width_fixed = NULL, + chart_row_filter_controls_dropdown_width_mode = NULL, + chart_row_filter_controls_dropdown_width_fixed = NULL, + chart_row_filter_controls_slider_width = NULL, + chart_row_filter_controls_slider_max_label_width = NULL, + chart_row_filter_controls_slider_step_time = NULL, + chart_row_filter_controls_slider_loop = NULL, + chart_row_filter_controls_slider_restart_pause = NULL, + chart_row_filter_controls_sort = NULL, + log_control_y_visible = NULL, + chart_log_control_y_filter_controls_control_type = NULL, + chart_log_control_y_filter_controls_control_styles = NULL, + chart_log_control_y_filter_controls_control_title = NULL, + chart_log_control_y_filter_controls_button_group = NULL, + chart_log_control_y_filter_controls_button_group_width_mode = NULL, + chart_log_control_y_filter_controls_button_group_width_fixed = NULL, + chart_log_control_y_filter_controls_dropdown_width_mode = NULL, + chart_log_control_y_filter_controls_dropdown_width_fixed = NULL, + chart_log_control_y_filter_controls_slider_width = NULL, + chart_log_control_y_filter_controls_slider_max_label_width = NULL, + chart_log_control_y_filter_controls_slider_step_time = NULL, + chart_log_control_y_filter_controls_slider_loop = NULL, + chart_log_control_y_filter_controls_slider_restart_pause = NULL, + chart_log_control_y_filter_controls_sort = NULL, + log_control_y_text_linear = NULL, + log_control_y_text_log = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + controls_position = NULL, + color_mode = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + line_width = NULL, + line_opacity = NULL, + line_stroke = NULL, + line_curve = NULL, + line_dash_items = NULL, + line_dash_width = NULL, + line_dash_space_width = NULL, + line_interpolate = NULL, + shade_between_lines = NULL, + shade_between_lines_config = NULL, + shade_between_lines_color = NULL, + shade_between_lines_opacity = NULL, + area_opacity = NULL, + dot_mode = NULL, + dot_opacity = NULL, + dot_radius = NULL, + dot_radius_last = NULL, + dot_hollow = NULL, + bar_height = NULL, + column_opacity = NULL, + uniform_column_width = NULL, + uniform_bar_height = NULL, + column_padding_inner = NULL, + column_padding_in_group = NULL, + column_padding_stack = NULL, + column_stroke = NULL, + column_stroke_opacity = NULL, + column_stroke_color = NULL, + donut_inner_radius = NULL, + donut_corner_radius = NULL, + donut_pad_angle = NULL, + donut_auto_scale = NULL, + bar_labels_above = NULL, + bar_labels_color = NULL, + bar_labels_font_size = NULL, + bar_labels_weight = NULL, + line_end_labels = NULL, + chart_line_labels_max_width = NULL, + chart_line_labels_overlap_mode = NULL, + chart_line_labels_spreading_margin = NULL, + chart_line_labels_data_point_margin = NULL, + chart_line_labels_show_only_labels = NULL, + chart_line_labels_text_color = NULL, + chart_line_labels_text_size = NULL, + chart_line_labels_text_bg_color = NULL, + chart_line_labels_text_bg_size = NULL, + chart_line_labels_text_line_height = NULL, + chart_line_labels_text_max_lines = NULL, + chart_line_labels_text_weight = NULL, + chart_line_labels_lines = NULL, + chart_line_labels_line_style = NULL, + chart_line_labels_line_color = NULL, + chart_line_labels_line_width = NULL, + chart_line_labels_line_range = NULL, + chart_line_labels_line_padding = NULL, + labels = NULL, + labels_hide_overlaps = NULL, + labels_dot_center = NULL, + labels_column_align = NULL, + labels_column_padding = NULL, + labels_bar_align = NULL, + labels_bar_autohide = NULL, + labels_color_mode = NULL, + labels_fixed_color = NULL, + labels_font_weight = NULL, + labels_font_size_mode = NULL, + labels_font_size = NULL, + labels_bg_mode = NULL, + labels_bg_size = NULL, + labels_content = NULL, + stack_labels = NULL, + stack_labels_color = NULL, + stack_labels_font_size = NULL, + stack_labels_weight = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + chart_secondary_y_axis_axis_visible = NULL, + chart_secondary_y_axis_numeric_scale_type = NULL, + chart_secondary_y_axis_linear_min = NULL, + chart_secondary_y_axis_linear_max = NULL, + chart_secondary_y_axis_log_min = NULL, + chart_secondary_y_axis_log_max = NULL, + chart_secondary_y_axis_datetime_min = NULL, + chart_secondary_y_axis_datetime_max = NULL, + chart_secondary_y_axis_flip = NULL, + chart_secondary_y_axis_show_scale_settings = NULL, + chart_secondary_y_axis_nice = NULL, + chart_secondary_y_axis_zero_axis = NULL, + chart_secondary_y_axis_title_mode = NULL, + chart_secondary_y_axis_title = NULL, + chart_secondary_y_axis_title_styling = NULL, + chart_secondary_y_axis_title_position = NULL, + chart_secondary_y_axis_title_weight = NULL, + chart_secondary_y_axis_title_color = NULL, + chart_secondary_y_axis_title_size = NULL, + chart_secondary_y_axis_title_padding = NULL, + chart_secondary_y_axis_tick_label_position = NULL, + chart_secondary_y_axis_tick_label_styling = NULL, + chart_secondary_y_axis_tick_label_size = NULL, + chart_secondary_y_axis_tick_label_color = NULL, + chart_secondary_y_axis_tick_padding = NULL, + chart_secondary_y_axis_tick_label_angle = NULL, + chart_secondary_y_axis_tick_label_weight = NULL, + chart_secondary_y_axis_tick_label_max_lines = NULL, + chart_secondary_y_axis_tick_label_line_height = NULL, + chart_secondary_y_axis_tick_label_space_mode = NULL, + chart_secondary_y_axis_tick_label_space = NULL, + chart_secondary_y_axis_tick_mode = NULL, + chart_secondary_y_axis_tick_number = NULL, + chart_secondary_y_axis_tick_custom = NULL, + chart_secondary_y_axis_line_and_tick_color = NULL, + chart_secondary_y_axis_line_and_tick_width = NULL, + chart_secondary_y_axis_tick_length = NULL, + chart_secondary_y_axis_tick_side = NULL, + chart_secondary_y_axis_line_visible = NULL, + chart_secondary_y_axis_edge_padding = NULL, + chart_secondary_y_axis_gridlines_visible = NULL, + chart_secondary_y_axis_gridlines_styling = NULL, + chart_secondary_y_axis_gridline_color = NULL, + chart_secondary_y_axis_gridline_style = NULL, + chart_secondary_y_axis_gridline_width = NULL, + chart_secondary_y_axis_gridline_category_dividers = NULL, + chart_secondary_y_axis_gridline_category_dividers_extend = NULL, + chart_background_background_color_enabled = NULL, + chart_background_background_image_enabled = NULL, + chart_background_background_color = NULL, + chart_background_background_image_src = NULL, + chart_background_background_image_size = NULL, + chart_background_background_image_position = NULL, + number_format_labels_prefix = NULL, + number_format_labels_suffix = NULL, + number_format_labels_n_dec = NULL, + number_format_labels_advanced = NULL, + number_format_labels_negative_sign = NULL, + number_format_labels_strip_zeros = NULL, + number_format_labels_strip_separator = NULL, + number_format_labels_transform_labels = NULL, + number_format_labels_transform = NULL, + number_format_labels_multiply_divide_constant = NULL, + number_format_labels_exponentiate_constant = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + number_format_prop = NULL, + chart_secondary_number_date_format_prefix = NULL, + chart_secondary_number_date_format_suffix = NULL, + chart_secondary_number_date_format_n_dec = NULL, + chart_secondary_number_date_format_advanced = NULL, + chart_secondary_number_date_format_negative_sign = NULL, + chart_secondary_number_date_format_strip_zeros = NULL, + chart_secondary_number_date_format_strip_separator = NULL, + chart_secondary_number_date_format_transform_labels = NULL, + chart_secondary_number_date_format_transform = NULL, + chart_secondary_number_date_format_multiply_divide_constant = NULL, + chart_secondary_number_date_format_exponentiate_constant = NULL, + legend_mode = NULL, + legend_filter_mode = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_position = NULL, + text_legend = NULL, + text_legend_title = NULL, + text_legend_subtitle = NULL, + text_legend_bold = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + popup_color_headers = NULL, + show_series_text = NULL, + popup_series_text = NULL, + chart_axes_highlights_placement = NULL, + chart_axes_highlights_x_enabled = NULL, + chart_axes_highlights_x_lines = NULL, + chart_axes_highlights_x_line_color = NULL, + chart_axes_highlights_x_line_width = NULL, + chart_axes_highlights_x_line_dash = NULL, + chart_axes_highlights_x_areas = NULL, + chart_axes_highlights_x_area_color = NULL, + chart_axes_highlights_x_area_opacity = NULL, + chart_axes_highlights_x_area_texture = NULL, + chart_axes_highlights_x_label_vertical = NULL, + chart_axes_highlights_x_label_y_position = NULL, + chart_axes_highlights_x_label_x_position = NULL, + chart_axes_highlights_x_label_max_width = NULL, + chart_axes_highlights_x_font_size = NULL, + chart_axes_highlights_x_font_weight = NULL, + chart_axes_highlights_x_label_color = NULL, + chart_axes_highlights_x_shadow_color = NULL, + chart_axes_highlights_x_shadow_enabled = NULL, + chart_axes_highlights_y_enabled = NULL, + chart_axes_highlights_y_lines = NULL, + chart_axes_highlights_y_line_color = NULL, + chart_axes_highlights_y_line_width = NULL, + chart_axes_highlights_y_line_dash = NULL, + chart_axes_highlights_y_areas = NULL, + chart_axes_highlights_y_area_color = NULL, + chart_axes_highlights_y_area_opacity = NULL, + chart_axes_highlights_y_area_texture = NULL, + chart_axes_highlights_y_label_x_position = NULL, + chart_axes_highlights_y_label_y_position = NULL, + chart_axes_highlights_y_label_max_width = NULL, + chart_axes_highlights_y_font_size = NULL, + chart_axes_highlights_y_font_weight = NULL, + chart_axes_highlights_y_label_color = NULL, + chart_axes_highlights_y_shadow_color = NULL, + chart_axes_highlights_y_shadow_enabled = NULL, + annotations_styles = NULL, + chart_annotations_defaults_text_weight = NULL, + chart_annotations_defaults_text_size = NULL, + chart_annotations_defaults_text_color = NULL, + chart_annotations_defaults_label_width = NULL, + chart_annotations_defaults_text_background_mode = NULL, + chart_annotations_defaults_text_bg = NULL, + chart_annotations_defaults_label_bg = NULL, + chart_annotations_defaults_text_alignment = NULL, + chart_annotations_defaults_popup_position = NULL, + chart_annotations_defaults_line_marker = NULL, + chart_annotations_defaults_stroke_width = NULL, + chart_annotations_defaults_stroke_color = NULL, + chart_annotations_defaults_connector_extend_line = NULL, + data_trans_duration = NULL, + animate_on_load = NULL, + data_trans_bind_series = NULL, + data_trans_bind_data_points = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{dual_axis}{Axis type. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{secondary_series}{Number of combo lines. In line-bar mode , sets how many of your value columns are treated as lines. In line-line mode , sets how many lines use the right axis. The order counts from the start, so if you want column B as a line and A as a column, set the order in the column bindings to "B, A". Flourish type hint: number, defaults to \code{NULL}} + +\item{stack_sort}{Stack sort mode. Choices: data, ascending, descending. Whether each stack is in the default order or sorted by value. Use ascending or descending with a stacked area chart to make a "bump" area chart. Flourish type hint: string, defaults to \code{NULL}} + +\item{facet_layout}{Grid mode. Choices: single, facets. By default, Grid of charts creates a mini chart for each series. If Grid of charts is set in your column bindings, a mini chart will be created for each unique value in your specified column. Flourish type hint: string, defaults to \code{NULL}} + +\item{height_mode}{Height mode. Choices: auto, fill_space, aspect. Auto: sets the height based on the chart type, data and width. Standard: uses the default Flourish responsive sizing. Aspect ratio: sets the aspect of each plot. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to \code{NULL}} + +\item{facet_aspect}{Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_aspect_mobile}{Aspect (mobile). Aspect of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_aspect_breakpoint}{Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to \code{NULL}} + +\item{sort_mode}{Sort mode. Choices: data, value, label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_columns_fixed}{Grid mode. Choices: \code{FALSE}, \code{TRUE}. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_columns}{Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width}{Min chart width. The minimum width of a chart or cell in the grid. Determines the number of columns. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width_fixed}{Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_custom_grid}{Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_custom_positions}{Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_facet_max_width}{Max chart width. The maximum width of a chart or cell in the grid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_w}{Horizontal margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_h}{Vertical margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_animation}{On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_titles}{Show titles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_title_align}{Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_size}{Size. Relative to the width of the chart. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_unit}{Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_padding_top}{Space above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_padding_bottom}{Space below. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_bg}{Background. Choices: none, full, text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_bg_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_bg_padding}{Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to \code{NULL}} + +\item{x_axis_matching}{Same across grid. Ensure the X scale is the same across the grid. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{x_axis_last_row_only}{Last row only. Only show the X axis on the last row, where possible. Ignored if the X axis is not positioned at the bottom. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{y_axis_matching}{Same across grid. Ensure the Y scale is the same across the grid. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{y_axis_first_col_only}{First column only. Only show the Y axis on the first column of the grid, where possible. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{y2_axis_matching}{Same across grid. Ensure the secondary Y scale is the same across the grid. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{y2_axis_last_col_only}{Last column only. Only show the secondary Y axis on the last column of the grid, where possible. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{series_filter_mode}{Series filter. Choices: none, single, multi. Filter control for series/columns. The user can also filter by clicking on the legend, except in single select mode. Use the animation settings panel to determine whether series animate when changing the filter. Flourish type hint: string, defaults to \code{NULL}} + +\item{series_control_multi_text}{Placeholder text. Flourish type hint: string, defaults to \code{NULL}} + +\item{series_control_multi_none_text}{No more results text. Flourish type hint: string, defaults to \code{NULL}} + +\item{series_control_select_text}{Select text. Flourish type hint: string, defaults to \code{NULL}} + +\item{max_series}{Max series to show. Limits the number of series/columns that will be visualized at once. Flourish type hint: number, defaults to \code{NULL}} + +\item{series_control_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{series_control_text}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{series_control_border}{Border. Flourish type hint: color, defaults to \code{NULL}} + +\item{series_control_pill_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{series_control_pill_text}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{series_control_pill_radius}{Border radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{series_control_single_all}{Include "All". Flourish type hint: boolean, defaults to \code{NULL}} + +\item{series_control_single_all_text}{Name for "All". Flourish type hint: string, defaults to \code{NULL}} + +\item{filter_rows_with_no_data}{Filter rows that have no data. This setting filters rows that have no data, this is useful in combination with filters and datasets that have a lot of empty cells. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_series_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_series_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_series_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_series_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_series_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_series_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_series_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_series_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_series_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_series_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_series_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_series_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_series_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_series_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{row_filter_control_all}{Include "All". Flourish type hint: boolean, defaults to \code{NULL}} + +\item{row_filter_control_all_text}{Name for "All". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_row_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_row_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_row_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_row_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_row_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_row_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_row_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_row_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_row_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_row_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_row_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_row_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_row_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_row_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{log_control_y_visible}{Show log control for Y axis. Adds a tabbed control to allow users to switch between log and linear Y scales. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_log_control_y_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{log_control_y_text_linear}{Linear text. Flourish type hint: string, defaults to \code{NULL}} + +\item{log_control_y_text_log}{Log text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_controls_spacing}{Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to \code{NULL}} + +\item{controls_position}{Control position. Choices: log_series_row, series_log_row, log_row_series, series_row_log, row_log_series, row_series_log. If you have two or more controls turned on for your chart, you can change the order the controls appear. Flourish type hint: string, defaults to \code{NULL}} + +\item{color_mode}{Color mode. Choices: column, row. By column will set the colors by series. Each column listed in the value column binding in the datasheet will have a different color. By row will instead set the color depending on the datas label/time column binding. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_width}{Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_stroke}{Outline. Add a stroke around your lines to enhance visibility when overlapping. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{line_curve}{Line curve. Choices: curve_linear, curve_monotone_x, curve_natural, curve_step, curve_step_before, curve_step_after. Flourish type hint: string, defaults to \code{NULL}} + +\item{line_dash_items}{Dashed lines. Specify the series that you would like to display with a dashed line. Multiple dashed lines can be set using multiple lines. For example: Party 1 Party 2 Party 3. Flourish type hint: text, defaults to \code{NULL}} + +\item{line_dash_width}{Dash width. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_dash_space_width}{Space width. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_interpolate}{Missing data points. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{shade_between_lines}{Shade areas between lines. Shade the gap between any two lines on your chart. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{shade_between_lines_config}{Which lines to shade between. Specify each area as a pair of line names separated by \code{::}. For example: Series A :: Series B Series C :: Series D You can optionally add a specific color and opacity for each area, e.g. \verb{Series A :: Series B :: red :: 0.1}. Flourish type hint: text, defaults to \code{NULL}} + +\item{shade_between_lines_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{shade_between_lines_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{area_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_mode}{Choices: auto, on, off. " Auto will automatically show dots on lines if fewer than 250 data points. Note: avoid showing dots for large datasets since it can lead to poor performance issues and poor-looking charts". Flourish type hint: string, defaults to \code{NULL}} + +\item{dot_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_radius}{Radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_radius_last}{Final dot scale (\%). Making the last point on a line larger can help emphasise the final value. This will usually be the dot furthest right on the axis. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_hollow}{Hollow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_height}{Bar height. The approximate height of the bar, the exact height depends on padding and label style. Specified in rems Ignored if the chart is embedded at a fixed height. Flourish type hint: number, defaults to \code{NULL}} + +\item{column_opacity}{Bar opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{uniform_column_width}{Uniform column width. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{uniform_bar_height}{Uniform bar height. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{column_padding_inner}{Spacing (main). Space between bar stacks or groups, as a \% of the width of a whole bar stack or group. Flourish type hint: number, defaults to \code{NULL}} + +\item{column_padding_in_group}{Spacing (in group). Space between bars in groups, as a \% of the width of a single bar in the group. Ignored if only a single series is selected. Flourish type hint: number, defaults to \code{NULL}} + +\item{column_padding_stack}{Spacing (in stack). Space each bar in the stack, in tenths of a rem Flourish type hint: number, defaults to \code{NULL}} + +\item{column_stroke}{Outline. Add a stroke around your columns or bars (same color as text). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{column_stroke_opacity}{Outline opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{column_stroke_color}{Outline color. Flourish type hint: color, defaults to \code{NULL}} + +\item{donut_inner_radius}{Doughnut hole (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{donut_corner_radius}{Corner curve (pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{donut_pad_angle}{Segment padding (degrees). Flourish type hint: number, defaults to \code{NULL}} + +\item{donut_auto_scale}{Scale pies based on data. Scale each pie chart in the grid so that the area of each pie/donut reflect its value. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_labels_above}{Label style. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_labels_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{bar_labels_font_size}{Size. When in Standard or Aspect ratio height mode, the font size of the labels will be limited to the space available. In remsFlourish type hint: number, defaults to \code{NULL}} + +\item{bar_labels_weight}{Choices: 600, 400. Flourish type hint: string, defaults to \code{NULL}} + +\item{line_end_labels}{Show labels on lines. Show series labels on the end of lines if theres enough space. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_line_labels_max_width}{Max label width. The maximum allowed label width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_overlap_mode}{Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_line_labels_spreading_margin}{Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_data_point_margin}{Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_show_only_labels}{Show only certain labels. Manually specify which labels youd like to display (one entry per line that should match headers from the Values columns). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_line_labels_text_color}{Color. If cleared, uses the main text color from the Layout settings panel. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_line_labels_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_text_bg_color}{Outline. If cleared, uses the main background color from the Layout settings panel. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_line_labels_text_bg_size}{Outline width. As a \% of the font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_text_max_lines}{Max lines. The max number of lines for each label. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_text_weight}{Weight. Choices: 400, 700. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_line_labels_lines}{Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_line_labels_line_style}{Line style. Choices: straight, step. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_line_labels_line_color}{Color. If cleared, uses the main text color from the Layout settings panel. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_line_labels_line_width}{Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_line_range}{Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_line_padding}{Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{labels}{Show labels on data points. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{labels_hide_overlaps}{Hide overlapping labels. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{labels_dot_center}{Position labels on center of dot. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{labels_column_align}{Bar label alignment. Choices: bottom, middle, top, above. The final above option puts the labels above the bars in standard column charts. In stacked charts, where the space above the stack is reserved for stack total the labels falls back to top alignment. Flourish type hint: string, defaults to \code{NULL}} + +\item{labels_column_padding}{Padding. Space above or below, as a proportion of the font size in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{labels_bar_align}{Label alignment. Choices: left, center, right, out. In stacked bar charts the final out (outside of bar) option falls back to right alignment, since the space after the stack is reserved for stack total labels (see below). Flourish type hint: string, defaults to \code{NULL}} + +\item{labels_bar_autohide}{Hide if too big. Turn off to force labels to show, even if they will overflow the bars. Ignored when labels are not inside the bars. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{labels_color_mode}{Text color. Choices: auto, data, contrast, fixed. Contrast mode is black or white depending on the color of the data point (or the background color for labels positioned over the background). Flourish type hint: string, defaults to \code{NULL}} + +\item{labels_fixed_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{labels_font_weight}{Weight. Choices: 600, 400. Flourish type hint: string, defaults to \code{NULL}} + +\item{labels_font_size_mode}{Size. Choices: auto, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{labels_font_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{labels_bg_mode}{Outline. Choices: on, off. A text outline/background can make the text more readable by increasing contrast. Flourish type hint: string, defaults to \code{NULL}} + +\item{labels_bg_size}{Size. Size of the background, as \% of text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{labels_content}{Label content. Choices: auto, value, label, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{stack_labels}{Show labels for stack totals. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{stack_labels_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{stack_labels_font_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{stack_labels_weight}{Weight. Choices: 600, 400. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_axis_position}{Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_y_axis_position}{Y value. Vertical position of the x axis on the y scale. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_min}{Min (date). Use the input date format as specified in the datasheet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_max}{Max (date). Use the input date format as specified in the datasheet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Overridden by any explicitly specified scale min and max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_zero_axis}{Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Overridden by any explicitly specified scale min and max. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_position}{Position. Choices: default, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. How the vertical space available for tick labels is determined. "Auto" means that the space is automatically determined. "Max" lets you specify the maximum vertical space tick labels may occupy. "Fixed" lets you specify a fixed amount of vertical space for tick labels. Tick labels will be truncated to fit within the allocated horizontal space. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space}{Space. The space allocated for tick labels (relative to the root font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_mode}{Mode. Choices: auto, number, custom. Determines how the tick values are chosen. "Auto" mode chooses the ticks automatically. "Number" mode lets you specify how many ticks are drawn. "Custom" mode lets you specify which ticks are drawn. If the axis is categorical, "Number" mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_side}{Tick side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_axis_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_min}{Min (date). Use the same format as displayed in the axis. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_max}{Max (date). Use the same format as displayed in the axis. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_zero_axis}{Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_title_position}{Position. Choices: side, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_position}{Position. Choices: default, above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Sets how the horizontal space available for tick labels is determined. "Auto" means that the space is automatically determined. "Max" lets you specify the maximum horizontal space tick labels may occupy. "Fixed" lets you specify a fixed amount of horizontal space for tick labels. Tick labels will be truncated to fit within the allocated horizontal space. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space}{Space. The space allocated for tick labels (relative to the root font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_mode}{Mode. Choices: auto, number, custom. Determines how the tick values are chosen. "Auto" mode chooses the ticks automatically. "Number" mode lets you specify how many ticks are drawn. "Custom" mode lets you specify which ticks are drawn. If the axis is categorical, "Number" mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_side}{Side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_axis_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_zero_axis}{Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_title_position}{Position. Choices: side, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_label_position}{Position. Choices: default, above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Sets how the horizontal space available for tick labels is determined. "Auto" means that the space is automatically determined. "Max" lets you specify the maximum horizontal space tick labels may occupy. "Fixed" lets you specify a fixed amount of horizontal space for tick labels. Tick labels will be truncated to fit within the allocated horizontal space. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_label_space}{Space. The space allocated for tick labels (relative to the root font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_mode}{Mode. Choices: auto, number, custom. Determines how the tick values are chosen. "Auto" mode chooses the ticks automatically. "Number" mode lets you specify how many ticks are drawn. "Custom" mode lets you specify which ticks are drawn. If the axis is categorical, "Number" mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_tick_side}{Side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_y_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_background_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_background_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_background_background_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_background_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_background_background_image_size}{Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_background_background_image_position}{Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to \code{NULL}} + +\item{number_format_labels_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{number_format_labels_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{number_format_labels_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{number_format_labels_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{number_format_labels_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{number_format_labels_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{number_format_labels_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{number_format_labels_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{number_format_labels_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{number_format_labels_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{number_format_labels_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{number_format_prop}{Show \% values. Toggles between showing the raw values from the datasheet and the computed percent values for the row in popups/panels. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_secondary_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_secondary_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_secondary_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{legend_mode}{Legend mode. Choices: auto, on, off. Auto mode hides the legend in certain situations, such as when each color is already explained by the chart titles in a grid of charts A legend will not show with a single entry. Flourish type hint: string, defaults to \code{NULL}} + +\item{legend_filter_mode}{Click legend to filter data. Choices: none, filter-in, filter-out. Single select : When clicked only shows the series selected Multi select : When clicked, hides series selected. Multiple series can be hidden Filterable legends are ignored in certain situations, such as when shading by series and using a series filter Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{legend_position}{Legend position. Choices: above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_legend}{Add data colors to header text. Choices: auto, custom, off. When selected, this will change the color of any text in your header which matches the name of a series in your data. This feature can be used instead of a legend when there are a small number of series, or it can be used to highlight a particular series. Note using optional HTML in the header is disabled if using this feature. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_legend_title}{Title. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{text_legend_subtitle}{Subtitle. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{text_legend_bold}{Bold. If checked, always use bold for colored items. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{VALUE}}} to include the numerical value of the current data point, or \code{{{SERIES}}} to display its series name. For any other selected columns use \code{{{column_name}}}. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{#if column_name\}\} Text to display when column_name is not empty \{\{/if\}\}}. For example, \code{{{Country}}} \verb{\{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{VALUE}}} to include the numerical value of the current data point, or \code{{{SERIES}}} to display its series name. For any other selected columns use \code{{{column_name}}}. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{#if column_name\}\} Text to display when column_name is not empty \{\{/if\}\}}. For example, \code{{{Country}}} \verb{\{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{VALUE}}} to include the numerical value of the current data point, or \code{{{SERIES}}} to display its series name. For any other selected columns use \code{{{column_name}}}. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{#if column_name\}\} Text to display when column_name is not empty \{\{/if\}\}}. For example, \code{{{Country}}} \verb{\{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{VALUE}}} to include the numerical value of the current data point, or \code{{{SERIES}}} to display its series name. For any other selected columns use \code{{{column_name}}}. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{#if column_name\}\} Text to display when column_name is not empty \{\{/if\}\}}. For example, \code{{{Country}}} \verb{\{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{popup_color_headers}{Color headers to match data. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{show_series_text}{Set series info in popups. Allows you to add information about each series/column (e.g. each line) to the popups. Note: This is incompatible with custom popup content. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{popup_series_text}{Popup content for series. Adds content to the popup about the series. Separate column name and text with a double colon. For example: Series 1 :: Comment about Series 1 Series 2 :: Comment about series 2. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_placement}{Placement of axis highlights. Choices: above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_enabled}{Show highlights on the x axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_lines}{One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: \verb{My label :: 2012 :: line_color / text_color :: facet_name}. For example, \verb{My label :: 2012 :: #eb0000 / #0084bd :: Category 1}. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_dash}{Dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_areas}{One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, \verb{My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_color}{Area. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_opacity}{Area opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_texture}{Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_vertical}{Vertical. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_y_position}{Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_x_position}{X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_font_weight}{Font weight. Choices: regular, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_shadow_color}{Shadow. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_shadow_enabled}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_enabled}{Show highlights on the y axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_lines}{One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: \verb{My label :: 2012 :: line_color / text_color :: facet_name}. For example: \verb{My label :: 2012 :: #eb0000 / #0084bd :: Category 1}. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_width}{line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_dash}{Dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_areas}{One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: \verb{My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_color}{Area. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_opacity}{Area opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_texture}{Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_x_position}{X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_y_position}{Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_font_weight}{Font weight. Choices: regular, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_shadow_color}{Shadow. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_shadow_enabled}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{annotations_styles}{Show styling options. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_label_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_background_mode}{Text background. Choices: none, outline, background. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_bg}{Outline. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_label_bg}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_alignment}{Alignment. Choices: auto, start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_popup_position}{Popup position. Choices: center, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_line_marker}{Marker. Choices: none, arrowhead_open, arrowhead. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_stroke_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_annotations_defaults_stroke_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_connector_extend_line}{Extend line. Choices: enabled, disabled. Flourish type hint: string, defaults to \code{NULL}} + +\item{data_trans_duration}{Animation duration. The duration of transitions in milliseconds, for example between two slides in a story. Flourish type hint: number, defaults to \code{NULL}} + +\item{animate_on_load}{Animate on load. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{data_trans_bind_series}{Only animate series with same name. Determines how animations work when the data changes (e.g. between slides in a story ). When this is on, series (e.g. lines) will attempt to animate to become another line only if they have the same name (i.e. the same column header). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{data_trans_bind_data_points}{Only animate points with same label. Determines how animations work when the data changes (e.g. between slides in a story ). When this is on, data points (e.g. dots or bars) will attempt to animate to become other data points if they have the same label (e.g. date or category). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_enabled}{Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_whitelist}{Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. \code{layout.background_color}. Flourish type hint: text, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set line, bar and pie charts chart details +} +\examples{ +try( + flourish(chart_type = "line", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_line_bar_pie_data(gapminder) |> + set_line_bar_pie_details() +) +} diff --git a/R_package/man/set_marimekko_details.Rd b/R_package/man/set_marimekko_details.Rd new file mode 100644 index 0000000..9e9094a --- /dev/null +++ b/R_package/man/set_marimekko_details.Rd @@ -0,0 +1,1484 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_marimekko_details.R +\name{set_marimekko_details} +\alias{set_marimekko_details} +\title{Set marimekko chart details} +\usage{ +set_marimekko_details( + ., + sort_by = NULL, + sort_direction = NULL, + orientation = NULL, + height_mode = NULL, + facet_aspect = NULL, + facet_aspect_mobile = NULL, + facet_aspect_breakpoint = NULL, + stack_padding_stacked = NULL, + stack_padding_unstacked = NULL, + color_mode = NULL, + stack_fade = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + enable_labels = NULL, + label_position = NULL, + chart_labels_max_width = NULL, + chart_labels_overlap_mode = NULL, + chart_labels_spreading_margin = NULL, + chart_labels_data_point_margin = NULL, + chart_labels_show_only_labels = NULL, + chart_labels_text_color = NULL, + chart_labels_text_size = NULL, + chart_labels_text_bg_color = NULL, + chart_labels_text_bg_size = NULL, + chart_labels_text_line_height = NULL, + chart_labels_text_max_lines = NULL, + chart_labels_text_weight = NULL, + chart_labels_lines = NULL, + chart_labels_line_style = NULL, + chart_labels_line_color = NULL, + chart_labels_line_width = NULL, + chart_labels_line_range = NULL, + chart_labels_line_padding = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + x_as_percentage = NULL, + matching_x_axis = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_x_axis_number_date_format_prefix = NULL, + chart_x_axis_number_date_format_suffix = NULL, + chart_x_axis_number_date_format_n_dec = NULL, + chart_x_axis_number_date_format_advanced = NULL, + chart_x_axis_number_date_format_negative_sign = NULL, + chart_x_axis_number_date_format_strip_zeros = NULL, + chart_x_axis_number_date_format_strip_separator = NULL, + chart_x_axis_number_date_format_transform_labels = NULL, + chart_x_axis_number_date_format_transform = NULL, + chart_x_axis_number_date_format_multiply_divide_constant = NULL, + chart_x_axis_number_date_format_exponentiate_constant = NULL, + y_as_percentage = NULL, + matching_y_axis = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_number_date_format_prefix = NULL, + chart_y_axis_number_date_format_suffix = NULL, + chart_y_axis_number_date_format_n_dec = NULL, + chart_y_axis_number_date_format_advanced = NULL, + chart_y_axis_number_date_format_negative_sign = NULL, + chart_y_axis_number_date_format_strip_zeros = NULL, + chart_y_axis_number_date_format_strip_separator = NULL, + chart_y_axis_number_date_format_transform_labels = NULL, + chart_y_axis_number_date_format_transform = NULL, + chart_y_axis_number_date_format_multiply_divide_constant = NULL, + chart_y_axis_number_date_format_exponentiate_constant = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_show_all = NULL, + filter_show_all_text = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_axes_highlights_x_enabled = NULL, + chart_axes_highlights_x_lines = NULL, + chart_axes_highlights_x_line_color = NULL, + chart_axes_highlights_x_line_width = NULL, + chart_axes_highlights_x_line_dash = NULL, + chart_axes_highlights_x_areas = NULL, + chart_axes_highlights_x_area_color = NULL, + chart_axes_highlights_x_area_opacity = NULL, + chart_axes_highlights_x_area_texture = NULL, + chart_axes_highlights_x_label_vertical = NULL, + chart_axes_highlights_x_label_y_position = NULL, + chart_axes_highlights_x_label_x_position = NULL, + chart_axes_highlights_x_label_max_width = NULL, + chart_axes_highlights_x_font_size = NULL, + chart_axes_highlights_x_font_weight = NULL, + chart_axes_highlights_x_label_color = NULL, + chart_axes_highlights_x_shadow_color = NULL, + chart_axes_highlights_x_shadow_enabled = NULL, + chart_axes_highlights_y_enabled = NULL, + chart_axes_highlights_y_lines = NULL, + chart_axes_highlights_y_line_color = NULL, + chart_axes_highlights_y_line_width = NULL, + chart_axes_highlights_y_line_dash = NULL, + chart_axes_highlights_y_areas = NULL, + chart_axes_highlights_y_area_color = NULL, + chart_axes_highlights_y_area_opacity = NULL, + chart_axes_highlights_y_area_texture = NULL, + chart_axes_highlights_y_label_x_position = NULL, + chart_axes_highlights_y_label_y_position = NULL, + chart_axes_highlights_y_label_max_width = NULL, + chart_axes_highlights_y_font_size = NULL, + chart_axes_highlights_y_font_weight = NULL, + chart_axes_highlights_y_label_color = NULL, + chart_axes_highlights_y_shadow_color = NULL, + chart_axes_highlights_y_shadow_enabled = NULL, + axes_highlights_stack_order = NULL, + annotations_styles = NULL, + chart_annotations_defaults_text_weight = NULL, + chart_annotations_defaults_text_size = NULL, + chart_annotations_defaults_text_color = NULL, + chart_annotations_defaults_label_width = NULL, + chart_annotations_defaults_text_background_mode = NULL, + chart_annotations_defaults_text_bg = NULL, + chart_annotations_defaults_label_bg = NULL, + chart_annotations_defaults_text_alignment = NULL, + chart_annotations_defaults_popup_position = NULL, + chart_annotations_defaults_line_marker = NULL, + chart_annotations_defaults_stroke_width = NULL, + chart_annotations_defaults_stroke_color = NULL, + chart_annotations_defaults_connector_extend_line = NULL, + animation_duration = NULL, + chart_background_background_color_enabled = NULL, + chart_background_background_image_enabled = NULL, + chart_background_background_color = NULL, + chart_background_background_image_src = NULL, + chart_background_background_image_size = NULL, + chart_background_background_image_position = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{sort_by}{Sort by. Choices: none, unstacked, stacked. Whether your chart is sorted by the primary (unstacked) or the secondary (stacked) metric. Flourish type hint: string, defaults to \code{NULL}} + +\item{sort_direction}{Sort direction. Choices: desc, asc. Flourish type hint: string, defaults to \code{NULL}} + +\item{orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{height_mode}{Height mode. Choices: auto, aspect_ratio. How the graphics height is determined. Auto uses the default Flourish responsive sizing. In Aspect ratio mode, you set the aspect ratio of the plot, and the container will be updated to accommodate it (not supported when embedded in a simple fixed-height iframe ). Flourish type hint: string, defaults to \code{NULL}} + +\item{facet_aspect}{Aspect (desktop). Aspect ratio of each chart in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_aspect_mobile}{Aspect (mobile). Aspect ratio of each chart in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_aspect_breakpoint}{Breakpoint. The width at which mobile mode ends and desktop begins (in px). Flourish type hint: number, defaults to \code{NULL}} + +\item{stack_padding_stacked}{Space between stacked values. The space between stacked values (in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{stack_padding_unstacked}{Space between stacks. The space between stacks (in rems). Flourish type hint: number, defaults to \code{NULL}} + +\item{color_mode}{Color mode. Choices: stack, bar. In order to color by stack, you need to have at least two columns bound to the Secondary metric Flourish type hint: string, defaults to \code{NULL}} + +\item{stack_fade}{Stack fade. How quickly the stacks fade. (Use 1 for no fade). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{enable_labels}{Show labels. Choices: auto, on, off. Auto turns labels off if there are more than 50. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_position}{Label position. Choices: edge_of_chart, edge_of_bar. This alters the position of the label from being at the edge of the chart to the edge of the bars. Note these two positions will only be different when the secondary measure is not being treated as a percentage. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_labels_max_width}{Max label width. The maximum allowed label width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_overlap_mode}{Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_labels_spreading_margin}{Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_data_point_margin}{Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_show_only_labels}{Show only certain labels. Manually specify which labels youd like to display (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_labels_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_labels_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_text_bg_color}{Outline. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_labels_text_bg_size}{Outline width. As a \% of the font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_text_max_lines}{Max lines. The max number of lines for each label. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_text_weight}{Weight. Choices: 400, 700. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_labels_lines}{Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_labels_line_style}{Line style. Choices: straight, step. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_labels_line_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_labels_line_width}{Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_line_range}{Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_labels_line_padding}{Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_columns_fixed}{Grid mode. Choices: \code{FALSE}, \code{TRUE}. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_columns}{Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width}{Min chart width. The minimum width of a chart or cell in the grid. Determines the number of columns. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width_fixed}{Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_custom_grid}{Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_custom_positions}{Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_facet_max_width}{Max chart width. The maximum width of a chart or cell in the grid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_w}{Horizontal margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_h}{Vertical margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_animation}{On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_titles}{Show titles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_title_align}{Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_size}{Size. Relative to the width of the chart. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_unit}{Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_padding_top}{Space above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_padding_bottom}{Space below. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_bg}{Background. Choices: none, full, text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_bg_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_bg_padding}{Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to \code{NULL}} + +\item{x_as_percentage}{Treat as percentage. Displays values summed to 100\%. This is useful for comparing proportional contributions across all categories. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{matching_x_axis}{Match x axes accross facets. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_axis_position}{Choices: bottom, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_y_axis_position}{Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_zero_axis}{Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_position}{Position. Choices: default, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_side}{Tick side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{y_as_percentage}{Treat as percentage. Displays values summed to 100\%. This is useful for comparing proportional contributions across all categories. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{matching_y_axis}{Match y axes accross facets. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_axis_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_zero_axis}{Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_title_position}{Position. Choices: side, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_position}{Position. Choices: default, above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_side}{Side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_show_all}{Include "All". Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_show_all_text}{Name for "All". Leave blank to not include an All option. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_controls_spacing}{Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_enabled}{Show highlights on the x axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_lines}{One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: \verb{My label :: 2012 :: line_color / text_color :: facet_name}. For example, \verb{My label :: 2012 :: #eb0000 / #0084bd :: Category 1}. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_dash}{Dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_areas}{One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, \verb{My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_color}{Area. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_opacity}{Area opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_texture}{Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_vertical}{Vertical. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_y_position}{Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_x_position}{X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_font_weight}{Font weight. Choices: regular, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_shadow_color}{Shadow. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_shadow_enabled}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_enabled}{Show highlights on the y axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_lines}{One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: \verb{My label :: 2012 :: line_color / text_color :: facet_name}. For example: \verb{My label :: 2012 :: #eb0000 / #0084bd :: Category 1}. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_width}{line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_dash}{Dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_areas}{One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: \verb{My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_color}{Area. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_opacity}{Area opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_texture}{Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_x_position}{X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_y_position}{Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_font_weight}{Font weight. Choices: regular, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_shadow_color}{Shadow. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_shadow_enabled}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{axes_highlights_stack_order}{Stack order. Choices: above_data, below_data. Whether your axis highlights should be displayed above or below your chart area. Flourish type hint: string, defaults to \code{NULL}} + +\item{annotations_styles}{Show styling options. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_label_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_background_mode}{Text background. Choices: none, outline, background. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_bg}{Outline. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_label_bg}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_alignment}{Alignment. Choices: auto, start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_popup_position}{Popup position. Choices: center, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_line_marker}{Marker. Choices: none, arrowhead_open, arrowhead. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_stroke_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_annotations_defaults_stroke_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_connector_extend_line}{Extend line. Choices: enabled, disabled. Flourish type hint: string, defaults to \code{NULL}} + +\item{animation_duration}{Animation duration. The duration of the animation (in seconds) when changing data or mode for example, between slides in a story Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_background_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_background_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_background_background_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_background_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_background_background_image_size}{Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_background_background_image_position}{Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set marimekko chart details +} +\examples{ +try( + flourish(chart_type = "marimekko", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_marimekko_data(gapminder) |> + set_marimekko_details() +) +} diff --git a/R_package/man/set_network_graph_details.Rd b/R_package/man/set_network_graph_details.Rd new file mode 100644 index 0000000..2af26c5 --- /dev/null +++ b/R_package/man/set_network_graph_details.Rd @@ -0,0 +1,737 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_network_graph_details.R +\name{set_network_graph_details} +\alias{set_network_graph_details} +\title{Set network graph chart details} +\usage{ +set_network_graph_details( + ., + chart_type = NULL, + radial_sort = NULL, + radial_sort_primary = NULL, + radial_sort_secondary = NULL, + height_mode = NULL, + facet_aspect = NULL, + facet_aspect_mobile = NULL, + facet_aspect_breakpoint = NULL, + ring_padding = NULL, + ring_angle = NULL, + fill_color = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + node_scale_pack = NULL, + constant_node_radius = NULL, + min_node_radius = NULL, + max_node_radius = NULL, + point_opacity = NULL, + fade_opacity = NULL, + image_opacity = NULL, + node_stroke_width = NULL, + node_stroke_color = NULL, + node_highlight_stroke_color = NULL, + points_advanced = NULL, + node_scale_type = NULL, + max_node_value = NULL, + auto_scale = NULL, + max_fullness = NULL, + label_size = NULL, + label_weight = NULL, + label_color_mode = NULL, + label_color = NULL, + label_show = NULL, + link_color = NULL, + link_opacity = NULL, + constant_link_width = NULL, + min_link_width = NULL, + max_link_width = NULL, + max_link_value = NULL, + links_advanced = NULL, + directional = NULL, + link_scale_type = NULL, + link_highlight_color = NULL, + link_highlight_opacity = NULL, + chart_popup_show_popups = NULL, + chart_popup_is_custom = NULL, + chart_popup_custom_template = NULL, + chart_popup_show_pointer = NULL, + chart_popup_show_shadow = NULL, + chart_popup_style_popups = NULL, + chart_popup_text_color = NULL, + chart_popup_align = NULL, + chart_popup_text_size = NULL, + chart_popup_fill_color = NULL, + chart_popup_opacity = NULL, + chart_popup_padding = NULL, + chart_popup_border_radius = NULL, + chart_popup_max_width = NULL, + popup_opacity = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_position = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + legend_interaction = NULL, + animate_simulation = NULL, + simulation_speed = NULL, + animate_transition = NULL, + transition_scale = NULL, + many_body_strength = NULL, + collision_strength = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{chart_type}{Choices: regular, radial. Flourish type hint: string, defaults to \code{NULL}} + +\item{radial_sort}{Radial sort mode. Choices: auto, none, clockwise, counter_clockwise. Whether sorting will be applied or not and in which direction. Flourish type hint: string, defaults to \code{NULL}} + +\item{radial_sort_primary}{Primary sort. Choices: group, id, size, link_count, link_value. The primary criteria used when ordering points. If there are ties when sorting the data the secondary sorting criteria is applied. Flourish type hint: string, defaults to \code{NULL}} + +\item{radial_sort_secondary}{Secondary sort. Choices: group, id, size, link_count, link_value. The secondary criteria used when ordering points. It is applied in cases where the primary sorting criteria results in a tie. Flourish type hint: string, defaults to \code{NULL}} + +\item{height_mode}{Height mode. Choices: auto, fill_space, aspect. How the graphics height is determined; ignored when embedded in a fixed-height context such as a simple iframe embed. Auto sets the height based on the chart type, data and width. Standard uses the default Flourish responsive sizing. Aspect ratio sets the aspect of each plot. Please note that animations between slides in a story will only work in Aspect ratio mode. Flourish type hint: string, defaults to \code{NULL}} + +\item{facet_aspect}{Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_aspect_mobile}{Aspect (mobile). Aspect of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_aspect_breakpoint}{Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to \code{NULL}} + +\item{ring_padding}{Ring padding (\%). Adds extra spacing around the outside of the radial layout. Flourish type hint: number, defaults to \code{NULL}} + +\item{ring_angle}{Ring rotation. The number of degrees to rotate the radial layout. Flourish type hint: number, defaults to \code{NULL}} + +\item{fill_color}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{node_scale_pack}{Pack points to fit radial layout. Scale points relatively to fit tightly around the perimiter of the radial layout, without leaving space between points. If enabled this option overrides other point sizing options in this section. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{constant_node_radius}{Radius. The radius of your points (in px). Flourish type hint: number, defaults to \code{NULL}} + +\item{min_node_radius}{Minimum radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{max_node_radius}{Maximum radius. The maximum radius of your points (in px). Flourish type hint: number, defaults to \code{NULL}} + +\item{point_opacity}{Opacity (default). How opaque the default state of the points in your network should be. Flourish type hint: number, defaults to \code{NULL}} + +\item{fade_opacity}{Opacity (unhighlighted). When a point is emphasized, how opaque the rest of the network should be. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_opacity}{Image opacity. How opaque the images in your points should be. Flourish type hint: number, defaults to \code{NULL}} + +\item{node_stroke_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{node_stroke_color}{Color. When not set, stroke color is same as background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{node_highlight_stroke_color}{Color (highlighted). When not set, stroke color is same as background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{points_advanced}{Advanced point settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{node_scale_type}{Scale points relative to:. Choices: current, arbitrary. Flourish type hint: string, defaults to \code{NULL}} + +\item{max_node_value}{Value. Values bigger than this maximum will have a radius equal to the maximum radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{auto_scale}{Scale points down when not enough space. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{max_fullness}{Max total point area. What percent of the space can the points fill before they are scaled down. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_weight}{Weight. Choices: bold, regular. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_color_mode}{Color mode. Choices: auto, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{label_show}{Show. Choices: auto, all, neighbourhood, click, none. When to show node labels. If set to "Auto" behavior is dynamic depending on chart type and available space. Flourish type hint: string, defaults to \code{NULL}} + +\item{link_color}{Color. When not set, uses same color as main text. Flourish type hint: color, defaults to \code{NULL}} + +\item{link_opacity}{Opacity. How opaque the links between your points should be. Flourish type hint: number, defaults to \code{NULL}} + +\item{constant_link_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{min_link_width}{Minimum width. Any smaller links will be scaled up to the specified level. (Ignored if greater than the Maximum width setting.). Flourish type hint: number, defaults to \code{NULL}} + +\item{max_link_width}{Maximum width. Flourish type hint: number, defaults to \code{NULL}} + +\item{max_link_value}{Value. Values bigger than this maximum will have a width equal to the maximum width. Flourish type hint: number, defaults to \code{NULL}} + +\item{links_advanced}{Advanced link settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{directional}{Show arrows on links. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{link_scale_type}{Scale links relative to:. Choices: current, arbitrary. Flourish type hint: string, defaults to \code{NULL}} + +\item{link_highlight_color}{Color (highlighted). When not set, uses same color as main text. Flourish type hint: color, defaults to \code{NULL}} + +\item{link_highlight_opacity}{Opacity (highlighted). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_show_popups}{Popups. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_is_custom}{Popup contents. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_custom_template}{Popup content. The text to appear in the popup. You can use \code{{{column_name}}} to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_show_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_style_popups}{Custom styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_text_color}{Text colour. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_text_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_fill_color}{Fill colour. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_border_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{popup_opacity}{Popup opacity on overlap. When the popup is overlapping other points and links, the opacity of the popup will change so most of the chart is still visible. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{legend_position}{Position. Choices: above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{legend_interaction}{When clicking a legend item. Choices: filter_and_layout, filter_in_position, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{animate_simulation}{Animate network simulation. Display the initial animation of the network. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{simulation_speed}{Animation speed. The speed of the initial animation (in ms). Flourish type hint: number, defaults to \code{NULL}} + +\item{animate_transition}{Animate layout transitions. Enable or disable layout transitions. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{transition_scale}{Transition duration. The duration multiplier for transition animations. Flourish type hint: number, defaults to \code{NULL}} + +\item{many_body_strength}{Repulsion between points. How strongly the points repulse each others. Known as many-body force. Measured in arbitrary units. Flourish type hint: number, defaults to \code{NULL}} + +\item{collision_strength}{Collision-force strength. How strongly the points push away from each other when colliding. In arbitrary units. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_localization_input_decimal_separator}{Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_output_separators}{Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set network graph chart details +} +\examples{ +try( + flourish(chart_type = "network", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_network_graph_data(gapminder) |> + set_network_graph_details() +) +} diff --git a/R_package/man/set_number_ticker_details.Rd b/R_package/man/set_number_ticker_details.Rd new file mode 100644 index 0000000..1f401f6 --- /dev/null +++ b/R_package/man/set_number_ticker_details.Rd @@ -0,0 +1,469 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_number_ticker_details.R +\name{set_number_ticker_details} +\alias{set_number_ticker_details} +\title{Set number ticker chart details} +\usage{ +set_number_ticker_details( + ., + mode = NULL, + number_start = NULL, + number = NULL, + custom_template = NULL, + font_unit = NULL, + font_size = NULL, + text_color = NULL, + font_weight = NULL, + line_height = NULL, + duration = NULL, + easing = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + value_format_prefix = NULL, + value_format_suffix = NULL, + value_format_n_dec = NULL, + value_format_advanced = NULL, + value_format_negative_sign = NULL, + value_format_strip_zeros = NULL, + value_format_strip_separator = NULL, + value_format_transform_labels = NULL, + value_format_transform = NULL, + value_format_multiply_divide_constant = NULL, + value_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{mode}{Choices: simple, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{number_start}{Tick from. Flourish type hint: number, defaults to \code{NULL}} + +\item{number}{Tick to. Flourish type hint: number, defaults to \code{NULL}} + +\item{custom_template}{Text and \code{{{numbers}}}. Put numbers to tick in double braces, e.g. \code{{{1000}}} to tick from 0 to 1000, or \code{{{-1000/1000}}} to count from -1000 to 1000. You can also use markdown styling, e.g. \strong{bold} and \emph{italic} or custom HTMLFlourish type hint: text, defaults to \code{NULL}} + +\item{font_unit}{Font size mode. Choices: vw, rem. When set to Scale with page, the text will always take up the same proportion of the page width, on any page size (e.g. mobile or desktop) When set to Default the text will be scaled responsively in the same way as other text components, such as the header text. Flourish type hint: string, defaults to \code{NULL}} + +\item{font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{font_weight}{Font weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{duration}{Duration. How many seconds you want the animation to last for. Flourish type hint: number, defaults to \code{NULL}} + +\item{easing}{Tick rate. Choices: constant, speed_up, slow_down, fast_slow_fast. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_input_decimal_separator}{Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_output_separators}{Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to \code{NULL}} + +\item{value_format_prefix}{Prefix. Text to place in front of number. Flourish type hint: string, defaults to \code{NULL}} + +\item{value_format_suffix}{Suffix. Text to place after number. Flourish type hint: string, defaults to \code{NULL}} + +\item{value_format_n_dec}{Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{value_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{value_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{value_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{value_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{value_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{value_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{value_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{value_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set number ticker chart details +} +\examples{ +try( + flourish(chart_type = "number_ticker", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + set_number_ticker_details() +) +} diff --git a/R_package/man/set_parliament_chart_details.Rd b/R_package/man/set_parliament_chart_details.Rd new file mode 100644 index 0000000..7477953 --- /dev/null +++ b/R_package/man/set_parliament_chart_details.Rd @@ -0,0 +1,803 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_parliament_chart_details.R +\name{set_parliament_chart_details} +\alias{set_parliament_chart_details} +\title{Set parliament chart chart details} +\usage{ +set_parliament_chart_details( + ., + num_of_seats = NULL, + hemicycle_arc = NULL, + circle_inner = NULL, + manual_row_count = NULL, + num_of_rows = NULL, + use_hover_animation = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + unassigned_color = NULL, + count_font_size = NULL, + count_weight = NULL, + party_font_size = NULL, + party_weight = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + legend_hide_empty_parties = NULL, + show_table = NULL, + gain_color = NULL, + loss_color = NULL, + default_text_color = NULL, + header_weight = NULL, + margin_table = NULL, + show_seat_change = NULL, + seat_change_before = NULL, + seat_change_after = NULL, + seat_change_label = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + majority_threshold_line_enabled = NULL, + majority_threshold_line_content = NULL, + majority_threshold_line_text_color = NULL, + majority_threshold_line_dashoffset = NULL, + majority_threshold_line_width = NULL, + majority_threshold_line_color = NULL, + animation_duration = NULL, + animation_stagger = NULL, + animate_on_load = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{num_of_seats}{Number of seats. This number is ignored if the value is lower than the actual number of seats in your data. Flourish type hint: number, defaults to \code{NULL}} + +\item{hemicycle_arc}{Size of arc. In degrees. Flourish type hint: number, defaults to \code{NULL}} + +\item{circle_inner}{Inner space. As a \% of the circle. Flourish type hint: number, defaults to \code{NULL}} + +\item{manual_row_count}{Number of rows. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{num_of_rows}{Rows. Flourish type hint: number, defaults to \code{NULL}} + +\item{use_hover_animation}{Highlight parties on hover. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{unassigned_color}{Unassigned outline color. Flourish type hint: color, defaults to \code{NULL}} + +\item{count_font_size}{Size. If the font size means that the seat count is too large to fit within the parliament, the text will be automatically scaled to fit. Flourish type hint: number, defaults to \code{NULL}} + +\item{count_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{party_font_size}{Size. If the font size means that the party name is too large to fit within the parliament, the text will be automatically scaled to fit. Flourish type hint: number, defaults to \code{NULL}} + +\item{party_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{legend_hide_empty_parties}{Dont include parties that dont have any seats. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{show_table}{Show table. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{gain_color}{Gain color. Flourish type hint: color, defaults to \code{NULL}} + +\item{loss_color}{Loss color. Flourish type hint: color, defaults to \code{NULL}} + +\item{default_text_color}{Default color. Flourish type hint: color, defaults to \code{NULL}} + +\item{header_weight}{Header text. Choices: bold, normal, italic. Flourish type hint: string, defaults to \code{NULL}} + +\item{margin_table}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{show_seat_change}{Choices: off, auto, custom. This adds a new column that shows the change between 2 columns. "Auto" will compare the last 2 columns in your data "Custom" will allow you to handpick 2 columns to compare. Flourish type hint: string, defaults to \code{NULL}} + +\item{seat_change_before}{Seat change before. Add the name of the column you want to compare with. Flourish type hint: string, defaults to \code{NULL}} + +\item{seat_change_after}{Seat change after. Add the name of the column you want to compare with. Flourish type hint: string, defaults to \code{NULL}} + +\item{seat_change_label}{Column name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{majority_threshold_line_enabled}{Show a line for the majority threshold. Draws a line at 50\%. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{majority_threshold_line_content}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{majority_threshold_line_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{majority_threshold_line_dashoffset}{Dash width and offset. In pixels, eg. 2,2. Flourish type hint: string, defaults to \code{NULL}} + +\item{majority_threshold_line_width}{Thickness. In pixels. Flourish type hint: number, defaults to \code{NULL}} + +\item{majority_threshold_line_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{animation_duration}{Animation duration. How long the seats take to "flip" when changing party, in seconds. Flourish type hint: number, defaults to \code{NULL}} + +\item{animation_stagger}{Animation spread. How many seconds to spread the seat animations across. Flourish type hint: number, defaults to \code{NULL}} + +\item{animate_on_load}{Animate on load. Whether to animate the seats when the visualisations first loads. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. The controls show up if youve selected multiple value columns. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_controls_spacing}{Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_localization_input_decimal_separator}{Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_output_separators}{Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set parliament chart chart details +} +\examples{ +try( + flourish(chart_type = "parliament", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_parliament_chart_data(gapminder) |> + set_parliament_chart_details() +) +} diff --git a/R_package/man/set_photo_slider_details.Rd b/R_package/man/set_photo_slider_details.Rd new file mode 100644 index 0000000..53eb003 --- /dev/null +++ b/R_package/man/set_photo_slider_details.Rd @@ -0,0 +1,448 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_photo_slider_details.R +\name{set_photo_slider_details} +\alias{set_photo_slider_details} +\title{Set photo slider chart details} +\usage{ +set_photo_slider_details( + ., + mode = NULL, + spotlight_size = NULL, + spotlight_blur = NULL, + spotlight_speed = NULL, + photo_1_big = NULL, + has_photo_1_small = NULL, + photo_1_small = NULL, + photo_2_big = NULL, + has_photo_2_small = NULL, + photo_2_small = NULL, + slider_radius = NULL, + slider_fill_type = NULL, + slider_fill_image = NULL, + slider_fill_overlay = NULL, + slider_fill_standalone = NULL, + slider_line_thickness = NULL, + slider_line_color = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{mode}{Before/after mode. Choices: slide, fade, spotlight. Flourish type hint: string, defaults to \code{NULL}} + +\item{spotlight_size}{Spotlight size. Flourish type hint: number, defaults to \code{NULL}} + +\item{spotlight_blur}{Spotlight blur. Flourish type hint: number, defaults to \code{NULL}} + +\item{spotlight_speed}{Spotlight animation. Time it takes to animate from one spotlight position to another in the story player Flourish type hint: number, defaults to \code{NULL}} + +\item{photo_1_big}{Flourish type hint: url, defaults to \code{NULL}} + +\item{has_photo_1_small}{Add smaller version for mobile. (Optional) Mobile versions will be loaded quicker on smaller screens. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{photo_1_small}{Photo 1 (mobile version). This picture should be roughly 500px wide. Flourish type hint: url, defaults to \code{NULL}} + +\item{photo_2_big}{Flourish type hint: url, defaults to \code{NULL}} + +\item{has_photo_2_small}{Add smaller version for mobile. (Optional) Mobile versions will be loaded quicker on smaller screens. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{photo_2_small}{Photo 2 (mobile version). This picture should be roughly 500px wide. Flourish type hint: url, defaults to \code{NULL}} + +\item{slider_radius}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{slider_fill_type}{Type. Choices: color, image. Flourish type hint: string, defaults to \code{NULL}} + +\item{slider_fill_image}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{slider_fill_overlay}{Fill. Flourish type hint: color, defaults to \code{NULL}} + +\item{slider_fill_standalone}{Fill (outside picture). Flourish type hint: color, defaults to \code{NULL}} + +\item{slider_line_thickness}{Slider line thickness. Flourish type hint: number, defaults to \code{NULL}} + +\item{slider_line_color}{Slider line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set photo slider chart details +} +\examples{ +try( + flourish(chart_type = "photo_slider", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + set_photo_slider_details() +) +} diff --git a/R_package/man/set_pictogram_details.Rd b/R_package/man/set_pictogram_details.Rd new file mode 100644 index 0000000..68aa665 --- /dev/null +++ b/R_package/man/set_pictogram_details.Rd @@ -0,0 +1,1145 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_pictogram_details.R +\name{set_pictogram_details} +\alias{set_pictogram_details} +\title{Set pictogram chart details} +\usage{ +set_pictogram_details( + ., + bar_orientation = NULL, + flip_bars = NULL, + bar_padding = NULL, + plot_aspect_ratio = NULL, + plot_aspect_ratio_mobile = NULL, + plot_aspect_ratio_breakpoint = NULL, + icons = NULL, + icon_padding = NULL, + auto_icon_value = NULL, + icon_value = NULL, + icon_color = NULL, + icon_style = NULL, + icon_stroke_thickness = NULL, + use_filler_icons = NULL, + filler_icon_color = NULL, + max_bar_value = NULL, + fill_final_row = NULL, + filler_icons = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + show_bar_labels = NULL, + bar_label_size = NULL, + bar_label_color = NULL, + bar_label_weight = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_value_legend_show_legend = NULL, + chart_value_legend_title_mode = NULL, + chart_value_legend_title = NULL, + chart_value_legend_swatch_width = NULL, + chart_value_legend_swatch_height = NULL, + chart_value_legend_swatch_radius = NULL, + chart_value_legend_legend_items_padding = NULL, + chart_value_legend_swatch_outline = NULL, + chart_value_legend_swatch_outline_color = NULL, + chart_value_legend_order_override = NULL, + chart_value_legend_icon_height = NULL, + chart_value_legend_icon_color = NULL, + chart_value_legend_max_width = NULL, + chart_value_legend_orientation = NULL, + value_legend_icon = NULL, + chart_icon_legend_show_legend = NULL, + chart_icon_legend_title_mode = NULL, + chart_icon_legend_title = NULL, + chart_icon_legend_swatch_width = NULL, + chart_icon_legend_swatch_height = NULL, + chart_icon_legend_swatch_radius = NULL, + chart_icon_legend_legend_items_padding = NULL, + chart_icon_legend_swatch_outline = NULL, + chart_icon_legend_swatch_outline_color = NULL, + chart_icon_legend_order_override = NULL, + chart_icon_legend_icon_height = NULL, + chart_icon_legend_icon_color = NULL, + chart_icon_legend_max_width = NULL, + chart_icon_legend_orientation = NULL, + chart_color_legend_show_legend = NULL, + chart_color_legend_title_mode = NULL, + chart_color_legend_title = NULL, + chart_color_legend_swatch_width = NULL, + chart_color_legend_swatch_height = NULL, + chart_color_legend_swatch_radius = NULL, + chart_color_legend_legend_items_padding = NULL, + chart_color_legend_swatch_outline = NULL, + chart_color_legend_swatch_outline_color = NULL, + chart_color_legend_order_override = NULL, + chart_color_legend_icon_height = NULL, + chart_color_legend_icon_color = NULL, + chart_color_legend_max_width = NULL, + chart_color_legend_orientation = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + value_control_visibility = NULL, + chart_value_filter_controls_control_type = NULL, + chart_value_filter_controls_control_styles = NULL, + chart_value_filter_controls_control_title = NULL, + chart_value_filter_controls_button_group = NULL, + chart_value_filter_controls_button_group_width_mode = NULL, + chart_value_filter_controls_button_group_width_fixed = NULL, + chart_value_filter_controls_dropdown_width_mode = NULL, + chart_value_filter_controls_dropdown_width_fixed = NULL, + chart_value_filter_controls_slider_width = NULL, + chart_value_filter_controls_slider_max_label_width = NULL, + chart_value_filter_controls_slider_step_time = NULL, + chart_value_filter_controls_slider_loop = NULL, + chart_value_filter_controls_slider_restart_pause = NULL, + chart_value_filter_controls_sort = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{bar_orientation}{Bar orientation. Choices: vertical, horizontal. Defines the orientation of the bars (vertical or horizontal). Flourish type hint: string, defaults to \code{NULL}} + +\item{flip_bars}{Flip bars. Flip the bars so they point in the opposite direction. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_padding}{Bar padding (\%). Padding surrounding bars (as a percentage of bar width). Flourish type hint: number, defaults to \code{NULL}} + +\item{plot_aspect_ratio}{Aspect (desktop). The aspect ratio of the pictogram plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. This only applies when embedding using a script (i.e., not AMP or iframe ). Flourish type hint: number, defaults to \code{NULL}} + +\item{plot_aspect_ratio_mobile}{Aspect (mobile). The aspect ratio of the pictogram plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. This only applies when embedding using a script (i.e., not AMP or iframe ). Flourish type hint: number, defaults to \code{NULL}} + +\item{plot_aspect_ratio_breakpoint}{Breakpoint. The screen width at which mobile mode ends and desktop begins. This only applies when embedding using a script (i.e., not AMP or iframe ). Flourish type hint: number, defaults to \code{NULL}} + +\item{icons}{Icons. Choices: binding, user, female, male, baby, child, wheelchair, angry, frown, meh, smile, smile-beam, thumbs-up, thumbs-down, hands-helping, hand-rock, hand-peace, dollar-sign, euro-sign, money-bill, money-bill-wave, pound-sign, coins, shopping-bag, shopping-cart, circle, square, star, heart, comment, cat, dog, dove, bus, car, biking, running, plane, suitcase, pizza-slice, ice-cream, coffee, wine-glass-alt, building, home, store, industry, database, laptop, microchip, phone, mobile-alt, tv, clock, atom, award, music, leaf, lightbulb, sun, wrench, airbnb, amazon, android, apple, bitcoin, facebook, google, linux, microsoft, twitter, windows, youtube. Use your own icons using icon bindings, or choose a built-in icon Flourish type hint: string, defaults to \code{NULL}} + +\item{icon_padding}{Icon padding (\%). Padding surrounding icons (as a percentage of the icon size). Flourish type hint: number, defaults to \code{NULL}} + +\item{auto_icon_value}{Auto icon value. Automatically calculate a sensible value for each icon. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{icon_value}{Icon value. The value that each icon represents. Flourish type hint: number, defaults to \code{NULL}} + +\item{icon_color}{Icon color. The color of the icons. Flourish type hint: color, defaults to \code{NULL}} + +\item{icon_style}{Icon style. Choices: solid, outline. The style (solid or outline) of the icons. Flourish type hint: string, defaults to \code{NULL}} + +\item{icon_stroke_thickness}{Icon outline thickness (\%). The outline thickness (as a percentage of the icon size). Flourish type hint: number, defaults to \code{NULL}} + +\item{use_filler_icons}{Use filler icons. Fill empty space with icons Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filler_icon_color}{Filler icon color. Color of filler icons. Flourish type hint: color, defaults to \code{NULL}} + +\item{max_bar_value}{Maximum bar value. (Optional) Maximum bar value (the remaining bar space will be filled with filler icons ). A value less than the largest bar value is disregarded. Flourish type hint: number, defaults to \code{NULL}} + +\item{fill_final_row}{Fill final row. Fill the final row of icons with filler icons (so that a grid of icons is formed). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filler_icons}{Filler icon. Choices: auto, user, female, male, baby, child, wheelchair, angry, frown, meh, smile, smile-beam, thumbs-up, thumbs-down, hands-helping, hand-rock, hand-peace, dollar-sign, euro-sign, money-bill, money-bill-wave, pound-sign, coins, shopping-bag, shopping-cart, circle, square, star, heart, comment, cat, dog, dove, bus, car, biking, running, plane, suitcase, pizza-slice, ice-cream, coffee, wine-glass-alt, building, home, store, industry, database, laptop, microchip, phone, mobile-alt, tv, clock, atom, award, music, leaf, lightbulb, sun, wrench, airbnb, amazon, android, apple, bitcoin, facebook, google, linux, microsoft, twitter, windows, youtube. Icon used to fill remaining space. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{show_bar_labels}{Show bar labels. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_label_size}{Size. Bar label size in rems (relative to the root font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_label_color}{Color. Bar label color. Flourish type hint: color, defaults to \code{NULL}} + +\item{bar_label_weight}{Weight. Choices: normal, bold. Bar label font weight. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_axis_position}{Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_y_axis_position}{Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_zero_axis}{Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_position}{Position. Choices: default, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_side}{Tick side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_localization_input_decimal_separator}{Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_output_separators}{Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_value_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_value_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_value_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_value_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_value_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_value_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_value_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{value_legend_icon}{Icon. Choices: auto, user, female, male, baby, child, wheelchair, angry, frown, meh, smile, smile-beam, thumbs-up, thumbs-down, hands-helping, hand-rock, hand-peace, dollar-sign, euro-sign, money-bill, money-bill-wave, pound-sign, coins, shopping-bag, shopping-cart, circle, square, star, heart, comment, cat, dog, dove, bus, car, biking, running, plane, suitcase, pizza-slice, ice-cream, coffee, wine-glass-alt, building, home, store, industry, database, laptop, microchip, phone, mobile-alt, tv, clock, atom, award, music, leaf, lightbulb, sun, wrench, airbnb, amazon, android, apple, bitcoin, facebook, google, linux, microsoft, twitter, windows, youtube. Icon used in legend. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_icon_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_icon_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_icon_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_icon_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_icon_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_icon_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_icon_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_icon_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_icon_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_icon_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_icon_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_icon_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_icon_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_icon_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{value_control_visibility}{Show value control. Choices: always, editor, never. Sets whether the value control is always visible, only visible when editing or never visible. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_value_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_value_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_value_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_value_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_value_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_value_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_value_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_value_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_value_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set pictogram chart details +} +\examples{ +try( + flourish(chart_type = "pictogram", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_pictogram_data(gapminder) |> + set_pictogram_details() +) +} diff --git a/R_package/man/set_quiz_details.Rd b/R_package/man/set_quiz_details.Rd new file mode 100644 index 0000000..c8ba498 --- /dev/null +++ b/R_package/man/set_quiz_details.Rd @@ -0,0 +1,569 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_quiz_details.R +\name{set_quiz_details} +\alias{set_quiz_details} +\title{Set quiz chart details} +\usage{ +set_quiz_details( + ., + color_primary = NULL, + color_neutral = NULL, + color_correct = NULL, + block_text_color = NULL, + text_border_color = NULL, + block_text_size = NULL, + block_text_size_custom = NULL, + block_background = NULL, + block_padding = NULL, + block_border_width = NULL, + block_border_color = NULL, + block_border_radius = NULL, + block_shadow = NULL, + block_shadow_blur = NULL, + block_shadow_opacity = NULL, + block_btn_text_color = NULL, + block_btn_text_size = NULL, + block_btn_text_size_custom = NULL, + show_all_questions = NULL, + slider_handle_fill = NULL, + slider_handle_radius = NULL, + slider_handle_stroke = NULL, + slider_channel_fill = NULL, + slider_channel_height = NULL, + slider_comparison_opacity = NULL, + slider_range_type = NULL, + slider_range_min = NULL, + slider_range_max = NULL, + slider_range_step = NULL, + slider_range_custom = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + mc_background = NULL, + mc_border_color = NULL, + mc_border_width = NULL, + mc_border_radius = NULL, + dropdown = NULL, + dropdown_default_label = NULL, + dropdown_label_color = NULL, + slider_advanced_scoring = NULL, + slider_score_zone_percent = NULL, + slider_correct_zone_percent = NULL, + end_result_default_text = NULL, + text_your_answer = NULL, + text_submit = NULL, + text_dropdown_label = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{color_primary}{User input. Flourish type hint: color, defaults to \code{NULL}} + +\item{color_neutral}{Neutral. Flourish type hint: color, defaults to \code{NULL}} + +\item{color_correct}{Correct. Flourish type hint: color, defaults to \code{NULL}} + +\item{block_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{text_border_color}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{block_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{block_text_size_custom}{Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{block_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{block_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{block_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{block_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{block_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{block_shadow}{Enabled. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{block_shadow_blur}{Blur. Flourish type hint: number, defaults to \code{NULL}} + +\item{block_shadow_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{block_btn_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{block_btn_text_size}{Size. Choices: 1.1, 1.2, 1.4, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{block_btn_text_size_custom}{Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{show_all_questions}{Show unanswered questions. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{slider_handle_fill}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{slider_handle_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{slider_handle_stroke}{Border. Flourish type hint: number, defaults to \code{NULL}} + +\item{slider_channel_fill}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{slider_channel_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{slider_comparison_opacity}{Comparison opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{slider_range_type}{Slider range. Choices: auto, fixed, custom. In Auto mode, the range will go from 0 to the nearest power of 10. In Fixed mode, you can set a fixed range for every question. In Custom mode, you can set a range for each individual question. Flourish type hint: string, defaults to \code{NULL}} + +\item{slider_range_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{slider_range_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{slider_range_step}{Step. Flourish type hint: number, defaults to \code{NULL}} + +\item{slider_range_custom}{Custom. Set a custom range for each question. Write a new range on each line with the following format: \verb{question text :: range minimum :: range maximum :: range step}. < For example: \verb{How many people live in London? :: 1000000 :: 20000000 :: 1000} Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{mc_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{mc_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{mc_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{mc_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{dropdown}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{dropdown_default_label}{Default comparison. Type in an answer thats selected as a default when you load the visualization. Flourish type hint: string, defaults to \code{NULL}} + +\item{dropdown_label_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{slider_advanced_scoring}{Linear scores for slider questions. Rather than a slider answer just being "right" or "wrong", change this setting to get a higher score the closer you are to the correct answer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{slider_score_zone_percent}{Scoring zone (\%). Defines how close (as a percentage of the slider range) the input needs to be to the correct answer to produce a score. For example, for a slider range of 0 to 200, a correct answer of 45, and a scoring zone of 10\%, the score is non-zero if the input is between 25 and 65 (because 10\% of the slider range is 20). The score increases linearly from 0 at the scoring zone boundary to a score of 1 at the correct answer. Flourish type hint: number, defaults to \code{NULL}} + +\item{slider_correct_zone_percent}{Correct zone (\%). Defines how close (as a percentage of the scoring zone) the input needs to be to the correct answer to produce a full score of 1. For example, for a slider range of 0 to 200, a correct answer of 45, a scoring zone of 10\%, and a correct zone of 50\%, the score is 1 if the input is between 35 and 55 (because 50\% of the scoring zone is 10). The score increases linearly from the scoring zone boundary to the correct zone boundary. For example, inputs of 20, 25, 30, 35, or 40 scores 0, 0, 0.5, 1, or 1, respectively. Flourish type hint: number, defaults to \code{NULL}} + +\item{end_result_default_text}{Default end result text. This is the text that shows up after youve finished the quiz. You can add custom end result text for specific score ranges in the Data tab, inside the End result sheet. Flourish type hint: text, defaults to \code{NULL}} + +\item{text_your_answer}{Slider your answer. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_submit}{Submit button. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_dropdown_label}{Dropdown label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_input_decimal_separator}{Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_output_separators}{Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set quiz chart details +} +\examples{ +try( + flourish(chart_type = "quiz", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_quiz_data(gapminder) |> + set_quiz_details() +) +} diff --git a/R_package/man/set_radar_details.Rd b/R_package/man/set_radar_details.Rd new file mode 100644 index 0000000..a5aa019 --- /dev/null +++ b/R_package/man/set_radar_details.Rd @@ -0,0 +1,1103 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_radar_details.R +\name{set_radar_details} +\alias{set_radar_details} +\title{Set radar chart chart details} +\usage{ +set_radar_details( + ., + radars_curve = NULL, + radars_star = NULL, + radars_stroke_width = NULL, + radars_stroke_opacity = NULL, + radars_fill_opacity = NULL, + radars_star_inner_radius = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + facet_comparisons = NULL, + facet_comparison_stroke = NULL, + facet_comparison_stroke_width = NULL, + facet_comparison_stroke_opacity = NULL, + facet_comparison_fill = NULL, + facet_comparison_fill_opacity = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + chart_radial_axis_axis_show = NULL, + chart_radial_axis_x_line_color = NULL, + chart_radial_axis_x_line_width = NULL, + chart_radial_axis_x_tick_label_color = NULL, + chart_radial_axis_x_tick_label_size = NULL, + chart_radial_axis_x_tick_label_outline = NULL, + chart_radial_axis_x_tick_label_weight = NULL, + chart_radial_axis_y_min = NULL, + chart_radial_axis_y_max = NULL, + chart_radial_axis_y_tick_number = NULL, + chart_radial_axis_y_line_color = NULL, + chart_radial_axis_y_line_width = NULL, + chart_radial_axis_y_line_dash = NULL, + chart_radial_axis_y_line_dash_gap = NULL, + chart_radial_axis_y_tick_label_color = NULL, + chart_radial_axis_y_tick_label_size = NULL, + chart_radial_axis_y_tick_label_outline = NULL, + chart_radial_axis_y_tick_label_space = NULL, + chart_radial_axis_y_tick_label_weight = NULL, + chart_radial_axis_margin_top = NULL, + chart_radial_axis_margin_right = NULL, + chart_radial_axis_margin_bottom = NULL, + chart_radial_axis_margin_left = NULL, + chart_radial_axis_group_labels = NULL, + chart_radial_axis_group_labels_color = NULL, + chart_radial_axis_group_labels_size = NULL, + chart_radial_axis_group_labels_letter_spacing = NULL, + chart_radial_axis_group_labels_space_above = NULL, + chart_radial_axis_group_labels_space_below = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_legend_show_legend = NULL, + chart_legend_title_mode = NULL, + chart_legend_title = NULL, + chart_legend_swatch_width = NULL, + chart_legend_swatch_height = NULL, + chart_legend_swatch_radius = NULL, + chart_legend_legend_items_padding = NULL, + chart_legend_swatch_outline = NULL, + chart_legend_swatch_outline_color = NULL, + chart_legend_order_override = NULL, + chart_legend_icon_height = NULL, + chart_legend_icon_color = NULL, + chart_legend_max_width = NULL, + chart_legend_orientation = NULL, + facet_control_show = NULL, + facet_control_default = NULL, + facet_control_none = NULL, + facets_label_combined = NULL, + facet_control_individual = NULL, + facets_label_separate = NULL, + chart_facet_filter_controls_control_type = NULL, + chart_facet_filter_controls_control_styles = NULL, + chart_facet_filter_controls_control_title = NULL, + chart_facet_filter_controls_button_group = NULL, + chart_facet_filter_controls_button_group_width_mode = NULL, + chart_facet_filter_controls_button_group_width_fixed = NULL, + chart_facet_filter_controls_dropdown_width_mode = NULL, + chart_facet_filter_controls_dropdown_width_fixed = NULL, + chart_facet_filter_controls_slider_width = NULL, + chart_facet_filter_controls_slider_max_label_width = NULL, + chart_facet_filter_controls_slider_step_time = NULL, + chart_facet_filter_controls_slider_loop = NULL, + chart_facet_filter_controls_slider_restart_pause = NULL, + chart_facet_filter_controls_sort = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_control_all = NULL, + filter_y_max = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + popup_color_headings = NULL, + duration = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{radars_curve}{Line curve. Choices: linear, cardinal. Flourish type hint: string, defaults to \code{NULL}} + +\item{radars_star}{Line shape. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{radars_stroke_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{radars_stroke_opacity}{Line opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{radars_fill_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{radars_star_inner_radius}{Star inner. The star shapes inner radius, as a percent of the max radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_comparisons}{Show comparison lines in grid mode. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{facet_comparison_stroke}{Line. Flourish type hint: color, defaults to \code{NULL}} + +\item{facet_comparison_stroke_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_comparison_stroke_opacity}{Line opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_comparison_fill}{Fill. Flourish type hint: color, defaults to \code{NULL}} + +\item{facet_comparison_fill_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_columns_fixed}{Grid mode. Choices: \code{FALSE}, \code{TRUE}. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_columns}{Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width}{Min chart width. The minimum width of a chart or cell in the grid. Determines the number of columns. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width_fixed}{Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_custom_grid}{Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_custom_positions}{Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_facet_max_width}{Max chart width. The maximum width of a chart or cell in the grid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_w}{Horizontal margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_h}{Vertical margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_animation}{On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_titles}{Show titles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_title_align}{Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_size}{Size. Relative to the width of the chart. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_unit}{Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_padding_top}{Space above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_padding_bottom}{Space below. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_bg}{Background. Choices: none, full, text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_bg_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_bg_padding}{Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_axis_show}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_radial_axis_x_line_color}{Line. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_radial_axis_x_line_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_x_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_radial_axis_x_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_x_tick_label_outline}{Outline. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_x_tick_label_weight}{Choices: 600, 400. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_radial_axis_y_min}{Min value. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_y_max}{Max value. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_y_tick_number}{Number. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_y_line_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_radial_axis_y_line_width}{Width. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_radial_axis_y_line_dash}{Dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_radial_axis_y_line_dash_gap}{Gap. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_radial_axis_y_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_radial_axis_y_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_y_tick_label_outline}{Outline. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_y_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_y_tick_label_weight}{Choices: 600, 400. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_radial_axis_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_group_labels}{Outer labels. Enter one per line, with an angle and a label separated by a colon, such as: 50: My Label. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_radial_axis_group_labels_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_radial_axis_group_labels_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_group_labels_letter_spacing}{Letter spacing. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_group_labels_space_above}{Space above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_radial_axis_group_labels_space_below}{Space below. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{facet_control_show}{Show charts grid control. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{facet_control_default}{Option to show on load. If you want to specify a different facet view to show on load either make a story or enter the label from the relevant button here. Case sensitive. Flourish type hint: string, defaults to \code{NULL}} + +\item{facet_control_none}{Include combined option. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{facets_label_combined}{Combined label. Flourish type hint: string, defaults to \code{NULL}} + +\item{facet_control_individual}{Include separate option. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{facets_label_separate}{Separate label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_control_all}{Name for "All". Leave blank to not include an "All" option. Flourish type hint: string, defaults to \code{NULL}} + +\item{filter_y_max}{Update axis y max when filtering. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_controls_spacing}{Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{popup_color_headings}{Color popup headings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{duration}{Duration. The duration, in seconds, of transitions for example between two slides in a story. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set radar chart chart details +} +\examples{ +try( + flourish(chart_type = "radar", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_radar_data(gapminder) |> + set_radar_details() +) +} diff --git a/R_package/man/set_sankey_details.Rd b/R_package/man/set_sankey_details.Rd new file mode 100644 index 0000000..f13af39 --- /dev/null +++ b/R_package/man/set_sankey_details.Rd @@ -0,0 +1,971 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_sankey_details.R +\name{set_sankey_details} +\alias{set_sankey_details} +\title{Set sankey diagram chart details} +\usage{ +set_sankey_details( + ., + mode = NULL, + spread = NULL, + alignment = NULL, + sorting_mode = NULL, + node_sort_order = NULL, + iterations = NULL, + setup_settings = NULL, + node_width = NULL, + node_padding = NULL, + top_padding = NULL, + bottom_padding = NULL, + height_mode = NULL, + facet_aspect = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + facets_hide_empty = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + link_opacity = NULL, + background_opacity = NULL, + custom_node_color = NULL, + links_color_mode = NULL, + label_mode = NULL, + label_outwards_max_width = NULL, + label_color_mode = NULL, + label_color = NULL, + label_bold = NULL, + label_show_values = NULL, + label_show_values_links = NULL, + label_color_links = NULL, + label_outline = NULL, + label_outline_width = NULL, + label_font_size = NULL, + label_facet_scaling = NULL, + show_node_headings = NULL, + node_headings_bold = NULL, + node_headings_font_size = NULL, + node_headings_padding = NULL, + node_headings_max_width = NULL, + node_headings_color = NULL, + node_headings_overrides = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_show_all = NULL, + filter_show_all_text = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + popup_type = NULL, + intro_duration = NULL, + intro_ease_range = NULL, + transition_duration = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{mode}{Mode. Choices: alluvial, sankey. Flourish type hint: string, defaults to \code{NULL}} + +\item{spread}{Spread. Choices: step, column. Flourish type hint: string, defaults to \code{NULL}} + +\item{alignment}{Alignment. Choices: justify, center, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{sorting_mode}{Sorting. Choices: datasheet, name, value, reduce_overlaps. Match sheet sorts based on the order of the categories as they appear in the datasheet. Value sorts by the value of the nodes at each stage. Reduce overlaps reduces the overlapping of links. Flourish type hint: string, defaults to \code{NULL}} + +\item{node_sort_order}{Order. Choices: ascending, descending. Flourish type hint: string, defaults to \code{NULL}} + +\item{iterations}{Iterations. Number of iterations of the layout algorithm before the diagram is drawn. The higher the value, the fewer link crossings you will see but the less likely the order is to match that in the datasheet. Flourish type hint: number, defaults to \code{NULL}} + +\item{setup_settings}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{node_width}{Node width. Flourish type hint: number, defaults to \code{NULL}} + +\item{node_padding}{Node spacing. The vertical gap between nodes. Flourish type hint: number, defaults to \code{NULL}} + +\item{top_padding}{Margin above. Adds space at the top of the diagram; useful to accommodate any overflowing labels. Flourish type hint: number, defaults to \code{NULL}} + +\item{bottom_padding}{Margin below. Adds space at the bottom of the diagram; useful to accommodate any overflowing labels. Flourish type hint: number, defaults to \code{NULL}} + +\item{height_mode}{Height mode. Choices: aspect, standard. Whether responsive embeds should set their own height or use the standard responsive Flourish embed heights. Ignored in simple Iframe embeds, Canva and other fixed-height contexts. Flourish type hint: string, defaults to \code{NULL}} + +\item{facet_aspect}{Aspect. Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_columns_fixed}{Grid mode. Choices: \code{FALSE}, \code{TRUE}. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_columns}{Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width}{Min chart width. The minimum width of a chart or cell in the grid. Determines the number of columns. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width_fixed}{Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_custom_grid}{Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_custom_positions}{Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_facet_max_width}{Max chart width. The maximum width of a chart or cell in the grid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_w}{Horizontal margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_h}{Vertical margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_animation}{On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_titles}{Show titles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_title_align}{Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_size}{Size. Relative to the width of the chart. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_unit}{Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_padding_top}{Space above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_padding_bottom}{Space below. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_bg}{Background. Choices: none, full, text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_bg_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_bg_padding}{Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to \code{NULL}} + +\item{facets_hide_empty}{Hide empty charts when filtering. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{link_opacity}{Link opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{background_opacity}{Defocused opacity. When a node or link is in focus, this sets the opacity of the links and nodes not in focus. Flourish type hint: number, defaults to \code{NULL}} + +\item{custom_node_color}{Custom node color. Flourish type hint: color, defaults to \code{NULL}} + +\item{links_color_mode}{Links color mode. Choices: node, source, target. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_mode}{Position. Choices: outwards, inwards. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_outwards_max_width}{Space. The max space available for the labels, as a percentage of the chart width. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_color_mode}{Color mode. Choices: auto, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{label_bold}{Bold. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_show_values}{Include values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_show_values_links}{Show link values. Choices: never, focused, always. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_color_links}{Colour. Flourish type hint: color, defaults to \code{NULL}} + +\item{label_outline}{Outline. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_outline_width}{Width. As a percent of the font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_font_size}{Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_facet_scaling}{Scale with grid. Sets a max size based on the facet size, regardless of the page width. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{show_node_headings}{Show headings. Enables the labels above each column of nodes in an Alluvial diagram. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{node_headings_bold}{Bold. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{node_headings_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{node_headings_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{node_headings_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{node_headings_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{node_headings_overrides}{Custom overrides. On each line, type the step heading that you want to override, a double colon and then the replacement step heading. For example: 1 :: Phase A 2 :: Phase B. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_show_all}{Include "All". Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_show_all_text}{“All” label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{LABEL}}} to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use \code{{{column_name}}}. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{# if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} If statements can also be used to show certain content for links only or nodes only. Use \verb{\{\{#if IS_LINK\}\}} or \verb{\{\{#if IS_NODE\}\}} like so: \verb{\{\{#if IS_LINK\}\} This is a link popup \{\{/if\}\}} \verb{\{\{#if IS_NODE\}\} This is a node popup \{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{LABEL}}} to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use \code{{{column_name}}}. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{# if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} If statements can also be used to show certain content for links only or nodes only. Use \verb{\{\{#if IS_LINK\}\}} or \verb{\{\{#if IS_NODE\}\}} like so: \verb{\{\{#if IS_LINK\}\} This is a link popup \{\{/if\}\}} \verb{\{\{#if IS_NODE\}\} This is a node popup \{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{LABEL}}} to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use \code{{{column_name}}}. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{# if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} If statements can also be used to show certain content for links only or nodes only. Use \verb{\{\{#if IS_LINK\}\}} or \verb{\{\{#if IS_NODE\}\}} like so: \verb{\{\{#if IS_LINK\}\} This is a link panel \{\{/if\}\}} \verb{\{\{#if IS_NODE\}\} This is a node panel \{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{LABEL}}} to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use \code{{{column_name}}}. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{# if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} If statements can also be used to show certain content for links only or nodes only. Use \verb{\{\{#if IS_LINK\}\}} or \verb{\{\{#if IS_NODE\}\}} like so: \verb{\{\{#if IS_LINK\}\} This is a link panel \{\{/if\}\}} \verb{\{\{#if IS_NODE\}\} This is a node panel \{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{popup_type}{Type. Choices: links, nodes, all. Flourish type hint: string, defaults to \code{NULL}} + +\item{intro_duration}{Duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{intro_ease_range}{Speed variation. When set at zero, all the links are revealed at an even speed. When set above zero, the lines randomly accelerate and decelerate slightly to give a more natural effect. Flourish type hint: number, defaults to \code{NULL}} + +\item{transition_duration}{Duration. In seconds. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set sankey diagram chart details +} +\examples{ +try( + flourish(chart_type = "sankey", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_sankey_data(gapminder) |> + set_sankey_details() +) +} diff --git a/R_package/man/set_scatter_details.Rd b/R_package/man/set_scatter_details.Rd new file mode 100644 index 0000000..b022332 --- /dev/null +++ b/R_package/man/set_scatter_details.Rd @@ -0,0 +1,1733 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_scatter_details.R +\name{set_scatter_details} +\alias{set_scatter_details} +\title{Set scatter chart details} +\usage{ +set_scatter_details( + ., + default_color = NULL, + fill_opacity = NULL, + default_shape = NULL, + data_point_default_size = NULL, + data_point_min_size = NULL, + data_point_max_size = NULL, + responsive_dots = NULL, + stroke_opacity = NULL, + stroke_width = NULL, + stroke_mode = NULL, + stroke_color = NULL, + render_mode = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + labels_show = NULL, + labels_selective = NULL, + label_color_type = NULL, + label_color = NULL, + labels_responsive = NULL, + label_font_size = NULL, + label_font_size_min = NULL, + label_font_size_max = NULL, + label_bg_size = NULL, + label_max_width = NULL, + label_align = NULL, + label_x_offset = NULL, + label_y_offset = NULL, + height_mode = NULL, + facet_aspect = NULL, + facet_aspect_mobile = NULL, + chart_background_background_color_enabled = NULL, + chart_background_background_image_enabled = NULL, + chart_background_background_color = NULL, + chart_background_background_image_src = NULL, + chart_background_background_image_size = NULL, + chart_background_background_image_position = NULL, + margin_top = NULL, + margin_right = NULL, + margin_bottom = NULL, + margin_left = NULL, + facet_fixed_cols = NULL, + facet_min_w = NULL, + facet_cols = NULL, + facet_gutter_w = NULL, + facet_gutter_h = NULL, + facet_header_font_size = NULL, + facet_title_align = NULL, + facet_header_color = NULL, + lines_show = NULL, + line_width = NULL, + line_curve = NULL, + line_opacity = NULL, + line_color_mode = NULL, + line_per_facet = NULL, + line_color = NULL, + line_arrows = NULL, + line_arrow_size = NULL, + line_arrow_color_mode = NULL, + line_arrow_color = NULL, + x_matching = NULL, + x_single_row = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_x_axis_number_date_format_prefix = NULL, + chart_x_axis_number_date_format_suffix = NULL, + chart_x_axis_number_date_format_n_dec = NULL, + chart_x_axis_number_date_format_advanced = NULL, + chart_x_axis_number_date_format_negative_sign = NULL, + chart_x_axis_number_date_format_strip_zeros = NULL, + chart_x_axis_number_date_format_strip_separator = NULL, + chart_x_axis_number_date_format_transform_labels = NULL, + chart_x_axis_number_date_format_transform = NULL, + chart_x_axis_number_date_format_multiply_divide_constant = NULL, + chart_x_axis_number_date_format_exponentiate_constant = NULL, + y_matching = NULL, + y_single_col = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_number_date_format_prefix = NULL, + chart_y_axis_number_date_format_suffix = NULL, + chart_y_axis_number_date_format_n_dec = NULL, + chart_y_axis_number_date_format_advanced = NULL, + chart_y_axis_number_date_format_negative_sign = NULL, + chart_y_axis_number_date_format_strip_zeros = NULL, + chart_y_axis_number_date_format_strip_separator = NULL, + chart_y_axis_number_date_format_transform_labels = NULL, + chart_y_axis_number_date_format_transform = NULL, + chart_y_axis_number_date_format_multiply_divide_constant = NULL, + chart_y_axis_number_date_format_exponentiate_constant = NULL, + legend_position = NULL, + legend_filtering_mode = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_continous_legend_show_legend = NULL, + chart_continous_legend_title_mode = NULL, + chart_continous_legend_title = NULL, + chart_continous_legend_color_band_width = NULL, + chart_continous_legend_color_band_height = NULL, + chart_continous_legend_color_band_radius = NULL, + chart_continous_legend_binned_label_mode = NULL, + chart_continous_legend_binned_label_custom = NULL, + chart_continous_legend_legend_min = NULL, + chart_continous_legend_additional_min_label = NULL, + chart_continous_legend_legend_max = NULL, + chart_continous_legend_additional_max_label = NULL, + text_legend = NULL, + text_legend_title = NULL, + text_legend_subtitle = NULL, + text_legend_bold = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_show_all = NULL, + filter_show_all_text = NULL, + filter_updates_axes = NULL, + slider_updates_axes = NULL, + time_label_show = NULL, + time_label_color = NULL, + time_label_opacity = NULL, + time_label_font_size = NULL, + chart_slider_filter_controls_control_type = NULL, + chart_slider_filter_controls_control_styles = NULL, + chart_slider_filter_controls_control_title = NULL, + chart_slider_filter_controls_button_group = NULL, + chart_slider_filter_controls_button_group_width_mode = NULL, + chart_slider_filter_controls_button_group_width_fixed = NULL, + chart_slider_filter_controls_dropdown_width_mode = NULL, + chart_slider_filter_controls_dropdown_width_fixed = NULL, + chart_slider_filter_controls_slider_width = NULL, + chart_slider_filter_controls_slider_max_label_width = NULL, + chart_slider_filter_controls_slider_step_time = NULL, + chart_slider_filter_controls_slider_loop = NULL, + chart_slider_filter_controls_slider_restart_pause = NULL, + chart_slider_filter_controls_sort = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + fit_type = NULL, + fit_force_origin = NULL, + fit_line_width = NULL, + fit_line_dash = NULL, + fit_line_color = NULL, + beeswarm_plot = NULL, + box_plot = NULL, + box_color = NULL, + box_opacity = NULL, + box_line_color = NULL, + box_line_width = NULL, + box_whisker_type = NULL, + box_whisker_multiplier = NULL, + use_box_popup = NULL, + box_first_quartile_text = NULL, + box_median_text = NULL, + box_third_quartile_text = NULL, + violin_plot = NULL, + violin_bandwidth = NULL, + violin_samples = NULL, + violin_color = NULL, + violin_opacity = NULL, + violin_sizing = NULL, + chart_axes_highlights_x_enabled = NULL, + chart_axes_highlights_x_lines = NULL, + chart_axes_highlights_x_line_color = NULL, + chart_axes_highlights_x_line_width = NULL, + chart_axes_highlights_x_line_dash = NULL, + chart_axes_highlights_x_areas = NULL, + chart_axes_highlights_x_area_color = NULL, + chart_axes_highlights_x_area_opacity = NULL, + chart_axes_highlights_x_area_texture = NULL, + chart_axes_highlights_x_label_vertical = NULL, + chart_axes_highlights_x_label_y_position = NULL, + chart_axes_highlights_x_label_x_position = NULL, + chart_axes_highlights_x_label_max_width = NULL, + chart_axes_highlights_x_font_size = NULL, + chart_axes_highlights_x_font_weight = NULL, + chart_axes_highlights_x_label_color = NULL, + chart_axes_highlights_x_shadow_color = NULL, + chart_axes_highlights_x_shadow_enabled = NULL, + chart_axes_highlights_y_enabled = NULL, + chart_axes_highlights_y_lines = NULL, + chart_axes_highlights_y_line_color = NULL, + chart_axes_highlights_y_line_width = NULL, + chart_axes_highlights_y_line_dash = NULL, + chart_axes_highlights_y_areas = NULL, + chart_axes_highlights_y_area_color = NULL, + chart_axes_highlights_y_area_opacity = NULL, + chart_axes_highlights_y_area_texture = NULL, + chart_axes_highlights_y_label_x_position = NULL, + chart_axes_highlights_y_label_y_position = NULL, + chart_axes_highlights_y_label_max_width = NULL, + chart_axes_highlights_y_font_size = NULL, + chart_axes_highlights_y_font_weight = NULL, + chart_axes_highlights_y_label_color = NULL, + chart_axes_highlights_y_shadow_color = NULL, + chart_axes_highlights_y_shadow_enabled = NULL, + annotations_styling = NULL, + chart_annotations_defaults_text_weight = NULL, + chart_annotations_defaults_text_size = NULL, + chart_annotations_defaults_text_color = NULL, + chart_annotations_defaults_label_width = NULL, + chart_annotations_defaults_text_background_mode = NULL, + chart_annotations_defaults_text_bg = NULL, + chart_annotations_defaults_label_bg = NULL, + chart_annotations_defaults_text_alignment = NULL, + chart_annotations_defaults_popup_position = NULL, + chart_annotations_defaults_line_marker = NULL, + chart_annotations_defaults_stroke_width = NULL, + chart_annotations_defaults_stroke_color = NULL, + chart_annotations_defaults_connector_extend_line = NULL, + animation_duration = NULL, + animation_stagger = NULL, + line_animate_in = NULL, + line_animate_out = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{default_color}{Default color. Used when Color column is unspecified. Flourish type hint: color, defaults to \code{NULL}} + +\item{fill_opacity}{Dot opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{default_shape}{Default shape. Choices: circle, cross, diamond, square, star, triangle, wye. Used when Shape column is unspecified or empty. Flourish type hint: string, defaults to \code{NULL}} + +\item{data_point_default_size}{Size. In pixel area. Only used when Size column is unspecified or empty. Subject to scaling with the chart size (see setting below). Flourish type hint: number, defaults to \code{NULL}} + +\item{data_point_min_size}{Min size. In pixel area. Used when you have a Size column selected. Subject to scaling with the chart size. Flourish type hint: number, defaults to \code{NULL}} + +\item{data_point_max_size}{Max size. In pixel area. Used when you have a Size column selected. Subject to scaling with the chart size. Flourish type hint: number, defaults to \code{NULL}} + +\item{responsive_dots}{Scale dots based on chart size. Makes the dots get bigger or smaller relative to the chart size. Turn off to specify a fixed size regardless of chart size. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{stroke_opacity}{Outline opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{stroke_width}{Outline width. Flourish type hint: number, defaults to \code{NULL}} + +\item{stroke_mode}{Outline mode. Choices: auto, fixed. Choose Auto for outline color to match dot color. Choose Fixed to give all dots a uniform outline color. Flourish type hint: string, defaults to \code{NULL}} + +\item{stroke_color}{Outline color. Flourish type hint: color, defaults to \code{NULL}} + +\item{render_mode}{Renderer. Choices: svg, webgl. In most cases you should only need SVG, but you may want to choose WebGL if you have a lot of data or you notice your chart is running slowly on your device. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{labels_show}{Show labels on points. Labels only show up if you have designated a Name column in the data tab. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{labels_selective}{Labels to show. Choices: \code{FALSE}, \code{TRUE}. To show labels selectively, turn on this option and then make a story In the story editor, click on dots to hide/show the labels. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_color_type}{Label color. Choices: auto, match, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_color}{Fixed. Flourish type hint: color, defaults to \code{NULL}} + +\item{labels_responsive}{Scale label. Choices: chart, data, none. Choose between no scale, scale by chart size, or try to fit the label in the data point. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_font_size_min}{Min font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_font_size_max}{Max font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_bg_size}{Shadow size. As percent of font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_align}{Alignment. Choices: auto, start, middle, end. Align the text at the start, middle or end of the data point. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_x_offset}{Offset. Choices: top, next. Place labels on top of or next to the data point. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_y_offset}{Offset. Choices: top, above, below. Place labels on top of or next to the data point. Flourish type hint: string, defaults to \code{NULL}} + +\item{height_mode}{Sizing mode. Choices: auto, fill_space, aspect. In Fill space mode the graphic will fill the container (which by default will be the the standard Flourish responsive chart size). In Aspect ratio mode, you set the aspect ratio of the plot, and the container will be updated to accommodate it (not supported when embedded in a simple fixed-height iframe ). Flourish type hint: string, defaults to \code{NULL}} + +\item{facet_aspect}{Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_aspect_mobile}{Aspect (mobile). Aspect of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_background_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_background_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_background_background_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_background_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_background_background_image_size}{Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_background_background_image_position}{Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to \code{NULL}} + +\item{margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_fixed_cols}{Fixed number of columns in grid. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{facet_min_w}{Min chart width. Determines how many columns of charts there should be in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_cols}{Number of columns in grid. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_gutter_w}{Horizontal. In rems. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_gutter_h}{Vertical. In rems. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_header_font_size}{Text size. In rems. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_title_align}{Alignment. Choices: auto, left, center. Flourish type hint: string, defaults to \code{NULL}} + +\item{facet_header_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{lines_show}{Shows lines. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{line_width}{Line width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_curve}{Line style. Choices: curve_linear, curve_natural. Flourish type hint: string, defaults to \code{NULL}} + +\item{line_opacity}{Line opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_color_mode}{Line color. Choices: by_dot, fixed. When set to Match dots the lines will be the same as the first dot in the line. Flourish type hint: string, defaults to \code{NULL}} + +\item{line_per_facet}{Lock lines to axes. Disable to allow lines to run between or animate between facets. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{line_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{line_arrows}{Arrow heads on lines. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{line_arrow_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_arrow_color_mode}{Color mode. Choices: auto, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{line_arrow_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{x_matching}{Matching x axis across grid of charts. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{x_single_row}{Only show x axis on first column of grid. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_axis_position}{Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_y_axis_position}{Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_zero_axis}{Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_position}{Position. Choices: default, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_side}{Tick side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{y_matching}{Matching y axis across grid of charts. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{y_single_col}{Only show Y axis on first column of grid. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_axis_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_zero_axis}{Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_title_position}{Position. Choices: side, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_position}{Position. Choices: default, above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_side}{Side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{legend_position}{Legend position. Choices: above, below, off. The legend position relative to the chart. A legend will not show with a single entry. Flourish type hint: string, defaults to \code{NULL}} + +\item{legend_filtering_mode}{Clickable legend. Choices: filter_out, filter_in, off. When a legend item is clicked on, the corresponding dots can either be hidden or shown. This option can also be turned off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_show_legend}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_continous_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_color_band_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_continous_legend_color_band_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_continous_legend_color_band_radius}{Roundness. The radius of the corners of the color band (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_continous_legend_binned_label_mode}{Binned label mode. Choices: thresholds, centers, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_binned_label_custom}{Custom bin labels. List numeric values, separated by semi-colons. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_legend_min}{Legend min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_continous_legend_additional_min_label}{Custom min label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_continous_legend_legend_max}{Legend max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_continous_legend_additional_max_label}{Custom max label. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_legend}{Choices: auto, custom, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_legend_title}{Title. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{text_legend_subtitle}{Subtitle. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{text_legend_bold}{Bold. If checked, always use bold for colored items. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_show_all}{Include "All". Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_show_all_text}{“All” label. Flourish type hint: string, defaults to \code{NULL}} + +\item{filter_updates_axes}{Update axes when filtering. Choices: off, x, y, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{slider_updates_axes}{Update axes when using slider. Choices: off, x, y, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{time_label_show}{Show time label. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{time_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{time_label_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{time_label_font_size}{Size. As a percent of the default size; the actual size scales with the chart. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_controls_spacing}{Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{fit_type}{Lines to show. Choices: none, both, color, chart, all. Flourish type hint: string, defaults to \code{NULL}} + +\item{fit_force_origin}{Force line through origin. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{fit_line_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{fit_line_dash}{Dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{fit_line_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{beeswarm_plot}{Show beeswarm when plotting one numerical and one categorical axis. Choices: \code{TRUE}, \code{FALSE}. Auto mode will make a beeswarm unless there are more than 5000 points in the dataset. Note: Performance will be reduced with thousands of rows due to the nature of how beeswarm positions are computed. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{box_plot}{Show box plot when plotting one numerical and one categorical axis. Choices: \code{TRUE}, \code{FALSE}. To learn more about box plots \if{html}{\out{
    }}see here\if{html}{\out{}}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{box_color}{Box color. Flourish type hint: color, defaults to \code{NULL}} + +\item{box_opacity}{Box opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{box_line_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{box_line_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{box_whisker_type}{Whisker type. Choices: tukey, all. Flourish type hint: string, defaults to \code{NULL}} + +\item{box_whisker_multiplier}{Max whisker length (number of IQRs). Maximum distance whiskers should extend out from the box as a multiple of the interquartile range. 1.5 is John Tukeys classsic value. Flourish type hint: number, defaults to \code{NULL}} + +\item{use_box_popup}{Box popup. If enabled, shows a popup for the box describing the first quartile, median, and third quartile. The user will not be able to access the popups for the points underneath the box. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{box_first_quartile_text}{First quartile. Flourish type hint: string, defaults to \code{NULL}} + +\item{box_median_text}{Median. Flourish type hint: string, defaults to \code{NULL}} + +\item{box_third_quartile_text}{Third quartile. Flourish type hint: string, defaults to \code{NULL}} + +\item{violin_plot}{Show violin plot when plotting one numerical and one categorical axis. Choices: \code{TRUE}, \code{FALSE}. To learn more about violin plots \if{html}{\out{}}see here\if{html}{\out{}}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{violin_bandwidth}{Bandwidth. The bandwidth in a violin plot determines the degree of smoothing applied to the probability density function estimating the shape of the plot. Generally, larger bandwidth values create a smoother plot with less detail, while smaller values create a more precise plot with more detail. Flourish type hint: number, defaults to \code{NULL}} + +\item{violin_samples}{No. of samples. Number of points at which to calculate a violins distribution. More points means a more accurate curve but can also harm performance. Flourish type hint: number, defaults to \code{NULL}} + +\item{violin_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{violin_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{violin_sizing}{Sizing mode. Choices: area, width. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_enabled}{Show highlights on the x axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_lines}{One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: \verb{My label :: 2012 :: line_color / text_color :: facet_name}. For example, \verb{My label :: 2012 :: #eb0000 / #0084bd :: Category 1}. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_line_dash}{Dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_areas}{One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, \verb{My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_color}{Area. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_opacity}{Area opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_area_texture}{Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_vertical}{Vertical. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_y_position}{Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_x_position}{X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_font_weight}{Font weight. Choices: regular, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_label_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_shadow_color}{Shadow. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_x_shadow_enabled}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_enabled}{Show highlights on the y axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_lines}{One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: \verb{My label :: 2012 :: line_color / text_color :: facet_name}. For example: \verb{My label :: 2012 :: #eb0000 / #0084bd :: Category 1}. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_width}{line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_line_dash}{Dash. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_areas}{One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: \verb{My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_color}{Area. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_opacity}{Area opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_area_texture}{Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_x_position}{X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_y_position}{Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_font_weight}{Font weight. Choices: regular, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_label_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_shadow_color}{Shadow. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_axes_highlights_y_shadow_enabled}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{annotations_styling}{Show annotations styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_label_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_background_mode}{Text background. Choices: none, outline, background. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_bg}{Outline. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_label_bg}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_text_alignment}{Alignment. Choices: auto, start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_popup_position}{Popup position. Choices: center, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_line_marker}{Marker. Choices: none, arrowhead_open, arrowhead. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_annotations_defaults_stroke_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_annotations_defaults_stroke_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_annotations_defaults_connector_extend_line}{Extend line. Choices: enabled, disabled. Flourish type hint: string, defaults to \code{NULL}} + +\item{animation_duration}{Animation duration. The duration of the animation for each dot or axis, in seconds. The animation can be seen between slides in a Flourish story. Flourish type hint: number, defaults to \code{NULL}} + +\item{animation_stagger}{Animation stagger. The delay between each dot starting to move, in seconds; set to 0 to have all dots move simultaneously. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_animate_in}{Animate new lines in. Whether new lines should appear whole or be animated into view. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{line_animate_out}{Animate exiting lines. Whether filtered/removed lines should be removed whole or animated out of view. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_enabled}{Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_whitelist}{Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. \code{layout.background_color}. Flourish type hint: text, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set scatter chart details +} +\examples{ +try( + flourish(chart_type = "scatter", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_scatter_data(gapminder) |> + set_scatter_details() +) +} diff --git a/R_package/man/set_slope_chart_details.Rd b/R_package/man/set_slope_chart_details.Rd new file mode 100644 index 0000000..6a966b7 --- /dev/null +++ b/R_package/man/set_slope_chart_details.Rd @@ -0,0 +1,1049 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_slope_chart_details.R +\name{set_slope_chart_details} +\alias{set_slope_chart_details} +\title{Set slope chart chart details} +\usage{ +set_slope_chart_details( + ., + circle_radius = NULL, + slope_width = NULL, + slope_width_max = NULL, + slope_color = NULL, + curve = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + selected_slopes = NULL, + value_type = NULL, + ties_mode = NULL, + sort_mode = NULL, + height_mode = NULL, + aspect_ratio = NULL, + chart_facet_columns_fixed = NULL, + chart_facet_columns = NULL, + chart_facet_min_width = NULL, + chart_facet_min_width_fixed = NULL, + chart_facet_custom_grid = NULL, + chart_facet_custom_positions = NULL, + chart_facet_max_width = NULL, + chart_facet_gutter_w = NULL, + chart_facet_gutter_h = NULL, + chart_facet_animation = NULL, + chart_facet_titles = NULL, + chart_facet_title_align = NULL, + chart_facet_title_size = NULL, + chart_facet_title_unit = NULL, + chart_facet_title_color = NULL, + chart_facet_title_padding_top = NULL, + chart_facet_title_padding_bottom = NULL, + chart_facet_title_bg = NULL, + chart_facet_title_bg_color = NULL, + chart_facet_title_bg_padding = NULL, + axis_first_row_only = NULL, + matching_y_axis = NULL, + labels_name_position = NULL, + labels_position = NULL, + labels_inline_position = NULL, + labels_inline_position_custom = NULL, + only_show_highlights = NULL, + chart_line_labels_max_width = NULL, + chart_line_labels_overlap_mode = NULL, + chart_line_labels_spreading_margin = NULL, + chart_line_labels_data_point_margin = NULL, + chart_line_labels_show_only_labels = NULL, + chart_line_labels_text_color = NULL, + chart_line_labels_text_size = NULL, + chart_line_labels_text_bg_color = NULL, + chart_line_labels_text_bg_size = NULL, + chart_line_labels_text_line_height = NULL, + chart_line_labels_text_max_lines = NULL, + chart_line_labels_text_weight = NULL, + chart_line_labels_lines = NULL, + chart_line_labels_line_style = NULL, + chart_line_labels_line_color = NULL, + chart_line_labels_line_width = NULL, + chart_line_labels_line_range = NULL, + chart_line_labels_line_padding = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + axis_labels_position = NULL, + axis_font_size = NULL, + axis_text_color = NULL, + axis_color = NULL, + axis_width = NULL, + axis_dashoffset = NULL, + update_y_axis_filter = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + filter_show_all = NULL, + filter_show_all_text = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + animation_duration = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_position = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{circle_radius}{Circle radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{slope_width}{Slope width. In pixels. Flourish type hint: number, defaults to \code{NULL}} + +\item{slope_width_max}{Max slope width. Flourish type hint: number, defaults to \code{NULL}} + +\item{slope_color}{Slope color. If not set, will use same color as main text. Flourish type hint: color, defaults to \code{NULL}} + +\item{curve}{Line curve. Choices: linear, cardinal, step. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette for categories. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{selected_slopes}{Highlight slopes. To highlight slopes, write the name of each slope on a line. You can also create a story and highlight/unhighlight by clicking on a slope. Leave empty to highlight all slopes. Flourish type hint: text, defaults to \code{NULL}} + +\item{value_type}{Value mode. Choices: ranks, scores, change. Flourish type hint: string, defaults to \code{NULL}} + +\item{ties_mode}{Ties mode. Choices: dense, competition, fractional, modified_competition. What rank should be given when there are ties? See https://en.wikipedia.org/wiki/Ranking for explanation of nomenclature. Flourish type hint: string, defaults to \code{NULL}} + +\item{sort_mode}{Sort mode. Choices: descending, ascending. Flourish type hint: string, defaults to \code{NULL}} + +\item{height_mode}{Height mode. Choices: auto, aspect_ratio. Flourish type hint: string, defaults to \code{NULL}} + +\item{aspect_ratio}{Aspect ratio. 1 for square, a smaller value means a bigger height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_columns_fixed}{Grid mode. Choices: \code{FALSE}, \code{TRUE}. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_columns}{Columns. The number of columns in the grid. (If specifying custom positions, extra columns may be added automatically.). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width}{Min chart width. The minimum width of a chart or cell in the grid. Determines the number of columns. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_min_width_fixed}{Min chart width. Specify the minimum width of a chart or cell in the grid, below which the Fixed grid will be ignored and it will fall back to responsive Auto mode. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_custom_grid}{Add custom positions. Specify positions for individual charts in the grid useful for making a map layout. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_custom_positions}{Custom positions. Enter the name of a facet, one per line, using the format: Facet name: row, column where row and column are numbers indicating the grid position where a facet should be positioned. For example, Alaska : 1, 1 Maine : 1, 11 Wisconsin : 2, 6 Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_facet_max_width}{Max chart width. The maximum width of a chart or cell in the grid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_w}{Horizontal margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_gutter_h}{Vertical margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_animation}{On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_titles}{Show titles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_facet_title_align}{Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_size}{Size. Relative to the width of the chart. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_unit}{Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_padding_top}{Space above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_padding_bottom}{Space below. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_facet_title_bg}{Background. Choices: none, full, text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_facet_title_bg_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_facet_title_bg_padding}{Background padding. Horizontal space between text and background. Flourish type hint: number, defaults to \code{NULL}} + +\item{axis_first_row_only}{Show X axis on first row only. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{matching_y_axis}{Matching Y scale across facets. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{labels_name_position}{Slope name mode. Choices: side, inline, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{labels_position}{Slope name position. Choices: start, both, end. Both mode will fallback to Start on narrow windows and devices. Flourish type hint: string, defaults to \code{NULL}} + +\item{labels_inline_position}{Slope name position. Choices: start, middle, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{labels_inline_position_custom}{Custom slope name positions. Change the position of each individual label. One line per label. Syntax Label name :: start/middle/end :: offset in \% (optional) Example Luxembourg :: end :: 10 France :: start. Flourish type hint: text, defaults to \code{NULL}} + +\item{only_show_highlights}{Only show highlighted labels. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_line_labels_max_width}{Max label width. The maximum allowed label width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_overlap_mode}{Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_line_labels_spreading_margin}{Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_data_point_margin}{Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_show_only_labels}{Show only certain labels. Manually specify which labels youd like to display (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_line_labels_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_line_labels_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_text_bg_color}{Outline. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_line_labels_text_bg_size}{Outline width. As a \% of the font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_text_max_lines}{Max lines. The max number of lines for each label. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_text_weight}{Weight. Choices: 400, 700. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_line_labels_lines}{Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_line_labels_line_style}{Line style. Choices: straight, step. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_line_labels_line_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_line_labels_line_width}{Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_line_range}{Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_line_labels_line_padding}{Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{axis_labels_position}{Position. Choices: top, bottom, hidden. Flourish type hint: string, defaults to \code{NULL}} + +\item{axis_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{axis_text_color}{Font color. Flourish type hint: color, defaults to \code{NULL}} + +\item{axis_color}{Axis color. Flourish type hint: color, defaults to \code{NULL}} + +\item{axis_width}{Axis width. Flourish type hint: number, defaults to \code{NULL}} + +\item{axis_dashoffset}{Axis dash. eg. 2,2. Flourish type hint: string, defaults to \code{NULL}} + +\item{update_y_axis_filter}{Update Y axis when filtering. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_show_all}{Include "All". Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_show_all_text}{“All” label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{animation_duration}{Animation duration. The duration of the animation (in milliseconds) when changing data or mode for example between slides in a story. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{legend_position}{Position. Choices: above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_enabled}{Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_whitelist}{Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. \code{layout.background_color}. Flourish type hint: text, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set slope chart chart details +} +\examples{ +try( + flourish(chart_type = "slope", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_slope_chart_data(gapminder) |> + set_slope_chart_details() +) +} diff --git a/R_package/man/set_sports_details.Rd b/R_package/man/set_sports_details.Rd new file mode 100644 index 0000000..4395550 --- /dev/null +++ b/R_package/man/set_sports_details.Rd @@ -0,0 +1,986 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_sports_details.R +\name{set_sports_details} +\alias{set_sports_details} +\title{Set sports chart details} +\usage{ +set_sports_details( + ., + positions_type = NULL, + positions_scale_custom = NULL, + positions_x_min = NULL, + positions_x_max = NULL, + positions_y_min = NULL, + positions_y_max = NULL, + formation_type = NULL, + formation = NULL, + formation_custom = NULL, + pitch_margin_top = NULL, + pitch_margin_bottom = NULL, + pitch_type = NULL, + pitch_type_custom = NULL, + pitch_type_upload = NULL, + pitch_type_svg = NULL, + pitch_line_color = NULL, + pitch_line_opacity = NULL, + pitch_line_width = NULL, + pitch_height = NULL, + pitch_background = NULL, + pitch_opacity = NULL, + pitch_orientation = NULL, + pitch_crop = NULL, + pitch_crop_custom = NULL, + pitch_flip_dots = NULL, + pitch_flip_pitch = NULL, + colors_categorical_palette = NULL, + colors_categorical_extend = NULL, + colors_categorical_custom_palette = NULL, + colors_numeric_type = NULL, + colors_binning = NULL, + colors_bin_mode = NULL, + colors_bin_count = NULL, + colors_bin_thresholds = NULL, + colors_sequential_palette = NULL, + colors_sequential_reverse = NULL, + colors_sequential_custom_min = NULL, + colors_sequential_custom_max = NULL, + colors_sequential_color_space = NULL, + colors_sequential_custom_domain = NULL, + colors_sequential_domain_min = NULL, + colors_sequential_domain_max = NULL, + colors_diverging_palette = NULL, + colors_diverging_reverse = NULL, + colors_diverging_custom_min = NULL, + colors_diverging_custom_mid = NULL, + colors_diverging_custom_max = NULL, + colors_diverging_color_space = NULL, + colors_diverging_custom_domain = NULL, + colors_diverging_domain_min = NULL, + colors_diverging_domain_mid = NULL, + colors_diverging_domain_max = NULL, + dot_opacity = NULL, + dot_size = NULL, + dot_size_custom = NULL, + dot_border = NULL, + dot_border_custom = NULL, + dot_border_color = NULL, + label_mode = NULL, + label_color = NULL, + label_weight = NULL, + label_size = NULL, + label_size_custom = NULL, + show_squad_numbers = NULL, + squad_number_size = NULL, + squad_number_size_custom = NULL, + squad_number_weight = NULL, + squad_number_color = NULL, + squad_number_vertical_adjust = NULL, + image_contrast = NULL, + image_brightness = NULL, + image_saturation = NULL, + image_blend_mode = NULL, + animation_target = NULL, + animation_duration = NULL, + trail = NULL, + trail_color = NULL, + trail_opacity = NULL, + trail_size = NULL, + trail_size_custom = NULL, + trail_style = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_filter_controls_container_alignment = NULL, + chart_filter_controls_container_controls_spacing = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + filter_include_all = NULL, + filter_all_label = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{positions_type}{Position points by. Choices: auto, formation, data. Position points automatically based on your data, on a specific formation, or use X and Y coordinates. Flourish type hint: string, defaults to \code{NULL}} + +\item{positions_scale_custom}{Position scale. Choices: auto, custom. "Auto" will set the position scale based on the minimum and maximum values in your data. "Custom" allows you to set a custom minimum and maximum. Flourish type hint: string, defaults to \code{NULL}} + +\item{positions_x_min}{X min. Flourish type hint: number, defaults to \code{NULL}} + +\item{positions_x_max}{X max. Flourish type hint: number, defaults to \code{NULL}} + +\item{positions_y_min}{Y min. Flourish type hint: number, defaults to \code{NULL}} + +\item{positions_y_max}{Y max. Flourish type hint: number, defaults to \code{NULL}} + +\item{formation_type}{Formation type. Choices: preset, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{formation}{Formation. Choices: 3-5-2, 4-3-3, 4-3-2-1, 4-4-2, 3-4-3, 4-2-3-1. Flourish type hint: string, defaults to \code{NULL}} + +\item{formation_custom}{Custom formation. Use a "*"" for every player and a "-" for every space on the pitch. Flourish type hint: code, defaults to \code{NULL}} + +\item{pitch_margin_top}{Top. Increases the gap between the top of the pitch and the first dot. Flourish type hint: number, defaults to \code{NULL}} + +\item{pitch_margin_bottom}{Bottom. Increases the gap between the bottom of the pitch and the last dot. Flourish type hint: number, defaults to \code{NULL}} + +\item{pitch_type}{Sport. Choices: football, basketball, tennis, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{pitch_type_custom}{Choices: upload, svg. Flourish type hint: string, defaults to \code{NULL}} + +\item{pitch_type_upload}{Upload. Flourish type hint: url, defaults to \code{NULL}} + +\item{pitch_type_svg}{SVG. Flourish type hint: text, defaults to \code{NULL}} + +\item{pitch_line_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{pitch_line_opacity}{Opacity. Opacity of the pitch marking lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{pitch_line_width}{Line width. Line width of the pitch markings in pixels. Flourish type hint: number, defaults to \code{NULL}} + +\item{pitch_height}{Pitch height. As a percentage of the width. Flourish type hint: number, defaults to \code{NULL}} + +\item{pitch_background}{Background color. Background color of the pitch. To change the color of the background outside of the pitch, instead slect Background color in the layout section. Flourish type hint: color, defaults to \code{NULL}} + +\item{pitch_opacity}{Background opacity. Opacity of the pitch background. Flourish type hint: number, defaults to \code{NULL}} + +\item{pitch_orientation}{Orientation. Choices: vertical, horizontal. Flourish type hint: string, defaults to \code{NULL}} + +\item{pitch_crop}{Crop pitch. Choices: 1, custom. Show the full pitch, or only show a portion. Flourish type hint: string, defaults to \code{NULL}} + +\item{pitch_crop_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{pitch_flip_dots}{Flip dots. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{pitch_flip_pitch}{Flip pitch. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{colors_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{colors_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{colors_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{colors_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{colors_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{colors_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{colors_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{colors_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{colors_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{colors_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{colors_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{colors_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{colors_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{colors_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{colors_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{colors_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{colors_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{colors_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{colors_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{colors_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{colors_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{colors_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{colors_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{colors_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{colors_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{colors_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_opacity}{Opacity. Opacity of the dots. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_size}{Size. Choices: 1.3, 2.5, 6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{dot_size_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_border}{Border size. Choices: 0, 0.2, 0.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{dot_border_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_border_color}{Color. Outline color of the dots. Flourish type hint: color, defaults to \code{NULL}} + +\item{label_mode}{Labels. Choices: \code{TRUE}, \code{FALSE}. Labels will always be hidden if there are more than 200 data points. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_color}{Color. Label color. Defaults to layout font color settings if not set. Flourish type hint: color, defaults to \code{NULL}} + +\item{label_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_size}{Size. Choices: 0.8, 1, 1.2, custom. Sizing unit is relative to root font size. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_size_custom}{Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{show_squad_numbers}{Show Squad Numbers. Optional squad number to appear within dot. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{squad_number_size}{Size Mode. Choices: 1.1, 1.4, 1.7, custom. Resizes the font size as a proportion of the dots radius. Flourish type hint: string, defaults to \code{NULL}} + +\item{squad_number_size_custom}{Custom. Specify a custom responsive font size. Best results are betwen 0.8 and 2. Flourish type hint: number, defaults to \code{NULL}} + +\item{squad_number_weight}{Weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{squad_number_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{squad_number_vertical_adjust}{Adjust vertical spacing. Adjust vertical centering for custom fonts. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_contrast}{Contrast. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_brightness}{Brightness. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_saturation}{Saturation. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_blend_mode}{Blend mode. Choices: normal, multiply, screen, overlay, darken, lighten. Flourish type hint: string, defaults to \code{NULL}} + +\item{animation_target}{Animate. Choices: position, opacity, both. Choose whether you want to animate the animate the positions or fade, for example when changing the filter, or drag players positions in the story editor. Flourish type hint: string, defaults to \code{NULL}} + +\item{animation_duration}{Duration. Specified in seconds. Flourish type hint: number, defaults to \code{NULL}} + +\item{trail}{Trail lines. Choices: \code{FALSE}, \code{TRUE}. Show trail lines when a point is dragged to a new position. Only visible in the story editor. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{trail_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{trail_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{trail_size}{Size. Choices: 0.2, 0.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{trail_size_custom}{Custom. Proportional to the smallest point size. Flourish type hint: number, defaults to \code{NULL}} + +\item{trail_style}{Style. Choices: solid, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_container_controls_spacing}{Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_include_all}{Include "all". Include "All" in the filter dropdown. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{filter_all_label}{All label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set sports chart details +} +\examples{ +try( + flourish(chart_type = "sports", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_sports_data(gapminder) |> + set_sports_details() +) +} diff --git a/R_package/man/set_sports_race_details.Rd b/R_package/man/set_sports_race_details.Rd new file mode 100644 index 0000000..04b3ac3 --- /dev/null +++ b/R_package/man/set_sports_race_details.Rd @@ -0,0 +1,716 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_sports_race_details.R +\name{set_sports_race_details} +\alias{set_sports_race_details} +\title{Set sports race chart details} +\usage{ +set_sports_race_details( + ., + preset_svg = NULL, + custom_svg = NULL, + track_path_id = NULL, + track_lane_width = NULL, + track_back_and_forth = NULL, + participant_icon_mode = NULL, + participant_size = NULL, + participant_stroke_width = NULL, + participant_stroke_opacity = NULL, + participant_fill_opacity = NULL, + preset_participant_image = NULL, + custom_participant_start_image = NULL, + custom_participant_race_image = NULL, + custom_participant_finish_image = NULL, + image_initial_rotation = NULL, + image_initial_flip_x = NULL, + image_initial_flip_y = NULL, + image_transform_mode = NULL, + participant_icon_recolor = NULL, + chart_participant_color_scale_categorical_palette = NULL, + chart_participant_color_scale_categorical_extend = NULL, + chart_participant_color_scale_categorical_custom_palette = NULL, + chart_participant_color_scale_numeric_type = NULL, + chart_participant_color_scale_binning = NULL, + chart_participant_color_scale_bin_mode = NULL, + chart_participant_color_scale_bin_count = NULL, + chart_participant_color_scale_bin_thresholds = NULL, + chart_participant_color_scale_sequential_palette = NULL, + chart_participant_color_scale_sequential_reverse = NULL, + chart_participant_color_scale_sequential_custom_min = NULL, + chart_participant_color_scale_sequential_custom_max = NULL, + chart_participant_color_scale_sequential_color_space = NULL, + chart_participant_color_scale_sequential_custom_domain = NULL, + chart_participant_color_scale_sequential_domain_min = NULL, + chart_participant_color_scale_sequential_domain_max = NULL, + chart_participant_color_scale_diverging_palette = NULL, + chart_participant_color_scale_diverging_reverse = NULL, + chart_participant_color_scale_diverging_custom_min = NULL, + chart_participant_color_scale_diverging_custom_mid = NULL, + chart_participant_color_scale_diverging_custom_max = NULL, + chart_participant_color_scale_diverging_color_space = NULL, + chart_participant_color_scale_diverging_custom_domain = NULL, + chart_participant_color_scale_diverging_domain_min = NULL, + chart_participant_color_scale_diverging_domain_mid = NULL, + chart_participant_color_scale_diverging_domain_max = NULL, + camera_mode = NULL, + zoom = NULL, + checkpoint_mode = NULL, + checkpoints = NULL, + times_cumulative = NULL, + participant_label_mode = NULL, + participant_label_custom = NULL, + participant_label_position = NULL, + participant_label_style = NULL, + participant_label_color = NULL, + participant_label_size = NULL, + participant_label_stroke = NULL, + participant_label_stroke_size = NULL, + participant_label_weight = NULL, + participant_highlight = NULL, + participant_highlight_color = NULL, + participant_highlight_width = NULL, + label_position_enabled = NULL, + label_position_time = NULL, + label_position_type = NULL, + label_medal_enabled = NULL, + label_medal_time = NULL, + label_medal_type = NULL, + label_medal_replace_position = NULL, + label_finishing_time_enabled = NULL, + label_finishing_time_time = NULL, + participant_stacking = NULL, + chart_timeline_controls_enabled = NULL, + chart_timeline_controls_style = NULL, + chart_timeline_controls_graph = NULL, + chart_timeline_controls_play_on_load = NULL, + chart_timeline_controls_loop = NULL, + chart_timeline_controls_duration = NULL, + chart_timeline_controls_duration_tween = NULL, + chart_timeline_controls_duration_wait_at_end = NULL, + chart_timeline_controls_axes_custom_enabled = NULL, + chart_timeline_controls_color_axes = NULL, + chart_timeline_controls_axis_font_size = NULL, + chart_timeline_controls_date_format_display = NULL, + chart_timeline_controls_axis_nice_x = NULL, + chart_timeline_controls_axis_nice_y = NULL, + chart_timeline_controls_scrubber_snap = NULL, + chart_timeline_controls_scrubber_snap_paused = NULL, + chart_timeline_controls_layout_settings = NULL, + chart_timeline_controls_margin_top = NULL, + chart_timeline_controls_margin_left = NULL, + chart_timeline_controls_margin_bottom = NULL, + chart_timeline_controls_margin_right = NULL, + chart_timeline_controls_playback_button_margin_right = NULL, + chart_timeline_controls_scrubber_height = NULL, + chart_timeline_controls_playback_button_margin_right_button = NULL, + chart_timeline_controls_graph_settings = NULL, + chart_timeline_controls_color_background = NULL, + chart_timeline_controls_graph_height = NULL, + chart_timeline_controls_curve = NULL, + chart_timeline_controls_playback_styling = NULL, + chart_timeline_controls_playback_button_button_color = NULL, + chart_timeline_controls_playback_button_button_size = NULL, + chart_timeline_controls_playback_button_icon_color = NULL, + chart_timeline_controls_playback_button_icon_size = NULL, + chart_timeline_controls_playback_button_label_size = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{preset_svg}{Choices: athletics, swimming, cycling, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{custom_svg}{Custom SVG. Use a custom track using your own SVG Flourish type hint: text, defaults to \code{NULL}} + +\item{track_path_id}{Path ID. The ID of the element in the SVG which defines the center of the track. Flourish type hint: string, defaults to \code{NULL}} + +\item{track_lane_width}{Lane width. The distance between each participant. Flourish type hint: number, defaults to \code{NULL}} + +\item{track_back_and_forth}{Track type. Choices: \code{FALSE}, \code{TRUE}. Whether the track goes back and forth, like a swimming pool, or back to the start, like a race track. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{participant_icon_mode}{Icon type. Choices: circle, image. Flourish type hint: string, defaults to \code{NULL}} + +\item{participant_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{participant_stroke_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{participant_stroke_opacity}{Stroke opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{participant_fill_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{preset_participant_image}{Default images. Choices: runner, swimmer, cyclist, custom. The images used if no image is included for the participant in the datasheet. Flourish type hint: string, defaults to \code{NULL}} + +\item{custom_participant_start_image}{Custom start image. The image shown at the start of the race. Flourish type hint: url, defaults to \code{NULL}} + +\item{custom_participant_race_image}{Custom racing image. The image shown while the participant is racing. Flourish type hint: url, defaults to \code{NULL}} + +\item{custom_participant_finish_image}{Custom finish image. The image shown when the participant has finished the race. Flourish type hint: url, defaults to \code{NULL}} + +\item{image_initial_rotation}{Rotate images. Choices: 0, 90, 180, 270. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_initial_flip_x}{Flip horizontally. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{image_initial_flip_y}{Flip vertically. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{image_transform_mode}{Direction change. Choices: rotate, flip_x, flip_y, flip_both, static. Change the direction of the image based on which way the participant is traveling. Rotate rotates the image to face the direction of travel. Flip horizontally flips the image horizontally depending on whether the participant is traveling towards the left or right. Flip vertically flips the image vertically depending on whether the participant is traveling towards the top or bottom. Flip horizontally and vertically combines the horizontal and vertical flip settings. Static doesnt change the direction of the image. Flourish type hint: string, defaults to \code{NULL}} + +\item{participant_icon_recolor}{Recolor icons. Apply colors to differentiate the participants. Works best with greyscale images. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_participant_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_participant_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_participant_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_participant_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_participant_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_participant_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_participant_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_participant_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_participant_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_participant_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_participant_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_participant_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_participant_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_participant_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_participant_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_participant_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_participant_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_participant_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_participant_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_participant_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_participant_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_participant_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_participant_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_participant_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_participant_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_participant_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{camera_mode}{Camera mode. Choices: track, leader. Flourish type hint: string, defaults to \code{NULL}} + +\item{zoom}{Zoom level. How much to zoom in when playing. Flourish type hint: number, defaults to \code{NULL}} + +\item{checkpoint_mode}{Checkpoint mode. Choices: laps, splits, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{checkpoints}{Checkpoints. Enter the number of laps completed at each recorded checkpoint/column in the data. E.g. "0.5, 1, 1.5, 2" would mean that the times were taken every half a lap. Enter one checkpoint per line. Flourish type hint: text, defaults to \code{NULL}} + +\item{times_cumulative}{Times are cumulative. Switch on if the time columns represent the cumulative time taken at each checkpoint (e.g. 12, 25, 36). Switch off if the times represent how long individual checkpoints took to complete (e.g. 12, 13, 11). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{participant_label_mode}{Label mode. Choices: auto, leader, all, custom. Determines which labels are drawn. Auto draws as many labels as possible whilst avoiding overlaps. Flourish type hint: string, defaults to \code{NULL}} + +\item{participant_label_custom}{Participants to label. Enter the names of the participants to label. These must exactly match the names in your data. Enter one name per line. Flourish type hint: text, defaults to \code{NULL}} + +\item{participant_label_position}{Label position. Choices: auto, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{participant_label_style}{Style. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{participant_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{participant_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{participant_label_stroke}{Outline. Flourish type hint: color, defaults to \code{NULL}} + +\item{participant_label_stroke_size}{Outline width. As a \% of the font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{participant_label_weight}{Weight. Choices: 400, 600. Flourish type hint: string, defaults to \code{NULL}} + +\item{participant_highlight}{Highlight icons. Highlight the labeled participant(s). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{participant_highlight_color}{Highlight color. Flourish type hint: color, defaults to \code{NULL}} + +\item{participant_highlight_width}{Highlight width. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_position_enabled}{Choices: \code{FALSE}, \code{TRUE}. Whether to show the position of the participant in the label. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_position_time}{Show position. Choices: always, race, finish. Set to At finish, to only show a participants position when theyve completed the race. Set to During race, to only show a participants position while they are still racing. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_position_type}{Position to show. Choices: current, finish. Whether to show a participants current position in the race, or their finishing position. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_medal_enabled}{Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_medal_time}{Show medals. Choices: always, race, finish. Set to At finish, to only show a participants medal when theyve completed the race. Set to During race, to only show a participants medal while they are still racing. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_medal_type}{Medal to show. Choices: current, finish. Whether to show the medal position for a participant at the current point in the race, or the medal they win at the end of the race. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_medal_replace_position}{Replace position. Turn on to replace a participants position label with their medal if they are in a medal position. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_finishing_time_enabled}{Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_finishing_time_time}{Show finishing time. Choices: always, finish. Flourish type hint: string, defaults to \code{NULL}} + +\item{participant_stacking}{Choices: sheet_order, rank, y_position. Determines which participants obscure other participants when they overlap. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_timeline_controls_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_style}{Style. Choices: timeline, button. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_timeline_controls_graph}{Show chart. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_play_on_load}{Play on load. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_loop}{Loop timeline. When turned on, the timeline will return to the beginning once complete. Otherwise, it will stop when it reaches the end. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_duration}{Timeline duration. Total duration of the timeline during normal playback in seconds. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_duration_tween}{Time jump duration. Duration of transitions between different points in time on the timeline. This is the transition you see in the story player when switching between slides with a different time on the timeline (in seconds). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_duration_wait_at_end}{Pause before loop. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_axes_custom_enabled}{Axis settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_color_axes}{Axes color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_timeline_controls_axis_font_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_date_format_display}{X axis date format. Choices:, \%Y-\%m-\%dT\%H:\%M:\%S.\%LZ, \%Y-\%m-\%d, \%m/\%d/\%Y, \%d/\%m/\%Y, \%d-\%b-\%y, \%m/\%Y, \%b \%Y, \%b \%y, \%B \%d, \%d \%b, \%Y, \%B, \%b, \%A, \%a, \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_timeline_controls_axis_nice_x}{Clean X axis. Rounds out the X axis so that its start and end values are nice, round dates. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_axis_nice_y}{Clean Y axis. Rounds out the Y axis so that its start and end values are nice, round numbers. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_scrubber_snap}{Snap when scrubbing. When turned on, you can only jump to values that are supplied in the dataset and nothing in between. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_scrubber_snap_paused}{Snap when paused. Activate to snap the timeline to the closest interval when non animating. This is useful for ensuring the data visible in the visualization always reflects the data you have supplied. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_layout_settings}{Layout settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_margin_right}{Space between button and timeline. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_scrubber_height}{Scrubber height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_margin_right_button}{Space between button and text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_graph_settings}{Chart settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_color_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_timeline_controls_graph_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_curve}{Curved lines. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_styling}{Play button settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_button_color}{Button color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_button_size}{Button size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_icon_color}{Icon color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_icon_size}{Icon size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_timeline_controls_playback_button_label_size}{Label size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set sports race chart details +} +\examples{ +try( + flourish(chart_type = "sports_race", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_sports_race_data(gapminder) |> + set_sports_race_details() +) +} diff --git a/R_package/man/set_survey_details.Rd b/R_package/man/set_survey_details.Rd new file mode 100644 index 0000000..178fa67 --- /dev/null +++ b/R_package/man/set_survey_details.Rd @@ -0,0 +1,1058 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_survey_details.R +\name{set_survey_details} +\alias{set_survey_details} +\title{Set survey chart details} +\usage{ +set_survey_details( + ., + dot_fill = NULL, + dot_opacity = NULL, + dot_opacity_unhighlighted = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + dot_shape = NULL, + dot_sides = NULL, + outline_width = NULL, + outline_color = NULL, + dot_label = NULL, + dot_label_color = NULL, + dot_label_bold = NULL, + dot_label_min = NULL, + dot_label_auto_size = NULL, + dot_label_fixed = NULL, + dot_label_scale = NULL, + dot_label_size_value = NULL, + all_group_label = NULL, + include_grouped_questions_on_shade_menu = NULL, + include_grouped_questions_on_compare_menu = NULL, + order_groups_by_size = NULL, + order_groups_by_size_mode = NULL, + group_colors = NULL, + exclusions = NULL, + exclude_blanks = NULL, + bundle_small_groups = NULL, + small_groups_threshold = NULL, + small_groups_other_label = NULL, + label_mode = NULL, + label_tight_fit = NULL, + label_color = NULL, + label_min_font_size = NULL, + label_max_font_size = NULL, + label_group_padding_lines = NULL, + label_shadow_size = NULL, + label_shadow_color = NULL, + label_group_count = NULL, + label_group_percent = NULL, + label_group_percent_decimals = NULL, + always_show_x_label = NULL, + show_xy_axis_labels_when_comparing = NULL, + compare_y_axis_width = NULL, + compare_x_axis_height = NULL, + chart_height_mode = NULL, + chart_aspect_ratio_wide = NULL, + chart_aspect_ratio_narrow = NULL, + map_opacity_map_mode = NULL, + map_opacity_non_map_mode = NULL, + map_max_group_size = NULL, + map_dimensions = NULL, + map_aspect_ratio = NULL, + map_region = NULL, + map_region_url = NULL, + map_region_bounds_x1 = NULL, + map_region_bounds_x2 = NULL, + map_region_bounds_y2 = NULL, + map_region_bounds_y1 = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + panel_background_color = NULL, + panel_background_opacity = NULL, + panel_text_color = NULL, + panel_text_size = NULL, + panel_icon_color = NULL, + panel_width = NULL, + panel_cog_color = NULL, + panel_overlay = NULL, + panel_hide_cog = NULL, + select_group_show = NULL, + select_color_show = NULL, + select_size_show = NULL, + select_compare_show = NULL, + histogram_show = NULL, + select_group_text = NULL, + select_color_text = NULL, + select_size_text = NULL, + select_compare_text = NULL, + select_filter_text = NULL, + select_map_text = NULL, + chart_filter_controls_control_type = NULL, + chart_filter_controls_control_styles = NULL, + chart_filter_controls_control_title = NULL, + chart_filter_controls_button_group = NULL, + chart_filter_controls_button_group_width_mode = NULL, + chart_filter_controls_button_group_width_fixed = NULL, + chart_filter_controls_dropdown_width_mode = NULL, + chart_filter_controls_dropdown_width_fixed = NULL, + chart_filter_controls_slider_width = NULL, + chart_filter_controls_slider_max_label_width = NULL, + chart_filter_controls_slider_step_time = NULL, + chart_filter_controls_slider_loop = NULL, + chart_filter_controls_slider_restart_pause = NULL, + chart_filter_controls_sort = NULL, + column_filter_show_all = NULL, + column_filter_show_all_label = NULL, + chart_controls_style_font_size = NULL, + chart_controls_style_font_weight = NULL, + chart_controls_style_height = NULL, + chart_button_control_style_background = NULL, + chart_button_control_style_background_selected = NULL, + chart_button_control_style_background_hover = NULL, + chart_button_control_style_font_color = NULL, + chart_button_control_style_font_color_selected = NULL, + chart_button_control_style_font_color_hover = NULL, + chart_button_control_style_button_styles_advanced = NULL, + chart_button_control_style_border_width = NULL, + chart_button_control_style_border_color = NULL, + chart_button_control_style_border_transparency = NULL, + chart_button_control_style_border_radius = NULL, + chart_slider_control_style_track_color = NULL, + chart_slider_control_style_font_color = NULL, + chart_slider_control_style_handle_color = NULL, + chart_slider_control_style_play_color = NULL, + chart_slider_control_style_track_height = NULL, + chart_slider_control_style_handle_height = NULL, + chart_slider_control_style_play_button = NULL, + chart_dropdown_control_style_background = NULL, + chart_dropdown_control_style_font_color = NULL, + chart_dropdown_control_style_border_styles_advanced = NULL, + chart_dropdown_control_style_border_style = NULL, + chart_dropdown_control_style_border_width = NULL, + chart_dropdown_control_style_border_color = NULL, + chart_dropdown_control_style_border_transparency = NULL, + chart_dropdown_control_style_border_radius = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + legend_position = NULL, + legend_hide_space = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + zoom_on_double_click = NULL, + zoom_on_mousewheel = NULL, + transition_duration = NULL, + transition_stagger = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{dot_fill}{Default color. If left blank, the first color in the color palette will be used. Flourish type hint: color, defaults to \code{NULL}} + +\item{dot_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_opacity_unhighlighted}{Opacity (unhighlighted). The opacity of the unhighlighted dots when one of the dots is highlighted. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Color when shading. The colors to use when shading by the answer to a questions. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the name of the category that you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26) Note that overrides from the "Color overrides" sheet take priority over the overrides in this setting. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_shape}{Shape. Choices: circle, square, polygon. Flourish type hint: string, defaults to \code{NULL}} + +\item{dot_sides}{Sides. Flourish type hint: number, defaults to \code{NULL}} + +\item{outline_width}{Stroke width. In pixels. The width of the outline stroke. Flourish type hint: number, defaults to \code{NULL}} + +\item{outline_color}{Stroke color. Outline color for your dots/squares/polygons. If not set, the layout background color will be used. Flourish type hint: color, defaults to \code{NULL}} + +\item{dot_label}{Default label or emoji. A label or emoji to show on each dot. Overriden by any label specified using the Label column setting. Flourish type hint: string, defaults to \code{NULL}} + +\item{dot_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{dot_label_bold}{Bold. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{dot_label_min}{Min size to display. The minimum text size in pixels for dot labels. Below this level they will not render. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_label_auto_size}{Sizing mode. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{dot_label_fixed}{Size in \%. Specifies font size across the graphic as a percentage of dot height. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_label_scale}{Scale. Scales the labels up or down from their default size. Flourish type hint: number, defaults to \code{NULL}} + +\item{dot_label_size_value}{Show numerical value when sizing dots. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{all_group_label}{Name for "all" group. Flourish type hint: string, defaults to \code{NULL}} + +\item{include_grouped_questions_on_shade_menu}{Include grouped questions on shading menu. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{include_grouped_questions_on_compare_menu}{Include grouped questions on compare menu. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{order_groups_by_size}{Order groups by size. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{order_groups_by_size_mode}{Choices: ascending, descending. Flourish type hint: string, defaults to \code{NULL}} + +\item{group_colors}{Arrange groups by color. If selected, dots of the same color are grouped together; if not the dots are placed in spreadsheet order. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{exclusions}{Exclude groups with the following names. Case-sensitive comma-separated list. Flourish type hint: string, defaults to \code{NULL}} + +\item{exclude_blanks}{Exclude groups with blank names. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bundle_small_groups}{Bundle small groups. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{small_groups_threshold}{Min size. Flourish type hint: number, defaults to \code{NULL}} + +\item{small_groups_other_label}{"Other" group label. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_mode}{Label position. Choices: atop, around, above. Flourish type hint: string, defaults to \code{NULL}} + +\item{label_tight_fit}{Position close to group. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{label_min_font_size}{Min font size. In pixels; the actual font size in any view is set automatically between the min and max. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_max_font_size}{Max font size. In pixels; the actual font size in any view is set automatically between the min and max. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_group_padding_lines}{Space for labels. The amount of space to leave above the groups, specified in lines of text. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_shadow_size}{Size. As percent of font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{label_shadow_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{label_group_count}{Show number of dots in group. Adds the number in brackets after the main label; ignored in chart, map and compare modes. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_group_percent}{Show group size as \% of visible dots. Adds group size as a percent of visible dots, in brackets after the main label. This setting is ignored in chart, map and compare modes and when showing a grouped question. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{label_group_percent_decimals}{Decimal places on percentage labels. Flourish type hint: number, defaults to \code{NULL}} + +\item{always_show_x_label}{Show X label when not comparing. Show the groups label at the bottom of chart when not comparing two metrics. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{show_xy_axis_labels_when_comparing}{Show X/Y labels when comparing. Show groups labels on both axes when comparing two metrics. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{compare_y_axis_width}{Y axis width. Flourish type hint: number, defaults to \code{NULL}} + +\item{compare_x_axis_height}{X axis height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_height_mode}{Height mode. Choices: auto, aspect_ratio. How the graphic height will be set when embedded with the responsive script embed without a specified height. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_aspect_ratio_wide}{Desktop. The chart aspect ratio on screens 640 pixels wide and higher (1 for square - a smaller value means a bigger height). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_aspect_ratio_narrow}{Mobile. The chart aspect ratio on screens narrower than 640 pixels (1 for square - a smaller value means a bigger height). Flourish type hint: number, defaults to \code{NULL}} + +\item{map_opacity_map_mode}{Map opacity (in map mode). Flourish type hint: number, defaults to \code{NULL}} + +\item{map_opacity_non_map_mode}{Map opacity (in other modes). Flourish type hint: number, defaults to \code{NULL}} + +\item{map_max_group_size}{Max group size in map view. In relative units. Flourish type hint: number, defaults to \code{NULL}} + +\item{map_dimensions}{Map dimensions. Choices: auto, aspect_ratio. Flourish type hint: string, defaults to \code{NULL}} + +\item{map_aspect_ratio}{Map aspect ratio. Aspect ratio of the map. 1 will make the map square. Flourish type hint: number, defaults to \code{NULL}} + +\item{map_region}{Region. Choices: world, usa, europe, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{map_region_url}{Url to equirectangular projection of map. Flourish type hint: url, defaults to \code{NULL}} + +\item{map_region_bounds_x1}{Minimum longitude. Flourish type hint: number, defaults to \code{NULL}} + +\item{map_region_bounds_x2}{Maximum longitude. Flourish type hint: number, defaults to \code{NULL}} + +\item{map_region_bounds_y2}{Minimum latitude. Flourish type hint: number, defaults to \code{NULL}} + +\item{map_region_bounds_y1}{Maximum latitude. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{panel_background_color}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{panel_background_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{panel_text_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{panel_icon_color}{Icon color. Choices: light, dark. Flourish type hint: string, defaults to \code{NULL}} + +\item{panel_width}{Panel width. Width of the controls panels on wide screens, ignored on mobile. Flourish type hint: number, defaults to \code{NULL}} + +\item{panel_cog_color}{Cog icon color. Flourish type hint: color, defaults to \code{NULL}} + +\item{panel_overlay}{Overlay panel over graphic. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{panel_hide_cog}{Disable controls toggle in published graphic. When checked, the controls icon for showing/ hiding the controls panel is visible only in the visualization and story editors not in the published visualization or story. When making a story, you can still lock the panel to be visible or hidden by clicking the cog icon in the story editor. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{select_group_show}{Group menu. Populated by all category columns. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{select_color_show}{Color menu. Populated by all category columns. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{select_size_show}{Size menu. Populated by all continuous number columns. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{select_compare_show}{Compare menu. Populated by all category columns; appears only when Group by is selected. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{histogram_show}{Bar mode. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{select_group_text}{Group by. Flourish type hint: string, defaults to \code{NULL}} + +\item{select_color_text}{Shade by. Flourish type hint: string, defaults to \code{NULL}} + +\item{select_size_text}{Size by. Flourish type hint: string, defaults to \code{NULL}} + +\item{select_compare_text}{Compare. Flourish type hint: string, defaults to \code{NULL}} + +\item{select_filter_text}{Filter. Flourish type hint: string, defaults to \code{NULL}} + +\item{select_map_text}{Group location. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_type}{Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_control_styles}{Adv. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_control_title}{Control title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group}{Grouped. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_mode}{Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_button_group_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_mode}{Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_filter_controls_dropdown_width_fixed}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_width}{Slider width. Width of the slider track in rems Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_max_label_width}{Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_step_time}{Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_loop}{Loop. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_filter_controls_slider_restart_pause}{Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_filter_controls_sort}{Sorting. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{column_filter_show_all}{Include "All" in slider/menu. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{column_filter_show_all_label}{Label for All. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_controls_style_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_controls_style_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_background_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_selected}{Selected. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_font_color_hover}{Mouse over. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_button_styles_advanced}{Button border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_button_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_button_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_button_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_color}{Track. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_font_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_color}{Handle. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_color}{Play/pause. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_slider_control_style_track_height}{Track height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_handle_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_slider_control_style_play_button}{Play button. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_styles_advanced}{Dropdown border styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_style}{Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_width}{Border width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_transparency}{Transparency. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_dropdown_control_style_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{legend_position}{Position. Choices: above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{legend_hide_space}{Remove space when empty. Turn off to avoid the legend taking up space when empty. Leave on to avoid the graphic jumping up and down a little when the legend is revealed or hidden. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{zoom_on_double_click}{Zoom on double click. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{zoom_on_mousewheel}{Zoom on pinch/mousewheel. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{transition_duration}{Duration. Time in milliseconds of each dots animation. Flourish type hint: number, defaults to \code{NULL}} + +\item{transition_stagger}{Stagger. The spread of time over which the dots start animating. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set survey chart details +} +\examples{ +try( + flourish(chart_type = "survey", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_survey_data(gapminder) |> + set_survey_details() +) +} diff --git a/R_package/man/set_svg_annotator_details.Rd b/R_package/man/set_svg_annotator_details.Rd new file mode 100644 index 0000000..9c728af --- /dev/null +++ b/R_package/man/set_svg_annotator_details.Rd @@ -0,0 +1,569 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_svg_annotator_details.R +\name{set_svg_annotator_details} +\alias{set_svg_annotator_details} +\title{Set svg annotator chart details} +\usage{ +set_svg_annotator_details( + ., + svg_url = NULL, + svg_width_wide = NULL, + mobile_view = NULL, + mobile_breakpoint = NULL, + mobile_svg_mode = NULL, + mobile_svg_url = NULL, + mobile_svg_width = NULL, + mobile_content_mode = NULL, + clickable_svg_animation = NULL, + clickable_svg_animation_duration = NULL, + clickable_svg_animation_config = NULL, + clickable_svg_animation_attr = NULL, + clickable_svg_animation_values = NULL, + clickable_svg_animation_repeat = NULL, + text_panel_enabled = NULL, + h1_default = NULL, + h1_size = NULL, + h2_default = NULL, + h2_size = NULL, + content_default = NULL, + content_size = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + svg_reset_fonts = NULL, + show_css = NULL, + stylesheet = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{svg_url}{SVG file. Flourish type hint: url, defaults to \code{NULL}} + +\item{svg_width_wide}{Image width. The width in \% of the image in standard wide-screen view. Flourish type hint: number, defaults to \code{NULL}} + +\item{mobile_view}{Different mobile view. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{mobile_breakpoint}{Breakpoint. The size in pixels at which to switch to mobile layout. Flourish type hint: number, defaults to \code{NULL}} + +\item{mobile_svg_mode}{Image on mobile. Choices: none, same, different. Whether to show the image at all on mobile. Flourish type hint: string, defaults to \code{NULL}} + +\item{mobile_svg_url}{SVG file (mobile). Flourish type hint: url, defaults to \code{NULL}} + +\item{mobile_svg_width}{Width. The width in \% of the image on a mobile view. Flourish type hint: number, defaults to \code{NULL}} + +\item{mobile_content_mode}{Mobile content mode. Choices: interactive, all, accordion. If turned on all content will display on load in mobile view. Flourish type hint: string, defaults to \code{NULL}} + +\item{clickable_svg_animation}{Animation clickable elements. Choices: off, animation. Flourish type hint: string, defaults to \code{NULL}} + +\item{clickable_svg_animation_duration}{Duration. The duration of the highlight animation on each clickable element. Flourish type hint: number, defaults to \code{NULL}} + +\item{clickable_svg_animation_config}{Advanced. Reveal settings to adjust the SVG Animation properties on clickable elements. See https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate for more details. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{clickable_svg_animation_attr}{Attribute. Flourish type hint: string, defaults to \code{NULL}} + +\item{clickable_svg_animation_values}{Values. Flourish type hint: string, defaults to \code{NULL}} + +\item{clickable_svg_animation_repeat}{Repeat. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_panel_enabled}{Text panel enabled. Set to disabled to only show text in popups. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{h1_default}{Default heading. The text to show on load. Flourish type hint: text, defaults to \code{NULL}} + +\item{h1_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{h2_default}{Default subheading. The text to show on load. Flourish type hint: text, defaults to \code{NULL}} + +\item{h2_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_default}{Default subheading. The text to show on load. Flourish type hint: text, defaults to \code{NULL}} + +\item{content_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. The text to appear in the popup. You can use \code{{{column_name}}} to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{# if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. The text to appear in the popup. You can use \code{{{column_name}}} to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{# if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. The text to appear in the panel. You can use \code{{{column_name}}} to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{# if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. The text to appear in the panel. You can use \code{{{column_name}}} to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using \verb{\{\{# if column_name\}\}Text to display when column_name is not empty\{\{/if\}\}}. For example: \verb{\{\{Country\}\} \{\{#if Capital\}\}(Capital: \{\{Capital\}\})\{\{/if\}\}} Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing "Click position" is especially useful when your visualisation is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{svg_reset_fonts}{Override fonts in SVG. If enabled, font-family styles will be removed in the SVG, allowing the text to be inherited from the current theme or settings. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{show_css}{Edit CSS. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{stylesheet}{Custom styles. Use the class .clickable-element to target all interactive elements. When one is clicked, it is .highlighted and the others are .faded. The text for each clickable element is inside a .text-block, which is also .accordion in accordion mode. Flourish type hint: code, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default, but you can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, but you can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Choices: stack-default, stack-2, stack-3, stack-4. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements such as axes. Note that when direction is set to "right to left" any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualisation container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background colour is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders. (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders. Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set svg annotator chart details +} +\examples{ +try( + flourish(chart_type = "svg_annotator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_svg_annotator_data(gapminder) |> + set_svg_annotator_details() +) +} diff --git a/R_package/man/set_table_details.Rd b/R_package/man/set_table_details.Rd new file mode 100644 index 0000000..0373108 --- /dev/null +++ b/R_package/man/set_table_details.Rd @@ -0,0 +1,899 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_table_details.R +\name{set_table_details} +\alias{set_table_details} +\title{Set table chart details} +\usage{ +set_table_details( + ., + table_min_width = NULL, + table_border_width = NULL, + table_border_color = NULL, + sorting_enabled = NULL, + sorting_custom_columns = NULL, + pagination_amount = NULL, + markdown_enabled = NULL, + cell_height = NULL, + cell_padding_vertical = NULL, + cell_padding_horizontal = NULL, + cell_wrap = NULL, + cell_horizontal_alignment = NULL, + cell_numeric_horizontal_alignment = NULL, + cell_vertical_alignment = NULL, + cell_fill_1 = NULL, + cell_fill_2 = NULL, + cell_fill_direction = NULL, + cell_fill_custom_enabled = NULL, + cell_fill_custom_categorical = NULL, + cell_fill_custom_numeric = NULL, + cell_fill_margin_vertical = NULL, + cell_fill_margin_horizontal = NULL, + cell_border_mode = NULL, + cell_border_color = NULL, + cell_border_width = NULL, + cell_border_style = NULL, + cell_font_color = NULL, + cell_link_color = NULL, + cell_font_size = NULL, + cell_font_size_custom = NULL, + column_width_mode = NULL, + column_widths = NULL, + header_font_weight = NULL, + header_fill = NULL, + header_font_color = NULL, + header_underline_sorting = NULL, + header_style_default = NULL, + header_height = NULL, + header_padding = NULL, + header_horizontal_alignment = NULL, + header_font_default = NULL, + header_font_size = NULL, + header_border_default = NULL, + header_border_color = NULL, + header_border_width = NULL, + header_border_style = NULL, + cell_image_height = NULL, + cell_image_radius = NULL, + bar_columns_enabled = NULL, + bar_columns_bar_1_columns = NULL, + bar_columns_bar_1_column_name = NULL, + bar_columns_type = NULL, + bar_columns_bar_1_height = NULL, + bar_columns_bar_1_width = NULL, + bar_columns_bar_1_column_padding = NULL, + bar_columns_bar_1_proportional = NULL, + bar_columns_bar_1_same_scale = NULL, + bar_columns_bar_1_zero_line = NULL, + bar_columns_bar_1_zero_line_color = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + bar_columns_bar_1_labels = NULL, + bar_columns_bar_1_label_size = NULL, + chart_legend_show_legend = NULL, + chart_legend_title_mode = NULL, + chart_legend_title = NULL, + chart_legend_swatch_width = NULL, + chart_legend_swatch_height = NULL, + chart_legend_swatch_radius = NULL, + chart_legend_legend_items_padding = NULL, + chart_legend_swatch_outline = NULL, + chart_legend_swatch_outline_color = NULL, + chart_legend_order_override = NULL, + chart_legend_icon_height = NULL, + chart_legend_icon_color = NULL, + chart_legend_max_width = NULL, + chart_legend_orientation = NULL, + legend_position = NULL, + chart_legend_container_alignment = NULL, + chart_legend_container_orientation = NULL, + chart_legend_container_title_weight = NULL, + chart_legend_container_text_weight = NULL, + chart_legend_container_text_color = NULL, + chart_legend_container_text_size = NULL, + line_columns_enabled = NULL, + line_columns_line_1_columns = NULL, + line_columns_line_1_column_name = NULL, + line_columns_line_1_width = NULL, + line_columns_line_1_height = NULL, + line_columns_line_1_color = NULL, + line_columns_line_1_area = NULL, + line_columns_line_1_min_enabled = NULL, + line_columns_line_1_min = NULL, + line_columns_line_1_max_enabled = NULL, + line_columns_line_1_max = NULL, + mobile_view = NULL, + mobile_breakpoint = NULL, + mobile_cell_font_size = NULL, + mobile_cell_font_size_custom = NULL, + mobile_pagination_amount = NULL, + search_enabled = NULL, + search_mode = NULL, + search_width = NULL, + search_background_color = NULL, + search_text_color = NULL, + search_placeholder = NULL, + no_results_text = NULL, + search_hide_table = NULL, + search_hide_published = NULL, + search_columns = NULL, + search_columns_custom = NULL, + search_resize = NULL, + search_dropdown = NULL, + search_dropdown_persistent = NULL, + search_val = NULL, + chart_popup_show_popups = NULL, + chart_popup_is_custom = NULL, + chart_popup_custom_template = NULL, + chart_popup_show_pointer = NULL, + chart_popup_show_shadow = NULL, + chart_popup_style_popups = NULL, + chart_popup_text_color = NULL, + chart_popup_align = NULL, + chart_popup_text_size = NULL, + chart_popup_fill_color = NULL, + chart_popup_opacity = NULL, + chart_popup_padding = NULL, + chart_popup_border_radius = NULL, + chart_popup_max_width = NULL, + formatted_columns = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL, + chart_url_settings_enabled = NULL, + chart_url_settings_whitelist = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{table_min_width}{Min width. Flourish type hint: number, defaults to \code{NULL}} + +\item{table_border_width}{Border. Flourish type hint: number, defaults to \code{NULL}} + +\item{table_border_color}{Border color. Flourish type hint: color, defaults to \code{NULL}} + +\item{sorting_enabled}{Sortable columns. Choices: all, none, custom. Determines whether a viewer can sort the table by clicking on the column headers. Custom allows the user only to sort listed columns. Flourish type hint: string, defaults to \code{NULL}} + +\item{sorting_custom_columns}{Columns to make sortable. Write each column name you want to make sortable on a new line. Flourish type hint: text, defaults to \code{NULL}} + +\item{pagination_amount}{Rows per page. If you dont want pagination, set this number to a value greater than the number of rows in your data. Flourish type hint: number, defaults to \code{NULL}} + +\item{markdown_enabled}{Cell text styling. Choices: \code{TRUE}, \code{FALSE}. Enables Markdown for your cells. For example for \emph{italic}, \strong{bold} text. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{cell_height}{Min height. Flourish type hint: number, defaults to \code{NULL}} + +\item{cell_padding_vertical}{Padding vertical. Flourish type hint: number, defaults to \code{NULL}} + +\item{cell_padding_horizontal}{Padding horizontal. Flourish type hint: number, defaults to \code{NULL}} + +\item{cell_wrap}{Wrap text in cell. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{cell_horizontal_alignment}{Text. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{cell_numeric_horizontal_alignment}{Numbers. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{cell_vertical_alignment}{Vertical alignment. Choices: top, center, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{cell_fill_1}{Main color. Flourish type hint: color, defaults to \code{NULL}} + +\item{cell_fill_2}{Stripe color. Flourish type hint: color, defaults to \code{NULL}} + +\item{cell_fill_direction}{Stripe direction. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{cell_fill_custom_enabled}{Color cells based on content. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{cell_fill_custom_categorical}{Categorical coloring. To color cells based on their content, use the format: cell-color/text-color : cell-text : column name OR row-number To specify a row, write "row-" followed by the row number from the datasheet. Its also possible to leave out the column name or row number if you want to target all the cells in the table For example: red/white : Chelsea Use * in place of cell-text to select an entire column or row. For example: #0000dd/#ffffff : Alabama #ffffff/#dddddd : * : State #0000dd/#ffffff : * : row-2 #ffffff/#dddddd : n/a : Capital Flourish type hint: text, defaults to \code{NULL}} + +\item{cell_fill_custom_numeric}{Numeric coloring. Color cells numerically based on their content. For sequential coloring, use the format: min_color >> max_color : column_name : domain_min >> domain_max The domain is optional, for example: #ffffff >> #00ff00 : Population #ffffff >> #00ff00 : Population : 0 >> 1000000000 For diverging coloring, use the format: min_color >> midpt_color >> max_color : col_name : domain_min >> domain_mid >> domain_max The domain is optional, for example: #ffffff >> #00ff00 >> #ff00ff : Vote share #ffffff >> #00ff00 >> #ff00ff : Vote share : 0 >> 50 >> 100 Where both numeric and categorical coloring are used on a cell, categorical will override numeric. Flourish type hint: text, defaults to \code{NULL}} + +\item{cell_fill_margin_vertical}{Vertical margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{cell_fill_margin_horizontal}{Horizontal margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{cell_border_mode}{Mode. Choices: none, horizontal, vertical, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{cell_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{cell_border_width}{Thickness. Flourish type hint: number, defaults to \code{NULL}} + +\item{cell_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{cell_font_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{cell_link_color}{Link color. Flourish type hint: color, defaults to \code{NULL}} + +\item{cell_font_size}{Size. Choices: 1, 1.25, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{cell_font_size_custom}{Custom. Specify a custom responsive font size in rems Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{column_width_mode}{Choices: auto, equal, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{column_widths}{Column widths. A comma separated lists of column widths. The first column will be the first number in the list. You can use "px" to set fixed widths or "\%" to use percentage of total width. (e.g. 200px,200px,25\%). Flourish type hint: string, defaults to \code{NULL}} + +\item{header_font_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{header_fill}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{header_font_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{header_underline_sorting}{Underline sorting header. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{header_style_default}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{header_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{header_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{header_horizontal_alignment}{Horizontal alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{header_font_default}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{header_font_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{header_border_default}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{header_border_width}{Thickness. Flourish type hint: number, defaults to \code{NULL}} + +\item{header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{cell_image_height}{Height. as a percentage of the cell height. Flourish type hint: number, defaults to \code{NULL}} + +\item{cell_image_radius}{Rounded corners. Sets the radius of the corner roundness (in \%). A value of 50 means your image will show as a circle. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_columns_enabled}{Choices: \code{TRUE}, \code{FALSE}. This setting will convert numerical values in your data to a simple visual bar chart. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_columns_bar_1_columns}{Which columns should be part of the bar chart?. Just write down the column names on a new line. Flourish type hint: text, defaults to \code{NULL}} + +\item{bar_columns_bar_1_column_name}{New column name. Flourish type hint: string, defaults to \code{NULL}} + +\item{bar_columns_type}{Bar type. Choices: bars, columns. Flourish type hint: string, defaults to \code{NULL}} + +\item{bar_columns_bar_1_height}{Max height. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_columns_bar_1_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_columns_bar_1_column_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_columns_bar_1_proportional}{Mode. Choices: \code{FALSE}, \code{TRUE}. Display data in a proportional bar chart or a standard stacked bar chart with a fixed min and max, e.g. for negative numbers. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_columns_bar_1_same_scale}{Consistent scale. If enabled, all the bar charts in the table will use the same X scale. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_columns_bar_1_zero_line}{Show zero line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{bar_columns_bar_1_zero_line_color}{Zero line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{bar_columns_bar_1_labels}{Labels. Choices: none, popup, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{bar_columns_bar_1_label_size}{Inline label size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_show_legend}{Legend. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{legend_position}{Legend position. Choices: above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_title_weight}{Title weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_weight}{Text weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_legend_container_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_legend_container_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_columns_enabled}{Choices: \code{TRUE}, \code{FALSE}. This setting will convert numerical values in your data to a simple visual line chart. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{line_columns_line_1_columns}{Which columns should be part of the line chart?. Write down the column names on a new line. Flourish type hint: text, defaults to \code{NULL}} + +\item{line_columns_line_1_column_name}{New column name. Flourish type hint: string, defaults to \code{NULL}} + +\item{line_columns_line_1_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_columns_line_1_height}{Max height. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_columns_line_1_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{line_columns_line_1_area}{Area chart. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{line_columns_line_1_min_enabled}{Min. Choices: \code{TRUE}, \code{FALSE}. Use a fixed min value. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{line_columns_line_1_min}{Min value. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_columns_line_1_max_enabled}{Max. Choices: \code{TRUE}, \code{FALSE}. Use a fixed max value. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{line_columns_line_1_max}{Max value. Flourish type hint: number, defaults to \code{NULL}} + +\item{mobile_view}{Mobile view. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{mobile_breakpoint}{Mobile breakpoint width. Flourish type hint: number, defaults to \code{NULL}} + +\item{mobile_cell_font_size}{Text size. Choices: 1, 1.25, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{mobile_cell_font_size_custom}{Custom. Specify a custom responsive font size in rems Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{mobile_pagination_amount}{Rows per page. If you dont want pagination, set this number to a value greater than the number of rows in your data. Flourish type hint: number, defaults to \code{NULL}} + +\item{search_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{search_mode}{Search mode. Choices: anywhere, start, whole. Anywhere : Search for the specified text anywhere in the cell Start : Search for the specified text at the beginning of the cell Whole : Search for the exact specified text in the cell. Flourish type hint: string, defaults to \code{NULL}} + +\item{search_width}{Width. Width of search container. Flourish type hint: number, defaults to \code{NULL}} + +\item{search_background_color}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{search_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{search_placeholder}{Placeholder text. Flourish type hint: string, defaults to \code{NULL}} + +\item{no_results_text}{Text when no results. Flourish type hint: string, defaults to \code{NULL}} + +\item{search_hide_table}{Hide table before search. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{search_hide_published}{Hide search when published. Keeps the search box visible in the editor (e.g. for filtering in a story) but hides it in the published visualization or storyFlourish type hint: boolean, defaults to \code{NULL}} + +\item{search_columns}{Columns to search. Choices: all, first, custom. Choose which columns you want to search through. You might want to narrow this down with big datasets to speed it up You can select specific columns by writing them down on a new line, like this: Column A Column B. Flourish type hint: string, defaults to \code{NULL}} + +\item{search_columns_custom}{Flourish type hint: text, defaults to \code{NULL}} + +\item{search_resize}{Resize table after searching. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{search_dropdown}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{search_dropdown_persistent}{Always show dropdown suggestions. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{search_val}{Search value. The current string value of the search box. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_popup_show_popups}{Popups. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_is_custom}{Popup contents. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_custom_template}{Popup content. The text to appear in the popup. You can use \code{{{column_name}}} to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_show_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_style_popups}{Custom styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_text_color}{Text colour. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_text_size}{Font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_fill_color}{Fill colour. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_border_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{formatted_columns}{Columns to format. Write down the column names on a new line that you want to apply formatting to. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after a number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_enabled}{Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_url_settings_whitelist}{Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. \code{layout.background_color}. Flourish type hint: text, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set table chart details +} +\examples{ +try( + flourish(chart_type = "table", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_table_data(gapminder) |> + set_table_details() +) +} diff --git a/R_package/man/set_text_annotator_details.Rd b/R_package/man/set_text_annotator_details.Rd new file mode 100644 index 0000000..a155594 --- /dev/null +++ b/R_package/man/set_text_annotator_details.Rd @@ -0,0 +1,461 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_text_annotator_details.R +\name{set_text_annotator_details} +\alias{set_text_annotator_details} +\title{Set text annotator chart details} +\usage{ +set_text_annotator_details( + ., + text = NULL, + highlight_color = NULL, + layout_align = NULL, + text_container_width = NULL, + text_font_size = NULL, + text_font_color = NULL, + text_font_color_highlighted = NULL, + text_font_color_highlighted_contrast = NULL, + text_highlight_type = NULL, + text_highlight_handdrawn = NULL, + highlighted_stroke_end = NULL, + highlighted_stroke_amount = NULL, + highlighted_stroke_width = NULL, + note_type = NULL, + note_visibility = NULL, + note_font_size = NULL, + side_panel_width = NULL, + note_font_color = NULL, + note_background_color = NULL, + note_custom_content = NULL, + note_mobile_mode = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{text}{Text. Fill in the text you want to annotate In the datasheet, you can write which parts of the text should be annotated. If you want to annotate a specific part of the text that occurs more than once, you can add identifiers to your text. For example, annotating the word beautiful would look like: \verb{[beautiful]\{beautiful-annotation\}}. Then, in the datasheet, you can write beautiful-annotation in the first column and the text to include in the annotation in the second column. Flourish type hint: html, defaults to \code{NULL}} + +\item{highlight_color}{Highlight color. Flourish type hint: color, defaults to \code{NULL}} + +\item{layout_align}{Align. Choices: center, start. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_container_width}{Width. Max width of text container. Flourish type hint: number, defaults to \code{NULL}} + +\item{text_font_size}{Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{text_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{text_font_color_highlighted}{Text color (highlighted). Flourish type hint: color, defaults to \code{NULL}} + +\item{text_font_color_highlighted_contrast}{Text color (highlighted). Flourish type hint: color, defaults to \code{NULL}} + +\item{text_highlight_type}{Highlight type. Choices: handdrawn, background, text_color, underline. Flourish type hint: string, defaults to \code{NULL}} + +\item{text_highlight_handdrawn}{Handdrawn type. Choices: circle, highlight, box, underline. Flourish type hint: string, defaults to \code{NULL}} + +\item{highlighted_stroke_end}{Stroke end. Choices: round,Flourish type hint: string, defaults to \code{NULL}} + +\item{highlighted_stroke_amount}{Iterations. Number of lines to draw. Flourish type hint: number, defaults to \code{NULL}} + +\item{highlighted_stroke_width}{Thickness. Flourish type hint: number, defaults to \code{NULL}} + +\item{note_type}{Mode. Choices: side-panel, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{note_visibility}{Show notes. Choices: always, click. Flourish type hint: string, defaults to \code{NULL}} + +\item{note_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{side_panel_width}{Width. Max width of side panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{note_font_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{note_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{note_custom_content}{Note content. Use \code{{{NOTE}}} to show the annotation content. Use this setting to add prefixes, suffixes or additional HTML styling to your annotations. Flourish type hint: html, defaults to \code{NULL}} + +\item{note_mobile_mode}{Mobile mode. Choices: side-panel, inline, overlay. Choose where to display the notes on smaller screens. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set text annotator chart details +} +\examples{ +try( + flourish(chart_type = "text_annotator", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_text_annotator_data(gapminder) |> + set_text_annotator_details() +) +} diff --git a/R_package/man/set_timeline_details.Rd b/R_package/man/set_timeline_details.Rd new file mode 100644 index 0000000..e884a3c --- /dev/null +++ b/R_package/man/set_timeline_details.Rd @@ -0,0 +1,1136 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_timeline_details.R +\name{set_timeline_details} +\alias{set_timeline_details} +\title{Set timeline chart details} +\usage{ +set_timeline_details( + ., + widescreen_orientation = NULL, + height_mode = NULL, + facet_aspect = NULL, + facet_aspect_custom = NULL, + facet_aspect_breakpoint = NULL, + facet_aspect_mobile = NULL, + facet_aspect_mobile_custom = NULL, + line_color = NULL, + line_width = NULL, + line_cap = NULL, + events_scale_type = NULL, + background_opacity = NULL, + background_sizing = NULL, + background_zoom = NULL, + background_gradient_size = NULL, + background_gradient_opacity = NULL, + background_gradient_blur = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + marker_size = NULL, + marker_background_color = NULL, + marker_background_color_custom = NULL, + marker_border_width = NULL, + marker_border_color = NULL, + marker_border_color_custom = NULL, + connector_size = NULL, + connector_space = NULL, + connector_color = NULL, + connector_opacity = NULL, + content_background_color = NULL, + content_padding = NULL, + content_space_between = NULL, + content_consistent_size = NULL, + content_border_radius = NULL, + individual_borders = NULL, + content_border_width = NULL, + content_border_opacity = NULL, + content_border_color = NULL, + content_border_color_custom = NULL, + content_border_top_width = NULL, + content_border_top_opacity = NULL, + content_border_top_color = NULL, + content_border_top_color_custom = NULL, + content_border_right_width = NULL, + content_border_right_opacity = NULL, + content_border_right_color = NULL, + content_border_right_color_custom = NULL, + content_border_bottom_width = NULL, + content_border_bottom_opacity = NULL, + content_border_bottom_color = NULL, + content_border_bottom_color_custom = NULL, + content_border_left_width = NULL, + content_border_left_opacity = NULL, + content_border_left_color = NULL, + content_border_left_color_custom = NULL, + content_title_alignment = NULL, + content_title_styling = NULL, + content_title_line_height = NULL, + content_title_size = NULL, + content_title_size_custom = NULL, + content_title_weight = NULL, + content_title_color = NULL, + content_title_color_custom = NULL, + content_title_space_above = NULL, + content_title_space_above_custom = NULL, + content_subtitle_alignment = NULL, + content_subtitle_styling = NULL, + content_subtitle_line_height = NULL, + content_subtitle_size = NULL, + content_subtitle_size_custom = NULL, + content_subtitle_weight = NULL, + content_subtitle_color = NULL, + content_subtitle_color_custom = NULL, + content_subtitle_space_above = NULL, + content_subtitle_space_above_custom = NULL, + content_text_alignment = NULL, + content_text_styling = NULL, + content_text_line_height = NULL, + content_text_size = NULL, + content_text_size_custom = NULL, + content_text_weight = NULL, + content_text_color = NULL, + content_text_color_custom = NULL, + content_text_space_above = NULL, + content_text_space_above_custom = NULL, + link_weight = NULL, + link_color = NULL, + link_underline = NULL, + image_location = NULL, + image_opacity = NULL, + image_display = NULL, + image_sizing = NULL, + image_zoom = NULL, + image_content_sizing = NULL, + image_content_zoom = NULL, + image_float_position = NULL, + image_inline_position = NULL, + image_alignment = NULL, + content_banner_depth = NULL, + content_banner_depth_custom = NULL, + image_width = NULL, + image_margin = NULL, + image_aspect = NULL, + navigation_step_type = NULL, + navigation_screen_proportion = NULL, + navigation_event_number = NULL, + navigation_icon_type = NULL, + navigation_icon_size = NULL, + navigation_icon_opacity = NULL, + navigation_icon_custom = NULL, + navigation_icon_color = NULL, + navigation_gradient_color = NULL, + navigation_gradient_width = NULL, + navigation_gradient_opacity = NULL, + chart_x_axis_axis_position = NULL, + chart_x_axis_y_axis_position = NULL, + chart_x_axis_numeric_scale_type = NULL, + chart_x_axis_linear_min = NULL, + chart_x_axis_linear_max = NULL, + chart_x_axis_log_min = NULL, + chart_x_axis_log_max = NULL, + chart_x_axis_datetime_min = NULL, + chart_x_axis_datetime_max = NULL, + chart_x_axis_flip = NULL, + chart_x_axis_show_scale_settings = NULL, + chart_x_axis_nice = NULL, + chart_x_axis_zero_axis = NULL, + chart_x_axis_title_mode = NULL, + chart_x_axis_title = NULL, + chart_x_axis_title_styling = NULL, + chart_x_axis_title_weight = NULL, + chart_x_axis_title_color = NULL, + chart_x_axis_title_size = NULL, + chart_x_axis_title_padding = NULL, + chart_x_axis_tick_label_position = NULL, + chart_x_axis_tick_label_styling = NULL, + chart_x_axis_tick_label_size = NULL, + chart_x_axis_tick_label_color = NULL, + chart_x_axis_tick_padding = NULL, + chart_x_axis_tick_label_angle = NULL, + chart_x_axis_tick_label_weight = NULL, + chart_x_axis_tick_label_max_lines = NULL, + chart_x_axis_tick_label_line_height = NULL, + chart_x_axis_tick_label_space_mode = NULL, + chart_x_axis_tick_label_space = NULL, + chart_x_axis_tick_mode = NULL, + chart_x_axis_tick_number = NULL, + chart_x_axis_tick_custom = NULL, + chart_x_axis_line_and_tick_color = NULL, + chart_x_axis_line_and_tick_width = NULL, + chart_x_axis_tick_length = NULL, + chart_x_axis_tick_side = NULL, + chart_x_axis_line_visible = NULL, + chart_x_axis_edge_padding = NULL, + chart_x_axis_gridlines_visible = NULL, + chart_x_axis_gridlines_styling = NULL, + chart_x_axis_gridline_color = NULL, + chart_x_axis_gridline_style = NULL, + chart_x_axis_gridline_width = NULL, + chart_x_axis_gridline_category_dividers = NULL, + chart_x_axis_gridline_category_dividers_extend = NULL, + chart_y_axis_axis_visible = NULL, + chart_y_axis_numeric_scale_type = NULL, + chart_y_axis_linear_min = NULL, + chart_y_axis_linear_max = NULL, + chart_y_axis_log_min = NULL, + chart_y_axis_log_max = NULL, + chart_y_axis_datetime_min = NULL, + chart_y_axis_datetime_max = NULL, + chart_y_axis_flip = NULL, + chart_y_axis_show_scale_settings = NULL, + chart_y_axis_nice = NULL, + chart_y_axis_zero_axis = NULL, + chart_y_axis_title_mode = NULL, + chart_y_axis_title = NULL, + chart_y_axis_title_styling = NULL, + chart_y_axis_title_position = NULL, + chart_y_axis_title_weight = NULL, + chart_y_axis_title_color = NULL, + chart_y_axis_title_size = NULL, + chart_y_axis_title_padding = NULL, + chart_y_axis_tick_label_position = NULL, + chart_y_axis_tick_label_styling = NULL, + chart_y_axis_tick_label_size = NULL, + chart_y_axis_tick_label_color = NULL, + chart_y_axis_tick_padding = NULL, + chart_y_axis_tick_label_angle = NULL, + chart_y_axis_tick_label_weight = NULL, + chart_y_axis_tick_label_max_lines = NULL, + chart_y_axis_tick_label_line_height = NULL, + chart_y_axis_tick_label_space_mode = NULL, + chart_y_axis_tick_label_space = NULL, + chart_y_axis_tick_mode = NULL, + chart_y_axis_tick_number = NULL, + chart_y_axis_tick_custom = NULL, + chart_y_axis_line_and_tick_color = NULL, + chart_y_axis_line_and_tick_width = NULL, + chart_y_axis_tick_length = NULL, + chart_y_axis_tick_side = NULL, + chart_y_axis_line_visible = NULL, + chart_y_axis_edge_padding = NULL, + chart_y_axis_gridlines_visible = NULL, + chart_y_axis_gridlines_styling = NULL, + chart_y_axis_gridline_color = NULL, + chart_y_axis_gridline_style = NULL, + chart_y_axis_gridline_width = NULL, + chart_y_axis_gridline_category_dividers = NULL, + chart_y_axis_gridline_category_dividers_extend = NULL, + chart_categorical_legend_show_legend = NULL, + chart_categorical_legend_title_mode = NULL, + chart_categorical_legend_title = NULL, + chart_categorical_legend_swatch_width = NULL, + chart_categorical_legend_swatch_height = NULL, + chart_categorical_legend_swatch_radius = NULL, + chart_categorical_legend_legend_items_padding = NULL, + chart_categorical_legend_swatch_outline = NULL, + chart_categorical_legend_swatch_outline_color = NULL, + chart_categorical_legend_order_override = NULL, + chart_categorical_legend_icon_height = NULL, + chart_categorical_legend_icon_color = NULL, + chart_categorical_legend_max_width = NULL, + chart_categorical_legend_orientation = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{widescreen_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{height_mode}{Height mode. Choices: auto, standard, aspect. Auto: sets the height based on the chart type, data and width. Standard: uses the default Flourish responsive sizing. Aspect ratio: sets the aspect of each plot. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to \code{NULL}} + +\item{facet_aspect}{Desktop aspect. Choices: 0.75, 1, 1.5, custom. Aspect ratio of the visualization in desktop mode. Flourish type hint: string, defaults to \code{NULL}} + +\item{facet_aspect_custom}{Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_aspect_breakpoint}{Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to \code{NULL}} + +\item{facet_aspect_mobile}{Mobile aspect. Choices: 0.75, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{facet_aspect_mobile_custom}{Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{line_width}{Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{line_cap}{Cap. Choices: butt, round, square. The shape used to draw the end points. Flourish type hint: string, defaults to \code{NULL}} + +\item{events_scale_type}{Choices: linear, timescale. Flourish type hint: string, defaults to \code{NULL}} + +\item{background_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{background_sizing}{Sizing. Choices: contain, cover, zoom. Flourish type hint: string, defaults to \code{NULL}} + +\item{background_zoom}{Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to \code{NULL}} + +\item{background_gradient_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{background_gradient_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{background_gradient_blur}{Blur. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{marker_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{marker_background_color}{Color. Choices: data, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{marker_background_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{marker_border_width}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{marker_border_color}{Color. Choices: data, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{marker_border_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{connector_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{connector_space}{Space. Sets the area around the markers to keep clear of content containers. Flourish type hint: number, defaults to \code{NULL}} + +\item{connector_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{connector_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_background_color}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{content_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_space_between}{Space between. Defines the minimum amount of space between each content container. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_consistent_size}{Keep sizes consistent. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{content_border_radius}{Radius. Flourish type hint: number, defaults to \code{NULL}} + +\item{individual_borders}{Style borders individually. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{content_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_border_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_border_color}{Color. Choices: data, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_border_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{content_border_top_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_border_top_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_border_top_color}{Color. Choices: data, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_border_top_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{content_border_right_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_border_right_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_border_right_color}{Color. Choices: data, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_border_right_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{content_border_bottom_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_border_bottom_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_border_bottom_color}{Color. Choices: data, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_border_bottom_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{content_border_left_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_border_left_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_border_left_color}{Color. Choices: data, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_border_left_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{content_title_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{content_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_title_size}{Size. Choices: 1.0, 1.2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_title_size_custom}{Custom. Specify a custom responsive font size. Best results will be with values between 0.8 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_title_color}{Color. Choices: data, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_title_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{content_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_subtitle_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{content_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_subtitle_size}{Size. Choices: 1.0, 1.2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_subtitle_size_custom}{Custom. Specify a custom responsive font size. Best results will be with values between 0.8 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_subtitle_color}{Color. Choices: data, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_subtitle_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{content_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_text_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{content_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_text_size}{Size. Choices: 1.0, 1.2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_text_size_custom}{Custom. Specify a custom responsive font size. Best results will be with values between 0.8 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{content_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_text_color}{Color. Choices: data, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_text_color_custom}{Flourish type hint: color, defaults to \code{NULL}} + +\item{content_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{link_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{link_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{link_underline}{Underline. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{image_location}{Location. Choices: none, marker, content. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_display}{Content display. Choices: float, inline, banner, background. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_sizing}{Sizing. Choices: contain, cover, zoom. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_zoom}{Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_content_sizing}{Sizing. Choices: contain, cover, zoom. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_content_zoom}{Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_float_position}{Position. Choices: 1, 2. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_inline_position}{Position. Choices: 1, 2, 3. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_alignment}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_banner_depth}{Banner depth. Choices: 2, 4, 6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{content_banner_depth_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_width}{Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_aspect}{Aspect ratio. As a multiplier of the images width. For example: a value of 2, means the image height is 2 times the image width. Flourish type hint: number, defaults to \code{NULL}} + +\item{navigation_step_type}{Step by. Choices: screen, event. Determines by which measure the timeline is approximately moved each time the navigation buttons are clicked. Flourish type hint: string, defaults to \code{NULL}} + +\item{navigation_screen_proportion}{Proportion. Flourish type hint: number, defaults to \code{NULL}} + +\item{navigation_event_number}{Number. Flourish type hint: number, defaults to \code{NULL}} + +\item{navigation_icon_type}{Icon. Choices: default, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{navigation_icon_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{navigation_icon_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{navigation_icon_custom}{Custom icon. Flourish type hint: url, defaults to \code{NULL}} + +\item{navigation_icon_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{navigation_gradient_color}{Color. If undefined the color will default to the background of the visualization. Flourish type hint: color, defaults to \code{NULL}} + +\item{navigation_gradient_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{navigation_gradient_opacity}{Opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_axis_position}{Position. Choices: bottom, top, hidden. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_y_axis_position}{Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_zero_axis}{Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_position}{Position. Choices: default, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_tick_side}{Tick side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_x_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_axis_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_numeric_scale_type}{Type. Choices: linear, log. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_linear_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_linear_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_log_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_min}{Min (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_datetime_max}{Max (date). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_flip}{Flip axis. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_show_scale_settings}{Configure default min/max. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_nice}{Round min/max. Choices: \code{TRUE}, \code{FALSE}. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_zero_axis}{Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_mode}{Type. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title}{Text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_title_position}{Position. Choices: side, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_title_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_title_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_position}{Position. Choices: default, above, below. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_tick_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_angle}{Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_max_lines}{Max lines. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space_mode}{Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_label_space}{Space. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_mode}{Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_tick_number}{Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_custom}{One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use \code{{{FIRST}}} and \code{{{LAST}}} to add ticks at the minimum and maximum of the axis. For example: \code{{{FIRST}}} 25000 50000 75000 \code{{{LAST}}}. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_color}{Line color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_line_and_tick_width}{Line width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_length}{Tick length. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_tick_side}{Side. Choices: out, in. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_line_visible}{Axis line. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_edge_padding}{Edge padding (\%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_visible}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridlines_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_style}{Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers}{Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_y_axis_gridline_category_dividers_extend}{Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_show_legend}{Legend mode. Choices: \code{TRUE}, \code{FALSE}. A legend will not show with a single entry. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_title_mode}{Title mode. Choices: auto, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_title}{Title. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_radius}{Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_legend_items_padding}{Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline}{Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_categorical_legend_swatch_outline_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_order_override}{Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_height}{Height. Height of icon ( in rems ). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_icon_color}{Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_categorical_legend_max_width}{Max width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_categorical_legend_orientation}{Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set timeline chart details +} +\examples{ +try( + flourish(chart_type = "timeline", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_timeline_data(gapminder) |> + set_timeline_details() +) +} diff --git a/R_package/man/set_tournament_details.Rd b/R_package/man/set_tournament_details.Rd new file mode 100644 index 0000000..a9ce61d --- /dev/null +++ b/R_package/man/set_tournament_details.Rd @@ -0,0 +1,650 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_tournament_details.R +\name{set_tournament_details} +\alias{set_tournament_details} +\title{Set tournament chart details} +\usage{ +set_tournament_details( + ., + min_round_width_mode = NULL, + min_round_width_fixed = NULL, + inner_padding_vertical = NULL, + inner_padding_horizontal = NULL, + link_width = NULL, + outer_padding = NULL, + winning_team_color = NULL, + losing_team_color = NULL, + upcoming_fill_color = NULL, + boxes_stroke_color = NULL, + boxes_stroke_width = NULL, + boxes_roundness = NULL, + winning_team_text_color = NULL, + losing_team_text_color = NULL, + font_size = NULL, + text_weight_mode = NULL, + link_thickness = NULL, + link_color = NULL, + link_radius = NULL, + image_size = NULL, + image_scale = NULL, + image_zoom = NULL, + image_shape = NULL, + headings_enabled = NULL, + headings_size = NULL, + headings_padding = NULL, + headings_color = NULL, + headings_weight = NULL, + headings_position = NULL, + navigation_icon_position = NULL, + navigation_icon_mode = NULL, + navigation_icon_upload = NULL, + navigation_icon_size = NULL, + navigation_icon_color = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + popup_header_separator = NULL, + animation_duration = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{min_round_width_mode}{Width mode. Choices: auto, fixed. Auto mode sets round width to the smallest it can be while still fitting text content. In Fixed mode you can choose a fixed minimum round width (text will be ellipsed if it does not fit). Flourish type hint: string, defaults to \code{NULL}} + +\item{min_round_width_fixed}{Min stage width. The minimum width given to a specific stage (e.g. Quarterfinals), specified in px. Flourish type hint: number, defaults to \code{NULL}} + +\item{inner_padding_vertical}{Box height. Flourish type hint: number, defaults to \code{NULL}} + +\item{inner_padding_horizontal}{Box padding. Horizontal space on sides of box. Flourish type hint: number, defaults to \code{NULL}} + +\item{link_width}{Horizontal space. Horizontal space between stages. Flourish type hint: number, defaults to \code{NULL}} + +\item{outer_padding}{Vertical space. Vertical space between stages. Flourish type hint: number, defaults to \code{NULL}} + +\item{winning_team_color}{Winning team. Flourish type hint: color, defaults to \code{NULL}} + +\item{losing_team_color}{Losing team. Flourish type hint: color, defaults to \code{NULL}} + +\item{upcoming_fill_color}{Upcoming match. Flourish type hint: color, defaults to \code{NULL}} + +\item{boxes_stroke_color}{Outline color. Flourish type hint: color, defaults to \code{NULL}} + +\item{boxes_stroke_width}{Outline width. Flourish type hint: number, defaults to \code{NULL}} + +\item{boxes_roundness}{Roundness. Flourish type hint: number, defaults to \code{NULL}} + +\item{winning_team_text_color}{Winning team. Flourish type hint: color, defaults to \code{NULL}} + +\item{losing_team_text_color}{Losing team. Flourish type hint: color, defaults to \code{NULL}} + +\item{font_size}{Size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{text_weight_mode}{Weight. Choices: winner_bold, regular, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{link_thickness}{Thickness. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{link_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{link_radius}{Roundness. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_size}{Size. Specified as a \% of the box for that match. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_scale}{Scale. Choices: contain, cover, zoom. Fill will not preserve the aspect ratio of images but stretch them to fill the area. Fit and Zoom both preserve the aspect ratio of images, but Fit ensures none of the image is cut off. Flourish type hint: string, defaults to \code{NULL}} + +\item{image_zoom}{Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to \code{NULL}} + +\item{image_shape}{Shape. Choices: circle, square. Flourish type hint: string, defaults to \code{NULL}} + +\item{headings_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{headings_size}{Size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{headings_padding}{Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{headings_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{headings_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{headings_position}{Position. Choices: middle, start. Flourish type hint: string, defaults to \code{NULL}} + +\item{navigation_icon_position}{Position. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{navigation_icon_mode}{Type. Choices: arrow, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{navigation_icon_upload}{Upload icon. Upload a right-facing icon (your icon will be rotated for the left side). Flourish type hint: url, defaults to \code{NULL}} + +\item{navigation_icon_size}{Size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to \code{NULL}} + +\item{navigation_icon_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{popup_header_separator}{Header separator. Flourish type hint: string, defaults to \code{NULL}} + +\item{animation_duration}{Duration. The duration, in seconds, of intro animation. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set tournament chart details +} +\examples{ +try( + flourish(chart_type = "tournament", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_tournament_data(gapminder) |> + set_tournament_details() +) +} diff --git a/R_package/man/set_word_cloud_details.Rd b/R_package/man/set_word_cloud_details.Rd new file mode 100644 index 0000000..251e7a0 --- /dev/null +++ b/R_package/man/set_word_cloud_details.Rd @@ -0,0 +1,731 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_word_cloud_details.R +\name{set_word_cloud_details} +\alias{set_word_cloud_details} +\title{Set word cloud chart details} +\usage{ +set_word_cloud_details( + ., + using_tables = NULL, + word_limit = NULL, + raw_text = NULL, + exclusions = NULL, + excluded_words = NULL, + strip_trailing_s = NULL, + convert_to_lowercase = NULL, + cloud_font = NULL, + text_color = NULL, + word_padding = NULL, + random_seed = NULL, + angle_min = NULL, + angle_max = NULL, + angle_number = NULL, + font_size_min = NULL, + font_size_max = NULL, + size_mode = NULL, + height_mode = NULL, + aspect_ratio = NULL, + aspect_ratio_mobile = NULL, + aspect_ratio_breakpoint = NULL, + chart_color_scale_categorical_palette = NULL, + chart_color_scale_categorical_extend = NULL, + chart_color_scale_categorical_custom_palette = NULL, + chart_color_scale_numeric_type = NULL, + chart_color_scale_binning = NULL, + chart_color_scale_bin_mode = NULL, + chart_color_scale_bin_count = NULL, + chart_color_scale_bin_thresholds = NULL, + chart_color_scale_sequential_palette = NULL, + chart_color_scale_sequential_reverse = NULL, + chart_color_scale_sequential_custom_min = NULL, + chart_color_scale_sequential_custom_max = NULL, + chart_color_scale_sequential_color_space = NULL, + chart_color_scale_sequential_custom_domain = NULL, + chart_color_scale_sequential_domain_min = NULL, + chart_color_scale_sequential_domain_max = NULL, + chart_color_scale_diverging_palette = NULL, + chart_color_scale_diverging_reverse = NULL, + chart_color_scale_diverging_custom_min = NULL, + chart_color_scale_diverging_custom_mid = NULL, + chart_color_scale_diverging_custom_max = NULL, + chart_color_scale_diverging_color_space = NULL, + chart_color_scale_diverging_custom_domain = NULL, + chart_color_scale_diverging_domain_min = NULL, + chart_color_scale_diverging_domain_mid = NULL, + chart_color_scale_diverging_domain_max = NULL, + animation_type = NULL, + duration = NULL, + stagger = NULL, + chart_number_date_format_prefix = NULL, + chart_number_date_format_suffix = NULL, + chart_number_date_format_n_dec = NULL, + chart_number_date_format_advanced = NULL, + chart_number_date_format_negative_sign = NULL, + chart_number_date_format_strip_zeros = NULL, + chart_number_date_format_strip_separator = NULL, + chart_number_date_format_transform_labels = NULL, + chart_number_date_format_transform = NULL, + chart_number_date_format_multiply_divide_constant = NULL, + chart_number_date_format_exponentiate_constant = NULL, + chart_number_localization_input_decimal_separator = NULL, + chart_number_localization_output_separators = NULL, + chart_popup_mode = NULL, + chart_popup_popup_is_custom = NULL, + chart_popup_show_popup_styles = NULL, + chart_popup_popup_custom_header = NULL, + chart_popup_popup_custom_main = NULL, + chart_popup_popup_custom_accessible = NULL, + chart_popup_popup_width = NULL, + chart_popup_popup_font_size = NULL, + chart_popup_popup_text_color = NULL, + chart_popup_popup_align = NULL, + chart_popup_popup_background = NULL, + chart_popup_popup_background_opacity = NULL, + chart_popup_popup_padding = NULL, + chart_popup_popup_radius = NULL, + chart_popup_popup_header_type = NULL, + chart_popup_popup_header_background = NULL, + chart_popup_popup_header_text_color = NULL, + chart_popup_popup_list_type = NULL, + chart_popup_popup_list_label_weight = NULL, + chart_popup_popup_list_separator = NULL, + chart_popup_popup_shadow = NULL, + chart_popup_popup_pointer = NULL, + chart_popup_panel_position = NULL, + chart_popup_panel_open_duration = NULL, + chart_popup_panel_side_fixed = NULL, + chart_popup_panel_side_default_content = NULL, + chart_popup_panel_is_custom = NULL, + chart_popup_show_panel_styles = NULL, + chart_popup_panel_custom_header = NULL, + chart_popup_panel_custom_main = NULL, + chart_popup_panel_width_overlay = NULL, + chart_popup_panel_height_overlay = NULL, + chart_popup_panel_width_side = NULL, + chart_popup_panel_height_side = NULL, + chart_popup_panel_max_width = NULL, + chart_popup_panel_max_height = NULL, + chart_popup_panel_vertical_position = NULL, + chart_popup_panel_text_color = NULL, + chart_popup_panel_font_size = NULL, + chart_popup_panel_align = NULL, + chart_popup_panel_background = NULL, + chart_popup_panel_background_opacity = NULL, + chart_popup_panel_padding = NULL, + chart_popup_panel_radius = NULL, + chart_popup_panel_list_type = NULL, + chart_popup_panel_list_label_weight = NULL, + chart_popup_panel_list_separator = NULL, + chart_popup_panel_shadow = NULL, + chart_layout_body_font = NULL, + chart_layout_font_color = NULL, + chart_layout_background_color_enabled = NULL, + chart_layout_background_image_enabled = NULL, + chart_layout_background_color = NULL, + chart_layout_background_image_src = NULL, + chart_layout_background_image_size = NULL, + chart_layout_background_image_position = NULL, + chart_layout_max_width_target = NULL, + chart_layout_max_width = NULL, + chart_layout_max_width_align = NULL, + chart_layout_layout_order = NULL, + chart_layout_space_between_sections = NULL, + chart_layout_space_between_sections_custom = NULL, + chart_layout_margin_top = NULL, + chart_layout_margin_right = NULL, + chart_layout_margin_bottom = NULL, + chart_layout_margin_left = NULL, + chart_layout_border_enabled = NULL, + chart_layout_border_top_width = NULL, + chart_layout_border_top_style = NULL, + chart_layout_border_top_color = NULL, + chart_layout_border_right_width = NULL, + chart_layout_border_right_style = NULL, + chart_layout_border_right_color = NULL, + chart_layout_border_bottom_width = NULL, + chart_layout_border_bottom_style = NULL, + chart_layout_border_bottom_color = NULL, + chart_layout_border_left_width = NULL, + chart_layout_border_left_style = NULL, + chart_layout_border_left_color = NULL, + chart_layout_read_direction = NULL, + chart_layout_font_size_mobile_small = NULL, + chart_layout_font_size_mobile_big = NULL, + chart_layout_font_size_tablet = NULL, + chart_layout_font_size_desktop = NULL, + chart_layout_font_size_big_screen = NULL, + chart_layout_breakpoint_mobile_small = NULL, + chart_layout_breakpoint_mobile_big = NULL, + chart_layout_breakpoint_tablet = NULL, + chart_layout_breakpoint_desktop = NULL, + chart_layout_breakpoint_big_screen = NULL, + chart_layout_header_align = NULL, + chart_layout_title = NULL, + chart_layout_title_styling = NULL, + chart_layout_title_font = NULL, + chart_layout_title_size = NULL, + chart_layout_title_size_custom = NULL, + chart_layout_title_weight = NULL, + chart_layout_title_color = NULL, + chart_layout_title_line_height = NULL, + chart_layout_title_space_above = NULL, + chart_layout_title_space_above_custom = NULL, + chart_layout_subtitle = NULL, + chart_layout_subtitle_styling = NULL, + chart_layout_subtitle_font = NULL, + chart_layout_subtitle_size = NULL, + chart_layout_subtitle_size_custom = NULL, + chart_layout_subtitle_weight = NULL, + chart_layout_subtitle_color = NULL, + chart_layout_subtitle_line_height = NULL, + chart_layout_subtitle_space_above = NULL, + chart_layout_subtitle_space_above_custom = NULL, + chart_layout_header_text = NULL, + chart_layout_header_text_styling = NULL, + chart_layout_header_text_size = NULL, + chart_layout_header_text_size_custom = NULL, + chart_layout_header_text_weight = NULL, + chart_layout_header_text_color = NULL, + chart_layout_header_text_line_height = NULL, + chart_layout_header_text_space_above = NULL, + chart_layout_header_text_space_above_custom = NULL, + chart_layout_header_border = NULL, + chart_layout_header_border_width = NULL, + chart_layout_header_border_color = NULL, + chart_layout_header_border_style = NULL, + chart_layout_header_border_space = NULL, + chart_layout_header_logo_enabled = NULL, + chart_layout_header_logo_src = NULL, + chart_layout_header_logo_alt = NULL, + chart_layout_header_logo_link_url = NULL, + chart_layout_header_logo_height = NULL, + chart_layout_header_logo_align = NULL, + chart_layout_header_logo_position_inside = NULL, + chart_layout_header_logo_position_outside = NULL, + chart_layout_header_logo_margin_top = NULL, + chart_layout_header_logo_margin_right = NULL, + chart_layout_header_logo_margin_bottom = NULL, + chart_layout_header_logo_margin_left = NULL, + chart_layout_footer_align = NULL, + chart_layout_footer_text_size = NULL, + chart_layout_footer_text_color = NULL, + chart_layout_footer_styling = NULL, + chart_layout_footer_font = NULL, + chart_layout_footer_text_weight = NULL, + chart_layout_source_name = NULL, + chart_layout_source_url = NULL, + chart_layout_multiple_sources = NULL, + chart_layout_source_name_2 = NULL, + chart_layout_source_url_2 = NULL, + chart_layout_source_name_3 = NULL, + chart_layout_source_url_3 = NULL, + chart_layout_source_label = NULL, + chart_layout_footer_note = NULL, + chart_layout_footer_note_secondary = NULL, + chart_layout_advanced_note_styling = NULL, + chart_layout_footer_timestamp_format = NULL, + chart_layout_footer_logo_enabled = NULL, + chart_layout_footer_logo_src = NULL, + chart_layout_footer_logo_src_light = NULL, + chart_layout_footer_logo_alt = NULL, + chart_layout_footer_logo_link_url = NULL, + chart_layout_footer_logo_height = NULL, + chart_layout_footer_logo_margin = NULL, + chart_layout_footer_logo_order = NULL, + chart_layout_footer_align_vertical = NULL, + chart_layout_footer_border = NULL, + chart_layout_footer_border_width = NULL, + chart_layout_footer_border_color = NULL, + chart_layout_footer_border_style = NULL, + chart_layout_footer_border_space = NULL, + chart_layout_screenreader_text_primary = NULL, + chart_layout_screenreader_label = NULL, + chart_layout_screenreader_hide_primary = NULL +) +} +\arguments{ +\item{.}{The prior Flourish object. No need to specify name if piping graph as the graph will take the first argument (i.e. the prior existing graph).} + +\item{using_tables}{Text input. Choices: \code{FALSE}, \code{TRUE}. Pasting in raw text is simplest but may be slow for large amounts of text. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{word_limit}{Word limit. Limits the number of words, in order of frequency. Leave blank to show all words in the data table. Flourish type hint: number, defaults to \code{NULL}} + +\item{raw_text}{Text. Note that the raw text will be available in the HTML of the generated page. This occurs when using both Paste in raw text and Datasheet options. Flourish type hint: text, defaults to \code{NULL}} + +\item{exclusions}{Exclude common words. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{excluded_words}{Exclude words. Flourish type hint: text, defaults to \code{NULL}} + +\item{strip_trailing_s}{Strip all trailing “s” from words. e.g. "mother" and "mothers" are considered one word. This includes both apostrophe and quotation mark forms (s and s). Flourish type hint: boolean, defaults to \code{NULL}} + +\item{convert_to_lowercase}{Convert all words to lowercase. e.g. "mother" and "Mother" are considered one word. This will also apply to the words in the Exclude words setting. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{cloud_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{word_padding}{Spacing. Spacing between the words (in arbitrary units). Flourish type hint: number, defaults to \code{NULL}} + +\item{random_seed}{Layout number. Change the number to try different word layouts. Flourish type hint: number, defaults to \code{NULL}} + +\item{angle_min}{Min angle. Flourish type hint: number, defaults to \code{NULL}} + +\item{angle_max}{Max angle. Flourish type hint: number, defaults to \code{NULL}} + +\item{angle_number}{Number of angles. Flourish type hint: number, defaults to \code{NULL}} + +\item{font_size_min}{Min size. In arbitrary units. Actual display size will depend in screen size and layout. Flourish type hint: number, defaults to \code{NULL}} + +\item{font_size_max}{Max size. In arbitrary units. Actual display size will depend in screen size and layout. Flourish type hint: number, defaults to \code{NULL}} + +\item{size_mode}{Scaling. Choices: linear, sqrt, log. This scale will determine the relationship in size between the biggest and the smallest word. Flourish type hint: string, defaults to \code{NULL}} + +\item{height_mode}{Height mode. Choices: fill_space, aspect. In Fill space mode, the graphic will fill the container (which by default will be the standard Flourish responsive chart size). In Aspect ratio mode, you set the aspect ratio of the plot, and the container will be updated to accommodate it. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to \code{NULL}} + +\item{aspect_ratio}{Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{aspect_ratio_mobile}{Aspect (mobile). Aspect ratio of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to \code{NULL}} + +\item{aspect_ratio_breakpoint}{Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_palette}{Palette. Flourish type hint: colors, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_extend}{Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_categorical_custom_palette}{Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_color_scale_numeric_type}{Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_binning}{Choices: \code{FALSE}, \code{TRUE}. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_bin_mode}{Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_bin_count}{Number of bins. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_bin_thresholds}{Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_sequential_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_palette}{Palette. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_reverse}{Reverse. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_min}{Minimum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_mid}{Midpoint color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_max}{Maximum color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_color_space}{Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_custom_domain}{Domain. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_min}{Min. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_mid}{Mid. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_color_scale_diverging_domain_max}{Max. Flourish type hint: number, defaults to \code{NULL}} + +\item{animation_type}{Animation style. Choices: auto, fade, grow, none. Controls the animation on load. Auto mode will use Grow if there are fewer than 100 words visible, Fade if there are fewer than 500, and None if there are 500 or more. Flourish type hint: string, defaults to \code{NULL}} + +\item{duration}{Duration. The time in seconds it takes for an individual word to move from the start position to end position. Flourish type hint: number, defaults to \code{NULL}} + +\item{stagger}{Stagger. The time in seconds between the first and last word animations starting. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_prefix}{Prefix. Text to place in front of number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_suffix}{Suffix. Text to place after number. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_n_dec}{Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_advanced}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_negative_sign}{Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_zeros}{Remove trailing zeros. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_strip_separator}{Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform_labels}{Multiply/divide values. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_number_date_format_transform}{Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_date_format_multiply_divide_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_date_format_exponentiate_constant}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_number_localization_input_decimal_separator}{Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_number_localization_output_separators}{Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_mode}{Choices: none, popup, panel, both. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_is_custom}{Popup content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_popup_styles}{Show popup styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_header}{Popup custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_main}{Popup custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_popup_custom_accessible}{Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use \code{{{column_name}}} to add values from your data, but do not use HTML. For example: \verb{\{\{Name\}\}, Population: \{\{Population\}\}, GDP: \{\{GDP\}\}}. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_popup_width}{Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_align}{Align. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_radius}{Radius. Corner radius of popup. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_popup_header_type}{Header style. Choices: block, inline. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_header_background}{Background. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_header_text_color}{Text. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_popup_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_popup_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_popup_pointer}{Pointer. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_position}{Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_open_duration}{Open duration. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_side_fixed}{Always show. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_side_default_content}{Placeholder content. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_popup_panel_is_custom}{Panel content. Choices: \code{FALSE}, \code{TRUE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_show_panel_styles}{Show panel styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_header}{Panel custom header. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_custom_main}{Panel custom main content. Use \code{{{column_name}}} to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using \verb{\{\{#if column_name\}\}Content for non-empty column_name\{\{/if\}\}}. For example: \verb{\{\{#if Capital name\}\}Capital:\{\{/if\}\} \{\{Capital name\}\}}. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_popup_panel_width_overlay}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_overlay}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_width_side}{Width (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_height_side}{Height (\%). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_width}{Max width (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_max_height}{Max height (px). Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_vertical_position}{Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_text_color}{Text color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_font_size}{Text size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_align}{Alignment. Choices: start, center, end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_background}{Fill color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_popup_panel_background_opacity}{Fill opacity. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_padding}{Padding. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_radius}{Radius. Corner radius of panel. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_popup_panel_list_type}{List type. Choices: table, ul. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_label_weight}{Label weight. Choices: normal, bold. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_list_separator}{List separator. Choices: :, , , \verb{
    }. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_popup_panel_shadow}{Shadow. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_body_font}{Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_font_color}{Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_color_enabled}{Color. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_image_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_background_color}{Background color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_background_image_src}{Image URL. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_background_image_size}{Size. Choices: cover, contain, auto, 100\% 100\%. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_background_image_position}{Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width_target}{Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_max_width}{Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_max_width_align}{Align. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_layout_order}{Layout order. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections}{Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_space_between_sections_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_enabled}{Show borders around visualisation. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_border_top_width}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_top_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_top_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_right_width}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_right_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_right_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_width}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_bottom_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_border_left_width}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_border_left_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_border_left_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_read_direction}{Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_font_size_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_small}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_mobile_big}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_tablet}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_desktop}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_breakpoint_big_screen}{Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_align}{Alignment. Choices: left, center, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_title_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_title_font}{Title Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_title_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_title_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_title_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_title_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_subtitle_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_subtitle_font}{Subtitle Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size}{Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_subtitle_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_subtitle_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text}{Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_header_text_styling}{Styling. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_text_size}{Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_size_custom}{Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_text_line_height}{Line height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above}{Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_text_space_above_custom}{Custom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_header_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_border_space}{Space. Space between border and header text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_enabled}{Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_header_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_header_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_align}{Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_inside}{Position. Choices: top, left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_position_outside}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_top}{Top. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_right}{Right. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_bottom}{Bottom. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_header_logo_margin_left}{Left. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_align}{Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_text_size}{Size. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_text_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_styling}{Advanced footer styles. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_font}{Font. Flourish type hint: font, defaults to \code{NULL}} + +\item{chart_layout_footer_text_weight}{Weight. Choices: bold, normal. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_multiple_sources}{Multiple sources. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_source_name_2}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_2}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_name_3}{Source name. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_url_3}{Source url. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_source_label}{Source label. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_note}{Note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_footer_note_secondary}{Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add \code{{{data_last_updated}}}. For example, "Last updated at \code{{{data_last_updated}}}". To customize the format, use the advanced options below. Flourish type hint: html, defaults to \code{NULL}} + +\item{chart_layout_advanced_note_styling}{Advanced. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_timestamp_format}{Time/date stamp formatting. Choices: \%H:\%M:\%S, \%I:\%M \%p, \%H:\%M, \%H:\%M \%p, \%H:\%M:\%S, \%d \%b \%Y, \%H:\%M, \%d \%b \%Y, \%H:\%M, \%d/\%m/\%Y, \%H:\%M, \%m/\%d/\%Y, \%H:\%M, \%d-\%m-\%Y, \%H:\%M, \%m-\%d-\%Y, \%d \%b \%Y, \%m/\%d/\%Y, \%d/\%m/\%Y, \%m-\%d-\%Y, \%d-\%m-\%Y, \%Y-\%m-\%d, \%Y-\%m-\%d \%H:\%M:\%S. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_enabled}{Image. Choices: \code{TRUE}, \code{FALSE}. Flourish type hint: boolean, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src}{Image. Flourish type hint: url, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_src_light}{Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_alt}{Alt text. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_link_url}{Link. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_height}{Height. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_margin}{Margin. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_logo_order}{Position. Choices: left, right. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_align_vertical}{V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border}{Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_width}{Width. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_footer_border_color}{Color. Flourish type hint: color, defaults to \code{NULL}} + +\item{chart_layout_footer_border_style}{Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_footer_border_space}{Space. Space between border and footer text. Flourish type hint: number, defaults to \code{NULL}} + +\item{chart_layout_screenreader_text_primary}{Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to \code{NULL}} + +\item{chart_layout_screenreader_label}{Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to \code{NULL}} + +\item{chart_layout_screenreader_hide_primary}{Screenreader mode for main visual container. Choices: \code{TRUE}, \code{FALSE}. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to \code{NULL}} +} +\value{ +A Flourish chart +} +\description{ +Set word cloud chart details +} +\examples{ +try( + flourish(chart_type = "word_cloud", api_key = Sys.getenv("FLOURISH_API_KEY")) |> + bind_word_cloud_data(gapminder) |> + set_word_cloud_details() +) +} diff --git a/R_package/tests/testthat.R b/R_package/tests/testthat.R new file mode 100644 index 0000000..dbd1e84 --- /dev/null +++ b/R_package/tests/testthat.R @@ -0,0 +1,12 @@ +# This file is part of the standard setup for testthat. +# It is recommended that you do not modify it. +# +# Where should you do additional test configuration? +# Learn more about the roles of various files in: +# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview +# * https://testthat.r-lib.org/articles/special-files.html + +library(testthat) +library(flourishcharts) + +test_check("flourishcharts") diff --git a/R_package/tests/testthat/test-name.R b/R_package/tests/testthat/test-name.R new file mode 100644 index 0000000..d6861e9 --- /dev/null +++ b/R_package/tests/testthat/test-name.R @@ -0,0 +1,11 @@ +test_that("bindings error works", { + flourish_correct_bindings <- flourish("scatter") |> bind_scatter_data(gapminder, x = "lifeExp", y = "gdpPercap") + expect_no_error(flourish_correct_bindings) +}) + +test_that("settings error works", { + flourish_correct_settings <- flourish("scatter") |> + bind_scatter_data(gapminder, x = "lifeExp", y = "gdpPercap") |> + set_scatter_details(default_color = "#000000") + expect_no_error(flourish_correct_settings) +}) diff --git a/R_package/vignettes/.gitignore b/R_package/vignettes/.gitignore new file mode 100644 index 0000000..097b241 --- /dev/null +++ b/R_package/vignettes/.gitignore @@ -0,0 +1,2 @@ +*.html +*.R diff --git a/R_package/vignettes/api_keys.Rmd b/R_package/vignettes/api_keys.Rmd new file mode 100644 index 0000000..ad95933 --- /dev/null +++ b/R_package/vignettes/api_keys.Rmd @@ -0,0 +1,27 @@ +--- +title: "Setting up API keys" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Setting up API keys} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + + +Setting up Flourish Charts requires setting up a Flourish API key. + +R users can store their Flourish API key in one of two places: + +* Inside the `flourish()` function which has a parameter called `api_key`. Pass a string to this argument. +* In your `~/.Renviron` file where you can store sensitive bits of information or, alternatively, information you want available every time you run R code. This is safer as the API key cannot be accessed if you decide to share the R file containing Flourish Charts code. +If you choose the latter, please store your key in the file as follows: + +``` +FLOURISH_API_KEY="..." +``` + +The `flourish()` function will recognize this variable, grabbing the API key without the end-user needing to specify every single time. + +If you do not have an `~/.Renviron` file, create one from your terminal by running `touch ~/.Renviron && open ~/.Renviron`. + +Restart R after saving the variable for it to take effect. \ No newline at end of file diff --git a/R_package/vignettes/flourish.Rmd b/R_package/vignettes/flourish.Rmd new file mode 100644 index 0000000..bf97f7c --- /dev/null +++ b/R_package/vignettes/flourish.Rmd @@ -0,0 +1,128 @@ +--- +title: "Creating Flourish graphs in R" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Creating Flourish graphs in R} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + + +```{r setup, message=F} +library(dplyr) +library(tidyr) +library(flourishcharts) +``` + + +Flourish primarily depends on two main functions in R/Python. They are `flourish` and a `bind_..._data()` function. The `...` depends on the chart type. An R user can specify their preferred chart type and bind data columns to the graph. In R, A list of Flourish functions can be found by running `flourishcharts::`, typing `?flourishcharts` in your console, or heading over to the references page in this site. + +The following chunks show some example charts using Gapminder data, with my accompanying notes. + +The `flourishcharts` package provides the data `flourish_api_documentation` frame with metadata about each graph (template ID, version, a simplified chart name for end users, and a URL to Flourish's API documentation). + + +### R + +```{r} +head(flourish_api_documentation) +``` + + +`flourishcharts` works by requiring two functions to plot Flourish graphs: + + * `flourish()` in R or `Flourish()` in Python: + * `chart_type` **(mandatory arg)** -- a string that must match a value in `flourish_api_documentation["chart_type"]`. + * `api_key` **(mandatory arg)** -- Flourish API key, defaults to `Sys.getenv("FLOURISH_API_KEY")` or `os.environ.get("FLOURISH_API_KEY")`. + * `chart_description` **(optional arg)** -- a string with the chart description for screen readers. + +And secondly, a binding data function which performs the same function as in flourish.studio, whereby the user matches data columns to the graph properties. + +To start with, a scatter plot is laid out as follows. If a user wants to add additional details they can by running `set_..._details()`--in this case, `set_scatter_details()`. + +Each function argument pipes into the other and takes on the additional arguments to the graph. The pipe can be the base pipe `|>` or the maggrittr pipe `%>%`. In Python, users can append new functions to the assigned graph. + +## Scatterplot + +```{r scatter, eval = F} +scatterplot <- flourish( + chart_type = "scatter" +) |> + bind_scatter_data( + data = gapminder, + x = "gdpPercap", + y = "lifeExp", + slider = "year", + size = "pop", + color = "continent", + metadata = c("country", "year") + ) +scatterplot +``` + + +## Line graph + +### R + +```{r, eval = F} +line_data <- gapminder |> + filter(country %in% c( + "Australia", + "New Zealand", + "United States", + "Rwanda", + "Sierra Leone", + "Indonesia", + "Brazil" + )) |> + select("country", "year", "lifeExp") |> + pivot_wider(id_cols = "year", names_from = "country", values_from = "lifeExp") + +line_chart <- flourish( + chart_type = "line" +) |> + bind_line_bar_pie_data( + data = line_data, + label = "year", + value = colnames(line_data[, c(2:8)]) + ) |> + set_line_bar_pie_details( + chart_layout_title = "Life expectancy from the 1950s to 2007", + chart_layout_subtitle = "Selected countries include Australia, New Zealand, the US, Rwanda, Indonesia, Sierra Leone, and Brazil." + ) +line_chart +``` + + +## Bar chart race + + +```{r, eval = F} +bcr_data <- gapminder |> + filter(country %in% c( + "Australia", + "New Zealand", + "United States", + "Rwanda", + "Sierra Leone", + "Indonesia", + "Brazil" + )) |> + select(c("country", "continent", "year", "lifeExp")) |> + pivot_wider(id_cols = c("country", "continent"), names_from = "year", values_from = "lifeExp") + +bcr <- flourish("bar_race") |> + bind_bar_chart_race_data( + data = bcr_data, + label = "country", + values = colnames(bcr_data[, c(3:14)]), + category = "continent" + ) |> + set_bar_chart_race_details( + chart_layout_title = "Life expectancy from the 1950s to 2007", + chart_layout_subtitle = "Selected countries include Australia, New Zealand, the US, Rwanda, Indonesia, Sierra Leone, and Brazil." + ) +bcr +``` + diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..8eea877 --- /dev/null +++ b/changelog.md @@ -0,0 +1,290 @@ +## 2024-08-23: R pkg v1.0.0.0, Python pkg v1.0.0.0 + +The package has been renamed to `flourishcharts` and package versions reset to v1.0.0.0. + +## 2024-08-22: R pkg v1.9.17.13, Python pkg v1.9.13.15 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 16.1.1 | 16.1.2 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 3.1.1 | 3.1.2 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/cards | 11.1.1 | 11.1.2 | update | `[bind/set]_cards_[data/details]` | +| @flourish/draw-the-line | 7.1.1 | 7.1.2 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 9.2.1 | 9.2.2 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 9.1.1 | 9.1.2 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/hierarchy | 20.1.3 | 20.1.4 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/line-bar-pie | 32.2.3 | 32.3.2 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 3.1.2 | 3.1.4 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 12.1.1 | 12.1.2 | update | `[bind/set]_network_[data/details]` | +| @flourish/parliament-chart | 8.2.0 | 8.2.1 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/pictogram | 6.1.1 | 6.1.2 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/radar | 4.1.1 | 4.1.2 | update | `[bind/set]_radar_[data/details]` | +| @flourish/scatter | 22.2.1 | 22.2.3 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 13.2.0 | 13.2.1 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 9.1.1 | 9.1.2 | update | `[bind/set]_sports_[data/details]` | +| @flourish/survey | 14.1.1 | 14.1.3 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 17.1.2 | 17.2.1 | update | `[bind/set]_table_[data/details]` | +| @flourish/timeline | 2.1.1 | 2.1.2 | update | `[bind/set]_timeline_[data/details]` | + +## 2024-08-05: R pkg v1.9.16.12, Python pkg v1.9.12.14 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:----------------------|:--------------|:--------------|:---------|:--------------------------------------| +| @flourish/hierarchy | 20.1.2 | 20.1.3 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/marimekko | 3.1.1 | 3.1.2 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/sankey | 10.10.1 | 10.10.2 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/slope-chart | 13.1.2 | 13.2.0 | update | `[bind/set]_slope_[data/details]` | + +## 2024-07-23: R pkg v1.9.15.11, Python pkg v1.9.11.13 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 16.1.0 | 16.1.1 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 3.1.0 | 3.1.1 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/calculator | 1.7.0 | 1.7.1 | update | `[bind/set]_calculator_[data/details]` | +| @flourish/cards | 11.1.0 | 11.1.1 | update | `[bind/set]_cards_[data/details]` | +| @flourish/chord-diagram | 8.6.0 | 8.6.1 | update | `[bind/set]_chord_diagram_[data/details]` | +| @flourish/countdown | 2.7.0 | 2.7.1 | update | `[bind/set]_countdown_[data/details]` | +| @flourish/draw-the-line | 7.1.0 | 7.1.1 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 9.2.0 | 9.2.1 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 9.1.0 | 9.1.1 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/gauge | 1.8.0 | 1.8.1 | update | `[bind/set]_gauge_[data/details]` | +| @flourish/hierarchy | 20.1.0 | 20.1.2 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/horserace | 16.2.0 | 16.2.1 | update | `[bind/set]_horserace_[data/details]` | +| @flourish/interactive-svg | 8.3.0 | 8.3.1 | update | `[bind/set]_interactive_svg_[data/details]` | +| @flourish/line-bar-pie | 32.1.0 | 32.2.3 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 3.1.0 | 3.1.1 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 12.1.0 | 12.1.1 | update | `[bind/set]_network_[data/details]` | +| @flourish/number-ticker | 1.7.0 | 1.7.1 | update | `[bind/set]_number_ticker_[data/details]` | +| @flourish/photo-slider | 4.7.0 | 4.7.1 | update | `[bind/set]_photo_slider_[data/details]` | +| @flourish/pictogram | 6.1.0 | 6.1.1 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/quiz | 7.7.0 | 7.7.1 | update | `[bind/set]_quiz_[data/details]` | +| @flourish/radar | 4.1.0 | 4.1.1 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.10.0 | 10.10.1 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 22.2.0 | 22.2.1 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 13.1.0 | 13.1.2 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 9.1.0 | 9.1.1 | update | `[bind/set]_sports_[data/details]` | +| @flourish/sports-race | 2.6.0 | 2.6.1 | update | `[bind/set]_sports_race_[data/details]` | +| @flourish/survey | 14.1.0 | 14.1.1 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 17.1.0 | 17.1.2 | update | `[bind/set]_table_[data/details]` | +| @flourish/text-annotator | 3.9.0 | 3.9.1 | update | `[bind/set]_text_annotator_[data/details]` | +| @flourish/timeline | 2.1.0 | 2.1.1 | update | `[bind/set]_timeline_[data/details]` | +| @flourish/tournament | 1.7.0 | 1.7.1 | update | `[bind/set]_tournament_[data/details]` | +| @flourish/word-cloud | 3.10.0 | 3.10.1 | update | `[bind/set]_word_cloud_[data/details]` | + +## 2024-07-05: R pkg v1.9.14.10, Python pkg v1.9.10.12 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/audio | 1.5.0 | 1.6.0 | update | `[bind/set]_audio_[data/details]` | +| @flourish/bar-chart-race | 16.0.0 | 16.1.0 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 3.0.0 | 3.1.0 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/calculator | 1.6.0 | 1.7.0 | update | `[bind/set]_calculator_[data/details]` | +| @flourish/cards | 11.0.0 | 11.1.0 | update | `[bind/set]_cards_[data/details]` | +| @flourish/chord-diagram | 8.5.0 | 8.6.0 | update | `[bind/set]_chord_diagram_[data/details]` | +| @flourish/countdown | 2.6.0 | 2.7.0 | update | `[bind/set]_countdown_[data/details]` | +| @flourish/draw-the-line | 7.0.0 | 7.1.0 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 9.0.0 | 9.2.0 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 9.0.0 | 9.1.0 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/gauge | 1.7.0 | 1.8.0 | update | `[bind/set]_gauge_[data/details]` | +| @flourish/hierarchy | 20.0.0 | 20.1.0 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/horserace | 16.1.0 | 16.2.0 | update | `[bind/set]_horserace_[data/details]` | +| @flourish/interactive-svg | 8.2.2 | 8.3.0 | update | `[bind/set]_interactive_svg_[data/details]` | +| @flourish/line-bar-pie | 32.0.0 | 32.1.0 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 3.0.0 | 3.1.0 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 12.0.0 | 12.1.0 | update | `[bind/set]_network_[data/details]` | +| @flourish/number-ticker | 1.6.0 | 1.7.0 | update | `[bind/set]_number_ticker_[data/details]` | +| @flourish/parliament-chart | 8.0.0 | 8.2.0 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/photo-slider | 4.6.0 | 4.7.0 | update | `[bind/set]_photo_slider_[data/details]` | +| @flourish/pictogram | 6.0.0 | 6.1.0 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/quiz | 7.6.0 | 7.7.0 | update | `[bind/set]_quiz_[data/details]` | +| @flourish/radar | 4.0.0 | 4.1.0 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.9.1 | 10.10.0 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 22.0.0 | 22.2.0 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 13.0.0 | 13.1.0 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 9.0.0 | 9.1.0 | update | `[bind/set]_sports_[data/details]` | +| @flourish/sports-race | 2.5.0 | 2.6.0 | update | `[bind/set]_sports_race_[data/details]` | +| @flourish/survey | 14.0.0 | 14.1.0 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 17.0.0 | 17.1.0 | update | `[bind/set]_table_[data/details]` | +| @flourish/text-annotator | 3.8.0 | 3.9.0 | update | `[bind/set]_text_annotator_[data/details]` | +| @flourish/timeline | 2.0.0 | 2.1.0 | update | `[bind/set]_timeline_[data/details]` | +| @flourish/tournament | 1.6.1 | 1.7.0 | update | `[bind/set]_tournament_[data/details]` | +| @flourish/word-cloud | 3.9.1 | 3.10.0 | update | `[bind/set]_word_cloud_[data/details]` | + +## 2024-06-23: R pkg v1.9.13.10, Python pkg v1.9.9.12 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:--------------------------|:--------------|:--------------|:---------|:--------------------------------------------| +| @flourish/audio | | 1.5.0 | add | `[bind/set]_audio_[data/details]` | +| @flourish/calculator | | 1.6.0 | add | `[bind/set]_calculator_[data/details]` | +| @flourish/countdown | | 2.6.0 | add | `[bind/set]_countdown_[data/details]` | +| @flourish/interactive-svg | | 8.2.2 | add | `[bind/set]_interactive_svg_[data/details]` | +| @flourish/number-ticker | | 1.6.0 | add | `[bind/set]_number_ticker_[data/details]` | +| @flourish/photo-slider | | 4.6.0 | add | `[bind/set]_photo_slider_[data/details]` | +| @flourish/svg-annotator | | 6.0.2 | add | `[bind/set]_svg_annotator_[data/details]` | +| @flourish/text-annotator | | 3.8.0 | add | `[bind/set]_text_annotator_[data/details]` | + +## 2024-06-21: R pkg v1.8.13.10, Python pkg v1.8.9.12 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 15.11.1 | 16.0.0 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 2.3.1 | 3.0.0 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/cards | 10.10.1 | 11.0.0 | update | `[bind/set]_cards_[data/details]` | +| @flourish/draw-the-line | 6.5.1 | 7.0.0 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 8.11.1 | 9.0.0 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 8.11.1 | 9.0.0 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/hierarchy | 19.11.1 | 20.0.0 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/line-bar-pie | 31.1.1 | 32.0.0 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 2.6.1 | 3.0.0 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 11.10.1 | 12.0.0 | update | `[bind/set]_network_[data/details]` | +| @flourish/parliament-chart | 7.9.3 | 8.0.0 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/pictogram | 5.6.1 | 6.0.0 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/radar | 3.10.2 | 4.0.0 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.9.0 | 10.9.1 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 21.0.0 | 22.0.0 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 12.12.1 | 13.0.0 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 8.1.1 | 9.0.0 | update | `[bind/set]_sports_[data/details]` | +| @flourish/survey | 13.3.2 | 14.0.0 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 16.7.1 | 17.0.0 | update | `[bind/set]_table_[data/details]` | +| @flourish/timeline | 1.11.1 | 2.0.0 | update | `[bind/set]_timeline_[data/details]` | +| @flourish/tournament | 1.6.0 | 1.6.1 | update | `[bind/set]_tournament_[data/details]` | +| @flourish/word-cloud | 3.9.0 | 3.9.1 | update | `[bind/set]_word_cloud_[data/details]` | + +## 2024-06-05: R pkg v1.7.13.9, Python pkg v1.7.9.11 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------|:--------------|:--------------|:---------|:-----------------------------------------| +| @flourish/line-bar-pie | 31.0.0 | 31.1.1 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/parliament-chart | 7.9.1 | 7.9.3 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/scatter | 20.8.1 | 21.0.0 | update | `[bind/set]_scatter_[data/details]` | + +## 2024-05-23: R pkg v1.6.12.7, Python pkg v1.6.8.9 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 15.10.0 | 15.11.1 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 2.3.0 | 2.3.1 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/cards | 10.9.0 | 10.10.1 | update | `[bind/set]_cards_[data/details]` | +| @flourish/draw-the-line | 6.5.0 | 6.5.1 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 8.10.0 | 8.11.1 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 8.10.0 | 8.11.1 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/hierarchy | 19.10.0 | 19.11.1 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/line-bar-pie | 30.5.0 | 31.0.0 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 2.6.0 | 2.6.1 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 11.10.0 | 11.10.1 | update | `[bind/set]_network_[data/details]` | +| @flourish/parliament-chart | 7.8.0 | 7.9.1 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/pictogram | 5.6.0 | 5.6.1 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/radar | 3.10.0 | 3.10.2 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.8.0 | 10.9.0 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 20.7.0 | 20.8.1 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 12.11.0 | 12.12.1 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 8.0.0 | 8.1.1 | update | `[bind/set]_sports_[data/details]` | +| @flourish/survey | 13.3.1 | 13.3.2 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 16.7.0 | 16.7.1 | update | `[bind/set]_table_[data/details]` | +| @flourish/timeline | 1.11.0 | 1.11.1 | update | `[bind/set]_timeline_[data/details]` | + +## 2024-05-16: R pkg v1.5.11.6, Python pkg v1.5.7.8 + +Increased support for ensuring data types (metadata) work within `canviz`, as well as allowing for conversion of integers before passing integer variables to the JavaScript API (JavaScript does not natively support integers, but R and Python do). + +## 2024-05-09: R pkg v1.5.11.5, Python pkg v1.5.7.6 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:-----------------------|:--------------|:--------------|:---------|:-----------------------------------------| +| @flourish/line-bar-pie | 30.4.0 | 30.5.0 | update | `[bind/set]_line_bar_pie_[data/details]` | + +## 2024-05-07: R pkg v1.5.10.5, Python pkg v1.5.6.6 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 15.9.0 | 15.10.0 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 2.2.0 | 2.3.0 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/cards | 10.8.0 | 10.9.0 | update | `[bind/set]_cards_[data/details]` | +| @flourish/chord-diagram | 8.4.5 | 8.5.0 | update | `[bind/set]_chord_diagram_[data/details]` | +| @flourish/draw-the-line | 6.4.0 | 6.5.0 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 8.9.0 | 8.10.0 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 8.9.0 | 8.10.0 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/gauge | 1.6.4 | 1.7.0 | update | `[bind/set]_gauge_[data/details]` | +| @flourish/hierarchy | 19.9.0 | 19.10.0 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/horserace | 16.0.2 | 16.1.0 | update | `[bind/set]_horserace_[data/details]` | +| @flourish/line-bar-pie | 30.2.2 | 30.4.0 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 2.5.0 | 2.6.0 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 11.9.1 | 11.10.0 | update | `[bind/set]_network_[data/details]` | +| @flourish/parliament-chart | 7.7.1 | 7.8.0 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/pictogram | 5.5.0 | 5.6.0 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/quiz | 7.5.5 | 7.6.0 | update | `[bind/set]_quiz_[data/details]` | +| @flourish/radar | 3.9.0 | 3.10.0 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.7.9 | 10.8.0 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 20.6.0 | 20.7.0 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 12.10.0 | 12.11.0 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 7.2.0 | 8.0.0 | update | `[bind/set]_sports_[data/details]` | +| @flourish/sports-race | 2.4.2 | 2.5.0 | update | `[bind/set]_sports_race_[data/details]` | +| @flourish/survey | 13.2.1 | 13.3.1 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 16.6.0 | 16.7.0 | update | `[bind/set]_table_[data/details]` | +| @flourish/timeline | 1.10.0 | 1.11.0 | update | `[bind/set]_timeline_[data/details]` | +| @flourish/tournament | 1.5.9 | 1.6.0 | update | `[bind/set]_tournament_[data/details]` | +| @flourish/word-cloud | 3.8.7 | 3.9.0 | update | `[bind/set]_word_cloud_[data/details]` | + +## 2024-04-26: R pkg v1.4.9.5, Python pkg v1.4.5.6 + +The `chart.ChartLayoutMixin` subclass has been deprecated and removed from the Python package. The `chart_...()` functions have been removed from the R package. All parameters in these functions can now be found in the respective `set_..._details()` function for each template. + +## 2024-04-26: R pkg v1.2.8.5, Python pkg v1.2.4.6 + +The Flourish Live API was updated to v5.1.0. + +## 2024-04-23: R pkg v0.2.8.5, Python pkg v0.2.4.6 + +The following templates have been added or updated: + +| template_id | old_version | new_version | action | package_function | +|:---------------------------------|:--------------|:--------------|:---------|:---------------------------------------------| +| @flourish/bar-chart-race | 15.4.2 | 15.9.0 | update | `[bind/set]_bar_race_[data/details]` | +| @flourish/bubble-chart | 1.6.1 | 2.2.0 | update | `[bind/set]_bubble_[data/details]` | +| @flourish/cards | 10.4.1 | 10.8.0 | update | `[bind/set]_cards_[data/details]` | +| @flourish/chord-diagram | 8.3.2 | 8.4.5 | update | `[bind/set]_chord_diagram_[data/details]` | +| @flourish/draw-the-line | 6.1.1 | 6.4.0 | update | `[bind/set]_draw_the_line_[data/details]` | +| @flourish/election-results-chart | 8.5.1 | 8.9.0 | update | `[bind/set]_election_results_[data/details]` | +| @flourish/gantt | 8.5.1 | 8.9.0 | update | `[bind/set]_gantt_[data/details]` | +| @flourish/gauge | 1.4.1 | 1.6.4 | update | `[bind/set]_gauge_[data/details]` | +| @flourish/hierarchy | 19.3.1 | 19.9.0 | update | `[bind/set]_hierarchy_[data/details]` | +| @flourish/horserace | 15.2.0 | 16.0.2 | update | `[bind/set]_horserace_[data/details]` | +| @flourish/line-bar-pie | 27.6.7 | 30.2.2 | update | `[bind/set]_line_bar_pie_[data/details]` | +| @flourish/marimekko | 2.1.2 | 2.5.0 | update | `[bind/set]_marimekko_[data/details]` | +| @flourish/network-graph | 11.5.2 | 11.9.1 | update | `[bind/set]_network_[data/details]` | +| @flourish/parliament-chart | 7.4.1 | 7.7.1 | update | `[bind/set]_parliament_[data/details]` | +| @flourish/pictogram | 5.1.1 | 5.5.0 | update | `[bind/set]_pictogram_[data/details]` | +| @flourish/quiz | 7.4.1 | 7.5.5 | update | `[bind/set]_quiz_[data/details]` | +| @flourish/radar | 3.4.1 | 3.9.0 | update | `[bind/set]_radar_[data/details]` | +| @flourish/sankey | 10.3.2 | 10.7.9 | update | `[bind/set]_sankey_[data/details]` | +| @flourish/scatter | 20.2.2 | 20.6.0 | update | `[bind/set]_scatter_[data/details]` | +| @flourish/slope-chart | 12.6.1 | 12.10.0 | update | `[bind/set]_slope_[data/details]` | +| @flourish/sports | 6.3.1 | 7.2.0 | update | `[bind/set]_sports_[data/details]` | +| @flourish/sports-race | 2.2.1 | 2.4.2 | update | `[bind/set]_sports_race_[data/details]` | +| @flourish/survey | 12.6.1 | 13.2.1 | update | `[bind/set]_survey_[data/details]` | +| @flourish/table | 16.3.2 | 16.6.0 | update | `[bind/set]_table_[data/details]` | +| @flourish/timeline | 1.7.1 | 1.10.0 | update | `[bind/set]_timeline_[data/details]` | +| @flourish/tournament | 1.3.1 | 1.5.9 | update | `[bind/set]_tournament_[data/details]` | +| @flourish/word-cloud | 3.5.1 | 3.8.7 | update | `[bind/set]_word_cloud_[data/details]` | + diff --git a/python_package/LICENSE.txt b/python_package/LICENSE.txt new file mode 100644 index 0000000..15e64a7 --- /dev/null +++ b/python_package/LICENSE.txt @@ -0,0 +1,27 @@ +Copyright (c) 2022 Zoe Meers +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/python_package/MANIFEST.in b/python_package/MANIFEST.in new file mode 100644 index 0000000..853aa52 --- /dev/null +++ b/python_package/MANIFEST.in @@ -0,0 +1,37 @@ +include LICENSE.txt +include README.md + +include setup.py +include pyproject.toml +include pytest.ini +include .coverage.rc + +include tsconfig.json +include package.json + +# Documentation +graft docs +exclude docs/\#* +prune docs/build +prune docs/gh-pages +prune docs/dist + +# Examples +graft examples + +# Tests +graft tests +prune tests/build + +# Javascript files +graft js +prune **/node_modules +prune coverage +prune lib + +# Patterns to exclude from any directory +global-exclude *~ +global-exclude *.pyc +global-exclude *.pyo +global-exclude .git +global-exclude .ipynb_checkpoints diff --git a/python_package/Pipfile b/python_package/Pipfile new file mode 100644 index 0000000..220b5e3 --- /dev/null +++ b/python_package/Pipfile @@ -0,0 +1,22 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +anywidget = "*" +pandas = "*" +jupyterlab = "*" +flourishcharts = {subdirectory = "python_package", ref = "main", git = "https://github.com/canva-public/flourishcharts"} + +[dev-packages] +black = "*" +isort = "*" +watchfiles = "*" +setuptools = "*" +pydoc-markdown = "*" +pyyaml = "*" +jinja2 = "*" +loguru = "*" +pathlib = "*" +numpy = "*" diff --git a/python_package/Pipfile.lock b/python_package/Pipfile.lock new file mode 100644 index 0000000..7d99073 --- /dev/null +++ b/python_package/Pipfile.lock @@ -0,0 +1,2237 @@ +{ + "_meta": { + "hash": { + "sha256": "c3328707e17242939e20ed899e77bfa6ee62f939777b08b8e3ecfb27d6699aaa" + }, + "pipfile-spec": 6, + "requires": {}, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "anyio": { + "hashes": [ + "sha256:5aadc6a1bbb7cdb0bede386cac5e2940f5e2ff3aa20277e991cf028e0585ce94", + "sha256:c1b2d8f46a8a812513012e1107cb0e68c17159a7a594208005a57dc776e1bdc7" + ], + "markers": "python_version >= '3.8'", + "version": "==4.4.0" + }, + "anywidget": { + "hashes": [ + "sha256:43d1658f1043b8c95cd350b2f5deccb123fd37810a36f656d6163aefe8163705", + "sha256:c655455bf51f82182eb23c5947d37cc41f0b1ffacaf7e2b763147a2332cb3f07" + ], + "index": "pypi", + "markers": "python_version >= '3.7'", + "version": "==0.9.13" + }, + "appnope": { + "hashes": [ + "sha256:1de3860566df9caf38f01f86f65e0e13e379af54f9e4bee1e66b48f2efffd1ee", + "sha256:502575ee11cd7a28c0205f379b525beefebab9d161b7c964670864014ed7213c" + ], + "markers": "platform_system == 'Darwin'", + "version": "==0.1.4" + }, + "argon2-cffi": { + "hashes": [ + "sha256:879c3e79a2729ce768ebb7d36d4609e3a78a4ca2ec3a9f12286ca057e3d0db08", + "sha256:c670642b78ba29641818ab2e68bd4e6a78ba53b7eff7b4c3815ae16abf91c7ea" + ], + "markers": "python_version >= '3.7'", + "version": "==23.1.0" + }, + "argon2-cffi-bindings": { + "hashes": [ + "sha256:20ef543a89dee4db46a1a6e206cd015360e5a75822f76df533845c3cbaf72670", + "sha256:2c3e3cc67fdb7d82c4718f19b4e7a87123caf8a93fde7e23cf66ac0337d3cb3f", + "sha256:3b9ef65804859d335dc6b31582cad2c5166f0c3e7975f324d9ffaa34ee7e6583", + "sha256:3e385d1c39c520c08b53d63300c3ecc28622f076f4c2b0e6d7e796e9f6502194", + "sha256:58ed19212051f49a523abb1dbe954337dc82d947fb6e5a0da60f7c8471a8476c", + "sha256:5e00316dabdaea0b2dd82d141cc66889ced0cdcbfa599e8b471cf22c620c329a", + "sha256:603ca0aba86b1349b147cab91ae970c63118a0f30444d4bc80355937c950c082", + "sha256:6a22ad9800121b71099d0fb0a65323810a15f2e292f2ba450810a7316e128ee5", + "sha256:8cd69c07dd875537a824deec19f978e0f2078fdda07fd5c42ac29668dda5f40f", + "sha256:93f9bf70084f97245ba10ee36575f0c3f1e7d7724d67d8e5b08e61787c320ed7", + "sha256:9524464572e12979364b7d600abf96181d3541da11e23ddf565a32e70bd4dc0d", + "sha256:b2ef1c30440dbbcba7a5dc3e319408b59676e2e039e2ae11a8775ecf482b192f", + "sha256:b746dba803a79238e925d9046a63aa26bf86ab2a2fe74ce6b009a1c3f5c8f2ae", + "sha256:bb89ceffa6c791807d1305ceb77dbfacc5aa499891d2c55661c6459651fc39e3", + "sha256:bd46088725ef7f58b5a1ef7ca06647ebaf0eb4baff7d1d0d177c6cc8744abd86", + "sha256:ccb949252cb2ab3a08c02024acb77cfb179492d5701c7cbdbfd776124d4d2367", + "sha256:d4966ef5848d820776f5f562a7d45fdd70c2f330c961d0d745b784034bd9f48d", + "sha256:e415e3f62c8d124ee16018e491a009937f8cf7ebf5eb430ffc5de21b900dad93", + "sha256:ed2937d286e2ad0cc79a7087d3c272832865f779430e0cc2b4f3718d3159b0cb", + "sha256:f1152ac548bd5b8bcecfb0b0371f082037e47128653df2e8ba6e914d384f3c3e", + "sha256:f9f8b450ed0547e3d473fdc8612083fd08dd2120d6ac8f73828df9b7d45bb351" + ], + "markers": "python_version >= '3.6'", + "version": "==21.2.0" + }, + "arrow": { + "hashes": [ + "sha256:c728b120ebc00eb84e01882a6f5e7927a53960aa990ce7dd2b10f39005a67f80", + "sha256:d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" + ], + "markers": "python_version >= '3.8'", + "version": "==1.3.0" + }, + "asttokens": { + "hashes": [ + "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24", + "sha256:b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0" + ], + "version": "==2.4.1" + }, + "async-lru": { + "hashes": [ + "sha256:b8a59a5df60805ff63220b2a0c5b5393da5521b113cd5465a44eb037d81a5627", + "sha256:ff02944ce3c288c5be660c42dbcca0742b32c3b279d6dceda655190240b99224" + ], + "markers": "python_version >= '3.8'", + "version": "==2.0.4" + }, + "attrs": { + "hashes": [ + "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346", + "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2" + ], + "markers": "python_version >= '3.7'", + "version": "==24.2.0" + }, + "babel": { + "hashes": [ + "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b", + "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316" + ], + "markers": "python_version >= '3.8'", + "version": "==2.16.0" + }, + "beautifulsoup4": { + "hashes": [ + "sha256:74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051", + "sha256:b80878c9f40111313e55da8ba20bdba06d8fa3969fc68304167741bbf9e082ed" + ], + "markers": "python_full_version >= '3.6.0'", + "version": "==4.12.3" + }, + "bleach": { + "hashes": [ + "sha256:0a31f1837963c41d46bbf1331b8778e1308ea0791db03cc4e7357b97cf42a8fe", + "sha256:3225f354cfc436b9789c66c4ee030194bee0568fbf9cbdad3bc8b5c26c5f12b6" + ], + "markers": "python_version >= '3.8'", + "version": "==6.1.0" + }, + "certifi": { + "hashes": [ + "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b", + "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90" + ], + "markers": "python_version >= '3.6'", + "version": "==2024.7.4" + }, + "cffi": { + "hashes": [ + "sha256:011aff3524d578a9412c8b3cfaa50f2c0bd78e03eb7af7aa5e0df59b158efb2f", + "sha256:0a048d4f6630113e54bb4b77e315e1ba32a5a31512c31a273807d0027a7e69ab", + "sha256:0bb15e7acf8ab35ca8b24b90af52c8b391690ef5c4aec3d31f38f0d37d2cc499", + "sha256:0d46ee4764b88b91f16661a8befc6bfb24806d885e27436fdc292ed7e6f6d058", + "sha256:0e60821d312f99d3e1569202518dddf10ae547e799d75aef3bca3a2d9e8ee693", + "sha256:0fdacad9e0d9fc23e519efd5ea24a70348305e8d7d85ecbb1a5fa66dc834e7fb", + "sha256:14b9cbc8f7ac98a739558eb86fabc283d4d564dafed50216e7f7ee62d0d25377", + "sha256:17c6d6d3260c7f2d94f657e6872591fe8733872a86ed1345bda872cfc8c74885", + "sha256:1a2ddbac59dc3716bc79f27906c010406155031a1c801410f1bafff17ea304d2", + "sha256:2404f3de742f47cb62d023f0ba7c5a916c9c653d5b368cc966382ae4e57da401", + "sha256:24658baf6224d8f280e827f0a50c46ad819ec8ba380a42448e24459daf809cf4", + "sha256:24aa705a5f5bd3a8bcfa4d123f03413de5d86e497435693b638cbffb7d5d8a1b", + "sha256:2770bb0d5e3cc0e31e7318db06efcbcdb7b31bcb1a70086d3177692a02256f59", + "sha256:331ad15c39c9fe9186ceaf87203a9ecf5ae0ba2538c9e898e3a6967e8ad3db6f", + "sha256:3aa9d43b02a0c681f0bfbc12d476d47b2b2b6a3f9287f11ee42989a268a1833c", + "sha256:41f4915e09218744d8bae14759f983e466ab69b178de38066f7579892ff2a555", + "sha256:4304d4416ff032ed50ad6bb87416d802e67139e31c0bde4628f36a47a3164bfa", + "sha256:435a22d00ec7d7ea533db494da8581b05977f9c37338c80bc86314bec2619424", + "sha256:45f7cd36186db767d803b1473b3c659d57a23b5fa491ad83c6d40f2af58e4dbb", + "sha256:48b389b1fd5144603d61d752afd7167dfd205973a43151ae5045b35793232aa2", + "sha256:4e67d26532bfd8b7f7c05d5a766d6f437b362c1bf203a3a5ce3593a645e870b8", + "sha256:516a405f174fd3b88829eabfe4bb296ac602d6a0f68e0d64d5ac9456194a5b7e", + "sha256:5ba5c243f4004c750836f81606a9fcb7841f8874ad8f3bf204ff5e56332b72b9", + "sha256:5bdc0f1f610d067c70aa3737ed06e2726fd9d6f7bfee4a351f4c40b6831f4e82", + "sha256:6107e445faf057c118d5050560695e46d272e5301feffda3c41849641222a828", + "sha256:6327b572f5770293fc062a7ec04160e89741e8552bf1c358d1a23eba68166759", + "sha256:669b29a9eca6146465cc574659058ed949748f0809a2582d1f1a324eb91054dc", + "sha256:6ce01337d23884b21c03869d2f68c5523d43174d4fc405490eb0091057943118", + "sha256:6d872186c1617d143969defeadac5a904e6e374183e07977eedef9c07c8953bf", + "sha256:6f76a90c345796c01d85e6332e81cab6d70de83b829cf1d9762d0a3da59c7932", + "sha256:70d2aa9fb00cf52034feac4b913181a6e10356019b18ef89bc7c12a283bf5f5a", + "sha256:7cbc78dc018596315d4e7841c8c3a7ae31cc4d638c9b627f87d52e8abaaf2d29", + "sha256:856bf0924d24e7f93b8aee12a3a1095c34085600aa805693fb7f5d1962393206", + "sha256:8a98748ed1a1df4ee1d6f927e151ed6c1a09d5ec21684de879c7ea6aa96f58f2", + "sha256:93a7350f6706b31f457c1457d3a3259ff9071a66f312ae64dc024f049055f72c", + "sha256:964823b2fc77b55355999ade496c54dde161c621cb1f6eac61dc30ed1b63cd4c", + "sha256:a003ac9edc22d99ae1286b0875c460351f4e101f8c9d9d2576e78d7e048f64e0", + "sha256:a0ce71725cacc9ebf839630772b07eeec220cbb5f03be1399e0457a1464f8e1a", + "sha256:a47eef975d2b8b721775a0fa286f50eab535b9d56c70a6e62842134cf7841195", + "sha256:a8b5b9712783415695663bd463990e2f00c6750562e6ad1d28e072a611c5f2a6", + "sha256:a9015f5b8af1bb6837a3fcb0cdf3b874fe3385ff6274e8b7925d81ccaec3c5c9", + "sha256:aec510255ce690d240f7cb23d7114f6b351c733a74c279a84def763660a2c3bc", + "sha256:b00e7bcd71caa0282cbe3c90966f738e2db91e64092a877c3ff7f19a1628fdcb", + "sha256:b50aaac7d05c2c26dfd50c3321199f019ba76bb650e346a6ef3616306eed67b0", + "sha256:b7b6ea9e36d32582cda3465f54c4b454f62f23cb083ebc7a94e2ca6ef011c3a7", + "sha256:bb9333f58fc3a2296fb1d54576138d4cf5d496a2cc118422bd77835e6ae0b9cb", + "sha256:c1c13185b90bbd3f8b5963cd8ce7ad4ff441924c31e23c975cb150e27c2bf67a", + "sha256:c3b8bd3133cd50f6b637bb4322822c94c5ce4bf0d724ed5ae70afce62187c492", + "sha256:c5d97162c196ce54af6700949ddf9409e9833ef1003b4741c2b39ef46f1d9720", + "sha256:c815270206f983309915a6844fe994b2fa47e5d05c4c4cef267c3b30e34dbe42", + "sha256:cab2eba3830bf4f6d91e2d6718e0e1c14a2f5ad1af68a89d24ace0c6b17cced7", + "sha256:d1df34588123fcc88c872f5acb6f74ae59e9d182a2707097f9e28275ec26a12d", + "sha256:d6bdcd415ba87846fd317bee0774e412e8792832e7805938987e4ede1d13046d", + "sha256:db9a30ec064129d605d0f1aedc93e00894b9334ec74ba9c6bdd08147434b33eb", + "sha256:dbc183e7bef690c9abe5ea67b7b60fdbca81aa8da43468287dae7b5c046107d4", + "sha256:dca802c8db0720ce1c49cce1149ff7b06e91ba15fa84b1d59144fef1a1bc7ac2", + "sha256:dec6b307ce928e8e112a6bb9921a1cb00a0e14979bf28b98e084a4b8a742bd9b", + "sha256:df8bb0010fdd0a743b7542589223a2816bdde4d94bb5ad67884348fa2c1c67e8", + "sha256:e4094c7b464cf0a858e75cd14b03509e84789abf7b79f8537e6a72152109c76e", + "sha256:e4760a68cab57bfaa628938e9c2971137e05ce48e762a9cb53b76c9b569f1204", + "sha256:eb09b82377233b902d4c3fbeeb7ad731cdab579c6c6fda1f763cd779139e47c3", + "sha256:eb862356ee9391dc5a0b3cbc00f416b48c1b9a52d252d898e5b7696a5f9fe150", + "sha256:ef9528915df81b8f4c7612b19b8628214c65c9b7f74db2e34a646a0a2a0da2d4", + "sha256:f3157624b7558b914cb039fd1af735e5e8049a87c817cc215109ad1c8779df76", + "sha256:f3e0992f23bbb0be00a921eae5363329253c3b86287db27092461c887b791e5e", + "sha256:f9338cc05451f1942d0d8203ec2c346c830f8e86469903d5126c1f0a13a2bcbb", + "sha256:ffef8fd58a36fb5f1196919638f73dd3ae0db1a878982b27a9a5a176ede4ba91" + ], + "markers": "python_version >= '3.8'", + "version": "==1.17.0" + }, + "charset-normalizer": { + "hashes": [ + "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", + "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", + "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", + "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", + "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", + "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", + "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", + "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", + "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", + "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", + "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", + "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", + "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", + "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", + "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", + "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", + "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", + "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", + "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", + "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", + "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", + "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", + "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", + "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", + "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", + "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", + "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", + "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", + "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", + "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", + "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", + "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", + "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", + "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", + "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", + "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", + "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", + "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", + "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", + "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", + "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", + "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", + "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", + "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", + "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", + "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", + "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", + "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", + "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", + "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", + "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", + "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", + "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", + "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", + "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", + "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", + "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", + "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", + "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", + "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", + "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", + "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", + "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", + "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", + "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", + "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", + "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", + "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", + "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", + "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", + "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", + "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", + "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", + "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", + "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", + "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", + "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", + "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", + "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", + "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", + "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", + "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", + "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", + "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", + "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", + "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", + "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", + "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", + "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", + "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" + ], + "markers": "python_full_version >= '3.7.0'", + "version": "==3.3.2" + }, + "comm": { + "hashes": [ + "sha256:3fd7a84065306e07bea1773df6eb8282de51ba82f77c72f9c85716ab11fe980e", + "sha256:e6fb86cb70ff661ee8c9c14e7d36d6de3b4066f1441be4063df9c5009f0a64d3" + ], + "markers": "python_version >= '3.8'", + "version": "==0.2.2" + }, + "debugpy": { + "hashes": [ + "sha256:0a1029a2869d01cb777216af8c53cda0476875ef02a2b6ff8b2f2c9a4b04176c", + "sha256:1cd04a73eb2769eb0bfe43f5bfde1215c5923d6924b9b90f94d15f207a402226", + "sha256:28ced650c974aaf179231668a293ecd5c63c0a671ae6d56b8795ecc5d2f48d3c", + "sha256:345d6a0206e81eb68b1493ce2fbffd57c3088e2ce4b46592077a943d2b968ca3", + "sha256:3df6692351172a42af7558daa5019651f898fc67450bf091335aa8a18fbf6f3a", + "sha256:4413b7a3ede757dc33a273a17d685ea2b0c09dbd312cc03f5534a0fd4d40750a", + "sha256:4fbb3b39ae1aa3e5ad578f37a48a7a303dad9a3d018d369bc9ec629c1cfa7408", + "sha256:55919dce65b471eff25901acf82d328bbd5b833526b6c1364bd5133754777a44", + "sha256:5b5c770977c8ec6c40c60d6f58cacc7f7fe5a45960363d6974ddb9b62dbee156", + "sha256:606bccba19f7188b6ea9579c8a4f5a5364ecd0bf5a0659c8a5d0e10dcee3032a", + "sha256:7b0fe36ed9d26cb6836b0a51453653f8f2e347ba7348f2bbfe76bfeb670bfb1c", + "sha256:7e4d594367d6407a120b76bdaa03886e9eb652c05ba7f87e37418426ad2079f7", + "sha256:8f913ee8e9fcf9d38a751f56e6de12a297ae7832749d35de26d960f14280750a", + "sha256:a697beca97dad3780b89a7fb525d5e79f33821a8bc0c06faf1f1289e549743cf", + "sha256:ad84b7cde7fd96cf6eea34ff6c4a1b7887e0fe2ea46e099e53234856f9d99a34", + "sha256:b2112cfeb34b4507399d298fe7023a16656fc553ed5246536060ca7bd0e668d0", + "sha256:b78c1250441ce893cb5035dd6f5fc12db968cc07f91cc06996b2087f7cefdd8e", + "sha256:c0a65b00b7cdd2ee0c2cf4c7335fef31e15f1b7056c7fdbce9e90193e1a8c8cb", + "sha256:c9f7c15ea1da18d2fcc2709e9f3d6de98b69a5b0fff1807fb80bc55f906691f7", + "sha256:db9fb642938a7a609a6c865c32ecd0d795d56c1aaa7a7a5722d77855d5e77f2b", + "sha256:dd3811bd63632bb25eda6bd73bea8e0521794cda02be41fa3160eb26fc29e7ed", + "sha256:e84c276489e141ed0b93b0af648eef891546143d6a48f610945416453a8ad406" + ], + "markers": "python_version >= '3.8'", + "version": "==1.8.5" + }, + "decorator": { + "hashes": [ + "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330", + "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186" + ], + "markers": "python_version >= '3.5'", + "version": "==5.1.1" + }, + "defusedxml": { + "hashes": [ + "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69", + "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==0.7.1" + }, + "executing": { + "hashes": [ + "sha256:35afe2ce3affba8ee97f2d69927fa823b08b472b7b994e36a52a964b93d16147", + "sha256:eac49ca94516ccc753f9fb5ce82603156e590b27525a8bc32cce8ae302eb61bc" + ], + "markers": "python_version >= '3.5'", + "version": "==2.0.1" + }, + "fastjsonschema": { + "hashes": [ + "sha256:3d48fc5300ee96f5d116f10fe6f28d938e6008f59a6a025c2649475b87f76a23", + "sha256:5875f0b0fa7a0043a91e93a9b8f793bcbbba9691e7fd83dca95c28ba26d21f0a" + ], + "version": "==2.20.0" + }, + "flourishcharts": { + "git": "https://github.com/canva-public/flourishcharts", + "ref": "c2c49fba7b804b3fc720242cc0fb58092bd865db", + "subdirectory": "python_package" + }, + "fqdn": { + "hashes": [ + "sha256:105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f", + "sha256:3a179af3761e4df6eb2e026ff9e1a3033d3587bf980a0b1b2e1e5d08d7358014" + ], + "version": "==1.5.1" + }, + "h11": { + "hashes": [ + "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d", + "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761" + ], + "markers": "python_version >= '3.7'", + "version": "==0.14.0" + }, + "httpcore": { + "hashes": [ + "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61", + "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5" + ], + "markers": "python_version >= '3.8'", + "version": "==1.0.5" + }, + "httpx": { + "hashes": [ + "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0", + "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2" + ], + "markers": "python_version >= '3.8'", + "version": "==0.27.2" + }, + "idna": { + "hashes": [ + "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac", + "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603" + ], + "markers": "python_version >= '3.6'", + "version": "==3.8" + }, + "ipykernel": { + "hashes": [ + "sha256:afdb66ba5aa354b09b91379bac28ae4afebbb30e8b39510c9690afb7a10421b5", + "sha256:f093a22c4a40f8828f8e330a9c297cb93dcab13bd9678ded6de8e5cf81c56215" + ], + "markers": "python_version >= '3.8'", + "version": "==6.29.5" + }, + "ipython": { + "hashes": [ + "sha256:1cec0fbba8404af13facebe83d04436a7434c7400e59f47acf467c64abd0956c", + "sha256:e6b347c27bdf9c32ee9d31ae85defc525755a1869f14057e900675b9e8d6e6ff" + ], + "markers": "python_version >= '3.10'", + "version": "==8.26.0" + }, + "ipywidgets": { + "hashes": [ + "sha256:3290f526f87ae6e77655555baba4f36681c555b8bdbbff430b70e52c34c86245", + "sha256:870e43b1a35656a80c18c9503bbf2d16802db1cb487eec6fab27d683381dde17" + ], + "markers": "python_version >= '3.7'", + "version": "==8.1.5" + }, + "isoduration": { + "hashes": [ + "sha256:ac2f9015137935279eac671f94f89eb00584f940f5dc49462a0c4ee692ba1bd9", + "sha256:b2904c2a4228c3d44f409c8ae8e2370eb21a26f7ac2ec5446df141dde3452042" + ], + "version": "==20.11.0" + }, + "jedi": { + "hashes": [ + "sha256:cf0496f3651bc65d7174ac1b7d043eff454892c708a87d1b683e57b569927ffd", + "sha256:e983c654fe5c02867aef4cdfce5a2fbb4a50adc0af145f70504238f18ef5e7e0" + ], + "markers": "python_version >= '3.6'", + "version": "==0.19.1" + }, + "jinja2": { + "hashes": [ + "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369", + "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d" + ], + "markers": "python_version >= '3.7'", + "version": "==3.1.4" + }, + "json5": { + "hashes": [ + "sha256:34ed7d834b1341a86987ed52f3f76cd8ee184394906b6e22a1e0deb9ab294e8f", + "sha256:548e41b9be043f9426776f05df8635a00fe06104ea51ed24b67f908856e151ae" + ], + "markers": "python_version >= '3.8'", + "version": "==0.9.25" + }, + "jsonpointer": { + "hashes": [ + "sha256:13e088adc14fca8b6aa8177c044e12701e6ad4b28ff10e65f2267a90109c9942", + "sha256:2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef" + ], + "version": "==3.0.0" + }, + "jsonschema": { + "extras": [ + "format-nongpl" + ], + "hashes": [ + "sha256:d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4", + "sha256:fbadb6f8b144a8f8cf9f0b89ba94501d143e50411a1278633f56a7acf7fd5566" + ], + "markers": "python_version >= '3.8'", + "version": "==4.23.0" + }, + "jsonschema-specifications": { + "hashes": [ + "sha256:48a76787b3e70f5ed53f1160d2b81f586e4ca6d1548c5de7085d1682674764cc", + "sha256:87e4fdf3a94858b8a2ba2778d9ba57d8a9cafca7c7489c46ba0d30a8bc6a9c3c" + ], + "markers": "python_version >= '3.8'", + "version": "==2023.12.1" + }, + "jupyter-client": { + "hashes": [ + "sha256:2bda14d55ee5ba58552a8c53ae43d215ad9868853489213f37da060ced54d8df", + "sha256:50cbc5c66fd1b8f65ecb66bc490ab73217993632809b6e505687de18e9dea39f" + ], + "markers": "python_version >= '3.8'", + "version": "==8.6.2" + }, + "jupyter-core": { + "hashes": [ + "sha256:4f7315d2f6b4bcf2e3e7cb6e46772eba760ae459cd1f59d29eb57b0a01bd7409", + "sha256:aa5f8d32bbf6b431ac830496da7392035d6f61b4f54872f15c4bd2a9c3f536d9" + ], + "markers": "python_version >= '3.8'", + "version": "==5.7.2" + }, + "jupyter-events": { + "hashes": [ + "sha256:4b72130875e59d57716d327ea70d3ebc3af1944d3717e5a498b8a06c6c159960", + "sha256:670b8229d3cc882ec782144ed22e0d29e1c2d639263f92ca8383e66682845e22" + ], + "markers": "python_version >= '3.8'", + "version": "==0.10.0" + }, + "jupyter-lsp": { + "hashes": [ + "sha256:45fbddbd505f3fbfb0b6cb2f1bc5e15e83ab7c79cd6e89416b248cb3c00c11da", + "sha256:793147a05ad446f809fd53ef1cd19a9f5256fd0a2d6b7ce943a982cb4f545001" + ], + "markers": "python_version >= '3.8'", + "version": "==2.2.5" + }, + "jupyter-server": { + "hashes": [ + "sha256:47ff506127c2f7851a17bf4713434208fc490955d0e8632e95014a9a9afbeefd", + "sha256:66095021aa9638ced276c248b1d81862e4c50f292d575920bbe960de1c56b12b" + ], + "markers": "python_version >= '3.8'", + "version": "==2.14.2" + }, + "jupyter-server-terminals": { + "hashes": [ + "sha256:41ee0d7dc0ebf2809c668e0fc726dfaf258fcd3e769568996ca731b6194ae9aa", + "sha256:5ae0295167220e9ace0edcfdb212afd2b01ee8d179fe6f23c899590e9b8a5269" + ], + "markers": "python_version >= '3.8'", + "version": "==0.5.3" + }, + "jupyterlab": { + "hashes": [ + "sha256:73b6e0775d41a9fee7ee756c80f58a6bed4040869ccc21411dc559818874d321", + "sha256:ae7f3a1b8cb88b4f55009ce79fa7c06f99d70cd63601ee4aa91815d054f46f75" + ], + "index": "pypi", + "markers": "python_version >= '3.8'", + "version": "==4.2.5" + }, + "jupyterlab-pygments": { + "hashes": [ + "sha256:721aca4d9029252b11cfa9d185e5b5af4d54772bb8072f9b7036f4170054d35d", + "sha256:841a89020971da1d8693f1a99997aefc5dc424bb1b251fd6322462a1b8842780" + ], + "markers": "python_version >= '3.8'", + "version": "==0.3.0" + }, + "jupyterlab-server": { + "hashes": [ + "sha256:e697488f66c3db49df675158a77b3b017520d772c6e1548c7d9bcc5df7944ee4", + "sha256:eb36caca59e74471988f0ae25c77945610b887f777255aa21f8065def9e51ed4" + ], + "markers": "python_version >= '3.8'", + "version": "==2.27.3" + }, + "jupyterlab-widgets": { + "hashes": [ + "sha256:a2966d385328c1942b683a8cd96b89b8dd82c8b8f81dda902bb2bc06d46f5bed", + "sha256:e3cda2c233ce144192f1e29914ad522b2f4c40e77214b0cc97377ca3d323db54" + ], + "markers": "python_version >= '3.7'", + "version": "==3.0.13" + }, + "markupsafe": { + "hashes": [ + "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf", + "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff", + "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f", + "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3", + "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532", + "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f", + "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617", + "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df", + "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4", + "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906", + "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f", + "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4", + "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8", + "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371", + "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2", + "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465", + "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52", + "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6", + "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169", + "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad", + "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2", + "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0", + "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029", + "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f", + "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a", + "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced", + "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5", + "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c", + "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf", + "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9", + "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb", + "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad", + "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3", + "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1", + "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46", + "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc", + "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a", + "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee", + "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900", + "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5", + "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea", + "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f", + "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5", + "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e", + "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a", + "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f", + "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50", + "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a", + "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b", + "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4", + "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff", + "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2", + "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46", + "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b", + "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf", + "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5", + "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5", + "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab", + "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd", + "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68" + ], + "markers": "python_version >= '3.7'", + "version": "==2.1.5" + }, + "matplotlib-inline": { + "hashes": [ + "sha256:8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90", + "sha256:df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca" + ], + "markers": "python_version >= '3.8'", + "version": "==0.1.7" + }, + "mistune": { + "hashes": [ + "sha256:71481854c30fdbc938963d3605b72501f5c10a9320ecd412c121c163a1c7d205", + "sha256:fc7f93ded930c92394ef2cb6f04a8aabab4117a91449e72dcc8dfa646a508be8" + ], + "markers": "python_version >= '3.7'", + "version": "==3.0.2" + }, + "nbclient": { + "hashes": [ + "sha256:4b3f1b7dba531e498449c4db4f53da339c91d449dc11e9af3a43b4eb5c5abb09", + "sha256:f13e3529332a1f1f81d82a53210322476a168bb7090a0289c795fe9cc11c9d3f" + ], + "markers": "python_full_version >= '3.8.0'", + "version": "==0.10.0" + }, + "nbconvert": { + "hashes": [ + "sha256:05873c620fe520b6322bf8a5ad562692343fe3452abda5765c7a34b7d1aa3eb3", + "sha256:86ca91ba266b0a448dc96fa6c5b9d98affabde2867b363258703536807f9f7f4" + ], + "markers": "python_version >= '3.8'", + "version": "==7.16.4" + }, + "nbformat": { + "hashes": [ + "sha256:322168b14f937a5d11362988ecac2a4952d3d8e3a2cbeb2319584631226d5b3a", + "sha256:3b48d6c8fbca4b299bf3982ea7db1af21580e4fec269ad087b9e81588891200b" + ], + "markers": "python_version >= '3.8'", + "version": "==5.10.4" + }, + "nest-asyncio": { + "hashes": [ + "sha256:6f172d5449aca15afd6c646851f4e31e02c598d553a667e38cafa997cfec55fe", + "sha256:87af6efd6b5e897c81050477ef65c62e2b2f35d51703cae01aff2905b1852e1c" + ], + "markers": "python_version >= '3.5'", + "version": "==1.6.0" + }, + "notebook-shim": { + "hashes": [ + "sha256:411a5be4e9dc882a074ccbcae671eda64cceb068767e9a3419096986560e1cef", + "sha256:b4b2cfa1b65d98307ca24361f5b30fe785b53c3fd07b7a47e89acb5e6ac638cb" + ], + "markers": "python_version >= '3.7'", + "version": "==0.2.4" + }, + "numpy": { + "hashes": [ + "sha256:08801848a40aea24ce16c2ecde3b756f9ad756586fb2d13210939eb69b023f5b", + "sha256:0937e54c09f7a9a68da6889362ddd2ff584c02d015ec92672c099b61555f8911", + "sha256:0ab32eb9170bf8ffcbb14f11613f4a0b108d3ffee0832457c5d4808233ba8977", + "sha256:0abb3916a35d9090088a748636b2c06dc9a6542f99cd476979fb156a18192b84", + "sha256:0af3a5987f59d9c529c022c8c2a64805b339b7ef506509fba7d0556649b9714b", + "sha256:10e2350aea18d04832319aac0f887d5fcec1b36abd485d14f173e3e900b83e33", + "sha256:15ef8b2177eeb7e37dd5ef4016f30b7659c57c2c0b57a779f1d537ff33a72c7b", + "sha256:1f817c71683fd1bb5cff1529a1d085a57f02ccd2ebc5cd2c566f9a01118e3b7d", + "sha256:24003ba8ff22ea29a8c306e61d316ac74111cebf942afbf692df65509a05f111", + "sha256:30014b234f07b5fec20f4146f69e13cfb1e33ee9a18a1879a0142fbb00d47673", + "sha256:343e3e152bf5a087511cd325e3b7ecfd5b92d369e80e74c12cd87826e263ec06", + "sha256:378cb4f24c7d93066ee4103204f73ed046eb88f9ad5bb2275bb9fa0f6a02bd36", + "sha256:398049e237d1aae53d82a416dade04defed1a47f87d18d5bd615b6e7d7e41d1f", + "sha256:3a3336fbfa0d38d3deacd3fe7f3d07e13597f29c13abf4d15c3b6dc2291cbbdd", + "sha256:442596f01913656d579309edcd179a2a2f9977d9a14ff41d042475280fc7f34e", + "sha256:44e44973262dc3ae79e9063a1284a73e09d01b894b534a769732ccd46c28cc62", + "sha256:54139e0eb219f52f60656d163cbe67c31ede51d13236c950145473504fa208cb", + "sha256:5474dad8c86ee9ba9bb776f4b99ef2d41b3b8f4e0d199d4f7304728ed34d0300", + "sha256:54c6a63e9d81efe64bfb7bcb0ec64332a87d0b87575f6009c8ba67ea6374770b", + "sha256:624884b572dff8ca8f60fab591413f077471de64e376b17d291b19f56504b2bb", + "sha256:6326ab99b52fafdcdeccf602d6286191a79fe2fda0ae90573c5814cd2b0bc1b8", + "sha256:652e92fc409e278abdd61e9505649e3938f6d04ce7ef1953f2ec598a50e7c195", + "sha256:6c1de77ded79fef664d5098a66810d4d27ca0224e9051906e634b3f7ead134c2", + "sha256:76368c788ccb4f4782cf9c842b316140142b4cbf22ff8db82724e82fe1205dce", + "sha256:7a894c51fd8c4e834f00ac742abad73fc485df1062f1b875661a3c1e1fb1c2f6", + "sha256:7dc90da0081f7e1da49ec4e398ede6a8e9cc4f5ebe5f9e06b443ed889ee9aaa2", + "sha256:848c6b5cad9898e4b9ef251b6f934fa34630371f2e916261070a4eb9092ffd33", + "sha256:899da829b362ade41e1e7eccad2cf274035e1cb36ba73034946fccd4afd8606b", + "sha256:8ab81ccd753859ab89e67199b9da62c543850f819993761c1e94a75a814ed667", + "sha256:8fb49a0ba4d8f41198ae2d52118b050fd34dace4b8f3fb0ee34e23eb4ae775b1", + "sha256:9156ca1f79fc4acc226696e95bfcc2b486f165a6a59ebe22b2c1f82ab190384a", + "sha256:9523f8b46485db6939bd069b28b642fec86c30909cea90ef550373787f79530e", + "sha256:a0756a179afa766ad7cb6f036de622e8a8f16ffdd55aa31f296c870b5679d745", + "sha256:a0cdef204199278f5c461a0bed6ed2e052998276e6d8ab2963d5b5c39a0500bc", + "sha256:ab83adc099ec62e044b1fbb3a05499fa1e99f6d53a1dde102b2d85eff66ed324", + "sha256:b34fa5e3b5d6dc7e0a4243fa0f81367027cb6f4a7215a17852979634b5544ee0", + "sha256:b47c551c6724960479cefd7353656498b86e7232429e3a41ab83be4da1b109e8", + "sha256:c4cd94dfefbefec3f8b544f61286584292d740e6e9d4677769bc76b8f41deb02", + "sha256:c4f982715e65036c34897eb598d64aef15150c447be2cfc6643ec7a11af06574", + "sha256:d8f699a709120b220dfe173f79c73cb2a2cab2c0b88dd59d7b49407d032b8ebd", + "sha256:dd94ce596bda40a9618324547cfaaf6650b1a24f5390350142499aa4e34e53d1", + "sha256:de844aaa4815b78f6023832590d77da0e3b6805c644c33ce94a1e449f16d6ab5", + "sha256:e5f0642cdf4636198a4990de7a71b693d824c56a757862230454629cf62e323d", + "sha256:f07fa2f15dabe91259828ce7d71b5ca9e2eb7c8c26baa822c825ce43552f4883", + "sha256:f15976718c004466406342789f31b6673776360f3b1e3c575f25302d7e789575", + "sha256:f358ea9e47eb3c2d6eba121ab512dfff38a88db719c38d1e67349af210bc7529", + "sha256:f505264735ee074250a9c78247ee8618292091d9d1fcc023290e9ac67e8f1afa", + "sha256:f5ebbf9fbdabed208d4ecd2e1dfd2c0741af2f876e7ae522c2537d404ca895c3", + "sha256:f6b26e6c3b98adb648243670fddc8cab6ae17473f9dc58c51574af3e64d61211", + "sha256:f8e93a01a35be08d31ae33021e5268f157a2d60ebd643cfc15de6ab8e4722eb1", + "sha256:fe76d75b345dc045acdbc006adcb197cc680754afd6c259de60d358d60c93736", + "sha256:ffbd6faeb190aaf2b5e9024bac9622d2ee549b7ec89ef3a9373fa35313d44e0e" + ], + "markers": "python_version == '3.11'", + "version": "==2.1.0" + }, + "overrides": { + "hashes": [ + "sha256:55158fa3d93b98cc75299b1e67078ad9003ca27945c76162c1c0766d6f91820a", + "sha256:c7ed9d062f78b8e4c1a7b70bd8796b35ead4d9f510227ef9c5dc7626c60d7e49" + ], + "markers": "python_version >= '3.6'", + "version": "==7.7.0" + }, + "packaging": { + "hashes": [ + "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002", + "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124" + ], + "markers": "python_version >= '3.8'", + "version": "==24.1" + }, + "pandas": { + "hashes": [ + "sha256:001910ad31abc7bf06f49dcc903755d2f7f3a9186c0c040b827e522e9cef0863", + "sha256:0ca6377b8fca51815f382bd0b697a0814c8bda55115678cbc94c30aacbb6eff2", + "sha256:0cace394b6ea70c01ca1595f839cf193df35d1575986e484ad35c4aeae7266c1", + "sha256:1cb51fe389360f3b5a4d57dbd2848a5f033350336ca3b340d1c53a1fad33bcad", + "sha256:2925720037f06e89af896c70bca73459d7e6a4be96f9de79e2d440bd499fe0db", + "sha256:3e374f59e440d4ab45ca2fffde54b81ac3834cf5ae2cdfa69c90bc03bde04d76", + "sha256:40ae1dffb3967a52203105a077415a86044a2bea011b5f321c6aa64b379a3f51", + "sha256:43498c0bdb43d55cb162cdc8c06fac328ccb5d2eabe3cadeb3529ae6f0517c32", + "sha256:4abfe0be0d7221be4f12552995e58723c7422c80a659da13ca382697de830c08", + "sha256:58b84b91b0b9f4bafac2a0ac55002280c094dfc6402402332c0913a59654ab2b", + "sha256:640cef9aa381b60e296db324337a554aeeb883ead99dc8f6c18e81a93942f5f4", + "sha256:66b479b0bd07204e37583c191535505410daa8df638fd8e75ae1b383851fe921", + "sha256:696039430f7a562b74fa45f540aca068ea85fa34c244d0deee539cb6d70aa288", + "sha256:6d2123dc9ad6a814bcdea0f099885276b31b24f7edf40f6cdbc0912672e22eee", + "sha256:8635c16bf3d99040fdf3ca3db669a7250ddf49c55dc4aa8fe0ae0fa8d6dcc1f0", + "sha256:873d13d177501a28b2756375d59816c365e42ed8417b41665f346289adc68d24", + "sha256:8e5a0b00e1e56a842f922e7fae8ae4077aee4af0acb5ae3622bd4b4c30aedf99", + "sha256:8e90497254aacacbc4ea6ae5e7a8cd75629d6ad2b30025a4a8b09aa4faf55151", + "sha256:9057e6aa78a584bc93a13f0a9bf7e753a5e9770a30b4d758b8d5f2a62a9433cd", + "sha256:90c6fca2acf139569e74e8781709dccb6fe25940488755716d1d354d6bc58bce", + "sha256:92fd6b027924a7e178ac202cfbe25e53368db90d56872d20ffae94b96c7acc57", + "sha256:9dfde2a0ddef507a631dc9dc4af6a9489d5e2e740e226ad426a05cabfbd7c8ef", + "sha256:9e79019aba43cb4fda9e4d983f8e88ca0373adbb697ae9c6c43093218de28b54", + "sha256:a77e9d1c386196879aa5eb712e77461aaee433e54c68cf253053a73b7e49c33a", + "sha256:c7adfc142dac335d8c1e0dcbd37eb8617eac386596eb9e1a1b77791cf2498238", + "sha256:d187d355ecec3629624fccb01d104da7d7f391db0311145817525281e2804d23", + "sha256:ddf818e4e6c7c6f4f7c8a12709696d193976b591cc7dc50588d3d1a6b5dc8772", + "sha256:e9b79011ff7a0f4b1d6da6a61aa1aa604fb312d6647de5bad20013682d1429ce", + "sha256:eee3a87076c0756de40b05c5e9a6069c035ba43e8dd71c379e68cab2c20f16ad" + ], + "index": "pypi", + "markers": "python_version >= '3.9'", + "version": "==2.2.2" + }, + "pandocfilters": { + "hashes": [ + "sha256:002b4a555ee4ebc03f8b66307e287fa492e4a77b4ea14d3f934328297bb4939e", + "sha256:93be382804a9cdb0a7267585f157e5d1731bbe5545a85b268d6f5fe6232de2bc" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.5.1" + }, + "parso": { + "hashes": [ + "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18", + "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d" + ], + "markers": "python_version >= '3.6'", + "version": "==0.8.4" + }, + "pexpect": { + "hashes": [ + "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", + "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + ], + "markers": "sys_platform != 'win32' and sys_platform != 'emscripten'", + "version": "==4.9.0" + }, + "platformdirs": { + "hashes": [ + "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee", + "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3" + ], + "markers": "python_version >= '3.8'", + "version": "==4.2.2" + }, + "prometheus-client": { + "hashes": [ + "sha256:287629d00b147a32dcb2be0b9df905da599b2d82f80377083ec8463309a4bb89", + "sha256:cde524a85bce83ca359cc837f28b8c0db5cac7aa653a588fd7e84ba061c329e7" + ], + "markers": "python_version >= '3.8'", + "version": "==0.20.0" + }, + "prompt-toolkit": { + "hashes": [ + "sha256:0d7bfa67001d5e39d02c224b663abc33687405033a8c422d0d675a5a13361d10", + "sha256:1e1b29cb58080b1e69f207c893a1a7bf16d127a5c30c9d17a25a5d77792e5360" + ], + "markers": "python_full_version >= '3.7.0'", + "version": "==3.0.47" + }, + "psutil": { + "hashes": [ + "sha256:02b69001f44cc73c1c5279d02b30a817e339ceb258ad75997325e0e6169d8b35", + "sha256:1287c2b95f1c0a364d23bc6f2ea2365a8d4d9b726a3be7294296ff7ba97c17f0", + "sha256:1e7c870afcb7d91fdea2b37c24aeb08f98b6d67257a5cb0a8bc3ac68d0f1a68c", + "sha256:21f1fb635deccd510f69f485b87433460a603919b45e2a324ad65b0cc74f8fb1", + "sha256:33ea5e1c975250a720b3a6609c490db40dae5d83a4eb315170c4fe0d8b1f34b3", + "sha256:34859b8d8f423b86e4385ff3665d3f4d94be3cdf48221fbe476e883514fdb71c", + "sha256:5fd9a97c8e94059b0ef54a7d4baf13b405011176c3b6ff257c247cae0d560ecd", + "sha256:6ec7588fb3ddaec7344a825afe298db83fe01bfaaab39155fa84cf1c0d6b13c3", + "sha256:6ed2440ada7ef7d0d608f20ad89a04ec47d2d3ab7190896cd62ca5fc4fe08bf0", + "sha256:8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2", + "sha256:a021da3e881cd935e64a3d0a20983bda0bb4cf80e4f74fa9bfcb1bc5785360c6", + "sha256:a495580d6bae27291324fe60cea0b5a7c23fa36a7cd35035a16d93bdcf076b9d", + "sha256:a9a3dbfb4de4f18174528d87cc352d1f788b7496991cca33c6996f40c9e3c92c", + "sha256:c588a7e9b1173b6e866756dde596fd4cad94f9399daf99ad8c3258b3cb2b47a0", + "sha256:e2e8d0054fc88153ca0544f5c4d554d42e33df2e009c4ff42284ac9ebdef4132", + "sha256:fc8c9510cde0146432bbdb433322861ee8c3efbf8589865c8bf8d21cb30c4d14", + "sha256:ffe7fc9b6b36beadc8c322f84e1caff51e8703b88eee1da46d1e3a6ae11b4fd0" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", + "version": "==6.0.0" + }, + "psygnal": { + "hashes": [ + "sha256:04255fe28828060a80320f8fda937c47bc0c21ca14f55a13eb7c494b165ea395", + "sha256:09c75d21eb090e2ffafb32893bc5d104b98ed237ed64bebccb45cca759c7dcf4", + "sha256:0b55cb42e468f3a7de75392520778604fef2bc518b7df36c639b35ce4ed92016", + "sha256:1c2388360a9ffcd1381e9b36d0f794287a270d58e69bf17658a194bbf86685c1", + "sha256:24e69ea57ee39e3677298f38a18828af87cdc0bf0aa64685d44259e608bae3ec", + "sha256:2deec4bf7adbb9e3ef0513ae8b9e98bb815eb62b76a7bf1986f1d6ed626c8784", + "sha256:36cd667dd1d3e70e3fd970463a8571436e5ae58f02cc05a4a1669e6d8550d263", + "sha256:3c04baec10f882cdf784a7312e23892416188417ad85607e6d1de2e8a9e70709", + "sha256:713dfb96a1315378ce9120376d975671ede3133de4985884a43d4b6b332faeee", + "sha256:7676e89225abc2f37ca7022c300ffd26fefaf21bdc894bc7c41dffbad5e969df", + "sha256:885922a6e65ece9ff8ccf2b6810f435ca8067f410889f7a8fffb6b0d61421a0d", + "sha256:8d9187700fc608abefeb287bf2e0980a26c62471921ffd1a3cd223ccc554181b", + "sha256:8f77317cbd11fbed5bfdd40ea41b4e551ee0cf37881cdbc325b67322af577485", + "sha256:c05f474b297e2577506b354132c3fed054f0444ccce6d431f299d3750c2ede4b", + "sha256:c392f638aac2cdc4f13fffb904455224ae9b4dbb2f26d7f3264e4208fee5334d", + "sha256:c7dd3cf809c9c1127d90c6b11fbbd1eb2d66d512ccd4d5cab048786f13d11220", + "sha256:c9dde42a2cdf34f9c5fe0cd7515e2ab1524e3207afb37d096733c7a3dcdf388a", + "sha256:cec87aee468a1fe564094a64bc3c30edc86ce34d7bb37ab69332c7825b873396", + "sha256:d77f1a71fe9859c0335c87d92afe1b17c520a4137326810e94351839342d8fc7", + "sha256:dc260f19349485bd58e276e731cf8be40d8891cc6ff1c165762bd2c1b84f1ff7", + "sha256:f9b02ca246ab0adb108c4010b4a486e464f940543201074591e50370cd7b0cc0", + "sha256:fe70023fe4cf8bb6a0f27e89fd8f1cf715893dfb004b790937a0bc59d9071aab" + ], + "markers": "python_version >= '3.8'", + "version": "==0.11.1" + }, + "ptyprocess": { + "hashes": [ + "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", + "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + ], + "markers": "os_name != 'nt'", + "version": "==0.7.0" + }, + "pure-eval": { + "hashes": [ + "sha256:1db8e35b67b3d218d818ae653e27f06c3aa420901fa7b081ca98cbedc874e0d0", + "sha256:5f4e983f40564c576c7c8635ae88db5956bb2229d7e9237d03b3c0b0190eaf42" + ], + "version": "==0.2.3" + }, + "pycparser": { + "hashes": [ + "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6", + "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc" + ], + "markers": "python_version >= '3.8'", + "version": "==2.22" + }, + "pygments": { + "hashes": [ + "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199", + "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a" + ], + "markers": "python_version >= '3.8'", + "version": "==2.18.0" + }, + "python-dateutil": { + "hashes": [ + "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", + "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.9.0.post0" + }, + "python-json-logger": { + "hashes": [ + "sha256:23e7ec02d34237c5aa1e29a070193a4ea87583bb4e7f8fd06d3de8264c4b2e1c", + "sha256:f380b826a991ebbe3de4d897aeec42760035ac760345e57b812938dc8b35e2bd" + ], + "markers": "python_version >= '3.6'", + "version": "==2.0.7" + }, + "pytz": { + "hashes": [ + "sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812", + "sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319" + ], + "version": "==2024.1" + }, + "pyyaml": { + "hashes": [ + "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff", + "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48", + "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086", + "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e", + "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133", + "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5", + "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484", + "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee", + "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5", + "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68", + "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a", + "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf", + "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99", + "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8", + "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85", + "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19", + "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc", + "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a", + "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1", + "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317", + "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c", + "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631", + "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d", + "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652", + "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5", + "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e", + "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b", + "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8", + "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476", + "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706", + "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563", + "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237", + "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b", + "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083", + "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180", + "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425", + "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e", + "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f", + "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725", + "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183", + "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab", + "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774", + "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725", + "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e", + "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5", + "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d", + "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290", + "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44", + "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed", + "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4", + "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba", + "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12", + "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4" + ], + "markers": "python_version >= '3.8'", + "version": "==6.0.2" + }, + "pyzmq": { + "hashes": [ + "sha256:007137c9ac9ad5ea21e6ad97d3489af654381324d5d3ba614c323f60dab8fae6", + "sha256:034da5fc55d9f8da09015d368f519478a52675e558c989bfcb5cf6d4e16a7d2a", + "sha256:05590cdbc6b902101d0e65d6a4780af14dc22914cc6ab995d99b85af45362cc9", + "sha256:070672c258581c8e4f640b5159297580a9974b026043bd4ab0470be9ed324f1f", + "sha256:0aca98bc423eb7d153214b2df397c6421ba6373d3397b26c057af3c904452e37", + "sha256:0bed0e799e6120b9c32756203fb9dfe8ca2fb8467fed830c34c877e25638c3fc", + "sha256:0d987a3ae5a71c6226b203cfd298720e0086c7fe7c74f35fa8edddfbd6597eed", + "sha256:0eaa83fc4c1e271c24eaf8fb083cbccef8fde77ec8cd45f3c35a9a123e6da097", + "sha256:160c7e0a5eb178011e72892f99f918c04a131f36056d10d9c1afb223fc952c2d", + "sha256:17bf5a931c7f6618023cdacc7081f3f266aecb68ca692adac015c383a134ca52", + "sha256:17c412bad2eb9468e876f556eb4ee910e62d721d2c7a53c7fa31e643d35352e6", + "sha256:18c8dc3b7468d8b4bdf60ce9d7141897da103c7a4690157b32b60acb45e333e6", + "sha256:1a534f43bc738181aa7cbbaf48e3eca62c76453a40a746ab95d4b27b1111a7d2", + "sha256:1c17211bc037c7d88e85ed8b7d8f7e52db6dc8eca5590d162717c654550f7282", + "sha256:1f3496d76b89d9429a656293744ceca4d2ac2a10ae59b84c1da9b5165f429ad3", + "sha256:1fcc03fa4997c447dce58264e93b5aa2d57714fbe0f06c07b7785ae131512732", + "sha256:226af7dcb51fdb0109f0016449b357e182ea0ceb6b47dfb5999d569e5db161d5", + "sha256:23f4aad749d13698f3f7b64aad34f5fc02d6f20f05999eebc96b89b01262fb18", + "sha256:25bf2374a2a8433633c65ccb9553350d5e17e60c8eb4de4d92cc6bd60f01d306", + "sha256:28ad5233e9c3b52d76196c696e362508959741e1a005fb8fa03b51aea156088f", + "sha256:28c812d9757fe8acecc910c9ac9dafd2ce968c00f9e619db09e9f8f54c3a68a3", + "sha256:29c6a4635eef69d68a00321e12a7d2559fe2dfccfa8efae3ffb8e91cd0b36a8b", + "sha256:29c7947c594e105cb9e6c466bace8532dc1ca02d498684128b339799f5248277", + "sha256:2a50625acdc7801bc6f74698c5c583a491c61d73c6b7ea4dee3901bb99adb27a", + "sha256:2ae90ff9dad33a1cfe947d2c40cb9cb5e600d759ac4f0fd22616ce6540f72797", + "sha256:2c4a71d5d6e7b28a47a394c0471b7e77a0661e2d651e7ae91e0cab0a587859ca", + "sha256:2ea4ad4e6a12e454de05f2949d4beddb52460f3de7c8b9d5c46fbb7d7222e02c", + "sha256:2eb7735ee73ca1b0d71e0e67c3739c689067f055c764f73aac4cc8ecf958ee3f", + "sha256:31507f7b47cc1ead1f6e86927f8ebb196a0bab043f6345ce070f412a59bf87b5", + "sha256:35cffef589bcdc587d06f9149f8d5e9e8859920a071df5a2671de2213bef592a", + "sha256:367b4f689786fca726ef7a6c5ba606958b145b9340a5e4808132cc65759abd44", + "sha256:39887ac397ff35b7b775db7201095fc6310a35fdbae85bac4523f7eb3b840e20", + "sha256:3a495b30fc91db2db25120df5847d9833af237546fd59170701acd816ccc01c4", + "sha256:3b55a4229ce5da9497dd0452b914556ae58e96a4381bb6f59f1305dfd7e53fc8", + "sha256:402b190912935d3db15b03e8f7485812db350d271b284ded2b80d2e5704be780", + "sha256:43a47408ac52647dfabbc66a25b05b6a61700b5165807e3fbd40063fcaf46386", + "sha256:4661c88db4a9e0f958c8abc2b97472e23061f0bc737f6f6179d7a27024e1faa5", + "sha256:46a446c212e58456b23af260f3d9fb785054f3e3653dbf7279d8f2b5546b21c2", + "sha256:470d4a4f6d48fb34e92d768b4e8a5cc3780db0d69107abf1cd7ff734b9766eb0", + "sha256:49d34ab71db5a9c292a7644ce74190b1dd5a3475612eefb1f8be1d6961441971", + "sha256:4d29ab8592b6ad12ebbf92ac2ed2bedcfd1cec192d8e559e2e099f648570e19b", + "sha256:4d80b1dd99c1942f74ed608ddb38b181b87476c6a966a88a950c7dee118fdf50", + "sha256:4da04c48873a6abdd71811c5e163bd656ee1b957971db7f35140a2d573f6949c", + "sha256:4f78c88905461a9203eac9faac157a2a0dbba84a0fd09fd29315db27be40af9f", + "sha256:4ff9dc6bc1664bb9eec25cd17506ef6672d506115095411e237d571e92a58231", + "sha256:5506f06d7dc6ecf1efacb4a013b1f05071bb24b76350832c96449f4a2d95091c", + "sha256:55cf66647e49d4621a7e20c8d13511ef1fe1efbbccf670811864452487007e08", + "sha256:5a509df7d0a83a4b178d0f937ef14286659225ef4e8812e05580776c70e155d5", + "sha256:5c2b3bfd4b9689919db068ac6c9911f3fcb231c39f7dd30e3138be94896d18e6", + "sha256:6835dd60355593de10350394242b5757fbbd88b25287314316f266e24c61d073", + "sha256:689c5d781014956a4a6de61d74ba97b23547e431e9e7d64f27d4922ba96e9d6e", + "sha256:6a96179a24b14fa6428cbfc08641c779a53f8fcec43644030328f44034c7f1f4", + "sha256:6ace4f71f1900a548f48407fc9be59c6ba9d9aaf658c2eea6cf2779e72f9f317", + "sha256:6b274e0762c33c7471f1a7471d1a2085b1a35eba5cdc48d2ae319f28b6fc4de3", + "sha256:706e794564bec25819d21a41c31d4df2d48e1cc4b061e8d345d7fb4dd3e94072", + "sha256:70fc7fcf0410d16ebdda9b26cbd8bf8d803d220a7f3522e060a69a9c87bf7bad", + "sha256:7133d0a1677aec369d67dd78520d3fa96dd7f3dcec99d66c1762870e5ea1a50a", + "sha256:7445be39143a8aa4faec43b076e06944b8f9d0701b669df4af200531b21e40bb", + "sha256:76589c020680778f06b7e0b193f4b6dd66d470234a16e1df90329f5e14a171cd", + "sha256:76589f2cd6b77b5bdea4fca5992dc1c23389d68b18ccc26a53680ba2dc80ff2f", + "sha256:77eb0968da535cba0470a5165468b2cac7772cfb569977cff92e240f57e31bef", + "sha256:794a4562dcb374f7dbbfb3f51d28fb40123b5a2abadee7b4091f93054909add5", + "sha256:7ad1bc8d1b7a18497dda9600b12dc193c577beb391beae5cd2349184db40f187", + "sha256:7f98f6dfa8b8ccaf39163ce872bddacca38f6a67289116c8937a02e30bbe9711", + "sha256:8423c1877d72c041f2c263b1ec6e34360448decfb323fa8b94e85883043ef988", + "sha256:8685fa9c25ff00f550c1fec650430c4b71e4e48e8d852f7ddcf2e48308038640", + "sha256:878206a45202247781472a2d99df12a176fef806ca175799e1c6ad263510d57c", + "sha256:89289a5ee32ef6c439086184529ae060c741334b8970a6855ec0b6ad3ff28764", + "sha256:8ab5cad923cc95c87bffee098a27856c859bd5d0af31bd346035aa816b081fe1", + "sha256:8b435f2753621cd36e7c1762156815e21c985c72b19135dac43a7f4f31d28dd1", + "sha256:8be4700cd8bb02cc454f630dcdf7cfa99de96788b80c51b60fe2fe1dac480289", + "sha256:8c997098cc65e3208eca09303630e84d42718620e83b733d0fd69543a9cab9cb", + "sha256:8ea039387c10202ce304af74def5021e9adc6297067f3441d348d2b633e8166a", + "sha256:8f7e66c7113c684c2b3f1c83cdd3376103ee0ce4c49ff80a648643e57fb22218", + "sha256:90412f2db8c02a3864cbfc67db0e3dcdbda336acf1c469526d3e869394fe001c", + "sha256:92a78853d7280bffb93df0a4a6a2498cba10ee793cc8076ef797ef2f74d107cf", + "sha256:989d842dc06dc59feea09e58c74ca3e1678c812a4a8a2a419046d711031f69c7", + "sha256:9cb3a6460cdea8fe8194a76de8895707e61ded10ad0be97188cc8463ffa7e3a8", + "sha256:9dd8cd1aeb00775f527ec60022004d030ddc51d783d056e3e23e74e623e33726", + "sha256:9ed69074a610fad1c2fda66180e7b2edd4d31c53f2d1872bc2d1211563904cd9", + "sha256:9edda2df81daa129b25a39b86cb57dfdfe16f7ec15b42b19bfac503360d27a93", + "sha256:a2224fa4a4c2ee872886ed00a571f5e967c85e078e8e8c2530a2fb01b3309b88", + "sha256:a4f96f0d88accc3dbe4a9025f785ba830f968e21e3e2c6321ccdfc9aef755115", + "sha256:aedd5dd8692635813368e558a05266b995d3d020b23e49581ddd5bbe197a8ab6", + "sha256:aee22939bb6075e7afededabad1a56a905da0b3c4e3e0c45e75810ebe3a52672", + "sha256:b1d464cb8d72bfc1a3adc53305a63a8e0cac6bc8c5a07e8ca190ab8d3faa43c2", + "sha256:b8f86dd868d41bea9a5f873ee13bf5551c94cf6bc51baebc6f85075971fe6eea", + "sha256:bc6bee759a6bddea5db78d7dcd609397449cb2d2d6587f48f3ca613b19410cfc", + "sha256:bea2acdd8ea4275e1278350ced63da0b166421928276c7c8e3f9729d7402a57b", + "sha256:bfa832bfa540e5b5c27dcf5de5d82ebc431b82c453a43d141afb1e5d2de025fa", + "sha256:c0e6091b157d48cbe37bd67233318dbb53e1e6327d6fc3bb284afd585d141003", + "sha256:c3789bd5768ab5618ebf09cef6ec2b35fed88709b104351748a63045f0ff9797", + "sha256:c530e1eecd036ecc83c3407f77bb86feb79916d4a33d11394b8234f3bd35b940", + "sha256:c811cfcd6a9bf680236c40c6f617187515269ab2912f3d7e8c0174898e2519db", + "sha256:c92d73464b886931308ccc45b2744e5968cbaade0b1d6aeb40d8ab537765f5bc", + "sha256:cccba051221b916a4f5e538997c45d7d136a5646442b1231b916d0164067ea27", + "sha256:cdeabcff45d1c219636ee2e54d852262e5c2e085d6cb476d938aee8d921356b3", + "sha256:ced65e5a985398827cc9276b93ef6dfabe0273c23de8c7931339d7e141c2818e", + "sha256:d049df610ac811dcffdc147153b414147428567fbbc8be43bb8885f04db39d98", + "sha256:dacd995031a01d16eec825bf30802fceb2c3791ef24bcce48fa98ce40918c27b", + "sha256:ddf33d97d2f52d89f6e6e7ae66ee35a4d9ca6f36eda89c24591b0c40205a3629", + "sha256:ded0fc7d90fe93ae0b18059930086c51e640cdd3baebdc783a695c77f123dcd9", + "sha256:e3e0210287329272539eea617830a6a28161fbbd8a3271bf4150ae3e58c5d0e6", + "sha256:e6fa2e3e683f34aea77de8112f6483803c96a44fd726d7358b9888ae5bb394ec", + "sha256:ea0eb6af8a17fa272f7b98d7bebfab7836a0d62738e16ba380f440fceca2d951", + "sha256:ea7f69de383cb47522c9c208aec6dd17697db7875a4674c4af3f8cfdac0bdeae", + "sha256:eac5174677da084abf378739dbf4ad245661635f1600edd1221f150b165343f4", + "sha256:fc4f7a173a5609631bb0c42c23d12c49df3966f89f496a51d3eb0ec81f4519d6", + "sha256:fdb5b3e311d4d4b0eb8b3e8b4d1b0a512713ad7e6a68791d0923d1aec433d919" + ], + "markers": "python_version >= '3.7'", + "version": "==26.2.0" + }, + "referencing": { + "hashes": [ + "sha256:25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c", + "sha256:eda6d3234d62814d1c64e305c1331c9a3a6132da475ab6382eaa997b21ee75de" + ], + "markers": "python_version >= '3.8'", + "version": "==0.35.1" + }, + "requests": { + "hashes": [ + "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", + "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6" + ], + "markers": "python_version >= '3.8'", + "version": "==2.32.3" + }, + "rfc3339-validator": { + "hashes": [ + "sha256:138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b", + "sha256:24f6ec1eda14ef823da9e36ec7113124b39c04d50a4d3d3a3c2859577e7791fa" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==0.1.4" + }, + "rfc3986-validator": { + "hashes": [ + "sha256:2f235c432ef459970b4306369336b9d5dbdda31b510ca1e327636e01f528bfa9", + "sha256:3d44bde7921b3b9ec3ae4e3adca370438eccebc676456449b145d533b240d055" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==0.1.1" + }, + "rpds-py": { + "hashes": [ + "sha256:06db23d43f26478303e954c34c75182356ca9aa7797d22c5345b16871ab9c45c", + "sha256:0e13e6952ef264c40587d510ad676a988df19adea20444c2b295e536457bc585", + "sha256:11ef6ce74616342888b69878d45e9f779b95d4bd48b382a229fe624a409b72c5", + "sha256:1259c7b3705ac0a0bd38197565a5d603218591d3f6cee6e614e380b6ba61c6f6", + "sha256:18d7585c463087bddcfa74c2ba267339f14f2515158ac4db30b1f9cbdb62c8ef", + "sha256:1e0f80b739e5a8f54837be5d5c924483996b603d5502bfff79bf33da06164ee2", + "sha256:1e5f3cd7397c8f86c8cc72d5a791071431c108edd79872cdd96e00abd8497d29", + "sha256:220002c1b846db9afd83371d08d239fdc865e8f8c5795bbaec20916a76db3318", + "sha256:22e6c9976e38f4d8c4a63bd8a8edac5307dffd3ee7e6026d97f3cc3a2dc02a0b", + "sha256:238a2d5b1cad28cdc6ed15faf93a998336eb041c4e440dd7f902528b8891b399", + "sha256:2580b0c34583b85efec8c5c5ec9edf2dfe817330cc882ee972ae650e7b5ef739", + "sha256:28527c685f237c05445efec62426d285e47a58fb05ba0090a4340b73ecda6dee", + "sha256:2cf126d33a91ee6eedc7f3197b53e87a2acdac63602c0f03a02dd69e4b138174", + "sha256:338ca4539aad4ce70a656e5187a3a31c5204f261aef9f6ab50e50bcdffaf050a", + "sha256:39ed0d010457a78f54090fafb5d108501b5aa5604cc22408fc1c0c77eac14344", + "sha256:3ad0fda1635f8439cde85c700f964b23ed5fc2d28016b32b9ee5fe30da5c84e2", + "sha256:3d2b1ad682a3dfda2a4e8ad8572f3100f95fad98cb99faf37ff0ddfe9cbf9d03", + "sha256:3d61339e9f84a3f0767b1995adfb171a0d00a1185192718a17af6e124728e0f5", + "sha256:3fde368e9140312b6e8b6c09fb9f8c8c2f00999d1823403ae90cc00480221b22", + "sha256:40ce74fc86ee4645d0a225498d091d8bc61f39b709ebef8204cb8b5a464d3c0e", + "sha256:49a8063ea4296b3a7e81a5dfb8f7b2d73f0b1c20c2af401fb0cdf22e14711a96", + "sha256:4a1f1d51eccb7e6c32ae89243cb352389228ea62f89cd80823ea7dd1b98e0b91", + "sha256:4b16aa0107ecb512b568244ef461f27697164d9a68d8b35090e9b0c1c8b27752", + "sha256:4f1ed4749a08379555cebf4650453f14452eaa9c43d0a95c49db50c18b7da075", + "sha256:4fe84294c7019456e56d93e8ababdad5a329cd25975be749c3f5f558abb48253", + "sha256:50eccbf054e62a7b2209b28dc7a22d6254860209d6753e6b78cfaeb0075d7bee", + "sha256:514b3293b64187172bc77c8fb0cdae26981618021053b30d8371c3a902d4d5ad", + "sha256:54b43a2b07db18314669092bb2de584524d1ef414588780261e31e85846c26a5", + "sha256:55fea87029cded5df854ca7e192ec7bdb7ecd1d9a3f63d5c4eb09148acf4a7ce", + "sha256:569b3ea770c2717b730b61998b6c54996adee3cef69fc28d444f3e7920313cf7", + "sha256:56e27147a5a4c2c21633ff8475d185734c0e4befd1c989b5b95a5d0db699b21b", + "sha256:57eb94a8c16ab08fef6404301c38318e2c5a32216bf5de453e2714c964c125c8", + "sha256:5a35df9f5548fd79cb2f52d27182108c3e6641a4feb0f39067911bf2adaa3e57", + "sha256:5a8c94dad2e45324fc74dce25e1645d4d14df9a4e54a30fa0ae8bad9a63928e3", + "sha256:5b4f105deeffa28bbcdff6c49b34e74903139afa690e35d2d9e3c2c2fba18cec", + "sha256:5c1dc0f53856b9cc9a0ccca0a7cc61d3d20a7088201c0937f3f4048c1718a209", + "sha256:614fdafe9f5f19c63ea02817fa4861c606a59a604a77c8cdef5aa01d28b97921", + "sha256:617c7357272c67696fd052811e352ac54ed1d9b49ab370261a80d3b6ce385045", + "sha256:65794e4048ee837494aea3c21a28ad5fc080994dfba5b036cf84de37f7ad5074", + "sha256:6632f2d04f15d1bd6fe0eedd3b86d9061b836ddca4c03d5cf5c7e9e6b7c14580", + "sha256:6c8ef2ebf76df43f5750b46851ed1cdf8f109d7787ca40035fe19fbdc1acc5a7", + "sha256:758406267907b3781beee0f0edfe4a179fbd97c0be2e9b1154d7f0a1279cf8e5", + "sha256:7e60cb630f674a31f0368ed32b2a6b4331b8350d67de53c0359992444b116dd3", + "sha256:89c19a494bf3ad08c1da49445cc5d13d8fefc265f48ee7e7556839acdacf69d0", + "sha256:8a86a9b96070674fc88b6f9f71a97d2c1d3e5165574615d1f9168ecba4cecb24", + "sha256:8bc7690f7caee50b04a79bf017a8d020c1f48c2a1077ffe172abec59870f1139", + "sha256:8d7919548df3f25374a1f5d01fbcd38dacab338ef5f33e044744b5c36729c8db", + "sha256:9426133526f69fcaba6e42146b4e12d6bc6c839b8b555097020e2b78ce908dcc", + "sha256:9824fb430c9cf9af743cf7aaf6707bf14323fb51ee74425c380f4c846ea70789", + "sha256:9bb4a0d90fdb03437c109a17eade42dfbf6190408f29b2744114d11586611d6f", + "sha256:9bc2d153989e3216b0559251b0c260cfd168ec78b1fac33dd485750a228db5a2", + "sha256:9d35cef91e59ebbeaa45214861874bc6f19eb35de96db73e467a8358d701a96c", + "sha256:a1862d2d7ce1674cffa6d186d53ca95c6e17ed2b06b3f4c476173565c862d232", + "sha256:a84ab91cbe7aab97f7446652d0ed37d35b68a465aeef8fc41932a9d7eee2c1a6", + "sha256:aa7f429242aae2947246587d2964fad750b79e8c233a2367f71b554e9447949c", + "sha256:aa9a0521aeca7d4941499a73ad7d4f8ffa3d1affc50b9ea11d992cd7eff18a29", + "sha256:ac2f4f7a98934c2ed6505aead07b979e6f999389f16b714448fb39bbaa86a489", + "sha256:ae94bd0b2f02c28e199e9bc51485d0c5601f58780636185660f86bf80c89af94", + "sha256:af0fc424a5842a11e28956e69395fbbeab2c97c42253169d87e90aac2886d751", + "sha256:b2a5db5397d82fa847e4c624b0c98fe59d2d9b7cf0ce6de09e4d2e80f8f5b3f2", + "sha256:b4c29cbbba378759ac5786730d1c3cb4ec6f8ababf5c42a9ce303dc4b3d08cda", + "sha256:b74b25f024b421d5859d156750ea9a65651793d51b76a2e9238c05c9d5f203a9", + "sha256:b7f19250ceef892adf27f0399b9e5afad019288e9be756d6919cb58892129f51", + "sha256:b80d4a7900cf6b66bb9cee5c352b2d708e29e5a37fe9bf784fa97fc11504bf6c", + "sha256:b8c00a3b1e70c1d3891f0db1b05292747f0dbcfb49c43f9244d04c70fbc40eb8", + "sha256:bb273176be34a746bdac0b0d7e4e2c467323d13640b736c4c477881a3220a989", + "sha256:c3c20f0ddeb6e29126d45f89206b8291352b8c5b44384e78a6499d68b52ae511", + "sha256:c3e130fd0ec56cb76eb49ef52faead8ff09d13f4527e9b0c400307ff72b408e1", + "sha256:c52d3f2f82b763a24ef52f5d24358553e8403ce05f893b5347098014f2d9eff2", + "sha256:c6377e647bbfd0a0b159fe557f2c6c602c159fc752fa316572f012fc0bf67150", + "sha256:c638144ce971df84650d3ed0096e2ae7af8e62ecbbb7b201c8935c370df00a2c", + "sha256:ce9845054c13696f7af7f2b353e6b4f676dab1b4b215d7fe5e05c6f8bb06f965", + "sha256:cf258ede5bc22a45c8e726b29835b9303c285ab46fc7c3a4cc770736b5304c9f", + "sha256:d0a26ffe9d4dd35e4dfdd1e71f46401cff0181c75ac174711ccff0459135fa58", + "sha256:d0b67d87bb45ed1cd020e8fbf2307d449b68abc45402fe1a4ac9e46c3c8b192b", + "sha256:d20277fd62e1b992a50c43f13fbe13277a31f8c9f70d59759c88f644d66c619f", + "sha256:d454b8749b4bd70dd0a79f428731ee263fa6995f83ccb8bada706e8d1d3ff89d", + "sha256:d4c7d1a051eeb39f5c9547e82ea27cbcc28338482242e3e0b7768033cb083821", + "sha256:d72278a30111e5b5525c1dd96120d9e958464316f55adb030433ea905866f4de", + "sha256:d72a210824facfdaf8768cf2d7ca25a042c30320b3020de2fa04640920d4e121", + "sha256:d807dc2051abe041b6649681dce568f8e10668e3c1c6543ebae58f2d7e617855", + "sha256:dbe982f38565bb50cb7fb061ebf762c2f254ca3d8c20d4006878766e84266272", + "sha256:dcedf0b42bcb4cfff4101d7771a10532415a6106062f005ab97d1d0ab5681c60", + "sha256:deb62214c42a261cb3eb04d474f7155279c1a8a8c30ac89b7dcb1721d92c3c02", + "sha256:def7400461c3a3f26e49078302e1c1b38f6752342c77e3cf72ce91ca69fb1bc1", + "sha256:df3de6b7726b52966edf29663e57306b23ef775faf0ac01a3e9f4012a24a4140", + "sha256:e1940dae14e715e2e02dfd5b0f64a52e8374a517a1e531ad9412319dc3ac7879", + "sha256:e4df1e3b3bec320790f699890d41c59d250f6beda159ea3c44c3f5bac1976940", + "sha256:e6900ecdd50ce0facf703f7a00df12374b74bbc8ad9fe0f6559947fb20f82364", + "sha256:ea438162a9fcbee3ecf36c23e6c68237479f89f962f82dae83dc15feeceb37e4", + "sha256:eb851b7df9dda52dc1415ebee12362047ce771fc36914586b2e9fcbd7d293b3e", + "sha256:ec31a99ca63bf3cd7f1a5ac9fe95c5e2d060d3c768a09bc1d16e235840861420", + "sha256:f0475242f447cc6cb8a9dd486d68b2ef7fbee84427124c232bff5f63b1fe11e5", + "sha256:f2fbf7db2012d4876fb0d66b5b9ba6591197b0f165db8d99371d976546472a24", + "sha256:f60012a73aa396be721558caa3a6fd49b3dd0033d1675c6d59c4502e870fcf0c", + "sha256:f8e604fe73ba048c06085beaf51147eaec7df856824bfe7b98657cf436623daf", + "sha256:f90a4cd061914a60bd51c68bcb4357086991bd0bb93d8aa66a6da7701370708f", + "sha256:f918a1a130a6dfe1d7fe0f105064141342e7dd1611f2e6a21cd2f5c8cb1cfb3e", + "sha256:fa518bcd7600c584bf42e6617ee8132869e877db2f76bcdc281ec6a4113a53ab", + "sha256:faefcc78f53a88f3076b7f8be0a8f8d35133a3ecf7f3770895c25f8813460f08", + "sha256:fcaeb7b57f1a1e071ebd748984359fef83ecb026325b9d4ca847c95bc7311c92", + "sha256:fd2d84f40633bc475ef2d5490b9c19543fbf18596dcb1b291e3a12ea5d722f7a", + "sha256:fdfc3a892927458d98f3d55428ae46b921d1f7543b89382fdb483f5640daaec8" + ], + "markers": "python_version >= '3.8'", + "version": "==0.20.0" + }, + "send2trash": { + "hashes": [ + "sha256:0c31227e0bd08961c7665474a3d1ef7193929fedda4233843689baa056be46c9", + "sha256:b18e7a3966d99871aefeb00cfbcfdced55ce4871194810fc71f4aa484b953abf" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", + "version": "==1.8.3" + }, + "setuptools": { + "hashes": [ + "sha256:0274581a0037b638b9fc1c6883cc71c0210865aaa76073f7882376b641b84e8f", + "sha256:a85e96b8be2b906f3e3e789adec6a9323abf79758ecfa3065bd740d81158b11e" + ], + "markers": "python_version >= '3.8'", + "version": "==74.0.0" + }, + "six": { + "hashes": [ + "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", + "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.16.0" + }, + "sniffio": { + "hashes": [ + "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", + "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + ], + "markers": "python_version >= '3.7'", + "version": "==1.3.1" + }, + "soupsieve": { + "hashes": [ + "sha256:e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb", + "sha256:e72c4ff06e4fb6e4b5a9f0f55fe6e81514581fca1515028625d0f299c602ccc9" + ], + "markers": "python_version >= '3.8'", + "version": "==2.6" + }, + "stack-data": { + "hashes": [ + "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", + "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695" + ], + "version": "==0.6.3" + }, + "terminado": { + "hashes": [ + "sha256:a4468e1b37bb318f8a86514f65814e1afc977cf29b3992a4500d9dd305dcceb0", + "sha256:de09f2c4b85de4765f7714688fff57d3e75bad1f909b589fde880460c753fd2e" + ], + "markers": "python_version >= '3.8'", + "version": "==0.18.1" + }, + "tinycss2": { + "hashes": [ + "sha256:152f9acabd296a8375fbca5b84c961ff95971fcfc32e79550c8df8e29118c54d", + "sha256:54a8dbdffb334d536851be0226030e9505965bb2f30f21a4a82c55fb2a80fae7" + ], + "markers": "python_version >= '3.8'", + "version": "==1.3.0" + }, + "tornado": { + "hashes": [ + "sha256:163b0aafc8e23d8cdc3c9dfb24c5368af84a81e3364745ccb4427669bf84aec8", + "sha256:25486eb223babe3eed4b8aecbac33b37e3dd6d776bc730ca14e1bf93888b979f", + "sha256:454db8a7ecfcf2ff6042dde58404164d969b6f5d58b926da15e6b23817950fc4", + "sha256:613bf4ddf5c7a95509218b149b555621497a6cc0d46ac341b30bd9ec19eac7f3", + "sha256:6d5ce3437e18a2b66fbadb183c1d3364fb03f2be71299e7d10dbeeb69f4b2a14", + "sha256:8ae50a504a740365267b2a8d1a90c9fbc86b780a39170feca9bcc1787ff80842", + "sha256:92d3ab53183d8c50f8204a51e6f91d18a15d5ef261e84d452800d4ff6fc504e9", + "sha256:a02a08cc7a9314b006f653ce40483b9b3c12cda222d6a46d4ac63bb6c9057698", + "sha256:b24b8982ed444378d7f21d563f4180a2de31ced9d8d84443907a0a64da2072e7", + "sha256:d9a566c40b89757c9aa8e6f032bcdb8ca8795d7c1a9762910c722b1635c9de4d", + "sha256:e2e20b9113cd7293f164dc46fffb13535266e713cdb87bd2d15ddb336e96cfc4" + ], + "markers": "python_version >= '3.8'", + "version": "==6.4.1" + }, + "traitlets": { + "hashes": [ + "sha256:9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7", + "sha256:b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f" + ], + "markers": "python_version >= '3.8'", + "version": "==5.14.3" + }, + "types-python-dateutil": { + "hashes": [ + "sha256:9649d1dcb6fef1046fb18bebe9ea2aa0028b160918518c34589a46045f6ebd98", + "sha256:f5889fcb4e63ed4aaa379b44f93c32593d50b9a94c9a60a0c854d8cc3511cd57" + ], + "markers": "python_version >= '3.8'", + "version": "==2.9.0.20240821" + }, + "typing-extensions": { + "hashes": [ + "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + ], + "markers": "python_version >= '3.8'", + "version": "==4.12.2" + }, + "tzdata": { + "hashes": [ + "sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd", + "sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252" + ], + "markers": "python_version >= '2'", + "version": "==2024.1" + }, + "uri-template": { + "hashes": [ + "sha256:0e00f8eb65e18c7de20d595a14336e9f337ead580c70934141624b6d1ffdacc7", + "sha256:a44a133ea12d44a0c0f06d7d42a52d71282e77e2f937d8abd5655b8d56fc1363" + ], + "version": "==1.3.0" + }, + "urllib3": { + "hashes": [ + "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472", + "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168" + ], + "markers": "python_version >= '3.8'", + "version": "==2.2.2" + }, + "wcwidth": { + "hashes": [ + "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859", + "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + ], + "version": "==0.2.13" + }, + "webcolors": { + "hashes": [ + "sha256:08b07af286a01bcd30d583a7acadf629583d1f79bfef27dd2c2c5c263817277d", + "sha256:fc4c3b59358ada164552084a8ebee637c221e4059267d0f8325b3b560f6c7f0a" + ], + "version": "==24.8.0" + }, + "webencodings": { + "hashes": [ + "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78", + "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + ], + "version": "==0.5.1" + }, + "websocket-client": { + "hashes": [ + "sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526", + "sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da" + ], + "markers": "python_version >= '3.8'", + "version": "==1.8.0" + }, + "widgetsnbextension": { + "hashes": [ + "sha256:74b2692e8500525cc38c2b877236ba51d34541e6385eeed5aec15a70f88a6c71", + "sha256:ffcb67bc9febd10234a362795f643927f4e0c05d9342c727b65d2384f8feacb6" + ], + "markers": "python_version >= '3.7'", + "version": "==4.0.13" + } + }, + "develop": { + "anyio": { + "hashes": [ + "sha256:5aadc6a1bbb7cdb0bede386cac5e2940f5e2ff3aa20277e991cf028e0585ce94", + "sha256:c1b2d8f46a8a812513012e1107cb0e68c17159a7a594208005a57dc776e1bdc7" + ], + "markers": "python_version >= '3.8'", + "version": "==4.4.0" + }, + "black": { + "hashes": [ + "sha256:0808494f2b2df923ffc5723ed3c7b096bd76341f6213989759287611e9837d50", + "sha256:1fa88a0f74e50e4487477bc0bb900c6781dbddfdfa32691e780bf854c3b4a47f", + "sha256:25e57fd232a6d6ff3f4478a6fd0580838e47c93c83eaf1ccc92d4faf27112c4e", + "sha256:2d9e13db441c509a3763a7a3d9a49ccc1b4e974a47be4e08ade2a228876500ec", + "sha256:3e1b38b3135fd4c025c28c55ddfc236b05af657828a8a6abe5deec419a0b7055", + "sha256:3fa4be75ef2a6b96ea8d92b1587dd8cb3a35c7e3d51f0738ced0781c3aa3a5a3", + "sha256:4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5", + "sha256:4f0031eaa7b921db76decd73636ef3a12c942ed367d8c3841a0739412b260a54", + "sha256:602cfb1196dc692424c70b6507593a2b29aac0547c1be9a1d1365f0d964c353b", + "sha256:6d1bd9c210f8b109b1762ec9fd36592fdd528485aadb3f5849b2740ef17e674e", + "sha256:78baad24af0f033958cad29731e27363183e140962595def56423e626f4bee3e", + "sha256:8d4df77958a622f9b5a4c96edb4b8c0034f8434032ab11077ec6c56ae9f384ba", + "sha256:97e56155c6b737854e60a9ab1c598ff2533d57e7506d97af5481141671abf3ea", + "sha256:9c4352800f14be5b4864016882cdba10755bd50805c95f728011bcb47a4afd59", + "sha256:a4d6a9668e45ad99d2f8ec70d5c8c04ef4f32f648ef39048d010b0689832ec6d", + "sha256:a920b569dc6b3472513ba6ddea21f440d4b4c699494d2e972a1753cdc25df7b0", + "sha256:ae76c22bde5cbb6bfd211ec343ded2163bba7883c7bc77f6b756a1049436fbb9", + "sha256:b18fb2ae6c4bb63eebe5be6bd869ba2f14fd0259bda7d18a46b764d8fb86298a", + "sha256:c04b6d9d20e9c13f43eee8ea87d44156b8505ca8a3c878773f68b4e4812a421e", + "sha256:c88b3711d12905b74206227109272673edce0cb29f27e1385f33b0163c414bba", + "sha256:dd15245c8b68fe2b6bd0f32c1556509d11bb33aec9b5d0866dd8e2ed3dba09c2", + "sha256:e0aaf6041986767a5e0ce663c7a2f0e9eaf21e6ff87a5f95cbf3675bfd4c41d2" + ], + "index": "pypi", + "markers": "python_version >= '3.8'", + "version": "==23.12.1" + }, + "certifi": { + "hashes": [ + "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b", + "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90" + ], + "markers": "python_version >= '3.6'", + "version": "==2024.7.4" + }, + "charset-normalizer": { + "hashes": [ + "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", + "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", + "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", + "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", + "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", + "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", + "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", + "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", + "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", + "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", + "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", + "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", + "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", + "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", + "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", + "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", + "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", + "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", + "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", + "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", + "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", + "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", + "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", + "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", + "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", + "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", + "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", + "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", + "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", + "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", + "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", + "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", + "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", + "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", + "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", + "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", + "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", + "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", + "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", + "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", + "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", + "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", + "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", + "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", + "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", + "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", + "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", + "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", + "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", + "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", + "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", + "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", + "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", + "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", + "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", + "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", + "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", + "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", + "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", + "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", + "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", + "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", + "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", + "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", + "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", + "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", + "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", + "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", + "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", + "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", + "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", + "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", + "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", + "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", + "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", + "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", + "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", + "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", + "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", + "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", + "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", + "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", + "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", + "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", + "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", + "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", + "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", + "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", + "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", + "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" + ], + "markers": "python_full_version >= '3.7.0'", + "version": "==3.3.2" + }, + "click": { + "hashes": [ + "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", + "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + ], + "markers": "python_version >= '3.7'", + "version": "==8.1.7" + }, + "databind": { + "hashes": [ + "sha256:0a8aa0ff130a0306581c559388f5ef65e0fae7ef4b86412eacb1f4a0420006c4", + "sha256:b9c3a03c0414aa4567f095d7218ac904bd2b267b58e3763dac28e83d64b69770" + ], + "markers": "python_full_version >= '3.8.0' and python_full_version < '4.0.0'", + "version": "==4.5.2" + }, + "databind.core": { + "hashes": [ + "sha256:a1dd1c6bd8ca9907d1292d8df9ec763ce91543e27f7eda4268e4a1a84fcd1c42", + "sha256:b8ac8127bc5d6b239a2a81aeddb268b0c4cadd53fbce7e8b2c7a9ef6413bccb3" + ], + "markers": "python_full_version >= '3.8.0' and python_full_version < '4.0.0'", + "version": "==4.5.2" + }, + "databind.json": { + "hashes": [ + "sha256:6cc9b5c6fddaebd49b2433932948eb3be8a41633b90aa37998d7922504b8f165", + "sha256:a803bf440634685984361cb2a5a975887e487c854ed48d81ff7aaf3a1ed1e94c" + ], + "markers": "python_full_version >= '3.8.0' and python_full_version < '4.0.0'", + "version": "==4.5.2" + }, + "deprecated": { + "hashes": [ + "sha256:6fac8b097794a90302bdbb17b9b815e732d3c4720583ff1b198499d78470466c", + "sha256:e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.2.14" + }, + "docspec": { + "hashes": [ + "sha256:4854e77edc0e2de40e785e57e95880f7095a05fe978f8b54cef7a269586e15ff", + "sha256:7538f750095a9688c6980ff9a4e029a823a500f64bd00b6b4bdb27951feb31cb" + ], + "markers": "python_version >= '3.7' and python_version < '4.0'", + "version": "==2.2.1" + }, + "docspec-python": { + "hashes": [ + "sha256:76ac41d35a8face35b2d766c2e8a416fb8832359785d396f0d53bcb00f178e54", + "sha256:c41b850b4d6f4de30999ea6f82c9cdb9183d9bcba45559ee9173d3dab7281559" + ], + "markers": "python_version >= '3.7' and python_version < '4.0'", + "version": "==2.2.1" + }, + "docstring-parser": { + "hashes": [ + "sha256:93b3f8f481c7d24e37c5d9f30293c89e2933fa209421c8abd731dd3ef0715ecb" + ], + "markers": "python_version >= '3.6'", + "version": "==0.11" + }, + "idna": { + "hashes": [ + "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac", + "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603" + ], + "markers": "python_version >= '3.6'", + "version": "==3.8" + }, + "importlib-metadata": { + "hashes": [ + "sha256:66f342cc6ac9818fc6ff340576acd24d65ba0b3efabb2b4ac08b598965a4a2f1", + "sha256:9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5" + ], + "markers": "python_version >= '3.8'", + "version": "==8.4.0" + }, + "isort": { + "hashes": [ + "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109", + "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6" + ], + "index": "pypi", + "markers": "python_full_version >= '3.8.0'", + "version": "==5.13.2" + }, + "jinja2": { + "hashes": [ + "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369", + "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d" + ], + "markers": "python_version >= '3.7'", + "version": "==3.1.4" + }, + "loguru": { + "hashes": [ + "sha256:003d71e3d3ed35f0f8984898359d65b79e5b21943f78af86aa5491210429b8eb", + "sha256:e671a53522515f34fd406340ee968cb9ecafbc4b36c679da03c18fd8d0bd51ac" + ], + "index": "pypi", + "markers": "python_version >= '3.5'", + "version": "==0.7.2" + }, + "markupsafe": { + "hashes": [ + "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf", + "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff", + "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f", + "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3", + "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532", + "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f", + "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617", + "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df", + "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4", + "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906", + "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f", + "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4", + "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8", + "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371", + "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2", + "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465", + "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52", + "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6", + "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169", + "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad", + "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2", + "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0", + "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029", + "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f", + "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a", + "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced", + "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5", + "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c", + "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf", + "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9", + "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb", + "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad", + "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3", + "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1", + "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46", + "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc", + "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a", + "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee", + "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900", + "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5", + "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea", + "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f", + "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5", + "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e", + "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a", + "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f", + "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50", + "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a", + "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b", + "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4", + "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff", + "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2", + "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46", + "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b", + "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf", + "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5", + "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5", + "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab", + "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd", + "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68" + ], + "markers": "python_version >= '3.7'", + "version": "==2.1.5" + }, + "mypy-extensions": { + "hashes": [ + "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", + "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" + ], + "markers": "python_version >= '3.5'", + "version": "==1.0.0" + }, + "nr-date": { + "hashes": [ + "sha256:0643aea13bcdc2a8bc56af9d5e6a89ef244c9744a1ef00cdc735902ba7f7d2e6", + "sha256:bd672a9dfbdcf7c4b9289fea6750c42490eaee08036a72059dcc78cb236ed568" + ], + "markers": "python_version >= '3.6' and python_version < '4.0'", + "version": "==2.1.0" + }, + "nr-stream": { + "hashes": [ + "sha256:47e12150b331ad2cb729cfd9d2abd281c9949809729ba461c6aa87dd9927b2d4", + "sha256:eb0216c6bfc61a46d4568dba3b588502c610ec8ddef4ac98f3932a2bd7264f65" + ], + "markers": "python_version >= '3.6' and python_version < '4.0'", + "version": "==1.1.5" + }, + "nr.util": { + "hashes": [ + "sha256:91da02ac9795eb8e015372275c1efe54bac9051231ee9b0e7e6f96b0b4e7d2bb", + "sha256:a4549c2033d99d2f0379b3f3d233fd2a8ade286bbf0b3ad0cc7cea16022214f4" + ], + "markers": "python_version >= '3.7' and python_version < '4.0'", + "version": "==0.8.12" + }, + "numpy": { + "hashes": [ + "sha256:08801848a40aea24ce16c2ecde3b756f9ad756586fb2d13210939eb69b023f5b", + "sha256:0937e54c09f7a9a68da6889362ddd2ff584c02d015ec92672c099b61555f8911", + "sha256:0ab32eb9170bf8ffcbb14f11613f4a0b108d3ffee0832457c5d4808233ba8977", + "sha256:0abb3916a35d9090088a748636b2c06dc9a6542f99cd476979fb156a18192b84", + "sha256:0af3a5987f59d9c529c022c8c2a64805b339b7ef506509fba7d0556649b9714b", + "sha256:10e2350aea18d04832319aac0f887d5fcec1b36abd485d14f173e3e900b83e33", + "sha256:15ef8b2177eeb7e37dd5ef4016f30b7659c57c2c0b57a779f1d537ff33a72c7b", + "sha256:1f817c71683fd1bb5cff1529a1d085a57f02ccd2ebc5cd2c566f9a01118e3b7d", + "sha256:24003ba8ff22ea29a8c306e61d316ac74111cebf942afbf692df65509a05f111", + "sha256:30014b234f07b5fec20f4146f69e13cfb1e33ee9a18a1879a0142fbb00d47673", + "sha256:343e3e152bf5a087511cd325e3b7ecfd5b92d369e80e74c12cd87826e263ec06", + "sha256:378cb4f24c7d93066ee4103204f73ed046eb88f9ad5bb2275bb9fa0f6a02bd36", + "sha256:398049e237d1aae53d82a416dade04defed1a47f87d18d5bd615b6e7d7e41d1f", + "sha256:3a3336fbfa0d38d3deacd3fe7f3d07e13597f29c13abf4d15c3b6dc2291cbbdd", + "sha256:442596f01913656d579309edcd179a2a2f9977d9a14ff41d042475280fc7f34e", + "sha256:44e44973262dc3ae79e9063a1284a73e09d01b894b534a769732ccd46c28cc62", + "sha256:54139e0eb219f52f60656d163cbe67c31ede51d13236c950145473504fa208cb", + "sha256:5474dad8c86ee9ba9bb776f4b99ef2d41b3b8f4e0d199d4f7304728ed34d0300", + "sha256:54c6a63e9d81efe64bfb7bcb0ec64332a87d0b87575f6009c8ba67ea6374770b", + "sha256:624884b572dff8ca8f60fab591413f077471de64e376b17d291b19f56504b2bb", + "sha256:6326ab99b52fafdcdeccf602d6286191a79fe2fda0ae90573c5814cd2b0bc1b8", + "sha256:652e92fc409e278abdd61e9505649e3938f6d04ce7ef1953f2ec598a50e7c195", + "sha256:6c1de77ded79fef664d5098a66810d4d27ca0224e9051906e634b3f7ead134c2", + "sha256:76368c788ccb4f4782cf9c842b316140142b4cbf22ff8db82724e82fe1205dce", + "sha256:7a894c51fd8c4e834f00ac742abad73fc485df1062f1b875661a3c1e1fb1c2f6", + "sha256:7dc90da0081f7e1da49ec4e398ede6a8e9cc4f5ebe5f9e06b443ed889ee9aaa2", + "sha256:848c6b5cad9898e4b9ef251b6f934fa34630371f2e916261070a4eb9092ffd33", + "sha256:899da829b362ade41e1e7eccad2cf274035e1cb36ba73034946fccd4afd8606b", + "sha256:8ab81ccd753859ab89e67199b9da62c543850f819993761c1e94a75a814ed667", + "sha256:8fb49a0ba4d8f41198ae2d52118b050fd34dace4b8f3fb0ee34e23eb4ae775b1", + "sha256:9156ca1f79fc4acc226696e95bfcc2b486f165a6a59ebe22b2c1f82ab190384a", + "sha256:9523f8b46485db6939bd069b28b642fec86c30909cea90ef550373787f79530e", + "sha256:a0756a179afa766ad7cb6f036de622e8a8f16ffdd55aa31f296c870b5679d745", + "sha256:a0cdef204199278f5c461a0bed6ed2e052998276e6d8ab2963d5b5c39a0500bc", + "sha256:ab83adc099ec62e044b1fbb3a05499fa1e99f6d53a1dde102b2d85eff66ed324", + "sha256:b34fa5e3b5d6dc7e0a4243fa0f81367027cb6f4a7215a17852979634b5544ee0", + "sha256:b47c551c6724960479cefd7353656498b86e7232429e3a41ab83be4da1b109e8", + "sha256:c4cd94dfefbefec3f8b544f61286584292d740e6e9d4677769bc76b8f41deb02", + "sha256:c4f982715e65036c34897eb598d64aef15150c447be2cfc6643ec7a11af06574", + "sha256:d8f699a709120b220dfe173f79c73cb2a2cab2c0b88dd59d7b49407d032b8ebd", + "sha256:dd94ce596bda40a9618324547cfaaf6650b1a24f5390350142499aa4e34e53d1", + "sha256:de844aaa4815b78f6023832590d77da0e3b6805c644c33ce94a1e449f16d6ab5", + "sha256:e5f0642cdf4636198a4990de7a71b693d824c56a757862230454629cf62e323d", + "sha256:f07fa2f15dabe91259828ce7d71b5ca9e2eb7c8c26baa822c825ce43552f4883", + "sha256:f15976718c004466406342789f31b6673776360f3b1e3c575f25302d7e789575", + "sha256:f358ea9e47eb3c2d6eba121ab512dfff38a88db719c38d1e67349af210bc7529", + "sha256:f505264735ee074250a9c78247ee8618292091d9d1fcc023290e9ac67e8f1afa", + "sha256:f5ebbf9fbdabed208d4ecd2e1dfd2c0741af2f876e7ae522c2537d404ca895c3", + "sha256:f6b26e6c3b98adb648243670fddc8cab6ae17473f9dc58c51574af3e64d61211", + "sha256:f8e93a01a35be08d31ae33021e5268f157a2d60ebd643cfc15de6ab8e4722eb1", + "sha256:fe76d75b345dc045acdbc006adcb197cc680754afd6c259de60d358d60c93736", + "sha256:ffbd6faeb190aaf2b5e9024bac9622d2ee549b7ec89ef3a9373fa35313d44e0e" + ], + "markers": "python_version == '3.11'", + "version": "==2.1.0" + }, + "packaging": { + "hashes": [ + "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002", + "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124" + ], + "markers": "python_version >= '3.8'", + "version": "==24.1" + }, + "pathlib": { + "hashes": [ + "sha256:6940718dfc3eff4258203ad5021090933e5c04707d5ca8cc9e73c94a7894ea9f", + "sha256:f35f95ab8b0f59e6d354090350b44a80a80635d22efdedfa84c7ad1cf0a74147" + ], + "index": "pypi", + "version": "==1.0.1" + }, + "pathspec": { + "hashes": [ + "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", + "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + ], + "markers": "python_version >= '3.8'", + "version": "==0.12.1" + }, + "platformdirs": { + "hashes": [ + "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee", + "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3" + ], + "markers": "python_version >= '3.8'", + "version": "==4.2.2" + }, + "pydoc-markdown": { + "hashes": [ + "sha256:203f74119e6bb2f9deba43d452422de7c8ec31955b61e0620fa4dd8c2611715f", + "sha256:fb6c927e31386de17472d42f9bd3d3be2905977d026f6216881c65145aa67f0b" + ], + "index": "pypi", + "markers": "python_version >= '3.7' and python_version < '4.0'", + "version": "==4.8.2" + }, + "pyyaml": { + "hashes": [ + "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff", + "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48", + "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086", + "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e", + "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133", + "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5", + "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484", + "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee", + "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5", + "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68", + "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a", + "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf", + "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99", + "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8", + "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85", + "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19", + "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc", + "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a", + "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1", + "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317", + "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c", + "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631", + "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d", + "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652", + "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5", + "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e", + "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b", + "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8", + "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476", + "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706", + "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563", + "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237", + "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b", + "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083", + "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180", + "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425", + "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e", + "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f", + "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725", + "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183", + "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab", + "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774", + "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725", + "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e", + "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5", + "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d", + "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290", + "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44", + "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed", + "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4", + "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba", + "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12", + "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4" + ], + "markers": "python_version >= '3.8'", + "version": "==6.0.2" + }, + "requests": { + "hashes": [ + "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", + "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6" + ], + "markers": "python_version >= '3.8'", + "version": "==2.32.3" + }, + "setuptools": { + "hashes": [ + "sha256:0274581a0037b638b9fc1c6883cc71c0210865aaa76073f7882376b641b84e8f", + "sha256:a85e96b8be2b906f3e3e789adec6a9323abf79758ecfa3065bd740d81158b11e" + ], + "markers": "python_version >= '3.8'", + "version": "==74.0.0" + }, + "sniffio": { + "hashes": [ + "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", + "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + ], + "markers": "python_version >= '3.7'", + "version": "==1.3.1" + }, + "tomli": { + "hashes": [ + "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", + "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f" + ], + "markers": "python_version >= '3.7'", + "version": "==2.0.1" + }, + "tomli-w": { + "hashes": [ + "sha256:9f2a07e8be30a0729e533ec968016807069991ae2fd921a78d42f429ae5f4463", + "sha256:f463434305e0336248cac9c2dc8076b707d8a12d019dd349f5c1e382dd1ae1b9" + ], + "markers": "python_version >= '3.7'", + "version": "==1.0.0" + }, + "typeapi": { + "hashes": [ + "sha256:038062b473dd9bc182966469d7a37d81ba7fa5bb0c01f30b0604b5667b13a47b", + "sha256:61cf8c852c05471522fcf55ec37d0c37f0de6943cc8e4d58529f796881e32c08" + ], + "markers": "python_version >= '3.8' and python_version < '4.0'", + "version": "==2.2.3" + }, + "typing-extensions": { + "hashes": [ + "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + ], + "markers": "python_version >= '3.8'", + "version": "==4.12.2" + }, + "urllib3": { + "hashes": [ + "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472", + "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168" + ], + "markers": "python_version >= '3.8'", + "version": "==2.2.2" + }, + "watchdog": { + "hashes": [ + "sha256:0120b2fa65732797ffa65fa8ee5540c288aa861d91447df298626d6385a24658", + "sha256:01ab36cddc836a0f202c66267daaef92ba5c17c7d6436deff0587bb61234c5c9", + "sha256:0710e9502727f688a7e06d48078545c54485b3d6eb53b171810879d8223c362a", + "sha256:0834c21efa3e767849b09e667274604c7cdfe30b49eb95d794565c53f4db3c1e", + "sha256:109daafc5b0f2a98d1fa9475ff9737eb3559d57b18129a36495e20c71de0b44f", + "sha256:1228cb097e855d1798b550be8f0e9f0cfbac4384f9a3e91f66d250d03e11294e", + "sha256:16c1aa3377bb1f82c5e24277fcbf4e2cac3c4ce46aaaf7212d53caa9076eb7b7", + "sha256:1d17ec7e022c34fa7ddc72aa41bf28c9d1207ffb193df18ba4f6fde453725b3c", + "sha256:1e26f570dd7f5178656affb24d6f0e22ce66c8daf88d4061a27bfb9ac866b40d", + "sha256:22fcad6168fc43cf0e709bd854be5b8edbb0b260f0a6f28f1ea9baa53c6907f7", + "sha256:2aa59fab7ff75281778c649557275ca3085eccbdf825a0e2a5ca3810e977afe5", + "sha256:3c177085c3d210d1c73cb4569442bdaef706ebebc423bd7aed9e90fc12b2e553", + "sha256:3c2d50fdb86aa6df3973313272f5a17eb26eab29ff5a0bf54b6d34597b4dc4e4", + "sha256:4fe6780915000743074236b21b6c37419aea71112af62237881bc265589fe463", + "sha256:663b096368ed7831ac42259919fdb9e0a1f0a8994d972675dfbcca0225e74de1", + "sha256:685931412978d00a91a193d9018fc9e394e565e8e7a0c275512a80e59c6e85f8", + "sha256:6c96b1706430839872a3e33b9370ee3f7a0079f6b828129d88498ad1f96a0f45", + "sha256:6e58eafe9cc5ceebe1562cdb89bacdcd0ef470896e8b0139fe677a5abec243da", + "sha256:78db0fe0336958fc0e1269545c980b6f33d04d184ba191b2800a8b71d3e971a9", + "sha256:7e6b0e9b8a9dc3865d65888b5f5222da4ba9c4e09eab13cff5e305e7b7e7248f", + "sha256:990aedb9e2f336b45a70aed9c014450e7c4a70fd99c5f5b1834d57e1453a177e", + "sha256:b8d747bf6d8fe5ce89cb1a36c3724d1599bd4cde3f90fcba518e6260c7058a52", + "sha256:bc16d448a74a929b896ed9578c25756b2125400b19b3258be8d9a681c7ae8e71", + "sha256:bf3216ec994eabb2212df9861f19056ca0d4cd3516d56cb95801933876519bfe", + "sha256:c2b4d90962639ae7cee371ea3a8da506831945d4418eee090c53bc38e6648dc6", + "sha256:cb59ad83a1700304fc1ac7bc53ae9e5cbe9d60a52ed9bba8e2e2d782a201bb2b", + "sha256:d146331e6b206baa9f6dd40f72b5783ad2302c240df68e7fce196d30588ccf7b", + "sha256:d1acef802916083f2ad7988efc7decf07e46e266916c0a09d8fb9d387288ea12", + "sha256:d76efab5248aafbf8a2c2a63cd7b9545e6b346ad1397af8b862a3bb3140787d8", + "sha256:ff4e957c45c446de34c513eadce01d0b65da7eee47c01dce472dd136124552c9" + ], + "markers": "python_version >= '3.9'", + "version": "==5.0.0" + }, + "watchfiles": { + "hashes": [ + "sha256:02b7ba9d4557149410747353e7325010d48edcfe9d609a85cb450f17fd50dc3d", + "sha256:02ff5d7bd066c6a7673b17c8879cd8ee903078d184802a7ee851449c43521bdd", + "sha256:0e01bcb8d767c58865207a6c2f2792ad763a0fe1119fb0a430f444f5b02a5ea0", + "sha256:0eff099a4df36afaa0eea7a913aa64dcf2cbd4e7a4f319a73012210af4d23810", + "sha256:109a61763e7318d9f821b878589e71229f97366fa6a5c7720687d367f3ab9eef", + "sha256:11698bb2ea5e991d10f1f4f83a39a02f91e44e4bd05f01b5c1ec04c9342bf63c", + "sha256:130a896d53b48a1cecccfa903f37a1d87dbb74295305f865a3e816452f6e49e4", + "sha256:1733b9bc2c8098c6bdb0ff7a3d7cb211753fecb7bd99bdd6df995621ee1a574b", + "sha256:18e2de19801b0eaa4c5292a223effb7cfb43904cb742c5317a0ac686ed604765", + "sha256:1cf7f486169986c4b9d34087f08ce56a35126600b6fef3028f19ca16d5889071", + "sha256:1d636c8aeb28cdd04a4aa89030c4b48f8b2954d8483e5f989774fa441c0ed57b", + "sha256:1db691bad0243aed27c8354b12d60e8e266b75216ae99d33e927ff5238d270b5", + "sha256:1e5f3ca0ff47940ce0a389457b35d6df601c317c1e1a9615981c474452f98de1", + "sha256:1ebaebb53b34690da0936c256c1cdb0914f24fb0e03da76d185806df9328abed", + "sha256:20b423b58f5fdde704a226b598a2d78165fe29eb5621358fe57ea63f16f165c4", + "sha256:2368c5371c17fdcb5a2ea71c5c9d49f9b128821bfee69503cc38eae00feb3220", + "sha256:24655e8c1c9c114005c3868a3d432c8aa595a786b8493500071e6a52f3d09217", + "sha256:2537ef60596511df79b91613a5bb499b63f46f01a11a81b0a2b0dedf645d0a9c", + "sha256:296e0b29ab0276ca59d82d2da22cbbdb39a23eed94cca69aed274595fb3dfe42", + "sha256:2aec5c29915caf08771d2507da3ac08e8de24a50f746eb1ed295584ba1820330", + "sha256:2dddc2487d33e92f8b6222b5fb74ae2cfde5e8e6c44e0248d24ec23befdc5366", + "sha256:37fd826dac84c6441615aa3f04077adcc5cac7194a021c9f0d69af20fb9fa788", + "sha256:3af1b05361e1cc497bf1be654a664750ae61f5739e4bb094a2be86ec8c6db9b6", + "sha256:40cb8fa00028908211eb9f8d47744dca21a4be6766672e1ff3280bee320436f1", + "sha256:46f1d8069a95885ca529645cdbb05aea5837d799965676e1b2b1f95a4206313e", + "sha256:486bda18be5d25ab5d932699ceed918f68eb91f45d018b0343e3502e52866e5e", + "sha256:48a1b05c0afb2cd2f48c1ed2ae5487b116e34b93b13074ed3c22ad5c743109f0", + "sha256:4ccd3011cc7ee2f789af9ebe04745436371d36afe610028921cab9f24bb2987b", + "sha256:4ea756e425ab2dfc8ef2a0cb87af8aa7ef7dfc6fc46c6f89bcf382121d4fff75", + "sha256:524fcb8d59b0dbee2c9b32207084b67b2420f6431ed02c18bd191e6c575f5c48", + "sha256:532e1f2c491274d1333a814e4c5c2e8b92345d41b12dc806cf07aaff786beb66", + "sha256:556347b0abb4224c5ec688fc58214162e92a500323f50182f994f3ad33385dcb", + "sha256:62d2b18cb1edaba311fbbfe83fb5e53a858ba37cacb01e69bc20553bb70911b8", + "sha256:6991e3a78f642368b8b1b669327eb6751439f9f7eaaa625fae67dd6070ecfa0b", + "sha256:6a9265cf87a5b70147bfb2fec14770ed5b11a5bb83353f0eee1c25a81af5abfe", + "sha256:6b1a950ab299a4a78fd6369a97b8763732bfb154fdb433356ec55a5bce9515c1", + "sha256:6bb91fa4d0b392f0f7e27c40981e46dda9eb0fbc84162c7fb478fe115944f491", + "sha256:6c21a5467f35c61eafb4e394303720893066897fca937bade5b4f5877d350ff8", + "sha256:7ca6b71dcc50d320c88fb2d88ecd63924934a8abc1673683a242a7ca7d39e781", + "sha256:7cf12ac34c444362f3261fb3ff548f0037ddd4c5bb85f66c4be30d2936beb3c5", + "sha256:7f7252f52a09f8fa5435dc82b6af79483118ce6bd51eb74e6269f05ee22a7b9f", + "sha256:85042ab91814fca99cec4678fc063fb46df4cbb57b4835a1cc2cb7a51e10250e", + "sha256:857af85d445b9ba9178db95658c219dbd77b71b8264e66836a6eba4fbf49c320", + "sha256:87f889f6e58849ddb7c5d2cb19e2e074917ed1c6e3ceca50405775166492cca8", + "sha256:8ada449e22198c31fb013ae7e9add887e8d2bd2335401abd3cbc55f8c5083647", + "sha256:8e56fbcdd27fce061854ddec99e015dd779cae186eb36b14471fc9ae713b118c", + "sha256:8f48c917ffd36ff9a5212614c2d0d585fa8b064ca7e66206fb5c095015bc8207", + "sha256:9338ade39ff24f8086bb005d16c29f8e9f19e55b18dcb04dfa26fcbc09da497b", + "sha256:9837edf328b2805346f91209b7e660f65fb0e9ca18b7459d075d58db082bf981", + "sha256:9d183e3888ada88185ab17064079c0db8c17e32023f5c278d7bf8014713b1b5b", + "sha256:9f02a259fcbbb5fcfe7a0805b1097ead5ba7a043e318eef1db59f93067f0b49b", + "sha256:9f8e6bb5ac007d4a4027b25f09827ed78cbbd5b9700fd6c54429278dacce05d1", + "sha256:9ff785af8bacdf0be863ec0c428e3288b817e82f3d0c1d652cd9c6d509020dd0", + "sha256:a0b2c25040a3c0ce0e66c7779cc045fdfbbb8d59e5aabfe033000b42fe44b53e", + "sha256:a753993635eccf1ecb185dedcc69d220dab41804272f45e4aef0a67e790c3eb3", + "sha256:a8323daae27ea290ba3350c70c836c0d2b0fb47897fa3b0ca6a5375b952b90d3", + "sha256:a8f195338a5a7b50a058522b39517c50238358d9ad8284fd92943643144c0c03", + "sha256:a96ac14e184aa86dc43b8a22bb53854760a58b2966c2b41580de938e9bf26ed0", + "sha256:aafea64a3ae698695975251f4254df2225e2624185a69534e7fe70581066bc1b", + "sha256:aba037c1310dd108411d27b3d5815998ef0e83573e47d4219f45753c710f969f", + "sha256:b1f67312efa3902a8e8496bfa9824d3bec096ff83c4669ea555c6bdd213aa516", + "sha256:b4ac73b02ca1824ec0a7351588241fd3953748d3774694aa7ddb5e8e46aef3e3", + "sha256:b8d3c5cd327dd6ce0edfc94374fb5883d254fe78a5e9d9dfc237a1897dc73cd1", + "sha256:b98732ec893975455708d6fc9a6daab527fc8bbe65be354a3861f8c450a632a4", + "sha256:ba31c32f6b4dceeb2be04f717811565159617e28d61a60bb616b6442027fd4b9", + "sha256:bd3e2d64500a6cad28bcd710ee6269fbeb2e5320525acd0cfab5f269ade68581", + "sha256:bee8ce357a05c20db04f46c22be2d1a2c6a8ed365b325d08af94358e0688eeb4", + "sha256:c5e7803a65eb2d563c73230e9d693c6539e3c975ccfe62526cadde69f3fda0cf", + "sha256:c846884b2e690ba62a51048a097acb6b5cd263d8bd91062cd6137e2880578472", + "sha256:d1aa4cc85202956d1a65c88d18c7b687b8319dbe6b1aec8969784ef7a10e7d1a", + "sha256:d2d42254b189a346249424fb9bb39182a19289a2409051ee432fb2926bad966a", + "sha256:dccc858372a56080332ea89b78cfb18efb945da858fabeb67f5a44fa0bcb4ebb", + "sha256:dd41d5c72417b87c00b1b635738f3c283e737d75c5fa5c3e1c60cd03eac3af77", + "sha256:e087e8fdf1270d000913c12e6eca44edd02aad3559b3e6b8ef00f0ce76e0636f", + "sha256:e397b64f7aaf26915bf2ad0f1190f75c855d11eb111cc00f12f97430153c2eab", + "sha256:e495ed2a7943503766c5d1ff05ae9212dc2ce1c0e30a80d4f0d84889298fa304", + "sha256:e75695cc952e825fa3e0684a7f4a302f9128721f13eedd8dbd3af2ba450932b8", + "sha256:eb99c954291b2fad0eff98b490aa641e128fbc4a03b11c8a0086de8b7077fb75", + "sha256:ecf2be4b9eece4f3da8ba5f244b9e51932ebc441c0867bd6af46a3d97eb068d6", + "sha256:ee1f5fcbf5bc33acc0be9dd31130bcba35d6d2302e4eceafafd7d9018c7755ab", + "sha256:ee7db6e36e7a2c15923072e41ea24d9a0cf39658cb0637ecc9307b09d28827e1", + "sha256:efadd40fca3a04063d40c4448c9303ce24dd6151dc162cfae4a2a060232ebdcb", + "sha256:f18de0f82c62c4197bea5ecf4389288ac755896aac734bd2cc44004c56e4ac47", + "sha256:f449afbb971df5c6faeb0a27bca0427d7b600dd8f4a068492faec18023f0dcff", + "sha256:f46c6f0aec8d02a52d97a583782d9af38c19a29900747eb048af358a9c1d8e5b", + "sha256:fb02d41c33be667e6135e6686f1bb76104c88a312a18faa0ef0262b5bf7f1a0f", + "sha256:fd257f98cff9c6cb39eee1a83c7c3183970d8a8d23e8cf4f47d9a21329285cee" + ], + "index": "pypi", + "markers": "python_version >= '3.8'", + "version": "==0.23.0" + }, + "wrapt": { + "hashes": [ + "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc", + "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81", + "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09", + "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e", + "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca", + "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0", + "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb", + "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487", + "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40", + "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c", + "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060", + "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202", + "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41", + "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9", + "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b", + "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664", + "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d", + "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362", + "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00", + "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc", + "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1", + "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267", + "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956", + "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966", + "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1", + "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228", + "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72", + "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d", + "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292", + "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0", + "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0", + "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36", + "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c", + "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5", + "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f", + "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73", + "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b", + "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2", + "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593", + "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39", + "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389", + "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf", + "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf", + "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89", + "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c", + "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c", + "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f", + "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440", + "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465", + "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136", + "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b", + "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8", + "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3", + "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8", + "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6", + "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e", + "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f", + "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c", + "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e", + "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8", + "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2", + "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020", + "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35", + "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d", + "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3", + "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537", + "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809", + "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d", + "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a", + "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4" + ], + "markers": "python_version >= '3.6'", + "version": "==1.16.0" + }, + "yapf": { + "hashes": [ + "sha256:4dab8a5ed7134e26d57c1647c7483afb3f136878b579062b786c9ba16b94637b", + "sha256:adc8b5dd02c0143108878c499284205adb258aad6db6634e5b869e7ee2bd548b" + ], + "markers": "python_version >= '3.7'", + "version": "==0.40.2" + }, + "zipp": { + "hashes": [ + "sha256:9960cd8967c8f85a56f920d5d507274e74f9ff813a0ab8889a5b5be2daf44064", + "sha256:c22b14cc4763c5a5b04134207736c107db42e9d3ef2d9779d465f5f1bcba572b" + ], + "markers": "python_version >= '3.8'", + "version": "==3.20.1" + } + } +} diff --git a/python_package/README.md b/python_package/README.md new file mode 100644 index 0000000..68174d7 --- /dev/null +++ b/python_package/README.md @@ -0,0 +1,63 @@ +# flourishcharts + +Interactive data visualization for data practitioners. `flourishcharts` allows users to visualize their data +using Flourish charts that are grounded in data storytelling principles. Users can create racing bar & line +charts, as well as other interactive elements commonly found in d3.js graphics, easily in R and Python. +The package relies on an enterprise API provided by Flourish. + +## Installation + +You can install to a specific virtual env by using `pipenv`: + +```bash +pipenv install flourishcharts +``` + +or to your global Python installation with `pip`: + +```bash +python3 -m pip install --upgrade flourishcharts +``` + +## Development Installation + +Create a dev environment: + +```bash +pipenv install --dev -e "git+ssh://git@github.com/Canva-public/flourishcharts@main#egg=flourishcharts&subdirectory=python_package" +``` + +Set up the env variables (like API keys). Copy-paste the .envrc-demo file, adding your own API keys which can be accessed from your Flourish profile account. + +```bash +cp .envrc-demo .envrc +``` + +### Tests + +To run tests, run the following: + +```bash +python -m unittest discover -s tests +``` + +### How to see your changes + +#### Typescript + +If you use JupyterLab to develop then you can watch the source directory and run JupyterLab at the same time in different +terminals to watch for changes in the extension's source and automatically rebuild the widget. + +To compile the development javascript with live reloading on file changes +```sh +npm install +npm run dev +``` + +To debug javascript in vs code juypter notebooks, press command+shift+p to open the action bar then search for the action "Developer: Open webview developer tools" + +After a change wait for the build to finish and then refresh your browser and the changes should take effect. + +#### Python + +If you make a change to the python code then you will need to restart the notebook kernel to have it take effect. diff --git a/python_package/flourishcharts/__init__.py b/python_package/flourishcharts/__init__.py new file mode 100644 index 0000000..c7b530b --- /dev/null +++ b/python_package/flourishcharts/__init__.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python +# coding: utf-8 + +# Copyright (c) Zoe Meers. +# Distributed under the terms of the MIT License. + +from .canva_upload import Canva +from .flourish import Flourish +from ._version import __version__, version_info diff --git a/python_package/flourishcharts/_utils.py b/python_package/flourishcharts/_utils.py new file mode 100644 index 0000000..7cee5f4 --- /dev/null +++ b/python_package/flourishcharts/_utils.py @@ -0,0 +1,118 @@ +import os +import inspect +import pandas as pd +from copy import deepcopy + + +def clean_null_terms(d): + """Drop null terms + + :param d: dictionary + """ + clean = {} + for k, v in d.items(): + if isinstance(v, dict): + nested = clean_null_terms(v) + if len(nested.keys()) > 0: + clean[k] = nested + elif v is not None: + clean[k] = v + return clean + + +def load_internal_templates() -> pd.DataFrame: + """Load internal template info (template ID, version number, etc.) + + :return: A data frame detailing info about each template. + :rtype: pd.DataFrame + """ + pkg_directory = os.path.dirname(os.path.realpath(__file__)) + path_to_templates = os.path.join( + pkg_directory, "internal_data", "internal_templates.csv" + ) + internal_templates = pd.read_csv(path_to_templates) + return internal_templates + + +def deep_merge(a: dict, b: dict) -> dict: + """Deep merge nested dictionaries. + + :param a: First dict + :type a: dict + :param b: Second dict + :type b: dict + :return: A merged dictionary + :rtype: dict + """ + result = deepcopy(a) + for bk, bv in b.items(): + av = result.get(bk) + if isinstance(av, dict) and isinstance(bv, dict): + result[bk] = deep_merge(av, bv) + else: + result[bk] = deepcopy(bv) + return result + + +def details_error(self): + """Throw an error if a user applies a function from the DetailsMixin class that cannot be applied to the particular chart type. + + :raises Exception: Throws an Exception stating that the function cannot be applied, highlighting the correct function to use instead. + """ + _internal_templates = load_internal_templates() + if self.template_id == "@flourish/line-bar-pie" and self.base_visualisation_id is not None: + self.chart_type = self.base_state["chart_type"] + self.template = self.template_id + if self.template_id == "@flourish/hierarchy" and self.base_visualisation_id is not None: + self.chart_type = self.base_state["hierarchy_layout"] + self.template = self.template_id + matched_templates = _internal_templates[ + _internal_templates.chart_type == self.chart_type + ].to_dict(orient="records") + this_function = inspect.stack()[1].function + actual_function = ( + "set_" + matched_templates[0]["template_function_name"] + "_details" + ) + if this_function != actual_function: + raise Exception( + f"The function [{this_function}] does not work with this chart type [{self.chart_type}]. Instead the ideal detail-setting function for this chart type is [{actual_function}]." + ) + + +def bindings_error(self): + """Throw an error if the user attempts to apply the wrong binding function for a chart type. + + :raises Exception: Throws an Exception stating that the binding function cannot be applied, highlighting the correct function to use instead. + """ + _internal_templates = load_internal_templates() + if self.template_id == "@flourish/line-bar-pie" and self.base_visualisation_id is not None: + self.chart_type = self.base_state["chart_type"] + self.template = self.template_id + if self.template_id == "@flourish/hierarchy" and self.base_visualisation_id is not None: + self.chart_type = self.base_state["hierarchy_layout"] + self.template = self.template_id + matched_templates = _internal_templates[ + _internal_templates.chart_type == self.chart_type + ].to_dict(orient="records") + this_function = inspect.stack()[1].function + actual_bindings_function = ( + "bind_" + matched_templates[0]["template_function_name"] + "_data" + ) + if this_function != actual_bindings_function: + raise Exception( + f"The data bindings function [{this_function}] does not work with this chart type [{self.chart_type}]. Instead the ideal data bindings function is [{actual_bindings_function}]." + ) + + +def is_every_value_none(iterable): + for value in iterable: + if value is not None: + return False + return True + + +def is_every_value_not_none(iterable): + for value in iterable: + if value is not None: + return True + return False diff --git a/python_package/flourishcharts/_version.py b/python_package/flourishcharts/_version.py new file mode 100644 index 0000000..9046092 --- /dev/null +++ b/python_package/flourishcharts/_version.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python +# coding: utf-8 + +# Copyright (c) Zoe Meers. +# Distributed under the terms of the Modified BSD License. + +version_info = (1, 0, 0, 0) +__version__ = ".".join(map(str, version_info)) diff --git a/python_package/flourishcharts/bindings.py b/python_package/flourishcharts/bindings.py new file mode 100644 index 0000000..98f6ecc --- /dev/null +++ b/python_package/flourishcharts/bindings.py @@ -0,0 +1,8250 @@ +from typing import Dict, List, Union +from ._utils import clean_null_terms, deep_merge, bindings_error +import pandas as pd + + +class DataBindingsMixin: + def bind_audio_data( + self, + data: pd.DataFrame = None, + url: str = None, + title: str = None, + subtitle: str = None, + filter: str = None, + url_input_format: str = None, + url_output_format: str = None, + subtitle_input_format: str = None, + subtitle_output_format: str = None, + title_input_format: str = None, + title_output_format: str = None, + filter_input_format: str = None, + filter_output_format: str = None, + ): + """ + Bind data to chart: audio. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param url: Audio URL. The URL of a publicly readable MP3 file. Suggested data type hints: string. Flourish type hint: column + :type url: str, optional + + :param title: Audio title. Suggested data type hints: string. Flourish type hint: column + :type title: str, optional + + :param subtitle: Audio subtitle. Suggested data type hints: string. Flourish type hint: column + :type subtitle: str, optional + + :param filter: Filter. Suggested data type hints: string, number. Flourish type hint: column + :type filter: str, optional + :param url_input_format: Formats/parses dates, strings, and numbers for the [url] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type url_input_format: str, optional + :param url_output_format: Formats/parses dates, strings, and numbers for the [url] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type url_output_format: str, optional + :param subtitle_input_format: Formats/parses dates, strings, and numbers for the [subtitle] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type subtitle_input_format: str, optional + :param subtitle_output_format: Formats/parses dates, strings, and numbers for the [subtitle] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type subtitle_output_format: str, optional + :param title_input_format: Formats/parses dates, strings, and numbers for the [title] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type title_input_format: str, optional + :param title_output_format: Formats/parses dates, strings, and numbers for the [title] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type title_output_format: str, optional + :param filter_input_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_input_format: str, optional + :param filter_output_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = {"data": {"url": {}, "subtitle": {}, "title": {}, "filter": {}}} + + if url is not None: + assert url in data_columns, f"[url] is not a column in the data." + self.bindings["data"]["url"] = url + + if title is not None: + assert title in data_columns, f"[title] is not a column in the data." + self.bindings["data"]["title"] = title + + if subtitle is not None: + assert subtitle in data_columns, f"[subtitle] is not a column in the data." + self.bindings["data"]["subtitle"] = subtitle + + if filter is not None: + assert filter in data_columns, f"[filter] is not a column in the data." + self.bindings["data"]["filter"] = filter + + if url_output_format is not None: + if url_input_format is None and url_output_format is not None: + f"[url_input_format] and [url_output_format] must both be defined." + elif url_input_format is not None and url_output_format is None: + f"[url_input_format] and [url_output_format] must both be defined." + if url_output_format.startswith("%"): + self.metadata["data"]["url"]["type"] = "datetime" + self.metadata["data"]["url"]["type_id"] = "datetime$" + url_input_format + self.metadata["data"]["url"]["output_format_id"] = ( + "datetime$" + url_output_format + ) + elif "_" in url_output_format: + self.metadata["data"]["url"]["type"] = "number" + self.metadata["data"]["url"]["type_id"] = "number$" + url_input_format + self.metadata["data"]["url"]["output_format_id"] = ( + "number$" + url_output_format + ) + elif ( + url_output_format is not None + and not url_output_format.startswith("%") + and "_" not in url_output_format + ): + self.metadata["data"]["url"]["type"] = "string" + self.metadata["data"]["url"]["type_id"] = "string$" + url_input_format + self.metadata["data"]["url"]["output_format_id"] = ( + "string$" + url_output_format + ) + + if title_output_format is not None: + if title_input_format is None and title_output_format is not None: + f"[title_input_format] and [title_output_format] must both be defined." + elif title_input_format is not None and title_output_format is None: + f"[title_input_format] and [title_output_format] must both be defined." + if title_output_format.startswith("%"): + self.metadata["data"]["title"]["type"] = "datetime" + self.metadata["data"]["title"]["type_id"] = ( + "datetime$" + title_input_format + ) + self.metadata["data"]["title"]["output_format_id"] = ( + "datetime$" + title_output_format + ) + elif "_" in title_output_format: + self.metadata["data"]["title"]["type"] = "number" + self.metadata["data"]["title"]["type_id"] = ( + "number$" + title_input_format + ) + self.metadata["data"]["title"]["output_format_id"] = ( + "number$" + title_output_format + ) + elif ( + title_output_format is not None + and not title_output_format.startswith("%") + and "_" not in title_output_format + ): + self.metadata["data"]["title"]["type"] = "string" + self.metadata["data"]["title"]["type_id"] = ( + "string$" + title_input_format + ) + self.metadata["data"]["title"]["output_format_id"] = ( + "string$" + title_output_format + ) + + if subtitle_output_format is not None: + if subtitle_input_format is None and subtitle_output_format is not None: + f"[subtitle_input_format] and [subtitle_output_format] must both be defined." + elif subtitle_input_format is not None and subtitle_output_format is None: + f"[subtitle_input_format] and [subtitle_output_format] must both be defined." + if subtitle_output_format.startswith("%"): + self.metadata["data"]["subtitle"]["type"] = "datetime" + self.metadata["data"]["subtitle"]["type_id"] = ( + "datetime$" + subtitle_input_format + ) + self.metadata["data"]["subtitle"]["output_format_id"] = ( + "datetime$" + subtitle_output_format + ) + elif "_" in subtitle_output_format: + self.metadata["data"]["subtitle"]["type"] = "number" + self.metadata["data"]["subtitle"]["type_id"] = ( + "number$" + subtitle_input_format + ) + self.metadata["data"]["subtitle"]["output_format_id"] = ( + "number$" + subtitle_output_format + ) + elif ( + subtitle_output_format is not None + and not subtitle_output_format.startswith("%") + and "_" not in subtitle_output_format + ): + self.metadata["data"]["subtitle"]["type"] = "string" + self.metadata["data"]["subtitle"]["type_id"] = ( + "string$" + subtitle_input_format + ) + self.metadata["data"]["subtitle"]["output_format_id"] = ( + "string$" + subtitle_output_format + ) + + if filter_output_format is not None: + if filter_input_format is None and filter_output_format is not None: + f"[filter_input_format] and [filter_output_format] must both be defined." + elif filter_input_format is not None and filter_output_format is None: + f"[filter_input_format] and [filter_output_format] must both be defined." + if filter_output_format.startswith("%"): + self.metadata["data"]["filter"]["type"] = "datetime" + self.metadata["data"]["filter"]["type_id"] = ( + "datetime$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "datetime$" + filter_output_format + ) + elif "_" in filter_output_format: + self.metadata["data"]["filter"]["type"] = "number" + self.metadata["data"]["filter"]["type_id"] = ( + "number$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "number$" + filter_output_format + ) + elif ( + filter_output_format is not None + and not filter_output_format.startswith("%") + and "_" not in filter_output_format + ): + self.metadata["data"]["filter"]["type"] = "string" + self.metadata["data"]["filter"]["type_id"] = ( + "string$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "string$" + filter_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_bar_chart_race_data( + self, + data: pd.DataFrame = None, + captions_data: pd.DataFrame = None, + label: str = None, + values: Union[list, str] = None, + category: str = None, + image: str = None, + captions_from: str = None, + captions_to: str = None, + captions_text: str = None, + captions_image: str = None, + captions_image_input_format: str = None, + captions_image_output_format: str = None, + captions_text_input_format: str = None, + captions_text_output_format: str = None, + captions_to_input_format: str = None, + captions_to_output_format: str = None, + captions_from_input_format: str = None, + captions_from_output_format: str = None, + category_input_format: str = None, + category_output_format: str = None, + image_input_format: str = None, + image_output_format: str = None, + label_input_format: str = None, + label_output_format: str = None, + values_input_format: str = None, + values_output_format: str = None, + ): + """ + Bind data to chart: bar chart race. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + :param captions_data: Captions data. defaults to None + :type captions_data: pd.DataFrame, optional + + :param label: Label. A column containing the names of the bars, e.g. countries or people. Suggested data type hints: string. Flourish type hint: column + :type label: str, optional + + :param values: Values. Multiple columns of numbers, each column representing a point in time Suggested data type hints: number. Flourish type hint: columns + :type values: Union[list, str], optional + + :param category: Categories. Optional category column to color the bars Make sure the Color mode setting is set to By Category in the Bar colors settings panel. Suggested data type hints: string. Flourish type hint: column + :type category: str, optional + + :param image: Image. Optional column with URLs of images. Suggested data type hints: string. Flourish type hint: column + :type image: str, optional + + :param captions_from: Time to show. Must match the column headers in the main data sheet. Suggested data type hints: string, datetime. Flourish type hint: column + :type captions_from: str, optional + + :param captions_to: Time to hide. Must match the column headers in the main data sheet. Suggested data type hints: string, datetime. Flourish type hint: column + :type captions_to: str, optional + + :param captions_text: Text. Text or HTML to show. Suggested data type hints: string. Flourish type hint: column + :type captions_text: str, optional + + :param captions_image: Image. Image to show. Add an image URL or right-click on a cell to upload an image. Suggested data type hints: string. Flourish type hint: column + :type captions_image: str, optional + :param captions_image_input_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_image_input_format: str, optional + :param captions_image_output_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_image_output_format: str, optional + :param captions_text_input_format: Formats/parses dates, strings, and numbers for the [text] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_text_input_format: str, optional + :param captions_text_output_format: Formats/parses dates, strings, and numbers for the [text] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_text_output_format: str, optional + :param captions_to_input_format: Formats/parses dates, strings, and numbers for the [to] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_to_input_format: str, optional + :param captions_to_output_format: Formats/parses dates, strings, and numbers for the [to] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_to_output_format: str, optional + :param captions_from_input_format: Formats/parses dates, strings, and numbers for the [from] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_from_input_format: str, optional + :param captions_from_output_format: Formats/parses dates, strings, and numbers for the [from] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_from_output_format: str, optional + :param category_input_format: Formats/parses dates, strings, and numbers for the [category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type category_input_format: str, optional + :param category_output_format: Formats/parses dates, strings, and numbers for the [category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type category_output_format: str, optional + :param image_input_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type image_input_format: str, optional + :param image_output_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type image_output_format: str, optional + :param label_input_format: Formats/parses dates, strings, and numbers for the [label] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type label_input_format: str, optional + :param label_output_format: Formats/parses dates, strings, and numbers for the [label] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type label_output_format: str, optional + :param values_input_format: Formats/parses dates, strings, and numbers for the [values] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type values_input_format: str, optional + :param values_output_format: Formats/parses dates, strings, and numbers for the [values] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type values_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + + self.bindings["captions"] = {} + self.data_properties["captions"] = {} + if captions_data is not None: + captions_columns = set(captions_data.columns) + int_columns_captions_data = captions_data.select_dtypes( + include="int" + ).columns + captions_data[int_columns_captions_data] = captions_data[ + int_columns_captions_data + ].astype(str) + self.data_properties["captions"] = captions_data.to_dict(orient="records") + self.metadata = { + "captions": {"image": {}, "text": {}, "to": {}, "from": {}}, + "data": {"category": {}, "image": {}, "label": {}, "values": {}}, + } + + if label is not None: + assert label in data_columns, f"[label] is not a column in the data." + self.bindings["data"]["label"] = label + + if values is not None: + if isinstance(values, list): + for col in values: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["values"] = values + elif isinstance(values, str): + assert values in data_columns, f"[values] is not a column in the data." + self.bindings["data"]["values"] = [values] + else: + self.bindings["data"]["values"] = [] + + if category is not None: + assert category in data_columns, f"[category] is not a column in the data." + self.bindings["data"]["category"] = category + + if image is not None: + assert image in data_columns, f"[image] is not a column in the data." + self.bindings["data"]["image"] = image + + if captions_from is not None: + assert ( + captions_from in captions_columns + ), f"[captions_from] is not a column in the data." + self.bindings["captions"]["from"] = captions_from + + if captions_to is not None: + assert ( + captions_to in captions_columns + ), f"[captions_to] is not a column in the data." + self.bindings["captions"]["to"] = captions_to + + if captions_text is not None: + assert ( + captions_text in captions_columns + ), f"[captions_text] is not a column in the data." + self.bindings["captions"]["text"] = captions_text + + if captions_image is not None: + assert ( + captions_image in captions_columns + ), f"[captions_image] is not a column in the data." + self.bindings["captions"]["image"] = captions_image + + if label_output_format is not None: + if label_input_format is None and label_output_format is not None: + f"[label_input_format] and [label_output_format] must both be defined." + elif label_input_format is not None and label_output_format is None: + f"[label_input_format] and [label_output_format] must both be defined." + if label_output_format.startswith("%"): + self.metadata["data"]["label"]["type"] = "datetime" + self.metadata["data"]["label"]["type_id"] = ( + "datetime$" + label_input_format + ) + self.metadata["data"]["label"]["output_format_id"] = ( + "datetime$" + label_output_format + ) + elif "_" in label_output_format: + self.metadata["data"]["label"]["type"] = "number" + self.metadata["data"]["label"]["type_id"] = ( + "number$" + label_input_format + ) + self.metadata["data"]["label"]["output_format_id"] = ( + "number$" + label_output_format + ) + elif ( + label_output_format is not None + and not label_output_format.startswith("%") + and "_" not in label_output_format + ): + self.metadata["data"]["label"]["type"] = "string" + self.metadata["data"]["label"]["type_id"] = ( + "string$" + label_input_format + ) + self.metadata["data"]["label"]["output_format_id"] = ( + "string$" + label_output_format + ) + + if values_output_format is not None: + if values_input_format is None and values_output_format is not None: + f"[values_input_format] and [values_output_format] must both be defined." + elif values_input_format is not None and values_output_format is None: + f"[values_input_format] and [values_output_format] must both be defined." + if values_output_format.startswith("%"): + self.metadata["data"]["values"]["type"] = "datetime" + self.metadata["data"]["values"]["type_id"] = ( + "datetime$" + values_input_format + ) + self.metadata["data"]["values"]["output_format_id"] = ( + "datetime$" + values_output_format + ) + elif "_" in values_output_format: + self.metadata["data"]["values"]["type"] = "number" + self.metadata["data"]["values"]["type_id"] = ( + "number$" + values_input_format + ) + self.metadata["data"]["values"]["output_format_id"] = ( + "number$" + values_output_format + ) + elif ( + values_output_format is not None + and not values_output_format.startswith("%") + and "_" not in values_output_format + ): + self.metadata["data"]["values"]["type"] = "string" + self.metadata["data"]["values"]["type_id"] = ( + "string$" + values_input_format + ) + self.metadata["data"]["values"]["output_format_id"] = ( + "string$" + values_output_format + ) + + if category_output_format is not None: + if category_input_format is None and category_output_format is not None: + f"[category_input_format] and [category_output_format] must both be defined." + elif category_input_format is not None and category_output_format is None: + f"[category_input_format] and [category_output_format] must both be defined." + if category_output_format.startswith("%"): + self.metadata["data"]["category"]["type"] = "datetime" + self.metadata["data"]["category"]["type_id"] = ( + "datetime$" + category_input_format + ) + self.metadata["data"]["category"]["output_format_id"] = ( + "datetime$" + category_output_format + ) + elif "_" in category_output_format: + self.metadata["data"]["category"]["type"] = "number" + self.metadata["data"]["category"]["type_id"] = ( + "number$" + category_input_format + ) + self.metadata["data"]["category"]["output_format_id"] = ( + "number$" + category_output_format + ) + elif ( + category_output_format is not None + and not category_output_format.startswith("%") + and "_" not in category_output_format + ): + self.metadata["data"]["category"]["type"] = "string" + self.metadata["data"]["category"]["type_id"] = ( + "string$" + category_input_format + ) + self.metadata["data"]["category"]["output_format_id"] = ( + "string$" + category_output_format + ) + + if image_output_format is not None: + if image_input_format is None and image_output_format is not None: + f"[image_input_format] and [image_output_format] must both be defined." + elif image_input_format is not None and image_output_format is None: + f"[image_input_format] and [image_output_format] must both be defined." + if image_output_format.startswith("%"): + self.metadata["data"]["image"]["type"] = "datetime" + self.metadata["data"]["image"]["type_id"] = ( + "datetime$" + image_input_format + ) + self.metadata["data"]["image"]["output_format_id"] = ( + "datetime$" + image_output_format + ) + elif "_" in image_output_format: + self.metadata["data"]["image"]["type"] = "number" + self.metadata["data"]["image"]["type_id"] = ( + "number$" + image_input_format + ) + self.metadata["data"]["image"]["output_format_id"] = ( + "number$" + image_output_format + ) + elif ( + image_output_format is not None + and not image_output_format.startswith("%") + and "_" not in image_output_format + ): + self.metadata["data"]["image"]["type"] = "string" + self.metadata["data"]["image"]["type_id"] = ( + "string$" + image_input_format + ) + self.metadata["data"]["image"]["output_format_id"] = ( + "string$" + image_output_format + ) + + if captions_from_output_format is not None: + if ( + captions_from_input_format is None + and captions_from_output_format is not None + ): + f"[captions_from_input_format] and [captions_from_output_format] must both be defined." + elif ( + captions_from_input_format is not None + and captions_from_output_format is None + ): + f"[captions_from_input_format] and [captions_from_output_format] must both be defined." + if captions_from_output_format.startswith("%"): + self.metadata["captions"]["from"]["type"] = "datetime" + self.metadata["captions"]["from"]["type_id"] = ( + "datetime$" + captions_from_input_format + ) + self.metadata["captions"]["from"]["output_format_id"] = ( + "datetime$" + captions_from_output_format + ) + elif "_" in captions_from_output_format: + self.metadata["captions"]["from"]["type"] = "number" + self.metadata["captions"]["from"]["type_id"] = ( + "number$" + captions_from_input_format + ) + self.metadata["captions"]["from"]["output_format_id"] = ( + "number$" + captions_from_output_format + ) + elif ( + captions_from_output_format is not None + and not captions_from_output_format.startswith("%") + and "_" not in captions_from_output_format + ): + self.metadata["captions"]["from"]["type"] = "string" + self.metadata["captions"]["from"]["type_id"] = ( + "string$" + captions_from_input_format + ) + self.metadata["captions"]["from"]["output_format_id"] = ( + "string$" + captions_from_output_format + ) + + if captions_to_output_format is not None: + if ( + captions_to_input_format is None + and captions_to_output_format is not None + ): + f"[captions_to_input_format] and [captions_to_output_format] must both be defined." + elif ( + captions_to_input_format is not None + and captions_to_output_format is None + ): + f"[captions_to_input_format] and [captions_to_output_format] must both be defined." + if captions_to_output_format.startswith("%"): + self.metadata["captions"]["to"]["type"] = "datetime" + self.metadata["captions"]["to"]["type_id"] = ( + "datetime$" + captions_to_input_format + ) + self.metadata["captions"]["to"]["output_format_id"] = ( + "datetime$" + captions_to_output_format + ) + elif "_" in captions_to_output_format: + self.metadata["captions"]["to"]["type"] = "number" + self.metadata["captions"]["to"]["type_id"] = ( + "number$" + captions_to_input_format + ) + self.metadata["captions"]["to"]["output_format_id"] = ( + "number$" + captions_to_output_format + ) + elif ( + captions_to_output_format is not None + and not captions_to_output_format.startswith("%") + and "_" not in captions_to_output_format + ): + self.metadata["captions"]["to"]["type"] = "string" + self.metadata["captions"]["to"]["type_id"] = ( + "string$" + captions_to_input_format + ) + self.metadata["captions"]["to"]["output_format_id"] = ( + "string$" + captions_to_output_format + ) + + if captions_text_output_format is not None: + if ( + captions_text_input_format is None + and captions_text_output_format is not None + ): + f"[captions_text_input_format] and [captions_text_output_format] must both be defined." + elif ( + captions_text_input_format is not None + and captions_text_output_format is None + ): + f"[captions_text_input_format] and [captions_text_output_format] must both be defined." + if captions_text_output_format.startswith("%"): + self.metadata["captions"]["text"]["type"] = "datetime" + self.metadata["captions"]["text"]["type_id"] = ( + "datetime$" + captions_text_input_format + ) + self.metadata["captions"]["text"]["output_format_id"] = ( + "datetime$" + captions_text_output_format + ) + elif "_" in captions_text_output_format: + self.metadata["captions"]["text"]["type"] = "number" + self.metadata["captions"]["text"]["type_id"] = ( + "number$" + captions_text_input_format + ) + self.metadata["captions"]["text"]["output_format_id"] = ( + "number$" + captions_text_output_format + ) + elif ( + captions_text_output_format is not None + and not captions_text_output_format.startswith("%") + and "_" not in captions_text_output_format + ): + self.metadata["captions"]["text"]["type"] = "string" + self.metadata["captions"]["text"]["type_id"] = ( + "string$" + captions_text_input_format + ) + self.metadata["captions"]["text"]["output_format_id"] = ( + "string$" + captions_text_output_format + ) + + if captions_image_output_format is not None: + if ( + captions_image_input_format is None + and captions_image_output_format is not None + ): + f"[captions_image_input_format] and [captions_image_output_format] must both be defined." + elif ( + captions_image_input_format is not None + and captions_image_output_format is None + ): + f"[captions_image_input_format] and [captions_image_output_format] must both be defined." + if captions_image_output_format.startswith("%"): + self.metadata["captions"]["image"]["type"] = "datetime" + self.metadata["captions"]["image"]["type_id"] = ( + "datetime$" + captions_image_input_format + ) + self.metadata["captions"]["image"]["output_format_id"] = ( + "datetime$" + captions_image_output_format + ) + elif "_" in captions_image_output_format: + self.metadata["captions"]["image"]["type"] = "number" + self.metadata["captions"]["image"]["type_id"] = ( + "number$" + captions_image_input_format + ) + self.metadata["captions"]["image"]["output_format_id"] = ( + "number$" + captions_image_output_format + ) + elif ( + captions_image_output_format is not None + and not captions_image_output_format.startswith("%") + and "_" not in captions_image_output_format + ): + self.metadata["captions"]["image"]["type"] = "string" + self.metadata["captions"]["image"]["type_id"] = ( + "string$" + captions_image_input_format + ) + self.metadata["captions"]["image"]["output_format_id"] = ( + "string$" + captions_image_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_bubble_chart_data( + self, + data: pd.DataFrame = None, + label: str = None, + color: str = None, + size: str = None, + axis_values: str = None, + image: str = None, + metadata: Union[list, str] = None, + ): + """ + Bind data to chart: bubble chart. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param label: Label + :type label: str, optional + + :param color: Color by. Used to color the bubbles. Flourish type hint: column + :type color: str, optional + + :param size: Size by. Value for bubble size. Flourish type hint: column + :type size: str, optional + + :param axis_values: Axis values. Values used to plot the bubbles when the bubbles are aligned on an axis. Flourish type hint: column + :type axis_values: str, optional + + :param image: Image. Images for bubbles. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column + :type image: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Flourish type hint: columns + :type metadata: Union[list, str], optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = {} + + if label is not None: + assert label in data_columns, f"[label] is not a column in the data." + self.bindings["data"]["label"] = label + + if color is not None: + assert color in data_columns, f"[color] is not a column in the data." + self.bindings["data"]["color"] = color + + if size is not None: + assert size in data_columns, f"[size] is not a column in the data." + self.bindings["data"]["size"] = size + + if axis_values is not None: + assert ( + axis_values in data_columns + ), f"[axis_values] is not a column in the data." + self.bindings["data"]["axis_values"] = axis_values + + if image is not None: + assert image in data_columns, f"[image] is not a column in the data." + self.bindings["data"]["image"] = image + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in data_columns + ), f"[metadata] is not a column in the data." + self.bindings["data"]["metadata"] = [metadata] + else: + self.bindings["data"]["metadata"] = [] + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_calculator_data( + self, + questions_data: pd.DataFrame = None, + question_text: str = None, + question_type: str = None, + context_text: str = None, + image: str = None, + answers_raw: str = None, + fallback_value: str = None, + ): + """ + Bind data to chart: calculator. + + :param questions_data: Questions data. defaults to None + :type questions_data: pd.DataFrame, optional + + :param question_text: Question text. The question text. Flourish type hint: column + :type question_text: str, optional + + :param question_type: Question type. The type of question. Choose from number input, text input, single response buttons, multi response buttons, dropdown, single date picker, range date picker, multi date picker, rating, single slider or range slider. Leave empty to just display text. Flourish type hint: column + :type question_type: str, optional + + :param context_text: Question context. Additional information. Flourish type hint: column + :type context_text: str, optional + + :param image: Image. Question background image. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column + :type image: str, optional + + :param answers_raw: Answers. Answer values separated by "::". Required for single and multi-response buttons, dropdown and rating questions. Rating answers can take optional labels per value noted as "Value >> Label" - for example, "1 >> Bad :: 2 :: 3 >> Good". Number inputs can take range specifications in the format "min: 0 :: max: 50 :: step: 2". Slider inputs can take slider specifications in the format "min: 0 :: max: 100 :: value: 10". Use two comma separated values for range sliders, eg.: "value: 1, 100". See the templates documentation for additional info. Flourish type hint: column + :type answers_raw: str, optional + + :param fallback_value: Fallback value. Fallback value to fill the answer input if left empty by the user. Works for all question types but sliders, which will always show the initial value. Flourish type hint: column + :type fallback_value: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["questions"] = {} + self.data_properties["questions"] = {} + if questions_data is not None: + questions_columns = set(questions_data.columns) + int_columns_questions_data = questions_data.select_dtypes( + include="int" + ).columns + questions_data[int_columns_questions_data] = questions_data[ + int_columns_questions_data + ].astype(str) + self.data_properties["questions"] = questions_data.to_dict(orient="records") + self.metadata = {} + + if question_text is not None: + assert ( + question_text in questions_columns + ), f"[question_text] is not a column in the data." + self.bindings["questions"]["question_text"] = question_text + + if question_type is not None: + assert ( + question_type in questions_columns + ), f"[question_type] is not a column in the data." + self.bindings["questions"]["question_type"] = question_type + + if context_text is not None: + assert ( + context_text in questions_columns + ), f"[context_text] is not a column in the data." + self.bindings["questions"]["context_text"] = context_text + + if image is not None: + assert image in questions_columns, f"[image] is not a column in the data." + self.bindings["questions"]["image"] = image + + if answers_raw is not None: + assert ( + answers_raw in questions_columns + ), f"[answers_raw] is not a column in the data." + self.bindings["questions"]["answers_raw"] = answers_raw + + if fallback_value is not None: + assert ( + fallback_value in questions_columns + ), f"[fallback_value] is not a column in the data." + self.bindings["questions"]["fallback_value"] = fallback_value + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_cards_data( + self, + cards_data: pd.DataFrame = None, + title: str = None, + image: str = None, + category: str = None, + subtitle: str = None, + text: Union[list, str] = None, + audio: str = None, + filter: str = None, + metadata: Union[list, str] = None, + audio_input_format: str = None, + audio_output_format: str = None, + category_input_format: str = None, + category_output_format: str = None, + filter_input_format: str = None, + filter_output_format: str = None, + image_input_format: str = None, + image_output_format: str = None, + metadata_input_format: str = None, + metadata_output_format: str = None, + subtitle_input_format: str = None, + subtitle_output_format: str = None, + text_input_format: str = None, + text_output_format: str = None, + title_input_format: str = None, + title_output_format: str = None, + ): + """ + Bind data to chart: cards. + + :param cards_data: Cards data. defaults to None + :type cards_data: pd.DataFrame, optional + + :param title: Title. Suggested data type hints: string. Flourish type hint: column + :type title: str, optional + + :param image: Image. Suggested data type hints: string. Flourish type hint: column + :type image: str, optional + + :param category: Categories. Optional category column to color the cards. Suggested data type hints: string. Flourish type hint: column + :type category: str, optional + + :param subtitle: Subtitle. Suggested data type hints: string. Flourish type hint: column + :type subtitle: str, optional + + :param text: Text. Suggested data type hints: string. Flourish type hint: columns + :type text: Union[list, str], optional + + :param audio: Audio. Add an audio file to the card, which will play when the card is clicked. This will disable popup behavior. Suggested data type hints: string. Flourish type hint: column + :type audio: str, optional + + :param filter: Filter. Suggested data type hints: string, number, datetime. Flourish type hint: column + :type filter: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panelsSuggested data type hints: string, number, datetime. Flourish type hint: columns + :type metadata: Union[list, str], optional + :param audio_input_format: Formats/parses dates, strings, and numbers for the [audio] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type audio_input_format: str, optional + :param audio_output_format: Formats/parses dates, strings, and numbers for the [audio] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type audio_output_format: str, optional + :param category_input_format: Formats/parses dates, strings, and numbers for the [category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type category_input_format: str, optional + :param category_output_format: Formats/parses dates, strings, and numbers for the [category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type category_output_format: str, optional + :param filter_input_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_input_format: str, optional + :param filter_output_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_output_format: str, optional + :param image_input_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type image_input_format: str, optional + :param image_output_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type image_output_format: str, optional + :param metadata_input_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_input_format: str, optional + :param metadata_output_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_output_format: str, optional + :param subtitle_input_format: Formats/parses dates, strings, and numbers for the [subtitle] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type subtitle_input_format: str, optional + :param subtitle_output_format: Formats/parses dates, strings, and numbers for the [subtitle] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type subtitle_output_format: str, optional + :param text_input_format: Formats/parses dates, strings, and numbers for the [text] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type text_input_format: str, optional + :param text_output_format: Formats/parses dates, strings, and numbers for the [text] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type text_output_format: str, optional + :param title_input_format: Formats/parses dates, strings, and numbers for the [title] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type title_input_format: str, optional + :param title_output_format: Formats/parses dates, strings, and numbers for the [title] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type title_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["cards"] = {} + self.data_properties["cards"] = {} + if cards_data is not None: + cards_columns = set(cards_data.columns) + int_columns_cards_data = cards_data.select_dtypes(include="int").columns + cards_data[int_columns_cards_data] = cards_data[ + int_columns_cards_data + ].astype(str) + self.data_properties["cards"] = cards_data.to_dict(orient="records") + self.metadata = { + "cards": { + "audio": {}, + "category": {}, + "filter": {}, + "image": {}, + "metadata": {}, + "subtitle": {}, + "text": {}, + "title": {}, + } + } + + if title is not None: + assert title in cards_columns, f"[title] is not a column in the data." + self.bindings["cards"]["title"] = title + + if image is not None: + assert image in cards_columns, f"[image] is not a column in the data." + self.bindings["cards"]["image"] = image + + if category is not None: + assert category in cards_columns, f"[category] is not a column in the data." + self.bindings["cards"]["category"] = category + + if subtitle is not None: + assert subtitle in cards_columns, f"[subtitle] is not a column in the data." + self.bindings["cards"]["subtitle"] = subtitle + + if text is not None: + if isinstance(text, list): + for col in text: + assert ( + col in cards_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["cards"]["text"] = text + elif isinstance(text, str): + assert text in cards_columns, f"[text] is not a column in the data." + self.bindings["cards"]["text"] = [text] + else: + self.bindings["cards"]["text"] = [] + + if audio is not None: + assert audio in cards_columns, f"[audio] is not a column in the data." + self.bindings["cards"]["audio"] = audio + + if filter is not None: + assert filter in cards_columns, f"[filter] is not a column in the data." + self.bindings["cards"]["filter"] = filter + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in cards_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["cards"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in cards_columns + ), f"[metadata] is not a column in the data." + self.bindings["cards"]["metadata"] = [metadata] + else: + self.bindings["cards"]["metadata"] = [] + + if title_output_format is not None: + if title_input_format is None and title_output_format is not None: + f"[title_input_format] and [title_output_format] must both be defined." + elif title_input_format is not None and title_output_format is None: + f"[title_input_format] and [title_output_format] must both be defined." + if title_output_format.startswith("%"): + self.metadata["cards"]["title"]["type"] = "datetime" + self.metadata["cards"]["title"]["type_id"] = ( + "datetime$" + title_input_format + ) + self.metadata["cards"]["title"]["output_format_id"] = ( + "datetime$" + title_output_format + ) + elif "_" in title_output_format: + self.metadata["cards"]["title"]["type"] = "number" + self.metadata["cards"]["title"]["type_id"] = ( + "number$" + title_input_format + ) + self.metadata["cards"]["title"]["output_format_id"] = ( + "number$" + title_output_format + ) + elif ( + title_output_format is not None + and not title_output_format.startswith("%") + and "_" not in title_output_format + ): + self.metadata["cards"]["title"]["type"] = "string" + self.metadata["cards"]["title"]["type_id"] = ( + "string$" + title_input_format + ) + self.metadata["cards"]["title"]["output_format_id"] = ( + "string$" + title_output_format + ) + + if image_output_format is not None: + if image_input_format is None and image_output_format is not None: + f"[image_input_format] and [image_output_format] must both be defined." + elif image_input_format is not None and image_output_format is None: + f"[image_input_format] and [image_output_format] must both be defined." + if image_output_format.startswith("%"): + self.metadata["cards"]["image"]["type"] = "datetime" + self.metadata["cards"]["image"]["type_id"] = ( + "datetime$" + image_input_format + ) + self.metadata["cards"]["image"]["output_format_id"] = ( + "datetime$" + image_output_format + ) + elif "_" in image_output_format: + self.metadata["cards"]["image"]["type"] = "number" + self.metadata["cards"]["image"]["type_id"] = ( + "number$" + image_input_format + ) + self.metadata["cards"]["image"]["output_format_id"] = ( + "number$" + image_output_format + ) + elif ( + image_output_format is not None + and not image_output_format.startswith("%") + and "_" not in image_output_format + ): + self.metadata["cards"]["image"]["type"] = "string" + self.metadata["cards"]["image"]["type_id"] = ( + "string$" + image_input_format + ) + self.metadata["cards"]["image"]["output_format_id"] = ( + "string$" + image_output_format + ) + + if category_output_format is not None: + if category_input_format is None and category_output_format is not None: + f"[category_input_format] and [category_output_format] must both be defined." + elif category_input_format is not None and category_output_format is None: + f"[category_input_format] and [category_output_format] must both be defined." + if category_output_format.startswith("%"): + self.metadata["cards"]["category"]["type"] = "datetime" + self.metadata["cards"]["category"]["type_id"] = ( + "datetime$" + category_input_format + ) + self.metadata["cards"]["category"]["output_format_id"] = ( + "datetime$" + category_output_format + ) + elif "_" in category_output_format: + self.metadata["cards"]["category"]["type"] = "number" + self.metadata["cards"]["category"]["type_id"] = ( + "number$" + category_input_format + ) + self.metadata["cards"]["category"]["output_format_id"] = ( + "number$" + category_output_format + ) + elif ( + category_output_format is not None + and not category_output_format.startswith("%") + and "_" not in category_output_format + ): + self.metadata["cards"]["category"]["type"] = "string" + self.metadata["cards"]["category"]["type_id"] = ( + "string$" + category_input_format + ) + self.metadata["cards"]["category"]["output_format_id"] = ( + "string$" + category_output_format + ) + + if subtitle_output_format is not None: + if subtitle_input_format is None and subtitle_output_format is not None: + f"[subtitle_input_format] and [subtitle_output_format] must both be defined." + elif subtitle_input_format is not None and subtitle_output_format is None: + f"[subtitle_input_format] and [subtitle_output_format] must both be defined." + if subtitle_output_format.startswith("%"): + self.metadata["cards"]["subtitle"]["type"] = "datetime" + self.metadata["cards"]["subtitle"]["type_id"] = ( + "datetime$" + subtitle_input_format + ) + self.metadata["cards"]["subtitle"]["output_format_id"] = ( + "datetime$" + subtitle_output_format + ) + elif "_" in subtitle_output_format: + self.metadata["cards"]["subtitle"]["type"] = "number" + self.metadata["cards"]["subtitle"]["type_id"] = ( + "number$" + subtitle_input_format + ) + self.metadata["cards"]["subtitle"]["output_format_id"] = ( + "number$" + subtitle_output_format + ) + elif ( + subtitle_output_format is not None + and not subtitle_output_format.startswith("%") + and "_" not in subtitle_output_format + ): + self.metadata["cards"]["subtitle"]["type"] = "string" + self.metadata["cards"]["subtitle"]["type_id"] = ( + "string$" + subtitle_input_format + ) + self.metadata["cards"]["subtitle"]["output_format_id"] = ( + "string$" + subtitle_output_format + ) + + if text_output_format is not None: + if text_input_format is None and text_output_format is not None: + f"[text_input_format] and [text_output_format] must both be defined." + elif text_input_format is not None and text_output_format is None: + f"[text_input_format] and [text_output_format] must both be defined." + if text_output_format.startswith("%"): + self.metadata["cards"]["text"]["type"] = "datetime" + self.metadata["cards"]["text"]["type_id"] = ( + "datetime$" + text_input_format + ) + self.metadata["cards"]["text"]["output_format_id"] = ( + "datetime$" + text_output_format + ) + elif "_" in text_output_format: + self.metadata["cards"]["text"]["type"] = "number" + self.metadata["cards"]["text"]["type_id"] = ( + "number$" + text_input_format + ) + self.metadata["cards"]["text"]["output_format_id"] = ( + "number$" + text_output_format + ) + elif ( + text_output_format is not None + and not text_output_format.startswith("%") + and "_" not in text_output_format + ): + self.metadata["cards"]["text"]["type"] = "string" + self.metadata["cards"]["text"]["type_id"] = ( + "string$" + text_input_format + ) + self.metadata["cards"]["text"]["output_format_id"] = ( + "string$" + text_output_format + ) + + if audio_output_format is not None: + if audio_input_format is None and audio_output_format is not None: + f"[audio_input_format] and [audio_output_format] must both be defined." + elif audio_input_format is not None and audio_output_format is None: + f"[audio_input_format] and [audio_output_format] must both be defined." + if audio_output_format.startswith("%"): + self.metadata["cards"]["audio"]["type"] = "datetime" + self.metadata["cards"]["audio"]["type_id"] = ( + "datetime$" + audio_input_format + ) + self.metadata["cards"]["audio"]["output_format_id"] = ( + "datetime$" + audio_output_format + ) + elif "_" in audio_output_format: + self.metadata["cards"]["audio"]["type"] = "number" + self.metadata["cards"]["audio"]["type_id"] = ( + "number$" + audio_input_format + ) + self.metadata["cards"]["audio"]["output_format_id"] = ( + "number$" + audio_output_format + ) + elif ( + audio_output_format is not None + and not audio_output_format.startswith("%") + and "_" not in audio_output_format + ): + self.metadata["cards"]["audio"]["type"] = "string" + self.metadata["cards"]["audio"]["type_id"] = ( + "string$" + audio_input_format + ) + self.metadata["cards"]["audio"]["output_format_id"] = ( + "string$" + audio_output_format + ) + + if filter_output_format is not None: + if filter_input_format is None and filter_output_format is not None: + f"[filter_input_format] and [filter_output_format] must both be defined." + elif filter_input_format is not None and filter_output_format is None: + f"[filter_input_format] and [filter_output_format] must both be defined." + if filter_output_format.startswith("%"): + self.metadata["cards"]["filter"]["type"] = "datetime" + self.metadata["cards"]["filter"]["type_id"] = ( + "datetime$" + filter_input_format + ) + self.metadata["cards"]["filter"]["output_format_id"] = ( + "datetime$" + filter_output_format + ) + elif "_" in filter_output_format: + self.metadata["cards"]["filter"]["type"] = "number" + self.metadata["cards"]["filter"]["type_id"] = ( + "number$" + filter_input_format + ) + self.metadata["cards"]["filter"]["output_format_id"] = ( + "number$" + filter_output_format + ) + elif ( + filter_output_format is not None + and not filter_output_format.startswith("%") + and "_" not in filter_output_format + ): + self.metadata["cards"]["filter"]["type"] = "string" + self.metadata["cards"]["filter"]["type_id"] = ( + "string$" + filter_input_format + ) + self.metadata["cards"]["filter"]["output_format_id"] = ( + "string$" + filter_output_format + ) + + if metadata_output_format is not None: + if metadata_input_format is None and metadata_output_format is not None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + elif metadata_input_format is not None and metadata_output_format is None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + if metadata_output_format.startswith("%"): + self.metadata["cards"]["metadata"]["type"] = "datetime" + self.metadata["cards"]["metadata"]["type_id"] = ( + "datetime$" + metadata_input_format + ) + self.metadata["cards"]["metadata"]["output_format_id"] = ( + "datetime$" + metadata_output_format + ) + elif "_" in metadata_output_format: + self.metadata["cards"]["metadata"]["type"] = "number" + self.metadata["cards"]["metadata"]["type_id"] = ( + "number$" + metadata_input_format + ) + self.metadata["cards"]["metadata"]["output_format_id"] = ( + "number$" + metadata_output_format + ) + elif ( + metadata_output_format is not None + and not metadata_output_format.startswith("%") + and "_" not in metadata_output_format + ): + self.metadata["cards"]["metadata"]["type"] = "string" + self.metadata["cards"]["metadata"]["type_id"] = ( + "string$" + metadata_input_format + ) + self.metadata["cards"]["metadata"]["output_format_id"] = ( + "string$" + metadata_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_chord_diagram_data( + self, + connections_data: pd.DataFrame = None, + source: str = None, + target: str = None, + value: str = None, + ): + """ + Bind data to chart: chord diagram. + + :param connections_data: Connections data. defaults to None + :type connections_data: pd.DataFrame, optional + + :param source: Source + :type source: str, optional + + :param target: Target + :type target: str, optional + + :param value: Value. A number specifying the size of the flow. Flourish type hint: column + :type value: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["connections"] = {} + self.data_properties["connections"] = {} + if connections_data is not None: + connections_columns = set(connections_data.columns) + int_columns_connections_data = connections_data.select_dtypes( + include="int" + ).columns + connections_data[int_columns_connections_data] = connections_data[ + int_columns_connections_data + ].astype(str) + self.data_properties["connections"] = connections_data.to_dict( + orient="records" + ) + self.metadata = {} + + if source is not None: + assert ( + source in connections_columns + ), f"[source] is not a column in the data." + self.bindings["connections"]["source"] = source + + if target is not None: + assert ( + target in connections_columns + ), f"[target] is not a column in the data." + self.bindings["connections"]["target"] = target + + if value is not None: + assert value in connections_columns, f"[value] is not a column in the data." + self.bindings["connections"]["value"] = value + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_draw_the_line_data( + self, + data: pd.DataFrame = None, + x: str = None, + lines_reveal: Union[list, str] = None, + lines_fixed: Union[list, str] = None, + ): + """ + Bind data to chart: draw the line chart. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param x: Time (x axis). Labels for the X axis. Flourish type hint: column + :type x: str, optional + + :param lines_reveal: Lines reveal + :type lines_reveal: Union[list, str], optional + + :param lines_fixed: Lines fixed + :type lines_fixed: Union[list, str], optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = {} + + if x is not None: + assert x in data_columns, f"[x] is not a column in the data." + self.bindings["data"]["x"] = x + + if lines_reveal is not None: + if isinstance(lines_reveal, list): + for col in lines_reveal: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["lines_reveal"] = lines_reveal + elif isinstance(lines_reveal, str): + assert ( + lines_reveal in data_columns + ), f"[lines_reveal] is not a column in the data." + self.bindings["data"]["lines_reveal"] = [lines_reveal] + else: + self.bindings["data"]["lines_reveal"] = [] + + if lines_fixed is not None: + if isinstance(lines_fixed, list): + for col in lines_fixed: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["lines_fixed"] = lines_fixed + elif isinstance(lines_fixed, str): + assert ( + lines_fixed in data_columns + ), f"[lines_fixed] is not a column in the data." + self.bindings["data"]["lines_fixed"] = [lines_fixed] + else: + self.bindings["data"]["lines_fixed"] = [] + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_election_results_chart_data( + self, + values_now_data: pd.DataFrame = None, + values_historical_data: pd.DataFrame = None, + values_now_name: str = None, + values_now_values: Union[list, str] = None, + values_historical_name: str = None, + values_historical_values: Union[list, str] = None, + ): + """ + Bind data to chart: election results chart. + + :param values_now_data: Values now data. defaults to None + :type values_now_data: pd.DataFrame, optional + :param values_historical_data: Values historical data. defaults to None + :type values_historical_data: pd.DataFrame, optional + + :param values_now_name: Region name. The name of the data series (eg. voting district). Flourish type hint: column + :type values_now_name: str, optional + + :param values_now_values: Results by party. One column per party, with party names as header rows. Flourish type hint: columns + :type values_now_values: Union[list, str], optional + + :param values_historical_name: Region name. The name of the data series (eg. voting district). Flourish type hint: column + :type values_historical_name: str, optional + + :param values_historical_values: Results by party. One column per party, with party names as header rows. Flourish type hint: columns + :type values_historical_values: Union[list, str], optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["values_now"] = {} + self.data_properties["values_now"] = {} + if values_now_data is not None: + values_now_columns = set(values_now_data.columns) + int_columns_values_now_data = values_now_data.select_dtypes( + include="int" + ).columns + values_now_data[int_columns_values_now_data] = values_now_data[ + int_columns_values_now_data + ].astype(str) + self.data_properties["values_now"] = values_now_data.to_dict( + orient="records" + ) + + self.bindings["values_historical"] = {} + self.data_properties["values_historical"] = {} + if values_historical_data is not None: + values_historical_columns = set(values_historical_data.columns) + int_columns_values_historical_data = values_historical_data.select_dtypes( + include="int" + ).columns + values_historical_data[ + int_columns_values_historical_data + ] = values_historical_data[int_columns_values_historical_data].astype(str) + self.data_properties["values_historical"] = values_historical_data.to_dict( + orient="records" + ) + self.metadata = {} + + if values_now_name is not None: + assert ( + values_now_name in values_now_columns + ), f"[values_now_name] is not a column in the data." + self.bindings["values_now"]["name"] = values_now_name + + if values_now_values is not None: + if isinstance(values_now_values, list): + for col in values_now_values: + assert ( + col in values_now_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["values_now"]["values"] = values_now_values + elif isinstance(values_now_values, str): + assert ( + values_now_values in values_now_columns + ), f"[values_now_values] is not a column in the data." + self.bindings["values_now"]["values"] = [values_now_values] + else: + self.bindings["values_now"]["values"] = [] + + if values_historical_name is not None: + assert ( + values_historical_name in values_historical_columns + ), f"[values_historical_name] is not a column in the data." + self.bindings["values_historical"]["name"] = values_historical_name + + if values_historical_values is not None: + if isinstance(values_historical_values, list): + for col in values_historical_values: + assert ( + col in values_historical_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["values_historical"]["values"] = values_historical_values + elif isinstance(values_historical_values, str): + assert ( + values_historical_values in values_historical_columns + ), f"[values_historical_values] is not a column in the data." + self.bindings["values_historical"]["values"] = [ + values_historical_values + ] + else: + self.bindings["values_historical"]["values"] = [] + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_gantt_data( + self, + gantt_data: pd.DataFrame = None, + start_date: str = None, + end_date: str = None, + task: str = None, + grouping: str = None, + color: str = None, + progress: str = None, + filter: str = None, + metadata: Union[list, str] = None, + ): + """ + Bind data to chart: gantt chart. + + :param gantt_data: Gantt data. defaults to None + :type gantt_data: pd.DataFrame, optional + + :param start_date: Start date + :type start_date: str, optional + + :param end_date: End date. The end date or time of the event. If working with days, the end date should be the first day after the end date. So if your event stretches from 1/1. and ends on the 5/1. your end date should be 6/1. This will mean your Gantt bar will stretch across the last day of your project or task. Flourish type hint: column + :type end_date: str, optional + + :param task: Task + :type task: str, optional + + :param grouping: Group. Select a categorical column to combine bars into groups on the Y axis. Flourish type hint: column + :type grouping: str, optional + + :param color: Color category. Select a categorical column; each unique value in the column will become a color. Flourish type hint: column + :type color: str, optional + + :param progress: Progress. Requires a number column with values between 0 and 1, representing the progress from 0 to 100%. Flourish type hint: column + :type progress: str, optional + + :param filter: Filter. If set, creates a filter menu or time slider. Flourish type hint: column + :type filter: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panelsFlourish type hint: columns + :type metadata: Union[list, str], optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["gantt"] = {} + self.data_properties["gantt"] = {} + if gantt_data is not None: + gantt_columns = set(gantt_data.columns) + int_columns_gantt_data = gantt_data.select_dtypes(include="int").columns + gantt_data[int_columns_gantt_data] = gantt_data[ + int_columns_gantt_data + ].astype(str) + self.data_properties["gantt"] = gantt_data.to_dict(orient="records") + self.metadata = {} + + if start_date is not None: + assert ( + start_date in gantt_columns + ), f"[start_date] is not a column in the data." + self.bindings["gantt"]["start_date"] = start_date + + if end_date is not None: + assert end_date in gantt_columns, f"[end_date] is not a column in the data." + self.bindings["gantt"]["end_date"] = end_date + + if task is not None: + assert task in gantt_columns, f"[task] is not a column in the data." + self.bindings["gantt"]["task"] = task + + if grouping is not None: + assert grouping in gantt_columns, f"[grouping] is not a column in the data." + self.bindings["gantt"]["grouping"] = grouping + + if color is not None: + assert color in gantt_columns, f"[color] is not a column in the data." + self.bindings["gantt"]["color"] = color + + if progress is not None: + assert progress in gantt_columns, f"[progress] is not a column in the data." + self.bindings["gantt"]["progress"] = progress + + if filter is not None: + assert filter in gantt_columns, f"[filter] is not a column in the data." + self.bindings["gantt"]["filter"] = filter + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in gantt_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["gantt"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in gantt_columns + ), f"[metadata] is not a column in the data." + self.bindings["gantt"]["metadata"] = [metadata] + else: + self.bindings["gantt"]["metadata"] = [] + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_gauge_data( + self, + data: pd.DataFrame = None, + name: str = None, + value: Union[list, str] = None, + name_input_format: str = None, + name_output_format: str = None, + value_input_format: str = None, + value_output_format: str = None, + ): + """ + Bind data to chart: gauge. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param name: Name + :type name: str, optional + + :param value: Value. One or more columns of numbers. Flourish type hint: columns + :type value: Union[list, str], optional + :param name_input_format: Formats/parses dates, strings, and numbers for the [name] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type name_input_format: str, optional + :param name_output_format: Formats/parses dates, strings, and numbers for the [name] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type name_output_format: str, optional + :param value_input_format: Formats/parses dates, strings, and numbers for the [value] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type value_input_format: str, optional + :param value_output_format: Formats/parses dates, strings, and numbers for the [value] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type value_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = {"data": {"name": {}, "value": {}}} + + if name is not None: + assert name in data_columns, f"[name] is not a column in the data." + self.bindings["data"]["name"] = name + + if value is not None: + if isinstance(value, list): + for col in value: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["value"] = value + elif isinstance(value, str): + assert value in data_columns, f"[value] is not a column in the data." + self.bindings["data"]["value"] = [value] + else: + self.bindings["data"]["value"] = [] + + if name_output_format is not None: + if name_input_format is None and name_output_format is not None: + f"[name_input_format] and [name_output_format] must both be defined." + elif name_input_format is not None and name_output_format is None: + f"[name_input_format] and [name_output_format] must both be defined." + if name_output_format.startswith("%"): + self.metadata["data"]["name"]["type"] = "datetime" + self.metadata["data"]["name"]["type_id"] = ( + "datetime$" + name_input_format + ) + self.metadata["data"]["name"]["output_format_id"] = ( + "datetime$" + name_output_format + ) + elif "_" in name_output_format: + self.metadata["data"]["name"]["type"] = "number" + self.metadata["data"]["name"]["type_id"] = "number$" + name_input_format + self.metadata["data"]["name"]["output_format_id"] = ( + "number$" + name_output_format + ) + elif ( + name_output_format is not None + and not name_output_format.startswith("%") + and "_" not in name_output_format + ): + self.metadata["data"]["name"]["type"] = "string" + self.metadata["data"]["name"]["type_id"] = "string$" + name_input_format + self.metadata["data"]["name"]["output_format_id"] = ( + "string$" + name_output_format + ) + + if value_output_format is not None: + if value_input_format is None and value_output_format is not None: + f"[value_input_format] and [value_output_format] must both be defined." + elif value_input_format is not None and value_output_format is None: + f"[value_input_format] and [value_output_format] must both be defined." + if value_output_format.startswith("%"): + self.metadata["data"]["value"]["type"] = "datetime" + self.metadata["data"]["value"]["type_id"] = ( + "datetime$" + value_input_format + ) + self.metadata["data"]["value"]["output_format_id"] = ( + "datetime$" + value_output_format + ) + elif "_" in value_output_format: + self.metadata["data"]["value"]["type"] = "number" + self.metadata["data"]["value"]["type_id"] = ( + "number$" + value_input_format + ) + self.metadata["data"]["value"]["output_format_id"] = ( + "number$" + value_output_format + ) + elif ( + value_output_format is not None + and not value_output_format.startswith("%") + and "_" not in value_output_format + ): + self.metadata["data"]["value"]["type"] = "string" + self.metadata["data"]["value"]["type_id"] = ( + "string$" + value_input_format + ) + self.metadata["data"]["value"]["output_format_id"] = ( + "string$" + value_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_hierarchy_data( + self, + data: pd.DataFrame = None, + nest_columns: Union[list, str] = None, + size_columns: Union[list, str] = None, + filter: str = None, + popup_metadata: Union[list, str] = None, + nest_columns_input_format: str = None, + nest_columns_output_format: str = None, + filter_input_format: str = None, + filter_output_format: str = None, + popup_metadata_input_format: str = None, + popup_metadata_output_format: str = None, + size_columns_input_format: str = None, + size_columns_output_format: str = None, + ): + """ + Bind data to chart: hierarchy. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param nest_columns: Categories/nesting. Choose one or more categorical columns to nest by. The data is nested in the same order as the chosen columns (e.g. C, B is different from B, C). Suggested data type hints: string. Flourish type hint: columns + :type nest_columns: Union[list, str], optional + + :param size_columns: Size by. Optionally choose one or more numeric columns to size by. If more than one is chosen, a dropdown will appear in the visualization which lets the user choose. Rows with negative values are excluded. Suggested data type hints: number. Flourish type hint: columns + :type size_columns: Union[list, str], optional + + :param filter: Filter. Optionally choose a categorical column to filter by. Suggested data type hints: string, number, datetime. Flourish type hint: column + :type filter: str, optional + + :param popup_metadata: Info for popups. One or more columns of information (text, image URLs , embedded charts etc) to include in popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns + :type popup_metadata: Union[list, str], optional + :param nest_columns_input_format: Formats/parses dates, strings, and numbers for the [nest_columns] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type nest_columns_input_format: str, optional + :param nest_columns_output_format: Formats/parses dates, strings, and numbers for the [nest_columns] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type nest_columns_output_format: str, optional + :param filter_input_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_input_format: str, optional + :param filter_output_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_output_format: str, optional + :param popup_metadata_input_format: Formats/parses dates, strings, and numbers for the [popup_metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type popup_metadata_input_format: str, optional + :param popup_metadata_output_format: Formats/parses dates, strings, and numbers for the [popup_metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type popup_metadata_output_format: str, optional + :param size_columns_input_format: Formats/parses dates, strings, and numbers for the [size_columns] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type size_columns_input_format: str, optional + :param size_columns_output_format: Formats/parses dates, strings, and numbers for the [size_columns] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type size_columns_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = { + "data": { + "nest_columns": {}, + "filter": {}, + "popup_metadata": {}, + "size_columns": {}, + } + } + + if nest_columns is not None: + if isinstance(nest_columns, list): + for col in nest_columns: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["nest_columns"] = nest_columns + elif isinstance(nest_columns, str): + assert ( + nest_columns in data_columns + ), f"[nest_columns] is not a column in the data." + self.bindings["data"]["nest_columns"] = [nest_columns] + else: + self.bindings["data"]["nest_columns"] = [] + + if size_columns is not None: + if isinstance(size_columns, list): + for col in size_columns: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["size_columns"] = size_columns + elif isinstance(size_columns, str): + assert ( + size_columns in data_columns + ), f"[size_columns] is not a column in the data." + self.bindings["data"]["size_columns"] = [size_columns] + else: + self.bindings["data"]["size_columns"] = [] + + if filter is not None: + assert filter in data_columns, f"[filter] is not a column in the data." + self.bindings["data"]["filter"] = filter + + if popup_metadata is not None: + if isinstance(popup_metadata, list): + for col in popup_metadata: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["popup_metadata"] = popup_metadata + elif isinstance(popup_metadata, str): + assert ( + popup_metadata in data_columns + ), f"[popup_metadata] is not a column in the data." + self.bindings["data"]["popup_metadata"] = [popup_metadata] + else: + self.bindings["data"]["popup_metadata"] = [] + + if nest_columns_output_format is not None: + if ( + nest_columns_input_format is None + and nest_columns_output_format is not None + ): + f"[nest_columns_input_format] and [nest_columns_output_format] must both be defined." + elif ( + nest_columns_input_format is not None + and nest_columns_output_format is None + ): + f"[nest_columns_input_format] and [nest_columns_output_format] must both be defined." + if nest_columns_output_format.startswith("%"): + self.metadata["data"]["nest_columns"]["type"] = "datetime" + self.metadata["data"]["nest_columns"]["type_id"] = ( + "datetime$" + nest_columns_input_format + ) + self.metadata["data"]["nest_columns"]["output_format_id"] = ( + "datetime$" + nest_columns_output_format + ) + elif "_" in nest_columns_output_format: + self.metadata["data"]["nest_columns"]["type"] = "number" + self.metadata["data"]["nest_columns"]["type_id"] = ( + "number$" + nest_columns_input_format + ) + self.metadata["data"]["nest_columns"]["output_format_id"] = ( + "number$" + nest_columns_output_format + ) + elif ( + nest_columns_output_format is not None + and not nest_columns_output_format.startswith("%") + and "_" not in nest_columns_output_format + ): + self.metadata["data"]["nest_columns"]["type"] = "string" + self.metadata["data"]["nest_columns"]["type_id"] = ( + "string$" + nest_columns_input_format + ) + self.metadata["data"]["nest_columns"]["output_format_id"] = ( + "string$" + nest_columns_output_format + ) + + if size_columns_output_format is not None: + if ( + size_columns_input_format is None + and size_columns_output_format is not None + ): + f"[size_columns_input_format] and [size_columns_output_format] must both be defined." + elif ( + size_columns_input_format is not None + and size_columns_output_format is None + ): + f"[size_columns_input_format] and [size_columns_output_format] must both be defined." + if size_columns_output_format.startswith("%"): + self.metadata["data"]["size_columns"]["type"] = "datetime" + self.metadata["data"]["size_columns"]["type_id"] = ( + "datetime$" + size_columns_input_format + ) + self.metadata["data"]["size_columns"]["output_format_id"] = ( + "datetime$" + size_columns_output_format + ) + elif "_" in size_columns_output_format: + self.metadata["data"]["size_columns"]["type"] = "number" + self.metadata["data"]["size_columns"]["type_id"] = ( + "number$" + size_columns_input_format + ) + self.metadata["data"]["size_columns"]["output_format_id"] = ( + "number$" + size_columns_output_format + ) + elif ( + size_columns_output_format is not None + and not size_columns_output_format.startswith("%") + and "_" not in size_columns_output_format + ): + self.metadata["data"]["size_columns"]["type"] = "string" + self.metadata["data"]["size_columns"]["type_id"] = ( + "string$" + size_columns_input_format + ) + self.metadata["data"]["size_columns"]["output_format_id"] = ( + "string$" + size_columns_output_format + ) + + if filter_output_format is not None: + if filter_input_format is None and filter_output_format is not None: + f"[filter_input_format] and [filter_output_format] must both be defined." + elif filter_input_format is not None and filter_output_format is None: + f"[filter_input_format] and [filter_output_format] must both be defined." + if filter_output_format.startswith("%"): + self.metadata["data"]["filter"]["type"] = "datetime" + self.metadata["data"]["filter"]["type_id"] = ( + "datetime$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "datetime$" + filter_output_format + ) + elif "_" in filter_output_format: + self.metadata["data"]["filter"]["type"] = "number" + self.metadata["data"]["filter"]["type_id"] = ( + "number$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "number$" + filter_output_format + ) + elif ( + filter_output_format is not None + and not filter_output_format.startswith("%") + and "_" not in filter_output_format + ): + self.metadata["data"]["filter"]["type"] = "string" + self.metadata["data"]["filter"]["type_id"] = ( + "string$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "string$" + filter_output_format + ) + + if popup_metadata_output_format is not None: + if ( + popup_metadata_input_format is None + and popup_metadata_output_format is not None + ): + f"[popup_metadata_input_format] and [popup_metadata_output_format] must both be defined." + elif ( + popup_metadata_input_format is not None + and popup_metadata_output_format is None + ): + f"[popup_metadata_input_format] and [popup_metadata_output_format] must both be defined." + if popup_metadata_output_format.startswith("%"): + self.metadata["data"]["popup_metadata"]["type"] = "datetime" + self.metadata["data"]["popup_metadata"]["type_id"] = ( + "datetime$" + popup_metadata_input_format + ) + self.metadata["data"]["popup_metadata"]["output_format_id"] = ( + "datetime$" + popup_metadata_output_format + ) + elif "_" in popup_metadata_output_format: + self.metadata["data"]["popup_metadata"]["type"] = "number" + self.metadata["data"]["popup_metadata"]["type_id"] = ( + "number$" + popup_metadata_input_format + ) + self.metadata["data"]["popup_metadata"]["output_format_id"] = ( + "number$" + popup_metadata_output_format + ) + elif ( + popup_metadata_output_format is not None + and not popup_metadata_output_format.startswith("%") + and "_" not in popup_metadata_output_format + ): + self.metadata["data"]["popup_metadata"]["type"] = "string" + self.metadata["data"]["popup_metadata"]["type_id"] = ( + "string$" + popup_metadata_input_format + ) + self.metadata["data"]["popup_metadata"]["output_format_id"] = ( + "string$" + popup_metadata_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_horserace_data( + self, + horserace_data: pd.DataFrame = None, + captions_data: pd.DataFrame = None, + horserace_name: str = None, + horserace_stages: Union[list, str] = None, + horserace_category: str = None, + horserace_pic: str = None, + horserace_filter: str = None, + captions_from: str = None, + captions_to: str = None, + captions_text: str = None, + captions_image: str = None, + captions_image_input_format: str = None, + captions_image_output_format: str = None, + captions_to_input_format: str = None, + captions_to_output_format: str = None, + captions_from_input_format: str = None, + captions_from_output_format: str = None, + captions_text_input_format: str = None, + captions_text_output_format: str = None, + horserace_category_input_format: str = None, + horserace_category_output_format: str = None, + horserace_filter_input_format: str = None, + horserace_filter_output_format: str = None, + horserace_pic_input_format: str = None, + horserace_pic_output_format: str = None, + horserace_name_input_format: str = None, + horserace_name_output_format: str = None, + horserace_stages_input_format: str = None, + horserace_stages_output_format: str = None, + ): + """ + Bind data to chart: line chart race. + + :param horserace_data: Horserace data. defaults to None + :type horserace_data: pd.DataFrame, optional + :param captions_data: Captions data. defaults to None + :type captions_data: pd.DataFrame, optional + + :param horserace_name: Label. The name of each entrant. Suggested data type hints: string. Flourish type hint: column + :type horserace_name: str, optional + + :param horserace_stages: Values. Raw scores, which will be automatically converted to ranks. Column names will be used to populate the X axis of the chart. Suggested data type hints: number. Flourish type hint: columns + :type horserace_stages: Union[list, str], optional + + :param horserace_category: Color by. Select a column to color the lines by. If omitted, colors will be assigned per name. Suggested data type hints: string. Flourish type hint: column + :type horserace_category: str, optional + + :param horserace_pic: Image. Add an image URL or right-click on a cell to upload an image. Suggested data type hints: string. Flourish type hint: column + :type horserace_pic: str, optional + + :param horserace_filter: Filter. Hide/show entrants based on the values in this column. Suggested data type hints: string, number, datetime. Flourish type hint: column + :type horserace_filter: str, optional + + :param captions_from: Stage to show. Must match the column headers in the main datasheet. Suggested data type hints: string. Flourish type hint: column + :type captions_from: str, optional + + :param captions_to: Stage to hide. Must match the column headers in the main datasheet. Suggested data type hints: string. Flourish type hint: column + :type captions_to: str, optional + + :param captions_text: Text. Text or HTML to show. Suggested data type hints: string. Flourish type hint: column + :type captions_text: str, optional + + :param captions_image: Image. Image to show. Suggested data type hints: string. Flourish type hint: column + :type captions_image: str, optional + :param captions_image_input_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_image_input_format: str, optional + :param captions_image_output_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_image_output_format: str, optional + :param captions_to_input_format: Formats/parses dates, strings, and numbers for the [to] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_to_input_format: str, optional + :param captions_to_output_format: Formats/parses dates, strings, and numbers for the [to] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_to_output_format: str, optional + :param captions_from_input_format: Formats/parses dates, strings, and numbers for the [from] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_from_input_format: str, optional + :param captions_from_output_format: Formats/parses dates, strings, and numbers for the [from] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_from_output_format: str, optional + :param captions_text_input_format: Formats/parses dates, strings, and numbers for the [text] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_text_input_format: str, optional + :param captions_text_output_format: Formats/parses dates, strings, and numbers for the [text] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type captions_text_output_format: str, optional + :param horserace_category_input_format: Formats/parses dates, strings, and numbers for the [category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type horserace_category_input_format: str, optional + :param horserace_category_output_format: Formats/parses dates, strings, and numbers for the [category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type horserace_category_output_format: str, optional + :param horserace_filter_input_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type horserace_filter_input_format: str, optional + :param horserace_filter_output_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type horserace_filter_output_format: str, optional + :param horserace_pic_input_format: Formats/parses dates, strings, and numbers for the [pic] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type horserace_pic_input_format: str, optional + :param horserace_pic_output_format: Formats/parses dates, strings, and numbers for the [pic] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type horserace_pic_output_format: str, optional + :param horserace_name_input_format: Formats/parses dates, strings, and numbers for the [name] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type horserace_name_input_format: str, optional + :param horserace_name_output_format: Formats/parses dates, strings, and numbers for the [name] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type horserace_name_output_format: str, optional + :param horserace_stages_input_format: Formats/parses dates, strings, and numbers for the [stages] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type horserace_stages_input_format: str, optional + :param horserace_stages_output_format: Formats/parses dates, strings, and numbers for the [stages] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type horserace_stages_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["horserace"] = {} + self.data_properties["horserace"] = {} + if horserace_data is not None: + horserace_columns = set(horserace_data.columns) + int_columns_horserace_data = horserace_data.select_dtypes( + include="int" + ).columns + horserace_data[int_columns_horserace_data] = horserace_data[ + int_columns_horserace_data + ].astype(str) + self.data_properties["horserace"] = horserace_data.to_dict(orient="records") + + self.bindings["captions"] = {} + self.data_properties["captions"] = {} + if captions_data is not None: + captions_columns = set(captions_data.columns) + int_columns_captions_data = captions_data.select_dtypes( + include="int" + ).columns + captions_data[int_columns_captions_data] = captions_data[ + int_columns_captions_data + ].astype(str) + self.data_properties["captions"] = captions_data.to_dict(orient="records") + self.metadata = { + "captions": {"image": {}, "to": {}, "from": {}, "text": {}}, + "horserace": { + "category": {}, + "filter": {}, + "pic": {}, + "name": {}, + "stages": {}, + }, + } + + if horserace_name is not None: + assert ( + horserace_name in horserace_columns + ), f"[horserace_name] is not a column in the data." + self.bindings["horserace"]["name"] = horserace_name + + if horserace_stages is not None: + if isinstance(horserace_stages, list): + for col in horserace_stages: + assert ( + col in horserace_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["horserace"]["stages"] = horserace_stages + elif isinstance(horserace_stages, str): + assert ( + horserace_stages in horserace_columns + ), f"[horserace_stages] is not a column in the data." + self.bindings["horserace"]["stages"] = [horserace_stages] + else: + self.bindings["horserace"]["stages"] = [] + + if horserace_category is not None: + assert ( + horserace_category in horserace_columns + ), f"[horserace_category] is not a column in the data." + self.bindings["horserace"]["category"] = horserace_category + + if horserace_pic is not None: + assert ( + horserace_pic in horserace_columns + ), f"[horserace_pic] is not a column in the data." + self.bindings["horserace"]["pic"] = horserace_pic + + if horserace_filter is not None: + assert ( + horserace_filter in horserace_columns + ), f"[horserace_filter] is not a column in the data." + self.bindings["horserace"]["filter"] = horserace_filter + + if captions_from is not None: + assert ( + captions_from in captions_columns + ), f"[captions_from] is not a column in the data." + self.bindings["captions"]["from"] = captions_from + + if captions_to is not None: + assert ( + captions_to in captions_columns + ), f"[captions_to] is not a column in the data." + self.bindings["captions"]["to"] = captions_to + + if captions_text is not None: + assert ( + captions_text in captions_columns + ), f"[captions_text] is not a column in the data." + self.bindings["captions"]["text"] = captions_text + + if captions_image is not None: + assert ( + captions_image in captions_columns + ), f"[captions_image] is not a column in the data." + self.bindings["captions"]["image"] = captions_image + + if horserace_name_output_format is not None: + if ( + horserace_name_input_format is None + and horserace_name_output_format is not None + ): + f"[horserace_name_input_format] and [horserace_name_output_format] must both be defined." + elif ( + horserace_name_input_format is not None + and horserace_name_output_format is None + ): + f"[horserace_name_input_format] and [horserace_name_output_format] must both be defined." + if horserace_name_output_format.startswith("%"): + self.metadata["horserace"]["name"]["type"] = "datetime" + self.metadata["horserace"]["name"]["type_id"] = ( + "datetime$" + horserace_name_input_format + ) + self.metadata["horserace"]["name"]["output_format_id"] = ( + "datetime$" + horserace_name_output_format + ) + elif "_" in horserace_name_output_format: + self.metadata["horserace"]["name"]["type"] = "number" + self.metadata["horserace"]["name"]["type_id"] = ( + "number$" + horserace_name_input_format + ) + self.metadata["horserace"]["name"]["output_format_id"] = ( + "number$" + horserace_name_output_format + ) + elif ( + horserace_name_output_format is not None + and not horserace_name_output_format.startswith("%") + and "_" not in horserace_name_output_format + ): + self.metadata["horserace"]["name"]["type"] = "string" + self.metadata["horserace"]["name"]["type_id"] = ( + "string$" + horserace_name_input_format + ) + self.metadata["horserace"]["name"]["output_format_id"] = ( + "string$" + horserace_name_output_format + ) + + if horserace_stages_output_format is not None: + if ( + horserace_stages_input_format is None + and horserace_stages_output_format is not None + ): + f"[horserace_stages_input_format] and [horserace_stages_output_format] must both be defined." + elif ( + horserace_stages_input_format is not None + and horserace_stages_output_format is None + ): + f"[horserace_stages_input_format] and [horserace_stages_output_format] must both be defined." + if horserace_stages_output_format.startswith("%"): + self.metadata["horserace"]["stages"]["type"] = "datetime" + self.metadata["horserace"]["stages"]["type_id"] = ( + "datetime$" + horserace_stages_input_format + ) + self.metadata["horserace"]["stages"]["output_format_id"] = ( + "datetime$" + horserace_stages_output_format + ) + elif "_" in horserace_stages_output_format: + self.metadata["horserace"]["stages"]["type"] = "number" + self.metadata["horserace"]["stages"]["type_id"] = ( + "number$" + horserace_stages_input_format + ) + self.metadata["horserace"]["stages"]["output_format_id"] = ( + "number$" + horserace_stages_output_format + ) + elif ( + horserace_stages_output_format is not None + and not horserace_stages_output_format.startswith("%") + and "_" not in horserace_stages_output_format + ): + self.metadata["horserace"]["stages"]["type"] = "string" + self.metadata["horserace"]["stages"]["type_id"] = ( + "string$" + horserace_stages_input_format + ) + self.metadata["horserace"]["stages"]["output_format_id"] = ( + "string$" + horserace_stages_output_format + ) + + if horserace_category_output_format is not None: + if ( + horserace_category_input_format is None + and horserace_category_output_format is not None + ): + f"[horserace_category_input_format] and [horserace_category_output_format] must both be defined." + elif ( + horserace_category_input_format is not None + and horserace_category_output_format is None + ): + f"[horserace_category_input_format] and [horserace_category_output_format] must both be defined." + if horserace_category_output_format.startswith("%"): + self.metadata["horserace"]["category"]["type"] = "datetime" + self.metadata["horserace"]["category"]["type_id"] = ( + "datetime$" + horserace_category_input_format + ) + self.metadata["horserace"]["category"]["output_format_id"] = ( + "datetime$" + horserace_category_output_format + ) + elif "_" in horserace_category_output_format: + self.metadata["horserace"]["category"]["type"] = "number" + self.metadata["horserace"]["category"]["type_id"] = ( + "number$" + horserace_category_input_format + ) + self.metadata["horserace"]["category"]["output_format_id"] = ( + "number$" + horserace_category_output_format + ) + elif ( + horserace_category_output_format is not None + and not horserace_category_output_format.startswith("%") + and "_" not in horserace_category_output_format + ): + self.metadata["horserace"]["category"]["type"] = "string" + self.metadata["horserace"]["category"]["type_id"] = ( + "string$" + horserace_category_input_format + ) + self.metadata["horserace"]["category"]["output_format_id"] = ( + "string$" + horserace_category_output_format + ) + + if horserace_pic_output_format is not None: + if ( + horserace_pic_input_format is None + and horserace_pic_output_format is not None + ): + f"[horserace_pic_input_format] and [horserace_pic_output_format] must both be defined." + elif ( + horserace_pic_input_format is not None + and horserace_pic_output_format is None + ): + f"[horserace_pic_input_format] and [horserace_pic_output_format] must both be defined." + if horserace_pic_output_format.startswith("%"): + self.metadata["horserace"]["pic"]["type"] = "datetime" + self.metadata["horserace"]["pic"]["type_id"] = ( + "datetime$" + horserace_pic_input_format + ) + self.metadata["horserace"]["pic"]["output_format_id"] = ( + "datetime$" + horserace_pic_output_format + ) + elif "_" in horserace_pic_output_format: + self.metadata["horserace"]["pic"]["type"] = "number" + self.metadata["horserace"]["pic"]["type_id"] = ( + "number$" + horserace_pic_input_format + ) + self.metadata["horserace"]["pic"]["output_format_id"] = ( + "number$" + horserace_pic_output_format + ) + elif ( + horserace_pic_output_format is not None + and not horserace_pic_output_format.startswith("%") + and "_" not in horserace_pic_output_format + ): + self.metadata["horserace"]["pic"]["type"] = "string" + self.metadata["horserace"]["pic"]["type_id"] = ( + "string$" + horserace_pic_input_format + ) + self.metadata["horserace"]["pic"]["output_format_id"] = ( + "string$" + horserace_pic_output_format + ) + + if horserace_filter_output_format is not None: + if ( + horserace_filter_input_format is None + and horserace_filter_output_format is not None + ): + f"[horserace_filter_input_format] and [horserace_filter_output_format] must both be defined." + elif ( + horserace_filter_input_format is not None + and horserace_filter_output_format is None + ): + f"[horserace_filter_input_format] and [horserace_filter_output_format] must both be defined." + if horserace_filter_output_format.startswith("%"): + self.metadata["horserace"]["filter"]["type"] = "datetime" + self.metadata["horserace"]["filter"]["type_id"] = ( + "datetime$" + horserace_filter_input_format + ) + self.metadata["horserace"]["filter"]["output_format_id"] = ( + "datetime$" + horserace_filter_output_format + ) + elif "_" in horserace_filter_output_format: + self.metadata["horserace"]["filter"]["type"] = "number" + self.metadata["horserace"]["filter"]["type_id"] = ( + "number$" + horserace_filter_input_format + ) + self.metadata["horserace"]["filter"]["output_format_id"] = ( + "number$" + horserace_filter_output_format + ) + elif ( + horserace_filter_output_format is not None + and not horserace_filter_output_format.startswith("%") + and "_" not in horserace_filter_output_format + ): + self.metadata["horserace"]["filter"]["type"] = "string" + self.metadata["horserace"]["filter"]["type_id"] = ( + "string$" + horserace_filter_input_format + ) + self.metadata["horserace"]["filter"]["output_format_id"] = ( + "string$" + horserace_filter_output_format + ) + + if captions_from_output_format is not None: + if ( + captions_from_input_format is None + and captions_from_output_format is not None + ): + f"[captions_from_input_format] and [captions_from_output_format] must both be defined." + elif ( + captions_from_input_format is not None + and captions_from_output_format is None + ): + f"[captions_from_input_format] and [captions_from_output_format] must both be defined." + if captions_from_output_format.startswith("%"): + self.metadata["captions"]["from"]["type"] = "datetime" + self.metadata["captions"]["from"]["type_id"] = ( + "datetime$" + captions_from_input_format + ) + self.metadata["captions"]["from"]["output_format_id"] = ( + "datetime$" + captions_from_output_format + ) + elif "_" in captions_from_output_format: + self.metadata["captions"]["from"]["type"] = "number" + self.metadata["captions"]["from"]["type_id"] = ( + "number$" + captions_from_input_format + ) + self.metadata["captions"]["from"]["output_format_id"] = ( + "number$" + captions_from_output_format + ) + elif ( + captions_from_output_format is not None + and not captions_from_output_format.startswith("%") + and "_" not in captions_from_output_format + ): + self.metadata["captions"]["from"]["type"] = "string" + self.metadata["captions"]["from"]["type_id"] = ( + "string$" + captions_from_input_format + ) + self.metadata["captions"]["from"]["output_format_id"] = ( + "string$" + captions_from_output_format + ) + + if captions_to_output_format is not None: + if ( + captions_to_input_format is None + and captions_to_output_format is not None + ): + f"[captions_to_input_format] and [captions_to_output_format] must both be defined." + elif ( + captions_to_input_format is not None + and captions_to_output_format is None + ): + f"[captions_to_input_format] and [captions_to_output_format] must both be defined." + if captions_to_output_format.startswith("%"): + self.metadata["captions"]["to"]["type"] = "datetime" + self.metadata["captions"]["to"]["type_id"] = ( + "datetime$" + captions_to_input_format + ) + self.metadata["captions"]["to"]["output_format_id"] = ( + "datetime$" + captions_to_output_format + ) + elif "_" in captions_to_output_format: + self.metadata["captions"]["to"]["type"] = "number" + self.metadata["captions"]["to"]["type_id"] = ( + "number$" + captions_to_input_format + ) + self.metadata["captions"]["to"]["output_format_id"] = ( + "number$" + captions_to_output_format + ) + elif ( + captions_to_output_format is not None + and not captions_to_output_format.startswith("%") + and "_" not in captions_to_output_format + ): + self.metadata["captions"]["to"]["type"] = "string" + self.metadata["captions"]["to"]["type_id"] = ( + "string$" + captions_to_input_format + ) + self.metadata["captions"]["to"]["output_format_id"] = ( + "string$" + captions_to_output_format + ) + + if captions_text_output_format is not None: + if ( + captions_text_input_format is None + and captions_text_output_format is not None + ): + f"[captions_text_input_format] and [captions_text_output_format] must both be defined." + elif ( + captions_text_input_format is not None + and captions_text_output_format is None + ): + f"[captions_text_input_format] and [captions_text_output_format] must both be defined." + if captions_text_output_format.startswith("%"): + self.metadata["captions"]["text"]["type"] = "datetime" + self.metadata["captions"]["text"]["type_id"] = ( + "datetime$" + captions_text_input_format + ) + self.metadata["captions"]["text"]["output_format_id"] = ( + "datetime$" + captions_text_output_format + ) + elif "_" in captions_text_output_format: + self.metadata["captions"]["text"]["type"] = "number" + self.metadata["captions"]["text"]["type_id"] = ( + "number$" + captions_text_input_format + ) + self.metadata["captions"]["text"]["output_format_id"] = ( + "number$" + captions_text_output_format + ) + elif ( + captions_text_output_format is not None + and not captions_text_output_format.startswith("%") + and "_" not in captions_text_output_format + ): + self.metadata["captions"]["text"]["type"] = "string" + self.metadata["captions"]["text"]["type_id"] = ( + "string$" + captions_text_input_format + ) + self.metadata["captions"]["text"]["output_format_id"] = ( + "string$" + captions_text_output_format + ) + + if captions_image_output_format is not None: + if ( + captions_image_input_format is None + and captions_image_output_format is not None + ): + f"[captions_image_input_format] and [captions_image_output_format] must both be defined." + elif ( + captions_image_input_format is not None + and captions_image_output_format is None + ): + f"[captions_image_input_format] and [captions_image_output_format] must both be defined." + if captions_image_output_format.startswith("%"): + self.metadata["captions"]["image"]["type"] = "datetime" + self.metadata["captions"]["image"]["type_id"] = ( + "datetime$" + captions_image_input_format + ) + self.metadata["captions"]["image"]["output_format_id"] = ( + "datetime$" + captions_image_output_format + ) + elif "_" in captions_image_output_format: + self.metadata["captions"]["image"]["type"] = "number" + self.metadata["captions"]["image"]["type_id"] = ( + "number$" + captions_image_input_format + ) + self.metadata["captions"]["image"]["output_format_id"] = ( + "number$" + captions_image_output_format + ) + elif ( + captions_image_output_format is not None + and not captions_image_output_format.startswith("%") + and "_" not in captions_image_output_format + ): + self.metadata["captions"]["image"]["type"] = "string" + self.metadata["captions"]["image"]["type_id"] = ( + "string$" + captions_image_input_format + ) + self.metadata["captions"]["image"]["output_format_id"] = ( + "string$" + captions_image_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_interactive_svg_data( + self, + data: pd.DataFrame = None, + id: str = None, + reveal_id: str = None, + h3: str = None, + h4: str = None, + content: str = None, + link: str = None, + metadata: Union[list, str] = None, + ): + """ + Bind data to chart: interactive svg. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param id: ID. A column of IDs of elements in the uploaded SVG file. Flourish type hint: column + :type id: str, optional + + :param reveal_id: Reveal layer. A column to reveal when layer is clicked. Flourish type hint: column + :type reveal_id: str, optional + + :param h3: Heading 1. A column containing the main header. Flourish type hint: column + :type h3: str, optional + + :param h4: Heading 2. A column containing a secondary header. Flourish type hint: column + :type h4: str, optional + + :param content: Content. A column containing text or HTML to display. Flourish type hint: column + :type content: str, optional + + :param link: Link. A URL that can be opened when a layer is clicked. Any reveal layers or popups will be overridden. Flourish type hint: column + :type link: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Flourish type hint: columns + :type metadata: Union[list, str], optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = {} + + if id is not None: + assert id in data_columns, f"[id] is not a column in the data." + self.bindings["data"]["id"] = id + + if reveal_id is not None: + assert ( + reveal_id in data_columns + ), f"[reveal_id] is not a column in the data." + self.bindings["data"]["reveal_id"] = reveal_id + + if h3 is not None: + assert h3 in data_columns, f"[h3] is not a column in the data." + self.bindings["data"]["h3"] = h3 + + if h4 is not None: + assert h4 in data_columns, f"[h4] is not a column in the data." + self.bindings["data"]["h4"] = h4 + + if content is not None: + assert content in data_columns, f"[content] is not a column in the data." + self.bindings["data"]["content"] = content + + if link is not None: + assert link in data_columns, f"[link] is not a column in the data." + self.bindings["data"]["link"] = link + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in data_columns + ), f"[metadata] is not a column in the data." + self.bindings["data"]["metadata"] = [metadata] + else: + self.bindings["data"]["metadata"] = [] + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_line_bar_pie_data( + self, + data: pd.DataFrame = None, + label: str = None, + value: Union[list, str] = None, + facet: str = None, + filter: str = None, + metadata: Union[list, str] = None, + facet_input_format: str = None, + facet_output_format: str = None, + metadata_input_format: str = None, + metadata_output_format: str = None, + label_input_format: str = None, + label_output_format: str = None, + filter_input_format: str = None, + filter_output_format: str = None, + value_input_format: str = None, + value_output_format: str = None, + ): + """ + Bind data to chart: line, bar and pie charts. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param label: Labels/time. A column of names, numbers or datetimes. Suggested data type hints: string, datetime, number. Flourish type hint: column + :type label: str, optional + + :param value: Values. One or more columns of numbers. The Preferred output format of the first column is used to format values. Suggested data type hints: number. Flourish type hint: columns + :type value: Union[list, str], optional + + :param facet: Charts grid. If specified and Grid of charts view is on, creates a separate mini chart for each value found in the column. Suggested data type hints: string. Flourish type hint: column + :type facet: str, optional + + :param filter: Row filter. Use this column to create a user-facing row control. To create a column filter, use the Series filter option in the settings panel instead. Suggested data type hints: string, datetime, number. Flourish type hint: column + :type filter: str, optional + + :param metadata: Info for custom popups. One or more columns of information (text, image URLs , embedded charts etc) to include in custom popups and panels Suggested data type hints: string, datetime, number. Flourish type hint: columns + :type metadata: Union[list, str], optional + :param facet_input_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_input_format: str, optional + :param facet_output_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_output_format: str, optional + :param metadata_input_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_input_format: str, optional + :param metadata_output_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_output_format: str, optional + :param label_input_format: Formats/parses dates, strings, and numbers for the [label] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type label_input_format: str, optional + :param label_output_format: Formats/parses dates, strings, and numbers for the [label] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type label_output_format: str, optional + :param filter_input_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_input_format: str, optional + :param filter_output_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_output_format: str, optional + :param value_input_format: Formats/parses dates, strings, and numbers for the [value] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type value_input_format: str, optional + :param value_output_format: Formats/parses dates, strings, and numbers for the [value] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type value_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = { + "data": { + "facet": {}, + "metadata": {}, + "label": {}, + "filter": {}, + "value": {}, + } + } + + if label is not None: + assert label in data_columns, f"[label] is not a column in the data." + self.bindings["data"]["label"] = label + + if value is not None: + if isinstance(value, list): + for col in value: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["value"] = value + elif isinstance(value, str): + assert value in data_columns, f"[value] is not a column in the data." + self.bindings["data"]["value"] = [value] + else: + self.bindings["data"]["value"] = [] + + if facet is not None: + assert facet in data_columns, f"[facet] is not a column in the data." + self.bindings["data"]["facet"] = facet + + if filter is not None: + assert filter in data_columns, f"[filter] is not a column in the data." + self.bindings["data"]["filter"] = filter + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in data_columns + ), f"[metadata] is not a column in the data." + self.bindings["data"]["metadata"] = [metadata] + else: + self.bindings["data"]["metadata"] = [] + + if label_output_format is not None: + if label_input_format is None and label_output_format is not None: + f"[label_input_format] and [label_output_format] must both be defined." + elif label_input_format is not None and label_output_format is None: + f"[label_input_format] and [label_output_format] must both be defined." + if label_output_format.startswith("%"): + self.metadata["data"]["label"]["type"] = "datetime" + self.metadata["data"]["label"]["type_id"] = ( + "datetime$" + label_input_format + ) + self.metadata["data"]["label"]["output_format_id"] = ( + "datetime$" + label_output_format + ) + elif "_" in label_output_format: + self.metadata["data"]["label"]["type"] = "number" + self.metadata["data"]["label"]["type_id"] = ( + "number$" + label_input_format + ) + self.metadata["data"]["label"]["output_format_id"] = ( + "number$" + label_output_format + ) + elif ( + label_output_format is not None + and not label_output_format.startswith("%") + and "_" not in label_output_format + ): + self.metadata["data"]["label"]["type"] = "string" + self.metadata["data"]["label"]["type_id"] = ( + "string$" + label_input_format + ) + self.metadata["data"]["label"]["output_format_id"] = ( + "string$" + label_output_format + ) + + if value_output_format is not None: + if value_input_format is None and value_output_format is not None: + f"[value_input_format] and [value_output_format] must both be defined." + elif value_input_format is not None and value_output_format is None: + f"[value_input_format] and [value_output_format] must both be defined." + if value_output_format.startswith("%"): + self.metadata["data"]["value"]["type"] = "datetime" + self.metadata["data"]["value"]["type_id"] = ( + "datetime$" + value_input_format + ) + self.metadata["data"]["value"]["output_format_id"] = ( + "datetime$" + value_output_format + ) + elif "_" in value_output_format: + self.metadata["data"]["value"]["type"] = "number" + self.metadata["data"]["value"]["type_id"] = ( + "number$" + value_input_format + ) + self.metadata["data"]["value"]["output_format_id"] = ( + "number$" + value_output_format + ) + elif ( + value_output_format is not None + and not value_output_format.startswith("%") + and "_" not in value_output_format + ): + self.metadata["data"]["value"]["type"] = "string" + self.metadata["data"]["value"]["type_id"] = ( + "string$" + value_input_format + ) + self.metadata["data"]["value"]["output_format_id"] = ( + "string$" + value_output_format + ) + + if facet_output_format is not None: + if facet_input_format is None and facet_output_format is not None: + f"[facet_input_format] and [facet_output_format] must both be defined." + elif facet_input_format is not None and facet_output_format is None: + f"[facet_input_format] and [facet_output_format] must both be defined." + if facet_output_format.startswith("%"): + self.metadata["data"]["facet"]["type"] = "datetime" + self.metadata["data"]["facet"]["type_id"] = ( + "datetime$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "datetime$" + facet_output_format + ) + elif "_" in facet_output_format: + self.metadata["data"]["facet"]["type"] = "number" + self.metadata["data"]["facet"]["type_id"] = ( + "number$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "number$" + facet_output_format + ) + elif ( + facet_output_format is not None + and not facet_output_format.startswith("%") + and "_" not in facet_output_format + ): + self.metadata["data"]["facet"]["type"] = "string" + self.metadata["data"]["facet"]["type_id"] = ( + "string$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "string$" + facet_output_format + ) + + if filter_output_format is not None: + if filter_input_format is None and filter_output_format is not None: + f"[filter_input_format] and [filter_output_format] must both be defined." + elif filter_input_format is not None and filter_output_format is None: + f"[filter_input_format] and [filter_output_format] must both be defined." + if filter_output_format.startswith("%"): + self.metadata["data"]["filter"]["type"] = "datetime" + self.metadata["data"]["filter"]["type_id"] = ( + "datetime$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "datetime$" + filter_output_format + ) + elif "_" in filter_output_format: + self.metadata["data"]["filter"]["type"] = "number" + self.metadata["data"]["filter"]["type_id"] = ( + "number$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "number$" + filter_output_format + ) + elif ( + filter_output_format is not None + and not filter_output_format.startswith("%") + and "_" not in filter_output_format + ): + self.metadata["data"]["filter"]["type"] = "string" + self.metadata["data"]["filter"]["type_id"] = ( + "string$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "string$" + filter_output_format + ) + + if metadata_output_format is not None: + if metadata_input_format is None and metadata_output_format is not None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + elif metadata_input_format is not None and metadata_output_format is None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + if metadata_output_format.startswith("%"): + self.metadata["data"]["metadata"]["type"] = "datetime" + self.metadata["data"]["metadata"]["type_id"] = ( + "datetime$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "datetime$" + metadata_output_format + ) + elif "_" in metadata_output_format: + self.metadata["data"]["metadata"]["type"] = "number" + self.metadata["data"]["metadata"]["type_id"] = ( + "number$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "number$" + metadata_output_format + ) + elif ( + metadata_output_format is not None + and not metadata_output_format.startswith("%") + and "_" not in metadata_output_format + ): + self.metadata["data"]["metadata"]["type"] = "string" + self.metadata["data"]["metadata"]["type_id"] = ( + "string$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "string$" + metadata_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_marimekko_data( + self, + data: pd.DataFrame = None, + name: str = None, + unstacked_value: str = None, + stacked_values: Union[list, str] = None, + facet: str = None, + category: str = None, + filter: str = None, + metadata: Union[list, str] = None, + category_input_format: str = None, + category_output_format: str = None, + filter_input_format: str = None, + filter_output_format: str = None, + facet_input_format: str = None, + facet_output_format: str = None, + metadata_input_format: str = None, + metadata_output_format: str = None, + name_input_format: str = None, + name_output_format: str = None, + unstacked_value_input_format: str = None, + unstacked_value_output_format: str = None, + stacked_values_input_format: str = None, + stacked_values_output_format: str = None, + ): + """ + Bind data to chart: marimekko. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param name: Name + :type name: str, optional + + :param unstacked_value: Unstacked value + :type unstacked_value: str, optional + + :param stacked_values: Secondary metric. One or more numeric columns. Each column will form a segment of a stacked bar. Flourish type hint: columns + :type stacked_values: Union[list, str], optional + + :param facet: Facet + :type facet: str, optional + + :param category: Color category. Suggested data type hints: string. Flourish type hint: column + :type category: str, optional + + :param filter: Filter by. (Optional) Choose a categorical column to filter by. A dropdown will appear in the visualization. Suggested data type hints: string, number, datetime. Flourish type hint: column + :type filter: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Suggested data type hints: number, string, datetime. Flourish type hint: columns + :type metadata: Union[list, str], optional + :param category_input_format: Formats/parses dates, strings, and numbers for the [category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type category_input_format: str, optional + :param category_output_format: Formats/parses dates, strings, and numbers for the [category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type category_output_format: str, optional + :param filter_input_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_input_format: str, optional + :param filter_output_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_output_format: str, optional + :param facet_input_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_input_format: str, optional + :param facet_output_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_output_format: str, optional + :param metadata_input_format: Formats/parses dates, strings, and numbers for the [metadata] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_input_format: str, optional + :param metadata_output_format: Formats/parses dates, strings, and numbers for the [metadata] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_output_format: str, optional + :param name_input_format: Formats/parses dates, strings, and numbers for the [name] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type name_input_format: str, optional + :param name_output_format: Formats/parses dates, strings, and numbers for the [name] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type name_output_format: str, optional + :param unstacked_value_input_format: Formats/parses dates, strings, and numbers for the [unstacked_value] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type unstacked_value_input_format: str, optional + :param unstacked_value_output_format: Formats/parses dates, strings, and numbers for the [unstacked_value] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type unstacked_value_output_format: str, optional + :param stacked_values_input_format: Formats/parses dates, strings, and numbers for the [stacked_values] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type stacked_values_input_format: str, optional + :param stacked_values_output_format: Formats/parses dates, strings, and numbers for the [stacked_values] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type stacked_values_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = { + "data": { + "category": {}, + "filter": {}, + "facet": {}, + "metadata": {}, + "name": {}, + "unstacked_value": {}, + "stacked_values": {}, + } + } + + if name is not None: + assert name in data_columns, f"[name] is not a column in the data." + self.bindings["data"]["name"] = name + + if unstacked_value is not None: + assert ( + unstacked_value in data_columns + ), f"[unstacked_value] is not a column in the data." + self.bindings["data"]["unstacked_value"] = unstacked_value + + if stacked_values is not None: + if isinstance(stacked_values, list): + for col in stacked_values: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["stacked_values"] = stacked_values + elif isinstance(stacked_values, str): + assert ( + stacked_values in data_columns + ), f"[stacked_values] is not a column in the data." + self.bindings["data"]["stacked_values"] = [stacked_values] + else: + self.bindings["data"]["stacked_values"] = [] + + if facet is not None: + assert facet in data_columns, f"[facet] is not a column in the data." + self.bindings["data"]["facet"] = facet + + if category is not None: + assert category in data_columns, f"[category] is not a column in the data." + self.bindings["data"]["category"] = category + + if filter is not None: + assert filter in data_columns, f"[filter] is not a column in the data." + self.bindings["data"]["filter"] = filter + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in data_columns + ), f"[metadata] is not a column in the data." + self.bindings["data"]["metadata"] = [metadata] + else: + self.bindings["data"]["metadata"] = [] + + if name_output_format is not None: + if name_input_format is None and name_output_format is not None: + f"[name_input_format] and [name_output_format] must both be defined." + elif name_input_format is not None and name_output_format is None: + f"[name_input_format] and [name_output_format] must both be defined." + if name_output_format.startswith("%"): + self.metadata["data"]["name"]["type"] = "datetime" + self.metadata["data"]["name"]["type_id"] = ( + "datetime$" + name_input_format + ) + self.metadata["data"]["name"]["output_format_id"] = ( + "datetime$" + name_output_format + ) + elif "_" in name_output_format: + self.metadata["data"]["name"]["type"] = "number" + self.metadata["data"]["name"]["type_id"] = "number$" + name_input_format + self.metadata["data"]["name"]["output_format_id"] = ( + "number$" + name_output_format + ) + elif ( + name_output_format is not None + and not name_output_format.startswith("%") + and "_" not in name_output_format + ): + self.metadata["data"]["name"]["type"] = "string" + self.metadata["data"]["name"]["type_id"] = "string$" + name_input_format + self.metadata["data"]["name"]["output_format_id"] = ( + "string$" + name_output_format + ) + + if unstacked_value_output_format is not None: + if ( + unstacked_value_input_format is None + and unstacked_value_output_format is not None + ): + f"[unstacked_value_input_format] and [unstacked_value_output_format] must both be defined." + elif ( + unstacked_value_input_format is not None + and unstacked_value_output_format is None + ): + f"[unstacked_value_input_format] and [unstacked_value_output_format] must both be defined." + if unstacked_value_output_format.startswith("%"): + self.metadata["data"]["unstacked_value"]["type"] = "datetime" + self.metadata["data"]["unstacked_value"]["type_id"] = ( + "datetime$" + unstacked_value_input_format + ) + self.metadata["data"]["unstacked_value"]["output_format_id"] = ( + "datetime$" + unstacked_value_output_format + ) + elif "_" in unstacked_value_output_format: + self.metadata["data"]["unstacked_value"]["type"] = "number" + self.metadata["data"]["unstacked_value"]["type_id"] = ( + "number$" + unstacked_value_input_format + ) + self.metadata["data"]["unstacked_value"]["output_format_id"] = ( + "number$" + unstacked_value_output_format + ) + elif ( + unstacked_value_output_format is not None + and not unstacked_value_output_format.startswith("%") + and "_" not in unstacked_value_output_format + ): + self.metadata["data"]["unstacked_value"]["type"] = "string" + self.metadata["data"]["unstacked_value"]["type_id"] = ( + "string$" + unstacked_value_input_format + ) + self.metadata["data"]["unstacked_value"]["output_format_id"] = ( + "string$" + unstacked_value_output_format + ) + + if stacked_values_output_format is not None: + if ( + stacked_values_input_format is None + and stacked_values_output_format is not None + ): + f"[stacked_values_input_format] and [stacked_values_output_format] must both be defined." + elif ( + stacked_values_input_format is not None + and stacked_values_output_format is None + ): + f"[stacked_values_input_format] and [stacked_values_output_format] must both be defined." + if stacked_values_output_format.startswith("%"): + self.metadata["data"]["stacked_values"]["type"] = "datetime" + self.metadata["data"]["stacked_values"]["type_id"] = ( + "datetime$" + stacked_values_input_format + ) + self.metadata["data"]["stacked_values"]["output_format_id"] = ( + "datetime$" + stacked_values_output_format + ) + elif "_" in stacked_values_output_format: + self.metadata["data"]["stacked_values"]["type"] = "number" + self.metadata["data"]["stacked_values"]["type_id"] = ( + "number$" + stacked_values_input_format + ) + self.metadata["data"]["stacked_values"]["output_format_id"] = ( + "number$" + stacked_values_output_format + ) + elif ( + stacked_values_output_format is not None + and not stacked_values_output_format.startswith("%") + and "_" not in stacked_values_output_format + ): + self.metadata["data"]["stacked_values"]["type"] = "string" + self.metadata["data"]["stacked_values"]["type_id"] = ( + "string$" + stacked_values_input_format + ) + self.metadata["data"]["stacked_values"]["output_format_id"] = ( + "string$" + stacked_values_output_format + ) + + if facet_output_format is not None: + if facet_input_format is None and facet_output_format is not None: + f"[facet_input_format] and [facet_output_format] must both be defined." + elif facet_input_format is not None and facet_output_format is None: + f"[facet_input_format] and [facet_output_format] must both be defined." + if facet_output_format.startswith("%"): + self.metadata["data"]["facet"]["type"] = "datetime" + self.metadata["data"]["facet"]["type_id"] = ( + "datetime$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "datetime$" + facet_output_format + ) + elif "_" in facet_output_format: + self.metadata["data"]["facet"]["type"] = "number" + self.metadata["data"]["facet"]["type_id"] = ( + "number$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "number$" + facet_output_format + ) + elif ( + facet_output_format is not None + and not facet_output_format.startswith("%") + and "_" not in facet_output_format + ): + self.metadata["data"]["facet"]["type"] = "string" + self.metadata["data"]["facet"]["type_id"] = ( + "string$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "string$" + facet_output_format + ) + + if category_output_format is not None: + if category_input_format is None and category_output_format is not None: + f"[category_input_format] and [category_output_format] must both be defined." + elif category_input_format is not None and category_output_format is None: + f"[category_input_format] and [category_output_format] must both be defined." + if category_output_format.startswith("%"): + self.metadata["data"]["category"]["type"] = "datetime" + self.metadata["data"]["category"]["type_id"] = ( + "datetime$" + category_input_format + ) + self.metadata["data"]["category"]["output_format_id"] = ( + "datetime$" + category_output_format + ) + elif "_" in category_output_format: + self.metadata["data"]["category"]["type"] = "number" + self.metadata["data"]["category"]["type_id"] = ( + "number$" + category_input_format + ) + self.metadata["data"]["category"]["output_format_id"] = ( + "number$" + category_output_format + ) + elif ( + category_output_format is not None + and not category_output_format.startswith("%") + and "_" not in category_output_format + ): + self.metadata["data"]["category"]["type"] = "string" + self.metadata["data"]["category"]["type_id"] = ( + "string$" + category_input_format + ) + self.metadata["data"]["category"]["output_format_id"] = ( + "string$" + category_output_format + ) + + if filter_output_format is not None: + if filter_input_format is None and filter_output_format is not None: + f"[filter_input_format] and [filter_output_format] must both be defined." + elif filter_input_format is not None and filter_output_format is None: + f"[filter_input_format] and [filter_output_format] must both be defined." + if filter_output_format.startswith("%"): + self.metadata["data"]["filter"]["type"] = "datetime" + self.metadata["data"]["filter"]["type_id"] = ( + "datetime$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "datetime$" + filter_output_format + ) + elif "_" in filter_output_format: + self.metadata["data"]["filter"]["type"] = "number" + self.metadata["data"]["filter"]["type_id"] = ( + "number$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "number$" + filter_output_format + ) + elif ( + filter_output_format is not None + and not filter_output_format.startswith("%") + and "_" not in filter_output_format + ): + self.metadata["data"]["filter"]["type"] = "string" + self.metadata["data"]["filter"]["type_id"] = ( + "string$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "string$" + filter_output_format + ) + + if metadata_output_format is not None: + if metadata_input_format is None and metadata_output_format is not None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + elif metadata_input_format is not None and metadata_output_format is None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + if metadata_output_format.startswith("%"): + self.metadata["data"]["metadata"]["type"] = "datetime" + self.metadata["data"]["metadata"]["type_id"] = ( + "datetime$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "datetime$" + metadata_output_format + ) + elif "_" in metadata_output_format: + self.metadata["data"]["metadata"]["type"] = "number" + self.metadata["data"]["metadata"]["type_id"] = ( + "number$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "number$" + metadata_output_format + ) + elif ( + metadata_output_format is not None + and not metadata_output_format.startswith("%") + and "_" not in metadata_output_format + ): + self.metadata["data"]["metadata"]["type"] = "string" + self.metadata["data"]["metadata"]["type_id"] = ( + "string$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "string$" + metadata_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_network_graph_data( + self, + links_data: pd.DataFrame = None, + nodes_data: pd.DataFrame = None, + links_source: str = None, + links_target: str = None, + links_value: str = None, + nodes_id: str = None, + nodes_group: str = None, + nodes_size: str = None, + nodes_image: str = None, + nodes_metadata: Union[list, str] = None, + ): + """ + Bind data to chart: network graph. + + :param links_data: Links data. defaults to None + :type links_data: pd.DataFrame, optional + :param nodes_data: Nodes data. defaults to None + :type nodes_data: pd.DataFrame, optional + + :param links_source: Links source + :type links_source: str, optional + + :param links_target: Links target + :type links_target: str, optional + + :param links_value: Size by. A numerical value used to set the thickness of the links. Flourish type hint: column + :type links_value: str, optional + + :param nodes_id: ID. A unique identifier for each point in the network. If not specified, point information will be extracted from the links sheet. Flourish type hint: column + :type nodes_id: str, optional + + :param nodes_group: Color by. A group to which the point belongs. If set, can be used to color the points. Ignored if ID not set. Flourish type hint: column + :type nodes_group: str, optional + + :param nodes_size: Size by. A numerical value used to size the points. Ignored if ID not set. Flourish type hint: column + :type nodes_size: str, optional + + :param nodes_image: Image. An image to go into the circle. Flourish type hint: column + :type nodes_image: str, optional + + :param nodes_metadata: Info for popups. One or more columns of information (text, image URLs , embedded charts etc) to include in popups and panels Ignored if ID not set. Flourish type hint: columns + :type nodes_metadata: Union[list, str], optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["links"] = {} + self.data_properties["links"] = {} + if links_data is not None: + links_columns = set(links_data.columns) + int_columns_links_data = links_data.select_dtypes(include="int").columns + links_data[int_columns_links_data] = links_data[ + int_columns_links_data + ].astype(str) + self.data_properties["links"] = links_data.to_dict(orient="records") + + self.bindings["nodes"] = {} + self.data_properties["nodes"] = {} + if nodes_data is not None: + nodes_columns = set(nodes_data.columns) + int_columns_nodes_data = nodes_data.select_dtypes(include="int").columns + nodes_data[int_columns_nodes_data] = nodes_data[ + int_columns_nodes_data + ].astype(str) + self.data_properties["nodes"] = nodes_data.to_dict(orient="records") + self.metadata = {} + + if links_source is not None: + assert ( + links_source in links_columns + ), f"[links_source] is not a column in the data." + self.bindings["links"]["source"] = links_source + + if links_target is not None: + assert ( + links_target in links_columns + ), f"[links_target] is not a column in the data." + self.bindings["links"]["target"] = links_target + + if links_value is not None: + assert ( + links_value in links_columns + ), f"[links_value] is not a column in the data." + self.bindings["links"]["value"] = links_value + + if nodes_id is not None: + assert nodes_id in nodes_columns, f"[nodes_id] is not a column in the data." + self.bindings["nodes"]["id"] = nodes_id + + if nodes_group is not None: + assert ( + nodes_group in nodes_columns + ), f"[nodes_group] is not a column in the data." + self.bindings["nodes"]["group"] = nodes_group + + if nodes_size is not None: + assert ( + nodes_size in nodes_columns + ), f"[nodes_size] is not a column in the data." + self.bindings["nodes"]["size"] = nodes_size + + if nodes_image is not None: + assert ( + nodes_image in nodes_columns + ), f"[nodes_image] is not a column in the data." + self.bindings["nodes"]["image"] = nodes_image + + if nodes_metadata is not None: + if isinstance(nodes_metadata, list): + for col in nodes_metadata: + assert ( + col in nodes_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["nodes"]["metadata"] = nodes_metadata + elif isinstance(nodes_metadata, str): + assert ( + nodes_metadata in nodes_columns + ), f"[nodes_metadata] is not a column in the data." + self.bindings["nodes"]["metadata"] = [nodes_metadata] + else: + self.bindings["nodes"]["metadata"] = [] + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_parliament_chart_data( + self, + data: pd.DataFrame = None, + party: str = None, + seats: Union[list, str] = None, + ): + """ + Bind data to chart: parliament chart. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param party: Party + :type party: str, optional + + :param seats: Seats. This should point to the column with election data. Flourish type hint: columns + :type seats: Union[list, str], optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = {} + + if party is not None: + assert party in data_columns, f"[party] is not a column in the data." + self.bindings["data"]["party"] = party + + if seats is not None: + if isinstance(seats, list): + for col in seats: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["seats"] = seats + elif isinstance(seats, str): + assert seats in data_columns, f"[seats] is not a column in the data." + self.bindings["data"]["seats"] = [seats] + else: + self.bindings["data"]["seats"] = [] + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_pictogram_data( + self, + data: pd.DataFrame = None, + icons_data: pd.DataFrame = None, + main_category: str = None, + sub_category: str = None, + values: Union[list, str] = None, + icon_id: str = None, + color: str = None, + metadata: Union[list, str] = None, + icons_id: str = None, + icons_path_string: str = None, + icons_width: str = None, + icons_height: str = None, + ): + """ + Bind data to chart: pictogram. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + :param icons_data: Icons data. defaults to None + :type icons_data: pd.DataFrame, optional + + :param main_category: Main category. The (categorical) column that defines the categories along the main axis. Flourish type hint: column + :type main_category: str, optional + + :param sub_category: Subcategory. The (categorical) column that defines the categories within each bar. Flourish type hint: column + :type sub_category: str, optional + + :param values: Values. (Optional) Choose the numeric columns to determine the size of each bar. If more than 1 is chosen, a dropdown will appear in the visualization, which lets the user choose. Flourish type hint: columns + :type values: Union[list, str], optional + + :param icon_id: Icon ID. IDs for joining icons in the Icons datasheet. Must contain IDs that match Icon ID values in Icons Set to the same column as the Main category or Subcategory. Flourish type hint: column + :type icon_id: str, optional + + :param color: Color. The (categorical) column which determines the icon color. Set to the same column as the Main category or Subcategory. Flourish type hint: column + :type color: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Flourish type hint: columns + :type metadata: Union[list, str], optional + + :param icons_id: Icon ID. Unique ID for joining icon path strings. Must contain IDs that match the Icon ID values in DataFlourish type hint: column + :type icons_id: str, optional + + :param icons_path_string: Icon. Icon path string (e.g. "M10,10 l80,0 l0,80 l-80,0 z") or the name of a built-in icon (e.g. "female"). Flourish type hint: column + :type icons_path_string: str, optional + + :param icons_width: Icon width. Icon width (in pixels). Flourish type hint: column + :type icons_width: str, optional + + :param icons_height: Icon height. Icon height (in pixels). Flourish type hint: column + :type icons_height: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + + self.bindings["icons"] = {} + self.data_properties["icons"] = {} + if icons_data is not None: + icons_columns = set(icons_data.columns) + int_columns_icons_data = icons_data.select_dtypes(include="int").columns + icons_data[int_columns_icons_data] = icons_data[ + int_columns_icons_data + ].astype(str) + self.data_properties["icons"] = icons_data.to_dict(orient="records") + self.metadata = {} + + if main_category is not None: + assert ( + main_category in data_columns + ), f"[main_category] is not a column in the data." + self.bindings["data"]["main_category"] = main_category + + if sub_category is not None: + assert ( + sub_category in data_columns + ), f"[sub_category] is not a column in the data." + self.bindings["data"]["sub_category"] = sub_category + + if values is not None: + if isinstance(values, list): + for col in values: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["values"] = values + elif isinstance(values, str): + assert values in data_columns, f"[values] is not a column in the data." + self.bindings["data"]["values"] = [values] + else: + self.bindings["data"]["values"] = [] + + if icon_id is not None: + assert icon_id in data_columns, f"[icon_id] is not a column in the data." + self.bindings["data"]["icon_id"] = icon_id + + if color is not None: + assert color in data_columns, f"[color] is not a column in the data." + self.bindings["data"]["color"] = color + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in data_columns + ), f"[metadata] is not a column in the data." + self.bindings["data"]["metadata"] = [metadata] + else: + self.bindings["data"]["metadata"] = [] + + if icons_id is not None: + assert icons_id in icons_columns, f"[icons_id] is not a column in the data." + self.bindings["icons"]["id"] = icons_id + + if icons_path_string is not None: + assert ( + icons_path_string in icons_columns + ), f"[icons_path_string] is not a column in the data." + self.bindings["icons"]["path_string"] = icons_path_string + + if icons_width is not None: + assert ( + icons_width in icons_columns + ), f"[icons_width] is not a column in the data." + self.bindings["icons"]["width"] = icons_width + + if icons_height is not None: + assert ( + icons_height in icons_columns + ), f"[icons_height] is not a column in the data." + self.bindings["icons"]["height"] = icons_height + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_quiz_data( + self, + questions_data: pd.DataFrame = None, + scores_data: pd.DataFrame = None, + results_data: pd.DataFrame = None, + questions_text: str = None, + questions_explanation: str = None, + questions_input_type: str = None, + questions_answers: Union[list, str] = None, + questions_suffix: str = None, + questions_choices: str = None, + scores_question: str = None, + scores_range: str = None, + scores_explanation: str = None, + scores_media: str = None, + results_range: str = None, + results_text: str = None, + results_media: str = None, + ): + """ + Bind data to chart: quiz. + + :param questions_data: Questions data. defaults to None + :type questions_data: pd.DataFrame, optional + :param scores_data: Scores data. defaults to None + :type scores_data: pd.DataFrame, optional + :param results_data: Results data. defaults to None + :type results_data: pd.DataFrame, optional + + :param questions_text: Text. Question text. Flourish type hint: column + :type questions_text: str, optional + + :param questions_explanation: Explanation. A short text explanation accompanying the question. Flourish type hint: column + :type questions_explanation: str, optional + + :param questions_input_type: Input type. Type of answer input, choose between slider or multiple choice Flourish type hint: column + :type questions_input_type: str, optional + + :param questions_answers: Answers. The correct answer to the question. The score will be decided by the difference between this answer and your input. Its possible to select multiple columns with answers; this will create a dropdown list above the quiz where you can select which answer to compare to. Flourish type hint: columns + :type questions_answers: Union[list, str], optional + + :param questions_suffix: Slider input suffix. Add a suffix after the value, eg. "%" or "people" (only for slider input type). Flourish type hint: column + :type questions_suffix: str, optional + + :param questions_choices: Multiple choice options. Options to show in multiple choice questions. Divide using "::" (eg. "Cat :: Dog :: Sheep :: Badger"). Flourish type hint: column + :type questions_choices: str, optional + + :param scores_question: Question. Question that the answer belongs to. Flourish type hint: column + :type scores_question: str, optional + + :param scores_range: Answer. The answer to the question. This can be text for multiple choice questions. For slider answers, you can use numbers or number ranges, values could be "0-10" or "4" or "*" to select all answers. You can also add multiple rows with score ranges per question; the more specific scores will take priority (e.g. it will choose "4" over "0-10" over "*"). Flourish type hint: column + :type scores_range: str, optional + + :param scores_explanation: Text. Text to show after answering question. Flourish type hint: column + :type scores_explanation: str, optional + + :param scores_media: Media. Picture to show after answering question. Flourish type hint: column + :type scores_media: str, optional + + :param results_range: Points range. A range of points youre targeting. You can use numbers or number ranges, values could be "0-10" or "4" or "*" to select all answers. You can also add multiple rows with score ranges per question; the more specific scores will take priority (e.g. it will choose "4" over "0-10" over "*"). Flourish type hint: column + :type results_range: str, optional + + :param results_text: Results text + :type results_text: str, optional + + :param results_media: Media. An image to show with the result. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column + :type results_media: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["questions"] = {} + self.data_properties["questions"] = {} + if questions_data is not None: + questions_columns = set(questions_data.columns) + int_columns_questions_data = questions_data.select_dtypes( + include="int" + ).columns + questions_data[int_columns_questions_data] = questions_data[ + int_columns_questions_data + ].astype(str) + self.data_properties["questions"] = questions_data.to_dict(orient="records") + + self.bindings["scores"] = {} + self.data_properties["scores"] = {} + if scores_data is not None: + scores_columns = set(scores_data.columns) + int_columns_scores_data = scores_data.select_dtypes(include="int").columns + scores_data[int_columns_scores_data] = scores_data[ + int_columns_scores_data + ].astype(str) + self.data_properties["scores"] = scores_data.to_dict(orient="records") + + self.bindings["results"] = {} + self.data_properties["results"] = {} + if results_data is not None: + results_columns = set(results_data.columns) + int_columns_results_data = results_data.select_dtypes(include="int").columns + results_data[int_columns_results_data] = results_data[ + int_columns_results_data + ].astype(str) + self.data_properties["results"] = results_data.to_dict(orient="records") + self.metadata = {} + + if questions_text is not None: + assert ( + questions_text in questions_columns + ), f"[questions_text] is not a column in the data." + self.bindings["questions"]["text"] = questions_text + + if questions_explanation is not None: + assert ( + questions_explanation in questions_columns + ), f"[questions_explanation] is not a column in the data." + self.bindings["questions"]["explanation"] = questions_explanation + + if questions_input_type is not None: + assert ( + questions_input_type in questions_columns + ), f"[questions_input_type] is not a column in the data." + self.bindings["questions"]["input_type"] = questions_input_type + + if questions_answers is not None: + if isinstance(questions_answers, list): + for col in questions_answers: + assert ( + col in questions_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["questions"]["answers"] = questions_answers + elif isinstance(questions_answers, str): + assert ( + questions_answers in questions_columns + ), f"[questions_answers] is not a column in the data." + self.bindings["questions"]["answers"] = [questions_answers] + else: + self.bindings["questions"]["answers"] = [] + + if questions_suffix is not None: + assert ( + questions_suffix in questions_columns + ), f"[questions_suffix] is not a column in the data." + self.bindings["questions"]["suffix"] = questions_suffix + + if questions_choices is not None: + assert ( + questions_choices in questions_columns + ), f"[questions_choices] is not a column in the data." + self.bindings["questions"]["choices"] = questions_choices + + if scores_question is not None: + assert ( + scores_question in scores_columns + ), f"[scores_question] is not a column in the data." + self.bindings["scores"]["question"] = scores_question + + if scores_range is not None: + assert ( + scores_range in scores_columns + ), f"[scores_range] is not a column in the data." + self.bindings["scores"]["range"] = scores_range + + if scores_explanation is not None: + assert ( + scores_explanation in scores_columns + ), f"[scores_explanation] is not a column in the data." + self.bindings["scores"]["explanation"] = scores_explanation + + if scores_media is not None: + assert ( + scores_media in scores_columns + ), f"[scores_media] is not a column in the data." + self.bindings["scores"]["media"] = scores_media + + if results_range is not None: + assert ( + results_range in results_columns + ), f"[results_range] is not a column in the data." + self.bindings["results"]["range"] = results_range + + if results_text is not None: + assert ( + results_text in results_columns + ), f"[results_text] is not a column in the data." + self.bindings["results"]["text"] = results_text + + if results_media is not None: + assert ( + results_media in results_columns + ), f"[results_media] is not a column in the data." + self.bindings["results"]["media"] = results_media + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_radar_data( + self, + data: pd.DataFrame = None, + name: str = None, + values: Union[list, str] = None, + filter: str = None, + color_category: str = None, + facet: Union[list, str] = None, + metadata: Union[list, str] = None, + color_category_input_format: str = None, + color_category_output_format: str = None, + filter_input_format: str = None, + filter_output_format: str = None, + facet_input_format: str = None, + facet_output_format: str = None, + metadata_input_format: str = None, + metadata_output_format: str = None, + name_input_format: str = None, + name_output_format: str = None, + values_input_format: str = None, + values_output_format: str = None, + ): + """ + Bind data to chart: radar chart. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param name: Name. A text column containing a name for each radar. Suggested data type hints: string. Flourish type hint: column + :type name: str, optional + + :param values: Values. Select three or more numerical columns. Suggested data type hints: number. Flourish type hint: columns + :type values: Union[list, str], optional + + :param filter: Filter. If set, creates a filter menu or time slider. Suggested data type hints: string, number, datetime. Flourish type hint: column + :type filter: str, optional + + :param color_category: Color category. Add a category to color by If empty, the name column will be used for colors. Suggested data type hints: string. Flourish type hint: column + :type color_category: str, optional + + :param facet: Grid of charts (facet). Create one column for each grouping you want to allow. Suggested data type hints: string. Flourish type hint: columns + :type facet: Union[list, str], optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Suggested data type hints: string, datetime, number. Flourish type hint: columns + :type metadata: Union[list, str], optional + :param color_category_input_format: Formats/parses dates, strings, and numbers for the [color_category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type color_category_input_format: str, optional + :param color_category_output_format: Formats/parses dates, strings, and numbers for the [color_category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type color_category_output_format: str, optional + :param filter_input_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_input_format: str, optional + :param filter_output_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_output_format: str, optional + :param facet_input_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_input_format: str, optional + :param facet_output_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_output_format: str, optional + :param metadata_input_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_input_format: str, optional + :param metadata_output_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_output_format: str, optional + :param name_input_format: Formats/parses dates, strings, and numbers for the [name] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type name_input_format: str, optional + :param name_output_format: Formats/parses dates, strings, and numbers for the [name] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type name_output_format: str, optional + :param values_input_format: Formats/parses dates, strings, and numbers for the [values] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type values_input_format: str, optional + :param values_output_format: Formats/parses dates, strings, and numbers for the [values] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type values_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = { + "data": { + "color_category": {}, + "filter": {}, + "facet": {}, + "metadata": {}, + "name": {}, + "values": {}, + } + } + + if name is not None: + assert name in data_columns, f"[name] is not a column in the data." + self.bindings["data"]["name"] = name + + if values is not None: + if isinstance(values, list): + for col in values: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["values"] = values + elif isinstance(values, str): + assert values in data_columns, f"[values] is not a column in the data." + self.bindings["data"]["values"] = [values] + else: + self.bindings["data"]["values"] = [] + + if filter is not None: + assert filter in data_columns, f"[filter] is not a column in the data." + self.bindings["data"]["filter"] = filter + + if color_category is not None: + assert ( + color_category in data_columns + ), f"[color_category] is not a column in the data." + self.bindings["data"]["color_category"] = color_category + + if facet is not None: + if isinstance(facet, list): + for col in facet: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["facet"] = facet + elif isinstance(facet, str): + assert facet in data_columns, f"[facet] is not a column in the data." + self.bindings["data"]["facet"] = [facet] + else: + self.bindings["data"]["facet"] = [] + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in data_columns + ), f"[metadata] is not a column in the data." + self.bindings["data"]["metadata"] = [metadata] + else: + self.bindings["data"]["metadata"] = [] + + if name_output_format is not None: + if name_input_format is None and name_output_format is not None: + f"[name_input_format] and [name_output_format] must both be defined." + elif name_input_format is not None and name_output_format is None: + f"[name_input_format] and [name_output_format] must both be defined." + if name_output_format.startswith("%"): + self.metadata["data"]["name"]["type"] = "datetime" + self.metadata["data"]["name"]["type_id"] = ( + "datetime$" + name_input_format + ) + self.metadata["data"]["name"]["output_format_id"] = ( + "datetime$" + name_output_format + ) + elif "_" in name_output_format: + self.metadata["data"]["name"]["type"] = "number" + self.metadata["data"]["name"]["type_id"] = "number$" + name_input_format + self.metadata["data"]["name"]["output_format_id"] = ( + "number$" + name_output_format + ) + elif ( + name_output_format is not None + and not name_output_format.startswith("%") + and "_" not in name_output_format + ): + self.metadata["data"]["name"]["type"] = "string" + self.metadata["data"]["name"]["type_id"] = "string$" + name_input_format + self.metadata["data"]["name"]["output_format_id"] = ( + "string$" + name_output_format + ) + + if values_output_format is not None: + if values_input_format is None and values_output_format is not None: + f"[values_input_format] and [values_output_format] must both be defined." + elif values_input_format is not None and values_output_format is None: + f"[values_input_format] and [values_output_format] must both be defined." + if values_output_format.startswith("%"): + self.metadata["data"]["values"]["type"] = "datetime" + self.metadata["data"]["values"]["type_id"] = ( + "datetime$" + values_input_format + ) + self.metadata["data"]["values"]["output_format_id"] = ( + "datetime$" + values_output_format + ) + elif "_" in values_output_format: + self.metadata["data"]["values"]["type"] = "number" + self.metadata["data"]["values"]["type_id"] = ( + "number$" + values_input_format + ) + self.metadata["data"]["values"]["output_format_id"] = ( + "number$" + values_output_format + ) + elif ( + values_output_format is not None + and not values_output_format.startswith("%") + and "_" not in values_output_format + ): + self.metadata["data"]["values"]["type"] = "string" + self.metadata["data"]["values"]["type_id"] = ( + "string$" + values_input_format + ) + self.metadata["data"]["values"]["output_format_id"] = ( + "string$" + values_output_format + ) + + if filter_output_format is not None: + if filter_input_format is None and filter_output_format is not None: + f"[filter_input_format] and [filter_output_format] must both be defined." + elif filter_input_format is not None and filter_output_format is None: + f"[filter_input_format] and [filter_output_format] must both be defined." + if filter_output_format.startswith("%"): + self.metadata["data"]["filter"]["type"] = "datetime" + self.metadata["data"]["filter"]["type_id"] = ( + "datetime$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "datetime$" + filter_output_format + ) + elif "_" in filter_output_format: + self.metadata["data"]["filter"]["type"] = "number" + self.metadata["data"]["filter"]["type_id"] = ( + "number$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "number$" + filter_output_format + ) + elif ( + filter_output_format is not None + and not filter_output_format.startswith("%") + and "_" not in filter_output_format + ): + self.metadata["data"]["filter"]["type"] = "string" + self.metadata["data"]["filter"]["type_id"] = ( + "string$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "string$" + filter_output_format + ) + + if color_category_output_format is not None: + if ( + color_category_input_format is None + and color_category_output_format is not None + ): + f"[color_category_input_format] and [color_category_output_format] must both be defined." + elif ( + color_category_input_format is not None + and color_category_output_format is None + ): + f"[color_category_input_format] and [color_category_output_format] must both be defined." + if color_category_output_format.startswith("%"): + self.metadata["data"]["color_category"]["type"] = "datetime" + self.metadata["data"]["color_category"]["type_id"] = ( + "datetime$" + color_category_input_format + ) + self.metadata["data"]["color_category"]["output_format_id"] = ( + "datetime$" + color_category_output_format + ) + elif "_" in color_category_output_format: + self.metadata["data"]["color_category"]["type"] = "number" + self.metadata["data"]["color_category"]["type_id"] = ( + "number$" + color_category_input_format + ) + self.metadata["data"]["color_category"]["output_format_id"] = ( + "number$" + color_category_output_format + ) + elif ( + color_category_output_format is not None + and not color_category_output_format.startswith("%") + and "_" not in color_category_output_format + ): + self.metadata["data"]["color_category"]["type"] = "string" + self.metadata["data"]["color_category"]["type_id"] = ( + "string$" + color_category_input_format + ) + self.metadata["data"]["color_category"]["output_format_id"] = ( + "string$" + color_category_output_format + ) + + if facet_output_format is not None: + if facet_input_format is None and facet_output_format is not None: + f"[facet_input_format] and [facet_output_format] must both be defined." + elif facet_input_format is not None and facet_output_format is None: + f"[facet_input_format] and [facet_output_format] must both be defined." + if facet_output_format.startswith("%"): + self.metadata["data"]["facet"]["type"] = "datetime" + self.metadata["data"]["facet"]["type_id"] = ( + "datetime$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "datetime$" + facet_output_format + ) + elif "_" in facet_output_format: + self.metadata["data"]["facet"]["type"] = "number" + self.metadata["data"]["facet"]["type_id"] = ( + "number$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "number$" + facet_output_format + ) + elif ( + facet_output_format is not None + and not facet_output_format.startswith("%") + and "_" not in facet_output_format + ): + self.metadata["data"]["facet"]["type"] = "string" + self.metadata["data"]["facet"]["type_id"] = ( + "string$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "string$" + facet_output_format + ) + + if metadata_output_format is not None: + if metadata_input_format is None and metadata_output_format is not None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + elif metadata_input_format is not None and metadata_output_format is None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + if metadata_output_format.startswith("%"): + self.metadata["data"]["metadata"]["type"] = "datetime" + self.metadata["data"]["metadata"]["type_id"] = ( + "datetime$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "datetime$" + metadata_output_format + ) + elif "_" in metadata_output_format: + self.metadata["data"]["metadata"]["type"] = "number" + self.metadata["data"]["metadata"]["type_id"] = ( + "number$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "number$" + metadata_output_format + ) + elif ( + metadata_output_format is not None + and not metadata_output_format.startswith("%") + and "_" not in metadata_output_format + ): + self.metadata["data"]["metadata"]["type"] = "string" + self.metadata["data"]["metadata"]["type_id"] = ( + "string$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "string$" + metadata_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_sankey_data( + self, + data: pd.DataFrame = None, + source: str = None, + target: str = None, + value: str = None, + filter: str = None, + facet: str = None, + step_from: str = None, + step_to: str = None, + metadata: Union[list, str] = None, + filter_input_format: str = None, + filter_output_format: str = None, + facet_input_format: str = None, + facet_output_format: str = None, + metadata_input_format: str = None, + metadata_output_format: str = None, + source_input_format: str = None, + source_output_format: str = None, + step_from_input_format: str = None, + step_from_output_format: str = None, + step_to_input_format: str = None, + step_to_output_format: str = None, + target_input_format: str = None, + target_output_format: str = None, + value_input_format: str = None, + value_output_format: str = None, + ): + """ + Bind data to chart: sankey diagram. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param source: Source. Suggested data type hints: string. Flourish type hint: column + :type source: str, optional + + :param target: Target. Suggested data type hints: string. Flourish type hint: column + :type target: str, optional + + :param value: Value of link. A numerical value used to set the thickness of the links. Suggested data type hints: number. Flourish type hint: column + :type value: str, optional + + :param filter: Filter. Suggested data type hints: string, number, datetime. Flourish type hint: column + :type filter: str, optional + + :param facet: Grid of charts. Suggested data type hints: string. Flourish type hint: column + :type facet: str, optional + + :param step_from: Step from. An integer(whole number) used to indicate where a link starts from (used only in Alluvial mode). Suggested data type hints: number. Flourish type hint: column + :type step_from: str, optional + + :param step_to: Step to. An integer(whole number) used to indicate where a link goes to (used only in Alluvial mode). Suggested data type hints: number. Flourish type hint: column + :type step_to: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Suggested data type hints: number, datetime, string. Flourish type hint: columns + :type metadata: Union[list, str], optional + :param filter_input_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_input_format: str, optional + :param filter_output_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_output_format: str, optional + :param facet_input_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_input_format: str, optional + :param facet_output_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_output_format: str, optional + :param metadata_input_format: Formats/parses dates, strings, and numbers for the [metadata] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_input_format: str, optional + :param metadata_output_format: Formats/parses dates, strings, and numbers for the [metadata] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_output_format: str, optional + :param source_input_format: Formats/parses dates, strings, and numbers for the [source] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type source_input_format: str, optional + :param source_output_format: Formats/parses dates, strings, and numbers for the [source] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type source_output_format: str, optional + :param step_from_input_format: Formats/parses dates, strings, and numbers for the [step_from] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type step_from_input_format: str, optional + :param step_from_output_format: Formats/parses dates, strings, and numbers for the [step_from] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type step_from_output_format: str, optional + :param step_to_input_format: Formats/parses dates, strings, and numbers for the [step_to] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type step_to_input_format: str, optional + :param step_to_output_format: Formats/parses dates, strings, and numbers for the [step_to] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type step_to_output_format: str, optional + :param target_input_format: Formats/parses dates, strings, and numbers for the [target] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type target_input_format: str, optional + :param target_output_format: Formats/parses dates, strings, and numbers for the [target] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type target_output_format: str, optional + :param value_input_format: Formats/parses dates, strings, and numbers for the [value] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type value_input_format: str, optional + :param value_output_format: Formats/parses dates, strings, and numbers for the [value] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type value_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = { + "data": { + "filter": {}, + "facet": {}, + "metadata": {}, + "source": {}, + "step_from": {}, + "step_to": {}, + "target": {}, + "value": {}, + } + } + + if source is not None: + assert source in data_columns, f"[source] is not a column in the data." + self.bindings["data"]["source"] = source + + if target is not None: + assert target in data_columns, f"[target] is not a column in the data." + self.bindings["data"]["target"] = target + + if value is not None: + assert value in data_columns, f"[value] is not a column in the data." + self.bindings["data"]["value"] = value + + if filter is not None: + assert filter in data_columns, f"[filter] is not a column in the data." + self.bindings["data"]["filter"] = filter + + if facet is not None: + assert facet in data_columns, f"[facet] is not a column in the data." + self.bindings["data"]["facet"] = facet + + if step_from is not None: + assert ( + step_from in data_columns + ), f"[step_from] is not a column in the data." + self.bindings["data"]["step_from"] = step_from + + if step_to is not None: + assert step_to in data_columns, f"[step_to] is not a column in the data." + self.bindings["data"]["step_to"] = step_to + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in data_columns + ), f"[metadata] is not a column in the data." + self.bindings["data"]["metadata"] = [metadata] + else: + self.bindings["data"]["metadata"] = [] + + if source_output_format is not None: + if source_input_format is None and source_output_format is not None: + f"[source_input_format] and [source_output_format] must both be defined." + elif source_input_format is not None and source_output_format is None: + f"[source_input_format] and [source_output_format] must both be defined." + if source_output_format.startswith("%"): + self.metadata["data"]["source"]["type"] = "datetime" + self.metadata["data"]["source"]["type_id"] = ( + "datetime$" + source_input_format + ) + self.metadata["data"]["source"]["output_format_id"] = ( + "datetime$" + source_output_format + ) + elif "_" in source_output_format: + self.metadata["data"]["source"]["type"] = "number" + self.metadata["data"]["source"]["type_id"] = ( + "number$" + source_input_format + ) + self.metadata["data"]["source"]["output_format_id"] = ( + "number$" + source_output_format + ) + elif ( + source_output_format is not None + and not source_output_format.startswith("%") + and "_" not in source_output_format + ): + self.metadata["data"]["source"]["type"] = "string" + self.metadata["data"]["source"]["type_id"] = ( + "string$" + source_input_format + ) + self.metadata["data"]["source"]["output_format_id"] = ( + "string$" + source_output_format + ) + + if target_output_format is not None: + if target_input_format is None and target_output_format is not None: + f"[target_input_format] and [target_output_format] must both be defined." + elif target_input_format is not None and target_output_format is None: + f"[target_input_format] and [target_output_format] must both be defined." + if target_output_format.startswith("%"): + self.metadata["data"]["target"]["type"] = "datetime" + self.metadata["data"]["target"]["type_id"] = ( + "datetime$" + target_input_format + ) + self.metadata["data"]["target"]["output_format_id"] = ( + "datetime$" + target_output_format + ) + elif "_" in target_output_format: + self.metadata["data"]["target"]["type"] = "number" + self.metadata["data"]["target"]["type_id"] = ( + "number$" + target_input_format + ) + self.metadata["data"]["target"]["output_format_id"] = ( + "number$" + target_output_format + ) + elif ( + target_output_format is not None + and not target_output_format.startswith("%") + and "_" not in target_output_format + ): + self.metadata["data"]["target"]["type"] = "string" + self.metadata["data"]["target"]["type_id"] = ( + "string$" + target_input_format + ) + self.metadata["data"]["target"]["output_format_id"] = ( + "string$" + target_output_format + ) + + if value_output_format is not None: + if value_input_format is None and value_output_format is not None: + f"[value_input_format] and [value_output_format] must both be defined." + elif value_input_format is not None and value_output_format is None: + f"[value_input_format] and [value_output_format] must both be defined." + if value_output_format.startswith("%"): + self.metadata["data"]["value"]["type"] = "datetime" + self.metadata["data"]["value"]["type_id"] = ( + "datetime$" + value_input_format + ) + self.metadata["data"]["value"]["output_format_id"] = ( + "datetime$" + value_output_format + ) + elif "_" in value_output_format: + self.metadata["data"]["value"]["type"] = "number" + self.metadata["data"]["value"]["type_id"] = ( + "number$" + value_input_format + ) + self.metadata["data"]["value"]["output_format_id"] = ( + "number$" + value_output_format + ) + elif ( + value_output_format is not None + and not value_output_format.startswith("%") + and "_" not in value_output_format + ): + self.metadata["data"]["value"]["type"] = "string" + self.metadata["data"]["value"]["type_id"] = ( + "string$" + value_input_format + ) + self.metadata["data"]["value"]["output_format_id"] = ( + "string$" + value_output_format + ) + + if filter_output_format is not None: + if filter_input_format is None and filter_output_format is not None: + f"[filter_input_format] and [filter_output_format] must both be defined." + elif filter_input_format is not None and filter_output_format is None: + f"[filter_input_format] and [filter_output_format] must both be defined." + if filter_output_format.startswith("%"): + self.metadata["data"]["filter"]["type"] = "datetime" + self.metadata["data"]["filter"]["type_id"] = ( + "datetime$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "datetime$" + filter_output_format + ) + elif "_" in filter_output_format: + self.metadata["data"]["filter"]["type"] = "number" + self.metadata["data"]["filter"]["type_id"] = ( + "number$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "number$" + filter_output_format + ) + elif ( + filter_output_format is not None + and not filter_output_format.startswith("%") + and "_" not in filter_output_format + ): + self.metadata["data"]["filter"]["type"] = "string" + self.metadata["data"]["filter"]["type_id"] = ( + "string$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "string$" + filter_output_format + ) + + if facet_output_format is not None: + if facet_input_format is None and facet_output_format is not None: + f"[facet_input_format] and [facet_output_format] must both be defined." + elif facet_input_format is not None and facet_output_format is None: + f"[facet_input_format] and [facet_output_format] must both be defined." + if facet_output_format.startswith("%"): + self.metadata["data"]["facet"]["type"] = "datetime" + self.metadata["data"]["facet"]["type_id"] = ( + "datetime$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "datetime$" + facet_output_format + ) + elif "_" in facet_output_format: + self.metadata["data"]["facet"]["type"] = "number" + self.metadata["data"]["facet"]["type_id"] = ( + "number$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "number$" + facet_output_format + ) + elif ( + facet_output_format is not None + and not facet_output_format.startswith("%") + and "_" not in facet_output_format + ): + self.metadata["data"]["facet"]["type"] = "string" + self.metadata["data"]["facet"]["type_id"] = ( + "string$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "string$" + facet_output_format + ) + + if step_from_output_format is not None: + if step_from_input_format is None and step_from_output_format is not None: + f"[step_from_input_format] and [step_from_output_format] must both be defined." + elif step_from_input_format is not None and step_from_output_format is None: + f"[step_from_input_format] and [step_from_output_format] must both be defined." + if step_from_output_format.startswith("%"): + self.metadata["data"]["step_from"]["type"] = "datetime" + self.metadata["data"]["step_from"]["type_id"] = ( + "datetime$" + step_from_input_format + ) + self.metadata["data"]["step_from"]["output_format_id"] = ( + "datetime$" + step_from_output_format + ) + elif "_" in step_from_output_format: + self.metadata["data"]["step_from"]["type"] = "number" + self.metadata["data"]["step_from"]["type_id"] = ( + "number$" + step_from_input_format + ) + self.metadata["data"]["step_from"]["output_format_id"] = ( + "number$" + step_from_output_format + ) + elif ( + step_from_output_format is not None + and not step_from_output_format.startswith("%") + and "_" not in step_from_output_format + ): + self.metadata["data"]["step_from"]["type"] = "string" + self.metadata["data"]["step_from"]["type_id"] = ( + "string$" + step_from_input_format + ) + self.metadata["data"]["step_from"]["output_format_id"] = ( + "string$" + step_from_output_format + ) + + if step_to_output_format is not None: + if step_to_input_format is None and step_to_output_format is not None: + f"[step_to_input_format] and [step_to_output_format] must both be defined." + elif step_to_input_format is not None and step_to_output_format is None: + f"[step_to_input_format] and [step_to_output_format] must both be defined." + if step_to_output_format.startswith("%"): + self.metadata["data"]["step_to"]["type"] = "datetime" + self.metadata["data"]["step_to"]["type_id"] = ( + "datetime$" + step_to_input_format + ) + self.metadata["data"]["step_to"]["output_format_id"] = ( + "datetime$" + step_to_output_format + ) + elif "_" in step_to_output_format: + self.metadata["data"]["step_to"]["type"] = "number" + self.metadata["data"]["step_to"]["type_id"] = ( + "number$" + step_to_input_format + ) + self.metadata["data"]["step_to"]["output_format_id"] = ( + "number$" + step_to_output_format + ) + elif ( + step_to_output_format is not None + and not step_to_output_format.startswith("%") + and "_" not in step_to_output_format + ): + self.metadata["data"]["step_to"]["type"] = "string" + self.metadata["data"]["step_to"]["type_id"] = ( + "string$" + step_to_input_format + ) + self.metadata["data"]["step_to"]["output_format_id"] = ( + "string$" + step_to_output_format + ) + + if metadata_output_format is not None: + if metadata_input_format is None and metadata_output_format is not None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + elif metadata_input_format is not None and metadata_output_format is None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + if metadata_output_format.startswith("%"): + self.metadata["data"]["metadata"]["type"] = "datetime" + self.metadata["data"]["metadata"]["type_id"] = ( + "datetime$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "datetime$" + metadata_output_format + ) + elif "_" in metadata_output_format: + self.metadata["data"]["metadata"]["type"] = "number" + self.metadata["data"]["metadata"]["type_id"] = ( + "number$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "number$" + metadata_output_format + ) + elif ( + metadata_output_format is not None + and not metadata_output_format.startswith("%") + and "_" not in metadata_output_format + ): + self.metadata["data"]["metadata"]["type"] = "string" + self.metadata["data"]["metadata"]["type_id"] = ( + "string$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "string$" + metadata_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_scatter_data( + self, + data: pd.DataFrame = None, + x: str = None, + y: str = None, + name: Union[list, str] = None, + color: str = None, + size: str = None, + shape: str = None, + facet: str = None, + slider: str = None, + series: str = None, + filter: str = None, + metadata: Union[list, str] = None, + color_input_format: str = None, + color_output_format: str = None, + filter_input_format: str = None, + filter_output_format: str = None, + facet_input_format: str = None, + facet_output_format: str = None, + metadata_input_format: str = None, + metadata_output_format: str = None, + name_input_format: str = None, + name_output_format: str = None, + series_input_format: str = None, + series_output_format: str = None, + shape_input_format: str = None, + shape_output_format: str = None, + size_input_format: str = None, + size_output_format: str = None, + slider_input_format: str = None, + slider_output_format: str = None, + x_input_format: str = None, + x_output_format: str = None, + y_input_format: str = None, + y_output_format: str = None, + ): + """ + Bind data to chart: scatter. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param x: X values. Suggested data type hints: number, string, datetime. Flourish type hint: column + :type x: str, optional + + :param y: Y values. Suggested data type hints: number, string, datetime. Flourish type hint: column + :type y: str, optional + + :param name: Name. Select multiple columns if required to make a unique name. Suggested data type hints: string. Flourish type hint: columns + :type name: Union[list, str], optional + + :param color: Color. Colors the dots based on numbers or categories. Suggested data type hints: string, number. Flourish type hint: column + :type color: str, optional + + :param size: Size. Sizes the dots based on the numbers. Suggested data type hints: number, string. Flourish type hint: column + :type size: str, optional + + :param shape: Shape. Sets the shape of the dots based on numbers or categories. Suggested data type hints: string. Flourish type hint: column + :type shape: str, optional + + :param facet: Grid of charts (facet). Creates a mini chart for each value in the selected column. Suggested data type hints: string. Flourish type hint: column + :type facet: str, optional + + :param slider: Time. Creates a time slider and connects/animates dots with the same name. Suggested data type hints: datetime, string, number. Flourish type hint: column + :type slider: str, optional + + :param series: Series (connect with line). Group dots into series based on the contents of a column. Suggested data type hints: string. Flourish type hint: column + :type series: str, optional + + :param filter: Filter control. Creates a control based on the contents of any column. Suggested data type hints: string, number, datetime. Flourish type hint: column + :type filter: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panelsSuggested data type hints: string, number, datetime. Flourish type hint: columns + :type metadata: Union[list, str], optional + :param color_input_format: Formats/parses dates, strings, and numbers for the [color] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type color_input_format: str, optional + :param color_output_format: Formats/parses dates, strings, and numbers for the [color] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type color_output_format: str, optional + :param filter_input_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_input_format: str, optional + :param filter_output_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_output_format: str, optional + :param facet_input_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_input_format: str, optional + :param facet_output_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_output_format: str, optional + :param metadata_input_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_input_format: str, optional + :param metadata_output_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_output_format: str, optional + :param name_input_format: Formats/parses dates, strings, and numbers for the [name] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type name_input_format: str, optional + :param name_output_format: Formats/parses dates, strings, and numbers for the [name] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type name_output_format: str, optional + :param series_input_format: Formats/parses dates, strings, and numbers for the [series] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type series_input_format: str, optional + :param series_output_format: Formats/parses dates, strings, and numbers for the [series] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type series_output_format: str, optional + :param shape_input_format: Formats/parses dates, strings, and numbers for the [shape] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type shape_input_format: str, optional + :param shape_output_format: Formats/parses dates, strings, and numbers for the [shape] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type shape_output_format: str, optional + :param size_input_format: Formats/parses dates, strings, and numbers for the [size] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type size_input_format: str, optional + :param size_output_format: Formats/parses dates, strings, and numbers for the [size] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type size_output_format: str, optional + :param slider_input_format: Formats/parses dates, strings, and numbers for the [slider] column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type slider_input_format: str, optional + :param slider_output_format: Formats/parses dates, strings, and numbers for the [slider] column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type slider_output_format: str, optional + :param x_input_format: Formats/parses dates, strings, and numbers for the [x] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type x_input_format: str, optional + :param x_output_format: Formats/parses dates, strings, and numbers for the [x] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type x_output_format: str, optional + :param y_input_format: Formats/parses dates, strings, and numbers for the [y] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type y_input_format: str, optional + :param y_output_format: Formats/parses dates, strings, and numbers for the [y] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type y_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = { + "data": { + "color": {}, + "filter": {}, + "facet": {}, + "metadata": {}, + "name": {}, + "series": {}, + "shape": {}, + "size": {}, + "slider": {}, + "x": {}, + "y": {}, + } + } + + if x is not None: + assert x in data_columns, f"[x] is not a column in the data." + self.bindings["data"]["x"] = x + + if y is not None: + assert y in data_columns, f"[y] is not a column in the data." + self.bindings["data"]["y"] = y + + if name is not None: + if isinstance(name, list): + for col in name: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["name"] = name + elif isinstance(name, str): + assert name in data_columns, f"[name] is not a column in the data." + self.bindings["data"]["name"] = [name] + else: + self.bindings["data"]["name"] = [] + + if color is not None: + assert color in data_columns, f"[color] is not a column in the data." + self.bindings["data"]["color"] = color + + if size is not None: + assert size in data_columns, f"[size] is not a column in the data." + self.bindings["data"]["size"] = size + + if shape is not None: + assert shape in data_columns, f"[shape] is not a column in the data." + self.bindings["data"]["shape"] = shape + + if facet is not None: + assert facet in data_columns, f"[facet] is not a column in the data." + self.bindings["data"]["facet"] = facet + + if slider is not None: + assert slider in data_columns, f"[slider] is not a column in the data." + self.bindings["data"]["slider"] = slider + + if series is not None: + assert series in data_columns, f"[series] is not a column in the data." + self.bindings["data"]["series"] = series + + if filter is not None: + assert filter in data_columns, f"[filter] is not a column in the data." + self.bindings["data"]["filter"] = filter + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in data_columns + ), f"[metadata] is not a column in the data." + self.bindings["data"]["metadata"] = [metadata] + else: + self.bindings["data"]["metadata"] = [] + + if x_output_format is not None: + if x_input_format is None and x_output_format is not None: + f"[x_input_format] and [x_output_format] must both be defined." + elif x_input_format is not None and x_output_format is None: + f"[x_input_format] and [x_output_format] must both be defined." + if x_output_format.startswith("%"): + self.metadata["data"]["x"]["type"] = "datetime" + self.metadata["data"]["x"]["type_id"] = "datetime$" + x_input_format + self.metadata["data"]["x"]["output_format_id"] = ( + "datetime$" + x_output_format + ) + elif "_" in x_output_format: + self.metadata["data"]["x"]["type"] = "number" + self.metadata["data"]["x"]["type_id"] = "number$" + x_input_format + self.metadata["data"]["x"]["output_format_id"] = ( + "number$" + x_output_format + ) + elif ( + x_output_format is not None + and not x_output_format.startswith("%") + and "_" not in x_output_format + ): + self.metadata["data"]["x"]["type"] = "string" + self.metadata["data"]["x"]["type_id"] = "string$" + x_input_format + self.metadata["data"]["x"]["output_format_id"] = ( + "string$" + x_output_format + ) + + if y_output_format is not None: + if y_input_format is None and y_output_format is not None: + f"[y_input_format] and [y_output_format] must both be defined." + elif y_input_format is not None and y_output_format is None: + f"[y_input_format] and [y_output_format] must both be defined." + if y_output_format.startswith("%"): + self.metadata["data"]["y"]["type"] = "datetime" + self.metadata["data"]["y"]["type_id"] = "datetime$" + y_input_format + self.metadata["data"]["y"]["output_format_id"] = ( + "datetime$" + y_output_format + ) + elif "_" in y_output_format: + self.metadata["data"]["y"]["type"] = "number" + self.metadata["data"]["y"]["type_id"] = "number$" + y_input_format + self.metadata["data"]["y"]["output_format_id"] = ( + "number$" + y_output_format + ) + elif ( + y_output_format is not None + and not y_output_format.startswith("%") + and "_" not in y_output_format + ): + self.metadata["data"]["y"]["type"] = "string" + self.metadata["data"]["y"]["type_id"] = "string$" + y_input_format + self.metadata["data"]["y"]["output_format_id"] = ( + "string$" + y_output_format + ) + + if name_output_format is not None: + if name_input_format is None and name_output_format is not None: + f"[name_input_format] and [name_output_format] must both be defined." + elif name_input_format is not None and name_output_format is None: + f"[name_input_format] and [name_output_format] must both be defined." + if name_output_format.startswith("%"): + self.metadata["data"]["name"]["type"] = "datetime" + self.metadata["data"]["name"]["type_id"] = ( + "datetime$" + name_input_format + ) + self.metadata["data"]["name"]["output_format_id"] = ( + "datetime$" + name_output_format + ) + elif "_" in name_output_format: + self.metadata["data"]["name"]["type"] = "number" + self.metadata["data"]["name"]["type_id"] = "number$" + name_input_format + self.metadata["data"]["name"]["output_format_id"] = ( + "number$" + name_output_format + ) + elif ( + name_output_format is not None + and not name_output_format.startswith("%") + and "_" not in name_output_format + ): + self.metadata["data"]["name"]["type"] = "string" + self.metadata["data"]["name"]["type_id"] = "string$" + name_input_format + self.metadata["data"]["name"]["output_format_id"] = ( + "string$" + name_output_format + ) + + if color_output_format is not None: + if color_input_format is None and color_output_format is not None: + f"[color_input_format] and [color_output_format] must both be defined." + elif color_input_format is not None and color_output_format is None: + f"[color_input_format] and [color_output_format] must both be defined." + if color_output_format.startswith("%"): + self.metadata["data"]["color"]["type"] = "datetime" + self.metadata["data"]["color"]["type_id"] = ( + "datetime$" + color_input_format + ) + self.metadata["data"]["color"]["output_format_id"] = ( + "datetime$" + color_output_format + ) + elif "_" in color_output_format: + self.metadata["data"]["color"]["type"] = "number" + self.metadata["data"]["color"]["type_id"] = ( + "number$" + color_input_format + ) + self.metadata["data"]["color"]["output_format_id"] = ( + "number$" + color_output_format + ) + elif ( + color_output_format is not None + and not color_output_format.startswith("%") + and "_" not in color_output_format + ): + self.metadata["data"]["color"]["type"] = "string" + self.metadata["data"]["color"]["type_id"] = ( + "string$" + color_input_format + ) + self.metadata["data"]["color"]["output_format_id"] = ( + "string$" + color_output_format + ) + + if size_output_format is not None: + if size_input_format is None and size_output_format is not None: + f"[size_input_format] and [size_output_format] must both be defined." + elif size_input_format is not None and size_output_format is None: + f"[size_input_format] and [size_output_format] must both be defined." + if size_output_format.startswith("%"): + self.metadata["data"]["size"]["type"] = "datetime" + self.metadata["data"]["size"]["type_id"] = ( + "datetime$" + size_input_format + ) + self.metadata["data"]["size"]["output_format_id"] = ( + "datetime$" + size_output_format + ) + elif "_" in size_output_format: + self.metadata["data"]["size"]["type"] = "number" + self.metadata["data"]["size"]["type_id"] = "number$" + size_input_format + self.metadata["data"]["size"]["output_format_id"] = ( + "number$" + size_output_format + ) + elif ( + size_output_format is not None + and not size_output_format.startswith("%") + and "_" not in size_output_format + ): + self.metadata["data"]["size"]["type"] = "string" + self.metadata["data"]["size"]["type_id"] = "string$" + size_input_format + self.metadata["data"]["size"]["output_format_id"] = ( + "string$" + size_output_format + ) + + if shape_output_format is not None: + if shape_input_format is None and shape_output_format is not None: + f"[shape_input_format] and [shape_output_format] must both be defined." + elif shape_input_format is not None and shape_output_format is None: + f"[shape_input_format] and [shape_output_format] must both be defined." + if shape_output_format.startswith("%"): + self.metadata["data"]["shape"]["type"] = "datetime" + self.metadata["data"]["shape"]["type_id"] = ( + "datetime$" + shape_input_format + ) + self.metadata["data"]["shape"]["output_format_id"] = ( + "datetime$" + shape_output_format + ) + elif "_" in shape_output_format: + self.metadata["data"]["shape"]["type"] = "number" + self.metadata["data"]["shape"]["type_id"] = ( + "number$" + shape_input_format + ) + self.metadata["data"]["shape"]["output_format_id"] = ( + "number$" + shape_output_format + ) + elif ( + shape_output_format is not None + and not shape_output_format.startswith("%") + and "_" not in shape_output_format + ): + self.metadata["data"]["shape"]["type"] = "string" + self.metadata["data"]["shape"]["type_id"] = ( + "string$" + shape_input_format + ) + self.metadata["data"]["shape"]["output_format_id"] = ( + "string$" + shape_output_format + ) + + if facet_output_format is not None: + if facet_input_format is None and facet_output_format is not None: + f"[facet_input_format] and [facet_output_format] must both be defined." + elif facet_input_format is not None and facet_output_format is None: + f"[facet_input_format] and [facet_output_format] must both be defined." + if facet_output_format.startswith("%"): + self.metadata["data"]["facet"]["type"] = "datetime" + self.metadata["data"]["facet"]["type_id"] = ( + "datetime$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "datetime$" + facet_output_format + ) + elif "_" in facet_output_format: + self.metadata["data"]["facet"]["type"] = "number" + self.metadata["data"]["facet"]["type_id"] = ( + "number$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "number$" + facet_output_format + ) + elif ( + facet_output_format is not None + and not facet_output_format.startswith("%") + and "_" not in facet_output_format + ): + self.metadata["data"]["facet"]["type"] = "string" + self.metadata["data"]["facet"]["type_id"] = ( + "string$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "string$" + facet_output_format + ) + + if slider_output_format is not None: + if slider_input_format is None and slider_output_format is not None: + f"[slider_input_format] and [slider_output_format] must both be defined." + elif slider_input_format is not None and slider_output_format is None: + f"[slider_input_format] and [slider_output_format] must both be defined." + if slider_output_format.startswith("%"): + self.metadata["data"]["slider"]["type"] = "datetime" + self.metadata["data"]["slider"]["type_id"] = ( + "datetime$" + slider_input_format + ) + self.metadata["data"]["slider"]["output_format_id"] = ( + "datetime$" + slider_output_format + ) + elif "_" in slider_output_format: + self.metadata["data"]["slider"]["type"] = "number" + self.metadata["data"]["slider"]["type_id"] = ( + "number$" + slider_input_format + ) + self.metadata["data"]["slider"]["output_format_id"] = ( + "number$" + slider_output_format + ) + elif ( + slider_output_format is not None + and not slider_output_format.startswith("%") + and "_" not in slider_output_format + ): + self.metadata["data"]["slider"]["type"] = "string" + self.metadata["data"]["slider"]["type_id"] = ( + "string$" + slider_input_format + ) + self.metadata["data"]["slider"]["output_format_id"] = ( + "string$" + slider_output_format + ) + + if series_output_format is not None: + if series_input_format is None and series_output_format is not None: + f"[series_input_format] and [series_output_format] must both be defined." + elif series_input_format is not None and series_output_format is None: + f"[series_input_format] and [series_output_format] must both be defined." + if series_output_format.startswith("%"): + self.metadata["data"]["series"]["type"] = "datetime" + self.metadata["data"]["series"]["type_id"] = ( + "datetime$" + series_input_format + ) + self.metadata["data"]["series"]["output_format_id"] = ( + "datetime$" + series_output_format + ) + elif "_" in series_output_format: + self.metadata["data"]["series"]["type"] = "number" + self.metadata["data"]["series"]["type_id"] = ( + "number$" + series_input_format + ) + self.metadata["data"]["series"]["output_format_id"] = ( + "number$" + series_output_format + ) + elif ( + series_output_format is not None + and not series_output_format.startswith("%") + and "_" not in series_output_format + ): + self.metadata["data"]["series"]["type"] = "string" + self.metadata["data"]["series"]["type_id"] = ( + "string$" + series_input_format + ) + self.metadata["data"]["series"]["output_format_id"] = ( + "string$" + series_output_format + ) + + if filter_output_format is not None: + if filter_input_format is None and filter_output_format is not None: + f"[filter_input_format] and [filter_output_format] must both be defined." + elif filter_input_format is not None and filter_output_format is None: + f"[filter_input_format] and [filter_output_format] must both be defined." + if filter_output_format.startswith("%"): + self.metadata["data"]["filter"]["type"] = "datetime" + self.metadata["data"]["filter"]["type_id"] = ( + "datetime$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "datetime$" + filter_output_format + ) + elif "_" in filter_output_format: + self.metadata["data"]["filter"]["type"] = "number" + self.metadata["data"]["filter"]["type_id"] = ( + "number$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "number$" + filter_output_format + ) + elif ( + filter_output_format is not None + and not filter_output_format.startswith("%") + and "_" not in filter_output_format + ): + self.metadata["data"]["filter"]["type"] = "string" + self.metadata["data"]["filter"]["type_id"] = ( + "string$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "string$" + filter_output_format + ) + + if metadata_output_format is not None: + if metadata_input_format is None and metadata_output_format is not None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + elif metadata_input_format is not None and metadata_output_format is None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + if metadata_output_format.startswith("%"): + self.metadata["data"]["metadata"]["type"] = "datetime" + self.metadata["data"]["metadata"]["type_id"] = ( + "datetime$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "datetime$" + metadata_output_format + ) + elif "_" in metadata_output_format: + self.metadata["data"]["metadata"]["type"] = "number" + self.metadata["data"]["metadata"]["type_id"] = ( + "number$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "number$" + metadata_output_format + ) + elif ( + metadata_output_format is not None + and not metadata_output_format.startswith("%") + and "_" not in metadata_output_format + ): + self.metadata["data"]["metadata"]["type"] = "string" + self.metadata["data"]["metadata"]["type_id"] = ( + "string$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "string$" + metadata_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_slope_chart_data( + self, + data: pd.DataFrame = None, + id: str = None, + values: Union[list, str] = None, + line_thickness: str = None, + filter: str = None, + color_category: str = None, + facet: str = None, + metadata: Union[list, str] = None, + color_category_input_format: str = None, + color_category_output_format: str = None, + filter_input_format: str = None, + filter_output_format: str = None, + facet_input_format: str = None, + facet_output_format: str = None, + metadata_input_format: str = None, + metadata_output_format: str = None, + line_thickness_input_format: str = None, + line_thickness_output_format: str = None, + id_input_format: str = None, + id_output_format: str = None, + values_input_format: str = None, + values_output_format: str = None, + ): + """ + Bind data to chart: slope chart. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param id: Name. The name of the data series (eg. voting district, data mode). Flourish type hint: column + :type id: str, optional + + :param values: Values. Values for that data series (eg. % of votes). Flourish type hint: columns + :type values: Union[list, str], optional + + :param line_thickness: Line thickness. Values for the thickness of line. Flourish type hint: column + :type line_thickness: str, optional + + :param filter: Filter. Suggested data type hints: string, number, datetime. Flourish type hint: column + :type filter: str, optional + + :param color_category: Color category + :type color_category: str, optional + + :param facet: Facet + :type facet: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in custom popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns + :type metadata: Union[list, str], optional + :param color_category_input_format: Formats/parses dates, strings, and numbers for the [color_category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type color_category_input_format: str, optional + :param color_category_output_format: Formats/parses dates, strings, and numbers for the [color_category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type color_category_output_format: str, optional + :param filter_input_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_input_format: str, optional + :param filter_output_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_output_format: str, optional + :param facet_input_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_input_format: str, optional + :param facet_output_format: Formats/parses dates, strings, and numbers for the [facet] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type facet_output_format: str, optional + :param metadata_input_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_input_format: str, optional + :param metadata_output_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_output_format: str, optional + :param line_thickness_input_format: Formats/parses dates, strings, and numbers for the [line_thickness] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type line_thickness_input_format: str, optional + :param line_thickness_output_format: Formats/parses dates, strings, and numbers for the [line_thickness] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type line_thickness_output_format: str, optional + :param id_input_format: Formats/parses dates, strings, and numbers for the [id] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type id_input_format: str, optional + :param id_output_format: Formats/parses dates, strings, and numbers for the [id] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type id_output_format: str, optional + :param values_input_format: Formats/parses dates, strings, and numbers for the [values] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type values_input_format: str, optional + :param values_output_format: Formats/parses dates, strings, and numbers for the [values] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type values_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = { + "data": { + "color_category": {}, + "filter": {}, + "facet": {}, + "metadata": {}, + "line_thickness": {}, + "id": {}, + "values": {}, + } + } + + if id is not None: + assert id in data_columns, f"[id] is not a column in the data." + self.bindings["data"]["id"] = id + + if values is not None: + if isinstance(values, list): + for col in values: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["values"] = values + elif isinstance(values, str): + assert values in data_columns, f"[values] is not a column in the data." + self.bindings["data"]["values"] = [values] + else: + self.bindings["data"]["values"] = [] + + if line_thickness is not None: + assert ( + line_thickness in data_columns + ), f"[line_thickness] is not a column in the data." + self.bindings["data"]["line_thickness"] = line_thickness + + if filter is not None: + assert filter in data_columns, f"[filter] is not a column in the data." + self.bindings["data"]["filter"] = filter + + if color_category is not None: + assert ( + color_category in data_columns + ), f"[color_category] is not a column in the data." + self.bindings["data"]["color_category"] = color_category + + if facet is not None: + assert facet in data_columns, f"[facet] is not a column in the data." + self.bindings["data"]["facet"] = facet + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in data_columns + ), f"[metadata] is not a column in the data." + self.bindings["data"]["metadata"] = [metadata] + else: + self.bindings["data"]["metadata"] = [] + + if id_output_format is not None: + if id_input_format is None and id_output_format is not None: + f"[id_input_format] and [id_output_format] must both be defined." + elif id_input_format is not None and id_output_format is None: + f"[id_input_format] and [id_output_format] must both be defined." + if id_output_format.startswith("%"): + self.metadata["data"]["id"]["type"] = "datetime" + self.metadata["data"]["id"]["type_id"] = "datetime$" + id_input_format + self.metadata["data"]["id"]["output_format_id"] = ( + "datetime$" + id_output_format + ) + elif "_" in id_output_format: + self.metadata["data"]["id"]["type"] = "number" + self.metadata["data"]["id"]["type_id"] = "number$" + id_input_format + self.metadata["data"]["id"]["output_format_id"] = ( + "number$" + id_output_format + ) + elif ( + id_output_format is not None + and not id_output_format.startswith("%") + and "_" not in id_output_format + ): + self.metadata["data"]["id"]["type"] = "string" + self.metadata["data"]["id"]["type_id"] = "string$" + id_input_format + self.metadata["data"]["id"]["output_format_id"] = ( + "string$" + id_output_format + ) + + if values_output_format is not None: + if values_input_format is None and values_output_format is not None: + f"[values_input_format] and [values_output_format] must both be defined." + elif values_input_format is not None and values_output_format is None: + f"[values_input_format] and [values_output_format] must both be defined." + if values_output_format.startswith("%"): + self.metadata["data"]["values"]["type"] = "datetime" + self.metadata["data"]["values"]["type_id"] = ( + "datetime$" + values_input_format + ) + self.metadata["data"]["values"]["output_format_id"] = ( + "datetime$" + values_output_format + ) + elif "_" in values_output_format: + self.metadata["data"]["values"]["type"] = "number" + self.metadata["data"]["values"]["type_id"] = ( + "number$" + values_input_format + ) + self.metadata["data"]["values"]["output_format_id"] = ( + "number$" + values_output_format + ) + elif ( + values_output_format is not None + and not values_output_format.startswith("%") + and "_" not in values_output_format + ): + self.metadata["data"]["values"]["type"] = "string" + self.metadata["data"]["values"]["type_id"] = ( + "string$" + values_input_format + ) + self.metadata["data"]["values"]["output_format_id"] = ( + "string$" + values_output_format + ) + + if line_thickness_output_format is not None: + if ( + line_thickness_input_format is None + and line_thickness_output_format is not None + ): + f"[line_thickness_input_format] and [line_thickness_output_format] must both be defined." + elif ( + line_thickness_input_format is not None + and line_thickness_output_format is None + ): + f"[line_thickness_input_format] and [line_thickness_output_format] must both be defined." + if line_thickness_output_format.startswith("%"): + self.metadata["data"]["line_thickness"]["type"] = "datetime" + self.metadata["data"]["line_thickness"]["type_id"] = ( + "datetime$" + line_thickness_input_format + ) + self.metadata["data"]["line_thickness"]["output_format_id"] = ( + "datetime$" + line_thickness_output_format + ) + elif "_" in line_thickness_output_format: + self.metadata["data"]["line_thickness"]["type"] = "number" + self.metadata["data"]["line_thickness"]["type_id"] = ( + "number$" + line_thickness_input_format + ) + self.metadata["data"]["line_thickness"]["output_format_id"] = ( + "number$" + line_thickness_output_format + ) + elif ( + line_thickness_output_format is not None + and not line_thickness_output_format.startswith("%") + and "_" not in line_thickness_output_format + ): + self.metadata["data"]["line_thickness"]["type"] = "string" + self.metadata["data"]["line_thickness"]["type_id"] = ( + "string$" + line_thickness_input_format + ) + self.metadata["data"]["line_thickness"]["output_format_id"] = ( + "string$" + line_thickness_output_format + ) + + if filter_output_format is not None: + if filter_input_format is None and filter_output_format is not None: + f"[filter_input_format] and [filter_output_format] must both be defined." + elif filter_input_format is not None and filter_output_format is None: + f"[filter_input_format] and [filter_output_format] must both be defined." + if filter_output_format.startswith("%"): + self.metadata["data"]["filter"]["type"] = "datetime" + self.metadata["data"]["filter"]["type_id"] = ( + "datetime$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "datetime$" + filter_output_format + ) + elif "_" in filter_output_format: + self.metadata["data"]["filter"]["type"] = "number" + self.metadata["data"]["filter"]["type_id"] = ( + "number$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "number$" + filter_output_format + ) + elif ( + filter_output_format is not None + and not filter_output_format.startswith("%") + and "_" not in filter_output_format + ): + self.metadata["data"]["filter"]["type"] = "string" + self.metadata["data"]["filter"]["type_id"] = ( + "string$" + filter_input_format + ) + self.metadata["data"]["filter"]["output_format_id"] = ( + "string$" + filter_output_format + ) + + if color_category_output_format is not None: + if ( + color_category_input_format is None + and color_category_output_format is not None + ): + f"[color_category_input_format] and [color_category_output_format] must both be defined." + elif ( + color_category_input_format is not None + and color_category_output_format is None + ): + f"[color_category_input_format] and [color_category_output_format] must both be defined." + if color_category_output_format.startswith("%"): + self.metadata["data"]["color_category"]["type"] = "datetime" + self.metadata["data"]["color_category"]["type_id"] = ( + "datetime$" + color_category_input_format + ) + self.metadata["data"]["color_category"]["output_format_id"] = ( + "datetime$" + color_category_output_format + ) + elif "_" in color_category_output_format: + self.metadata["data"]["color_category"]["type"] = "number" + self.metadata["data"]["color_category"]["type_id"] = ( + "number$" + color_category_input_format + ) + self.metadata["data"]["color_category"]["output_format_id"] = ( + "number$" + color_category_output_format + ) + elif ( + color_category_output_format is not None + and not color_category_output_format.startswith("%") + and "_" not in color_category_output_format + ): + self.metadata["data"]["color_category"]["type"] = "string" + self.metadata["data"]["color_category"]["type_id"] = ( + "string$" + color_category_input_format + ) + self.metadata["data"]["color_category"]["output_format_id"] = ( + "string$" + color_category_output_format + ) + + if facet_output_format is not None: + if facet_input_format is None and facet_output_format is not None: + f"[facet_input_format] and [facet_output_format] must both be defined." + elif facet_input_format is not None and facet_output_format is None: + f"[facet_input_format] and [facet_output_format] must both be defined." + if facet_output_format.startswith("%"): + self.metadata["data"]["facet"]["type"] = "datetime" + self.metadata["data"]["facet"]["type_id"] = ( + "datetime$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "datetime$" + facet_output_format + ) + elif "_" in facet_output_format: + self.metadata["data"]["facet"]["type"] = "number" + self.metadata["data"]["facet"]["type_id"] = ( + "number$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "number$" + facet_output_format + ) + elif ( + facet_output_format is not None + and not facet_output_format.startswith("%") + and "_" not in facet_output_format + ): + self.metadata["data"]["facet"]["type"] = "string" + self.metadata["data"]["facet"]["type_id"] = ( + "string$" + facet_input_format + ) + self.metadata["data"]["facet"]["output_format_id"] = ( + "string$" + facet_output_format + ) + + if metadata_output_format is not None: + if metadata_input_format is None and metadata_output_format is not None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + elif metadata_input_format is not None and metadata_output_format is None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + if metadata_output_format.startswith("%"): + self.metadata["data"]["metadata"]["type"] = "datetime" + self.metadata["data"]["metadata"]["type_id"] = ( + "datetime$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "datetime$" + metadata_output_format + ) + elif "_" in metadata_output_format: + self.metadata["data"]["metadata"]["type"] = "number" + self.metadata["data"]["metadata"]["type_id"] = ( + "number$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "number$" + metadata_output_format + ) + elif ( + metadata_output_format is not None + and not metadata_output_format.startswith("%") + and "_" not in metadata_output_format + ): + self.metadata["data"]["metadata"]["type"] = "string" + self.metadata["data"]["metadata"]["type_id"] = ( + "string$" + metadata_input_format + ) + self.metadata["data"]["metadata"]["output_format_id"] = ( + "string$" + metadata_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_sports_data( + self, + positions_data: pd.DataFrame = None, + info: Union[list, str] = None, + color: str = None, + size: str = None, + squad_number: str = None, + position_x: str = None, + position_y: str = None, + filter: str = None, + photo: str = None, + metadata: Union[list, str] = None, + color_input_format: str = None, + color_output_format: str = None, + filter_input_format: str = None, + filter_output_format: str = None, + photo_input_format: str = None, + photo_output_format: str = None, + metadata_input_format: str = None, + metadata_output_format: str = None, + info_input_format: str = None, + info_output_format: str = None, + size_input_format: str = None, + size_output_format: str = None, + squad_number_input_format: str = None, + squad_number_output_format: str = None, + position_x_input_format: str = None, + position_x_output_format: str = None, + position_y_input_format: str = None, + position_y_output_format: str = None, + ): + """ + Bind data to chart: sports. + + :param positions_data: Positions data. defaults to None + :type positions_data: pd.DataFrame, optional + + :param info: Name. A name to include on a label and/or popup. Suggested data type hints: string, number. Flourish type hint: columns + :type info: Union[list, str], optional + + :param color: Color by. An optional category column to color the dots by. For example if you have two different teams. Suggested data type hints: string. Flourish type hint: column + :type color: str, optional + + :param size: Size by. An optional numeric column to size the dots. Suggested data type hints: number. Flourish type hint: column + :type size: str, optional + + :param squad_number: Squad numbers. An optional squad number to appear within the dot. Suggested data type hints: number, string. Flourish type hint: column + :type squad_number: str, optional + + :param position_x: X position. Use this to column to set the X position of a dot on the pitch when creating shot charts. This column is ignored when the setting Position points by is set to FormationSuggested data type hints: number. Flourish type hint: column + :type position_x: str, optional + + :param position_y: Y position. Use this to column to set the Y position of a dot on the pitch when creating shot charts. This column is ignored when the setting Position points by is set to FormationSuggested data type hints: number. Flourish type hint: column + :type position_y: str, optional + + :param filter: Filter by. Setting a column here will add a control to the visualization to filter the dots. For example you could filter by team. Suggested data type hints: string, number. Flourish type hint: column + :type filter: str, optional + + :param photo: Image. Add an image to appear in the circles. To add an image, right click on a cell and click upload file Its also possible to add a image URL. Suggested data type hints: string. Flourish type hint: column + :type photo: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns + :type metadata: Union[list, str], optional + :param color_input_format: Formats/parses dates, strings, and numbers for the [color] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type color_input_format: str, optional + :param color_output_format: Formats/parses dates, strings, and numbers for the [color] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type color_output_format: str, optional + :param filter_input_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_input_format: str, optional + :param filter_output_format: Formats/parses dates, strings, and numbers for the [filter] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type filter_output_format: str, optional + :param photo_input_format: Formats/parses dates, strings, and numbers for the [photo] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type photo_input_format: str, optional + :param photo_output_format: Formats/parses dates, strings, and numbers for the [photo] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type photo_output_format: str, optional + :param metadata_input_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_input_format: str, optional + :param metadata_output_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_output_format: str, optional + :param info_input_format: Formats/parses dates, strings, and numbers for the [info] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type info_input_format: str, optional + :param info_output_format: Formats/parses dates, strings, and numbers for the [info] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type info_output_format: str, optional + :param size_input_format: Formats/parses dates, strings, and numbers for the [size] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type size_input_format: str, optional + :param size_output_format: Formats/parses dates, strings, and numbers for the [size] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type size_output_format: str, optional + :param squad_number_input_format: Formats/parses dates, strings, and numbers for the [squad_number] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type squad_number_input_format: str, optional + :param squad_number_output_format: Formats/parses dates, strings, and numbers for the [squad_number] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type squad_number_output_format: str, optional + :param position_x_input_format: Formats/parses dates, strings, and numbers for the [position_x] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type position_x_input_format: str, optional + :param position_x_output_format: Formats/parses dates, strings, and numbers for the [position_x] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type position_x_output_format: str, optional + :param position_y_input_format: Formats/parses dates, strings, and numbers for the [position_y] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type position_y_input_format: str, optional + :param position_y_output_format: Formats/parses dates, strings, and numbers for the [position_y] column. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type position_y_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["positions"] = {} + self.data_properties["positions"] = {} + if positions_data is not None: + positions_columns = set(positions_data.columns) + int_columns_positions_data = positions_data.select_dtypes( + include="int" + ).columns + positions_data[int_columns_positions_data] = positions_data[ + int_columns_positions_data + ].astype(str) + self.data_properties["positions"] = positions_data.to_dict(orient="records") + self.metadata = { + "positions": { + "color": {}, + "filter": {}, + "photo": {}, + "metadata": {}, + "info": {}, + "size": {}, + "squad_number": {}, + "position_x": {}, + "position_y": {}, + } + } + + if info is not None: + if isinstance(info, list): + for col in info: + assert ( + col in positions_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["positions"]["info"] = info + elif isinstance(info, str): + assert info in positions_columns, f"[info] is not a column in the data." + self.bindings["positions"]["info"] = [info] + else: + self.bindings["positions"]["info"] = [] + + if color is not None: + assert color in positions_columns, f"[color] is not a column in the data." + self.bindings["positions"]["color"] = color + + if size is not None: + assert size in positions_columns, f"[size] is not a column in the data." + self.bindings["positions"]["size"] = size + + if squad_number is not None: + assert ( + squad_number in positions_columns + ), f"[squad_number] is not a column in the data." + self.bindings["positions"]["squad_number"] = squad_number + + if position_x is not None: + assert ( + position_x in positions_columns + ), f"[position_x] is not a column in the data." + self.bindings["positions"]["position_x"] = position_x + + if position_y is not None: + assert ( + position_y in positions_columns + ), f"[position_y] is not a column in the data." + self.bindings["positions"]["position_y"] = position_y + + if filter is not None: + assert filter in positions_columns, f"[filter] is not a column in the data." + self.bindings["positions"]["filter"] = filter + + if photo is not None: + assert photo in positions_columns, f"[photo] is not a column in the data." + self.bindings["positions"]["photo"] = photo + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in positions_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["positions"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in positions_columns + ), f"[metadata] is not a column in the data." + self.bindings["positions"]["metadata"] = [metadata] + else: + self.bindings["positions"]["metadata"] = [] + + if info_output_format is not None: + if info_input_format is None and info_output_format is not None: + f"[info_input_format] and [info_output_format] must both be defined." + elif info_input_format is not None and info_output_format is None: + f"[info_input_format] and [info_output_format] must both be defined." + if info_output_format.startswith("%"): + self.metadata["positions"]["info"]["type"] = "datetime" + self.metadata["positions"]["info"]["type_id"] = ( + "datetime$" + info_input_format + ) + self.metadata["positions"]["info"]["output_format_id"] = ( + "datetime$" + info_output_format + ) + elif "_" in info_output_format: + self.metadata["positions"]["info"]["type"] = "number" + self.metadata["positions"]["info"]["type_id"] = ( + "number$" + info_input_format + ) + self.metadata["positions"]["info"]["output_format_id"] = ( + "number$" + info_output_format + ) + elif ( + info_output_format is not None + and not info_output_format.startswith("%") + and "_" not in info_output_format + ): + self.metadata["positions"]["info"]["type"] = "string" + self.metadata["positions"]["info"]["type_id"] = ( + "string$" + info_input_format + ) + self.metadata["positions"]["info"]["output_format_id"] = ( + "string$" + info_output_format + ) + + if color_output_format is not None: + if color_input_format is None and color_output_format is not None: + f"[color_input_format] and [color_output_format] must both be defined." + elif color_input_format is not None and color_output_format is None: + f"[color_input_format] and [color_output_format] must both be defined." + if color_output_format.startswith("%"): + self.metadata["positions"]["color"]["type"] = "datetime" + self.metadata["positions"]["color"]["type_id"] = ( + "datetime$" + color_input_format + ) + self.metadata["positions"]["color"]["output_format_id"] = ( + "datetime$" + color_output_format + ) + elif "_" in color_output_format: + self.metadata["positions"]["color"]["type"] = "number" + self.metadata["positions"]["color"]["type_id"] = ( + "number$" + color_input_format + ) + self.metadata["positions"]["color"]["output_format_id"] = ( + "number$" + color_output_format + ) + elif ( + color_output_format is not None + and not color_output_format.startswith("%") + and "_" not in color_output_format + ): + self.metadata["positions"]["color"]["type"] = "string" + self.metadata["positions"]["color"]["type_id"] = ( + "string$" + color_input_format + ) + self.metadata["positions"]["color"]["output_format_id"] = ( + "string$" + color_output_format + ) + + if size_output_format is not None: + if size_input_format is None and size_output_format is not None: + f"[size_input_format] and [size_output_format] must both be defined." + elif size_input_format is not None and size_output_format is None: + f"[size_input_format] and [size_output_format] must both be defined." + if size_output_format.startswith("%"): + self.metadata["positions"]["size"]["type"] = "datetime" + self.metadata["positions"]["size"]["type_id"] = ( + "datetime$" + size_input_format + ) + self.metadata["positions"]["size"]["output_format_id"] = ( + "datetime$" + size_output_format + ) + elif "_" in size_output_format: + self.metadata["positions"]["size"]["type"] = "number" + self.metadata["positions"]["size"]["type_id"] = ( + "number$" + size_input_format + ) + self.metadata["positions"]["size"]["output_format_id"] = ( + "number$" + size_output_format + ) + elif ( + size_output_format is not None + and not size_output_format.startswith("%") + and "_" not in size_output_format + ): + self.metadata["positions"]["size"]["type"] = "string" + self.metadata["positions"]["size"]["type_id"] = ( + "string$" + size_input_format + ) + self.metadata["positions"]["size"]["output_format_id"] = ( + "string$" + size_output_format + ) + + if squad_number_output_format is not None: + if ( + squad_number_input_format is None + and squad_number_output_format is not None + ): + f"[squad_number_input_format] and [squad_number_output_format] must both be defined." + elif ( + squad_number_input_format is not None + and squad_number_output_format is None + ): + f"[squad_number_input_format] and [squad_number_output_format] must both be defined." + if squad_number_output_format.startswith("%"): + self.metadata["positions"]["squad_number"]["type"] = "datetime" + self.metadata["positions"]["squad_number"]["type_id"] = ( + "datetime$" + squad_number_input_format + ) + self.metadata["positions"]["squad_number"]["output_format_id"] = ( + "datetime$" + squad_number_output_format + ) + elif "_" in squad_number_output_format: + self.metadata["positions"]["squad_number"]["type"] = "number" + self.metadata["positions"]["squad_number"]["type_id"] = ( + "number$" + squad_number_input_format + ) + self.metadata["positions"]["squad_number"]["output_format_id"] = ( + "number$" + squad_number_output_format + ) + elif ( + squad_number_output_format is not None + and not squad_number_output_format.startswith("%") + and "_" not in squad_number_output_format + ): + self.metadata["positions"]["squad_number"]["type"] = "string" + self.metadata["positions"]["squad_number"]["type_id"] = ( + "string$" + squad_number_input_format + ) + self.metadata["positions"]["squad_number"]["output_format_id"] = ( + "string$" + squad_number_output_format + ) + + if position_x_output_format is not None: + if position_x_input_format is None and position_x_output_format is not None: + f"[position_x_input_format] and [position_x_output_format] must both be defined." + elif ( + position_x_input_format is not None and position_x_output_format is None + ): + f"[position_x_input_format] and [position_x_output_format] must both be defined." + if position_x_output_format.startswith("%"): + self.metadata["positions"]["position_x"]["type"] = "datetime" + self.metadata["positions"]["position_x"]["type_id"] = ( + "datetime$" + position_x_input_format + ) + self.metadata["positions"]["position_x"]["output_format_id"] = ( + "datetime$" + position_x_output_format + ) + elif "_" in position_x_output_format: + self.metadata["positions"]["position_x"]["type"] = "number" + self.metadata["positions"]["position_x"]["type_id"] = ( + "number$" + position_x_input_format + ) + self.metadata["positions"]["position_x"]["output_format_id"] = ( + "number$" + position_x_output_format + ) + elif ( + position_x_output_format is not None + and not position_x_output_format.startswith("%") + and "_" not in position_x_output_format + ): + self.metadata["positions"]["position_x"]["type"] = "string" + self.metadata["positions"]["position_x"]["type_id"] = ( + "string$" + position_x_input_format + ) + self.metadata["positions"]["position_x"]["output_format_id"] = ( + "string$" + position_x_output_format + ) + + if position_y_output_format is not None: + if position_y_input_format is None and position_y_output_format is not None: + f"[position_y_input_format] and [position_y_output_format] must both be defined." + elif ( + position_y_input_format is not None and position_y_output_format is None + ): + f"[position_y_input_format] and [position_y_output_format] must both be defined." + if position_y_output_format.startswith("%"): + self.metadata["positions"]["position_y"]["type"] = "datetime" + self.metadata["positions"]["position_y"]["type_id"] = ( + "datetime$" + position_y_input_format + ) + self.metadata["positions"]["position_y"]["output_format_id"] = ( + "datetime$" + position_y_output_format + ) + elif "_" in position_y_output_format: + self.metadata["positions"]["position_y"]["type"] = "number" + self.metadata["positions"]["position_y"]["type_id"] = ( + "number$" + position_y_input_format + ) + self.metadata["positions"]["position_y"]["output_format_id"] = ( + "number$" + position_y_output_format + ) + elif ( + position_y_output_format is not None + and not position_y_output_format.startswith("%") + and "_" not in position_y_output_format + ): + self.metadata["positions"]["position_y"]["type"] = "string" + self.metadata["positions"]["position_y"]["type_id"] = ( + "string$" + position_y_input_format + ) + self.metadata["positions"]["position_y"]["output_format_id"] = ( + "string$" + position_y_output_format + ) + + if filter_output_format is not None: + if filter_input_format is None and filter_output_format is not None: + f"[filter_input_format] and [filter_output_format] must both be defined." + elif filter_input_format is not None and filter_output_format is None: + f"[filter_input_format] and [filter_output_format] must both be defined." + if filter_output_format.startswith("%"): + self.metadata["positions"]["filter"]["type"] = "datetime" + self.metadata["positions"]["filter"]["type_id"] = ( + "datetime$" + filter_input_format + ) + self.metadata["positions"]["filter"]["output_format_id"] = ( + "datetime$" + filter_output_format + ) + elif "_" in filter_output_format: + self.metadata["positions"]["filter"]["type"] = "number" + self.metadata["positions"]["filter"]["type_id"] = ( + "number$" + filter_input_format + ) + self.metadata["positions"]["filter"]["output_format_id"] = ( + "number$" + filter_output_format + ) + elif ( + filter_output_format is not None + and not filter_output_format.startswith("%") + and "_" not in filter_output_format + ): + self.metadata["positions"]["filter"]["type"] = "string" + self.metadata["positions"]["filter"]["type_id"] = ( + "string$" + filter_input_format + ) + self.metadata["positions"]["filter"]["output_format_id"] = ( + "string$" + filter_output_format + ) + + if photo_output_format is not None: + if photo_input_format is None and photo_output_format is not None: + f"[photo_input_format] and [photo_output_format] must both be defined." + elif photo_input_format is not None and photo_output_format is None: + f"[photo_input_format] and [photo_output_format] must both be defined." + if photo_output_format.startswith("%"): + self.metadata["positions"]["photo"]["type"] = "datetime" + self.metadata["positions"]["photo"]["type_id"] = ( + "datetime$" + photo_input_format + ) + self.metadata["positions"]["photo"]["output_format_id"] = ( + "datetime$" + photo_output_format + ) + elif "_" in photo_output_format: + self.metadata["positions"]["photo"]["type"] = "number" + self.metadata["positions"]["photo"]["type_id"] = ( + "number$" + photo_input_format + ) + self.metadata["positions"]["photo"]["output_format_id"] = ( + "number$" + photo_output_format + ) + elif ( + photo_output_format is not None + and not photo_output_format.startswith("%") + and "_" not in photo_output_format + ): + self.metadata["positions"]["photo"]["type"] = "string" + self.metadata["positions"]["photo"]["type_id"] = ( + "string$" + photo_input_format + ) + self.metadata["positions"]["photo"]["output_format_id"] = ( + "string$" + photo_output_format + ) + + if metadata_output_format is not None: + if metadata_input_format is None and metadata_output_format is not None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + elif metadata_input_format is not None and metadata_output_format is None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + if metadata_output_format.startswith("%"): + self.metadata["positions"]["metadata"]["type"] = "datetime" + self.metadata["positions"]["metadata"]["type_id"] = ( + "datetime$" + metadata_input_format + ) + self.metadata["positions"]["metadata"]["output_format_id"] = ( + "datetime$" + metadata_output_format + ) + elif "_" in metadata_output_format: + self.metadata["positions"]["metadata"]["type"] = "number" + self.metadata["positions"]["metadata"]["type_id"] = ( + "number$" + metadata_input_format + ) + self.metadata["positions"]["metadata"]["output_format_id"] = ( + "number$" + metadata_output_format + ) + elif ( + metadata_output_format is not None + and not metadata_output_format.startswith("%") + and "_" not in metadata_output_format + ): + self.metadata["positions"]["metadata"]["type"] = "string" + self.metadata["positions"]["metadata"]["type_id"] = ( + "string$" + metadata_input_format + ) + self.metadata["positions"]["metadata"]["output_format_id"] = ( + "string$" + metadata_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_sports_race_data( + self, + data: pd.DataFrame = None, + name: str = None, + times: Union[list, str] = None, + start_image: str = None, + race_image: str = None, + finish_image: str = None, + color_category: str = None, + ): + """ + Bind data to chart: sports race. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param name: Name. Name of competitor. Flourish type hint: column + :type name: str, optional + + :param times: Times. One or more columns of numbers, representing splits or laps, or a whole race. Flourish type hint: columns + :type times: Union[list, str], optional + + :param start_image: Start image. The image to use at the start of the race. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column + :type start_image: str, optional + + :param race_image: Racing image. The image to use while a participant is racing. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column + :type race_image: str, optional + + :param finish_image: Finish image. The image to use when the participant has finished the race. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column + :type finish_image: str, optional + + :param color_category: Color category. Add a category to color participants by. If empty, the name column will be used for colors. Flourish type hint: column + :type color_category: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = {} + + if name is not None: + assert name in data_columns, f"[name] is not a column in the data." + self.bindings["data"]["name"] = name + + if times is not None: + if isinstance(times, list): + for col in times: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["times"] = times + elif isinstance(times, str): + assert times in data_columns, f"[times] is not a column in the data." + self.bindings["data"]["times"] = [times] + else: + self.bindings["data"]["times"] = [] + + if start_image is not None: + assert ( + start_image in data_columns + ), f"[start_image] is not a column in the data." + self.bindings["data"]["start_image"] = start_image + + if race_image is not None: + assert ( + race_image in data_columns + ), f"[race_image] is not a column in the data." + self.bindings["data"]["race_image"] = race_image + + if finish_image is not None: + assert ( + finish_image in data_columns + ), f"[finish_image] is not a column in the data." + self.bindings["data"]["finish_image"] = finish_image + + if color_category is not None: + assert ( + color_category in data_columns + ), f"[color_category] is not a column in the data." + self.bindings["data"]["color_category"] = color_category + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_survey_data( + self, + questions_data: pd.DataFrame = None, + order_data: pd.DataFrame = None, + labels_data: pd.DataFrame = None, + colors_data: pd.DataFrame = None, + places_data: pd.DataFrame = None, + answer_groups_data: pd.DataFrame = None, + questions_categorical: Union[list, str] = None, + questions_continuous: Union[list, str] = None, + questions_geo: Union[list, str] = None, + questions_label: str = None, + questions_column_filter: str = None, + questions_id: str = None, + questions_metadata: Union[list, str] = None, + order_categories: Union[list, str] = None, + labels_label: str = None, + labels_replacement: str = None, + colors_question: str = None, + colors_answer: str = None, + colors_color: str = None, + places_latitude: str = None, + places_longitude: str = None, + places_names: Union[list, str] = None, + answer_groups_group: str = None, + answer_groups_question: str = None, + answer_groups_display_as: str = None, + answer_groups_affirmative_answers: Union[list, str] = None, + ): + """ + Bind data to chart: survey. + + + :param questions_data: Questions data. The main data sheet. Each row in this table will become a dot in the graphic., defaults to None + :type questions_data: pd.DataFrame, optional + + :param order_data: Order data. Groups by default appear in size or alphabetical order. You can override these with the "Group order" sheet., defaults to None + :type order_data: pd.DataFrame, optional + + :param labels_data: Labels data. Allows you to change how any phrase in the main data sheet is displayed in the graphic. Useful for shortening long questions, translating, etc., defaults to None + :type labels_data: pd.DataFrame, optional + + :param colors_data: Colors data. Use this extra table if you want to specify specific colors in the context of specific questions. E.g. to make a red to green scale from "strongly diagree" to "strongly agree"., defaults to None + :type colors_data: pd.DataFrame, optional + + :param places_data: Places data. A table of places found in the geographic columns of the main data sheet, each with latitude and longitude to plot it on the map, defaults to None + :type places_data: pd.DataFrame, optional + + :param answer_groups_data: Answer groups data. Grouped questions, in the form "Which of the following apply?", are made by combining mutiple yes/no columns in the main data sheet., defaults to None + :type answer_groups_data: pd.DataFrame, optional + + :param questions_categorical: Categorical columns. Each of these columns appears in the Group by, Shade by and Compare dropdowns. Flourish type hint: columns + :type questions_categorical: Union[list, str], optional + + :param questions_continuous: Continuous columns. Must contain numbers. Each of these columns appears in the Size by dropdown. Flourish type hint: columns + :type questions_continuous: Union[list, str], optional + + :param questions_geo: Geographic columns. Must contain place names matching those specified in the Places sheet. Set to blank to disable the map mode. Flourish type hint: columns + :type questions_geo: Union[list, str], optional + + :param questions_label: Label. A column containing text (e.g. names or emoji) to write on the dots. Not recommended for datasets with more than a few hundred dots. Flourish type hint: column + :type questions_label: str, optional + + :param questions_column_filter: Slider or menu. Add a time slider or menu to filter the data based on the contents of a single column. Flourish type hint: column + :type questions_column_filter: str, optional + + :param questions_id: Unique name/ID. Specify to allow animations between multiple occurrences of the same person or thing e.g. when using a time slider. Flourish type hint: column + :type questions_id: str, optional + + :param questions_metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panelsFlourish type hint: columns + :type questions_metadata: Union[list, str], optional + + :param order_categories: Order of answers. Use one column for each question or metric. Put the column header from the main data sheet at the top (e.g. "Do you agree?"), followed by the answers in the order you want (e.g. "disagree", "neutral", "agree"). Flourish type hint: columns + :type order_categories: Union[list, str], optional + + :param labels_label: Label. A column containing phrases from the main data sheet. Flourish type hint: column + :type labels_label: str, optional + + :param labels_replacement: Replacement. A column containing the phrase to display. Flourish type hint: column + :type labels_replacement: str, optional + + :param colors_question: Question. The column header (e.g. a survey question) exactly as it appears in the main data sheet. Flourish type hint: column + :type colors_question: str, optional + + :param colors_answer: Answer. Use one column for each question or metric. Put the column header from the main datasheet at the top (e.g. "Do you agree?"), followed by the answers in the order you want (e.g. "disagree", "neutral", "agree"). Flourish type hint: column + :type colors_answer: str, optional + + :param colors_color: Color. A color name (e.g. orange, red) or code (e.g. #ff3300, #ff0000). Flourish type hint: column + :type colors_color: str, optional + + :param places_latitude: Latitude. A column of latitude values. Flourish type hint: column + :type places_latitude: str, optional + + :param places_longitude: Longitude. A column of longitude values. Flourish type hint: column + :type places_longitude: str, optional + + :param places_names: Names. One or more columns of place names matching those in the main data sheet. Flourish type hint: columns + :type places_names: Union[list, str], optional + + :param answer_groups_group: Group name. This column will contain the name of the grouped question Flourish type hint: column + :type answer_groups_group: str, optional + + :param answer_groups_question: Question. A question that matches exactly one of the questions in the datasheet. Flourish type hint: column + :type answer_groups_question: str, optional + + :param answer_groups_display_as: Display answer as. This will be the new text for the question. Flourish type hint: column + :type answer_groups_display_as: str, optional + + :param answer_groups_affirmative_answers: Answers to include. The respondent is included in the group if their answer to the question is one of the answers listed in these columns. Flourish type hint: columns + :type answer_groups_affirmative_answers: Union[list, str], optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["questions"] = {} + self.data_properties["questions"] = {} + if questions_data is not None: + questions_columns = set(questions_data.columns) + int_columns_questions_data = questions_data.select_dtypes( + include="int" + ).columns + questions_data[int_columns_questions_data] = questions_data[ + int_columns_questions_data + ].astype(str) + self.data_properties["questions"] = questions_data.to_dict(orient="records") + + self.bindings["order"] = {} + self.data_properties["order"] = {} + if order_data is not None: + order_columns = set(order_data.columns) + int_columns_order_data = order_data.select_dtypes(include="int").columns + order_data[int_columns_order_data] = order_data[ + int_columns_order_data + ].astype(str) + self.data_properties["order"] = order_data.to_dict(orient="records") + + self.bindings["labels"] = {} + self.data_properties["labels"] = {} + if labels_data is not None: + labels_columns = set(labels_data.columns) + int_columns_labels_data = labels_data.select_dtypes(include="int").columns + labels_data[int_columns_labels_data] = labels_data[ + int_columns_labels_data + ].astype(str) + self.data_properties["labels"] = labels_data.to_dict(orient="records") + + self.bindings["colors"] = {} + self.data_properties["colors"] = {} + if colors_data is not None: + colors_columns = set(colors_data.columns) + int_columns_colors_data = colors_data.select_dtypes(include="int").columns + colors_data[int_columns_colors_data] = colors_data[ + int_columns_colors_data + ].astype(str) + self.data_properties["colors"] = colors_data.to_dict(orient="records") + + self.bindings["places"] = {} + self.data_properties["places"] = {} + if places_data is not None: + places_columns = set(places_data.columns) + int_columns_places_data = places_data.select_dtypes(include="int").columns + places_data[int_columns_places_data] = places_data[ + int_columns_places_data + ].astype(str) + self.data_properties["places"] = places_data.to_dict(orient="records") + + self.bindings["answer_groups"] = {} + self.data_properties["answer_groups"] = {} + if answer_groups_data is not None: + answer_groups_columns = set(answer_groups_data.columns) + int_columns_answer_groups_data = answer_groups_data.select_dtypes( + include="int" + ).columns + answer_groups_data[int_columns_answer_groups_data] = answer_groups_data[ + int_columns_answer_groups_data + ].astype(str) + self.data_properties["answer_groups"] = answer_groups_data.to_dict( + orient="records" + ) + self.metadata = {} + + if questions_categorical is not None: + if isinstance(questions_categorical, list): + for col in questions_categorical: + assert ( + col in questions_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["questions"]["categorical"] = questions_categorical + elif isinstance(questions_categorical, str): + assert ( + questions_categorical in questions_columns + ), f"[questions_categorical] is not a column in the data." + self.bindings["questions"]["categorical"] = [questions_categorical] + else: + self.bindings["questions"]["categorical"] = [] + + if questions_continuous is not None: + if isinstance(questions_continuous, list): + for col in questions_continuous: + assert ( + col in questions_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["questions"]["continuous"] = questions_continuous + elif isinstance(questions_continuous, str): + assert ( + questions_continuous in questions_columns + ), f"[questions_continuous] is not a column in the data." + self.bindings["questions"]["continuous"] = [questions_continuous] + else: + self.bindings["questions"]["continuous"] = [] + + if questions_geo is not None: + if isinstance(questions_geo, list): + for col in questions_geo: + assert ( + col in questions_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["questions"]["geo"] = questions_geo + elif isinstance(questions_geo, str): + assert ( + questions_geo in questions_columns + ), f"[questions_geo] is not a column in the data." + self.bindings["questions"]["geo"] = [questions_geo] + else: + self.bindings["questions"]["geo"] = [] + + if questions_label is not None: + assert ( + questions_label in questions_columns + ), f"[questions_label] is not a column in the data." + self.bindings["questions"]["label"] = questions_label + + if questions_column_filter is not None: + assert ( + questions_column_filter in questions_columns + ), f"[questions_column_filter] is not a column in the data." + self.bindings["questions"]["column_filter"] = questions_column_filter + + if questions_id is not None: + assert ( + questions_id in questions_columns + ), f"[questions_id] is not a column in the data." + self.bindings["questions"]["id"] = questions_id + + if questions_metadata is not None: + if isinstance(questions_metadata, list): + for col in questions_metadata: + assert ( + col in questions_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["questions"]["metadata"] = questions_metadata + elif isinstance(questions_metadata, str): + assert ( + questions_metadata in questions_columns + ), f"[questions_metadata] is not a column in the data." + self.bindings["questions"]["metadata"] = [questions_metadata] + else: + self.bindings["questions"]["metadata"] = [] + + if order_categories is not None: + if isinstance(order_categories, list): + for col in order_categories: + assert ( + col in order_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["order"]["categories"] = order_categories + elif isinstance(order_categories, str): + assert ( + order_categories in order_columns + ), f"[order_categories] is not a column in the data." + self.bindings["order"]["categories"] = [order_categories] + else: + self.bindings["order"]["categories"] = [] + + if labels_label is not None: + assert ( + labels_label in labels_columns + ), f"[labels_label] is not a column in the data." + self.bindings["labels"]["label"] = labels_label + + if labels_replacement is not None: + assert ( + labels_replacement in labels_columns + ), f"[labels_replacement] is not a column in the data." + self.bindings["labels"]["replacement"] = labels_replacement + + if colors_question is not None: + assert ( + colors_question in colors_columns + ), f"[colors_question] is not a column in the data." + self.bindings["colors"]["question"] = colors_question + + if colors_answer is not None: + assert ( + colors_answer in colors_columns + ), f"[colors_answer] is not a column in the data." + self.bindings["colors"]["answer"] = colors_answer + + if colors_color is not None: + assert ( + colors_color in colors_columns + ), f"[colors_color] is not a column in the data." + self.bindings["colors"]["color"] = colors_color + + if places_latitude is not None: + assert ( + places_latitude in places_columns + ), f"[places_latitude] is not a column in the data." + self.bindings["places"]["latitude"] = places_latitude + + if places_longitude is not None: + assert ( + places_longitude in places_columns + ), f"[places_longitude] is not a column in the data." + self.bindings["places"]["longitude"] = places_longitude + + if places_names is not None: + if isinstance(places_names, list): + for col in places_names: + assert ( + col in places_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["places"]["names"] = places_names + elif isinstance(places_names, str): + assert ( + places_names in places_columns + ), f"[places_names] is not a column in the data." + self.bindings["places"]["names"] = [places_names] + else: + self.bindings["places"]["names"] = [] + + if answer_groups_group is not None: + assert ( + answer_groups_group in answer_groups_columns + ), f"[answer_groups_group] is not a column in the data." + self.bindings["answer_groups"]["group"] = answer_groups_group + + if answer_groups_question is not None: + assert ( + answer_groups_question in answer_groups_columns + ), f"[answer_groups_question] is not a column in the data." + self.bindings["answer_groups"]["question"] = answer_groups_question + + if answer_groups_display_as is not None: + assert ( + answer_groups_display_as in answer_groups_columns + ), f"[answer_groups_display_as] is not a column in the data." + self.bindings["answer_groups"]["display_as"] = answer_groups_display_as + + if answer_groups_affirmative_answers is not None: + if isinstance(answer_groups_affirmative_answers, list): + for col in answer_groups_affirmative_answers: + assert ( + col in answer_groups_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["answer_groups"][ + "affirmative_answers" + ] = answer_groups_affirmative_answers + elif isinstance(answer_groups_affirmative_answers, str): + assert ( + answer_groups_affirmative_answers in answer_groups_columns + ), f"[answer_groups_affirmative_answers] is not a column in the data." + self.bindings["answer_groups"]["affirmative_answers"] = [ + answer_groups_affirmative_answers + ] + else: + self.bindings["answer_groups"]["affirmative_answers"] = [] + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_svg_annotator_data( + self, + data: pd.DataFrame = None, + id: str = None, + reveal_id: str = None, + h1: str = None, + h2: str = None, + content: str = None, + link: str = None, + metadata: Union[list, str] = None, + ): + """ + Bind data to chart: svg annotator. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param id: ID. A column of IDs of elements in the uploaded SVG file. Flourish type hint: column + :type id: str, optional + + :param reveal_id: Reveal layer. A column to reveal when layer is clicked. Flourish type hint: column + :type reveal_id: str, optional + + :param h1: Heading 1. A column containing the main header. Flourish type hint: column + :type h1: str, optional + + :param h2: Heading 2. A column containing a secondary header. Flourish type hint: column + :type h2: str, optional + + :param content: Content. A column containing text or HTML to display. Flourish type hint: column + :type content: str, optional + + :param link: Link. A URL that can be opened when a layer is clicked. Any reveal layers or popups will be overridden. Flourish type hint: column + :type link: str, optional + + :param metadata: Info for popups. One or more columns to display in popups and panels. Flourish type hint: columns + :type metadata: Union[list, str], optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = {} + + if id is not None: + assert id in data_columns, f"[id] is not a column in the data." + self.bindings["data"]["id"] = id + + if reveal_id is not None: + assert ( + reveal_id in data_columns + ), f"[reveal_id] is not a column in the data." + self.bindings["data"]["reveal_id"] = reveal_id + + if h1 is not None: + assert h1 in data_columns, f"[h1] is not a column in the data." + self.bindings["data"]["h1"] = h1 + + if h2 is not None: + assert h2 in data_columns, f"[h2] is not a column in the data." + self.bindings["data"]["h2"] = h2 + + if content is not None: + assert content in data_columns, f"[content] is not a column in the data." + self.bindings["data"]["content"] = content + + if link is not None: + assert link in data_columns, f"[link] is not a column in the data." + self.bindings["data"]["link"] = link + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in data_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["data"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in data_columns + ), f"[metadata] is not a column in the data." + self.bindings["data"]["metadata"] = [metadata] + else: + self.bindings["data"]["metadata"] = [] + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_table_data( + self, + rows_data: pd.DataFrame = None, + columns: Union[list, str] = None, + columns_input_format: str = None, + columns_output_format: str = None, + ): + """ + Bind data to chart: table. + + :param rows_data: Rows data. defaults to None + :type rows_data: pd.DataFrame, optional + + :param columns: Table values. The cell contents can by styled with html or markdown To style with markdown first make sure the Cell text styling setting in the Table section of the editor is on To add an image, right click on a cell and click Upload fileSuggested data type hints: string, number, datetime. Flourish type hint: columns + :type columns: Union[list, str], optional + :param columns_input_format: Formats/parses dates, strings, and numbers for the [columns] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type columns_input_format: str, optional + :param columns_output_format: Formats/parses dates, strings, and numbers for the [columns] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type columns_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["rows"] = {} + self.data_properties["rows"] = {} + if rows_data is not None: + rows_columns = set(rows_data.columns) + int_columns_rows_data = rows_data.select_dtypes(include="int").columns + rows_data[int_columns_rows_data] = rows_data[int_columns_rows_data].astype( + str + ) + self.data_properties["rows"] = rows_data.to_dict(orient="records") + self.metadata = {"rows": {"columns": {}}} + + if columns is not None: + if isinstance(columns, list): + for col in columns: + assert ( + col in rows_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["rows"]["columns"] = columns + elif isinstance(columns, str): + assert ( + columns in rows_columns + ), f"[columns] is not a column in the data." + self.bindings["rows"]["columns"] = [columns] + else: + self.bindings["rows"]["columns"] = [] + + if columns_output_format is not None: + if columns_input_format is None and columns_output_format is not None: + f"[columns_input_format] and [columns_output_format] must both be defined." + elif columns_input_format is not None and columns_output_format is None: + f"[columns_input_format] and [columns_output_format] must both be defined." + if columns_output_format.startswith("%"): + self.metadata["rows"]["columns"]["type"] = "datetime" + self.metadata["rows"]["columns"]["type_id"] = ( + "datetime$" + columns_input_format + ) + self.metadata["rows"]["columns"]["output_format_id"] = ( + "datetime$" + columns_output_format + ) + elif "_" in columns_output_format: + self.metadata["rows"]["columns"]["type"] = "number" + self.metadata["rows"]["columns"]["type_id"] = ( + "number$" + columns_input_format + ) + self.metadata["rows"]["columns"]["output_format_id"] = ( + "number$" + columns_output_format + ) + elif ( + columns_output_format is not None + and not columns_output_format.startswith("%") + and "_" not in columns_output_format + ): + self.metadata["rows"]["columns"]["type"] = "string" + self.metadata["rows"]["columns"]["type_id"] = ( + "string$" + columns_input_format + ) + self.metadata["rows"]["columns"]["output_format_id"] = ( + "string$" + columns_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_text_annotator_data( + self, + data: pd.DataFrame = None, + text: str = None, + note: str = None, + ): + """ + Bind data to chart: text annotator. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param text: Text. The piece of text you want to highlight. Note that text is case and space sensitive. Flourish type hint: column + :type text: str, optional + + :param note: Annotation. The annotation content. Flourish type hint: column + :type note: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = {} + + if text is not None: + assert text in data_columns, f"[text] is not a column in the data." + self.bindings["data"]["text"] = text + + if note is not None: + assert note in data_columns, f"[note] is not a column in the data." + self.bindings["data"]["note"] = note + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_timeline_data( + self, + data: pd.DataFrame = None, + time_start: str = None, + time_end: str = None, + category: str = None, + title: str = None, + subtitle: str = None, + text: str = None, + image: str = None, + background: str = None, + background_input_format: str = None, + background_output_format: str = None, + category_input_format: str = None, + category_output_format: str = None, + time_end_input_format: str = None, + time_end_output_format: str = None, + image_input_format: str = None, + image_output_format: str = None, + time_start_input_format: str = None, + time_start_output_format: str = None, + subtitle_input_format: str = None, + subtitle_output_format: str = None, + text_input_format: str = None, + text_output_format: str = None, + title_input_format: str = None, + title_output_format: str = None, + ): + """ + Bind data to chart: timeline. + + :param data: Data. defaults to None + :type data: pd.DataFrame, optional + + :param time_start: Time start + :type time_start: str, optional + + :param time_end: End time. Sets the duration of the event in time scale mode. Flourish type hint: column + :type time_end: str, optional + + :param category: Category + :type category: str, optional + + :param title: Title. Title of the content. Suggested data type hints: string, number, datetime. Flourish type hint: column + :type title: str, optional + + :param subtitle: Subtitle. Subtitle of the content. Suggested data type hints: string, number, datetime. Flourish type hint: column + :type subtitle: str, optional + + :param text: Text. Text to display inside the data point. Flourish type hint: column + :type text: str, optional + + :param image: Image. Main image for the event. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column + :type image: str, optional + + :param background: Background image. Background image for the event. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column + :type background: str, optional + :param background_input_format: Formats/parses dates, strings, and numbers for the [background] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type background_input_format: str, optional + :param background_output_format: Formats/parses dates, strings, and numbers for the [background] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type background_output_format: str, optional + :param category_input_format: Formats/parses dates, strings, and numbers for the [category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type category_input_format: str, optional + :param category_output_format: Formats/parses dates, strings, and numbers for the [category] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type category_output_format: str, optional + :param time_end_input_format: Formats/parses dates, strings, and numbers for the [time_end] column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type time_end_input_format: str, optional + :param time_end_output_format: Formats/parses dates, strings, and numbers for the [time_end] column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type time_end_output_format: str, optional + :param image_input_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type image_input_format: str, optional + :param image_output_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type image_output_format: str, optional + :param time_start_input_format: Formats/parses dates, strings, and numbers for the [time_start] column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type time_start_input_format: str, optional + :param time_start_output_format: Formats/parses dates, strings, and numbers for the [time_start] column. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type time_start_output_format: str, optional + :param subtitle_input_format: Formats/parses dates, strings, and numbers for the [subtitle] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type subtitle_input_format: str, optional + :param subtitle_output_format: Formats/parses dates, strings, and numbers for the [subtitle] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type subtitle_output_format: str, optional + :param text_input_format: Formats/parses dates, strings, and numbers for the [text] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type text_input_format: str, optional + :param text_output_format: Formats/parses dates, strings, and numbers for the [text] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type text_output_format: str, optional + :param title_input_format: Formats/parses dates, strings, and numbers for the [title] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type title_input_format: str, optional + :param title_output_format: Formats/parses dates, strings, and numbers for the [title] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type title_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["data"] = {} + self.data_properties["data"] = {} + if data is not None: + data_columns = set(data.columns) + int_columns_data = data.select_dtypes(include="int").columns + data[int_columns_data] = data[int_columns_data].astype(str) + self.data_properties["data"] = data.to_dict(orient="records") + self.metadata = { + "data": { + "background": {}, + "category": {}, + "time_end": {}, + "image": {}, + "time_start": {}, + "subtitle": {}, + "text": {}, + "title": {}, + } + } + + if time_start is not None: + assert ( + time_start in data_columns + ), f"[time_start] is not a column in the data." + self.bindings["data"]["time_start"] = time_start + + if time_end is not None: + assert time_end in data_columns, f"[time_end] is not a column in the data." + self.bindings["data"]["time_end"] = time_end + + if category is not None: + assert category in data_columns, f"[category] is not a column in the data." + self.bindings["data"]["category"] = category + + if title is not None: + assert title in data_columns, f"[title] is not a column in the data." + self.bindings["data"]["title"] = title + + if subtitle is not None: + assert subtitle in data_columns, f"[subtitle] is not a column in the data." + self.bindings["data"]["subtitle"] = subtitle + + if text is not None: + assert text in data_columns, f"[text] is not a column in the data." + self.bindings["data"]["text"] = text + + if image is not None: + assert image in data_columns, f"[image] is not a column in the data." + self.bindings["data"]["image"] = image + + if background is not None: + assert ( + background in data_columns + ), f"[background] is not a column in the data." + self.bindings["data"]["background"] = background + + if time_start_output_format is not None: + if time_start_input_format is None and time_start_output_format is not None: + f"[time_start_input_format] and [time_start_output_format] must both be defined." + elif ( + time_start_input_format is not None and time_start_output_format is None + ): + f"[time_start_input_format] and [time_start_output_format] must both be defined." + if time_start_output_format.startswith("%"): + self.metadata["data"]["time_start"]["type"] = "datetime" + self.metadata["data"]["time_start"]["type_id"] = ( + "datetime$" + time_start_input_format + ) + self.metadata["data"]["time_start"]["output_format_id"] = ( + "datetime$" + time_start_output_format + ) + elif "_" in time_start_output_format: + self.metadata["data"]["time_start"]["type"] = "number" + self.metadata["data"]["time_start"]["type_id"] = ( + "number$" + time_start_input_format + ) + self.metadata["data"]["time_start"]["output_format_id"] = ( + "number$" + time_start_output_format + ) + elif ( + time_start_output_format is not None + and not time_start_output_format.startswith("%") + and "_" not in time_start_output_format + ): + self.metadata["data"]["time_start"]["type"] = "string" + self.metadata["data"]["time_start"]["type_id"] = ( + "string$" + time_start_input_format + ) + self.metadata["data"]["time_start"]["output_format_id"] = ( + "string$" + time_start_output_format + ) + + if time_end_output_format is not None: + if time_end_input_format is None and time_end_output_format is not None: + f"[time_end_input_format] and [time_end_output_format] must both be defined." + elif time_end_input_format is not None and time_end_output_format is None: + f"[time_end_input_format] and [time_end_output_format] must both be defined." + if time_end_output_format.startswith("%"): + self.metadata["data"]["time_end"]["type"] = "datetime" + self.metadata["data"]["time_end"]["type_id"] = ( + "datetime$" + time_end_input_format + ) + self.metadata["data"]["time_end"]["output_format_id"] = ( + "datetime$" + time_end_output_format + ) + elif "_" in time_end_output_format: + self.metadata["data"]["time_end"]["type"] = "number" + self.metadata["data"]["time_end"]["type_id"] = ( + "number$" + time_end_input_format + ) + self.metadata["data"]["time_end"]["output_format_id"] = ( + "number$" + time_end_output_format + ) + elif ( + time_end_output_format is not None + and not time_end_output_format.startswith("%") + and "_" not in time_end_output_format + ): + self.metadata["data"]["time_end"]["type"] = "string" + self.metadata["data"]["time_end"]["type_id"] = ( + "string$" + time_end_input_format + ) + self.metadata["data"]["time_end"]["output_format_id"] = ( + "string$" + time_end_output_format + ) + + if category_output_format is not None: + if category_input_format is None and category_output_format is not None: + f"[category_input_format] and [category_output_format] must both be defined." + elif category_input_format is not None and category_output_format is None: + f"[category_input_format] and [category_output_format] must both be defined." + if category_output_format.startswith("%"): + self.metadata["data"]["category"]["type"] = "datetime" + self.metadata["data"]["category"]["type_id"] = ( + "datetime$" + category_input_format + ) + self.metadata["data"]["category"]["output_format_id"] = ( + "datetime$" + category_output_format + ) + elif "_" in category_output_format: + self.metadata["data"]["category"]["type"] = "number" + self.metadata["data"]["category"]["type_id"] = ( + "number$" + category_input_format + ) + self.metadata["data"]["category"]["output_format_id"] = ( + "number$" + category_output_format + ) + elif ( + category_output_format is not None + and not category_output_format.startswith("%") + and "_" not in category_output_format + ): + self.metadata["data"]["category"]["type"] = "string" + self.metadata["data"]["category"]["type_id"] = ( + "string$" + category_input_format + ) + self.metadata["data"]["category"]["output_format_id"] = ( + "string$" + category_output_format + ) + + if title_output_format is not None: + if title_input_format is None and title_output_format is not None: + f"[title_input_format] and [title_output_format] must both be defined." + elif title_input_format is not None and title_output_format is None: + f"[title_input_format] and [title_output_format] must both be defined." + if title_output_format.startswith("%"): + self.metadata["data"]["title"]["type"] = "datetime" + self.metadata["data"]["title"]["type_id"] = ( + "datetime$" + title_input_format + ) + self.metadata["data"]["title"]["output_format_id"] = ( + "datetime$" + title_output_format + ) + elif "_" in title_output_format: + self.metadata["data"]["title"]["type"] = "number" + self.metadata["data"]["title"]["type_id"] = ( + "number$" + title_input_format + ) + self.metadata["data"]["title"]["output_format_id"] = ( + "number$" + title_output_format + ) + elif ( + title_output_format is not None + and not title_output_format.startswith("%") + and "_" not in title_output_format + ): + self.metadata["data"]["title"]["type"] = "string" + self.metadata["data"]["title"]["type_id"] = ( + "string$" + title_input_format + ) + self.metadata["data"]["title"]["output_format_id"] = ( + "string$" + title_output_format + ) + + if subtitle_output_format is not None: + if subtitle_input_format is None and subtitle_output_format is not None: + f"[subtitle_input_format] and [subtitle_output_format] must both be defined." + elif subtitle_input_format is not None and subtitle_output_format is None: + f"[subtitle_input_format] and [subtitle_output_format] must both be defined." + if subtitle_output_format.startswith("%"): + self.metadata["data"]["subtitle"]["type"] = "datetime" + self.metadata["data"]["subtitle"]["type_id"] = ( + "datetime$" + subtitle_input_format + ) + self.metadata["data"]["subtitle"]["output_format_id"] = ( + "datetime$" + subtitle_output_format + ) + elif "_" in subtitle_output_format: + self.metadata["data"]["subtitle"]["type"] = "number" + self.metadata["data"]["subtitle"]["type_id"] = ( + "number$" + subtitle_input_format + ) + self.metadata["data"]["subtitle"]["output_format_id"] = ( + "number$" + subtitle_output_format + ) + elif ( + subtitle_output_format is not None + and not subtitle_output_format.startswith("%") + and "_" not in subtitle_output_format + ): + self.metadata["data"]["subtitle"]["type"] = "string" + self.metadata["data"]["subtitle"]["type_id"] = ( + "string$" + subtitle_input_format + ) + self.metadata["data"]["subtitle"]["output_format_id"] = ( + "string$" + subtitle_output_format + ) + + if text_output_format is not None: + if text_input_format is None and text_output_format is not None: + f"[text_input_format] and [text_output_format] must both be defined." + elif text_input_format is not None and text_output_format is None: + f"[text_input_format] and [text_output_format] must both be defined." + if text_output_format.startswith("%"): + self.metadata["data"]["text"]["type"] = "datetime" + self.metadata["data"]["text"]["type_id"] = ( + "datetime$" + text_input_format + ) + self.metadata["data"]["text"]["output_format_id"] = ( + "datetime$" + text_output_format + ) + elif "_" in text_output_format: + self.metadata["data"]["text"]["type"] = "number" + self.metadata["data"]["text"]["type_id"] = "number$" + text_input_format + self.metadata["data"]["text"]["output_format_id"] = ( + "number$" + text_output_format + ) + elif ( + text_output_format is not None + and not text_output_format.startswith("%") + and "_" not in text_output_format + ): + self.metadata["data"]["text"]["type"] = "string" + self.metadata["data"]["text"]["type_id"] = "string$" + text_input_format + self.metadata["data"]["text"]["output_format_id"] = ( + "string$" + text_output_format + ) + + if image_output_format is not None: + if image_input_format is None and image_output_format is not None: + f"[image_input_format] and [image_output_format] must both be defined." + elif image_input_format is not None and image_output_format is None: + f"[image_input_format] and [image_output_format] must both be defined." + if image_output_format.startswith("%"): + self.metadata["data"]["image"]["type"] = "datetime" + self.metadata["data"]["image"]["type_id"] = ( + "datetime$" + image_input_format + ) + self.metadata["data"]["image"]["output_format_id"] = ( + "datetime$" + image_output_format + ) + elif "_" in image_output_format: + self.metadata["data"]["image"]["type"] = "number" + self.metadata["data"]["image"]["type_id"] = ( + "number$" + image_input_format + ) + self.metadata["data"]["image"]["output_format_id"] = ( + "number$" + image_output_format + ) + elif ( + image_output_format is not None + and not image_output_format.startswith("%") + and "_" not in image_output_format + ): + self.metadata["data"]["image"]["type"] = "string" + self.metadata["data"]["image"]["type_id"] = ( + "string$" + image_input_format + ) + self.metadata["data"]["image"]["output_format_id"] = ( + "string$" + image_output_format + ) + + if background_output_format is not None: + if background_input_format is None and background_output_format is not None: + f"[background_input_format] and [background_output_format] must both be defined." + elif ( + background_input_format is not None and background_output_format is None + ): + f"[background_input_format] and [background_output_format] must both be defined." + if background_output_format.startswith("%"): + self.metadata["data"]["background"]["type"] = "datetime" + self.metadata["data"]["background"]["type_id"] = ( + "datetime$" + background_input_format + ) + self.metadata["data"]["background"]["output_format_id"] = ( + "datetime$" + background_output_format + ) + elif "_" in background_output_format: + self.metadata["data"]["background"]["type"] = "number" + self.metadata["data"]["background"]["type_id"] = ( + "number$" + background_input_format + ) + self.metadata["data"]["background"]["output_format_id"] = ( + "number$" + background_output_format + ) + elif ( + background_output_format is not None + and not background_output_format.startswith("%") + and "_" not in background_output_format + ): + self.metadata["data"]["background"]["type"] = "string" + self.metadata["data"]["background"]["type_id"] = ( + "string$" + background_input_format + ) + self.metadata["data"]["background"]["output_format_id"] = ( + "string$" + background_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_tournament_data( + self, + matches_data: pd.DataFrame = None, + round: str = None, + team_a: str = None, + team_b: str = None, + winner: str = None, + score_a: str = None, + score_b: str = None, + metadata: Union[list, str] = None, + id: str = None, + image: str = None, + metadata_input_format: str = None, + metadata_output_format: str = None, + team_a_input_format: str = None, + team_a_output_format: str = None, + score_a_input_format: str = None, + score_a_output_format: str = None, + team_b_input_format: str = None, + team_b_output_format: str = None, + score_b_input_format: str = None, + score_b_output_format: str = None, + round_input_format: str = None, + round_output_format: str = None, + winner_input_format: str = None, + winner_output_format: str = None, + id_input_format: str = None, + id_output_format: str = None, + image_input_format: str = None, + image_output_format: str = None, + ): + """ + Bind data to chart: tournament. + + + :param matches_data: Matches data. teams, defaults to None + :type matches_data: pd.DataFrame, optional + + :param round: Stage. The stage of the tournament, for example "Round of 16" or "Semifinals". Flourish type hint: column + :type round: str, optional + + :param team_a: Participant A. The first participant or team in this match. Flourish type hint: column + :type team_a: str, optional + + :param team_b: Participant B. The second participant or team in this match. Flourish type hint: column + :type team_b: str, optional + + :param winner: Winner. The winning participant or team in this match. Must match the name of either Participant A or Participant B. If left blank, the template will assume that the match is upcoming. Flourish type hint: column + :type winner: str, optional + + :param score_a: Participant A score. The score of Participant A in this match. Will appear along with the participants name in the box. Suggested data type hints: string, number. Flourish type hint: column + :type score_a: str, optional + + :param score_b: Participant B score. The score of Participant B in this match. Will appear along with the participants name in the box. Suggested data type hints: string, number. Flourish type hint: column + :type score_b: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs , embedded charts etc) to include in popups and panels Suggested data type hints: string, number, datetime. Flourish type hint: columns + :type metadata: Union[list, str], optional + + :param id: ID. Participant ID. Should match a participants name from the Matches sheet. Flourish type hint: column + :type id: str, optional + + :param image: Image. Image to render in the participant box. Add an image URL or right-click on a cell to upload an image. Flourish type hint: column + :type image: str, optional + :param metadata_input_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_input_format: str, optional + :param metadata_output_format: Formats/parses dates, strings, and numbers for the [metadata] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. If date-time: A date-time format such as "%Y-%m-%dT%H:%M:%S.%LZ", "%d/%m/%Y", "%d %b", "%-I%p", "Q%q %Y", "%Y Q%q", and so on. All available formats noted in Flourish documentation: [https://developers.flourish.studio/api/create-visualisation/](https://developers.flourish.studio/api/create-visualisation/).. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type metadata_output_format: str, optional + :param team_a_input_format: Formats/parses dates, strings, and numbers for the [team_a] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type team_a_input_format: str, optional + :param team_a_output_format: Formats/parses dates, strings, and numbers for the [team_a] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type team_a_output_format: str, optional + :param score_a_input_format: Formats/parses dates, strings, and numbers for the [score_a] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type score_a_input_format: str, optional + :param score_a_output_format: Formats/parses dates, strings, and numbers for the [score_a] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type score_a_output_format: str, optional + :param team_b_input_format: Formats/parses dates, strings, and numbers for the [team_b] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type team_b_input_format: str, optional + :param team_b_output_format: Formats/parses dates, strings, and numbers for the [team_b] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type team_b_output_format: str, optional + :param score_b_input_format: Formats/parses dates, strings, and numbers for the [score_b] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type score_b_input_format: str, optional + :param score_b_output_format: Formats/parses dates, strings, and numbers for the [score_b] column. If string: any arbritrary string. If number: 'comma_point', 'space_point', 'point_comma', 'space_comma', 'none_point', 'none_comma'. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type score_b_output_format: str, optional + :param round_input_format: Formats/parses dates, strings, and numbers for the [round] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type round_input_format: str, optional + :param round_output_format: Formats/parses dates, strings, and numbers for the [round] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type round_output_format: str, optional + :param winner_input_format: Formats/parses dates, strings, and numbers for the [winner] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type winner_input_format: str, optional + :param winner_output_format: Formats/parses dates, strings, and numbers for the [winner] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type winner_output_format: str, optional + :param id_input_format: Formats/parses dates, strings, and numbers for the [id] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type id_input_format: str, optional + :param id_output_format: Formats/parses dates, strings, and numbers for the [id] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type id_output_format: str, optional + :param image_input_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type image_input_format: str, optional + :param image_output_format: Formats/parses dates, strings, and numbers for the [image] column. If string: any arbritrary string. Note: metadata is optional, and the API will interpret your data for you if you do not specify it. A typical example of when specifying metadata can be useful is when column(s) in your data contain numbers or dates that you wish to format visually (e.g. to display a column containing MM/DD/YYYY dates in DD/MM/YYYY format). defaults to None + :type image_output_format: str, optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["matches"] = {} + self.data_properties["matches"] = {} + if matches_data is not None: + matches_columns = set(matches_data.columns) + int_columns_matches_data = matches_data.select_dtypes(include="int").columns + matches_data[int_columns_matches_data] = matches_data[ + int_columns_matches_data + ].astype(str) + self.data_properties["matches"] = matches_data.to_dict(orient="records") + self.metadata = { + "matches": { + "metadata": {}, + "team_a": {}, + "score_a": {}, + "team_b": {}, + "score_b": {}, + "round": {}, + "winner": {}, + }, + "teams": {"id": {}, "image": {}}, + } + + if round is not None: + assert round in matches_columns, f"[round] is not a column in the data." + self.bindings["matches"]["round"] = round + + if team_a is not None: + assert team_a in matches_columns, f"[team_a] is not a column in the data." + self.bindings["matches"]["team_a"] = team_a + + if team_b is not None: + assert team_b in matches_columns, f"[team_b] is not a column in the data." + self.bindings["matches"]["team_b"] = team_b + + if winner is not None: + assert winner in matches_columns, f"[winner] is not a column in the data." + self.bindings["matches"]["winner"] = winner + + if score_a is not None: + assert score_a in matches_columns, f"[score_a] is not a column in the data." + self.bindings["matches"]["score_a"] = score_a + + if score_b is not None: + assert score_b in matches_columns, f"[score_b] is not a column in the data." + self.bindings["matches"]["score_b"] = score_b + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in matches_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["matches"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in matches_columns + ), f"[metadata] is not a column in the data." + self.bindings["matches"]["metadata"] = [metadata] + else: + self.bindings["matches"]["metadata"] = [] + + if id is not None: + assert id in teams_columns, f"[id] is not a column in the data." + self.bindings["teams"]["id"] = id + + if image is not None: + assert image in teams_columns, f"[image] is not a column in the data." + self.bindings["teams"]["image"] = image + + if round_output_format is not None: + if round_input_format is None and round_output_format is not None: + f"[round_input_format] and [round_output_format] must both be defined." + elif round_input_format is not None and round_output_format is None: + f"[round_input_format] and [round_output_format] must both be defined." + if round_output_format.startswith("%"): + self.metadata["matches"]["round"]["type"] = "datetime" + self.metadata["matches"]["round"]["type_id"] = ( + "datetime$" + round_input_format + ) + self.metadata["matches"]["round"]["output_format_id"] = ( + "datetime$" + round_output_format + ) + elif "_" in round_output_format: + self.metadata["matches"]["round"]["type"] = "number" + self.metadata["matches"]["round"]["type_id"] = ( + "number$" + round_input_format + ) + self.metadata["matches"]["round"]["output_format_id"] = ( + "number$" + round_output_format + ) + elif ( + round_output_format is not None + and not round_output_format.startswith("%") + and "_" not in round_output_format + ): + self.metadata["matches"]["round"]["type"] = "string" + self.metadata["matches"]["round"]["type_id"] = ( + "string$" + round_input_format + ) + self.metadata["matches"]["round"]["output_format_id"] = ( + "string$" + round_output_format + ) + + if team_a_output_format is not None: + if team_a_input_format is None and team_a_output_format is not None: + f"[team_a_input_format] and [team_a_output_format] must both be defined." + elif team_a_input_format is not None and team_a_output_format is None: + f"[team_a_input_format] and [team_a_output_format] must both be defined." + if team_a_output_format.startswith("%"): + self.metadata["matches"]["team_a"]["type"] = "datetime" + self.metadata["matches"]["team_a"]["type_id"] = ( + "datetime$" + team_a_input_format + ) + self.metadata["matches"]["team_a"]["output_format_id"] = ( + "datetime$" + team_a_output_format + ) + elif "_" in team_a_output_format: + self.metadata["matches"]["team_a"]["type"] = "number" + self.metadata["matches"]["team_a"]["type_id"] = ( + "number$" + team_a_input_format + ) + self.metadata["matches"]["team_a"]["output_format_id"] = ( + "number$" + team_a_output_format + ) + elif ( + team_a_output_format is not None + and not team_a_output_format.startswith("%") + and "_" not in team_a_output_format + ): + self.metadata["matches"]["team_a"]["type"] = "string" + self.metadata["matches"]["team_a"]["type_id"] = ( + "string$" + team_a_input_format + ) + self.metadata["matches"]["team_a"]["output_format_id"] = ( + "string$" + team_a_output_format + ) + + if team_b_output_format is not None: + if team_b_input_format is None and team_b_output_format is not None: + f"[team_b_input_format] and [team_b_output_format] must both be defined." + elif team_b_input_format is not None and team_b_output_format is None: + f"[team_b_input_format] and [team_b_output_format] must both be defined." + if team_b_output_format.startswith("%"): + self.metadata["matches"]["team_b"]["type"] = "datetime" + self.metadata["matches"]["team_b"]["type_id"] = ( + "datetime$" + team_b_input_format + ) + self.metadata["matches"]["team_b"]["output_format_id"] = ( + "datetime$" + team_b_output_format + ) + elif "_" in team_b_output_format: + self.metadata["matches"]["team_b"]["type"] = "number" + self.metadata["matches"]["team_b"]["type_id"] = ( + "number$" + team_b_input_format + ) + self.metadata["matches"]["team_b"]["output_format_id"] = ( + "number$" + team_b_output_format + ) + elif ( + team_b_output_format is not None + and not team_b_output_format.startswith("%") + and "_" not in team_b_output_format + ): + self.metadata["matches"]["team_b"]["type"] = "string" + self.metadata["matches"]["team_b"]["type_id"] = ( + "string$" + team_b_input_format + ) + self.metadata["matches"]["team_b"]["output_format_id"] = ( + "string$" + team_b_output_format + ) + + if winner_output_format is not None: + if winner_input_format is None and winner_output_format is not None: + f"[winner_input_format] and [winner_output_format] must both be defined." + elif winner_input_format is not None and winner_output_format is None: + f"[winner_input_format] and [winner_output_format] must both be defined." + if winner_output_format.startswith("%"): + self.metadata["matches"]["winner"]["type"] = "datetime" + self.metadata["matches"]["winner"]["type_id"] = ( + "datetime$" + winner_input_format + ) + self.metadata["matches"]["winner"]["output_format_id"] = ( + "datetime$" + winner_output_format + ) + elif "_" in winner_output_format: + self.metadata["matches"]["winner"]["type"] = "number" + self.metadata["matches"]["winner"]["type_id"] = ( + "number$" + winner_input_format + ) + self.metadata["matches"]["winner"]["output_format_id"] = ( + "number$" + winner_output_format + ) + elif ( + winner_output_format is not None + and not winner_output_format.startswith("%") + and "_" not in winner_output_format + ): + self.metadata["matches"]["winner"]["type"] = "string" + self.metadata["matches"]["winner"]["type_id"] = ( + "string$" + winner_input_format + ) + self.metadata["matches"]["winner"]["output_format_id"] = ( + "string$" + winner_output_format + ) + + if score_a_output_format is not None: + if score_a_input_format is None and score_a_output_format is not None: + f"[score_a_input_format] and [score_a_output_format] must both be defined." + elif score_a_input_format is not None and score_a_output_format is None: + f"[score_a_input_format] and [score_a_output_format] must both be defined." + if score_a_output_format.startswith("%"): + self.metadata["matches"]["score_a"]["type"] = "datetime" + self.metadata["matches"]["score_a"]["type_id"] = ( + "datetime$" + score_a_input_format + ) + self.metadata["matches"]["score_a"]["output_format_id"] = ( + "datetime$" + score_a_output_format + ) + elif "_" in score_a_output_format: + self.metadata["matches"]["score_a"]["type"] = "number" + self.metadata["matches"]["score_a"]["type_id"] = ( + "number$" + score_a_input_format + ) + self.metadata["matches"]["score_a"]["output_format_id"] = ( + "number$" + score_a_output_format + ) + elif ( + score_a_output_format is not None + and not score_a_output_format.startswith("%") + and "_" not in score_a_output_format + ): + self.metadata["matches"]["score_a"]["type"] = "string" + self.metadata["matches"]["score_a"]["type_id"] = ( + "string$" + score_a_input_format + ) + self.metadata["matches"]["score_a"]["output_format_id"] = ( + "string$" + score_a_output_format + ) + + if score_b_output_format is not None: + if score_b_input_format is None and score_b_output_format is not None: + f"[score_b_input_format] and [score_b_output_format] must both be defined." + elif score_b_input_format is not None and score_b_output_format is None: + f"[score_b_input_format] and [score_b_output_format] must both be defined." + if score_b_output_format.startswith("%"): + self.metadata["matches"]["score_b"]["type"] = "datetime" + self.metadata["matches"]["score_b"]["type_id"] = ( + "datetime$" + score_b_input_format + ) + self.metadata["matches"]["score_b"]["output_format_id"] = ( + "datetime$" + score_b_output_format + ) + elif "_" in score_b_output_format: + self.metadata["matches"]["score_b"]["type"] = "number" + self.metadata["matches"]["score_b"]["type_id"] = ( + "number$" + score_b_input_format + ) + self.metadata["matches"]["score_b"]["output_format_id"] = ( + "number$" + score_b_output_format + ) + elif ( + score_b_output_format is not None + and not score_b_output_format.startswith("%") + and "_" not in score_b_output_format + ): + self.metadata["matches"]["score_b"]["type"] = "string" + self.metadata["matches"]["score_b"]["type_id"] = ( + "string$" + score_b_input_format + ) + self.metadata["matches"]["score_b"]["output_format_id"] = ( + "string$" + score_b_output_format + ) + + if metadata_output_format is not None: + if metadata_input_format is None and metadata_output_format is not None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + elif metadata_input_format is not None and metadata_output_format is None: + f"[metadata_input_format] and [metadata_output_format] must both be defined." + if metadata_output_format.startswith("%"): + self.metadata["matches"]["metadata"]["type"] = "datetime" + self.metadata["matches"]["metadata"]["type_id"] = ( + "datetime$" + metadata_input_format + ) + self.metadata["matches"]["metadata"]["output_format_id"] = ( + "datetime$" + metadata_output_format + ) + elif "_" in metadata_output_format: + self.metadata["matches"]["metadata"]["type"] = "number" + self.metadata["matches"]["metadata"]["type_id"] = ( + "number$" + metadata_input_format + ) + self.metadata["matches"]["metadata"]["output_format_id"] = ( + "number$" + metadata_output_format + ) + elif ( + metadata_output_format is not None + and not metadata_output_format.startswith("%") + and "_" not in metadata_output_format + ): + self.metadata["matches"]["metadata"]["type"] = "string" + self.metadata["matches"]["metadata"]["type_id"] = ( + "string$" + metadata_input_format + ) + self.metadata["matches"]["metadata"]["output_format_id"] = ( + "string$" + metadata_output_format + ) + + if id_output_format is not None: + if id_input_format is None and id_output_format is not None: + f"[id_input_format] and [id_output_format] must both be defined." + elif id_input_format is not None and id_output_format is None: + f"[id_input_format] and [id_output_format] must both be defined." + if id_output_format.startswith("%"): + self.metadata["teams"]["id"]["type"] = "datetime" + self.metadata["teams"]["id"]["type_id"] = "datetime$" + id_input_format + self.metadata["teams"]["id"]["output_format_id"] = ( + "datetime$" + id_output_format + ) + elif "_" in id_output_format: + self.metadata["teams"]["id"]["type"] = "number" + self.metadata["teams"]["id"]["type_id"] = "number$" + id_input_format + self.metadata["teams"]["id"]["output_format_id"] = ( + "number$" + id_output_format + ) + elif ( + id_output_format is not None + and not id_output_format.startswith("%") + and "_" not in id_output_format + ): + self.metadata["teams"]["id"]["type"] = "string" + self.metadata["teams"]["id"]["type_id"] = "string$" + id_input_format + self.metadata["teams"]["id"]["output_format_id"] = ( + "string$" + id_output_format + ) + + if image_output_format is not None: + if image_input_format is None and image_output_format is not None: + f"[image_input_format] and [image_output_format] must both be defined." + elif image_input_format is not None and image_output_format is None: + f"[image_input_format] and [image_output_format] must both be defined." + if image_output_format.startswith("%"): + self.metadata["teams"]["image"]["type"] = "datetime" + self.metadata["teams"]["image"]["type_id"] = ( + "datetime$" + image_input_format + ) + self.metadata["teams"]["image"]["output_format_id"] = ( + "datetime$" + image_output_format + ) + elif "_" in image_output_format: + self.metadata["teams"]["image"]["type"] = "number" + self.metadata["teams"]["image"]["type_id"] = ( + "number$" + image_input_format + ) + self.metadata["teams"]["image"]["output_format_id"] = ( + "number$" + image_output_format + ) + elif ( + image_output_format is not None + and not image_output_format.startswith("%") + and "_" not in image_output_format + ): + self.metadata["teams"]["image"]["type"] = "string" + self.metadata["teams"]["image"]["type_id"] = ( + "string$" + image_input_format + ) + self.metadata["teams"]["image"]["output_format_id"] = ( + "string$" + image_output_format + ) + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def bind_word_cloud_data( + self, + words_data: pd.DataFrame = None, + word: str = None, + value: str = None, + category: str = None, + metadata: Union[list, str] = None, + ): + """ + Bind data to chart: word cloud. + + :param words_data: Words data. defaults to None + :type words_data: pd.DataFrame, optional + + :param word: Word + :type word: str, optional + + :param value: Value + :type value: str, optional + + :param category: Category + :type category: str, optional + + :param metadata: Info for popups. One or more columns of information (text, image URLs, embedded charts etc) to include in popups and panels Flourish type hint: columns + :type metadata: Union[list, str], optional + + """ + bindings_error(self) + + if not hasattr(self, "bindings"): + self.bindings = {} + if not hasattr(self, "data_properties"): + self.data_properties = {} + if not hasattr(self, "metadata"): + self.metadata = {} + self.bindings["words"] = {} + self.data_properties["words"] = {} + if words_data is not None: + words_columns = set(words_data.columns) + int_columns_words_data = words_data.select_dtypes(include="int").columns + words_data[int_columns_words_data] = words_data[ + int_columns_words_data + ].astype(str) + self.data_properties["words"] = words_data.to_dict(orient="records") + self.metadata = {} + + if word is not None: + assert word in words_columns, f"[word] is not a column in the data." + self.bindings["words"]["word"] = word + + if value is not None: + assert value in words_columns, f"[value] is not a column in the data." + self.bindings["words"]["value"] = value + + if category is not None: + assert category in words_columns, f"[category] is not a column in the data." + self.bindings["words"]["category"] = category + + if metadata is not None: + if isinstance(metadata, list): + for col in metadata: + assert ( + col in words_columns + ), f"[{col}] is not a list of columns in the data." + self.bindings["words"]["metadata"] = metadata + elif isinstance(metadata, str): + assert ( + metadata in words_columns + ), f"[metadata] is not a column in the data." + self.bindings["words"]["metadata"] = [metadata] + else: + self.bindings["words"]["metadata"] = [] + self.data_and_bindings = { + "data": self.data_properties, + "bindings": self.bindings, + "metadata": self.metadata, + } + + dict_to_merge = self.data_and_bindings + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self diff --git a/python_package/flourishcharts/data/flourish_api_documentation.csv b/python_package/flourishcharts/data/flourish_api_documentation.csv new file mode 100644 index 0000000..84752d2 --- /dev/null +++ b/python_package/flourishcharts/data/flourish_api_documentation.csv @@ -0,0 +1,58 @@ +,template_name,template_id,template_version,chart_type,url +0,audio,@flourish/audio,1.6.0,audio,https://app.flourish.studio/@flourish/audio/1.6.0#api +1,bar chart race,@flourish/bar-chart-race,16.1.2,bar_race,https://app.flourish.studio/@flourish/bar-chart-race/16.1.2#api +2,bubble chart,@flourish/bubble-chart,3.1.2,bubble,https://app.flourish.studio/@flourish/bubble-chart/3.1.2#api +3,calculator,@flourish/calculator,1.7.1,calculator,https://app.flourish.studio/@flourish/calculator/1.7.1#api +4,cards,@flourish/cards,11.1.2,cards,https://app.flourish.studio/@flourish/cards/11.1.2#api +5,chord diagram,@flourish/chord-diagram,8.6.1,chord_diagram,https://app.flourish.studio/@flourish/chord-diagram/8.6.1#api +6,countdown,@flourish/countdown,2.7.1,countdown,https://app.flourish.studio/@flourish/countdown/2.7.1#api +7,draw the line chart,@flourish/draw-the-line,7.1.2,draw_the_line,https://app.flourish.studio/@flourish/draw-the-line/7.1.2#api +8,election results chart,@flourish/election-results-chart,9.2.2,election_results,https://app.flourish.studio/@flourish/election-results-chart/9.2.2#api +9,gantt chart,@flourish/gantt,9.1.2,gantt,https://app.flourish.studio/@flourish/gantt/9.1.2#api +10,gauge,@flourish/gauge,1.8.1,gauge,https://app.flourish.studio/@flourish/gauge/1.8.1#api +11,hierarchy,@flourish/hierarchy,20.1.4,treemap,https://app.flourish.studio/@flourish/hierarchy/20.1.4#api +11,hierarchy,@flourish/hierarchy,20.1.4,circlepacking,https://app.flourish.studio/@flourish/hierarchy/20.1.4#api +11,hierarchy,@flourish/hierarchy,20.1.4,sunburst,https://app.flourish.studio/@flourish/hierarchy/20.1.4#api +11,hierarchy,@flourish/hierarchy,20.1.4,bar,https://app.flourish.studio/@flourish/hierarchy/20.1.4#api +11,hierarchy,@flourish/hierarchy,20.1.4,radialtree,https://app.flourish.studio/@flourish/hierarchy/20.1.4#api +16,line chart race,@flourish/horserace,16.2.1,horserace,https://app.flourish.studio/@flourish/horserace/16.2.1#api +17,interactive svg,@flourish/interactive-svg,8.3.1,interactive_svg,https://app.flourish.studio/@flourish/interactive-svg/8.3.1#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,area_stacked,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,area_prop,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,area,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,area_stacked_stream,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,column_grouped,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,column_stacked,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,column_stacked_prop,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,column_waterfall,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,bar_grouped,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,bar_stacked,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,bar_stacked_prop,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,bar_waterfall,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,donut,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,column_grouped_line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,column_stacked_line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,column_stacked_prop_line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,area_stacked_line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,"line, bar and pie charts",@flourish/line-bar-pie,32.3.2,line_line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +37,marimekko,@flourish/marimekko,3.1.4,marimekko,https://app.flourish.studio/@flourish/marimekko/3.1.4#api +38,network graph,@flourish/network-graph,12.1.2,network,https://app.flourish.studio/@flourish/network-graph/12.1.2#api +39,number ticker,@flourish/number-ticker,1.7.1,number_ticker,https://app.flourish.studio/@flourish/number-ticker/1.7.1#api +40,parliament chart,@flourish/parliament-chart,8.2.1,parliament,https://app.flourish.studio/@flourish/parliament-chart/8.2.1#api +41,photo slider,@flourish/photo-slider,4.7.1,photo_slider,https://app.flourish.studio/@flourish/photo-slider/4.7.1#api +42,pictogram,@flourish/pictogram,6.1.2,pictogram,https://app.flourish.studio/@flourish/pictogram/6.1.2#api +43,quiz,@flourish/quiz,7.7.1,quiz,https://app.flourish.studio/@flourish/quiz/7.7.1#api +44,radar chart,@flourish/radar,4.1.2,radar,https://app.flourish.studio/@flourish/radar/4.1.2#api +45,sankey diagram,@flourish/sankey,10.10.2,sankey,https://app.flourish.studio/@flourish/sankey/10.10.2#api +46,scatter,@flourish/scatter,22.2.3,scatter,https://app.flourish.studio/@flourish/scatter/22.2.3#api +47,slope chart,@flourish/slope-chart,13.2.1,slope,https://app.flourish.studio/@flourish/slope-chart/13.2.1#api +48,sports,@flourish/sports,9.1.2,sports,https://app.flourish.studio/@flourish/sports/9.1.2#api +49,sports race,@flourish/sports-race,2.6.1,sports_race,https://app.flourish.studio/@flourish/sports-race/2.6.1#api +50,survey,@flourish/survey,14.1.3,survey,https://app.flourish.studio/@flourish/survey/14.1.3#api +51,svg annotator,@flourish/svg-annotator,6.0.2,svg_annotator,https://app.flourish.studio/@flourish/svg-annotator/6.0.2#api +52,table,@flourish/table,17.2.1,table,https://app.flourish.studio/@flourish/table/17.2.1#api +53,text annotator,@flourish/text-annotator,3.9.1,text_annotator,https://app.flourish.studio/@flourish/text-annotator/3.9.1#api +54,timeline,@flourish/timeline,2.1.2,timeline,https://app.flourish.studio/@flourish/timeline/2.1.2#api +55,tournament,@flourish/tournament,1.7.1,tournament,https://app.flourish.studio/@flourish/tournament/1.7.1#api +56,word cloud,@flourish/word-cloud,3.10.1,word_cloud,https://app.flourish.studio/@flourish/word-cloud/3.10.1#api diff --git a/python_package/flourishcharts/data/gapminder.csv b/python_package/flourishcharts/data/gapminder.csv new file mode 100644 index 0000000..04fc1a4 --- /dev/null +++ b/python_package/flourishcharts/data/gapminder.csv @@ -0,0 +1,1705 @@ +"","country","continent","year","lifeExp","pop","gdpPercap" +"1","Afghanistan","Asia",1952,28.801,8425333,779.4453145 +"2","Afghanistan","Asia",1957,30.332,9240934,820.8530296 +"3","Afghanistan","Asia",1962,31.997,10267083,853.10071 +"4","Afghanistan","Asia",1967,34.02,11537966,836.1971382 +"5","Afghanistan","Asia",1972,36.088,13079460,739.9811058 +"6","Afghanistan","Asia",1977,38.438,14880372,786.11336 +"7","Afghanistan","Asia",1982,39.854,12881816,978.0114388 +"8","Afghanistan","Asia",1987,40.822,13867957,852.3959448 +"9","Afghanistan","Asia",1992,41.674,16317921,649.3413952 +"10","Afghanistan","Asia",1997,41.763,22227415,635.341351 +"11","Afghanistan","Asia",2002,42.129,25268405,726.7340548 +"12","Afghanistan","Asia",2007,43.828,31889923,974.5803384 +"13","Albania","Europe",1952,55.23,1282697,1601.056136 +"14","Albania","Europe",1957,59.28,1476505,1942.284244 +"15","Albania","Europe",1962,64.82,1728137,2312.888958 +"16","Albania","Europe",1967,66.22,1984060,2760.196931 +"17","Albania","Europe",1972,67.69,2263554,3313.422188 +"18","Albania","Europe",1977,68.93,2509048,3533.00391 +"19","Albania","Europe",1982,70.42,2780097,3630.880722 +"20","Albania","Europe",1987,72,3075321,3738.932735 +"21","Albania","Europe",1992,71.581,3326498,2497.437901 +"22","Albania","Europe",1997,72.95,3428038,3193.054604 +"23","Albania","Europe",2002,75.651,3508512,4604.211737 +"24","Albania","Europe",2007,76.423,3600523,5937.029526 +"25","Algeria","Africa",1952,43.077,9279525,2449.008185 +"26","Algeria","Africa",1957,45.685,10270856,3013.976023 +"27","Algeria","Africa",1962,48.303,11000948,2550.81688 +"28","Algeria","Africa",1967,51.407,12760499,3246.991771 +"29","Algeria","Africa",1972,54.518,14760787,4182.663766 +"30","Algeria","Africa",1977,58.014,17152804,4910.416756 +"31","Algeria","Africa",1982,61.368,20033753,5745.160213 +"32","Algeria","Africa",1987,65.799,23254956,5681.358539 +"33","Algeria","Africa",1992,67.744,26298373,5023.216647 +"34","Algeria","Africa",1997,69.152,29072015,4797.295051 +"35","Algeria","Africa",2002,70.994,31287142,5288.040382 +"36","Algeria","Africa",2007,72.301,33333216,6223.367465 +"37","Angola","Africa",1952,30.015,4232095,3520.610273 +"38","Angola","Africa",1957,31.999,4561361,3827.940465 +"39","Angola","Africa",1962,34,4826015,4269.276742 +"40","Angola","Africa",1967,35.985,5247469,5522.776375 +"41","Angola","Africa",1972,37.928,5894858,5473.288005 +"42","Angola","Africa",1977,39.483,6162675,3008.647355 +"43","Angola","Africa",1982,39.942,7016384,2756.953672 +"44","Angola","Africa",1987,39.906,7874230,2430.208311 +"45","Angola","Africa",1992,40.647,8735988,2627.845685 +"46","Angola","Africa",1997,40.963,9875024,2277.140884 +"47","Angola","Africa",2002,41.003,10866106,2773.287312 +"48","Angola","Africa",2007,42.731,12420476,4797.231267 +"49","Argentina","Americas",1952,62.485,17876956,5911.315053 +"50","Argentina","Americas",1957,64.399,19610538,6856.856212 +"51","Argentina","Americas",1962,65.142,21283783,7133.166023 +"52","Argentina","Americas",1967,65.634,22934225,8052.953021 +"53","Argentina","Americas",1972,67.065,24779799,9443.038526 +"54","Argentina","Americas",1977,68.481,26983828,10079.02674 +"55","Argentina","Americas",1982,69.942,29341374,8997.897412 +"56","Argentina","Americas",1987,70.774,31620918,9139.671389 +"57","Argentina","Americas",1992,71.868,33958947,9308.41871 +"58","Argentina","Americas",1997,73.275,36203463,10967.28195 +"59","Argentina","Americas",2002,74.34,38331121,8797.640716 +"60","Argentina","Americas",2007,75.32,40301927,12779.37964 +"61","Australia","Oceania",1952,69.12,8691212,10039.59564 +"62","Australia","Oceania",1957,70.33,9712569,10949.64959 +"63","Australia","Oceania",1962,70.93,10794968,12217.22686 +"64","Australia","Oceania",1967,71.1,11872264,14526.12465 +"65","Australia","Oceania",1972,71.93,13177000,16788.62948 +"66","Australia","Oceania",1977,73.49,14074100,18334.19751 +"67","Australia","Oceania",1982,74.74,15184200,19477.00928 +"68","Australia","Oceania",1987,76.32,16257249,21888.88903 +"69","Australia","Oceania",1992,77.56,17481977,23424.76683 +"70","Australia","Oceania",1997,78.83,18565243,26997.93657 +"71","Australia","Oceania",2002,80.37,19546792,30687.75473 +"72","Australia","Oceania",2007,81.235,20434176,34435.36744 +"73","Austria","Europe",1952,66.8,6927772,6137.076492 +"74","Austria","Europe",1957,67.48,6965860,8842.59803 +"75","Austria","Europe",1962,69.54,7129864,10750.72111 +"76","Austria","Europe",1967,70.14,7376998,12834.6024 +"77","Austria","Europe",1972,70.63,7544201,16661.6256 +"78","Austria","Europe",1977,72.17,7568430,19749.4223 +"79","Austria","Europe",1982,73.18,7574613,21597.08362 +"80","Austria","Europe",1987,74.94,7578903,23687.82607 +"81","Austria","Europe",1992,76.04,7914969,27042.01868 +"82","Austria","Europe",1997,77.51,8069876,29095.92066 +"83","Austria","Europe",2002,78.98,8148312,32417.60769 +"84","Austria","Europe",2007,79.829,8199783,36126.4927 +"85","Bahrain","Asia",1952,50.939,120447,9867.084765 +"86","Bahrain","Asia",1957,53.832,138655,11635.79945 +"87","Bahrain","Asia",1962,56.923,171863,12753.27514 +"88","Bahrain","Asia",1967,59.923,202182,14804.6727 +"89","Bahrain","Asia",1972,63.3,230800,18268.65839 +"90","Bahrain","Asia",1977,65.593,297410,19340.10196 +"91","Bahrain","Asia",1982,69.052,377967,19211.14731 +"92","Bahrain","Asia",1987,70.75,454612,18524.02406 +"93","Bahrain","Asia",1992,72.601,529491,19035.57917 +"94","Bahrain","Asia",1997,73.925,598561,20292.01679 +"95","Bahrain","Asia",2002,74.795,656397,23403.55927 +"96","Bahrain","Asia",2007,75.635,708573,29796.04834 +"97","Bangladesh","Asia",1952,37.484,46886859,684.2441716 +"98","Bangladesh","Asia",1957,39.348,51365468,661.6374577 +"99","Bangladesh","Asia",1962,41.216,56839289,686.3415538 +"100","Bangladesh","Asia",1967,43.453,62821884,721.1860862 +"101","Bangladesh","Asia",1972,45.252,70759295,630.2336265 +"102","Bangladesh","Asia",1977,46.923,80428306,659.8772322 +"103","Bangladesh","Asia",1982,50.009,93074406,676.9818656 +"104","Bangladesh","Asia",1987,52.819,103764241,751.9794035 +"105","Bangladesh","Asia",1992,56.018,113704579,837.8101643 +"106","Bangladesh","Asia",1997,59.412,123315288,972.7700352 +"107","Bangladesh","Asia",2002,62.013,135656790,1136.39043 +"108","Bangladesh","Asia",2007,64.062,150448339,1391.253792 +"109","Belgium","Europe",1952,68,8730405,8343.105127 +"110","Belgium","Europe",1957,69.24,8989111,9714.960623 +"111","Belgium","Europe",1962,70.25,9218400,10991.20676 +"112","Belgium","Europe",1967,70.94,9556500,13149.04119 +"113","Belgium","Europe",1972,71.44,9709100,16672.14356 +"114","Belgium","Europe",1977,72.8,9821800,19117.97448 +"115","Belgium","Europe",1982,73.93,9856303,20979.84589 +"116","Belgium","Europe",1987,75.35,9870200,22525.56308 +"117","Belgium","Europe",1992,76.46,10045622,25575.57069 +"118","Belgium","Europe",1997,77.53,10199787,27561.19663 +"119","Belgium","Europe",2002,78.32,10311970,30485.88375 +"120","Belgium","Europe",2007,79.441,10392226,33692.60508 +"121","Benin","Africa",1952,38.223,1738315,1062.7522 +"122","Benin","Africa",1957,40.358,1925173,959.6010805 +"123","Benin","Africa",1962,42.618,2151895,949.4990641 +"124","Benin","Africa",1967,44.885,2427334,1035.831411 +"125","Benin","Africa",1972,47.014,2761407,1085.796879 +"126","Benin","Africa",1977,49.19,3168267,1029.161251 +"127","Benin","Africa",1982,50.904,3641603,1277.897616 +"128","Benin","Africa",1987,52.337,4243788,1225.85601 +"129","Benin","Africa",1992,53.919,4981671,1191.207681 +"130","Benin","Africa",1997,54.777,6066080,1232.975292 +"131","Benin","Africa",2002,54.406,7026113,1372.877931 +"132","Benin","Africa",2007,56.728,8078314,1441.284873 +"133","Bolivia","Americas",1952,40.414,2883315,2677.326347 +"134","Bolivia","Americas",1957,41.89,3211738,2127.686326 +"135","Bolivia","Americas",1962,43.428,3593918,2180.972546 +"136","Bolivia","Americas",1967,45.032,4040665,2586.886053 +"137","Bolivia","Americas",1972,46.714,4565872,2980.331339 +"138","Bolivia","Americas",1977,50.023,5079716,3548.097832 +"139","Bolivia","Americas",1982,53.859,5642224,3156.510452 +"140","Bolivia","Americas",1987,57.251,6156369,2753.69149 +"141","Bolivia","Americas",1992,59.957,6893451,2961.699694 +"142","Bolivia","Americas",1997,62.05,7693188,3326.143191 +"143","Bolivia","Americas",2002,63.883,8445134,3413.26269 +"144","Bolivia","Americas",2007,65.554,9119152,3822.137084 +"145","Bosnia and Herzegovina","Europe",1952,53.82,2791000,973.5331948 +"146","Bosnia and Herzegovina","Europe",1957,58.45,3076000,1353.989176 +"147","Bosnia and Herzegovina","Europe",1962,61.93,3349000,1709.683679 +"148","Bosnia and Herzegovina","Europe",1967,64.79,3585000,2172.352423 +"149","Bosnia and Herzegovina","Europe",1972,67.45,3819000,2860.16975 +"150","Bosnia and Herzegovina","Europe",1977,69.86,4086000,3528.481305 +"151","Bosnia and Herzegovina","Europe",1982,70.69,4172693,4126.613157 +"152","Bosnia and Herzegovina","Europe",1987,71.14,4338977,4314.114757 +"153","Bosnia and Herzegovina","Europe",1992,72.178,4256013,2546.781445 +"154","Bosnia and Herzegovina","Europe",1997,73.244,3607000,4766.355904 +"155","Bosnia and Herzegovina","Europe",2002,74.09,4165416,6018.975239 +"156","Bosnia and Herzegovina","Europe",2007,74.852,4552198,7446.298803 +"157","Botswana","Africa",1952,47.622,442308,851.2411407 +"158","Botswana","Africa",1957,49.618,474639,918.2325349 +"159","Botswana","Africa",1962,51.52,512764,983.6539764 +"160","Botswana","Africa",1967,53.298,553541,1214.709294 +"161","Botswana","Africa",1972,56.024,619351,2263.611114 +"162","Botswana","Africa",1977,59.319,781472,3214.857818 +"163","Botswana","Africa",1982,61.484,970347,4551.14215 +"164","Botswana","Africa",1987,63.622,1151184,6205.88385 +"165","Botswana","Africa",1992,62.745,1342614,7954.111645 +"166","Botswana","Africa",1997,52.556,1536536,8647.142313 +"167","Botswana","Africa",2002,46.634,1630347,11003.60508 +"168","Botswana","Africa",2007,50.728,1639131,12569.85177 +"169","Brazil","Americas",1952,50.917,56602560,2108.944355 +"170","Brazil","Americas",1957,53.285,65551171,2487.365989 +"171","Brazil","Americas",1962,55.665,76039390,3336.585802 +"172","Brazil","Americas",1967,57.632,88049823,3429.864357 +"173","Brazil","Americas",1972,59.504,100840058,4985.711467 +"174","Brazil","Americas",1977,61.489,114313951,6660.118654 +"175","Brazil","Americas",1982,63.336,128962939,7030.835878 +"176","Brazil","Americas",1987,65.205,142938076,7807.095818 +"177","Brazil","Americas",1992,67.057,155975974,6950.283021 +"178","Brazil","Americas",1997,69.388,168546719,7957.980824 +"179","Brazil","Americas",2002,71.006,179914212,8131.212843 +"180","Brazil","Americas",2007,72.39,190010647,9065.800825 +"181","Bulgaria","Europe",1952,59.6,7274900,2444.286648 +"182","Bulgaria","Europe",1957,66.61,7651254,3008.670727 +"183","Bulgaria","Europe",1962,69.51,8012946,4254.337839 +"184","Bulgaria","Europe",1967,70.42,8310226,5577.0028 +"185","Bulgaria","Europe",1972,70.9,8576200,6597.494398 +"186","Bulgaria","Europe",1977,70.81,8797022,7612.240438 +"187","Bulgaria","Europe",1982,71.08,8892098,8224.191647 +"188","Bulgaria","Europe",1987,71.34,8971958,8239.854824 +"189","Bulgaria","Europe",1992,71.19,8658506,6302.623438 +"190","Bulgaria","Europe",1997,70.32,8066057,5970.38876 +"191","Bulgaria","Europe",2002,72.14,7661799,7696.777725 +"192","Bulgaria","Europe",2007,73.005,7322858,10680.79282 +"193","Burkina Faso","Africa",1952,31.975,4469979,543.2552413 +"194","Burkina Faso","Africa",1957,34.906,4713416,617.1834648 +"195","Burkina Faso","Africa",1962,37.814,4919632,722.5120206 +"196","Burkina Faso","Africa",1967,40.697,5127935,794.8265597 +"197","Burkina Faso","Africa",1972,43.591,5433886,854.7359763 +"198","Burkina Faso","Africa",1977,46.137,5889574,743.3870368 +"199","Burkina Faso","Africa",1982,48.122,6634596,807.1985855 +"200","Burkina Faso","Africa",1987,49.557,7586551,912.0631417 +"201","Burkina Faso","Africa",1992,50.26,8878303,931.7527731 +"202","Burkina Faso","Africa",1997,50.324,10352843,946.2949618 +"203","Burkina Faso","Africa",2002,50.65,12251209,1037.645221 +"204","Burkina Faso","Africa",2007,52.295,14326203,1217.032994 +"205","Burundi","Africa",1952,39.031,2445618,339.2964587 +"206","Burundi","Africa",1957,40.533,2667518,379.5646281 +"207","Burundi","Africa",1962,42.045,2961915,355.2032273 +"208","Burundi","Africa",1967,43.548,3330989,412.9775136 +"209","Burundi","Africa",1972,44.057,3529983,464.0995039 +"210","Burundi","Africa",1977,45.91,3834415,556.1032651 +"211","Burundi","Africa",1982,47.471,4580410,559.603231 +"212","Burundi","Africa",1987,48.211,5126023,621.8188189 +"213","Burundi","Africa",1992,44.736,5809236,631.6998778 +"214","Burundi","Africa",1997,45.326,6121610,463.1151478 +"215","Burundi","Africa",2002,47.36,7021078,446.4035126 +"216","Burundi","Africa",2007,49.58,8390505,430.0706916 +"217","Cambodia","Asia",1952,39.417,4693836,368.4692856 +"218","Cambodia","Asia",1957,41.366,5322536,434.0383364 +"219","Cambodia","Asia",1962,43.415,6083619,496.9136476 +"220","Cambodia","Asia",1967,45.415,6960067,523.4323142 +"221","Cambodia","Asia",1972,40.317,7450606,421.6240257 +"222","Cambodia","Asia",1977,31.22,6978607,524.9721832 +"223","Cambodia","Asia",1982,50.957,7272485,624.4754784 +"224","Cambodia","Asia",1987,53.914,8371791,683.8955732 +"225","Cambodia","Asia",1992,55.803,10150094,682.3031755 +"226","Cambodia","Asia",1997,56.534,11782962,734.28517 +"227","Cambodia","Asia",2002,56.752,12926707,896.2260153 +"228","Cambodia","Asia",2007,59.723,14131858,1713.778686 +"229","Cameroon","Africa",1952,38.523,5009067,1172.667655 +"230","Cameroon","Africa",1957,40.428,5359923,1313.048099 +"231","Cameroon","Africa",1962,42.643,5793633,1399.607441 +"232","Cameroon","Africa",1967,44.799,6335506,1508.453148 +"233","Cameroon","Africa",1972,47.049,7021028,1684.146528 +"234","Cameroon","Africa",1977,49.355,7959865,1783.432873 +"235","Cameroon","Africa",1982,52.961,9250831,2367.983282 +"236","Cameroon","Africa",1987,54.985,10780667,2602.664206 +"237","Cameroon","Africa",1992,54.314,12467171,1793.163278 +"238","Cameroon","Africa",1997,52.199,14195809,1694.337469 +"239","Cameroon","Africa",2002,49.856,15929988,1934.011449 +"240","Cameroon","Africa",2007,50.43,17696293,2042.09524 +"241","Canada","Americas",1952,68.75,14785584,11367.16112 +"242","Canada","Americas",1957,69.96,17010154,12489.95006 +"243","Canada","Americas",1962,71.3,18985849,13462.48555 +"244","Canada","Americas",1967,72.13,20819767,16076.58803 +"245","Canada","Americas",1972,72.88,22284500,18970.57086 +"246","Canada","Americas",1977,74.21,23796400,22090.88306 +"247","Canada","Americas",1982,75.76,25201900,22898.79214 +"248","Canada","Americas",1987,76.86,26549700,26626.51503 +"249","Canada","Americas",1992,77.95,28523502,26342.88426 +"250","Canada","Americas",1997,78.61,30305843,28954.92589 +"251","Canada","Americas",2002,79.77,31902268,33328.96507 +"252","Canada","Americas",2007,80.653,33390141,36319.23501 +"253","Central African Republic","Africa",1952,35.463,1291695,1071.310713 +"254","Central African Republic","Africa",1957,37.464,1392284,1190.844328 +"255","Central African Republic","Africa",1962,39.475,1523478,1193.068753 +"256","Central African Republic","Africa",1967,41.478,1733638,1136.056615 +"257","Central African Republic","Africa",1972,43.457,1927260,1070.013275 +"258","Central African Republic","Africa",1977,46.775,2167533,1109.374338 +"259","Central African Republic","Africa",1982,48.295,2476971,956.7529907 +"260","Central African Republic","Africa",1987,50.485,2840009,844.8763504 +"261","Central African Republic","Africa",1992,49.396,3265124,747.9055252 +"262","Central African Republic","Africa",1997,46.066,3696513,740.5063317 +"263","Central African Republic","Africa",2002,43.308,4048013,738.6906068 +"264","Central African Republic","Africa",2007,44.741,4369038,706.016537 +"265","Chad","Africa",1952,38.092,2682462,1178.665927 +"266","Chad","Africa",1957,39.881,2894855,1308.495577 +"267","Chad","Africa",1962,41.716,3150417,1389.817618 +"268","Chad","Africa",1967,43.601,3495967,1196.810565 +"269","Chad","Africa",1972,45.569,3899068,1104.103987 +"270","Chad","Africa",1977,47.383,4388260,1133.98495 +"271","Chad","Africa",1982,49.517,4875118,797.9081006 +"272","Chad","Africa",1987,51.051,5498955,952.386129 +"273","Chad","Africa",1992,51.724,6429417,1058.0643 +"274","Chad","Africa",1997,51.573,7562011,1004.961353 +"275","Chad","Africa",2002,50.525,8835739,1156.18186 +"276","Chad","Africa",2007,50.651,10238807,1704.063724 +"277","Chile","Americas",1952,54.745,6377619,3939.978789 +"278","Chile","Americas",1957,56.074,7048426,4315.622723 +"279","Chile","Americas",1962,57.924,7961258,4519.094331 +"280","Chile","Americas",1967,60.523,8858908,5106.654313 +"281","Chile","Americas",1972,63.441,9717524,5494.024437 +"282","Chile","Americas",1977,67.052,10599793,4756.763836 +"283","Chile","Americas",1982,70.565,11487112,5095.665738 +"284","Chile","Americas",1987,72.492,12463354,5547.063754 +"285","Chile","Americas",1992,74.126,13572994,7596.125964 +"286","Chile","Americas",1997,75.816,14599929,10118.05318 +"287","Chile","Americas",2002,77.86,15497046,10778.78385 +"288","Chile","Americas",2007,78.553,16284741,13171.63885 +"289","China","Asia",1952,44,556263527,400.448611 +"290","China","Asia",1957,50.54896,637408000,575.9870009 +"291","China","Asia",1962,44.50136,665770000,487.6740183 +"292","China","Asia",1967,58.38112,754550000,612.7056934 +"293","China","Asia",1972,63.11888,862030000,676.9000921 +"294","China","Asia",1977,63.96736,943455000,741.2374699 +"295","China","Asia",1982,65.525,1000281000,962.4213805 +"296","China","Asia",1987,67.274,1084035000,1378.904018 +"297","China","Asia",1992,68.69,1164970000,1655.784158 +"298","China","Asia",1997,70.426,1230075000,2289.234136 +"299","China","Asia",2002,72.028,1280400000,3119.280896 +"300","China","Asia",2007,72.961,1318683096,4959.114854 +"301","Colombia","Americas",1952,50.643,12350771,2144.115096 +"302","Colombia","Americas",1957,55.118,14485993,2323.805581 +"303","Colombia","Americas",1962,57.863,17009885,2492.351109 +"304","Colombia","Americas",1967,59.963,19764027,2678.729839 +"305","Colombia","Americas",1972,61.623,22542890,3264.660041 +"306","Colombia","Americas",1977,63.837,25094412,3815.80787 +"307","Colombia","Americas",1982,66.653,27764644,4397.575659 +"308","Colombia","Americas",1987,67.768,30964245,4903.2191 +"309","Colombia","Americas",1992,68.421,34202721,5444.648617 +"310","Colombia","Americas",1997,70.313,37657830,6117.361746 +"311","Colombia","Americas",2002,71.682,41008227,5755.259962 +"312","Colombia","Americas",2007,72.889,44227550,7006.580419 +"313","Comoros","Africa",1952,40.715,153936,1102.990936 +"314","Comoros","Africa",1957,42.46,170928,1211.148548 +"315","Comoros","Africa",1962,44.467,191689,1406.648278 +"316","Comoros","Africa",1967,46.472,217378,1876.029643 +"317","Comoros","Africa",1972,48.944,250027,1937.577675 +"318","Comoros","Africa",1977,50.939,304739,1172.603047 +"319","Comoros","Africa",1982,52.933,348643,1267.100083 +"320","Comoros","Africa",1987,54.926,395114,1315.980812 +"321","Comoros","Africa",1992,57.939,454429,1246.90737 +"322","Comoros","Africa",1997,60.66,527982,1173.618235 +"323","Comoros","Africa",2002,62.974,614382,1075.811558 +"324","Comoros","Africa",2007,65.152,710960,986.1478792 +"325","Congo, Dem. Rep.","Africa",1952,39.143,14100005,780.5423257 +"326","Congo, Dem. Rep.","Africa",1957,40.652,15577932,905.8602303 +"327","Congo, Dem. Rep.","Africa",1962,42.122,17486434,896.3146335 +"328","Congo, Dem. Rep.","Africa",1967,44.056,19941073,861.5932424 +"329","Congo, Dem. Rep.","Africa",1972,45.989,23007669,904.8960685 +"330","Congo, Dem. Rep.","Africa",1977,47.804,26480870,795.757282 +"331","Congo, Dem. Rep.","Africa",1982,47.784,30646495,673.7478181 +"332","Congo, Dem. Rep.","Africa",1987,47.412,35481645,672.774812 +"333","Congo, Dem. Rep.","Africa",1992,45.548,41672143,457.7191807 +"334","Congo, Dem. Rep.","Africa",1997,42.587,47798986,312.188423 +"335","Congo, Dem. Rep.","Africa",2002,44.966,55379852,241.1658765 +"336","Congo, Dem. Rep.","Africa",2007,46.462,64606759,277.5518587 +"337","Congo, Rep.","Africa",1952,42.111,854885,2125.621418 +"338","Congo, Rep.","Africa",1957,45.053,940458,2315.056572 +"339","Congo, Rep.","Africa",1962,48.435,1047924,2464.783157 +"340","Congo, Rep.","Africa",1967,52.04,1179760,2677.939642 +"341","Congo, Rep.","Africa",1972,54.907,1340458,3213.152683 +"342","Congo, Rep.","Africa",1977,55.625,1536769,3259.178978 +"343","Congo, Rep.","Africa",1982,56.695,1774735,4879.507522 +"344","Congo, Rep.","Africa",1987,57.47,2064095,4201.194937 +"345","Congo, Rep.","Africa",1992,56.433,2409073,4016.239529 +"346","Congo, Rep.","Africa",1997,52.962,2800947,3484.164376 +"347","Congo, Rep.","Africa",2002,52.97,3328795,3484.06197 +"348","Congo, Rep.","Africa",2007,55.322,3800610,3632.557798 +"349","Costa Rica","Americas",1952,57.206,926317,2627.009471 +"350","Costa Rica","Americas",1957,60.026,1112300,2990.010802 +"351","Costa Rica","Americas",1962,62.842,1345187,3460.937025 +"352","Costa Rica","Americas",1967,65.424,1588717,4161.727834 +"353","Costa Rica","Americas",1972,67.849,1834796,5118.146939 +"354","Costa Rica","Americas",1977,70.75,2108457,5926.876967 +"355","Costa Rica","Americas",1982,73.45,2424367,5262.734751 +"356","Costa Rica","Americas",1987,74.752,2799811,5629.915318 +"357","Costa Rica","Americas",1992,75.713,3173216,6160.416317 +"358","Costa Rica","Americas",1997,77.26,3518107,6677.045314 +"359","Costa Rica","Americas",2002,78.123,3834934,7723.447195 +"360","Costa Rica","Americas",2007,78.782,4133884,9645.06142 +"361","Cote d'Ivoire","Africa",1952,40.477,2977019,1388.594732 +"362","Cote d'Ivoire","Africa",1957,42.469,3300000,1500.895925 +"363","Cote d'Ivoire","Africa",1962,44.93,3832408,1728.869428 +"364","Cote d'Ivoire","Africa",1967,47.35,4744870,2052.050473 +"365","Cote d'Ivoire","Africa",1972,49.801,6071696,2378.201111 +"366","Cote d'Ivoire","Africa",1977,52.374,7459574,2517.736547 +"367","Cote d'Ivoire","Africa",1982,53.983,9025951,2602.710169 +"368","Cote d'Ivoire","Africa",1987,54.655,10761098,2156.956069 +"369","Cote d'Ivoire","Africa",1992,52.044,12772596,1648.073791 +"370","Cote d'Ivoire","Africa",1997,47.991,14625967,1786.265407 +"371","Cote d'Ivoire","Africa",2002,46.832,16252726,1648.800823 +"372","Cote d'Ivoire","Africa",2007,48.328,18013409,1544.750112 +"373","Croatia","Europe",1952,61.21,3882229,3119.23652 +"374","Croatia","Europe",1957,64.77,3991242,4338.231617 +"375","Croatia","Europe",1962,67.13,4076557,5477.890018 +"376","Croatia","Europe",1967,68.5,4174366,6960.297861 +"377","Croatia","Europe",1972,69.61,4225310,9164.090127 +"378","Croatia","Europe",1977,70.64,4318673,11305.38517 +"379","Croatia","Europe",1982,70.46,4413368,13221.82184 +"380","Croatia","Europe",1987,71.52,4484310,13822.58394 +"381","Croatia","Europe",1992,72.527,4494013,8447.794873 +"382","Croatia","Europe",1997,73.68,4444595,9875.604515 +"383","Croatia","Europe",2002,74.876,4481020,11628.38895 +"384","Croatia","Europe",2007,75.748,4493312,14619.22272 +"385","Cuba","Americas",1952,59.421,6007797,5586.53878 +"386","Cuba","Americas",1957,62.325,6640752,6092.174359 +"387","Cuba","Americas",1962,65.246,7254373,5180.75591 +"388","Cuba","Americas",1967,68.29,8139332,5690.268015 +"389","Cuba","Americas",1972,70.723,8831348,5305.445256 +"390","Cuba","Americas",1977,72.649,9537988,6380.494966 +"391","Cuba","Americas",1982,73.717,9789224,7316.918107 +"392","Cuba","Americas",1987,74.174,10239839,7532.924763 +"393","Cuba","Americas",1992,74.414,10723260,5592.843963 +"394","Cuba","Americas",1997,76.151,10983007,5431.990415 +"395","Cuba","Americas",2002,77.158,11226999,6340.646683 +"396","Cuba","Americas",2007,78.273,11416987,8948.102923 +"397","Czech Republic","Europe",1952,66.87,9125183,6876.14025 +"398","Czech Republic","Europe",1957,69.03,9513758,8256.343918 +"399","Czech Republic","Europe",1962,69.9,9620282,10136.86713 +"400","Czech Republic","Europe",1967,70.38,9835109,11399.44489 +"401","Czech Republic","Europe",1972,70.29,9862158,13108.4536 +"402","Czech Republic","Europe",1977,70.71,10161915,14800.16062 +"403","Czech Republic","Europe",1982,70.96,10303704,15377.22855 +"404","Czech Republic","Europe",1987,71.58,10311597,16310.4434 +"405","Czech Republic","Europe",1992,72.4,10315702,14297.02122 +"406","Czech Republic","Europe",1997,74.01,10300707,16048.51424 +"407","Czech Republic","Europe",2002,75.51,10256295,17596.21022 +"408","Czech Republic","Europe",2007,76.486,10228744,22833.30851 +"409","Denmark","Europe",1952,70.78,4334000,9692.385245 +"410","Denmark","Europe",1957,71.81,4487831,11099.65935 +"411","Denmark","Europe",1962,72.35,4646899,13583.31351 +"412","Denmark","Europe",1967,72.96,4838800,15937.21123 +"413","Denmark","Europe",1972,73.47,4991596,18866.20721 +"414","Denmark","Europe",1977,74.69,5088419,20422.9015 +"415","Denmark","Europe",1982,74.63,5117810,21688.04048 +"416","Denmark","Europe",1987,74.8,5127024,25116.17581 +"417","Denmark","Europe",1992,75.33,5171393,26406.73985 +"418","Denmark","Europe",1997,76.11,5283663,29804.34567 +"419","Denmark","Europe",2002,77.18,5374693,32166.50006 +"420","Denmark","Europe",2007,78.332,5468120,35278.41874 +"421","Djibouti","Africa",1952,34.812,63149,2669.529475 +"422","Djibouti","Africa",1957,37.328,71851,2864.969076 +"423","Djibouti","Africa",1962,39.693,89898,3020.989263 +"424","Djibouti","Africa",1967,42.074,127617,3020.050513 +"425","Djibouti","Africa",1972,44.366,178848,3694.212352 +"426","Djibouti","Africa",1977,46.519,228694,3081.761022 +"427","Djibouti","Africa",1982,48.812,305991,2879.468067 +"428","Djibouti","Africa",1987,50.04,311025,2880.102568 +"429","Djibouti","Africa",1992,51.604,384156,2377.156192 +"430","Djibouti","Africa",1997,53.157,417908,1895.016984 +"431","Djibouti","Africa",2002,53.373,447416,1908.260867 +"432","Djibouti","Africa",2007,54.791,496374,2082.481567 +"433","Dominican Republic","Americas",1952,45.928,2491346,1397.717137 +"434","Dominican Republic","Americas",1957,49.828,2923186,1544.402995 +"435","Dominican Republic","Americas",1962,53.459,3453434,1662.137359 +"436","Dominican Republic","Americas",1967,56.751,4049146,1653.723003 +"437","Dominican Republic","Americas",1972,59.631,4671329,2189.874499 +"438","Dominican Republic","Americas",1977,61.788,5302800,2681.9889 +"439","Dominican Republic","Americas",1982,63.727,5968349,2861.092386 +"440","Dominican Republic","Americas",1987,66.046,6655297,2899.842175 +"441","Dominican Republic","Americas",1992,68.457,7351181,3044.214214 +"442","Dominican Republic","Americas",1997,69.957,7992357,3614.101285 +"443","Dominican Republic","Americas",2002,70.847,8650322,4563.808154 +"444","Dominican Republic","Americas",2007,72.235,9319622,6025.374752 +"445","Ecuador","Americas",1952,48.357,3548753,3522.110717 +"446","Ecuador","Americas",1957,51.356,4058385,3780.546651 +"447","Ecuador","Americas",1962,54.64,4681707,4086.114078 +"448","Ecuador","Americas",1967,56.678,5432424,4579.074215 +"449","Ecuador","Americas",1972,58.796,6298651,5280.99471 +"450","Ecuador","Americas",1977,61.31,7278866,6679.62326 +"451","Ecuador","Americas",1982,64.342,8365850,7213.791267 +"452","Ecuador","Americas",1987,67.231,9545158,6481.776993 +"453","Ecuador","Americas",1992,69.613,10748394,7103.702595 +"454","Ecuador","Americas",1997,72.312,11911819,7429.455877 +"455","Ecuador","Americas",2002,74.173,12921234,5773.044512 +"456","Ecuador","Americas",2007,74.994,13755680,6873.262326 +"457","Egypt","Africa",1952,41.893,22223309,1418.822445 +"458","Egypt","Africa",1957,44.444,25009741,1458.915272 +"459","Egypt","Africa",1962,46.992,28173309,1693.335853 +"460","Egypt","Africa",1967,49.293,31681188,1814.880728 +"461","Egypt","Africa",1972,51.137,34807417,2024.008147 +"462","Egypt","Africa",1977,53.319,38783863,2785.493582 +"463","Egypt","Africa",1982,56.006,45681811,3503.729636 +"464","Egypt","Africa",1987,59.797,52799062,3885.46071 +"465","Egypt","Africa",1992,63.674,59402198,3794.755195 +"466","Egypt","Africa",1997,67.217,66134291,4173.181797 +"467","Egypt","Africa",2002,69.806,73312559,4754.604414 +"468","Egypt","Africa",2007,71.338,80264543,5581.180998 +"469","El Salvador","Americas",1952,45.262,2042865,3048.3029 +"470","El Salvador","Americas",1957,48.57,2355805,3421.523218 +"471","El Salvador","Americas",1962,52.307,2747687,3776.803627 +"472","El Salvador","Americas",1967,55.855,3232927,4358.595393 +"473","El Salvador","Americas",1972,58.207,3790903,4520.246008 +"474","El Salvador","Americas",1977,56.696,4282586,5138.922374 +"475","El Salvador","Americas",1982,56.604,4474873,4098.344175 +"476","El Salvador","Americas",1987,63.154,4842194,4140.442097 +"477","El Salvador","Americas",1992,66.798,5274649,4444.2317 +"478","El Salvador","Americas",1997,69.535,5783439,5154.825496 +"479","El Salvador","Americas",2002,70.734,6353681,5351.568666 +"480","El Salvador","Americas",2007,71.878,6939688,5728.353514 +"481","Equatorial Guinea","Africa",1952,34.482,216964,375.6431231 +"482","Equatorial Guinea","Africa",1957,35.983,232922,426.0964081 +"483","Equatorial Guinea","Africa",1962,37.485,249220,582.8419714 +"484","Equatorial Guinea","Africa",1967,38.987,259864,915.5960025 +"485","Equatorial Guinea","Africa",1972,40.516,277603,672.4122571 +"486","Equatorial Guinea","Africa",1977,42.024,192675,958.5668124 +"487","Equatorial Guinea","Africa",1982,43.662,285483,927.8253427 +"488","Equatorial Guinea","Africa",1987,45.664,341244,966.8968149 +"489","Equatorial Guinea","Africa",1992,47.545,387838,1132.055034 +"490","Equatorial Guinea","Africa",1997,48.245,439971,2814.480755 +"491","Equatorial Guinea","Africa",2002,49.348,495627,7703.4959 +"492","Equatorial Guinea","Africa",2007,51.579,551201,12154.08975 +"493","Eritrea","Africa",1952,35.928,1438760,328.9405571 +"494","Eritrea","Africa",1957,38.047,1542611,344.1618859 +"495","Eritrea","Africa",1962,40.158,1666618,380.9958433 +"496","Eritrea","Africa",1967,42.189,1820319,468.7949699 +"497","Eritrea","Africa",1972,44.142,2260187,514.3242082 +"498","Eritrea","Africa",1977,44.535,2512642,505.7538077 +"499","Eritrea","Africa",1982,43.89,2637297,524.8758493 +"500","Eritrea","Africa",1987,46.453,2915959,521.1341333 +"501","Eritrea","Africa",1992,49.991,3668440,582.8585102 +"502","Eritrea","Africa",1997,53.378,4058319,913.47079 +"503","Eritrea","Africa",2002,55.24,4414865,765.3500015 +"504","Eritrea","Africa",2007,58.04,4906585,641.3695236 +"505","Ethiopia","Africa",1952,34.078,20860941,362.1462796 +"506","Ethiopia","Africa",1957,36.667,22815614,378.9041632 +"507","Ethiopia","Africa",1962,40.059,25145372,419.4564161 +"508","Ethiopia","Africa",1967,42.115,27860297,516.1186438 +"509","Ethiopia","Africa",1972,43.515,30770372,566.2439442 +"510","Ethiopia","Africa",1977,44.51,34617799,556.8083834 +"511","Ethiopia","Africa",1982,44.916,38111756,577.8607471 +"512","Ethiopia","Africa",1987,46.684,42999530,573.7413142 +"513","Ethiopia","Africa",1992,48.091,52088559,421.3534653 +"514","Ethiopia","Africa",1997,49.402,59861301,515.8894013 +"515","Ethiopia","Africa",2002,50.725,67946797,530.0535319 +"516","Ethiopia","Africa",2007,52.947,76511887,690.8055759 +"517","Finland","Europe",1952,66.55,4090500,6424.519071 +"518","Finland","Europe",1957,67.49,4324000,7545.415386 +"519","Finland","Europe",1962,68.75,4491443,9371.842561 +"520","Finland","Europe",1967,69.83,4605744,10921.63626 +"521","Finland","Europe",1972,70.87,4639657,14358.8759 +"522","Finland","Europe",1977,72.52,4738902,15605.42283 +"523","Finland","Europe",1982,74.55,4826933,18533.15761 +"524","Finland","Europe",1987,74.83,4931729,21141.01223 +"525","Finland","Europe",1992,75.7,5041039,20647.16499 +"526","Finland","Europe",1997,77.13,5134406,23723.9502 +"527","Finland","Europe",2002,78.37,5193039,28204.59057 +"528","Finland","Europe",2007,79.313,5238460,33207.0844 +"529","France","Europe",1952,67.41,42459667,7029.809327 +"530","France","Europe",1957,68.93,44310863,8662.834898 +"531","France","Europe",1962,70.51,47124000,10560.48553 +"532","France","Europe",1967,71.55,49569000,12999.91766 +"533","France","Europe",1972,72.38,51732000,16107.19171 +"534","France","Europe",1977,73.83,53165019,18292.63514 +"535","France","Europe",1982,74.89,54433565,20293.89746 +"536","France","Europe",1987,76.34,55630100,22066.44214 +"537","France","Europe",1992,77.46,57374179,24703.79615 +"538","France","Europe",1997,78.64,58623428,25889.78487 +"539","France","Europe",2002,79.59,59925035,28926.03234 +"540","France","Europe",2007,80.657,61083916,30470.0167 +"541","Gabon","Africa",1952,37.003,420702,4293.476475 +"542","Gabon","Africa",1957,38.999,434904,4976.198099 +"543","Gabon","Africa",1962,40.489,455661,6631.459222 +"544","Gabon","Africa",1967,44.598,489004,8358.761987 +"545","Gabon","Africa",1972,48.69,537977,11401.94841 +"546","Gabon","Africa",1977,52.79,706367,21745.57328 +"547","Gabon","Africa",1982,56.564,753874,15113.36194 +"548","Gabon","Africa",1987,60.19,880397,11864.40844 +"549","Gabon","Africa",1992,61.366,985739,13522.15752 +"550","Gabon","Africa",1997,60.461,1126189,14722.84188 +"551","Gabon","Africa",2002,56.761,1299304,12521.71392 +"552","Gabon","Africa",2007,56.735,1454867,13206.48452 +"553","Gambia","Africa",1952,30,284320,485.2306591 +"554","Gambia","Africa",1957,32.065,323150,520.9267111 +"555","Gambia","Africa",1962,33.896,374020,599.650276 +"556","Gambia","Africa",1967,35.857,439593,734.7829124 +"557","Gambia","Africa",1972,38.308,517101,756.0868363 +"558","Gambia","Africa",1977,41.842,608274,884.7552507 +"559","Gambia","Africa",1982,45.58,715523,835.8096108 +"560","Gambia","Africa",1987,49.265,848406,611.6588611 +"561","Gambia","Africa",1992,52.644,1025384,665.6244126 +"562","Gambia","Africa",1997,55.861,1235767,653.7301704 +"563","Gambia","Africa",2002,58.041,1457766,660.5855997 +"564","Gambia","Africa",2007,59.448,1688359,752.7497265 +"565","Germany","Europe",1952,67.5,69145952,7144.114393 +"566","Germany","Europe",1957,69.1,71019069,10187.82665 +"567","Germany","Europe",1962,70.3,73739117,12902.46291 +"568","Germany","Europe",1967,70.8,76368453,14745.62561 +"569","Germany","Europe",1972,71,78717088,18016.18027 +"570","Germany","Europe",1977,72.5,78160773,20512.92123 +"571","Germany","Europe",1982,73.8,78335266,22031.53274 +"572","Germany","Europe",1987,74.847,77718298,24639.18566 +"573","Germany","Europe",1992,76.07,80597764,26505.30317 +"574","Germany","Europe",1997,77.34,82011073,27788.88416 +"575","Germany","Europe",2002,78.67,82350671,30035.80198 +"576","Germany","Europe",2007,79.406,82400996,32170.37442 +"577","Ghana","Africa",1952,43.149,5581001,911.2989371 +"578","Ghana","Africa",1957,44.779,6391288,1043.561537 +"579","Ghana","Africa",1962,46.452,7355248,1190.041118 +"580","Ghana","Africa",1967,48.072,8490213,1125.69716 +"581","Ghana","Africa",1972,49.875,9354120,1178.223708 +"582","Ghana","Africa",1977,51.756,10538093,993.2239571 +"583","Ghana","Africa",1982,53.744,11400338,876.032569 +"584","Ghana","Africa",1987,55.729,14168101,847.0061135 +"585","Ghana","Africa",1992,57.501,16278738,925.060154 +"586","Ghana","Africa",1997,58.556,18418288,1005.245812 +"587","Ghana","Africa",2002,58.453,20550751,1111.984578 +"588","Ghana","Africa",2007,60.022,22873338,1327.60891 +"589","Greece","Europe",1952,65.86,7733250,3530.690067 +"590","Greece","Europe",1957,67.86,8096218,4916.299889 +"591","Greece","Europe",1962,69.51,8448233,6017.190733 +"592","Greece","Europe",1967,71,8716441,8513.097016 +"593","Greece","Europe",1972,72.34,8888628,12724.82957 +"594","Greece","Europe",1977,73.68,9308479,14195.52428 +"595","Greece","Europe",1982,75.24,9786480,15268.42089 +"596","Greece","Europe",1987,76.67,9974490,16120.52839 +"597","Greece","Europe",1992,77.03,10325429,17541.49634 +"598","Greece","Europe",1997,77.869,10502372,18747.69814 +"599","Greece","Europe",2002,78.256,10603863,22514.2548 +"600","Greece","Europe",2007,79.483,10706290,27538.41188 +"601","Guatemala","Americas",1952,42.023,3146381,2428.237769 +"602","Guatemala","Americas",1957,44.142,3640876,2617.155967 +"603","Guatemala","Americas",1962,46.954,4208858,2750.364446 +"604","Guatemala","Americas",1967,50.016,4690773,3242.531147 +"605","Guatemala","Americas",1972,53.738,5149581,4031.408271 +"606","Guatemala","Americas",1977,56.029,5703430,4879.992748 +"607","Guatemala","Americas",1982,58.137,6395630,4820.49479 +"608","Guatemala","Americas",1987,60.782,7326406,4246.485974 +"609","Guatemala","Americas",1992,63.373,8486949,4439.45084 +"610","Guatemala","Americas",1997,66.322,9803875,4684.313807 +"611","Guatemala","Americas",2002,68.978,11178650,4858.347495 +"612","Guatemala","Americas",2007,70.259,12572928,5186.050003 +"613","Guinea","Africa",1952,33.609,2664249,510.1964923 +"614","Guinea","Africa",1957,34.558,2876726,576.2670245 +"615","Guinea","Africa",1962,35.753,3140003,686.3736739 +"616","Guinea","Africa",1967,37.197,3451418,708.7595409 +"617","Guinea","Africa",1972,38.842,3811387,741.6662307 +"618","Guinea","Africa",1977,40.762,4227026,874.6858643 +"619","Guinea","Africa",1982,42.891,4710497,857.2503577 +"620","Guinea","Africa",1987,45.552,5650262,805.5724718 +"621","Guinea","Africa",1992,48.576,6990574,794.3484384 +"622","Guinea","Africa",1997,51.455,8048834,869.4497668 +"623","Guinea","Africa",2002,53.676,8807818,945.5835837 +"624","Guinea","Africa",2007,56.007,9947814,942.6542111 +"625","Guinea-Bissau","Africa",1952,32.5,580653,299.850319 +"626","Guinea-Bissau","Africa",1957,33.489,601095,431.7904566 +"627","Guinea-Bissau","Africa",1962,34.488,627820,522.0343725 +"628","Guinea-Bissau","Africa",1967,35.492,601287,715.5806402 +"629","Guinea-Bissau","Africa",1972,36.486,625361,820.2245876 +"630","Guinea-Bissau","Africa",1977,37.465,745228,764.7259628 +"631","Guinea-Bissau","Africa",1982,39.327,825987,838.1239671 +"632","Guinea-Bissau","Africa",1987,41.245,927524,736.4153921 +"633","Guinea-Bissau","Africa",1992,43.266,1050938,745.5398706 +"634","Guinea-Bissau","Africa",1997,44.873,1193708,796.6644681 +"635","Guinea-Bissau","Africa",2002,45.504,1332459,575.7047176 +"636","Guinea-Bissau","Africa",2007,46.388,1472041,579.231743 +"637","Haiti","Americas",1952,37.579,3201488,1840.366939 +"638","Haiti","Americas",1957,40.696,3507701,1726.887882 +"639","Haiti","Americas",1962,43.59,3880130,1796.589032 +"640","Haiti","Americas",1967,46.243,4318137,1452.057666 +"641","Haiti","Americas",1972,48.042,4698301,1654.456946 +"642","Haiti","Americas",1977,49.923,4908554,1874.298931 +"643","Haiti","Americas",1982,51.461,5198399,2011.159549 +"644","Haiti","Americas",1987,53.636,5756203,1823.015995 +"645","Haiti","Americas",1992,55.089,6326682,1456.309517 +"646","Haiti","Americas",1997,56.671,6913545,1341.726931 +"647","Haiti","Americas",2002,58.137,7607651,1270.364932 +"648","Haiti","Americas",2007,60.916,8502814,1201.637154 +"649","Honduras","Americas",1952,41.912,1517453,2194.926204 +"650","Honduras","Americas",1957,44.665,1770390,2220.487682 +"651","Honduras","Americas",1962,48.041,2090162,2291.156835 +"652","Honduras","Americas",1967,50.924,2500689,2538.269358 +"653","Honduras","Americas",1972,53.884,2965146,2529.842345 +"654","Honduras","Americas",1977,57.402,3055235,3203.208066 +"655","Honduras","Americas",1982,60.909,3669448,3121.760794 +"656","Honduras","Americas",1987,64.492,4372203,3023.096699 +"657","Honduras","Americas",1992,66.399,5077347,3081.694603 +"658","Honduras","Americas",1997,67.659,5867957,3160.454906 +"659","Honduras","Americas",2002,68.565,6677328,3099.72866 +"660","Honduras","Americas",2007,70.198,7483763,3548.330846 +"661","Hong Kong, China","Asia",1952,60.96,2125900,3054.421209 +"662","Hong Kong, China","Asia",1957,64.75,2736300,3629.076457 +"663","Hong Kong, China","Asia",1962,67.65,3305200,4692.648272 +"664","Hong Kong, China","Asia",1967,70,3722800,6197.962814 +"665","Hong Kong, China","Asia",1972,72,4115700,8315.928145 +"666","Hong Kong, China","Asia",1977,73.6,4583700,11186.14125 +"667","Hong Kong, China","Asia",1982,75.45,5264500,14560.53051 +"668","Hong Kong, China","Asia",1987,76.2,5584510,20038.47269 +"669","Hong Kong, China","Asia",1992,77.601,5829696,24757.60301 +"670","Hong Kong, China","Asia",1997,80,6495918,28377.63219 +"671","Hong Kong, China","Asia",2002,81.495,6762476,30209.01516 +"672","Hong Kong, China","Asia",2007,82.208,6980412,39724.97867 +"673","Hungary","Europe",1952,64.03,9504000,5263.673816 +"674","Hungary","Europe",1957,66.41,9839000,6040.180011 +"675","Hungary","Europe",1962,67.96,10063000,7550.359877 +"676","Hungary","Europe",1967,69.5,10223422,9326.64467 +"677","Hungary","Europe",1972,69.76,10394091,10168.65611 +"678","Hungary","Europe",1977,69.95,10637171,11674.83737 +"679","Hungary","Europe",1982,69.39,10705535,12545.99066 +"680","Hungary","Europe",1987,69.58,10612740,12986.47998 +"681","Hungary","Europe",1992,69.17,10348684,10535.62855 +"682","Hungary","Europe",1997,71.04,10244684,11712.7768 +"683","Hungary","Europe",2002,72.59,10083313,14843.93556 +"684","Hungary","Europe",2007,73.338,9956108,18008.94444 +"685","Iceland","Europe",1952,72.49,147962,7267.688428 +"686","Iceland","Europe",1957,73.47,165110,9244.001412 +"687","Iceland","Europe",1962,73.68,182053,10350.15906 +"688","Iceland","Europe",1967,73.73,198676,13319.89568 +"689","Iceland","Europe",1972,74.46,209275,15798.06362 +"690","Iceland","Europe",1977,76.11,221823,19654.96247 +"691","Iceland","Europe",1982,76.99,233997,23269.6075 +"692","Iceland","Europe",1987,77.23,244676,26923.20628 +"693","Iceland","Europe",1992,78.77,259012,25144.39201 +"694","Iceland","Europe",1997,78.95,271192,28061.09966 +"695","Iceland","Europe",2002,80.5,288030,31163.20196 +"696","Iceland","Europe",2007,81.757,301931,36180.78919 +"697","India","Asia",1952,37.373,372000000,546.5657493 +"698","India","Asia",1957,40.249,409000000,590.061996 +"699","India","Asia",1962,43.605,454000000,658.3471509 +"700","India","Asia",1967,47.193,506000000,700.7706107 +"701","India","Asia",1972,50.651,567000000,724.032527 +"702","India","Asia",1977,54.208,634000000,813.337323 +"703","India","Asia",1982,56.596,708000000,855.7235377 +"704","India","Asia",1987,58.553,788000000,976.5126756 +"705","India","Asia",1992,60.223,872000000,1164.406809 +"706","India","Asia",1997,61.765,959000000,1458.817442 +"707","India","Asia",2002,62.879,1034172547,1746.769454 +"708","India","Asia",2007,64.698,1110396331,2452.210407 +"709","Indonesia","Asia",1952,37.468,82052000,749.6816546 +"710","Indonesia","Asia",1957,39.918,90124000,858.9002707 +"711","Indonesia","Asia",1962,42.518,99028000,849.2897701 +"712","Indonesia","Asia",1967,45.964,109343000,762.4317721 +"713","Indonesia","Asia",1972,49.203,121282000,1111.107907 +"714","Indonesia","Asia",1977,52.702,136725000,1382.702056 +"715","Indonesia","Asia",1982,56.159,153343000,1516.872988 +"716","Indonesia","Asia",1987,60.137,169276000,1748.356961 +"717","Indonesia","Asia",1992,62.681,184816000,2383.140898 +"718","Indonesia","Asia",1997,66.041,199278000,3119.335603 +"719","Indonesia","Asia",2002,68.588,211060000,2873.91287 +"720","Indonesia","Asia",2007,70.65,223547000,3540.651564 +"721","Iran","Asia",1952,44.869,17272000,3035.326002 +"722","Iran","Asia",1957,47.181,19792000,3290.257643 +"723","Iran","Asia",1962,49.325,22874000,4187.329802 +"724","Iran","Asia",1967,52.469,26538000,5906.731805 +"725","Iran","Asia",1972,55.234,30614000,9613.818607 +"726","Iran","Asia",1977,57.702,35480679,11888.59508 +"727","Iran","Asia",1982,59.62,43072751,7608.334602 +"728","Iran","Asia",1987,63.04,51889696,6642.881371 +"729","Iran","Asia",1992,65.742,60397973,7235.653188 +"730","Iran","Asia",1997,68.042,63327987,8263.590301 +"731","Iran","Asia",2002,69.451,66907826,9240.761975 +"732","Iran","Asia",2007,70.964,69453570,11605.71449 +"733","Iraq","Asia",1952,45.32,5441766,4129.766056 +"734","Iraq","Asia",1957,48.437,6248643,6229.333562 +"735","Iraq","Asia",1962,51.457,7240260,8341.737815 +"736","Iraq","Asia",1967,54.459,8519282,8931.459811 +"737","Iraq","Asia",1972,56.95,10061506,9576.037596 +"738","Iraq","Asia",1977,60.413,11882916,14688.23507 +"739","Iraq","Asia",1982,62.038,14173318,14517.90711 +"740","Iraq","Asia",1987,65.044,16543189,11643.57268 +"741","Iraq","Asia",1992,59.461,17861905,3745.640687 +"742","Iraq","Asia",1997,58.811,20775703,3076.239795 +"743","Iraq","Asia",2002,57.046,24001816,4390.717312 +"744","Iraq","Asia",2007,59.545,27499638,4471.061906 +"745","Ireland","Europe",1952,66.91,2952156,5210.280328 +"746","Ireland","Europe",1957,68.9,2878220,5599.077872 +"747","Ireland","Europe",1962,70.29,2830000,6631.597314 +"748","Ireland","Europe",1967,71.08,2900100,7655.568963 +"749","Ireland","Europe",1972,71.28,3024400,9530.772896 +"750","Ireland","Europe",1977,72.03,3271900,11150.98113 +"751","Ireland","Europe",1982,73.1,3480000,12618.32141 +"752","Ireland","Europe",1987,74.36,3539900,13872.86652 +"753","Ireland","Europe",1992,75.467,3557761,17558.81555 +"754","Ireland","Europe",1997,76.122,3667233,24521.94713 +"755","Ireland","Europe",2002,77.783,3879155,34077.04939 +"756","Ireland","Europe",2007,78.885,4109086,40675.99635 +"757","Israel","Asia",1952,65.39,1620914,4086.522128 +"758","Israel","Asia",1957,67.84,1944401,5385.278451 +"759","Israel","Asia",1962,69.39,2310904,7105.630706 +"760","Israel","Asia",1967,70.75,2693585,8393.741404 +"761","Israel","Asia",1972,71.63,3095893,12786.93223 +"762","Israel","Asia",1977,73.06,3495918,13306.61921 +"763","Israel","Asia",1982,74.45,3858421,15367.0292 +"764","Israel","Asia",1987,75.6,4203148,17122.47986 +"765","Israel","Asia",1992,76.93,4936550,18051.52254 +"766","Israel","Asia",1997,78.269,5531387,20896.60924 +"767","Israel","Asia",2002,79.696,6029529,21905.59514 +"768","Israel","Asia",2007,80.745,6426679,25523.2771 +"769","Italy","Europe",1952,65.94,47666000,4931.404155 +"770","Italy","Europe",1957,67.81,49182000,6248.656232 +"771","Italy","Europe",1962,69.24,50843200,8243.58234 +"772","Italy","Europe",1967,71.06,52667100,10022.40131 +"773","Italy","Europe",1972,72.19,54365564,12269.27378 +"774","Italy","Europe",1977,73.48,56059245,14255.98475 +"775","Italy","Europe",1982,74.98,56535636,16537.4835 +"776","Italy","Europe",1987,76.42,56729703,19207.23482 +"777","Italy","Europe",1992,77.44,56840847,22013.64486 +"778","Italy","Europe",1997,78.82,57479469,24675.02446 +"779","Italy","Europe",2002,80.24,57926999,27968.09817 +"780","Italy","Europe",2007,80.546,58147733,28569.7197 +"781","Jamaica","Americas",1952,58.53,1426095,2898.530881 +"782","Jamaica","Americas",1957,62.61,1535090,4756.525781 +"783","Jamaica","Americas",1962,65.61,1665128,5246.107524 +"784","Jamaica","Americas",1967,67.51,1861096,6124.703451 +"785","Jamaica","Americas",1972,69,1997616,7433.889293 +"786","Jamaica","Americas",1977,70.11,2156814,6650.195573 +"787","Jamaica","Americas",1982,71.21,2298309,6068.05135 +"788","Jamaica","Americas",1987,71.77,2326606,6351.237495 +"789","Jamaica","Americas",1992,71.766,2378618,7404.923685 +"790","Jamaica","Americas",1997,72.262,2531311,7121.924704 +"791","Jamaica","Americas",2002,72.047,2664659,6994.774861 +"792","Jamaica","Americas",2007,72.567,2780132,7320.880262 +"793","Japan","Asia",1952,63.03,86459025,3216.956347 +"794","Japan","Asia",1957,65.5,91563009,4317.694365 +"795","Japan","Asia",1962,68.73,95831757,6576.649461 +"796","Japan","Asia",1967,71.43,100825279,9847.788607 +"797","Japan","Asia",1972,73.42,107188273,14778.78636 +"798","Japan","Asia",1977,75.38,113872473,16610.37701 +"799","Japan","Asia",1982,77.11,118454974,19384.10571 +"800","Japan","Asia",1987,78.67,122091325,22375.94189 +"801","Japan","Asia",1992,79.36,124329269,26824.89511 +"802","Japan","Asia",1997,80.69,125956499,28816.58499 +"803","Japan","Asia",2002,82,127065841,28604.5919 +"804","Japan","Asia",2007,82.603,127467972,31656.06806 +"805","Jordan","Asia",1952,43.158,607914,1546.907807 +"806","Jordan","Asia",1957,45.669,746559,1886.080591 +"807","Jordan","Asia",1962,48.126,933559,2348.009158 +"808","Jordan","Asia",1967,51.629,1255058,2741.796252 +"809","Jordan","Asia",1972,56.528,1613551,2110.856309 +"810","Jordan","Asia",1977,61.134,1937652,2852.351568 +"811","Jordan","Asia",1982,63.739,2347031,4161.415959 +"812","Jordan","Asia",1987,65.869,2820042,4448.679912 +"813","Jordan","Asia",1992,68.015,3867409,3431.593647 +"814","Jordan","Asia",1997,69.772,4526235,3645.379572 +"815","Jordan","Asia",2002,71.263,5307470,3844.917194 +"816","Jordan","Asia",2007,72.535,6053193,4519.461171 +"817","Kenya","Africa",1952,42.27,6464046,853.540919 +"818","Kenya","Africa",1957,44.686,7454779,944.4383152 +"819","Kenya","Africa",1962,47.949,8678557,896.9663732 +"820","Kenya","Africa",1967,50.654,10191512,1056.736457 +"821","Kenya","Africa",1972,53.559,12044785,1222.359968 +"822","Kenya","Africa",1977,56.155,14500404,1267.613204 +"823","Kenya","Africa",1982,58.766,17661452,1348.225791 +"824","Kenya","Africa",1987,59.339,21198082,1361.936856 +"825","Kenya","Africa",1992,59.285,25020539,1341.921721 +"826","Kenya","Africa",1997,54.407,28263827,1360.485021 +"827","Kenya","Africa",2002,50.992,31386842,1287.514732 +"828","Kenya","Africa",2007,54.11,35610177,1463.249282 +"829","Korea, Dem. Rep.","Asia",1952,50.056,8865488,1088.277758 +"830","Korea, Dem. Rep.","Asia",1957,54.081,9411381,1571.134655 +"831","Korea, Dem. Rep.","Asia",1962,56.656,10917494,1621.693598 +"832","Korea, Dem. Rep.","Asia",1967,59.942,12617009,2143.540609 +"833","Korea, Dem. Rep.","Asia",1972,63.983,14781241,3701.621503 +"834","Korea, Dem. Rep.","Asia",1977,67.159,16325320,4106.301249 +"835","Korea, Dem. Rep.","Asia",1982,69.1,17647518,4106.525293 +"836","Korea, Dem. Rep.","Asia",1987,70.647,19067554,4106.492315 +"837","Korea, Dem. Rep.","Asia",1992,69.978,20711375,3726.063507 +"838","Korea, Dem. Rep.","Asia",1997,67.727,21585105,1690.756814 +"839","Korea, Dem. Rep.","Asia",2002,66.662,22215365,1646.758151 +"840","Korea, Dem. Rep.","Asia",2007,67.297,23301725,1593.06548 +"841","Korea, Rep.","Asia",1952,47.453,20947571,1030.592226 +"842","Korea, Rep.","Asia",1957,52.681,22611552,1487.593537 +"843","Korea, Rep.","Asia",1962,55.292,26420307,1536.344387 +"844","Korea, Rep.","Asia",1967,57.716,30131000,2029.228142 +"845","Korea, Rep.","Asia",1972,62.612,33505000,3030.87665 +"846","Korea, Rep.","Asia",1977,64.766,36436000,4657.22102 +"847","Korea, Rep.","Asia",1982,67.123,39326000,5622.942464 +"848","Korea, Rep.","Asia",1987,69.81,41622000,8533.088805 +"849","Korea, Rep.","Asia",1992,72.244,43805450,12104.27872 +"850","Korea, Rep.","Asia",1997,74.647,46173816,15993.52796 +"851","Korea, Rep.","Asia",2002,77.045,47969150,19233.98818 +"852","Korea, Rep.","Asia",2007,78.623,49044790,23348.13973 +"853","Kuwait","Asia",1952,55.565,160000,108382.3529 +"854","Kuwait","Asia",1957,58.033,212846,113523.1329 +"855","Kuwait","Asia",1962,60.47,358266,95458.11176 +"856","Kuwait","Asia",1967,64.624,575003,80894.88326 +"857","Kuwait","Asia",1972,67.712,841934,109347.867 +"858","Kuwait","Asia",1977,69.343,1140357,59265.47714 +"859","Kuwait","Asia",1982,71.309,1497494,31354.03573 +"860","Kuwait","Asia",1987,74.174,1891487,28118.42998 +"861","Kuwait","Asia",1992,75.19,1418095,34932.91959 +"862","Kuwait","Asia",1997,76.156,1765345,40300.61996 +"863","Kuwait","Asia",2002,76.904,2111561,35110.10566 +"864","Kuwait","Asia",2007,77.588,2505559,47306.98978 +"865","Lebanon","Asia",1952,55.928,1439529,4834.804067 +"866","Lebanon","Asia",1957,59.489,1647412,6089.786934 +"867","Lebanon","Asia",1962,62.094,1886848,5714.560611 +"868","Lebanon","Asia",1967,63.87,2186894,6006.983042 +"869","Lebanon","Asia",1972,65.421,2680018,7486.384341 +"870","Lebanon","Asia",1977,66.099,3115787,8659.696836 +"871","Lebanon","Asia",1982,66.983,3086876,7640.519521 +"872","Lebanon","Asia",1987,67.926,3089353,5377.091329 +"873","Lebanon","Asia",1992,69.292,3219994,6890.806854 +"874","Lebanon","Asia",1997,70.265,3430388,8754.96385 +"875","Lebanon","Asia",2002,71.028,3677780,9313.93883 +"876","Lebanon","Asia",2007,71.993,3921278,10461.05868 +"877","Lesotho","Africa",1952,42.138,748747,298.8462121 +"878","Lesotho","Africa",1957,45.047,813338,335.9971151 +"879","Lesotho","Africa",1962,47.747,893143,411.8006266 +"880","Lesotho","Africa",1967,48.492,996380,498.6390265 +"881","Lesotho","Africa",1972,49.767,1116779,496.5815922 +"882","Lesotho","Africa",1977,52.208,1251524,745.3695408 +"883","Lesotho","Africa",1982,55.078,1411807,797.2631074 +"884","Lesotho","Africa",1987,57.18,1599200,773.9932141 +"885","Lesotho","Africa",1992,59.685,1803195,977.4862725 +"886","Lesotho","Africa",1997,55.558,1982823,1186.147994 +"887","Lesotho","Africa",2002,44.593,2046772,1275.184575 +"888","Lesotho","Africa",2007,42.592,2012649,1569.331442 +"889","Liberia","Africa",1952,38.48,863308,575.5729961 +"890","Liberia","Africa",1957,39.486,975950,620.9699901 +"891","Liberia","Africa",1962,40.502,1112796,634.1951625 +"892","Liberia","Africa",1967,41.536,1279406,713.6036483 +"893","Liberia","Africa",1972,42.614,1482628,803.0054535 +"894","Liberia","Africa",1977,43.764,1703617,640.3224383 +"895","Liberia","Africa",1982,44.852,1956875,572.1995694 +"896","Liberia","Africa",1987,46.027,2269414,506.1138573 +"897","Liberia","Africa",1992,40.802,1912974,636.6229191 +"898","Liberia","Africa",1997,42.221,2200725,609.1739508 +"899","Liberia","Africa",2002,43.753,2814651,531.4823679 +"900","Liberia","Africa",2007,45.678,3193942,414.5073415 +"901","Libya","Africa",1952,42.723,1019729,2387.54806 +"902","Libya","Africa",1957,45.289,1201578,3448.284395 +"903","Libya","Africa",1962,47.808,1441863,6757.030816 +"904","Libya","Africa",1967,50.227,1759224,18772.75169 +"905","Libya","Africa",1972,52.773,2183877,21011.49721 +"906","Libya","Africa",1977,57.442,2721783,21951.21176 +"907","Libya","Africa",1982,62.155,3344074,17364.27538 +"908","Libya","Africa",1987,66.234,3799845,11770.5898 +"909","Libya","Africa",1992,68.755,4364501,9640.138501 +"910","Libya","Africa",1997,71.555,4759670,9467.446056 +"911","Libya","Africa",2002,72.737,5368585,9534.677467 +"912","Libya","Africa",2007,73.952,6036914,12057.49928 +"913","Madagascar","Africa",1952,36.681,4762912,1443.011715 +"914","Madagascar","Africa",1957,38.865,5181679,1589.20275 +"915","Madagascar","Africa",1962,40.848,5703324,1643.38711 +"916","Madagascar","Africa",1967,42.881,6334556,1634.047282 +"917","Madagascar","Africa",1972,44.851,7082430,1748.562982 +"918","Madagascar","Africa",1977,46.881,8007166,1544.228586 +"919","Madagascar","Africa",1982,48.969,9171477,1302.878658 +"920","Madagascar","Africa",1987,49.35,10568642,1155.441948 +"921","Madagascar","Africa",1992,52.214,12210395,1040.67619 +"922","Madagascar","Africa",1997,54.978,14165114,986.2958956 +"923","Madagascar","Africa",2002,57.286,16473477,894.6370822 +"924","Madagascar","Africa",2007,59.443,19167654,1044.770126 +"925","Malawi","Africa",1952,36.256,2917802,369.1650802 +"926","Malawi","Africa",1957,37.207,3221238,416.3698064 +"927","Malawi","Africa",1962,38.41,3628608,427.9010856 +"928","Malawi","Africa",1967,39.487,4147252,495.5147806 +"929","Malawi","Africa",1972,41.766,4730997,584.6219709 +"930","Malawi","Africa",1977,43.767,5637246,663.2236766 +"931","Malawi","Africa",1982,45.642,6502825,632.8039209 +"932","Malawi","Africa",1987,47.457,7824747,635.5173634 +"933","Malawi","Africa",1992,49.42,10014249,563.2000145 +"934","Malawi","Africa",1997,47.495,10419991,692.2758103 +"935","Malawi","Africa",2002,45.009,11824495,665.4231186 +"936","Malawi","Africa",2007,48.303,13327079,759.3499101 +"937","Malaysia","Asia",1952,48.463,6748378,1831.132894 +"938","Malaysia","Asia",1957,52.102,7739235,1810.066992 +"939","Malaysia","Asia",1962,55.737,8906385,2036.884944 +"940","Malaysia","Asia",1967,59.371,10154878,2277.742396 +"941","Malaysia","Asia",1972,63.01,11441462,2849.09478 +"942","Malaysia","Asia",1977,65.256,12845381,3827.921571 +"943","Malaysia","Asia",1982,68,14441916,4920.355951 +"944","Malaysia","Asia",1987,69.5,16331785,5249.802653 +"945","Malaysia","Asia",1992,70.693,18319502,7277.912802 +"946","Malaysia","Asia",1997,71.938,20476091,10132.90964 +"947","Malaysia","Asia",2002,73.044,22662365,10206.97794 +"948","Malaysia","Asia",2007,74.241,24821286,12451.6558 +"949","Mali","Africa",1952,33.685,3838168,452.3369807 +"950","Mali","Africa",1957,35.307,4241884,490.3821867 +"951","Mali","Africa",1962,36.936,4690372,496.1743428 +"952","Mali","Africa",1967,38.487,5212416,545.0098873 +"953","Mali","Africa",1972,39.977,5828158,581.3688761 +"954","Mali","Africa",1977,41.714,6491649,686.3952693 +"955","Mali","Africa",1982,43.916,6998256,618.0140641 +"956","Mali","Africa",1987,46.364,7634008,684.1715576 +"957","Mali","Africa",1992,48.388,8416215,739.014375 +"958","Mali","Africa",1997,49.903,9384984,790.2579846 +"959","Mali","Africa",2002,51.818,10580176,951.4097518 +"960","Mali","Africa",2007,54.467,12031795,1042.581557 +"961","Mauritania","Africa",1952,40.543,1022556,743.1159097 +"962","Mauritania","Africa",1957,42.338,1076852,846.1202613 +"963","Mauritania","Africa",1962,44.248,1146757,1055.896036 +"964","Mauritania","Africa",1967,46.289,1230542,1421.145193 +"965","Mauritania","Africa",1972,48.437,1332786,1586.851781 +"966","Mauritania","Africa",1977,50.852,1456688,1497.492223 +"967","Mauritania","Africa",1982,53.599,1622136,1481.150189 +"968","Mauritania","Africa",1987,56.145,1841240,1421.603576 +"969","Mauritania","Africa",1992,58.333,2119465,1361.369784 +"970","Mauritania","Africa",1997,60.43,2444741,1483.136136 +"971","Mauritania","Africa",2002,62.247,2828858,1579.019543 +"972","Mauritania","Africa",2007,64.164,3270065,1803.151496 +"973","Mauritius","Africa",1952,50.986,516556,1967.955707 +"974","Mauritius","Africa",1957,58.089,609816,2034.037981 +"975","Mauritius","Africa",1962,60.246,701016,2529.067487 +"976","Mauritius","Africa",1967,61.557,789309,2475.387562 +"977","Mauritius","Africa",1972,62.944,851334,2575.484158 +"978","Mauritius","Africa",1977,64.93,913025,3710.982963 +"979","Mauritius","Africa",1982,66.711,992040,3688.037739 +"980","Mauritius","Africa",1987,68.74,1042663,4783.586903 +"981","Mauritius","Africa",1992,69.745,1096202,6058.253846 +"982","Mauritius","Africa",1997,70.736,1149818,7425.705295 +"983","Mauritius","Africa",2002,71.954,1200206,9021.815894 +"984","Mauritius","Africa",2007,72.801,1250882,10956.99112 +"985","Mexico","Americas",1952,50.789,30144317,3478.125529 +"986","Mexico","Americas",1957,55.19,35015548,4131.546641 +"987","Mexico","Americas",1962,58.299,41121485,4581.609385 +"988","Mexico","Americas",1967,60.11,47995559,5754.733883 +"989","Mexico","Americas",1972,62.361,55984294,6809.40669 +"990","Mexico","Americas",1977,65.032,63759976,7674.929108 +"991","Mexico","Americas",1982,67.405,71640904,9611.147541 +"992","Mexico","Americas",1987,69.498,80122492,8688.156003 +"993","Mexico","Americas",1992,71.455,88111030,9472.384295 +"994","Mexico","Americas",1997,73.67,95895146,9767.29753 +"995","Mexico","Americas",2002,74.902,102479927,10742.44053 +"996","Mexico","Americas",2007,76.195,108700891,11977.57496 +"997","Mongolia","Asia",1952,42.244,800663,786.5668575 +"998","Mongolia","Asia",1957,45.248,882134,912.6626085 +"999","Mongolia","Asia",1962,48.251,1010280,1056.353958 +"1000","Mongolia","Asia",1967,51.253,1149500,1226.04113 +"1001","Mongolia","Asia",1972,53.754,1320500,1421.741975 +"1002","Mongolia","Asia",1977,55.491,1528000,1647.511665 +"1003","Mongolia","Asia",1982,57.489,1756032,2000.603139 +"1004","Mongolia","Asia",1987,60.222,2015133,2338.008304 +"1005","Mongolia","Asia",1992,61.271,2312802,1785.402016 +"1006","Mongolia","Asia",1997,63.625,2494803,1902.2521 +"1007","Mongolia","Asia",2002,65.033,2674234,2140.739323 +"1008","Mongolia","Asia",2007,66.803,2874127,3095.772271 +"1009","Montenegro","Europe",1952,59.164,413834,2647.585601 +"1010","Montenegro","Europe",1957,61.448,442829,3682.259903 +"1011","Montenegro","Europe",1962,63.728,474528,4649.593785 +"1012","Montenegro","Europe",1967,67.178,501035,5907.850937 +"1013","Montenegro","Europe",1972,70.636,527678,7778.414017 +"1014","Montenegro","Europe",1977,73.066,560073,9595.929905 +"1015","Montenegro","Europe",1982,74.101,562548,11222.58762 +"1016","Montenegro","Europe",1987,74.865,569473,11732.51017 +"1017","Montenegro","Europe",1992,75.435,621621,7003.339037 +"1018","Montenegro","Europe",1997,75.445,692651,6465.613349 +"1019","Montenegro","Europe",2002,73.981,720230,6557.194282 +"1020","Montenegro","Europe",2007,74.543,684736,9253.896111 +"1021","Morocco","Africa",1952,42.873,9939217,1688.20357 +"1022","Morocco","Africa",1957,45.423,11406350,1642.002314 +"1023","Morocco","Africa",1962,47.924,13056604,1566.353493 +"1024","Morocco","Africa",1967,50.335,14770296,1711.04477 +"1025","Morocco","Africa",1972,52.862,16660670,1930.194975 +"1026","Morocco","Africa",1977,55.73,18396941,2370.619976 +"1027","Morocco","Africa",1982,59.65,20198730,2702.620356 +"1028","Morocco","Africa",1987,62.677,22987397,2755.046991 +"1029","Morocco","Africa",1992,65.393,25798239,2948.047252 +"1030","Morocco","Africa",1997,67.66,28529501,2982.101858 +"1031","Morocco","Africa",2002,69.615,31167783,3258.495584 +"1032","Morocco","Africa",2007,71.164,33757175,3820.17523 +"1033","Mozambique","Africa",1952,31.286,6446316,468.5260381 +"1034","Mozambique","Africa",1957,33.779,7038035,495.5868333 +"1035","Mozambique","Africa",1962,36.161,7788944,556.6863539 +"1036","Mozambique","Africa",1967,38.113,8680909,566.6691539 +"1037","Mozambique","Africa",1972,40.328,9809596,724.9178037 +"1038","Mozambique","Africa",1977,42.495,11127868,502.3197334 +"1039","Mozambique","Africa",1982,42.795,12587223,462.2114149 +"1040","Mozambique","Africa",1987,42.861,12891952,389.8761846 +"1041","Mozambique","Africa",1992,44.284,13160731,410.8968239 +"1042","Mozambique","Africa",1997,46.344,16603334,472.3460771 +"1043","Mozambique","Africa",2002,44.026,18473780,633.6179466 +"1044","Mozambique","Africa",2007,42.082,19951656,823.6856205 +"1045","Myanmar","Asia",1952,36.319,20092996,331 +"1046","Myanmar","Asia",1957,41.905,21731844,350 +"1047","Myanmar","Asia",1962,45.108,23634436,388 +"1048","Myanmar","Asia",1967,49.379,25870271,349 +"1049","Myanmar","Asia",1972,53.07,28466390,357 +"1050","Myanmar","Asia",1977,56.059,31528087,371 +"1051","Myanmar","Asia",1982,58.056,34680442,424 +"1052","Myanmar","Asia",1987,58.339,38028578,385 +"1053","Myanmar","Asia",1992,59.32,40546538,347 +"1054","Myanmar","Asia",1997,60.328,43247867,415 +"1055","Myanmar","Asia",2002,59.908,45598081,611 +"1056","Myanmar","Asia",2007,62.069,47761980,944 +"1057","Namibia","Africa",1952,41.725,485831,2423.780443 +"1058","Namibia","Africa",1957,45.226,548080,2621.448058 +"1059","Namibia","Africa",1962,48.386,621392,3173.215595 +"1060","Namibia","Africa",1967,51.159,706640,3793.694753 +"1061","Namibia","Africa",1972,53.867,821782,3746.080948 +"1062","Namibia","Africa",1977,56.437,977026,3876.485958 +"1063","Namibia","Africa",1982,58.968,1099010,4191.100511 +"1064","Namibia","Africa",1987,60.835,1278184,3693.731337 +"1065","Namibia","Africa",1992,61.999,1554253,3804.537999 +"1066","Namibia","Africa",1997,58.909,1774766,3899.52426 +"1067","Namibia","Africa",2002,51.479,1972153,4072.324751 +"1068","Namibia","Africa",2007,52.906,2055080,4811.060429 +"1069","Nepal","Asia",1952,36.157,9182536,545.8657229 +"1070","Nepal","Asia",1957,37.686,9682338,597.9363558 +"1071","Nepal","Asia",1962,39.393,10332057,652.3968593 +"1072","Nepal","Asia",1967,41.472,11261690,676.4422254 +"1073","Nepal","Asia",1972,43.971,12412593,674.7881296 +"1074","Nepal","Asia",1977,46.748,13933198,694.1124398 +"1075","Nepal","Asia",1982,49.594,15796314,718.3730947 +"1076","Nepal","Asia",1987,52.537,17917180,775.6324501 +"1077","Nepal","Asia",1992,55.727,20326209,897.7403604 +"1078","Nepal","Asia",1997,59.426,23001113,1010.892138 +"1079","Nepal","Asia",2002,61.34,25873917,1057.206311 +"1080","Nepal","Asia",2007,63.785,28901790,1091.359778 +"1081","Netherlands","Europe",1952,72.13,10381988,8941.571858 +"1082","Netherlands","Europe",1957,72.99,11026383,11276.19344 +"1083","Netherlands","Europe",1962,73.23,11805689,12790.84956 +"1084","Netherlands","Europe",1967,73.82,12596822,15363.25136 +"1085","Netherlands","Europe",1972,73.75,13329874,18794.74567 +"1086","Netherlands","Europe",1977,75.24,13852989,21209.0592 +"1087","Netherlands","Europe",1982,76.05,14310401,21399.46046 +"1088","Netherlands","Europe",1987,76.83,14665278,23651.32361 +"1089","Netherlands","Europe",1992,77.42,15174244,26790.94961 +"1090","Netherlands","Europe",1997,78.03,15604464,30246.13063 +"1091","Netherlands","Europe",2002,78.53,16122830,33724.75778 +"1092","Netherlands","Europe",2007,79.762,16570613,36797.93332 +"1093","New Zealand","Oceania",1952,69.39,1994794,10556.57566 +"1094","New Zealand","Oceania",1957,70.26,2229407,12247.39532 +"1095","New Zealand","Oceania",1962,71.24,2488550,13175.678 +"1096","New Zealand","Oceania",1967,71.52,2728150,14463.91893 +"1097","New Zealand","Oceania",1972,71.89,2929100,16046.03728 +"1098","New Zealand","Oceania",1977,72.22,3164900,16233.7177 +"1099","New Zealand","Oceania",1982,73.84,3210650,17632.4104 +"1100","New Zealand","Oceania",1987,74.32,3317166,19007.19129 +"1101","New Zealand","Oceania",1992,76.33,3437674,18363.32494 +"1102","New Zealand","Oceania",1997,77.55,3676187,21050.41377 +"1103","New Zealand","Oceania",2002,79.11,3908037,23189.80135 +"1104","New Zealand","Oceania",2007,80.204,4115771,25185.00911 +"1105","Nicaragua","Americas",1952,42.314,1165790,3112.363948 +"1106","Nicaragua","Americas",1957,45.432,1358828,3457.415947 +"1107","Nicaragua","Americas",1962,48.632,1590597,3634.364406 +"1108","Nicaragua","Americas",1967,51.884,1865490,4643.393534 +"1109","Nicaragua","Americas",1972,55.151,2182908,4688.593267 +"1110","Nicaragua","Americas",1977,57.47,2554598,5486.371089 +"1111","Nicaragua","Americas",1982,59.298,2979423,3470.338156 +"1112","Nicaragua","Americas",1987,62.008,3344353,2955.984375 +"1113","Nicaragua","Americas",1992,65.843,4017939,2170.151724 +"1114","Nicaragua","Americas",1997,68.426,4609572,2253.023004 +"1115","Nicaragua","Americas",2002,70.836,5146848,2474.548819 +"1116","Nicaragua","Americas",2007,72.899,5675356,2749.320965 +"1117","Niger","Africa",1952,37.444,3379468,761.879376 +"1118","Niger","Africa",1957,38.598,3692184,835.5234025 +"1119","Niger","Africa",1962,39.487,4076008,997.7661127 +"1120","Niger","Africa",1967,40.118,4534062,1054.384891 +"1121","Niger","Africa",1972,40.546,5060262,954.2092363 +"1122","Niger","Africa",1977,41.291,5682086,808.8970728 +"1123","Niger","Africa",1982,42.598,6437188,909.7221354 +"1124","Niger","Africa",1987,44.555,7332638,668.3000228 +"1125","Niger","Africa",1992,47.391,8392818,581.182725 +"1126","Niger","Africa",1997,51.313,9666252,580.3052092 +"1127","Niger","Africa",2002,54.496,11140655,601.0745012 +"1128","Niger","Africa",2007,56.867,12894865,619.6768924 +"1129","Nigeria","Africa",1952,36.324,33119096,1077.281856 +"1130","Nigeria","Africa",1957,37.802,37173340,1100.592563 +"1131","Nigeria","Africa",1962,39.36,41871351,1150.927478 +"1132","Nigeria","Africa",1967,41.04,47287752,1014.514104 +"1133","Nigeria","Africa",1972,42.821,53740085,1698.388838 +"1134","Nigeria","Africa",1977,44.514,62209173,1981.951806 +"1135","Nigeria","Africa",1982,45.826,73039376,1576.97375 +"1136","Nigeria","Africa",1987,46.886,81551520,1385.029563 +"1137","Nigeria","Africa",1992,47.472,93364244,1619.848217 +"1138","Nigeria","Africa",1997,47.464,106207839,1624.941275 +"1139","Nigeria","Africa",2002,46.608,119901274,1615.286395 +"1140","Nigeria","Africa",2007,46.859,135031164,2013.977305 +"1141","Norway","Europe",1952,72.67,3327728,10095.42172 +"1142","Norway","Europe",1957,73.44,3491938,11653.97304 +"1143","Norway","Europe",1962,73.47,3638919,13450.40151 +"1144","Norway","Europe",1967,74.08,3786019,16361.87647 +"1145","Norway","Europe",1972,74.34,3933004,18965.05551 +"1146","Norway","Europe",1977,75.37,4043205,23311.34939 +"1147","Norway","Europe",1982,75.97,4114787,26298.63531 +"1148","Norway","Europe",1987,75.89,4186147,31540.9748 +"1149","Norway","Europe",1992,77.32,4286357,33965.66115 +"1150","Norway","Europe",1997,78.32,4405672,41283.16433 +"1151","Norway","Europe",2002,79.05,4535591,44683.97525 +"1152","Norway","Europe",2007,80.196,4627926,49357.19017 +"1153","Oman","Asia",1952,37.578,507833,1828.230307 +"1154","Oman","Asia",1957,40.08,561977,2242.746551 +"1155","Oman","Asia",1962,43.165,628164,2924.638113 +"1156","Oman","Asia",1967,46.988,714775,4720.942687 +"1157","Oman","Asia",1972,52.143,829050,10618.03855 +"1158","Oman","Asia",1977,57.367,1004533,11848.34392 +"1159","Oman","Asia",1982,62.728,1301048,12954.79101 +"1160","Oman","Asia",1987,67.734,1593882,18115.22313 +"1161","Oman","Asia",1992,71.197,1915208,18616.70691 +"1162","Oman","Asia",1997,72.499,2283635,19702.05581 +"1163","Oman","Asia",2002,74.193,2713462,19774.83687 +"1164","Oman","Asia",2007,75.64,3204897,22316.19287 +"1165","Pakistan","Asia",1952,43.436,41346560,684.5971438 +"1166","Pakistan","Asia",1957,45.557,46679944,747.0835292 +"1167","Pakistan","Asia",1962,47.67,53100671,803.3427418 +"1168","Pakistan","Asia",1967,49.8,60641899,942.4082588 +"1169","Pakistan","Asia",1972,51.929,69325921,1049.938981 +"1170","Pakistan","Asia",1977,54.043,78152686,1175.921193 +"1171","Pakistan","Asia",1982,56.158,91462088,1443.429832 +"1172","Pakistan","Asia",1987,58.245,105186881,1704.686583 +"1173","Pakistan","Asia",1992,60.838,120065004,1971.829464 +"1174","Pakistan","Asia",1997,61.818,135564834,2049.350521 +"1175","Pakistan","Asia",2002,63.61,153403524,2092.712441 +"1176","Pakistan","Asia",2007,65.483,169270617,2605.94758 +"1177","Panama","Americas",1952,55.191,940080,2480.380334 +"1178","Panama","Americas",1957,59.201,1063506,2961.800905 +"1179","Panama","Americas",1962,61.817,1215725,3536.540301 +"1180","Panama","Americas",1967,64.071,1405486,4421.009084 +"1181","Panama","Americas",1972,66.216,1616384,5364.249663 +"1182","Panama","Americas",1977,68.681,1839782,5351.912144 +"1183","Panama","Americas",1982,70.472,2036305,7009.601598 +"1184","Panama","Americas",1987,71.523,2253639,7034.779161 +"1185","Panama","Americas",1992,72.462,2484997,6618.74305 +"1186","Panama","Americas",1997,73.738,2734531,7113.692252 +"1187","Panama","Americas",2002,74.712,2990875,7356.031934 +"1188","Panama","Americas",2007,75.537,3242173,9809.185636 +"1189","Paraguay","Americas",1952,62.649,1555876,1952.308701 +"1190","Paraguay","Americas",1957,63.196,1770902,2046.154706 +"1191","Paraguay","Americas",1962,64.361,2009813,2148.027146 +"1192","Paraguay","Americas",1967,64.951,2287985,2299.376311 +"1193","Paraguay","Americas",1972,65.815,2614104,2523.337977 +"1194","Paraguay","Americas",1977,66.353,2984494,3248.373311 +"1195","Paraguay","Americas",1982,66.874,3366439,4258.503604 +"1196","Paraguay","Americas",1987,67.378,3886512,3998.875695 +"1197","Paraguay","Americas",1992,68.225,4483945,4196.411078 +"1198","Paraguay","Americas",1997,69.4,5154123,4247.400261 +"1199","Paraguay","Americas",2002,70.755,5884491,3783.674243 +"1200","Paraguay","Americas",2007,71.752,6667147,4172.838464 +"1201","Peru","Americas",1952,43.902,8025700,3758.523437 +"1202","Peru","Americas",1957,46.263,9146100,4245.256698 +"1203","Peru","Americas",1962,49.096,10516500,4957.037982 +"1204","Peru","Americas",1967,51.445,12132200,5788.09333 +"1205","Peru","Americas",1972,55.448,13954700,5937.827283 +"1206","Peru","Americas",1977,58.447,15990099,6281.290855 +"1207","Peru","Americas",1982,61.406,18125129,6434.501797 +"1208","Peru","Americas",1987,64.134,20195924,6360.943444 +"1209","Peru","Americas",1992,66.458,22430449,4446.380924 +"1210","Peru","Americas",1997,68.386,24748122,5838.347657 +"1211","Peru","Americas",2002,69.906,26769436,5909.020073 +"1212","Peru","Americas",2007,71.421,28674757,7408.905561 +"1213","Philippines","Asia",1952,47.752,22438691,1272.880995 +"1214","Philippines","Asia",1957,51.334,26072194,1547.944844 +"1215","Philippines","Asia",1962,54.757,30325264,1649.552153 +"1216","Philippines","Asia",1967,56.393,35356600,1814.12743 +"1217","Philippines","Asia",1972,58.065,40850141,1989.37407 +"1218","Philippines","Asia",1977,60.06,46850962,2373.204287 +"1219","Philippines","Asia",1982,62.082,53456774,2603.273765 +"1220","Philippines","Asia",1987,64.151,60017788,2189.634995 +"1221","Philippines","Asia",1992,66.458,67185766,2279.324017 +"1222","Philippines","Asia",1997,68.564,75012988,2536.534925 +"1223","Philippines","Asia",2002,70.303,82995088,2650.921068 +"1224","Philippines","Asia",2007,71.688,91077287,3190.481016 +"1225","Poland","Europe",1952,61.31,25730551,4029.329699 +"1226","Poland","Europe",1957,65.77,28235346,4734.253019 +"1227","Poland","Europe",1962,67.64,30329617,5338.752143 +"1228","Poland","Europe",1967,69.61,31785378,6557.152776 +"1229","Poland","Europe",1972,70.85,33039545,8006.506993 +"1230","Poland","Europe",1977,70.67,34621254,9508.141454 +"1231","Poland","Europe",1982,71.32,36227381,8451.531004 +"1232","Poland","Europe",1987,70.98,37740710,9082.351172 +"1233","Poland","Europe",1992,70.99,38370697,7738.881247 +"1234","Poland","Europe",1997,72.75,38654957,10159.58368 +"1235","Poland","Europe",2002,74.67,38625976,12002.23908 +"1236","Poland","Europe",2007,75.563,38518241,15389.92468 +"1237","Portugal","Europe",1952,59.82,8526050,3068.319867 +"1238","Portugal","Europe",1957,61.51,8817650,3774.571743 +"1239","Portugal","Europe",1962,64.39,9019800,4727.954889 +"1240","Portugal","Europe",1967,66.6,9103000,6361.517993 +"1241","Portugal","Europe",1972,69.26,8970450,9022.247417 +"1242","Portugal","Europe",1977,70.41,9662600,10172.48572 +"1243","Portugal","Europe",1982,72.77,9859650,11753.84291 +"1244","Portugal","Europe",1987,74.06,9915289,13039.30876 +"1245","Portugal","Europe",1992,74.86,9927680,16207.26663 +"1246","Portugal","Europe",1997,75.97,10156415,17641.03156 +"1247","Portugal","Europe",2002,77.29,10433867,19970.90787 +"1248","Portugal","Europe",2007,78.098,10642836,20509.64777 +"1249","Puerto Rico","Americas",1952,64.28,2227000,3081.959785 +"1250","Puerto Rico","Americas",1957,68.54,2260000,3907.156189 +"1251","Puerto Rico","Americas",1962,69.62,2448046,5108.34463 +"1252","Puerto Rico","Americas",1967,71.1,2648961,6929.277714 +"1253","Puerto Rico","Americas",1972,72.16,2847132,9123.041742 +"1254","Puerto Rico","Americas",1977,73.44,3080828,9770.524921 +"1255","Puerto Rico","Americas",1982,73.75,3279001,10330.98915 +"1256","Puerto Rico","Americas",1987,74.63,3444468,12281.34191 +"1257","Puerto Rico","Americas",1992,73.911,3585176,14641.58711 +"1258","Puerto Rico","Americas",1997,74.917,3759430,16999.4333 +"1259","Puerto Rico","Americas",2002,77.778,3859606,18855.60618 +"1260","Puerto Rico","Americas",2007,78.746,3942491,19328.70901 +"1261","Reunion","Africa",1952,52.724,257700,2718.885295 +"1262","Reunion","Africa",1957,55.09,308700,2769.451844 +"1263","Reunion","Africa",1962,57.666,358900,3173.72334 +"1264","Reunion","Africa",1967,60.542,414024,4021.175739 +"1265","Reunion","Africa",1972,64.274,461633,5047.658563 +"1266","Reunion","Africa",1977,67.064,492095,4319.804067 +"1267","Reunion","Africa",1982,69.885,517810,5267.219353 +"1268","Reunion","Africa",1987,71.913,562035,5303.377488 +"1269","Reunion","Africa",1992,73.615,622191,6101.255823 +"1270","Reunion","Africa",1997,74.772,684810,6071.941411 +"1271","Reunion","Africa",2002,75.744,743981,6316.1652 +"1272","Reunion","Africa",2007,76.442,798094,7670.122558 +"1273","Romania","Europe",1952,61.05,16630000,3144.613186 +"1274","Romania","Europe",1957,64.1,17829327,3943.370225 +"1275","Romania","Europe",1962,66.8,18680721,4734.997586 +"1276","Romania","Europe",1967,66.8,19284814,6470.866545 +"1277","Romania","Europe",1972,69.21,20662648,8011.414402 +"1278","Romania","Europe",1977,69.46,21658597,9356.39724 +"1279","Romania","Europe",1982,69.66,22356726,9605.314053 +"1280","Romania","Europe",1987,69.53,22686371,9696.273295 +"1281","Romania","Europe",1992,69.36,22797027,6598.409903 +"1282","Romania","Europe",1997,69.72,22562458,7346.547557 +"1283","Romania","Europe",2002,71.322,22404337,7885.360081 +"1284","Romania","Europe",2007,72.476,22276056,10808.47561 +"1285","Rwanda","Africa",1952,40,2534927,493.3238752 +"1286","Rwanda","Africa",1957,41.5,2822082,540.2893983 +"1287","Rwanda","Africa",1962,43,3051242,597.4730727 +"1288","Rwanda","Africa",1967,44.1,3451079,510.9637142 +"1289","Rwanda","Africa",1972,44.6,3992121,590.5806638 +"1290","Rwanda","Africa",1977,45,4657072,670.0806011 +"1291","Rwanda","Africa",1982,46.218,5507565,881.5706467 +"1292","Rwanda","Africa",1987,44.02,6349365,847.991217 +"1293","Rwanda","Africa",1992,23.599,7290203,737.0685949 +"1294","Rwanda","Africa",1997,36.087,7212583,589.9445051 +"1295","Rwanda","Africa",2002,43.413,7852401,785.6537648 +"1296","Rwanda","Africa",2007,46.242,8860588,863.0884639 +"1297","Sao Tome and Principe","Africa",1952,46.471,60011,879.5835855 +"1298","Sao Tome and Principe","Africa",1957,48.945,61325,860.7369026 +"1299","Sao Tome and Principe","Africa",1962,51.893,65345,1071.551119 +"1300","Sao Tome and Principe","Africa",1967,54.425,70787,1384.840593 +"1301","Sao Tome and Principe","Africa",1972,56.48,76595,1532.985254 +"1302","Sao Tome and Principe","Africa",1977,58.55,86796,1737.561657 +"1303","Sao Tome and Principe","Africa",1982,60.351,98593,1890.218117 +"1304","Sao Tome and Principe","Africa",1987,61.728,110812,1516.525457 +"1305","Sao Tome and Principe","Africa",1992,62.742,125911,1428.777814 +"1306","Sao Tome and Principe","Africa",1997,63.306,145608,1339.076036 +"1307","Sao Tome and Principe","Africa",2002,64.337,170372,1353.09239 +"1308","Sao Tome and Principe","Africa",2007,65.528,199579,1598.435089 +"1309","Saudi Arabia","Asia",1952,39.875,4005677,6459.554823 +"1310","Saudi Arabia","Asia",1957,42.868,4419650,8157.591248 +"1311","Saudi Arabia","Asia",1962,45.914,4943029,11626.41975 +"1312","Saudi Arabia","Asia",1967,49.901,5618198,16903.04886 +"1313","Saudi Arabia","Asia",1972,53.886,6472756,24837.42865 +"1314","Saudi Arabia","Asia",1977,58.69,8128505,34167.7626 +"1315","Saudi Arabia","Asia",1982,63.012,11254672,33693.17525 +"1316","Saudi Arabia","Asia",1987,66.295,14619745,21198.26136 +"1317","Saudi Arabia","Asia",1992,68.768,16945857,24841.61777 +"1318","Saudi Arabia","Asia",1997,70.533,21229759,20586.69019 +"1319","Saudi Arabia","Asia",2002,71.626,24501530,19014.54118 +"1320","Saudi Arabia","Asia",2007,72.777,27601038,21654.83194 +"1321","Senegal","Africa",1952,37.278,2755589,1450.356983 +"1322","Senegal","Africa",1957,39.329,3054547,1567.653006 +"1323","Senegal","Africa",1962,41.454,3430243,1654.988723 +"1324","Senegal","Africa",1967,43.563,3965841,1612.404632 +"1325","Senegal","Africa",1972,45.815,4588696,1597.712056 +"1326","Senegal","Africa",1977,48.879,5260855,1561.769116 +"1327","Senegal","Africa",1982,52.379,6147783,1518.479984 +"1328","Senegal","Africa",1987,55.769,7171347,1441.72072 +"1329","Senegal","Africa",1992,58.196,8307920,1367.899369 +"1330","Senegal","Africa",1997,60.187,9535314,1392.368347 +"1331","Senegal","Africa",2002,61.6,10870037,1519.635262 +"1332","Senegal","Africa",2007,63.062,12267493,1712.472136 +"1333","Serbia","Europe",1952,57.996,6860147,3581.459448 +"1334","Serbia","Europe",1957,61.685,7271135,4981.090891 +"1335","Serbia","Europe",1962,64.531,7616060,6289.629157 +"1336","Serbia","Europe",1967,66.914,7971222,7991.707066 +"1337","Serbia","Europe",1972,68.7,8313288,10522.06749 +"1338","Serbia","Europe",1977,70.3,8686367,12980.66956 +"1339","Serbia","Europe",1982,70.162,9032824,15181.0927 +"1340","Serbia","Europe",1987,71.218,9230783,15870.87851 +"1341","Serbia","Europe",1992,71.659,9826397,9325.068238 +"1342","Serbia","Europe",1997,72.232,10336594,7914.320304 +"1343","Serbia","Europe",2002,73.213,10111559,7236.075251 +"1344","Serbia","Europe",2007,74.002,10150265,9786.534714 +"1345","Sierra Leone","Africa",1952,30.331,2143249,879.7877358 +"1346","Sierra Leone","Africa",1957,31.57,2295678,1004.484437 +"1347","Sierra Leone","Africa",1962,32.767,2467895,1116.639877 +"1348","Sierra Leone","Africa",1967,34.113,2662190,1206.043465 +"1349","Sierra Leone","Africa",1972,35.4,2879013,1353.759762 +"1350","Sierra Leone","Africa",1977,36.788,3140897,1348.285159 +"1351","Sierra Leone","Africa",1982,38.445,3464522,1465.010784 +"1352","Sierra Leone","Africa",1987,40.006,3868905,1294.447788 +"1353","Sierra Leone","Africa",1992,38.333,4260884,1068.696278 +"1354","Sierra Leone","Africa",1997,39.897,4578212,574.6481576 +"1355","Sierra Leone","Africa",2002,41.012,5359092,699.489713 +"1356","Sierra Leone","Africa",2007,42.568,6144562,862.5407561 +"1357","Singapore","Asia",1952,60.396,1127000,2315.138227 +"1358","Singapore","Asia",1957,63.179,1445929,2843.104409 +"1359","Singapore","Asia",1962,65.798,1750200,3674.735572 +"1360","Singapore","Asia",1967,67.946,1977600,4977.41854 +"1361","Singapore","Asia",1972,69.521,2152400,8597.756202 +"1362","Singapore","Asia",1977,70.795,2325300,11210.08948 +"1363","Singapore","Asia",1982,71.76,2651869,15169.16112 +"1364","Singapore","Asia",1987,73.56,2794552,18861.53081 +"1365","Singapore","Asia",1992,75.788,3235865,24769.8912 +"1366","Singapore","Asia",1997,77.158,3802309,33519.4766 +"1367","Singapore","Asia",2002,78.77,4197776,36023.1054 +"1368","Singapore","Asia",2007,79.972,4553009,47143.17964 +"1369","Slovak Republic","Europe",1952,64.36,3558137,5074.659104 +"1370","Slovak Republic","Europe",1957,67.45,3844277,6093.26298 +"1371","Slovak Republic","Europe",1962,70.33,4237384,7481.107598 +"1372","Slovak Republic","Europe",1967,70.98,4442238,8412.902397 +"1373","Slovak Republic","Europe",1972,70.35,4593433,9674.167626 +"1374","Slovak Republic","Europe",1977,70.45,4827803,10922.66404 +"1375","Slovak Republic","Europe",1982,70.8,5048043,11348.54585 +"1376","Slovak Republic","Europe",1987,71.08,5199318,12037.26758 +"1377","Slovak Republic","Europe",1992,71.38,5302888,9498.467723 +"1378","Slovak Republic","Europe",1997,72.71,5383010,12126.23065 +"1379","Slovak Republic","Europe",2002,73.8,5410052,13638.77837 +"1380","Slovak Republic","Europe",2007,74.663,5447502,18678.31435 +"1381","Slovenia","Europe",1952,65.57,1489518,4215.041741 +"1382","Slovenia","Europe",1957,67.85,1533070,5862.276629 +"1383","Slovenia","Europe",1962,69.15,1582962,7402.303395 +"1384","Slovenia","Europe",1967,69.18,1646912,9405.489397 +"1385","Slovenia","Europe",1972,69.82,1694510,12383.4862 +"1386","Slovenia","Europe",1977,70.97,1746919,15277.03017 +"1387","Slovenia","Europe",1982,71.063,1861252,17866.72175 +"1388","Slovenia","Europe",1987,72.25,1945870,18678.53492 +"1389","Slovenia","Europe",1992,73.64,1999210,14214.71681 +"1390","Slovenia","Europe",1997,75.13,2011612,17161.10735 +"1391","Slovenia","Europe",2002,76.66,2011497,20660.01936 +"1392","Slovenia","Europe",2007,77.926,2009245,25768.25759 +"1393","Somalia","Africa",1952,32.978,2526994,1135.749842 +"1394","Somalia","Africa",1957,34.977,2780415,1258.147413 +"1395","Somalia","Africa",1962,36.981,3080153,1369.488336 +"1396","Somalia","Africa",1967,38.977,3428839,1284.73318 +"1397","Somalia","Africa",1972,40.973,3840161,1254.576127 +"1398","Somalia","Africa",1977,41.974,4353666,1450.992513 +"1399","Somalia","Africa",1982,42.955,5828892,1176.807031 +"1400","Somalia","Africa",1987,44.501,6921858,1093.244963 +"1401","Somalia","Africa",1992,39.658,6099799,926.9602964 +"1402","Somalia","Africa",1997,43.795,6633514,930.5964284 +"1403","Somalia","Africa",2002,45.936,7753310,882.0818218 +"1404","Somalia","Africa",2007,48.159,9118773,926.1410683 +"1405","South Africa","Africa",1952,45.009,14264935,4725.295531 +"1406","South Africa","Africa",1957,47.985,16151549,5487.104219 +"1407","South Africa","Africa",1962,49.951,18356657,5768.729717 +"1408","South Africa","Africa",1967,51.927,20997321,7114.477971 +"1409","South Africa","Africa",1972,53.696,23935810,7765.962636 +"1410","South Africa","Africa",1977,55.527,27129932,8028.651439 +"1411","South Africa","Africa",1982,58.161,31140029,8568.266228 +"1412","South Africa","Africa",1987,60.834,35933379,7825.823398 +"1413","South Africa","Africa",1992,61.888,39964159,7225.069258 +"1414","South Africa","Africa",1997,60.236,42835005,7479.188244 +"1415","South Africa","Africa",2002,53.365,44433622,7710.946444 +"1416","South Africa","Africa",2007,49.339,43997828,9269.657808 +"1417","Spain","Europe",1952,64.94,28549870,3834.034742 +"1418","Spain","Europe",1957,66.66,29841614,4564.80241 +"1419","Spain","Europe",1962,69.69,31158061,5693.843879 +"1420","Spain","Europe",1967,71.44,32850275,7993.512294 +"1421","Spain","Europe",1972,73.06,34513161,10638.75131 +"1422","Spain","Europe",1977,74.39,36439000,13236.92117 +"1423","Spain","Europe",1982,76.3,37983310,13926.16997 +"1424","Spain","Europe",1987,76.9,38880702,15764.98313 +"1425","Spain","Europe",1992,77.57,39549438,18603.06452 +"1426","Spain","Europe",1997,78.77,39855442,20445.29896 +"1427","Spain","Europe",2002,79.78,40152517,24835.47166 +"1428","Spain","Europe",2007,80.941,40448191,28821.0637 +"1429","Sri Lanka","Asia",1952,57.593,7982342,1083.53203 +"1430","Sri Lanka","Asia",1957,61.456,9128546,1072.546602 +"1431","Sri Lanka","Asia",1962,62.192,10421936,1074.47196 +"1432","Sri Lanka","Asia",1967,64.266,11737396,1135.514326 +"1433","Sri Lanka","Asia",1972,65.042,13016733,1213.39553 +"1434","Sri Lanka","Asia",1977,65.949,14116836,1348.775651 +"1435","Sri Lanka","Asia",1982,68.757,15410151,1648.079789 +"1436","Sri Lanka","Asia",1987,69.011,16495304,1876.766827 +"1437","Sri Lanka","Asia",1992,70.379,17587060,2153.739222 +"1438","Sri Lanka","Asia",1997,70.457,18698655,2664.477257 +"1439","Sri Lanka","Asia",2002,70.815,19576783,3015.378833 +"1440","Sri Lanka","Asia",2007,72.396,20378239,3970.095407 +"1441","Sudan","Africa",1952,38.635,8504667,1615.991129 +"1442","Sudan","Africa",1957,39.624,9753392,1770.337074 +"1443","Sudan","Africa",1962,40.87,11183227,1959.593767 +"1444","Sudan","Africa",1967,42.858,12716129,1687.997641 +"1445","Sudan","Africa",1972,45.083,14597019,1659.652775 +"1446","Sudan","Africa",1977,47.8,17104986,2202.988423 +"1447","Sudan","Africa",1982,50.338,20367053,1895.544073 +"1448","Sudan","Africa",1987,51.744,24725960,1507.819159 +"1449","Sudan","Africa",1992,53.556,28227588,1492.197043 +"1450","Sudan","Africa",1997,55.373,32160729,1632.210764 +"1451","Sudan","Africa",2002,56.369,37090298,1993.398314 +"1452","Sudan","Africa",2007,58.556,42292929,2602.394995 +"1453","Swaziland","Africa",1952,41.407,290243,1148.376626 +"1454","Swaziland","Africa",1957,43.424,326741,1244.708364 +"1455","Swaziland","Africa",1962,44.992,370006,1856.182125 +"1456","Swaziland","Africa",1967,46.633,420690,2613.101665 +"1457","Swaziland","Africa",1972,49.552,480105,3364.836625 +"1458","Swaziland","Africa",1977,52.537,551425,3781.410618 +"1459","Swaziland","Africa",1982,55.561,649901,3895.384018 +"1460","Swaziland","Africa",1987,57.678,779348,3984.839812 +"1461","Swaziland","Africa",1992,58.474,962344,3553.0224 +"1462","Swaziland","Africa",1997,54.289,1054486,3876.76846 +"1463","Swaziland","Africa",2002,43.869,1130269,4128.116943 +"1464","Swaziland","Africa",2007,39.613,1133066,4513.480643 +"1465","Sweden","Europe",1952,71.86,7124673,8527.844662 +"1466","Sweden","Europe",1957,72.49,7363802,9911.878226 +"1467","Sweden","Europe",1962,73.37,7561588,12329.44192 +"1468","Sweden","Europe",1967,74.16,7867931,15258.29697 +"1469","Sweden","Europe",1972,74.72,8122293,17832.02464 +"1470","Sweden","Europe",1977,75.44,8251648,18855.72521 +"1471","Sweden","Europe",1982,76.42,8325260,20667.38125 +"1472","Sweden","Europe",1987,77.19,8421403,23586.92927 +"1473","Sweden","Europe",1992,78.16,8718867,23880.01683 +"1474","Sweden","Europe",1997,79.39,8897619,25266.59499 +"1475","Sweden","Europe",2002,80.04,8954175,29341.63093 +"1476","Sweden","Europe",2007,80.884,9031088,33859.74835 +"1477","Switzerland","Europe",1952,69.62,4815000,14734.23275 +"1478","Switzerland","Europe",1957,70.56,5126000,17909.48973 +"1479","Switzerland","Europe",1962,71.32,5666000,20431.0927 +"1480","Switzerland","Europe",1967,72.77,6063000,22966.14432 +"1481","Switzerland","Europe",1972,73.78,6401400,27195.11304 +"1482","Switzerland","Europe",1977,75.39,6316424,26982.29052 +"1483","Switzerland","Europe",1982,76.21,6468126,28397.71512 +"1484","Switzerland","Europe",1987,77.41,6649942,30281.70459 +"1485","Switzerland","Europe",1992,78.03,6995447,31871.5303 +"1486","Switzerland","Europe",1997,79.37,7193761,32135.32301 +"1487","Switzerland","Europe",2002,80.62,7361757,34480.95771 +"1488","Switzerland","Europe",2007,81.701,7554661,37506.41907 +"1489","Syria","Asia",1952,45.883,3661549,1643.485354 +"1490","Syria","Asia",1957,48.284,4149908,2117.234893 +"1491","Syria","Asia",1962,50.305,4834621,2193.037133 +"1492","Syria","Asia",1967,53.655,5680812,1881.923632 +"1493","Syria","Asia",1972,57.296,6701172,2571.423014 +"1494","Syria","Asia",1977,61.195,7932503,3195.484582 +"1495","Syria","Asia",1982,64.59,9410494,3761.837715 +"1496","Syria","Asia",1987,66.974,11242847,3116.774285 +"1497","Syria","Asia",1992,69.249,13219062,3340.542768 +"1498","Syria","Asia",1997,71.527,15081016,4014.238972 +"1499","Syria","Asia",2002,73.053,17155814,4090.925331 +"1500","Syria","Asia",2007,74.143,19314747,4184.548089 +"1501","Taiwan","Asia",1952,58.5,8550362,1206.947913 +"1502","Taiwan","Asia",1957,62.4,10164215,1507.86129 +"1503","Taiwan","Asia",1962,65.2,11918938,1822.879028 +"1504","Taiwan","Asia",1967,67.5,13648692,2643.858681 +"1505","Taiwan","Asia",1972,69.39,15226039,4062.523897 +"1506","Taiwan","Asia",1977,70.59,16785196,5596.519826 +"1507","Taiwan","Asia",1982,72.16,18501390,7426.354774 +"1508","Taiwan","Asia",1987,73.4,19757799,11054.56175 +"1509","Taiwan","Asia",1992,74.26,20686918,15215.6579 +"1510","Taiwan","Asia",1997,75.25,21628605,20206.82098 +"1511","Taiwan","Asia",2002,76.99,22454239,23235.42329 +"1512","Taiwan","Asia",2007,78.4,23174294,28718.27684 +"1513","Tanzania","Africa",1952,41.215,8322925,716.6500721 +"1514","Tanzania","Africa",1957,42.974,9452826,698.5356073 +"1515","Tanzania","Africa",1962,44.246,10863958,722.0038073 +"1516","Tanzania","Africa",1967,45.757,12607312,848.2186575 +"1517","Tanzania","Africa",1972,47.62,14706593,915.9850592 +"1518","Tanzania","Africa",1977,49.919,17129565,962.4922932 +"1519","Tanzania","Africa",1982,50.608,19844382,874.2426069 +"1520","Tanzania","Africa",1987,51.535,23040630,831.8220794 +"1521","Tanzania","Africa",1992,50.44,26605473,825.682454 +"1522","Tanzania","Africa",1997,48.466,30686889,789.1862231 +"1523","Tanzania","Africa",2002,49.651,34593779,899.0742111 +"1524","Tanzania","Africa",2007,52.517,38139640,1107.482182 +"1525","Thailand","Asia",1952,50.848,21289402,757.7974177 +"1526","Thailand","Asia",1957,53.63,25041917,793.5774148 +"1527","Thailand","Asia",1962,56.061,29263397,1002.199172 +"1528","Thailand","Asia",1967,58.285,34024249,1295.46066 +"1529","Thailand","Asia",1972,60.405,39276153,1524.358936 +"1530","Thailand","Asia",1977,62.494,44148285,1961.224635 +"1531","Thailand","Asia",1982,64.597,48827160,2393.219781 +"1532","Thailand","Asia",1987,66.084,52910342,2982.653773 +"1533","Thailand","Asia",1992,67.298,56667095,4616.896545 +"1534","Thailand","Asia",1997,67.521,60216677,5852.625497 +"1535","Thailand","Asia",2002,68.564,62806748,5913.187529 +"1536","Thailand","Asia",2007,70.616,65068149,7458.396327 +"1537","Togo","Africa",1952,38.596,1219113,859.8086567 +"1538","Togo","Africa",1957,41.208,1357445,925.9083202 +"1539","Togo","Africa",1962,43.922,1528098,1067.53481 +"1540","Togo","Africa",1967,46.769,1735550,1477.59676 +"1541","Togo","Africa",1972,49.759,2056351,1649.660188 +"1542","Togo","Africa",1977,52.887,2308582,1532.776998 +"1543","Togo","Africa",1982,55.471,2644765,1344.577953 +"1544","Togo","Africa",1987,56.941,3154264,1202.201361 +"1545","Togo","Africa",1992,58.061,3747553,1034.298904 +"1546","Togo","Africa",1997,58.39,4320890,982.2869243 +"1547","Togo","Africa",2002,57.561,4977378,886.2205765 +"1548","Togo","Africa",2007,58.42,5701579,882.9699438 +"1549","Trinidad and Tobago","Americas",1952,59.1,662850,3023.271928 +"1550","Trinidad and Tobago","Americas",1957,61.8,764900,4100.3934 +"1551","Trinidad and Tobago","Americas",1962,64.9,887498,4997.523971 +"1552","Trinidad and Tobago","Americas",1967,65.4,960155,5621.368472 +"1553","Trinidad and Tobago","Americas",1972,65.9,975199,6619.551419 +"1554","Trinidad and Tobago","Americas",1977,68.3,1039009,7899.554209 +"1555","Trinidad and Tobago","Americas",1982,68.832,1116479,9119.528607 +"1556","Trinidad and Tobago","Americas",1987,69.582,1191336,7388.597823 +"1557","Trinidad and Tobago","Americas",1992,69.862,1183669,7370.990932 +"1558","Trinidad and Tobago","Americas",1997,69.465,1138101,8792.573126 +"1559","Trinidad and Tobago","Americas",2002,68.976,1101832,11460.60023 +"1560","Trinidad and Tobago","Americas",2007,69.819,1056608,18008.50924 +"1561","Tunisia","Africa",1952,44.6,3647735,1468.475631 +"1562","Tunisia","Africa",1957,47.1,3950849,1395.232468 +"1563","Tunisia","Africa",1962,49.579,4286552,1660.30321 +"1564","Tunisia","Africa",1967,52.053,4786986,1932.360167 +"1565","Tunisia","Africa",1972,55.602,5303507,2753.285994 +"1566","Tunisia","Africa",1977,59.837,6005061,3120.876811 +"1567","Tunisia","Africa",1982,64.048,6734098,3560.233174 +"1568","Tunisia","Africa",1987,66.894,7724976,3810.419296 +"1569","Tunisia","Africa",1992,70.001,8523077,4332.720164 +"1570","Tunisia","Africa",1997,71.973,9231669,4876.798614 +"1571","Tunisia","Africa",2002,73.042,9770575,5722.895655 +"1572","Tunisia","Africa",2007,73.923,10276158,7092.923025 +"1573","Turkey","Europe",1952,43.585,22235677,1969.10098 +"1574","Turkey","Europe",1957,48.079,25670939,2218.754257 +"1575","Turkey","Europe",1962,52.098,29788695,2322.869908 +"1576","Turkey","Europe",1967,54.336,33411317,2826.356387 +"1577","Turkey","Europe",1972,57.005,37492953,3450.69638 +"1578","Turkey","Europe",1977,59.507,42404033,4269.122326 +"1579","Turkey","Europe",1982,61.036,47328791,4241.356344 +"1580","Turkey","Europe",1987,63.108,52881328,5089.043686 +"1581","Turkey","Europe",1992,66.146,58179144,5678.348271 +"1582","Turkey","Europe",1997,68.835,63047647,6601.429915 +"1583","Turkey","Europe",2002,70.845,67308928,6508.085718 +"1584","Turkey","Europe",2007,71.777,71158647,8458.276384 +"1585","Uganda","Africa",1952,39.978,5824797,734.753484 +"1586","Uganda","Africa",1957,42.571,6675501,774.3710692 +"1587","Uganda","Africa",1962,45.344,7688797,767.2717398 +"1588","Uganda","Africa",1967,48.051,8900294,908.9185217 +"1589","Uganda","Africa",1972,51.016,10190285,950.735869 +"1590","Uganda","Africa",1977,50.35,11457758,843.7331372 +"1591","Uganda","Africa",1982,49.849,12939400,682.2662268 +"1592","Uganda","Africa",1987,51.509,15283050,617.7244065 +"1593","Uganda","Africa",1992,48.825,18252190,644.1707969 +"1594","Uganda","Africa",1997,44.578,21210254,816.559081 +"1595","Uganda","Africa",2002,47.813,24739869,927.7210018 +"1596","Uganda","Africa",2007,51.542,29170398,1056.380121 +"1597","United Kingdom","Europe",1952,69.18,50430000,9979.508487 +"1598","United Kingdom","Europe",1957,70.42,51430000,11283.17795 +"1599","United Kingdom","Europe",1962,70.76,53292000,12477.17707 +"1600","United Kingdom","Europe",1967,71.36,54959000,14142.85089 +"1601","United Kingdom","Europe",1972,72.01,56079000,15895.11641 +"1602","United Kingdom","Europe",1977,72.76,56179000,17428.74846 +"1603","United Kingdom","Europe",1982,74.04,56339704,18232.42452 +"1604","United Kingdom","Europe",1987,75.007,56981620,21664.78767 +"1605","United Kingdom","Europe",1992,76.42,57866349,22705.09254 +"1606","United Kingdom","Europe",1997,77.218,58808266,26074.53136 +"1607","United Kingdom","Europe",2002,78.471,59912431,29478.99919 +"1608","United Kingdom","Europe",2007,79.425,60776238,33203.26128 +"1609","United States","Americas",1952,68.44,157553000,13990.48208 +"1610","United States","Americas",1957,69.49,171984000,14847.12712 +"1611","United States","Americas",1962,70.21,186538000,16173.14586 +"1612","United States","Americas",1967,70.76,198712000,19530.36557 +"1613","United States","Americas",1972,71.34,209896000,21806.03594 +"1614","United States","Americas",1977,73.38,220239000,24072.63213 +"1615","United States","Americas",1982,74.65,232187835,25009.55914 +"1616","United States","Americas",1987,75.02,242803533,29884.35041 +"1617","United States","Americas",1992,76.09,256894189,32003.93224 +"1618","United States","Americas",1997,76.81,272911760,35767.43303 +"1619","United States","Americas",2002,77.31,287675526,39097.09955 +"1620","United States","Americas",2007,78.242,301139947,42951.65309 +"1621","Uruguay","Americas",1952,66.071,2252965,5716.766744 +"1622","Uruguay","Americas",1957,67.044,2424959,6150.772969 +"1623","Uruguay","Americas",1962,68.253,2598466,5603.357717 +"1624","Uruguay","Americas",1967,68.468,2748579,5444.61962 +"1625","Uruguay","Americas",1972,68.673,2829526,5703.408898 +"1626","Uruguay","Americas",1977,69.481,2873520,6504.339663 +"1627","Uruguay","Americas",1982,70.805,2953997,6920.223051 +"1628","Uruguay","Americas",1987,71.918,3045153,7452.398969 +"1629","Uruguay","Americas",1992,72.752,3149262,8137.004775 +"1630","Uruguay","Americas",1997,74.223,3262838,9230.240708 +"1631","Uruguay","Americas",2002,75.307,3363085,7727.002004 +"1632","Uruguay","Americas",2007,76.384,3447496,10611.46299 +"1633","Venezuela","Americas",1952,55.088,5439568,7689.799761 +"1634","Venezuela","Americas",1957,57.907,6702668,9802.466526 +"1635","Venezuela","Americas",1962,60.77,8143375,8422.974165 +"1636","Venezuela","Americas",1967,63.479,9709552,9541.474188 +"1637","Venezuela","Americas",1972,65.712,11515649,10505.25966 +"1638","Venezuela","Americas",1977,67.456,13503563,13143.95095 +"1639","Venezuela","Americas",1982,68.557,15620766,11152.41011 +"1640","Venezuela","Americas",1987,70.19,17910182,9883.584648 +"1641","Venezuela","Americas",1992,71.15,20265563,10733.92631 +"1642","Venezuela","Americas",1997,72.146,22374398,10165.49518 +"1643","Venezuela","Americas",2002,72.766,24287670,8605.047831 +"1644","Venezuela","Americas",2007,73.747,26084662,11415.80569 +"1645","Vietnam","Asia",1952,40.412,26246839,605.0664917 +"1646","Vietnam","Asia",1957,42.887,28998543,676.2854478 +"1647","Vietnam","Asia",1962,45.363,33796140,772.0491602 +"1648","Vietnam","Asia",1967,47.838,39463910,637.1232887 +"1649","Vietnam","Asia",1972,50.254,44655014,699.5016441 +"1650","Vietnam","Asia",1977,55.764,50533506,713.5371196 +"1651","Vietnam","Asia",1982,58.816,56142181,707.2357863 +"1652","Vietnam","Asia",1987,62.82,62826491,820.7994449 +"1653","Vietnam","Asia",1992,67.662,69940728,989.0231487 +"1654","Vietnam","Asia",1997,70.672,76048996,1385.896769 +"1655","Vietnam","Asia",2002,73.017,80908147,1764.456677 +"1656","Vietnam","Asia",2007,74.249,85262356,2441.576404 +"1657","West Bank and Gaza","Asia",1952,43.16,1030585,1515.592329 +"1658","West Bank and Gaza","Asia",1957,45.671,1070439,1827.067742 +"1659","West Bank and Gaza","Asia",1962,48.127,1133134,2198.956312 +"1660","West Bank and Gaza","Asia",1967,51.631,1142636,2649.715007 +"1661","West Bank and Gaza","Asia",1972,56.532,1089572,3133.409277 +"1662","West Bank and Gaza","Asia",1977,60.765,1261091,3682.831494 +"1663","West Bank and Gaza","Asia",1982,64.406,1425876,4336.032082 +"1664","West Bank and Gaza","Asia",1987,67.046,1691210,5107.197384 +"1665","West Bank and Gaza","Asia",1992,69.718,2104779,6017.654756 +"1666","West Bank and Gaza","Asia",1997,71.096,2826046,7110.667619 +"1667","West Bank and Gaza","Asia",2002,72.37,3389578,4515.487575 +"1668","West Bank and Gaza","Asia",2007,73.422,4018332,3025.349798 +"1669","Yemen, Rep.","Asia",1952,32.548,4963829,781.7175761 +"1670","Yemen, Rep.","Asia",1957,33.97,5498090,804.8304547 +"1671","Yemen, Rep.","Asia",1962,35.18,6120081,825.6232006 +"1672","Yemen, Rep.","Asia",1967,36.984,6740785,862.4421463 +"1673","Yemen, Rep.","Asia",1972,39.848,7407075,1265.047031 +"1674","Yemen, Rep.","Asia",1977,44.175,8403990,1829.765177 +"1675","Yemen, Rep.","Asia",1982,49.113,9657618,1977.55701 +"1676","Yemen, Rep.","Asia",1987,52.922,11219340,1971.741538 +"1677","Yemen, Rep.","Asia",1992,55.599,13367997,1879.496673 +"1678","Yemen, Rep.","Asia",1997,58.02,15826497,2117.484526 +"1679","Yemen, Rep.","Asia",2002,60.308,18701257,2234.820827 +"1680","Yemen, Rep.","Asia",2007,62.698,22211743,2280.769906 +"1681","Zambia","Africa",1952,42.038,2672000,1147.388831 +"1682","Zambia","Africa",1957,44.077,3016000,1311.956766 +"1683","Zambia","Africa",1962,46.023,3421000,1452.725766 +"1684","Zambia","Africa",1967,47.768,3900000,1777.077318 +"1685","Zambia","Africa",1972,50.107,4506497,1773.498265 +"1686","Zambia","Africa",1977,51.386,5216550,1588.688299 +"1687","Zambia","Africa",1982,51.821,6100407,1408.678565 +"1688","Zambia","Africa",1987,50.821,7272406,1213.315116 +"1689","Zambia","Africa",1992,46.1,8381163,1210.884633 +"1690","Zambia","Africa",1997,40.238,9417789,1071.353818 +"1691","Zambia","Africa",2002,39.193,10595811,1071.613938 +"1692","Zambia","Africa",2007,42.384,11746035,1271.211593 +"1693","Zimbabwe","Africa",1952,48.451,3080907,406.8841148 +"1694","Zimbabwe","Africa",1957,50.469,3646340,518.7642681 +"1695","Zimbabwe","Africa",1962,52.358,4277736,527.2721818 +"1696","Zimbabwe","Africa",1967,53.995,4995432,569.7950712 +"1697","Zimbabwe","Africa",1972,55.635,5861135,799.3621758 +"1698","Zimbabwe","Africa",1977,57.674,6642107,685.5876821 +"1699","Zimbabwe","Africa",1982,60.363,7636524,788.8550411 +"1700","Zimbabwe","Africa",1987,62.351,9216418,706.1573059 +"1701","Zimbabwe","Africa",1992,60.377,10704340,693.4207856 +"1702","Zimbabwe","Africa",1997,46.809,11404948,792.4499603 +"1703","Zimbabwe","Africa",2002,39.989,11926563,672.0386227 +"1704","Zimbabwe","Africa",2007,43.487,12311143,469.7092981 diff --git a/python_package/flourishcharts/datasets/__init__.py b/python_package/flourishcharts/datasets/__init__.py new file mode 100644 index 0000000..1216372 --- /dev/null +++ b/python_package/flourishcharts/datasets/__init__.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python +# coding: utf-8 + +# Copyright (c) Zoe Meers. +# Distributed under the terms of the MIT License. + +from .gapminder import gapminder diff --git a/python_package/flourishcharts/datasets/gapminder.py b/python_package/flourishcharts/datasets/gapminder.py new file mode 100644 index 0000000..5c508f6 --- /dev/null +++ b/python_package/flourishcharts/datasets/gapminder.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python +# coding: utf-8 + +# Copyright (c) Zoe Meers. +# Distributed under the terms of the MIT License. + +import os +import pandas as pd + +location = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) +# read dataset +gapminder = pd.read_csv(os.path.join(location, "data", "gapminder.csv")) diff --git a/python_package/flourishcharts/details.py b/python_package/flourishcharts/details.py new file mode 100644 index 0000000..ab2e769 --- /dev/null +++ b/python_package/flourishcharts/details.py @@ -0,0 +1,123388 @@ +from typing import List, Union +from ._utils import clean_null_terms, deep_merge, details_error + + +class DetailsMixin: + def set_audio_details( + self, + audio_player_button_color: str = None, + audio_player_button_icon_color: str = None, + audio_player_button_size: float = None, + audio_player_button_roundness: float = None, + audio_player_progress_color: str = None, + audio_player_progress_bg_color: str = None, + audio_player_progress_height: float = None, + audio_player_progress_width: float = None, + audio_player_width: float = None, + audio_player_margin_top_bottom: float = None, + audio_player_show_text_styling: bool = None, + audio_player_title_size: float = None, + audio_player_title_color: str = None, + audio_player_title_weight: str = None, + audio_player_subtitle_size: float = None, + audio_player_subtitle_color: str = None, + audio_player_subtitle_weight: str = None, + audio_player_time_size: float = None, + audio_player_time_color: str = None, + audio_player_time_weight: str = None, + audio_player_link_color: str = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: audio. + + + :param audio_player_button_color: Background. Flourish type hint: color, defaults to None. + :type audio_player_button_color: str, optional + :param audio_player_button_icon_color: Icons. Flourish type hint: color, defaults to None. + :type audio_player_button_icon_color: str, optional + :param audio_player_button_size: Size. In rems, a multiple of base font size. Flourish type hint: number, defaults to None. + :type audio_player_button_size: float, optional + :param audio_player_button_roundness: Roundness. Flourish type hint: number, defaults to None. + :type audio_player_button_roundness: float, optional + :param audio_player_progress_color: Color. Flourish type hint: color, defaults to None. + :type audio_player_progress_color: str, optional + :param audio_player_progress_bg_color: Background. Flourish type hint: color, defaults to None. + :type audio_player_progress_bg_color: str, optional + :param audio_player_progress_height: Height. In rems, a multiple of base font size. Flourish type hint: number, defaults to None. + :type audio_player_progress_height: float, optional + :param audio_player_progress_width: Width (%). Flourish type hint: number, defaults to None. + :type audio_player_progress_width: float, optional + :param audio_player_width: Width. In rems, a multiple of base font size. Leave blank to fill the available space. Flourish type hint: number, defaults to None. + :type audio_player_width: float, optional + :param audio_player_margin_top_bottom: Space. Spacing above and below the player. In rems, a multiple of base font size. Flourish type hint: number, defaults to None. + :type audio_player_margin_top_bottom: float, optional + :param audio_player_show_text_styling: Show text styles. Flourish type hint: boolean, defaults to None. + :type audio_player_show_text_styling: bool, optional + :param audio_player_title_size: Size. Flourish type hint: number, defaults to None. + :type audio_player_title_size: float, optional + :param audio_player_title_color: Color. Flourish type hint: color, defaults to None. + :type audio_player_title_color: str, optional + :param audio_player_title_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type audio_player_title_weight: str, optional + :param audio_player_subtitle_size: Size. Flourish type hint: number, defaults to None. + :type audio_player_subtitle_size: float, optional + :param audio_player_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type audio_player_subtitle_color: str, optional + :param audio_player_subtitle_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type audio_player_subtitle_weight: str, optional + :param audio_player_time_size: Size. Flourish type hint: number, defaults to None. + :type audio_player_time_size: float, optional + :param audio_player_time_color: Color. Flourish type hint: color, defaults to None. + :type audio_player_time_color: str, optional + :param audio_player_time_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type audio_player_time_weight: str, optional + :param audio_player_link_color: Color. Where links are present (added by wrapping text in <a> tags in the datasheet) this setting changes their text color. Flourish type hint: color, defaults to None. + :type audio_player_link_color: str, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "audio_player": {}, + "filter_control": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + self.state["state"]["audio_player"]["button_color"] = audio_player_button_color + self.state["state"]["audio_player"][ + "button_icon_color" + ] = audio_player_button_icon_color + self.state["state"]["audio_player"]["button_size"] = audio_player_button_size + self.state["state"]["audio_player"][ + "button_roundness" + ] = audio_player_button_roundness + self.state["state"]["audio_player"][ + "progress_color" + ] = audio_player_progress_color + self.state["state"]["audio_player"][ + "progress_bg_color" + ] = audio_player_progress_bg_color + self.state["state"]["audio_player"][ + "progress_height" + ] = audio_player_progress_height + self.state["state"]["audio_player"][ + "progress_width" + ] = audio_player_progress_width + self.state["state"]["audio_player"]["width"] = audio_player_width + self.state["state"]["audio_player"][ + "margin_top_bottom" + ] = audio_player_margin_top_bottom + self.state["state"]["audio_player"][ + "show_text_styling" + ] = audio_player_show_text_styling + self.state["state"]["audio_player"]["title_size"] = audio_player_title_size + self.state["state"]["audio_player"]["title_color"] = audio_player_title_color + + list_audio_player_title_weight = ["normal", "bold"] + [None] + if audio_player_title_weight not in list_audio_player_title_weight: + raise ValueError( + f"`audio_player_title_weight` must be one of: ['normal', 'bold']" + ) + elif ( + audio_player_title_weight in list_audio_player_title_weight + and audio_player_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if audio_player_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["audio_player"]["title_weight"] = filtered_dict[ + audio_player_title_weight + ] + self.state["state"]["audio_player"][ + "subtitle_size" + ] = audio_player_subtitle_size + self.state["state"]["audio_player"][ + "subtitle_color" + ] = audio_player_subtitle_color + + list_audio_player_subtitle_weight = ["normal", "bold"] + [None] + if audio_player_subtitle_weight not in list_audio_player_subtitle_weight: + raise ValueError( + f"`audio_player_subtitle_weight` must be one of: ['normal', 'bold']" + ) + elif ( + audio_player_subtitle_weight in list_audio_player_subtitle_weight + and audio_player_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if audio_player_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["audio_player"]["subtitle_weight"] = filtered_dict[ + audio_player_subtitle_weight + ] + self.state["state"]["audio_player"]["time_size"] = audio_player_time_size + self.state["state"]["audio_player"]["time_color"] = audio_player_time_color + + list_audio_player_time_weight = ["normal", "bold"] + [None] + if audio_player_time_weight not in list_audio_player_time_weight: + raise ValueError( + f"`audio_player_time_weight` must be one of: ['normal', 'bold']" + ) + elif ( + audio_player_time_weight in list_audio_player_time_weight + and audio_player_time_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if audio_player_time_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["audio_player"]["time_weight"] = filtered_dict[ + audio_player_time_weight + ] + self.state["state"]["audio_player"]["link_color"] = audio_player_link_color + + list_chart_filter_controls_control_type = ["dropdown", "buttons"] + [None] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"dropdown": "dropdown", "buttons": "buttons"}.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["filter_control"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["filter_control"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["filter_control"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_filter_controls_dropdown_width_mode] + self.state["state"]["filter_control"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["filter_control"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["filter_control"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["filter_control"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["filter_control"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["filter_control"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_bar_chart_race_details( + self, + column_chart: bool = None, + number_of_bars: float = None, + bar_margin: float = None, + sort_enabled: bool = None, + sort_ascending: bool = None, + bars_advanced: bool = None, + height_mode: str = None, + bar_height: float = None, + bar_min_value: float = None, + bar_empty_spaces: bool = None, + color_mode: str = None, + color_single: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + color_single_overrides: Union[list, str] = None, + bar_opacity: float = None, + label_max_size: float = None, + label_mode: str = None, + label_color_in: str = None, + label_axis_width: float = None, + show_value: bool = None, + label_color_out: str = None, + padding_right: float = None, + image_height: float = None, + image_width: float = None, + image_margin_right: float = None, + image_scale: str = None, + image_circle: bool = None, + counter: bool = None, + counter_font_size: float = None, + counter_color: str = None, + counter_line_height: float = None, + totaliser: bool = None, + totaliser_font_size: float = None, + totaliser_color: str = None, + totaliser_label: str = None, + caption_background_color: str = None, + caption_border_color: str = None, + caption_opacity: float = None, + caption_padding: float = None, + caption_text_align: str = None, + caption_position: str = None, + caption_font_size: float = None, + caption_text_color: str = None, + caption_mode: str = None, + caption_image_width: float = None, + caption_image_position: str = None, + caption_space_between: float = None, + sort_control: bool = None, + sort_descending_text: str = None, + sort_ascending_text: str = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + text_legend: str = None, + text_legend_title: bool = None, + text_legend_subtitle: bool = None, + text_legend_caption: bool = None, + text_legend_bold: bool = None, + axis_text_color: str = None, + axis_font_size: float = None, + axis_color: str = None, + axis_gridline_dash: float = None, + scale_type: str = None, + scale_min: float = None, + scale_max: float = None, + annotations_enabled: bool = None, + annotations_content: Union[list, str] = None, + annotations_text_color: str = None, + annotations_text_size: float = None, + annotations_text_weight: str = None, + annotations_line_color: str = None, + annotations_line_opacity: float = None, + annotations_line_width: float = None, + annotations_line_dash: float = None, + annotations_align: str = None, + annotations_offset: str = None, + chart_timeline_controls_enabled: bool = None, + chart_timeline_controls_style: str = None, + chart_timeline_controls_graph: bool = None, + chart_timeline_controls_play_on_load: bool = None, + chart_timeline_controls_loop: bool = None, + chart_timeline_controls_duration: float = None, + chart_timeline_controls_duration_tween: float = None, + chart_timeline_controls_duration_wait_at_end: float = None, + chart_timeline_controls_axes_custom_enabled: bool = None, + chart_timeline_controls_color_axes: str = None, + chart_timeline_controls_axis_font_size: float = None, + chart_timeline_controls_date_format_display: str = None, + chart_timeline_controls_axis_nice_x: bool = None, + chart_timeline_controls_axis_nice_y: bool = None, + chart_timeline_controls_scrubber_snap: bool = None, + chart_timeline_controls_scrubber_snap_paused: bool = None, + chart_timeline_controls_layout_settings: bool = None, + chart_timeline_controls_margin_top: float = None, + chart_timeline_controls_margin_left: float = None, + chart_timeline_controls_margin_bottom: float = None, + chart_timeline_controls_margin_right: float = None, + chart_timeline_controls_playback_button_margin_right: float = None, + chart_timeline_controls_scrubber_height: float = None, + chart_timeline_controls_playback_button_margin_right_button: float = None, + chart_timeline_controls_graph_settings: bool = None, + chart_timeline_controls_color_background: str = None, + chart_timeline_controls_graph_height: float = None, + chart_timeline_controls_curve: bool = None, + chart_timeline_controls_playback_styling: bool = None, + chart_timeline_controls_playback_button_button_color: str = None, + chart_timeline_controls_playback_button_button_size: float = None, + chart_timeline_controls_playback_button_icon_color: str = None, + chart_timeline_controls_playback_button_icon_size: float = None, + chart_timeline_controls_playback_button_label_size: float = None, + animation_duration: float = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + blank_cells: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: bar chart race. + + + :param column_chart: Chart style. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type column_chart: bool, optional + :param number_of_bars: No. bars. Flourish type hint: number, defaults to None. + :type number_of_bars: float, optional + :param bar_margin: Spacing (Percentage). Spacing as a percentage of bar width. For example at "50" the bar height will equal bar spacing. Flourish type hint: number, defaults to None. + :type bar_margin: float, optional + :param sort_enabled: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type sort_enabled: bool, optional + :param sort_ascending: Sort mode. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type sort_ascending: bool, optional + :param bars_advanced: Show advanced. Flourish type hint: boolean, defaults to None. + :type bars_advanced: bool, optional + :param height_mode: Bar height. Choices: fill_space, specified. Flourish type hint: string, defaults to None. + :type height_mode: str, optional + :param bar_height: Height. Height of the bar; expressed as a multiple of the base font size to make it responsive. Flourish type hint: number, defaults to None. + :type bar_height: float, optional + :param bar_min_value: Hide bars below value. This will hide all bars that have a value below the number specified in this setting. Flourish type hint: number, defaults to None. + :type bar_min_value: float, optional + :param bar_empty_spaces: When not enough bars. Choices: True, False. If enabled, the chart and bars will remain the same size as more bars enter the race. Flourish type hint: boolean, defaults to None. + :type bar_empty_spaces: bool, optional + :param color_mode: Color mode. Choices: category, bar, single. Whether to color by category (if you have a category column set in the datasheet), by each individual bar, or give every bar the same color. Flourish type hint: string, defaults to None. + :type color_mode: str, optional + :param color_single: Single color. Flourish type hint: color, defaults to None. + :type color_single: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Color overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param color_single_overrides: Color overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type color_single_overrides: Union[list, str], optional + :param bar_opacity: Bar opacity. Flourish type hint: number, defaults to None. + :type bar_opacity: float, optional + :param label_max_size: Max size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type label_max_size: float, optional + :param label_mode: Labels mode. Choices: bars, axis. Flourish type hint: string, defaults to None. + :type label_mode: str, optional + :param label_color_in: Color. Flourish type hint: color, defaults to None. + :type label_color_in: str, optional + :param label_axis_width: Space. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type label_axis_width: float, optional + :param show_value: Show values. Flourish type hint: boolean, defaults to None. + :type show_value: bool, optional + :param label_color_out: Color. Flourish type hint: color, defaults to None. + :type label_color_out: str, optional + :param padding_right: Space. Flourish type hint: number, defaults to None. + :type padding_right: float, optional + :param image_height: Height. As a percentage of bar height. Flourish type hint: number, defaults to None. + :type image_height: float, optional + :param image_width: Width. As a percentage of bar height. Flourish type hint: number, defaults to None. + :type image_width: float, optional + :param image_margin_right: Margin right. As a percentage of bar height. Use a negative value to get images to show to the right of the barFlourish type hint: number, defaults to None. + :type image_margin_right: float, optional + :param image_scale: Image sizing. Choices: fill, fit, stretch. Flourish type hint: string, defaults to None. + :type image_scale: str, optional + :param image_circle: Shape. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type image_circle: bool, optional + :param counter: Show current time. Flourish type hint: boolean, defaults to None. + :type counter: bool, optional + :param counter_font_size: Size (percentage of screen). Flourish type hint: number, defaults to None. + :type counter_font_size: float, optional + :param counter_color: Color. Flourish type hint: color, defaults to None. + :type counter_color: str, optional + :param counter_line_height: Line height. Flourish type hint: number, defaults to None. + :type counter_line_height: float, optional + :param totaliser: Show total. Shows the sum of all the values in the datasheet for the current time, including any bars not currently visible in the chart. Flourish type hint: boolean, defaults to None. + :type totaliser: bool, optional + :param totaliser_font_size: Size (percentage of screen). Flourish type hint: number, defaults to None. + :type totaliser_font_size: float, optional + :param totaliser_color: Color. Flourish type hint: color, defaults to None. + :type totaliser_color: str, optional + :param totaliser_label: Label. Flourish type hint: string, defaults to None. + :type totaliser_label: str, optional + :param caption_background_color: Background. Flourish type hint: color, defaults to None. + :type caption_background_color: str, optional + :param caption_border_color: Border. Flourish type hint: color, defaults to None. + :type caption_border_color: str, optional + :param caption_opacity: Opacity. Flourish type hint: number, defaults to None. + :type caption_opacity: float, optional + :param caption_padding: Padding. In rems multiples of the base font size. Flourish type hint: number, defaults to None. + :type caption_padding: float, optional + :param caption_text_align: Align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type caption_text_align: str, optional + :param caption_position: Position. Choices: top-left, center-left, bottom-left, top-right, center-right, bottom-right, top-center, center-center, bottom-center. Flourish type hint: string, defaults to None. + :type caption_position: str, optional + :param caption_font_size: Font size. In rems multiples of the base font size. Flourish type hint: number, defaults to None. + :type caption_font_size: float, optional + :param caption_text_color: Text. Flourish type hint: color, defaults to None. + :type caption_text_color: str, optional + :param caption_mode: Content mode. Choices: text_legend, html. In Text with colors mode, any phrases matching category names will be automatically colored. In HTML mode, no colors will be applied, but you can include any HTML in the datasheet to add images, etc. Flourish type hint: string, defaults to None. + :type caption_mode: str, optional + :param caption_image_width: Width. As a percentage of the caption container width. Flourish type hint: number, defaults to None. + :type caption_image_width: float, optional + :param caption_image_position: Position. Choices: column, column-reverse, row, row-reverse. Flourish type hint: string, defaults to None. + :type caption_image_position: str, optional + :param caption_space_between: Space between. Space between the image and text in rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type caption_space_between: float, optional + :param sort_control: Show sort control. Flourish type hint: boolean, defaults to None. + :type sort_control: bool, optional + :param sort_descending_text: “Highest” label. Flourish type hint: string, defaults to None. + :type sort_descending_text: str, optional + :param sort_ascending_text: “Lowest” label. Flourish type hint: string, defaults to None. + :type sort_ascending_text: str, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param text_legend: Choices: auto, custom, off. Flourish type hint: string, defaults to None. + :type text_legend: str, optional + :param text_legend_title: Title. Flourish type hint: boolean, defaults to None. + :type text_legend_title: bool, optional + :param text_legend_subtitle: Subtitle. Flourish type hint: boolean, defaults to None. + :type text_legend_subtitle: bool, optional + :param text_legend_caption: Captions. Flourish type hint: boolean, defaults to None. + :type text_legend_caption: bool, optional + :param text_legend_bold: Bold. If checked, always use bold for colored items. Flourish type hint: boolean, defaults to None. + :type text_legend_bold: bool, optional + :param axis_text_color: Text color. Flourish type hint: color, defaults to None. + :type axis_text_color: str, optional + :param axis_font_size: Text size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type axis_font_size: float, optional + :param axis_color: Line color. Flourish type hint: color, defaults to None. + :type axis_color: str, optional + :param axis_gridline_dash: Line dash. Flourish type hint: number, defaults to None. + :type axis_gridline_dash: float, optional + :param scale_type: Type. Choices: auto, auto_fixed, manual. The dynamic scale type sets a dynamix X axis that will animate with the chart. The fixed or custom scale type sets a fixed maximum value on the X axis. Flourish type hint: string, defaults to None. + :type scale_type: str, optional + :param scale_min: Min range. The axis will go from zero to this value, then be dynamic. Flourish type hint: number, defaults to None. + :type scale_min: float, optional + :param scale_max: Max. Flourish type hint: number, defaults to None. + :type scale_max: float, optional + :param annotations_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type annotations_enabled: bool, optional + :param annotations_content: Annotations. One line per annotation. Syntax Annotation text :: Value on X axis Example Winner :: 250 Majority :: 200. Flourish type hint: text, defaults to None. + :type annotations_content: Union[list, str], optional + :param annotations_text_color: Text color. Flourish type hint: color, defaults to None. + :type annotations_text_color: str, optional + :param annotations_text_size: Size. Flourish type hint: number, defaults to None. + :type annotations_text_size: float, optional + :param annotations_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type annotations_text_weight: str, optional + :param annotations_line_color: Line color. Flourish type hint: color, defaults to None. + :type annotations_line_color: str, optional + :param annotations_line_opacity: Opacity. Flourish type hint: number, defaults to None. + :type annotations_line_opacity: float, optional + :param annotations_line_width: Width. Flourish type hint: number, defaults to None. + :type annotations_line_width: float, optional + :param annotations_line_dash: Dash. Flourish type hint: number, defaults to None. + :type annotations_line_dash: float, optional + :param annotations_align: Align. Choices: start, middle, end. Flourish type hint: string, defaults to None. + :type annotations_align: str, optional + :param annotations_offset: Offset. Choices: above, on, below. Offset text mode. Flourish type hint: string, defaults to None. + :type annotations_offset: str, optional + :param chart_timeline_controls_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_enabled: bool, optional + :param chart_timeline_controls_style: Style. Choices: timeline, button. Flourish type hint: string, defaults to None. + :type chart_timeline_controls_style: str, optional + :param chart_timeline_controls_graph: Show chart. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_graph: bool, optional + :param chart_timeline_controls_play_on_load: Play on load. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_play_on_load: bool, optional + :param chart_timeline_controls_loop: Loop timeline. When turned on, the timeline will return to the beginning once complete. Otherwise, it will stop when it reaches the end. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_loop: bool, optional + :param chart_timeline_controls_duration: Timeline duration. Total duration of the timeline during normal playback in seconds. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_duration: float, optional + :param chart_timeline_controls_duration_tween: Time jump duration. Duration of transitions between different points in time on the timeline. This is the transition you see in the story player when switching between slides with a different time on the timeline (in seconds). Flourish type hint: number, defaults to None. + :type chart_timeline_controls_duration_tween: float, optional + :param chart_timeline_controls_duration_wait_at_end: Pause before loop. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_duration_wait_at_end: float, optional + :param chart_timeline_controls_axes_custom_enabled: Axis settings. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_axes_custom_enabled: bool, optional + :param chart_timeline_controls_color_axes: Axes color. Flourish type hint: color, defaults to None. + :type chart_timeline_controls_color_axes: str, optional + :param chart_timeline_controls_axis_font_size: Font size. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_axis_font_size: float, optional + :param chart_timeline_controls_date_format_display: X axis date format. Choices:, %Y-%m-%dT%H:%M:%S.%LZ, %Y-%m-%d, %m/%d/%Y, %d/%m/%Y, %d-%b-%y, %m/%Y, %b %Y, %b %y, %B %d, %d %b, %Y, %B, %b, %A, %a, %H:%M:%S, %I:%M %p, %H:%M. Flourish type hint: string, defaults to None. + :type chart_timeline_controls_date_format_display: str, optional + :param chart_timeline_controls_axis_nice_x: Clean X axis. Rounds out the X axis so that its start and end values are nice, round dates. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_axis_nice_x: bool, optional + :param chart_timeline_controls_axis_nice_y: Clean Y axis. Rounds out the Y axis so that its start and end values are nice, round numbers. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_axis_nice_y: bool, optional + :param chart_timeline_controls_scrubber_snap: Snap when scrubbing. When turned on, you can only jump to values that are supplied in the dataset and nothing in between. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_scrubber_snap: bool, optional + :param chart_timeline_controls_scrubber_snap_paused: Snap when paused. Activate to snap the timeline to the closest interval when non animating. This is useful for ensuring the data visible in the visualization always reflects the data you have supplied. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_scrubber_snap_paused: bool, optional + :param chart_timeline_controls_layout_settings: Layout settings. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_layout_settings: bool, optional + :param chart_timeline_controls_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_margin_top: float, optional + :param chart_timeline_controls_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_margin_left: float, optional + :param chart_timeline_controls_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_margin_bottom: float, optional + :param chart_timeline_controls_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_margin_right: float, optional + :param chart_timeline_controls_playback_button_margin_right: Space between button and timeline. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_playback_button_margin_right: float, optional + :param chart_timeline_controls_scrubber_height: Scrubber height. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_scrubber_height: float, optional + :param chart_timeline_controls_playback_button_margin_right_button: Space between button and text. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_playback_button_margin_right_button: float, optional + :param chart_timeline_controls_graph_settings: Chart settings. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_graph_settings: bool, optional + :param chart_timeline_controls_color_background: Background. Flourish type hint: color, defaults to None. + :type chart_timeline_controls_color_background: str, optional + :param chart_timeline_controls_graph_height: Height. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_graph_height: float, optional + :param chart_timeline_controls_curve: Curved lines. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_curve: bool, optional + :param chart_timeline_controls_playback_styling: Play button settings. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_playback_styling: bool, optional + :param chart_timeline_controls_playback_button_button_color: Button color. Flourish type hint: color, defaults to None. + :type chart_timeline_controls_playback_button_button_color: str, optional + :param chart_timeline_controls_playback_button_button_size: Button size. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_playback_button_button_size: float, optional + :param chart_timeline_controls_playback_button_icon_color: Icon color. Flourish type hint: color, defaults to None. + :type chart_timeline_controls_playback_button_icon_color: str, optional + :param chart_timeline_controls_playback_button_icon_size: Icon size. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_playback_button_icon_size: float, optional + :param chart_timeline_controls_playback_button_label_size: Label size. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_playback_button_label_size: float, optional + :param animation_duration: Bar swap duration. Animation duration of the bars swapping, in seconds. Flourish type hint: number, defaults to None. + :type animation_duration: float, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param blank_cells: How to handle blank/invalid cells. Choices: interpolate, last_valid, zero, remove. Interpolate fills the gaps between the last and next valid values. Use last valid will use the last number for the bar. Treat as zero will set the value of the blank cell to zero. Remove bar will remove the bar for any blank/invalid cells. Flourish type hint: string, defaults to None. + :type blank_cells: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "controls_style": {}, + "button_style": {}, + "legend_container": {}, + "legend_categorical": {}, + "timeline": {"margin": {}, "playback_button": {}}, + "formatting": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_column_chart = [False, True] + [None] + if column_chart not in list_column_chart: + raise ValueError(f"`column_chart` must be one of: [False, True]") + elif column_chart in list_column_chart and column_chart is not None: + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if column_chart in k + } + if len(filtered_dict) > 0: + self.state["state"]["column_chart"] = filtered_dict[column_chart] + self.state["state"]["number_of_bars"] = number_of_bars + self.state["state"]["bar_margin"] = bar_margin + + list_sort_enabled = [True, False] + [None] + if sort_enabled not in list_sort_enabled: + raise ValueError(f"`sort_enabled` must be one of: [True, False]") + elif sort_enabled in list_sort_enabled and sort_enabled is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if sort_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["sort_enabled"] = filtered_dict[sort_enabled] + + list_sort_ascending = [False, True] + [None] + if sort_ascending not in list_sort_ascending: + raise ValueError(f"`sort_ascending` must be one of: [False, True]") + elif sort_ascending in list_sort_ascending and sort_ascending is not None: + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if sort_ascending in k + } + if len(filtered_dict) > 0: + self.state["state"]["sort_ascending"] = filtered_dict[sort_ascending] + self.state["state"]["bars_advanced"] = bars_advanced + + list_height_mode = ["fill_space", "specified"] + [None] + if height_mode not in list_height_mode: + raise ValueError( + f"`height_mode` must be one of: ['fill_space', 'specified']" + ) + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "fill_space": "fill_space", + "specified": "specified", + }.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + self.state["state"]["bar_height"] = bar_height + self.state["state"]["bar_min_value"] = bar_min_value + + list_bar_empty_spaces = [True, False] + [None] + if bar_empty_spaces not in list_bar_empty_spaces: + raise ValueError(f"`bar_empty_spaces` must be one of: [True, False]") + elif bar_empty_spaces in list_bar_empty_spaces and bar_empty_spaces is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if bar_empty_spaces in k + } + if len(filtered_dict) > 0: + self.state["state"]["bar_empty_spaces"] = filtered_dict[ + bar_empty_spaces + ] + + list_color_mode = ["category", "bar", "single"] + [None] + if color_mode not in list_color_mode: + raise ValueError( + f"`color_mode` must be one of: ['category', 'bar', 'single']" + ) + elif color_mode in list_color_mode and color_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "category": "category", + "bar": "bar", + "single": "single", + }.items() + if color_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color_mode"] = filtered_dict[color_mode] + self.state["state"]["color_single"] = color_single + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + + if ( + color_single_overrides is not None + and len(color_single_overrides) > 1 + and isinstance(color_single_overrides, list) + ): + self.state["state"]["color_single_overrides"] = " \n ".join( + color_single_overrides + ) + else: + self.state["state"]["color_single_overrides"] = color_single_overrides + + self.state["state"]["bar_opacity"] = bar_opacity + self.state["state"]["label_max_size"] = label_max_size + + list_label_mode = ["bars", "axis"] + [None] + if label_mode not in list_label_mode: + raise ValueError(f"`label_mode` must be one of: ['bars', 'axis']") + elif label_mode in list_label_mode and label_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"bars": "bars", "axis": "axis"}.items() + if label_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_mode"] = filtered_dict[label_mode] + self.state["state"]["label_color_in"] = label_color_in + self.state["state"]["label_axis_width"] = label_axis_width + self.state["state"]["show_value"] = show_value + self.state["state"]["label_color_out"] = label_color_out + self.state["state"]["padding_right"] = padding_right + self.state["state"]["image_height"] = image_height + self.state["state"]["image_width"] = image_width + self.state["state"]["image_margin_right"] = image_margin_right + + list_image_scale = ["fill", "fit", "stretch"] + [None] + if image_scale not in list_image_scale: + raise ValueError( + f"`image_scale` must be one of: ['fill', 'fit', 'stretch']" + ) + elif image_scale in list_image_scale and image_scale is not None: + filtered_dict = { + k: v + for (k, v) in { + "fill": "fill", + "fit": "fit", + "stretch": "stretch", + }.items() + if image_scale in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_scale"] = filtered_dict[image_scale] + + list_image_circle = [False, True] + [None] + if image_circle not in list_image_circle: + raise ValueError(f"`image_circle` must be one of: [False, True]") + elif image_circle in list_image_circle and image_circle is not None: + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if image_circle in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_circle"] = filtered_dict[image_circle] + self.state["state"]["counter"] = counter + self.state["state"]["counter_font_size"] = counter_font_size + self.state["state"]["counter_color"] = counter_color + self.state["state"]["counter_line_height"] = counter_line_height + self.state["state"]["totaliser"] = totaliser + self.state["state"]["totaliser_font_size"] = totaliser_font_size + self.state["state"]["totaliser_color"] = totaliser_color + self.state["state"]["totaliser_label"] = totaliser_label + self.state["state"]["caption_background_color"] = caption_background_color + self.state["state"]["caption_border_color"] = caption_border_color + self.state["state"]["caption_opacity"] = caption_opacity + self.state["state"]["caption_padding"] = caption_padding + + list_caption_text_align = ["flex-start", "center", "flex-end"] + [None] + if caption_text_align not in list_caption_text_align: + raise ValueError( + f"`caption_text_align` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + caption_text_align in list_caption_text_align + and caption_text_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if caption_text_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["caption_text_align"] = filtered_dict[ + caption_text_align + ] + + list_caption_position = [ + "top-left", + "center-left", + "bottom-left", + "top-right", + "center-right", + "bottom-right", + "top-center", + "center-center", + "bottom-center", + ] + [None] + if caption_position not in list_caption_position: + raise ValueError( + f"`caption_position` must be one of: ['top-left', 'center-left', 'bottom-left', 'top-right', 'center-right', 'bottom-right', 'top-center', 'center-center', 'bottom-center']" + ) + elif caption_position in list_caption_position and caption_position is not None: + filtered_dict = { + k: v + for (k, v) in { + "top-left": "top-left", + "center-left": "center-left", + "bottom-left": "bottom-left", + "top-right": "top-right", + "center-right": "center-right", + "bottom-right": "bottom-right", + "top-center": "top-center", + "center-center": "center-center", + "bottom-center": "bottom-center", + }.items() + if caption_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["caption_position"] = filtered_dict[ + caption_position + ] + self.state["state"]["caption_font_size"] = caption_font_size + self.state["state"]["caption_text_color"] = caption_text_color + + list_caption_mode = ["text_legend", "html"] + [None] + if caption_mode not in list_caption_mode: + raise ValueError(f"`caption_mode` must be one of: ['text_legend', 'html']") + elif caption_mode in list_caption_mode and caption_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"text_legend": "text_legend", "html": "html"}.items() + if caption_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["caption_mode"] = filtered_dict[caption_mode] + self.state["state"]["caption_image_width"] = caption_image_width + + list_caption_image_position = [ + "column", + "column-reverse", + "row", + "row-reverse", + ] + [None] + if caption_image_position not in list_caption_image_position: + raise ValueError( + f"`caption_image_position` must be one of: ['column', 'column-reverse', 'row', 'row-reverse']" + ) + elif ( + caption_image_position in list_caption_image_position + and caption_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "column": "column", + "column-reverse": "column-reverse", + "row": "row", + "row-reverse": "row-reverse", + }.items() + if caption_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["caption_image_position"] = filtered_dict[ + caption_image_position + ] + self.state["state"]["caption_space_between"] = caption_space_between + self.state["state"]["sort_control"] = sort_control + self.state["state"]["sort_descending_text"] = sort_descending_text + self.state["state"]["sort_ascending_text"] = sort_ascending_text + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_text_legend = ["auto", "custom", "off"] + [None] + if text_legend not in list_text_legend: + raise ValueError(f"`text_legend` must be one of: ['auto', 'custom', 'off']") + elif text_legend in list_text_legend and text_legend is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom", "off": "off"}.items() + if text_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["text_legend"] = filtered_dict[text_legend] + self.state["state"]["text_legend_title"] = text_legend_title + self.state["state"]["text_legend_subtitle"] = text_legend_subtitle + self.state["state"]["text_legend_caption"] = text_legend_caption + self.state["state"]["text_legend_bold"] = text_legend_bold + self.state["state"]["axis_text_color"] = axis_text_color + self.state["state"]["axis_font_size"] = axis_font_size + self.state["state"]["axis_color"] = axis_color + self.state["state"]["axis_gridline_dash"] = axis_gridline_dash + + list_scale_type = ["auto", "auto_fixed", "manual"] + [None] + if scale_type not in list_scale_type: + raise ValueError( + f"`scale_type` must be one of: ['auto', 'auto_fixed', 'manual']" + ) + elif scale_type in list_scale_type and scale_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "auto_fixed": "auto_fixed", + "manual": "manual", + }.items() + if scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["scale_type"] = filtered_dict[scale_type] + self.state["state"]["scale_min"] = scale_min + self.state["state"]["scale_max"] = scale_max + + list_annotations_enabled = [True, False] + [None] + if annotations_enabled not in list_annotations_enabled: + raise ValueError(f"`annotations_enabled` must be one of: [True, False]") + elif ( + annotations_enabled in list_annotations_enabled + and annotations_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if annotations_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations_enabled"] = filtered_dict[ + annotations_enabled + ] + + if ( + annotations_content is not None + and len(annotations_content) > 1 + and isinstance(annotations_content, list) + ): + self.state["state"]["annotations_content"] = " \n ".join( + annotations_content + ) + else: + self.state["state"]["annotations_content"] = annotations_content + + self.state["state"]["annotations_text_color"] = annotations_text_color + self.state["state"]["annotations_text_size"] = annotations_text_size + + list_annotations_text_weight = ["bold", "normal"] + [None] + if annotations_text_weight not in list_annotations_text_weight: + raise ValueError( + f"`annotations_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + annotations_text_weight in list_annotations_text_weight + and annotations_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if annotations_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations_text_weight"] = filtered_dict[ + annotations_text_weight + ] + self.state["state"]["annotations_line_color"] = annotations_line_color + self.state["state"]["annotations_line_opacity"] = annotations_line_opacity + self.state["state"]["annotations_line_width"] = annotations_line_width + self.state["state"]["annotations_line_dash"] = annotations_line_dash + + list_annotations_align = ["start", "middle", "end"] + [None] + if annotations_align not in list_annotations_align: + raise ValueError( + f"`annotations_align` must be one of: ['start', 'middle', 'end']" + ) + elif ( + annotations_align in list_annotations_align + and annotations_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "middle": "middle", + "end": "end", + }.items() + if annotations_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations_align"] = filtered_dict[ + annotations_align + ] + + list_annotations_offset = ["above", "on", "below"] + [None] + if annotations_offset not in list_annotations_offset: + raise ValueError( + f"`annotations_offset` must be one of: ['above', 'on', 'below']" + ) + elif ( + annotations_offset in list_annotations_offset + and annotations_offset is not None + ): + filtered_dict = { + k: v + for (k, v) in {"above": "above", "on": "on", "below": "below"}.items() + if annotations_offset in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations_offset"] = filtered_dict[ + annotations_offset + ] + + list_chart_timeline_controls_enabled = [True, False] + [None] + if chart_timeline_controls_enabled not in list_chart_timeline_controls_enabled: + raise ValueError( + f"`chart_timeline_controls_enabled` must be one of: [True, False]" + ) + elif ( + chart_timeline_controls_enabled in list_chart_timeline_controls_enabled + and chart_timeline_controls_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_timeline_controls_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["timeline"]["enabled"] = filtered_dict[ + chart_timeline_controls_enabled + ] + + list_chart_timeline_controls_style = ["timeline", "button"] + [None] + if chart_timeline_controls_style not in list_chart_timeline_controls_style: + raise ValueError( + f"`chart_timeline_controls_style` must be one of: ['timeline', 'button']" + ) + elif ( + chart_timeline_controls_style in list_chart_timeline_controls_style + and chart_timeline_controls_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"timeline": "timeline", "button": "button"}.items() + if chart_timeline_controls_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["timeline"]["style"] = filtered_dict[ + chart_timeline_controls_style + ] + + list_chart_timeline_controls_graph = [True, False] + [None] + if chart_timeline_controls_graph not in list_chart_timeline_controls_graph: + raise ValueError( + f"`chart_timeline_controls_graph` must be one of: [True, False]" + ) + elif ( + chart_timeline_controls_graph in list_chart_timeline_controls_graph + and chart_timeline_controls_graph is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_timeline_controls_graph in k + } + if len(filtered_dict) > 0: + self.state["state"]["timeline"]["graph"] = filtered_dict[ + chart_timeline_controls_graph + ] + self.state["state"]["timeline"][ + "play_on_load" + ] = chart_timeline_controls_play_on_load + self.state["state"]["timeline"]["loop"] = chart_timeline_controls_loop + self.state["state"]["timeline"]["duration"] = chart_timeline_controls_duration + self.state["state"]["timeline"][ + "duration_tween" + ] = chart_timeline_controls_duration_tween + self.state["state"]["timeline"][ + "duration_wait_at_end" + ] = chart_timeline_controls_duration_wait_at_end + self.state["state"]["timeline"][ + "axes_custom_enabled" + ] = chart_timeline_controls_axes_custom_enabled + self.state["state"]["timeline"][ + "color_axes" + ] = chart_timeline_controls_color_axes + self.state["state"]["timeline"][ + "axis_font_size" + ] = chart_timeline_controls_axis_font_size + + list_chart_timeline_controls_date_format_display = [ + "", + "%Y-%m-%dT%H:%M:%S.%LZ", + "%Y-%m-%d", + "%m/%d/%Y", + "%d/%m/%Y", + "%d-%b-%y", + "%m/%Y", + "%b %Y", + "%b %y", + "%B %d", + "%d %b", + "%Y", + "%B", + "%b", + "%A", + "%a", + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + ] + [None] + if ( + chart_timeline_controls_date_format_display + not in list_chart_timeline_controls_date_format_display + ): + raise ValueError( + f"`chart_timeline_controls_date_format_display` must be one of: ['', '%Y-%m-%dT%H:%M:%S.%LZ', '%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%d-%b-%y', '%m/%Y', '%b %Y', '%b %y', '%B %d', '%d %b', '%Y', '%B', '%b', '%A', '%a', '%H:%M:%S', '%I:%M %p', '%H:%M']" + ) + elif ( + chart_timeline_controls_date_format_display + in list_chart_timeline_controls_date_format_display + and chart_timeline_controls_date_format_display is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "": "", + "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", + "%Y-%m-%d": "%Y-%m-%d", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%d-%b-%y": "%d-%b-%y", + "%m/%Y": "%m/%Y", + "%b %Y": "%b %Y", + "%b %y": "%b %y", + "%B %d": "%B %d", + "%d %b": "%d %b", + "%Y": "%Y", + "%B": "%B", + "%b": "%b", + "%A": "%A", + "%a": "%a", + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + }.items() + if chart_timeline_controls_date_format_display in k + } + if len(filtered_dict) > 0: + self.state["state"]["timeline"]["date_format_display"] = filtered_dict[ + chart_timeline_controls_date_format_display + ] + self.state["state"]["timeline"][ + "axis_nice_x" + ] = chart_timeline_controls_axis_nice_x + self.state["state"]["timeline"][ + "axis_nice_y" + ] = chart_timeline_controls_axis_nice_y + self.state["state"]["timeline"][ + "scrubber_snap" + ] = chart_timeline_controls_scrubber_snap + self.state["state"]["timeline"][ + "scrubber_snap_paused" + ] = chart_timeline_controls_scrubber_snap_paused + self.state["state"]["timeline"][ + "layout_settings" + ] = chart_timeline_controls_layout_settings + self.state["state"]["timeline"]["margin"][ + "top" + ] = chart_timeline_controls_margin_top + self.state["state"]["timeline"]["margin"][ + "left" + ] = chart_timeline_controls_margin_left + self.state["state"]["timeline"]["margin"][ + "bottom" + ] = chart_timeline_controls_margin_bottom + self.state["state"]["timeline"]["margin"][ + "right" + ] = chart_timeline_controls_margin_right + self.state["state"]["timeline"]["playback_button"][ + "margin_right" + ] = chart_timeline_controls_playback_button_margin_right + self.state["state"]["timeline"][ + "scrubber_height" + ] = chart_timeline_controls_scrubber_height + self.state["state"]["timeline"]["playback_button"][ + "margin_right_button" + ] = chart_timeline_controls_playback_button_margin_right_button + self.state["state"]["timeline"][ + "graph_settings" + ] = chart_timeline_controls_graph_settings + self.state["state"]["timeline"][ + "color_background" + ] = chart_timeline_controls_color_background + self.state["state"]["timeline"][ + "graph_height" + ] = chart_timeline_controls_graph_height + self.state["state"]["timeline"]["curve"] = chart_timeline_controls_curve + self.state["state"]["timeline"][ + "playback_styling" + ] = chart_timeline_controls_playback_styling + self.state["state"]["timeline"]["playback_button"][ + "button_color" + ] = chart_timeline_controls_playback_button_button_color + self.state["state"]["timeline"]["playback_button"][ + "button_size" + ] = chart_timeline_controls_playback_button_button_size + self.state["state"]["timeline"]["playback_button"][ + "icon_color" + ] = chart_timeline_controls_playback_button_icon_color + self.state["state"]["timeline"]["playback_button"][ + "icon_size" + ] = chart_timeline_controls_playback_button_icon_size + self.state["state"]["timeline"]["playback_button"][ + "label_size" + ] = chart_timeline_controls_playback_button_label_size + self.state["state"]["animation_duration"] = animation_duration + self.state["state"]["formatting"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["formatting"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["formatting"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["formatting"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["formatting"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["formatting"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["formatting"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["formatting"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["formatting"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + + list_blank_cells = ["interpolate", "last_valid", "zero", "remove"] + [None] + if blank_cells not in list_blank_cells: + raise ValueError( + f"`blank_cells` must be one of: ['interpolate', 'last_valid', 'zero', 'remove']" + ) + elif blank_cells in list_blank_cells and blank_cells is not None: + filtered_dict = { + k: v + for (k, v) in { + "interpolate": "interpolate", + "last_valid": "last_valid", + "zero": "zero", + "remove": "remove", + }.items() + if blank_cells in k + } + if len(filtered_dict) > 0: + self.state["state"]["blank_cells"] = filtered_dict[blank_cells] + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_bubble_chart_details( + self, + bubble_alignment: str = None, + margin_bubbles: float = None, + animation_duration: float = None, + height_mode: str = None, + aspect_ratio: float = None, + aspect_ratio_mobile: float = None, + aspect_ratio_breakpoint: float = None, + circle_background_color: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + circle_background_border: float = None, + image_opacity: float = None, + label_font_weight: str = None, + label_font_style: str = None, + label_font_case: str = None, + label_font_color: str = None, + label_shadow: bool = None, + enable_highlighting: bool = None, + selected_bubbles: Union[list, str] = None, + opacity_highlighted: float = None, + opacity_not_highlighted: float = None, + highlight_pictures: bool = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + show_legend_axis: bool = None, + axis_legend_title_mode: str = None, + axis_legend_title: str = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + chart_size_legend_show_legend: bool = None, + chart_size_legend_title_mode: str = None, + chart_size_legend_title: str = None, + chart_size_legend_shape_fill: str = None, + chart_size_legend_shape_stroke: str = None, + chart_size_legend_clip_height: float = None, + chart_size_legend_small_symbol_size: float = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + chart_number_localization_input_decimal_separator: str = None, + chart_number_localization_output_separators: str = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: bubble chart. + + + :param bubble_alignment: Alignment of bubbles. Choices: center, axis. Flourish type hint: string, defaults to None. + :type bubble_alignment: str, optional + :param margin_bubbles: Space between bubbles. Flourish type hint: number, defaults to None. + :type margin_bubbles: float, optional + :param animation_duration: Animation duration. in seconds. Flourish type hint: number, defaults to None. + :type animation_duration: float, optional + :param height_mode: Height mode. Choices: fill_space, aspect. Fill space: the graphic will fill the container (which by default will be the the standard Flourish responsive chart size) Aspect ratio: sets the aspect of the chart. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to None. + :type height_mode: str, optional + :param aspect_ratio: Aspect (desktop). Height of the plot as a proportion of its width, between 0 and 1. Flourish type hint: number, defaults to None. + :type aspect_ratio: float, optional + :param aspect_ratio_mobile: Aspect (mobile). Height of the plot as a proportion of its width, between 0 and 1. Flourish type hint: number, defaults to None. + :type aspect_ratio_mobile: float, optional + :param aspect_ratio_breakpoint: Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to None. + :type aspect_ratio_breakpoint: float, optional + :param circle_background_color: Color. Default color. Flourish type hint: color, defaults to None. + :type circle_background_color: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param circle_background_border: Border. Flourish type hint: number, defaults to None. + :type circle_background_border: float, optional + :param image_opacity: Opacity. Flourish type hint: number, defaults to None. + :type image_opacity: float, optional + :param label_font_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type label_font_weight: str, optional + :param label_font_style: Style. Choices: normal, italic. Flourish type hint: string, defaults to None. + :type label_font_style: str, optional + :param label_font_case: Case. Choices:, uppercase. Flourish type hint: string, defaults to None. + :type label_font_case: str, optional + :param label_font_color: Color. Defaults to contrast coloring when no image is set. Flourish type hint: color, defaults to None. + :type label_font_color: str, optional + :param label_shadow: Text shadow. Flourish type hint: boolean, defaults to None. + :type label_shadow: bool, optional + :param enable_highlighting: Enable highlighting. Flourish type hint: boolean, defaults to None. + :type enable_highlighting: bool, optional + :param selected_bubbles: Highlight bubbles. To highlight bubbles, write the name of each bubble on a new line. You can also create a story and highlight/unhighlight by clicking. Flourish type hint: text, defaults to None. + :type selected_bubbles: Union[list, str], optional + :param opacity_highlighted: Opacity of highlighted bubble. Flourish type hint: number, defaults to None. + :type opacity_highlighted: float, optional + :param opacity_not_highlighted: Opacity of all other bubbles. Flourish type hint: number, defaults to None. + :type opacity_not_highlighted: float, optional + :param highlight_pictures: Show pictures only on highlighted bubbles. Flourish type hint: boolean, defaults to None. + :type highlight_pictures: bool, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param show_legend_axis: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type show_legend_axis: bool, optional + :param axis_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type axis_legend_title_mode: str, optional + :param axis_legend_title: Title. Flourish type hint: string, defaults to None. + :type axis_legend_title: str, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param chart_size_legend_show_legend: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_size_legend_show_legend: bool, optional + :param chart_size_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_size_legend_title_mode: str, optional + :param chart_size_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_size_legend_title: str, optional + :param chart_size_legend_shape_fill: Shape fill. Flourish type hint: color, defaults to None. + :type chart_size_legend_shape_fill: str, optional + :param chart_size_legend_shape_stroke: Shape stroke. Hint: set to same value as fill for no stroke. Flourish type hint: color, defaults to None. + :type chart_size_legend_shape_stroke: str, optional + :param chart_size_legend_clip_height: Max height. Maximum height of shape ( relative to root font size ). Flourish type hint: number, defaults to None. + :type chart_size_legend_clip_height: float, optional + :param chart_size_legend_small_symbol_size: Small/large proportion. Proportion of the smallest symbols value compared to the biggest symbols value. 0.5 means its half the value of the big symbol. Flourish type hint: number, defaults to None. + :type chart_size_legend_small_symbol_size: float, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param chart_number_localization_input_decimal_separator: Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to None. + :type chart_number_localization_input_decimal_separator: str, optional + :param chart_number_localization_output_separators: Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to None. + :type chart_number_localization_output_separators: str, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "legend_container": {}, + "legend_categorical": {}, + "legend_size": {}, + "popup": {}, + "localization": {}, + "size_by_format": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_bubble_alignment = ["center", "axis"] + [None] + if bubble_alignment not in list_bubble_alignment: + raise ValueError(f"`bubble_alignment` must be one of: ['center', 'axis']") + elif bubble_alignment in list_bubble_alignment and bubble_alignment is not None: + filtered_dict = { + k: v + for (k, v) in {"center": "center", "axis": "axis"}.items() + if bubble_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["bubble_alignment"] = filtered_dict[ + bubble_alignment + ] + self.state["state"]["margin_bubbles"] = margin_bubbles + self.state["state"]["animation_duration"] = animation_duration + + list_height_mode = ["fill_space", "aspect"] + [None] + if height_mode not in list_height_mode: + raise ValueError(f"`height_mode` must be one of: ['fill_space', 'aspect']") + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"fill_space": "fill_space", "aspect": "aspect"}.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + self.state["state"]["aspect_ratio"] = aspect_ratio + self.state["state"]["aspect_ratio_mobile"] = aspect_ratio_mobile + self.state["state"]["aspect_ratio_breakpoint"] = aspect_ratio_breakpoint + self.state["state"]["circle_background_color"] = circle_background_color + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["circle_background_border"] = circle_background_border + self.state["state"]["image_opacity"] = image_opacity + + list_label_font_weight = ["normal", "bold"] + [None] + if label_font_weight not in list_label_font_weight: + raise ValueError(f"`label_font_weight` must be one of: ['normal', 'bold']") + elif ( + label_font_weight in list_label_font_weight + and label_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if label_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_font_weight"] = filtered_dict[ + label_font_weight + ] + + list_label_font_style = ["normal", "italic"] + [None] + if label_font_style not in list_label_font_style: + raise ValueError(f"`label_font_style` must be one of: ['normal', 'italic']") + elif label_font_style in list_label_font_style and label_font_style is not None: + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "italic": "italic"}.items() + if label_font_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_font_style"] = filtered_dict[ + label_font_style + ] + + list_label_font_case = ["", "uppercase"] + [None] + if label_font_case not in list_label_font_case: + raise ValueError(f"`label_font_case` must be one of: ['', 'uppercase']") + elif label_font_case in list_label_font_case and label_font_case is not None: + filtered_dict = { + k: v + for (k, v) in {"": "", "uppercase": "uppercase"}.items() + if label_font_case in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_font_case"] = filtered_dict[label_font_case] + self.state["state"]["label_font_color"] = label_font_color + self.state["state"]["label_shadow"] = label_shadow + self.state["state"]["enable_highlighting"] = enable_highlighting + + if ( + selected_bubbles is not None + and len(selected_bubbles) > 1 + and isinstance(selected_bubbles, list) + ): + self.state["state"]["selected_bubbles"] = " \n ".join(selected_bubbles) + else: + self.state["state"]["selected_bubbles"] = selected_bubbles + + self.state["state"]["opacity_highlighted"] = opacity_highlighted + self.state["state"]["opacity_not_highlighted"] = opacity_not_highlighted + self.state["state"]["highlight_pictures"] = highlight_pictures + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_show_legend_axis = [True, False] + [None] + if show_legend_axis not in list_show_legend_axis: + raise ValueError(f"`show_legend_axis` must be one of: [True, False]") + elif show_legend_axis in list_show_legend_axis and show_legend_axis is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if show_legend_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["show_legend_axis"] = filtered_dict[ + show_legend_axis + ] + + list_axis_legend_title_mode = ["auto", "custom"] + [None] + if axis_legend_title_mode not in list_axis_legend_title_mode: + raise ValueError( + f"`axis_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + axis_legend_title_mode in list_axis_legend_title_mode + and axis_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if axis_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis_legend_title_mode"] = filtered_dict[ + axis_legend_title_mode + ] + self.state["state"]["axis_legend_title"] = axis_legend_title + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_chart_size_legend_show_legend = [True, False] + [None] + if chart_size_legend_show_legend not in list_chart_size_legend_show_legend: + raise ValueError( + f"`chart_size_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_size_legend_show_legend in list_chart_size_legend_show_legend + and chart_size_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_size_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_size"]["show_legend"] = filtered_dict[ + chart_size_legend_show_legend + ] + + list_chart_size_legend_title_mode = ["auto", "custom"] + [None] + if chart_size_legend_title_mode not in list_chart_size_legend_title_mode: + raise ValueError( + f"`chart_size_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_size_legend_title_mode in list_chart_size_legend_title_mode + and chart_size_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_size_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_size"]["title_mode"] = filtered_dict[ + chart_size_legend_title_mode + ] + self.state["state"]["legend_size"]["title"] = chart_size_legend_title + self.state["state"]["legend_size"]["shape_fill"] = chart_size_legend_shape_fill + self.state["state"]["legend_size"][ + "shape_stroke" + ] = chart_size_legend_shape_stroke + self.state["state"]["legend_size"][ + "clip_height" + ] = chart_size_legend_clip_height + self.state["state"]["legend_size"][ + "small_symbol_size" + ] = chart_size_legend_small_symbol_size + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + + list_chart_number_localization_input_decimal_separator = [".", ","] + [None] + if ( + chart_number_localization_input_decimal_separator + not in list_chart_number_localization_input_decimal_separator + ): + raise ValueError( + f"`chart_number_localization_input_decimal_separator` must be one of: ['.', ',']" + ) + elif ( + chart_number_localization_input_decimal_separator + in list_chart_number_localization_input_decimal_separator + and chart_number_localization_input_decimal_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in {".": ".", ",": ","}.items() + if chart_number_localization_input_decimal_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "input_decimal_separator" + ] = filtered_dict[chart_number_localization_input_decimal_separator] + + list_chart_number_localization_output_separators = [ + ",.", + ".,", + ".", + ",", + " .", + " ,", + ] + [None] + if ( + chart_number_localization_output_separators + not in list_chart_number_localization_output_separators + ): + raise ValueError( + f"`chart_number_localization_output_separators` must be one of: [',.', '.,', '.', ',', ' .', ' ,']" + ) + elif ( + chart_number_localization_output_separators + in list_chart_number_localization_output_separators + and chart_number_localization_output_separators is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ",.": ",.", + ".,": ".,", + ".": ".", + ",": ",", + " .": " .", + " ,": " ,", + }.items() + if chart_number_localization_output_separators in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "output_separators" + ] = filtered_dict[chart_number_localization_output_separators] + self.state["state"]["size_by_format"][ + "prefix" + ] = chart_number_date_format_prefix + self.state["state"]["size_by_format"][ + "suffix" + ] = chart_number_date_format_suffix + self.state["state"]["size_by_format"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["size_by_format"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["size_by_format"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["size_by_format"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["size_by_format"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["size_by_format"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["size_by_format"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["size_by_format"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["size_by_format"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_calculator_details( + self, + question_flow: str = None, + design_border_type: str = None, + design_border_color: str = None, + design_background: str = None, + design_advanced: bool = None, + design_align_horizontal: str = None, + design_align_vertical: str = None, + design_max_width: float = None, + design_margin_vertical: float = None, + design_padding_vertical: float = None, + design_padding_horizontal: float = None, + design_border_width: float = None, + design_border_style: str = None, + design_border_radius: float = None, + design_shadow: bool = None, + design_shadow_color: str = None, + result_variables: Union[list, str] = None, + result_input: Union[list, str] = None, + result_advanced: bool = None, + result_font_size: str = None, + result_font_size_custom: float = None, + result_font_color: str = None, + result_font_weight: str = None, + result_font_style: str = None, + result_border_type: str = None, + result_border_width: float = None, + result_border_style: str = None, + result_border_color: str = None, + result_bg_type: str = None, + result_bg_color: str = None, + result_bg_image_src: str = None, + result_bg_image_size: str = None, + design_question_font_size: str = None, + design_question_font_size_custom: float = None, + design_question_font_color: str = None, + design_question_font_weight: str = None, + design_question_font_style: str = None, + design_question_margin_vertical: float = None, + design_question_margin_horizontal: float = None, + design_question_padding: float = None, + design_context_font_size: str = None, + design_context_font_size_custom: float = None, + design_context_font_color: str = None, + design_context_font_weight: str = None, + design_context_font_style: str = None, + design_context_margin_vertical: float = None, + design_context_margin_horizontal: float = None, + design_question_bg_color: str = None, + design_question_bg_opacity: float = None, + design_question_border_radius: float = None, + design_answer_margin_vertical: float = None, + design_answer_margin_horizontal: float = None, + input_color: str = None, + input_background_color: str = None, + input_width: float = None, + number_input_placeholder: str = None, + text_input_placeholder: str = None, + input_input_advanced: bool = None, + input_border_color: str = None, + input_border_radius: float = None, + input_border_width: float = None, + input_border_style: str = None, + input_align: str = None, + input_margin: float = None, + input_padding: float = None, + button_font_size: str = None, + button_font_size_custom: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + button_border_style: str = None, + button_container_width: float = None, + button_justify_content: str = None, + button_margin: float = None, + button_padding_factor: float = None, + dropdown_font_size: str = None, + dropdown_font_size_custom: float = None, + dropdown_placeholder: str = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + dropdown_padding_factor: float = None, + dropdown_border_style: str = None, + dropdown_font_weight: str = None, + dropdown_font_style: str = None, + dropdown_shadow: bool = None, + dropdown_shadow_color: str = None, + date_format: str = None, + date_input_placeholder: str = None, + date_advanced: bool = None, + date_width: float = None, + date_margin: float = None, + date_padding: float = None, + date_border_width: float = None, + date_border_style: str = None, + date_border_color: str = None, + date_border_radius: float = None, + date_align: str = None, + date_calendar_position_vertical: str = None, + date_calendar_position_horizontal: str = None, + rating_icon_type: str = None, + rating_icon_fill_base: str = None, + rating_icon_stroke_base: str = None, + rating_icon_fill_active: str = None, + rating_icon_stroke_active: str = None, + rating_advanced: bool = None, + rating_icon_width: float = None, + rating_icon_height: float = None, + rating_icon_margin: float = None, + rating_icon_stroke_width: float = None, + rating_container_width: float = None, + rating_wrap_margin_vertical: float = None, + rating_wrap_margin_horizontal: float = None, + rating_wrap_padding_vertical: float = None, + rating_wrap_padding_horizontal: float = None, + rating_label_width: float = None, + rating_label_color: str = None, + rating_label_position: str = None, + chart_slider_filter_controls_handle_color: str = None, + chart_slider_filter_controls_track_active_color: str = None, + chart_slider_filter_controls_track_base_color: str = None, + chart_slider_filter_controls_handle_size: float = None, + chart_slider_filter_controls_ticks: bool = None, + chart_slider_filter_controls_advanced: bool = None, + chart_slider_filter_controls_container_width: float = None, + chart_slider_filter_controls_wrap_margin_vertical: float = None, + chart_slider_filter_controls_wrap_margin_horizontal: float = None, + chart_slider_filter_controls_track_height: float = None, + chart_slider_filter_controls_track_border_radius: float = None, + chart_slider_filter_controls_track_border_color: str = None, + chart_slider_filter_controls_track_border_width: float = None, + chart_slider_filter_controls_handle_shape: str = None, + chart_slider_filter_controls_handle_width: float = None, + chart_slider_filter_controls_handle_border_color: str = None, + chart_slider_filter_controls_handle_border_width: float = None, + chart_slider_filter_controls_handle_border_radius: float = None, + chart_slider_filter_controls_handle_box_shadow: bool = None, + chart_slider_filter_controls_tooltips: bool = None, + chart_slider_filter_controls_tooltip_background: bool = None, + chart_slider_filter_controls_tick_color: str = None, + chart_slider_filter_controls_tick_padding: float = None, + chart_slider_filter_controls_tick_number_padding: float = None, + submit_comment_text: Union[list, str] = None, + submit_button_text: str = None, + submit_bg_type: str = None, + submit_bg_color: str = None, + submit_bg_image_src: str = None, + submit_border: bool = None, + submit_bg_image_size: str = None, + submit_advanced: bool = None, + submit_comment_font_size: str = None, + submit_comment_font_size_custom: float = None, + submit_comment_font_weight: str = None, + submit_comment_font_style: str = None, + submit_flex_direction: str = None, + submit_comment_font_color: str = None, + submit_comment_margin: float = None, + submit_button_font_size: str = None, + submit_button_font_size_custom: float = None, + submit_button_font_weight: str = None, + submit_button_font_style: str = None, + submit_button_margin: float = None, + submit_button_padding_factor: float = None, + submit_button_box_shadow: bool = None, + submit_button_use_default_styles: bool = None, + submit_button_bg_color: str = None, + submit_button_bg_color_hover: str = None, + submit_button_font_color: str = None, + submit_button_font_color_hover: str = None, + submit_button_border_style: str = None, + submit_button_border_color: str = None, + submit_button_border_width: float = None, + submit_button_border_transparency: float = None, + submit_button_border_radius: float = None, + design_controls_position: str = None, + design_controls_button_symbol_back: str = None, + design_controls_button_symbol_forward: str = None, + design_controls_button_font_color: str = None, + design_controls_button_font_size: float = None, + design_controls_advanced: bool = None, + design_controls_button_margin: float = None, + design_controls_button_padding_factor: float = None, + design_controls_button_bg_color: str = None, + design_controls_button_bg_opacity: float = None, + design_controls_button_font_weight: str = None, + design_controls_button_font_style: str = None, + design_controls_button_border_width: float = None, + design_controls_button_border_style: str = None, + design_controls_button_border_color: str = None, + design_controls_button_border_radius: float = None, + design_progress_show: bool = None, + design_progress_position: str = None, + design_progress_height: float = None, + design_progress_margin: float = None, + design_progress_bg_color: str = None, + design_progress_bg_opacity: float = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_number_localization_input_decimal_separator: str = None, + chart_number_localization_output_separators: str = None, + external_write_enabled: bool = None, + external_write_endpoint: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: calculator. + + + :param question_flow: Question flow. Choices: vertical, horizontal. Flourish type hint: string, defaults to None. + :type question_flow: str, optional + :param design_border_type: Border. Choices: border-bottom, border. Flourish type hint: string, defaults to None. + :type design_border_type: str, optional + :param design_border_color: Border color. Flourish type hint: color, defaults to None. + :type design_border_color: str, optional + :param design_background: Background. The background color of the cards. If not set, the background color in Layout is used. Flourish type hint: color, defaults to None. + :type design_background: str, optional + :param design_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type design_advanced: bool, optional + :param design_align_horizontal: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type design_align_horizontal: str, optional + :param design_align_vertical: Position. Choices: start, center, flex-end. Set the vertical text position if the window height is fixed and the text doesnt stretch across the full vertical card space. Flourish type hint: string, defaults to None. + :type design_align_vertical: str, optional + :param design_max_width: Max width (%). Flourish type hint: number, defaults to None. + :type design_max_width: float, optional + :param design_margin_vertical: Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_margin_vertical: float, optional + :param design_padding_vertical: Vertical padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_padding_vertical: float, optional + :param design_padding_horizontal: Horizontal padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_padding_horizontal: float, optional + :param design_border_width: Border width. Flourish type hint: number, defaults to None. + :type design_border_width: float, optional + :param design_border_style: Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type design_border_style: str, optional + :param design_border_radius: Roundness. Flourish type hint: number, defaults to None. + :type design_border_radius: float, optional + :param design_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type design_shadow: bool, optional + :param design_shadow_color: Shadow color. Shadow color as an RGBA value (red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). Flourish type hint: string, defaults to None. + :type design_shadow_color: str, optional + :param result_variables: Variables. Define variables to use in the Result field below. Set one variable per line in the format name = value Values can be: Numbers Text (single quotes for spaces) Question references like q_2 with the number representing the row number of each question in the Questions datasheet Previously defined variables (if wrapped into square brackets ) which will resolve to the answered value Excel functions, e.g., a = SUM(q_2, q_3) Flourish type hint: text, defaults to None. + :type result_variables: Union[list, str], optional + :param result_input: Result. Here you can compose your result view You have access to all variables you created above as well as all "q_" variables by referencing them in double curly braces like for example: `{{ my_variable }}` or `{{ q_6 }}` Flourish type hint: html, defaults to None. + :type result_input: Union[list, str], optional + :param result_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type result_advanced: bool, optional + :param result_font_size: Text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type result_font_size: str, optional + :param result_font_size_custom: Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type result_font_size_custom: float, optional + :param result_font_color: Color. Flourish type hint: color, defaults to None. + :type result_font_color: str, optional + :param result_font_weight: Text weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type result_font_weight: str, optional + :param result_font_style: Text style. Choices: normal, italic. Flourish type hint: string, defaults to None. + :type result_font_style: str, optional + :param result_border_type: Border. Choices: border-bottom, border. Flourish type hint: string, defaults to None. + :type result_border_type: str, optional + :param result_border_width: Border width. Flourish type hint: number, defaults to None. + :type result_border_width: float, optional + :param result_border_style: Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type result_border_style: str, optional + :param result_border_color: Border color. Flourish type hint: color, defaults to None. + :type result_border_color: str, optional + :param result_bg_type: Background. Choices: color, image. Flourish type hint: string, defaults to None. + :type result_bg_type: str, optional + :param result_bg_color: Background color. Flourish type hint: color, defaults to None. + :type result_bg_color: str, optional + :param result_bg_image_src: Image URL. Flourish type hint: url, defaults to None. + :type result_bg_image_src: str, optional + :param result_bg_image_size: Image size. Choices: auto, cover, contain. Flourish type hint: string, defaults to None. + :type result_bg_image_size: str, optional + :param design_question_font_size: Text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type design_question_font_size: str, optional + :param design_question_font_size_custom: Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type design_question_font_size_custom: float, optional + :param design_question_font_color: Color. The text color used for your questions. If not set, the text color in Layout is used. Flourish type hint: color, defaults to None. + :type design_question_font_color: str, optional + :param design_question_font_weight: Text weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type design_question_font_weight: str, optional + :param design_question_font_style: Text style. Choices: normal, italic. Flourish type hint: string, defaults to None. + :type design_question_font_style: str, optional + :param design_question_margin_vertical: Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_question_margin_vertical: float, optional + :param design_question_margin_horizontal: Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_question_margin_horizontal: float, optional + :param design_question_padding: Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_question_padding: float, optional + :param design_context_font_size: Text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type design_context_font_size: str, optional + :param design_context_font_size_custom: Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type design_context_font_size_custom: float, optional + :param design_context_font_color: Color. The text color used for your question context. If not set, the text color in Layout is used. Flourish type hint: color, defaults to None. + :type design_context_font_color: str, optional + :param design_context_font_weight: Text weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type design_context_font_weight: str, optional + :param design_context_font_style: Text style. Choices: normal, italic. Flourish type hint: string, defaults to None. + :type design_context_font_style: str, optional + :param design_context_margin_vertical: Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_context_margin_vertical: float, optional + :param design_context_margin_horizontal: Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_context_margin_horizontal: float, optional + :param design_question_bg_color: Background color. The background color for your questions and context. To change the background color of the whole question card, go to the General design settings. Flourish type hint: color, defaults to None. + :type design_question_bg_color: str, optional + :param design_question_bg_opacity: Background opacity. The opacity of the question background color. Flourish type hint: number, defaults to None. + :type design_question_bg_opacity: float, optional + :param design_question_border_radius: Roundness. The roundness of the question background container. Flourish type hint: number, defaults to None. + :type design_question_border_radius: float, optional + :param design_answer_margin_vertical: Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_answer_margin_vertical: float, optional + :param design_answer_margin_horizontal: Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_answer_margin_horizontal: float, optional + :param input_color: Color. Flourish type hint: color, defaults to None. + :type input_color: str, optional + :param input_background_color: Background color. Flourish type hint: color, defaults to None. + :type input_background_color: str, optional + :param input_width: Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type input_width: float, optional + :param number_input_placeholder: Number input placeholder. Flourish type hint: string, defaults to None. + :type number_input_placeholder: str, optional + :param text_input_placeholder: Text input placeholder. Flourish type hint: string, defaults to None. + :type text_input_placeholder: str, optional + :param input_input_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type input_input_advanced: bool, optional + :param input_border_color: Border color. Flourish type hint: color, defaults to None. + :type input_border_color: str, optional + :param input_border_radius: Roundness. Flourish type hint: number, defaults to None. + :type input_border_radius: float, optional + :param input_border_width: Border width. Flourish type hint: number, defaults to None. + :type input_border_width: float, optional + :param input_border_style: Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type input_border_style: str, optional + :param input_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type input_align: str, optional + :param input_margin: Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type input_margin: float, optional + :param input_padding: Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type input_padding: float, optional + :param button_font_size: Text size. Choices: 1, 1.2, 1.6, custom. Flourish type hint: string, defaults to None. + :type button_font_size: str, optional + :param button_font_size_custom: Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type button_font_size_custom: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param button_border_style: Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type button_border_style: str, optional + :param button_container_width: Button group width (%). The width of the button group as a percentage of the card width. Flourish type hint: number, defaults to None. + :type button_container_width: float, optional + :param button_justify_content: Align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type button_justify_content: str, optional + :param button_margin: Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type button_margin: float, optional + :param button_padding_factor: Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type button_padding_factor: float, optional + :param dropdown_font_size: Text size. Choices: 1, 1.2, 1.6, custom. Flourish type hint: string, defaults to None. + :type dropdown_font_size: str, optional + :param dropdown_font_size_custom: Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type dropdown_font_size_custom: float, optional + :param dropdown_placeholder: Placeholder. Flourish type hint: string, defaults to None. + :type dropdown_placeholder: str, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param dropdown_padding_factor: Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type dropdown_padding_factor: float, optional + :param dropdown_border_style: Border look. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type dropdown_border_style: str, optional + :param dropdown_font_weight: Text weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type dropdown_font_weight: str, optional + :param dropdown_font_style: Text style. Choices: normal, italic. Flourish type hint: string, defaults to None. + :type dropdown_font_style: str, optional + :param dropdown_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type dropdown_shadow: bool, optional + :param dropdown_shadow_color: Shadow color. Flourish type hint: string, defaults to None. + :type dropdown_shadow_color: str, optional + :param date_format: Format. Choices: y-m-d, d/m/_y, d/m/y, j/n/_y, j/n/y, d-m-_y, d-m-y, j-n-_y, j-n-y, d.m._y, d.m.y, j.n._y, j.n.y, m/d/_y, m/d/y, n/j/_y, n/j/y, m-d-_y, m-d-y, n-j-_y, n-j-y, m j, _y, f j, _y. Flourish type hint: string, defaults to None. + :type date_format: str, optional + :param date_input_placeholder: Placeholder. Flourish type hint: string, defaults to None. + :type date_input_placeholder: str, optional + :param date_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type date_advanced: bool, optional + :param date_width: Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type date_width: float, optional + :param date_margin: Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type date_margin: float, optional + :param date_padding: Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type date_padding: float, optional + :param date_border_width: Border width. Flourish type hint: number, defaults to None. + :type date_border_width: float, optional + :param date_border_style: Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type date_border_style: str, optional + :param date_border_color: Border color. Flourish type hint: color, defaults to None. + :type date_border_color: str, optional + :param date_border_radius: Roundness. Flourish type hint: number, defaults to None. + :type date_border_radius: float, optional + :param date_align: Text alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type date_align: str, optional + :param date_calendar_position_vertical: Calendar vertical position. Choices: auto, above, below. Flourish type hint: string, defaults to None. + :type date_calendar_position_vertical: str, optional + :param date_calendar_position_horizontal: Calendar horizontal position. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type date_calendar_position_horizontal: str, optional + :param rating_icon_type: Choices: star, circle, check. Flourish type hint: string, defaults to None. + :type rating_icon_type: str, optional + :param rating_icon_fill_base: Base fill color. Flourish type hint: color, defaults to None. + :type rating_icon_fill_base: str, optional + :param rating_icon_stroke_base: Base stroke color. Flourish type hint: color, defaults to None. + :type rating_icon_stroke_base: str, optional + :param rating_icon_fill_active: Active fill color. Flourish type hint: color, defaults to None. + :type rating_icon_fill_active: str, optional + :param rating_icon_stroke_active: Active stroke color. Flourish type hint: color, defaults to None. + :type rating_icon_stroke_active: str, optional + :param rating_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type rating_advanced: bool, optional + :param rating_icon_width: Width. Flourish type hint: number, defaults to None. + :type rating_icon_width: float, optional + :param rating_icon_height: Height. Flourish type hint: number, defaults to None. + :type rating_icon_height: float, optional + :param rating_icon_margin: Vertical margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type rating_icon_margin: float, optional + :param rating_icon_stroke_width: Stroke width (px). Flourish type hint: number, defaults to None. + :type rating_icon_stroke_width: float, optional + :param rating_container_width: Rating group width (%). The width of the rating group as a percentage of the card width. Flourish type hint: number, defaults to None. + :type rating_container_width: float, optional + :param rating_wrap_margin_vertical: Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type rating_wrap_margin_vertical: float, optional + :param rating_wrap_margin_horizontal: Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type rating_wrap_margin_horizontal: float, optional + :param rating_wrap_padding_vertical: Vertical padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type rating_wrap_padding_vertical: float, optional + :param rating_wrap_padding_horizontal: Horizontal padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type rating_wrap_padding_horizontal: float, optional + :param rating_label_width: Width. Flourish type hint: number, defaults to None. + :type rating_label_width: float, optional + :param rating_label_color: Color. Flourish type hint: color, defaults to None. + :type rating_label_color: str, optional + :param rating_label_position: Position. Choices: above, below. Flourish type hint: string, defaults to None. + :type rating_label_position: str, optional + :param chart_slider_filter_controls_handle_color: Handle color. Flourish type hint: color, defaults to None. + :type chart_slider_filter_controls_handle_color: str, optional + :param chart_slider_filter_controls_track_active_color: Track active color. Flourish type hint: color, defaults to None. + :type chart_slider_filter_controls_track_active_color: str, optional + :param chart_slider_filter_controls_track_base_color: Track background color. Flourish type hint: color, defaults to None. + :type chart_slider_filter_controls_track_base_color: str, optional + :param chart_slider_filter_controls_handle_size: Handle size. percentage of track height. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_handle_size: float, optional + :param chart_slider_filter_controls_ticks: Range ticks. Display the minimum and the maximum of the range at the left and right. Flourish type hint: boolean, defaults to None. + :type chart_slider_filter_controls_ticks: bool, optional + :param chart_slider_filter_controls_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_slider_filter_controls_advanced: bool, optional + :param chart_slider_filter_controls_container_width: Track width (%). The width of the track as a percentage of the card width. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_container_width: float, optional + :param chart_slider_filter_controls_wrap_margin_vertical: Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_wrap_margin_vertical: float, optional + :param chart_slider_filter_controls_wrap_margin_horizontal: Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_wrap_margin_horizontal: float, optional + :param chart_slider_filter_controls_track_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_track_height: float, optional + :param chart_slider_filter_controls_track_border_radius: Roundness. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_track_border_radius: float, optional + :param chart_slider_filter_controls_track_border_color: Border color. Flourish type hint: color, defaults to None. + :type chart_slider_filter_controls_track_border_color: str, optional + :param chart_slider_filter_controls_track_border_width: Border width. The width of the border around the card, in rems Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_track_border_width: float, optional + :param chart_slider_filter_controls_handle_shape: Shape. Choices: rectangle, circle. Flourish type hint: string, defaults to None. + :type chart_slider_filter_controls_handle_shape: str, optional + :param chart_slider_filter_controls_handle_width: Width. % of Size (the handle height). Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_handle_width: float, optional + :param chart_slider_filter_controls_handle_border_color: Stroke color. Flourish type hint: color, defaults to None. + :type chart_slider_filter_controls_handle_border_color: str, optional + :param chart_slider_filter_controls_handle_border_width: Stroke width. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_handle_border_width: float, optional + :param chart_slider_filter_controls_handle_border_radius: Roundness. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_handle_border_radius: float, optional + :param chart_slider_filter_controls_handle_box_shadow: Box shadow. Flourish type hint: boolean, defaults to None. + :type chart_slider_filter_controls_handle_box_shadow: bool, optional + :param chart_slider_filter_controls_tooltips: Tooltip. Flourish type hint: boolean, defaults to None. + :type chart_slider_filter_controls_tooltips: bool, optional + :param chart_slider_filter_controls_tooltip_background: Tooltip background. Flourish type hint: boolean, defaults to None. + :type chart_slider_filter_controls_tooltip_background: bool, optional + :param chart_slider_filter_controls_tick_color: Tick color. Flourish type hint: color, defaults to None. + :type chart_slider_filter_controls_tick_color: str, optional + :param chart_slider_filter_controls_tick_padding: Tick padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_tick_padding: float, optional + :param chart_slider_filter_controls_tick_number_padding: Number padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_tick_number_padding: float, optional + :param submit_comment_text: Submit label. Flourish type hint: text, defaults to None. + :type submit_comment_text: Union[list, str], optional + :param submit_button_text: Submit button text. Flourish type hint: string, defaults to None. + :type submit_button_text: str, optional + :param submit_bg_type: Background. Choices: color, image. Flourish type hint: string, defaults to None. + :type submit_bg_type: str, optional + :param submit_bg_color: Color. Flourish type hint: color, defaults to None. + :type submit_bg_color: str, optional + :param submit_bg_image_src: Image URL. Flourish type hint: url, defaults to None. + :type submit_bg_image_src: str, optional + :param submit_border: Border. Flourish type hint: boolean, defaults to None. + :type submit_border: bool, optional + :param submit_bg_image_size: Image size. Choices: auto, cover, contain. Flourish type hint: string, defaults to None. + :type submit_bg_image_size: str, optional + :param submit_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type submit_advanced: bool, optional + :param submit_comment_font_size: Label size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type submit_comment_font_size: str, optional + :param submit_comment_font_size_custom: Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type submit_comment_font_size_custom: float, optional + :param submit_comment_font_weight: Text weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type submit_comment_font_weight: str, optional + :param submit_comment_font_style: Text style. Choices: normal, italic. Flourish type hint: string, defaults to None. + :type submit_comment_font_style: str, optional + :param submit_flex_direction: Label position. Choices: column, column-reverse. Flourish type hint: string, defaults to None. + :type submit_flex_direction: str, optional + :param submit_comment_font_color: Label color. Flourish type hint: color, defaults to None. + :type submit_comment_font_color: str, optional + :param submit_comment_margin: Vertical margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type submit_comment_margin: float, optional + :param submit_button_font_size: Button text size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type submit_button_font_size: str, optional + :param submit_button_font_size_custom: Custom. Specify a custom responsive text size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type submit_button_font_size_custom: float, optional + :param submit_button_font_weight: Button text weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type submit_button_font_weight: str, optional + :param submit_button_font_style: Text style. Choices: normal, italic. Flourish type hint: string, defaults to None. + :type submit_button_font_style: str, optional + :param submit_button_margin: Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type submit_button_margin: float, optional + :param submit_button_padding_factor: Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type submit_button_padding_factor: float, optional + :param submit_button_box_shadow: Hover shadow. Flourish type hint: boolean, defaults to None. + :type submit_button_box_shadow: bool, optional + :param submit_button_use_default_styles: Use answer button styles. Flourish type hint: boolean, defaults to None. + :type submit_button_use_default_styles: bool, optional + :param submit_button_bg_color: Background. Flourish type hint: color, defaults to None. + :type submit_button_bg_color: str, optional + :param submit_button_bg_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type submit_button_bg_color_hover: str, optional + :param submit_button_font_color: Text color. Flourish type hint: color, defaults to None. + :type submit_button_font_color: str, optional + :param submit_button_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type submit_button_font_color_hover: str, optional + :param submit_button_border_style: Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type submit_button_border_style: str, optional + :param submit_button_border_color: Color. Flourish type hint: color, defaults to None. + :type submit_button_border_color: str, optional + :param submit_button_border_width: Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type submit_button_border_width: float, optional + :param submit_button_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type submit_button_border_transparency: float, optional + :param submit_button_border_radius: Roundness. Flourish type hint: number, defaults to None. + :type submit_button_border_radius: float, optional + :param design_controls_position: Position. Choices: top_left, top_centre, top_right, bottom_left, bottom_centre, bottom_right. Flourish type hint: string, defaults to None. + :type design_controls_position: str, optional + :param design_controls_button_symbol_back: Back button. Flourish type hint: string, defaults to None. + :type design_controls_button_symbol_back: str, optional + :param design_controls_button_symbol_forward: Forward button. Flourish type hint: string, defaults to None. + :type design_controls_button_symbol_forward: str, optional + :param design_controls_button_font_color: Color. Flourish type hint: color, defaults to None. + :type design_controls_button_font_color: str, optional + :param design_controls_button_font_size: Size. Flourish type hint: number, defaults to None. + :type design_controls_button_font_size: float, optional + :param design_controls_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type design_controls_advanced: bool, optional + :param design_controls_button_margin: Margin. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_controls_button_margin: float, optional + :param design_controls_button_padding_factor: Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_controls_button_padding_factor: float, optional + :param design_controls_button_bg_color: Background color. Flourish type hint: color, defaults to None. + :type design_controls_button_bg_color: str, optional + :param design_controls_button_bg_opacity: Background opacity. Flourish type hint: number, defaults to None. + :type design_controls_button_bg_opacity: float, optional + :param design_controls_button_font_weight: Text weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type design_controls_button_font_weight: str, optional + :param design_controls_button_font_style: Text style. Choices: normal, italic. Flourish type hint: string, defaults to None. + :type design_controls_button_font_style: str, optional + :param design_controls_button_border_width: Border width. Flourish type hint: number, defaults to None. + :type design_controls_button_border_width: float, optional + :param design_controls_button_border_style: Border style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type design_controls_button_border_style: str, optional + :param design_controls_button_border_color: Border color. Flourish type hint: color, defaults to None. + :type design_controls_button_border_color: str, optional + :param design_controls_button_border_radius: Roundness. Flourish type hint: number, defaults to None. + :type design_controls_button_border_radius: float, optional + :param design_progress_show: Show progress bar. Flourish type hint: boolean, defaults to None. + :type design_progress_show: bool, optional + :param design_progress_position: Position. Choices: top, bottom. Flourish type hint: string, defaults to None. + :type design_progress_position: str, optional + :param design_progress_height: Height. Flourish type hint: number, defaults to None. + :type design_progress_height: float, optional + :param design_progress_margin: Horizontal margins. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type design_progress_margin: float, optional + :param design_progress_bg_color: Background color. Flourish type hint: color, defaults to None. + :type design_progress_bg_color: str, optional + :param design_progress_bg_opacity: Background opacity. Flourish type hint: number, defaults to None. + :type design_progress_bg_opacity: float, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_number_localization_input_decimal_separator: Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to None. + :type chart_number_localization_input_decimal_separator: str, optional + :param chart_number_localization_output_separators: Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to None. + :type chart_number_localization_output_separators: str, optional + :param external_write_enabled: Store result data externally. Flourish type hint: boolean, defaults to None. + :type external_write_enabled: bool, optional + :param external_write_endpoint: Storage endpoint. Your external database, store, API or web app endpoint to post data to. If you were to use Google Sheets to store your data, please check the External write docs for integration help. Flourish type hint: string, defaults to None. + :type external_write_endpoint: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "design": { + "question": {}, + "context": {}, + "answer": {}, + "controls": {"button": {}}, + "progress": {}, + }, + "result": {}, + "input": {}, + "number": {}, + "text": {}, + "button": {}, + "button_style": {}, + "dropdown": {}, + "dropdown_style": {}, + "date": {"calendar_position": {}}, + "rating": {}, + "slider": {}, + "submit": {"comment": {}, "button": {}}, + "number_format": {}, + "localization": {}, + "external_write": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_question_flow = ["vertical", "horizontal"] + [None] + if question_flow not in list_question_flow: + raise ValueError( + f"`question_flow` must be one of: ['vertical', 'horizontal']" + ) + elif question_flow in list_question_flow and question_flow is not None: + filtered_dict = { + k: v + for (k, v) in { + "vertical": "vertical", + "horizontal": "horizontal", + }.items() + if question_flow in k + } + if len(filtered_dict) > 0: + self.state["state"]["question_flow"] = filtered_dict[question_flow] + + list_design_border_type = ["border-bottom", "border"] + [None] + if design_border_type not in list_design_border_type: + raise ValueError( + f"`design_border_type` must be one of: ['border-bottom', 'border']" + ) + elif ( + design_border_type in list_design_border_type + and design_border_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "border-bottom": "border-bottom", + "border": "border", + }.items() + if design_border_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["border_type"] = filtered_dict[ + design_border_type + ] + self.state["state"]["design"]["border_color"] = design_border_color + self.state["state"]["design"]["background"] = design_background + self.state["state"]["design"]["advanced"] = design_advanced + + list_design_align_horizontal = ["start", "center", "end"] + [None] + if design_align_horizontal not in list_design_align_horizontal: + raise ValueError( + f"`design_align_horizontal` must be one of: ['start', 'center', 'end']" + ) + elif ( + design_align_horizontal in list_design_align_horizontal + and design_align_horizontal is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if design_align_horizontal in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["align_horizontal"] = filtered_dict[ + design_align_horizontal + ] + + list_design_align_vertical = ["start", "center", "flex-end"] + [None] + if design_align_vertical not in list_design_align_vertical: + raise ValueError( + f"`design_align_vertical` must be one of: ['start', 'center', 'flex-end']" + ) + elif ( + design_align_vertical in list_design_align_vertical + and design_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "flex-end": "flex-end", + }.items() + if design_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["align_vertical"] = filtered_dict[ + design_align_vertical + ] + self.state["state"]["design"]["max_width"] = design_max_width + self.state["state"]["design"]["margin_vertical"] = design_margin_vertical + self.state["state"]["design"]["padding_vertical"] = design_padding_vertical + self.state["state"]["design"]["padding_horizontal"] = design_padding_horizontal + self.state["state"]["design"]["border_width"] = design_border_width + + list_design_border_style = ["solid", "dashed", "dotted"] + [None] + if design_border_style not in list_design_border_style: + raise ValueError( + f"`design_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + design_border_style in list_design_border_style + and design_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if design_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["border_style"] = filtered_dict[ + design_border_style + ] + self.state["state"]["design"]["border_radius"] = design_border_radius + self.state["state"]["design"]["shadow"] = design_shadow + self.state["state"]["design"]["shadow_color"] = design_shadow_color + + if ( + result_variables is not None + and len(result_variables) > 1 + and isinstance(result_variables, list) + ): + self.state["state"]["result"]["variables"] = " \n ".join(result_variables) + else: + self.state["state"]["result"]["variables"] = result_variables + + if ( + result_input is not None + and len(result_input) > 1 + and isinstance(result_input, list) + ): + self.state["state"]["result"]["input"] = " \n ".join(result_input) + else: + self.state["state"]["result"]["input"] = result_input + + self.state["state"]["result"]["advanced"] = result_advanced + + list_result_font_size = ["1.4", "1.6", "2", "custom"] + [None] + if result_font_size not in list_result_font_size: + raise ValueError( + f"`result_font_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif result_font_size in list_result_font_size and result_font_size is not None: + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if result_font_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["result"]["font_size"] = filtered_dict[ + result_font_size + ] + self.state["state"]["result"]["font_size_custom"] = result_font_size_custom + self.state["state"]["result"]["font_color"] = result_font_color + + list_result_font_weight = ["normal", "bold"] + [None] + if result_font_weight not in list_result_font_weight: + raise ValueError(f"`result_font_weight` must be one of: ['normal', 'bold']") + elif ( + result_font_weight in list_result_font_weight + and result_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if result_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["result"]["font_weight"] = filtered_dict[ + result_font_weight + ] + + list_result_font_style = ["normal", "italic"] + [None] + if result_font_style not in list_result_font_style: + raise ValueError( + f"`result_font_style` must be one of: ['normal', 'italic']" + ) + elif ( + result_font_style in list_result_font_style + and result_font_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "italic": "italic"}.items() + if result_font_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["result"]["font_style"] = filtered_dict[ + result_font_style + ] + + list_result_border_type = ["border-bottom", "border"] + [None] + if result_border_type not in list_result_border_type: + raise ValueError( + f"`result_border_type` must be one of: ['border-bottom', 'border']" + ) + elif ( + result_border_type in list_result_border_type + and result_border_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "border-bottom": "border-bottom", + "border": "border", + }.items() + if result_border_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["result"]["border_type"] = filtered_dict[ + result_border_type + ] + self.state["state"]["result"]["border_width"] = result_border_width + + list_result_border_style = ["solid", "dashed", "dotted"] + [None] + if result_border_style not in list_result_border_style: + raise ValueError( + f"`result_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + result_border_style in list_result_border_style + and result_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if result_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["result"]["border_style"] = filtered_dict[ + result_border_style + ] + self.state["state"]["result"]["border_color"] = result_border_color + + list_result_bg_type = ["color", "image"] + [None] + if result_bg_type not in list_result_bg_type: + raise ValueError(f"`result_bg_type` must be one of: ['color', 'image']") + elif result_bg_type in list_result_bg_type and result_bg_type is not None: + filtered_dict = { + k: v + for (k, v) in {"color": "color", "image": "image"}.items() + if result_bg_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["result"]["bg_type"] = filtered_dict[result_bg_type] + self.state["state"]["result"]["bg_color"] = result_bg_color + self.state["state"]["result"]["bg_image_src"] = result_bg_image_src + + list_result_bg_image_size = ["auto", "cover", "contain"] + [None] + if result_bg_image_size not in list_result_bg_image_size: + raise ValueError( + f"`result_bg_image_size` must be one of: ['auto', 'cover', 'contain']" + ) + elif ( + result_bg_image_size in list_result_bg_image_size + and result_bg_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "cover": "cover", + "contain": "contain", + }.items() + if result_bg_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["result"]["bg_image_size"] = filtered_dict[ + result_bg_image_size + ] + + list_design_question_font_size = ["1.4", "1.6", "2", "custom"] + [None] + if design_question_font_size not in list_design_question_font_size: + raise ValueError( + f"`design_question_font_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + design_question_font_size in list_design_question_font_size + and design_question_font_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if design_question_font_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["question"]["font_size"] = filtered_dict[ + design_question_font_size + ] + self.state["state"]["design"]["question"][ + "font_size_custom" + ] = design_question_font_size_custom + self.state["state"]["design"]["question"][ + "font_color" + ] = design_question_font_color + + list_design_question_font_weight = ["normal", "bold"] + [None] + if design_question_font_weight not in list_design_question_font_weight: + raise ValueError( + f"`design_question_font_weight` must be one of: ['normal', 'bold']" + ) + elif ( + design_question_font_weight in list_design_question_font_weight + and design_question_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if design_question_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["question"][ + "font_weight" + ] = filtered_dict[design_question_font_weight] + + list_design_question_font_style = ["normal", "italic"] + [None] + if design_question_font_style not in list_design_question_font_style: + raise ValueError( + f"`design_question_font_style` must be one of: ['normal', 'italic']" + ) + elif ( + design_question_font_style in list_design_question_font_style + and design_question_font_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "italic": "italic"}.items() + if design_question_font_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["question"]["font_style"] = filtered_dict[ + design_question_font_style + ] + self.state["state"]["design"]["question"][ + "margin_vertical" + ] = design_question_margin_vertical + self.state["state"]["design"]["question"][ + "margin_horizontal" + ] = design_question_margin_horizontal + self.state["state"]["design"]["question"]["padding"] = design_question_padding + + list_design_context_font_size = ["1.4", "1.6", "2", "custom"] + [None] + if design_context_font_size not in list_design_context_font_size: + raise ValueError( + f"`design_context_font_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + design_context_font_size in list_design_context_font_size + and design_context_font_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if design_context_font_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["context"]["font_size"] = filtered_dict[ + design_context_font_size + ] + self.state["state"]["design"]["context"][ + "font_size_custom" + ] = design_context_font_size_custom + self.state["state"]["design"]["context"][ + "font_color" + ] = design_context_font_color + + list_design_context_font_weight = ["normal", "bold"] + [None] + if design_context_font_weight not in list_design_context_font_weight: + raise ValueError( + f"`design_context_font_weight` must be one of: ['normal', 'bold']" + ) + elif ( + design_context_font_weight in list_design_context_font_weight + and design_context_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if design_context_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["context"]["font_weight"] = filtered_dict[ + design_context_font_weight + ] + + list_design_context_font_style = ["normal", "italic"] + [None] + if design_context_font_style not in list_design_context_font_style: + raise ValueError( + f"`design_context_font_style` must be one of: ['normal', 'italic']" + ) + elif ( + design_context_font_style in list_design_context_font_style + and design_context_font_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "italic": "italic"}.items() + if design_context_font_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["context"]["font_style"] = filtered_dict[ + design_context_font_style + ] + self.state["state"]["design"]["context"][ + "margin_vertical" + ] = design_context_margin_vertical + self.state["state"]["design"]["context"][ + "margin_horizontal" + ] = design_context_margin_horizontal + self.state["state"]["design"]["question"]["bg_color"] = design_question_bg_color + self.state["state"]["design"]["question"][ + "bg_opacity" + ] = design_question_bg_opacity + self.state["state"]["design"]["question"][ + "border_radius" + ] = design_question_border_radius + self.state["state"]["design"]["answer"][ + "margin_vertical" + ] = design_answer_margin_vertical + self.state["state"]["design"]["answer"][ + "margin_horizontal" + ] = design_answer_margin_horizontal + self.state["state"]["input"]["color"] = input_color + self.state["state"]["input"]["background_color"] = input_background_color + self.state["state"]["input"]["width"] = input_width + self.state["state"]["number"]["input_placeholder"] = number_input_placeholder + self.state["state"]["text"]["input_placeholder"] = text_input_placeholder + self.state["state"]["input"]["input_advanced"] = input_input_advanced + self.state["state"]["input"]["border_color"] = input_border_color + self.state["state"]["input"]["border_radius"] = input_border_radius + self.state["state"]["input"]["border_width"] = input_border_width + + list_input_border_style = ["solid", "dashed", "dotted"] + [None] + if input_border_style not in list_input_border_style: + raise ValueError( + f"`input_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + input_border_style in list_input_border_style + and input_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if input_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["input"]["border_style"] = filtered_dict[ + input_border_style + ] + + list_input_align = ["start", "center", "end"] + [None] + if input_align not in list_input_align: + raise ValueError( + f"`input_align` must be one of: ['start', 'center', 'end']" + ) + elif input_align in list_input_align and input_align is not None: + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if input_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["input"]["align"] = filtered_dict[input_align] + self.state["state"]["input"]["margin"] = input_margin + self.state["state"]["input"]["padding"] = input_padding + + list_button_font_size = ["1", "1.2", "1.6", "custom"] + [None] + if button_font_size not in list_button_font_size: + raise ValueError( + f"`button_font_size` must be one of: ['1', '1.2', '1.6', 'custom']" + ) + elif button_font_size in list_button_font_size and button_font_size is not None: + filtered_dict = { + k: v + for (k, v) in { + "1": "1", + "1.2": "1.2", + "1.6": "1.6", + "custom": "custom", + }.items() + if button_font_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["button"]["font_size"] = filtered_dict[ + button_font_size + ] + self.state["state"]["button"]["font_size_custom"] = button_font_size_custom + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + + list_button_border_style = ["solid", "dashed", "dotted"] + [None] + if button_border_style not in list_button_border_style: + raise ValueError( + f"`button_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + button_border_style in list_button_border_style + and button_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if button_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["button"]["border_style"] = filtered_dict[ + button_border_style + ] + self.state["state"]["button"]["container_width"] = button_container_width + + list_button_justify_content = ["flex-start", "center", "flex-end"] + [None] + if button_justify_content not in list_button_justify_content: + raise ValueError( + f"`button_justify_content` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + button_justify_content in list_button_justify_content + and button_justify_content is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if button_justify_content in k + } + if len(filtered_dict) > 0: + self.state["state"]["button"]["justify_content"] = filtered_dict[ + button_justify_content + ] + self.state["state"]["button"]["margin"] = button_margin + self.state["state"]["button"]["padding_factor"] = button_padding_factor + + list_dropdown_font_size = ["1", "1.2", "1.6", "custom"] + [None] + if dropdown_font_size not in list_dropdown_font_size: + raise ValueError( + f"`dropdown_font_size` must be one of: ['1', '1.2', '1.6', 'custom']" + ) + elif ( + dropdown_font_size in list_dropdown_font_size + and dropdown_font_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1": "1", + "1.2": "1.2", + "1.6": "1.6", + "custom": "custom", + }.items() + if dropdown_font_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown"]["font_size"] = filtered_dict[ + dropdown_font_size + ] + self.state["state"]["dropdown"]["font_size_custom"] = dropdown_font_size_custom + self.state["state"]["dropdown"]["placeholder"] = dropdown_placeholder + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["dropdown"]["padding_factor"] = dropdown_padding_factor + + list_dropdown_border_style = ["solid", "dashed", "dotted"] + [None] + if dropdown_border_style not in list_dropdown_border_style: + raise ValueError( + f"`dropdown_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + dropdown_border_style in list_dropdown_border_style + and dropdown_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if dropdown_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown"]["border_style"] = filtered_dict[ + dropdown_border_style + ] + + list_dropdown_font_weight = ["normal", "bold"] + [None] + if dropdown_font_weight not in list_dropdown_font_weight: + raise ValueError( + f"`dropdown_font_weight` must be one of: ['normal', 'bold']" + ) + elif ( + dropdown_font_weight in list_dropdown_font_weight + and dropdown_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if dropdown_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown"]["font_weight"] = filtered_dict[ + dropdown_font_weight + ] + + list_dropdown_font_style = ["normal", "italic"] + [None] + if dropdown_font_style not in list_dropdown_font_style: + raise ValueError( + f"`dropdown_font_style` must be one of: ['normal', 'italic']" + ) + elif ( + dropdown_font_style in list_dropdown_font_style + and dropdown_font_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "italic": "italic"}.items() + if dropdown_font_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown"]["font_style"] = filtered_dict[ + dropdown_font_style + ] + self.state["state"]["dropdown"]["shadow"] = dropdown_shadow + self.state["state"]["dropdown"]["shadow_color"] = dropdown_shadow_color + + list_date_format = [ + "y-m-d", + "d/m/_y", + "d/m/y", + "j/n/_y", + "j/n/y", + "d-m-_y", + "d-m-y", + "j-n-_y", + "j-n-y", + "d.m._y", + "d.m.y", + "j.n._y", + "j.n.y", + "m/d/_y", + "m/d/y", + "n/j/_y", + "n/j/y", + "m-d-_y", + "m-d-y", + "n-j-_y", + "n-j-y", + "m j, _y", + "f j, _y", + ] + [None] + if date_format not in list_date_format: + raise ValueError( + f"`date_format` must be one of: ['y-m-d', 'd/m/_y', 'd/m/y', 'j/n/_y', 'j/n/y', 'd-m-_y', 'd-m-y', 'j-n-_y', 'j-n-y', 'd.m._y', 'd.m.y', 'j.n._y', 'j.n.y', 'm/d/_y', 'm/d/y', 'n/j/_y', 'n/j/y', 'm-d-_y', 'm-d-y', 'n-j-_y', 'n-j-y', 'm j, _y', 'f j, _y']" + ) + elif date_format in list_date_format and date_format is not None: + filtered_dict = { + k: v + for (k, v) in { + "y-m-d": "Y-m-d", + "d/m/_y": "d/m/Y", + "d/m/y": "d/m/y", + "j/n/_y": "j/n/Y", + "j/n/y": "j/n/y", + "d-m-_y": "d-m-Y", + "d-m-y": "d-m-y", + "j-n-_y": "j-n-Y", + "j-n-y": "j-n-y", + "d.m._y": "d.m.Y", + "d.m.y": "d.m.y", + "j.n._y": "j.n.Y", + "j.n.y": "j.n.y", + "m/d/_y": "m/d/Y", + "m/d/y": "m/d/y", + "n/j/_y": "n/j/Y", + "n/j/y": "n/j/y", + "m-d-_y": "m-d-Y", + "m-d-y": "m-d-y", + "n-j-_y": "n-j-Y", + "n-j-y": "n-j-y", + "m j, _y": "M j, Y", + "f j, _y": "F j, Y", + }.items() + if date_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["date"]["format"] = filtered_dict[date_format] + self.state["state"]["date"]["input_placeholder"] = date_input_placeholder + self.state["state"]["date"]["advanced"] = date_advanced + self.state["state"]["date"]["width"] = date_width + self.state["state"]["date"]["margin"] = date_margin + self.state["state"]["date"]["padding"] = date_padding + self.state["state"]["date"]["border_width"] = date_border_width + + list_date_border_style = ["solid", "dashed", "dotted"] + [None] + if date_border_style not in list_date_border_style: + raise ValueError( + f"`date_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + date_border_style in list_date_border_style + and date_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if date_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["date"]["border_style"] = filtered_dict[ + date_border_style + ] + self.state["state"]["date"]["border_color"] = date_border_color + self.state["state"]["date"]["border_radius"] = date_border_radius + + list_date_align = ["start", "center", "end"] + [None] + if date_align not in list_date_align: + raise ValueError(f"`date_align` must be one of: ['start', 'center', 'end']") + elif date_align in list_date_align and date_align is not None: + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if date_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["date"]["align"] = filtered_dict[date_align] + + list_date_calendar_position_vertical = ["auto", "above", "below"] + [None] + if date_calendar_position_vertical not in list_date_calendar_position_vertical: + raise ValueError( + f"`date_calendar_position_vertical` must be one of: ['auto', 'above', 'below']" + ) + elif ( + date_calendar_position_vertical in list_date_calendar_position_vertical + and date_calendar_position_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "above": "above", + "below": "below", + }.items() + if date_calendar_position_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["date"]["calendar_position"][ + "vertical" + ] = filtered_dict[date_calendar_position_vertical] + + list_date_calendar_position_horizontal = ["left", "center", "right"] + [None] + if ( + date_calendar_position_horizontal + not in list_date_calendar_position_horizontal + ): + raise ValueError( + f"`date_calendar_position_horizontal` must be one of: ['left', 'center', 'right']" + ) + elif ( + date_calendar_position_horizontal in list_date_calendar_position_horizontal + and date_calendar_position_horizontal is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if date_calendar_position_horizontal in k + } + if len(filtered_dict) > 0: + self.state["state"]["date"]["calendar_position"][ + "horizontal" + ] = filtered_dict[date_calendar_position_horizontal] + + list_rating_icon_type = ["star", "circle", "check"] + [None] + if rating_icon_type not in list_rating_icon_type: + raise ValueError( + f"`rating_icon_type` must be one of: ['star', 'circle', 'check']" + ) + elif rating_icon_type in list_rating_icon_type and rating_icon_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "star": "star", + "circle": "circle", + "check": "check", + }.items() + if rating_icon_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["rating"]["icon_type"] = filtered_dict[ + rating_icon_type + ] + self.state["state"]["rating"]["icon_fill_base"] = rating_icon_fill_base + self.state["state"]["rating"]["icon_stroke_base"] = rating_icon_stroke_base + self.state["state"]["rating"]["icon_fill_active"] = rating_icon_fill_active + self.state["state"]["rating"]["icon_stroke_active"] = rating_icon_stroke_active + self.state["state"]["rating"]["advanced"] = rating_advanced + self.state["state"]["rating"]["icon_width"] = rating_icon_width + self.state["state"]["rating"]["icon_height"] = rating_icon_height + self.state["state"]["rating"]["icon_margin"] = rating_icon_margin + self.state["state"]["rating"]["icon_stroke_width"] = rating_icon_stroke_width + self.state["state"]["rating"]["container_width"] = rating_container_width + self.state["state"]["rating"][ + "wrap_margin_vertical" + ] = rating_wrap_margin_vertical + self.state["state"]["rating"][ + "wrap_margin_horizontal" + ] = rating_wrap_margin_horizontal + self.state["state"]["rating"][ + "wrap_padding_vertical" + ] = rating_wrap_padding_vertical + self.state["state"]["rating"][ + "wrap_padding_horizontal" + ] = rating_wrap_padding_horizontal + self.state["state"]["rating"]["label_width"] = rating_label_width + self.state["state"]["rating"]["label_color"] = rating_label_color + + list_rating_label_position = ["above", "below"] + [None] + if rating_label_position not in list_rating_label_position: + raise ValueError( + f"`rating_label_position` must be one of: ['above', 'below']" + ) + elif ( + rating_label_position in list_rating_label_position + and rating_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"above": "above", "below": "below"}.items() + if rating_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["rating"]["label_position"] = filtered_dict[ + rating_label_position + ] + self.state["state"]["slider"][ + "handle_color" + ] = chart_slider_filter_controls_handle_color + self.state["state"]["slider"][ + "track_active_color" + ] = chart_slider_filter_controls_track_active_color + self.state["state"]["slider"][ + "track_base_color" + ] = chart_slider_filter_controls_track_base_color + self.state["state"]["slider"][ + "handle_size" + ] = chart_slider_filter_controls_handle_size + self.state["state"]["slider"]["ticks"] = chart_slider_filter_controls_ticks + self.state["state"]["slider"][ + "advanced" + ] = chart_slider_filter_controls_advanced + self.state["state"]["slider"][ + "container_width" + ] = chart_slider_filter_controls_container_width + self.state["state"]["slider"][ + "wrap_margin_vertical" + ] = chart_slider_filter_controls_wrap_margin_vertical + self.state["state"]["slider"][ + "wrap_margin_horizontal" + ] = chart_slider_filter_controls_wrap_margin_horizontal + self.state["state"]["slider"][ + "track_height" + ] = chart_slider_filter_controls_track_height + self.state["state"]["slider"][ + "track_border_radius" + ] = chart_slider_filter_controls_track_border_radius + self.state["state"]["slider"][ + "track_border_color" + ] = chart_slider_filter_controls_track_border_color + self.state["state"]["slider"][ + "track_border_width" + ] = chart_slider_filter_controls_track_border_width + + list_chart_slider_filter_controls_handle_shape = ["rectangle", "circle"] + [ + None + ] + if ( + chart_slider_filter_controls_handle_shape + not in list_chart_slider_filter_controls_handle_shape + ): + raise ValueError( + f"`chart_slider_filter_controls_handle_shape` must be one of: ['rectangle', 'circle']" + ) + elif ( + chart_slider_filter_controls_handle_shape + in list_chart_slider_filter_controls_handle_shape + and chart_slider_filter_controls_handle_shape is not None + ): + filtered_dict = { + k: v + for (k, v) in {"rectangle": "rectangle", "circle": "circle"}.items() + if chart_slider_filter_controls_handle_shape in k + } + if len(filtered_dict) > 0: + self.state["state"]["slider"]["handle_shape"] = filtered_dict[ + chart_slider_filter_controls_handle_shape + ] + self.state["state"]["slider"][ + "handle_width" + ] = chart_slider_filter_controls_handle_width + self.state["state"]["slider"][ + "handle_border_color" + ] = chart_slider_filter_controls_handle_border_color + self.state["state"]["slider"][ + "handle_border_width" + ] = chart_slider_filter_controls_handle_border_width + self.state["state"]["slider"][ + "handle_border_radius" + ] = chart_slider_filter_controls_handle_border_radius + self.state["state"]["slider"][ + "handle_box_shadow" + ] = chart_slider_filter_controls_handle_box_shadow + self.state["state"]["slider"][ + "tooltips" + ] = chart_slider_filter_controls_tooltips + self.state["state"]["slider"][ + "tooltip_background" + ] = chart_slider_filter_controls_tooltip_background + self.state["state"]["slider"][ + "tick_color" + ] = chart_slider_filter_controls_tick_color + self.state["state"]["slider"][ + "tick_padding" + ] = chart_slider_filter_controls_tick_padding + self.state["state"]["slider"][ + "tick_number_padding" + ] = chart_slider_filter_controls_tick_number_padding + + if ( + submit_comment_text is not None + and len(submit_comment_text) > 1 + and isinstance(submit_comment_text, list) + ): + self.state["state"]["submit"]["comment"]["text"] = " \n ".join( + submit_comment_text + ) + else: + self.state["state"]["submit"]["comment"]["text"] = submit_comment_text + + self.state["state"]["submit"]["button"]["text"] = submit_button_text + + list_submit_bg_type = ["color", "image"] + [None] + if submit_bg_type not in list_submit_bg_type: + raise ValueError(f"`submit_bg_type` must be one of: ['color', 'image']") + elif submit_bg_type in list_submit_bg_type and submit_bg_type is not None: + filtered_dict = { + k: v + for (k, v) in {"color": "color", "image": "image"}.items() + if submit_bg_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["submit"]["bg_type"] = filtered_dict[submit_bg_type] + self.state["state"]["submit"]["bg_color"] = submit_bg_color + self.state["state"]["submit"]["bg_image_src"] = submit_bg_image_src + self.state["state"]["submit"]["border"] = submit_border + + list_submit_bg_image_size = ["auto", "cover", "contain"] + [None] + if submit_bg_image_size not in list_submit_bg_image_size: + raise ValueError( + f"`submit_bg_image_size` must be one of: ['auto', 'cover', 'contain']" + ) + elif ( + submit_bg_image_size in list_submit_bg_image_size + and submit_bg_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "cover": "cover", + "contain": "contain", + }.items() + if submit_bg_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["submit"]["bg_image_size"] = filtered_dict[ + submit_bg_image_size + ] + self.state["state"]["submit"]["advanced"] = submit_advanced + + list_submit_comment_font_size = ["1.4", "1.6", "2", "custom"] + [None] + if submit_comment_font_size not in list_submit_comment_font_size: + raise ValueError( + f"`submit_comment_font_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + submit_comment_font_size in list_submit_comment_font_size + and submit_comment_font_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if submit_comment_font_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["submit"]["comment"]["font_size"] = filtered_dict[ + submit_comment_font_size + ] + self.state["state"]["submit"]["comment"][ + "font_size_custom" + ] = submit_comment_font_size_custom + + list_submit_comment_font_weight = ["normal", "bold"] + [None] + if submit_comment_font_weight not in list_submit_comment_font_weight: + raise ValueError( + f"`submit_comment_font_weight` must be one of: ['normal', 'bold']" + ) + elif ( + submit_comment_font_weight in list_submit_comment_font_weight + and submit_comment_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if submit_comment_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["submit"]["comment"]["font_weight"] = filtered_dict[ + submit_comment_font_weight + ] + + list_submit_comment_font_style = ["normal", "italic"] + [None] + if submit_comment_font_style not in list_submit_comment_font_style: + raise ValueError( + f"`submit_comment_font_style` must be one of: ['normal', 'italic']" + ) + elif ( + submit_comment_font_style in list_submit_comment_font_style + and submit_comment_font_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "italic": "italic"}.items() + if submit_comment_font_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["submit"]["comment"]["font_style"] = filtered_dict[ + submit_comment_font_style + ] + + list_submit_flex_direction = ["column", "column-reverse"] + [None] + if submit_flex_direction not in list_submit_flex_direction: + raise ValueError( + f"`submit_flex_direction` must be one of: ['column', 'column-reverse']" + ) + elif ( + submit_flex_direction in list_submit_flex_direction + and submit_flex_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "column": "column", + "column-reverse": "column-reverse", + }.items() + if submit_flex_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["submit"]["flex_direction"] = filtered_dict[ + submit_flex_direction + ] + self.state["state"]["submit"]["comment"][ + "font_color" + ] = submit_comment_font_color + self.state["state"]["submit"]["comment"]["margin"] = submit_comment_margin + + list_submit_button_font_size = ["1.4", "1.6", "2", "custom"] + [None] + if submit_button_font_size not in list_submit_button_font_size: + raise ValueError( + f"`submit_button_font_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + submit_button_font_size in list_submit_button_font_size + and submit_button_font_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if submit_button_font_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["submit"]["button"]["font_size"] = filtered_dict[ + submit_button_font_size + ] + self.state["state"]["submit"]["button"][ + "font_size_custom" + ] = submit_button_font_size_custom + + list_submit_button_font_weight = ["normal", "bold"] + [None] + if submit_button_font_weight not in list_submit_button_font_weight: + raise ValueError( + f"`submit_button_font_weight` must be one of: ['normal', 'bold']" + ) + elif ( + submit_button_font_weight in list_submit_button_font_weight + and submit_button_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if submit_button_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["submit"]["button"]["font_weight"] = filtered_dict[ + submit_button_font_weight + ] + + list_submit_button_font_style = ["normal", "italic"] + [None] + if submit_button_font_style not in list_submit_button_font_style: + raise ValueError( + f"`submit_button_font_style` must be one of: ['normal', 'italic']" + ) + elif ( + submit_button_font_style in list_submit_button_font_style + and submit_button_font_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "italic": "italic"}.items() + if submit_button_font_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["submit"]["button"]["font_style"] = filtered_dict[ + submit_button_font_style + ] + self.state["state"]["submit"]["button"]["margin"] = submit_button_margin + self.state["state"]["submit"]["button"][ + "padding_factor" + ] = submit_button_padding_factor + self.state["state"]["submit"]["button"]["box_shadow"] = submit_button_box_shadow + self.state["state"]["submit"]["button"][ + "use_default_styles" + ] = submit_button_use_default_styles + self.state["state"]["submit"]["button"]["bg_color"] = submit_button_bg_color + self.state["state"]["submit"]["button"][ + "bg_color_hover" + ] = submit_button_bg_color_hover + self.state["state"]["submit"]["button"]["font_color"] = submit_button_font_color + self.state["state"]["submit"]["button"][ + "font_color_hover" + ] = submit_button_font_color_hover + + list_submit_button_border_style = ["solid", "dashed", "dotted"] + [None] + if submit_button_border_style not in list_submit_button_border_style: + raise ValueError( + f"`submit_button_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + submit_button_border_style in list_submit_button_border_style + and submit_button_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if submit_button_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["submit"]["button"]["border_style"] = filtered_dict[ + submit_button_border_style + ] + self.state["state"]["submit"]["button"][ + "border_color" + ] = submit_button_border_color + self.state["state"]["submit"]["button"][ + "border_width" + ] = submit_button_border_width + self.state["state"]["submit"]["button"][ + "border_transparency" + ] = submit_button_border_transparency + self.state["state"]["submit"]["button"][ + "border_radius" + ] = submit_button_border_radius + + list_design_controls_position = [ + "top_left", + "top_centre", + "top_right", + "bottom_left", + "bottom_centre", + "bottom_right", + ] + [None] + if design_controls_position not in list_design_controls_position: + raise ValueError( + f"`design_controls_position` must be one of: ['top_left', 'top_centre', 'top_right', 'bottom_left', 'bottom_centre', 'bottom_right']" + ) + elif ( + design_controls_position in list_design_controls_position + and design_controls_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top_left": "top_left", + "top_centre": "top_centre", + "top_right": "top_right", + "bottom_left": "bottom_left", + "bottom_centre": "bottom_centre", + "bottom_right": "bottom_right", + }.items() + if design_controls_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["controls"]["position"] = filtered_dict[ + design_controls_position + ] + self.state["state"]["design"]["controls"]["button"][ + "symbol_back" + ] = design_controls_button_symbol_back + self.state["state"]["design"]["controls"]["button"][ + "symbol_forward" + ] = design_controls_button_symbol_forward + self.state["state"]["design"]["controls"]["button"][ + "font_color" + ] = design_controls_button_font_color + self.state["state"]["design"]["controls"]["button"][ + "font_size" + ] = design_controls_button_font_size + self.state["state"]["design"]["controls"]["advanced"] = design_controls_advanced + self.state["state"]["design"]["controls"]["button"][ + "margin" + ] = design_controls_button_margin + self.state["state"]["design"]["controls"]["button"][ + "padding_factor" + ] = design_controls_button_padding_factor + self.state["state"]["design"]["controls"]["button"][ + "bg_color" + ] = design_controls_button_bg_color + self.state["state"]["design"]["controls"]["button"][ + "bg_opacity" + ] = design_controls_button_bg_opacity + + list_design_controls_button_font_weight = ["normal", "bold"] + [None] + if ( + design_controls_button_font_weight + not in list_design_controls_button_font_weight + ): + raise ValueError( + f"`design_controls_button_font_weight` must be one of: ['normal', 'bold']" + ) + elif ( + design_controls_button_font_weight + in list_design_controls_button_font_weight + and design_controls_button_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if design_controls_button_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["controls"]["button"][ + "font_weight" + ] = filtered_dict[design_controls_button_font_weight] + + list_design_controls_button_font_style = ["normal", "italic"] + [None] + if ( + design_controls_button_font_style + not in list_design_controls_button_font_style + ): + raise ValueError( + f"`design_controls_button_font_style` must be one of: ['normal', 'italic']" + ) + elif ( + design_controls_button_font_style in list_design_controls_button_font_style + and design_controls_button_font_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "italic": "italic"}.items() + if design_controls_button_font_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["controls"]["button"][ + "font_style" + ] = filtered_dict[design_controls_button_font_style] + self.state["state"]["design"]["controls"]["button"][ + "border_width" + ] = design_controls_button_border_width + + list_design_controls_button_border_style = ["solid", "dashed", "dotted"] + [ + None + ] + if ( + design_controls_button_border_style + not in list_design_controls_button_border_style + ): + raise ValueError( + f"`design_controls_button_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + design_controls_button_border_style + in list_design_controls_button_border_style + and design_controls_button_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if design_controls_button_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["controls"]["button"][ + "border_style" + ] = filtered_dict[design_controls_button_border_style] + self.state["state"]["design"]["controls"]["button"][ + "border_color" + ] = design_controls_button_border_color + self.state["state"]["design"]["controls"]["button"][ + "border_radius" + ] = design_controls_button_border_radius + self.state["state"]["design"]["progress"]["show"] = design_progress_show + + list_design_progress_position = ["top", "bottom"] + [None] + if design_progress_position not in list_design_progress_position: + raise ValueError( + f"`design_progress_position` must be one of: ['top', 'bottom']" + ) + elif ( + design_progress_position in list_design_progress_position + and design_progress_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "bottom": "bottom"}.items() + if design_progress_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["design"]["progress"]["position"] = filtered_dict[ + design_progress_position + ] + self.state["state"]["design"]["progress"]["height"] = design_progress_height + self.state["state"]["design"]["progress"]["margin"] = design_progress_margin + self.state["state"]["design"]["progress"]["bg_color"] = design_progress_bg_color + self.state["state"]["design"]["progress"][ + "bg_opacity" + ] = design_progress_bg_opacity + self.state["state"]["number_format"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["number_format"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["number_format"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["number_format"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["number_format"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["number_format"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["number_format"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["number_format"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["number_format"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + + list_chart_number_localization_input_decimal_separator = [".", ","] + [None] + if ( + chart_number_localization_input_decimal_separator + not in list_chart_number_localization_input_decimal_separator + ): + raise ValueError( + f"`chart_number_localization_input_decimal_separator` must be one of: ['.', ',']" + ) + elif ( + chart_number_localization_input_decimal_separator + in list_chart_number_localization_input_decimal_separator + and chart_number_localization_input_decimal_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in {".": ".", ",": ","}.items() + if chart_number_localization_input_decimal_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "input_decimal_separator" + ] = filtered_dict[chart_number_localization_input_decimal_separator] + + list_chart_number_localization_output_separators = [ + ",.", + ".,", + ".", + ",", + " .", + " ,", + ] + [None] + if ( + chart_number_localization_output_separators + not in list_chart_number_localization_output_separators + ): + raise ValueError( + f"`chart_number_localization_output_separators` must be one of: [',.', '.,', '.', ',', ' .', ' ,']" + ) + elif ( + chart_number_localization_output_separators + in list_chart_number_localization_output_separators + and chart_number_localization_output_separators is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ",.": ",.", + ".,": ".,", + ".": ".", + ",": ",", + " .": " .", + " ,": " ,", + }.items() + if chart_number_localization_output_separators in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "output_separators" + ] = filtered_dict[chart_number_localization_output_separators] + self.state["state"]["external_write"]["enabled"] = external_write_enabled + self.state["state"]["external_write"]["endpoint"] = external_write_endpoint + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_cards_details( + self, + mode: str = None, + carousel_channel_background: str = None, + carousel_bar_background: str = None, + carousel_channel_height: float = None, + autoplay_enabled: bool = None, + autoplay_duration: float = None, + autoplay_loop: bool = None, + autoplay_pause_when: str = None, + autoplay_btn_visible: bool = None, + autoplay_btn_position: str = None, + autoplay_btn_size: float = None, + autoplay_btn_background: str = None, + autoplay_btn_opacity: float = None, + autoplay_btn_color: str = None, + card_layout: str = None, + card_order: str = None, + card_width_portrait: float = None, + card_width_landscape: float = None, + card_width_stretch: bool = None, + card_width_stretch_percent: float = None, + card_padding_top: float = None, + card_padding_right: float = None, + card_padding_bottom: float = None, + card_padding_left: float = None, + card_horizontal_margin: float = None, + card_vertical_margin: float = None, + card_border_color: str = None, + card_border_width: float = None, + card_shape: str = None, + card_radius: float = None, + card_shadow: bool = None, + card_shadow_color: str = None, + card_shadow_blur: float = None, + template_customise: bool = None, + template_simple_custom: Union[list, str] = None, + content_vertical_align: str = None, + content_horizontal_padding: float = None, + title_color: str = None, + title_fontsize: float = None, + title_weight: str = None, + title_advanced: bool = None, + title_opacity: float = None, + title_space_above: float = None, + title_space_below: float = None, + title_lineheight: float = None, + title_minheight: float = None, + title_align: str = None, + subtitle_color: str = None, + subtitle_fontsize: float = None, + subtitle_weight: str = None, + subtitle_advanced: bool = None, + subtitle_opacity: float = None, + subtitle_space_above: float = None, + subtitle_space_below: float = None, + subtitle_lineheight: float = None, + subtitle_minheight: float = None, + subtitle_align: str = None, + text_color: str = None, + text_fontsize: float = None, + text_weight: str = None, + text_advanced: bool = None, + text_opacity: float = None, + text_space_between: float = None, + text_lineheight: float = None, + text_minheight: float = None, + text_align: str = None, + text_column_names: bool = None, + text_column_separator: str = None, + text_column_weight: str = None, + text_column_separator_custom: str = None, + image_width_portrait: float = None, + image_width_landscape: float = None, + image_aspect_ratio: float = None, + image_sizing: str = None, + image_horizontal_margin: float = None, + image_vertical_margin: float = None, + card_space_between: float = None, + image_border_color: str = None, + image_border_width: float = None, + image_shape: str = None, + image_radius: float = None, + image_styling: bool = None, + image_opacity: float = None, + image_contrast: float = None, + image_brightness: float = None, + image_blend_mode: str = None, + image_blackwhite: bool = None, + image_missing: str = None, + image_missing_icon: str = None, + card_background_mode: str = None, + card_background_color: str = None, + card_background_mode_category: str = None, + card_background_color_category: str = None, + image_background_mode: str = None, + image_background_color: str = None, + image_background_mode_category: str = None, + image_background_color_category: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + legend_filter_mode: str = None, + chart_filter_controls_container_alignment: str = None, + chart_filter_controls_container_controls_spacing: float = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + filter_show_all: bool = None, + filter_show_all_text: str = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + audio_click: str = None, + audio_animation: bool = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + chart_url_settings_enabled: bool = None, + chart_url_settings_whitelist: Union[list, str] = None, + ): + """ + Set chart details for: cards. + + + :param mode: View mode. Choices: grid, carousel. Flourish type hint: string, defaults to None. + :type mode: str, optional + :param carousel_channel_background: Channel color. Flourish type hint: color, defaults to None. + :type carousel_channel_background: str, optional + :param carousel_bar_background: Bar color. Flourish type hint: color, defaults to None. + :type carousel_bar_background: str, optional + :param carousel_channel_height: Channel height. Flourish type hint: number, defaults to None. + :type carousel_channel_height: float, optional + :param autoplay_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type autoplay_enabled: bool, optional + :param autoplay_duration: Duration. Flourish type hint: number, defaults to None. + :type autoplay_duration: float, optional + :param autoplay_loop: Loop. Flourish type hint: boolean, defaults to None. + :type autoplay_loop: bool, optional + :param autoplay_pause_when: Pause on interaction. Choices: never, hover, popup, hover_popup. Flourish type hint: string, defaults to None. + :type autoplay_pause_when: str, optional + :param autoplay_btn_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type autoplay_btn_visible: bool, optional + :param autoplay_btn_position: Position. Choices: top_left, top_right, bottom_left, bottom_right. Flourish type hint: string, defaults to None. + :type autoplay_btn_position: str, optional + :param autoplay_btn_size: Size. Flourish type hint: number, defaults to None. + :type autoplay_btn_size: float, optional + :param autoplay_btn_background: Background. Flourish type hint: color, defaults to None. + :type autoplay_btn_background: str, optional + :param autoplay_btn_opacity: Opacity. Flourish type hint: number, defaults to None. + :type autoplay_btn_opacity: float, optional + :param autoplay_btn_color: Icon. Flourish type hint: color, defaults to None. + :type autoplay_btn_color: str, optional + :param card_layout: Card layout. Choices: portrait, landscape, absolute. Flourish type hint: string, defaults to None. + :type card_layout: str, optional + :param card_order: Card structure. Choices: stack-default, stack-2, stack-3, stack-4. Flourish type hint: string, defaults to None. + :type card_order: str, optional + :param card_width_portrait: Width. Flourish type hint: number, defaults to None. + :type card_width_portrait: float, optional + :param card_width_landscape: Width. Flourish type hint: number, defaults to None. + :type card_width_landscape: float, optional + :param card_width_stretch: Stretch cards to fill. Flourish type hint: boolean, defaults to None. + :type card_width_stretch: bool, optional + :param card_width_stretch_percent: Stretch. How much the cards are allowed to scale up to fill the space, in %. When too much stretch would be required, cards are scaled down to add a column to the grid. Flourish type hint: number, defaults to None. + :type card_width_stretch_percent: float, optional + :param card_padding_top: Top. Flourish type hint: number, defaults to None. + :type card_padding_top: float, optional + :param card_padding_right: Right. Flourish type hint: number, defaults to None. + :type card_padding_right: float, optional + :param card_padding_bottom: Bottom. Flourish type hint: number, defaults to None. + :type card_padding_bottom: float, optional + :param card_padding_left: Left. Flourish type hint: number, defaults to None. + :type card_padding_left: float, optional + :param card_horizontal_margin: Horizontal. Flourish type hint: number, defaults to None. + :type card_horizontal_margin: float, optional + :param card_vertical_margin: Vertical. Flourish type hint: number, defaults to None. + :type card_vertical_margin: float, optional + :param card_border_color: Border color. Flourish type hint: color, defaults to None. + :type card_border_color: str, optional + :param card_border_width: Weight. Flourish type hint: number, defaults to None. + :type card_border_width: float, optional + :param card_shape: Shape. Choices: circle, square. Flourish type hint: string, defaults to None. + :type card_shape: str, optional + :param card_radius: Roundness. Flourish type hint: number, defaults to None. + :type card_radius: float, optional + :param card_shadow: Shadow behind card. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type card_shadow: bool, optional + :param card_shadow_color: Color. Flourish type hint: color, defaults to None. + :type card_shadow_color: str, optional + :param card_shadow_blur: Blur. Flourish type hint: number, defaults to None. + :type card_shadow_blur: float, optional + :param template_customise: Customize card HTML. Flourish type hint: boolean, defaults to None. + :type template_customise: bool, optional + :param template_simple_custom: Custom HTML. Custom HTML can be used for flippable cards, text on hover, embedded Flourish charts, etc. Refer to columns using `{{column_name}}` If a column name has spaces, wrap in square brackets, like `{{column name}}` If a column includes HTML, prevent escaping HTML by wrapping in triple curly brackets. For example: `{{{column_name}}}` Use handlebar syntax for conditions, etc. Flourish type hint: html, defaults to None. + :type template_simple_custom: Union[list, str], optional + :param content_vertical_align: Vertical position. Choices: center, flex-start, flex-end. Flourish type hint: string, defaults to None. + :type content_vertical_align: str, optional + :param content_horizontal_padding: Horizontal space. Flourish type hint: number, defaults to None. + :type content_horizontal_padding: float, optional + :param title_color: Color. Flourish type hint: color, defaults to None. + :type title_color: str, optional + :param title_fontsize: Font size. Flourish type hint: number, defaults to None. + :type title_fontsize: float, optional + :param title_weight: Weight. Choices: italic, normal, bold. Flourish type hint: string, defaults to None. + :type title_weight: str, optional + :param title_advanced: Advanced settings. Flourish type hint: boolean, defaults to None. + :type title_advanced: bool, optional + :param title_opacity: Opacity. Flourish type hint: number, defaults to None. + :type title_opacity: float, optional + :param title_space_above: Space above. Flourish type hint: number, defaults to None. + :type title_space_above: float, optional + :param title_space_below: Space below. Flourish type hint: number, defaults to None. + :type title_space_below: float, optional + :param title_lineheight: Line height. Flourish type hint: number, defaults to None. + :type title_lineheight: float, optional + :param title_minheight: Min height. Flourish type hint: number, defaults to None. + :type title_minheight: float, optional + :param title_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type title_align: str, optional + :param subtitle_color: Color. Flourish type hint: color, defaults to None. + :type subtitle_color: str, optional + :param subtitle_fontsize: Font size. Flourish type hint: number, defaults to None. + :type subtitle_fontsize: float, optional + :param subtitle_weight: Weight. Choices: italic, normal, bold. Flourish type hint: string, defaults to None. + :type subtitle_weight: str, optional + :param subtitle_advanced: Advanced settings. Flourish type hint: boolean, defaults to None. + :type subtitle_advanced: bool, optional + :param subtitle_opacity: Opacity. Flourish type hint: number, defaults to None. + :type subtitle_opacity: float, optional + :param subtitle_space_above: Space above. Flourish type hint: number, defaults to None. + :type subtitle_space_above: float, optional + :param subtitle_space_below: Space below. Flourish type hint: number, defaults to None. + :type subtitle_space_below: float, optional + :param subtitle_lineheight: Line height. Flourish type hint: number, defaults to None. + :type subtitle_lineheight: float, optional + :param subtitle_minheight: Min height. Flourish type hint: number, defaults to None. + :type subtitle_minheight: float, optional + :param subtitle_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type subtitle_align: str, optional + :param text_color: Color. Flourish type hint: color, defaults to None. + :type text_color: str, optional + :param text_fontsize: Font size. Flourish type hint: number, defaults to None. + :type text_fontsize: float, optional + :param text_weight: Weight. Choices: italic, normal, bold. Flourish type hint: string, defaults to None. + :type text_weight: str, optional + :param text_advanced: Advanced settings. Flourish type hint: boolean, defaults to None. + :type text_advanced: bool, optional + :param text_opacity: Opacity. Flourish type hint: number, defaults to None. + :type text_opacity: float, optional + :param text_space_between: Space between. Flourish type hint: number, defaults to None. + :type text_space_between: float, optional + :param text_lineheight: Line height. Flourish type hint: number, defaults to None. + :type text_lineheight: float, optional + :param text_minheight: Min height. Flourish type hint: number, defaults to None. + :type text_minheight: float, optional + :param text_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type text_align: str, optional + :param text_column_names: Column names. Choices: True, False. To add column names before text entries. Flourish type hint: boolean, defaults to None. + :type text_column_names: bool, optional + :param text_column_separator: Column separator. Choices: :, -, `
    `, other. Choose a separator between column names and text entries. Flourish type hint: string, defaults to None. + :type text_column_separator: str, optional + :param text_column_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type text_column_weight: str, optional + :param text_column_separator_custom: Other. Flourish type hint: string, defaults to None. + :type text_column_separator_custom: str, optional + :param image_width_portrait: Width. As a percentage of the cards width. Flourish type hint: number, defaults to None. + :type image_width_portrait: float, optional + :param image_width_landscape: Width. As a percentage of the cards width. Flourish type hint: number, defaults to None. + :type image_width_landscape: float, optional + :param image_aspect_ratio: Aspect ratio. As a multiplier of the images width. For example: a value of 2, means the image height is 2 times the image width. Flourish type hint: number, defaults to None. + :type image_aspect_ratio: float, optional + :param image_sizing: Image sizing. Choices: cover, contain. Flourish type hint: string, defaults to None. + :type image_sizing: str, optional + :param image_horizontal_margin: Horizontal. As a percentage of the cards width. Flourish type hint: number, defaults to None. + :type image_horizontal_margin: float, optional + :param image_vertical_margin: Vertical. As a percentage of the cards width. Flourish type hint: number, defaults to None. + :type image_vertical_margin: float, optional + :param card_space_between: Space between image and text. Flourish type hint: number, defaults to None. + :type card_space_between: float, optional + :param image_border_color: Color. Flourish type hint: color, defaults to None. + :type image_border_color: str, optional + :param image_border_width: Weight. Flourish type hint: number, defaults to None. + :type image_border_width: float, optional + :param image_shape: Shape. Choices: circle, square. Flourish type hint: string, defaults to None. + :type image_shape: str, optional + :param image_radius: Roundness. Flourish type hint: number, defaults to None. + :type image_radius: float, optional + :param image_styling: Advanced image styling. Flourish type hint: boolean, defaults to None. + :type image_styling: bool, optional + :param image_opacity: Opacity. Flourish type hint: number, defaults to None. + :type image_opacity: float, optional + :param image_contrast: Contrast. Flourish type hint: number, defaults to None. + :type image_contrast: float, optional + :param image_brightness: Brightness. Flourish type hint: number, defaults to None. + :type image_brightness: float, optional + :param image_blend_mode: Blend mode. Choices: normal, lighten, darken, overlay, screen, multiply. Flourish type hint: string, defaults to None. + :type image_blend_mode: str, optional + :param image_blackwhite: Black and white. Flourish type hint: boolean, defaults to None. + :type image_blackwhite: bool, optional + :param image_missing: Missing images. Choices: hide, icon. What to show when theres a missing image. Flourish type hint: string, defaults to None. + :type image_missing: str, optional + :param image_missing_icon: Missing icon. Flourish type hint: url, defaults to None. + :type image_missing_icon: str, optional + :param card_background_mode: Card. Choices: transparent, fixed. Flourish type hint: string, defaults to None. + :type card_background_mode: str, optional + :param card_background_color: Color. Flourish type hint: color, defaults to None. + :type card_background_color: str, optional + :param card_background_mode_category: Card. Choices: data, transparent, fixed. Choose Data if you want to base the color on the Categories column in your dataset. Flourish type hint: string, defaults to None. + :type card_background_mode_category: str, optional + :param card_background_color_category: Color. Flourish type hint: color, defaults to None. + :type card_background_color_category: str, optional + :param image_background_mode: Image. Choices: transparent, fixed. Flourish type hint: string, defaults to None. + :type image_background_mode: str, optional + :param image_background_color: Color. Flourish type hint: color, defaults to None. + :type image_background_color: str, optional + :param image_background_mode_category: Image. Choices: data, transparent, fixed. Choose Data if you want to base the color on the Categories column in your dataset. Flourish type hint: string, defaults to None. + :type image_background_mode_category: str, optional + :param image_background_color_category: Color. Flourish type hint: color, defaults to None. + :type image_background_color_category: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param legend_filter_mode: Filter on click. Choices: none, single, multi. Flourish type hint: string, defaults to None. + :type legend_filter_mode: str, optional + :param chart_filter_controls_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_filter_controls_container_alignment: str, optional + :param chart_filter_controls_container_controls_spacing: Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to None. + :type chart_filter_controls_container_controls_spacing: float, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param filter_show_all: Include "All". Flourish type hint: boolean, defaults to None. + :type filter_show_all: bool, optional + :param filter_show_all_text: “All” label. Flourish type hint: string, defaults to None. + :type filter_show_all_text: str, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param audio_click: Click while playing should:. Choices: replay, stop, pause. Flourish type hint: string, defaults to None. + :type audio_click: str, optional + :param audio_animation: Animate while playing audio. Flourish type hint: boolean, defaults to None. + :type audio_animation: bool, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + :param chart_url_settings_enabled: Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to None. + :type chart_url_settings_enabled: bool, optional + :param chart_url_settings_whitelist: Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to None. + :type chart_url_settings_whitelist: Union[list, str], optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "popups": {}, + "legend_container": {}, + "legend_categorical": {}, + "controls_container": {}, + "filter_controls": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "slider_style": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + "url_state": {}, + } + } + + list_mode = ["grid", "carousel"] + [None] + if mode not in list_mode: + raise ValueError(f"`mode` must be one of: ['grid', 'carousel']") + elif mode in list_mode and mode is not None: + filtered_dict = { + k: v + for (k, v) in {"grid": "grid", "carousel": "carousel"}.items() + if mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["mode"] = filtered_dict[mode] + self.state["state"]["carousel_channel_background"] = carousel_channel_background + self.state["state"]["carousel_bar_background"] = carousel_bar_background + self.state["state"]["carousel_channel_height"] = carousel_channel_height + + list_autoplay_enabled = [True, False] + [None] + if autoplay_enabled not in list_autoplay_enabled: + raise ValueError(f"`autoplay_enabled` must be one of: [True, False]") + elif autoplay_enabled in list_autoplay_enabled and autoplay_enabled is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if autoplay_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["autoplay_enabled"] = filtered_dict[ + autoplay_enabled + ] + self.state["state"]["autoplay_duration"] = autoplay_duration + self.state["state"]["autoplay_loop"] = autoplay_loop + + list_autoplay_pause_when = ["never", "hover", "popup", "hover_popup"] + [None] + if autoplay_pause_when not in list_autoplay_pause_when: + raise ValueError( + f"`autoplay_pause_when` must be one of: ['never', 'hover', 'popup', 'hover_popup']" + ) + elif ( + autoplay_pause_when in list_autoplay_pause_when + and autoplay_pause_when is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "never": "never", + "hover": "hover", + "popup": "popup", + "hover_popup": "hover_popup", + }.items() + if autoplay_pause_when in k + } + if len(filtered_dict) > 0: + self.state["state"]["autoplay_pause_when"] = filtered_dict[ + autoplay_pause_when + ] + + list_autoplay_btn_visible = [True, False] + [None] + if autoplay_btn_visible not in list_autoplay_btn_visible: + raise ValueError(f"`autoplay_btn_visible` must be one of: [True, False]") + elif ( + autoplay_btn_visible in list_autoplay_btn_visible + and autoplay_btn_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if autoplay_btn_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["autoplay_btn_visible"] = filtered_dict[ + autoplay_btn_visible + ] + + list_autoplay_btn_position = [ + "top_left", + "top_right", + "bottom_left", + "bottom_right", + ] + [None] + if autoplay_btn_position not in list_autoplay_btn_position: + raise ValueError( + f"`autoplay_btn_position` must be one of: ['top_left', 'top_right', 'bottom_left', 'bottom_right']" + ) + elif ( + autoplay_btn_position in list_autoplay_btn_position + and autoplay_btn_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top_left": "top_left", + "top_right": "top_right", + "bottom_left": "bottom_left", + "bottom_right": "bottom_right", + }.items() + if autoplay_btn_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["autoplay_btn_position"] = filtered_dict[ + autoplay_btn_position + ] + self.state["state"]["autoplay_btn_size"] = autoplay_btn_size + self.state["state"]["autoplay_btn_background"] = autoplay_btn_background + self.state["state"]["autoplay_btn_opacity"] = autoplay_btn_opacity + self.state["state"]["autoplay_btn_color"] = autoplay_btn_color + + list_card_layout = ["portrait", "landscape", "absolute"] + [None] + if card_layout not in list_card_layout: + raise ValueError( + f"`card_layout` must be one of: ['portrait', 'landscape', 'absolute']" + ) + elif card_layout in list_card_layout and card_layout is not None: + filtered_dict = { + k: v + for (k, v) in { + "portrait": "portrait", + "landscape": "landscape", + "absolute": "absolute", + }.items() + if card_layout in k + } + if len(filtered_dict) > 0: + self.state["state"]["card_layout"] = filtered_dict[card_layout] + + list_card_order = ["stack-default", "stack-2", "stack-3", "stack-4"] + [None] + if card_order not in list_card_order: + raise ValueError( + f"`card_order` must be one of: ['stack-default', 'stack-2', 'stack-3', 'stack-4']" + ) + elif card_order in list_card_order and card_order is not None: + filtered_dict = { + k: v + for (k, v) in { + "stack-default": "stack-default", + "stack-2": "stack-2", + "stack-3": "stack-3", + "stack-4": "stack-4", + }.items() + if card_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["card_order"] = filtered_dict[card_order] + self.state["state"]["card_width_portrait"] = card_width_portrait + self.state["state"]["card_width_landscape"] = card_width_landscape + self.state["state"]["card_width_stretch"] = card_width_stretch + self.state["state"]["card_width_stretch_percent"] = card_width_stretch_percent + self.state["state"]["card_padding_top"] = card_padding_top + self.state["state"]["card_padding_right"] = card_padding_right + self.state["state"]["card_padding_bottom"] = card_padding_bottom + self.state["state"]["card_padding_left"] = card_padding_left + self.state["state"]["card_horizontal_margin"] = card_horizontal_margin + self.state["state"]["card_vertical_margin"] = card_vertical_margin + self.state["state"]["card_border_color"] = card_border_color + self.state["state"]["card_border_width"] = card_border_width + + list_card_shape = ["circle", "square"] + [None] + if card_shape not in list_card_shape: + raise ValueError(f"`card_shape` must be one of: ['circle', 'square']") + elif card_shape in list_card_shape and card_shape is not None: + filtered_dict = { + k: v + for (k, v) in {"circle": "circle", "square": "square"}.items() + if card_shape in k + } + if len(filtered_dict) > 0: + self.state["state"]["card_shape"] = filtered_dict[card_shape] + self.state["state"]["card_radius"] = card_radius + + list_card_shadow = [True, False] + [None] + if card_shadow not in list_card_shadow: + raise ValueError(f"`card_shadow` must be one of: [True, False]") + elif card_shadow in list_card_shadow and card_shadow is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if card_shadow in k + } + if len(filtered_dict) > 0: + self.state["state"]["card_shadow"] = filtered_dict[card_shadow] + self.state["state"]["card_shadow_color"] = card_shadow_color + self.state["state"]["card_shadow_blur"] = card_shadow_blur + self.state["state"]["template_customise"] = template_customise + + if ( + template_simple_custom is not None + and len(template_simple_custom) > 1 + and isinstance(template_simple_custom, list) + ): + self.state["state"]["template_simple_custom"] = " \n ".join( + template_simple_custom + ) + else: + self.state["state"]["template_simple_custom"] = template_simple_custom + + list_content_vertical_align = ["center", "flex-start", "flex-end"] + [None] + if content_vertical_align not in list_content_vertical_align: + raise ValueError( + f"`content_vertical_align` must be one of: ['center', 'flex-start', 'flex-end']" + ) + elif ( + content_vertical_align in list_content_vertical_align + and content_vertical_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "center": "center", + "flex-start": "flex-start", + "flex-end": "flex-end", + }.items() + if content_vertical_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_vertical_align"] = filtered_dict[ + content_vertical_align + ] + self.state["state"]["content_horizontal_padding"] = content_horizontal_padding + self.state["state"]["title_color"] = title_color + self.state["state"]["title_fontsize"] = title_fontsize + + list_title_weight = ["italic", "normal", "bold"] + [None] + if title_weight not in list_title_weight: + raise ValueError( + f"`title_weight` must be one of: ['italic', 'normal', 'bold']" + ) + elif title_weight in list_title_weight and title_weight is not None: + filtered_dict = { + k: v + for (k, v) in { + "italic": "italic", + "normal": "normal", + "bold": "bold", + }.items() + if title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["title_weight"] = filtered_dict[title_weight] + self.state["state"]["title_advanced"] = title_advanced + self.state["state"]["title_opacity"] = title_opacity + self.state["state"]["title_space_above"] = title_space_above + self.state["state"]["title_space_below"] = title_space_below + self.state["state"]["title_lineheight"] = title_lineheight + self.state["state"]["title_minheight"] = title_minheight + + list_title_align = ["start", "center", "end"] + [None] + if title_align not in list_title_align: + raise ValueError( + f"`title_align` must be one of: ['start', 'center', 'end']" + ) + elif title_align in list_title_align and title_align is not None: + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if title_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["title_align"] = filtered_dict[title_align] + self.state["state"]["subtitle_color"] = subtitle_color + self.state["state"]["subtitle_fontsize"] = subtitle_fontsize + + list_subtitle_weight = ["italic", "normal", "bold"] + [None] + if subtitle_weight not in list_subtitle_weight: + raise ValueError( + f"`subtitle_weight` must be one of: ['italic', 'normal', 'bold']" + ) + elif subtitle_weight in list_subtitle_weight and subtitle_weight is not None: + filtered_dict = { + k: v + for (k, v) in { + "italic": "italic", + "normal": "normal", + "bold": "bold", + }.items() + if subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["subtitle_weight"] = filtered_dict[subtitle_weight] + self.state["state"]["subtitle_advanced"] = subtitle_advanced + self.state["state"]["subtitle_opacity"] = subtitle_opacity + self.state["state"]["subtitle_space_above"] = subtitle_space_above + self.state["state"]["subtitle_space_below"] = subtitle_space_below + self.state["state"]["subtitle_lineheight"] = subtitle_lineheight + self.state["state"]["subtitle_minheight"] = subtitle_minheight + + list_subtitle_align = ["start", "center", "end"] + [None] + if subtitle_align not in list_subtitle_align: + raise ValueError( + f"`subtitle_align` must be one of: ['start', 'center', 'end']" + ) + elif subtitle_align in list_subtitle_align and subtitle_align is not None: + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if subtitle_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["subtitle_align"] = filtered_dict[subtitle_align] + self.state["state"]["text_color"] = text_color + self.state["state"]["text_fontsize"] = text_fontsize + + list_text_weight = ["italic", "normal", "bold"] + [None] + if text_weight not in list_text_weight: + raise ValueError( + f"`text_weight` must be one of: ['italic', 'normal', 'bold']" + ) + elif text_weight in list_text_weight and text_weight is not None: + filtered_dict = { + k: v + for (k, v) in { + "italic": "italic", + "normal": "normal", + "bold": "bold", + }.items() + if text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["text_weight"] = filtered_dict[text_weight] + self.state["state"]["text_advanced"] = text_advanced + self.state["state"]["text_opacity"] = text_opacity + self.state["state"]["text_space_between"] = text_space_between + self.state["state"]["text_lineheight"] = text_lineheight + self.state["state"]["text_minheight"] = text_minheight + + list_text_align = ["start", "center", "end"] + [None] + if text_align not in list_text_align: + raise ValueError(f"`text_align` must be one of: ['start', 'center', 'end']") + elif text_align in list_text_align and text_align is not None: + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if text_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["text_align"] = filtered_dict[text_align] + + list_text_column_names = [True, False] + [None] + if text_column_names not in list_text_column_names: + raise ValueError(f"`text_column_names` must be one of: [True, False]") + elif ( + text_column_names in list_text_column_names + and text_column_names is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if text_column_names in k + } + if len(filtered_dict) > 0: + self.state["state"]["text_column_names"] = filtered_dict[ + text_column_names + ] + + list_text_column_separator = [": ", " - ", "
    ", "other"] + [None] + if text_column_separator not in list_text_column_separator: + raise ValueError( + f"`text_column_separator` must be one of: [': ', ' - ', '
    ', 'other']" + ) + elif ( + text_column_separator in list_text_column_separator + and text_column_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " - ": " - ", + "
    ": "
    ", + "other": "other", + }.items() + if text_column_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["text_column_separator"] = filtered_dict[ + text_column_separator + ] + + list_text_column_weight = ["bold", "normal"] + [None] + if text_column_weight not in list_text_column_weight: + raise ValueError(f"`text_column_weight` must be one of: ['bold', 'normal']") + elif ( + text_column_weight in list_text_column_weight + and text_column_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if text_column_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["text_column_weight"] = filtered_dict[ + text_column_weight + ] + self.state["state"][ + "text_column_separator_custom" + ] = text_column_separator_custom + self.state["state"]["image_width_portrait"] = image_width_portrait + self.state["state"]["image_width_landscape"] = image_width_landscape + self.state["state"]["image_aspect_ratio"] = image_aspect_ratio + + list_image_sizing = ["cover", "contain"] + [None] + if image_sizing not in list_image_sizing: + raise ValueError(f"`image_sizing` must be one of: ['cover', 'contain']") + elif image_sizing in list_image_sizing and image_sizing is not None: + filtered_dict = { + k: v + for (k, v) in {"cover": "cover", "contain": "contain"}.items() + if image_sizing in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_sizing"] = filtered_dict[image_sizing] + self.state["state"]["image_horizontal_margin"] = image_horizontal_margin + self.state["state"]["image_vertical_margin"] = image_vertical_margin + self.state["state"]["card_space_between"] = card_space_between + self.state["state"]["image_border_color"] = image_border_color + self.state["state"]["image_border_width"] = image_border_width + + list_image_shape = ["circle", "square"] + [None] + if image_shape not in list_image_shape: + raise ValueError(f"`image_shape` must be one of: ['circle', 'square']") + elif image_shape in list_image_shape and image_shape is not None: + filtered_dict = { + k: v + for (k, v) in {"circle": "circle", "square": "square"}.items() + if image_shape in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_shape"] = filtered_dict[image_shape] + self.state["state"]["image_radius"] = image_radius + self.state["state"]["image_styling"] = image_styling + self.state["state"]["image_opacity"] = image_opacity + self.state["state"]["image_contrast"] = image_contrast + self.state["state"]["image_brightness"] = image_brightness + + list_image_blend_mode = [ + "normal", + "lighten", + "darken", + "overlay", + "screen", + "multiply", + ] + [None] + if image_blend_mode not in list_image_blend_mode: + raise ValueError( + f"`image_blend_mode` must be one of: ['normal', 'lighten', 'darken', 'overlay', 'screen', 'multiply']" + ) + elif image_blend_mode in list_image_blend_mode and image_blend_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "normal": "normal", + "lighten": "lighten", + "darken": "darken", + "overlay": "overlay", + "screen": "screen", + "multiply": "multiply", + }.items() + if image_blend_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_blend_mode"] = filtered_dict[ + image_blend_mode + ] + self.state["state"]["image_blackwhite"] = image_blackwhite + + list_image_missing = ["hide", "icon"] + [None] + if image_missing not in list_image_missing: + raise ValueError(f"`image_missing` must be one of: ['hide', 'icon']") + elif image_missing in list_image_missing and image_missing is not None: + filtered_dict = { + k: v + for (k, v) in {"hide": "hide", "icon": "icon"}.items() + if image_missing in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_missing"] = filtered_dict[image_missing] + self.state["state"]["image_missing_icon"] = image_missing_icon + + list_card_background_mode = ["transparent", "fixed"] + [None] + if card_background_mode not in list_card_background_mode: + raise ValueError( + f"`card_background_mode` must be one of: ['transparent', 'fixed']" + ) + elif ( + card_background_mode in list_card_background_mode + and card_background_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"transparent": "transparent", "fixed": "fixed"}.items() + if card_background_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["card_background_mode"] = filtered_dict[ + card_background_mode + ] + self.state["state"]["card_background_color"] = card_background_color + + list_card_background_mode_category = ["data", "transparent", "fixed"] + [None] + if card_background_mode_category not in list_card_background_mode_category: + raise ValueError( + f"`card_background_mode_category` must be one of: ['data', 'transparent', 'fixed']" + ) + elif ( + card_background_mode_category in list_card_background_mode_category + and card_background_mode_category is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "data": "data", + "transparent": "transparent", + "fixed": "fixed", + }.items() + if card_background_mode_category in k + } + if len(filtered_dict) > 0: + self.state["state"]["card_background_mode_category"] = filtered_dict[ + card_background_mode_category + ] + self.state["state"][ + "card_background_color_category" + ] = card_background_color_category + + list_image_background_mode = ["transparent", "fixed"] + [None] + if image_background_mode not in list_image_background_mode: + raise ValueError( + f"`image_background_mode` must be one of: ['transparent', 'fixed']" + ) + elif ( + image_background_mode in list_image_background_mode + and image_background_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"transparent": "transparent", "fixed": "fixed"}.items() + if image_background_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_background_mode"] = filtered_dict[ + image_background_mode + ] + self.state["state"]["image_background_color"] = image_background_color + + list_image_background_mode_category = ["data", "transparent", "fixed"] + [None] + if image_background_mode_category not in list_image_background_mode_category: + raise ValueError( + f"`image_background_mode_category` must be one of: ['data', 'transparent', 'fixed']" + ) + elif ( + image_background_mode_category in list_image_background_mode_category + and image_background_mode_category is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "data": "data", + "transparent": "transparent", + "fixed": "fixed", + }.items() + if image_background_mode_category in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_background_mode_category"] = filtered_dict[ + image_background_mode_category + ] + self.state["state"][ + "image_background_color_category" + ] = image_background_color_category + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popups"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popups"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popups"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popups"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popups"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popups"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popups"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popups"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popups"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popups"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popups"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popups"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popups"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popups"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popups"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popups"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"][ + "popup_list_label_weight" + ] = filtered_dict[chart_popup_popup_list_label_weight] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popups"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popups"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popups"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popups"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popups"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popups"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popups"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popups"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popups"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popups"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popups"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popups"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popups"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popups"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popups"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popups"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popups"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"][ + "panel_vertical_position" + ] = filtered_dict[chart_popup_panel_vertical_position] + self.state["state"]["popups"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popups"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popups"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popups"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popups"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popups"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"][ + "panel_list_label_weight" + ] = filtered_dict[chart_popup_panel_list_label_weight] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popups"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popups"]["panel_shadow"] = chart_popup_panel_shadow + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_legend_filter_mode = ["none", "single", "multi"] + [None] + if legend_filter_mode not in list_legend_filter_mode: + raise ValueError( + f"`legend_filter_mode` must be one of: ['none', 'single', 'multi']" + ) + elif ( + legend_filter_mode in list_legend_filter_mode + and legend_filter_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "single": "single", + "multi": "multi", + }.items() + if legend_filter_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_filter_mode"] = filtered_dict[ + legend_filter_mode + ] + + list_chart_filter_controls_container_alignment = ["start", "center", "end"] + [ + None + ] + if ( + chart_filter_controls_container_alignment + not in list_chart_filter_controls_container_alignment + ): + raise ValueError( + f"`chart_filter_controls_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_filter_controls_container_alignment + in list_chart_filter_controls_container_alignment + and chart_filter_controls_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_filter_controls_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_container"]["alignment"] = filtered_dict[ + chart_filter_controls_container_alignment + ] + self.state["state"]["controls_container"][ + "controls_spacing" + ] = chart_filter_controls_container_controls_spacing + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_controls"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["filter_controls"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["filter_controls"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_controls"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_controls"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["filter_controls"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_controls"][ + "dropdown_width_mode" + ] = filtered_dict[chart_filter_controls_dropdown_width_mode] + self.state["state"]["filter_controls"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["filter_controls"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["filter_controls"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["filter_controls"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["filter_controls"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["filter_controls"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_controls"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["filter_show_all"] = filter_show_all + self.state["state"]["filter_show_all_text"] = filter_show_all_text + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["slider_style"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["slider_style"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["slider_style"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["slider_style"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["slider_style"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["slider_style"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["slider_style"][ + "play_button" + ] = chart_slider_control_style_play_button + + list_audio_click = ["replay", "stop", "pause"] + [None] + if audio_click not in list_audio_click: + raise ValueError( + f"`audio_click` must be one of: ['replay', 'stop', 'pause']" + ) + elif audio_click in list_audio_click and audio_click is not None: + filtered_dict = { + k: v + for (k, v) in { + "replay": "replay", + "stop": "stop", + "pause": "pause", + }.items() + if audio_click in k + } + if len(filtered_dict) > 0: + self.state["state"]["audio_click"] = filtered_dict[audio_click] + self.state["state"]["audio_animation"] = audio_animation + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + self.state["state"]["url_state"]["enabled"] = chart_url_settings_enabled + + if ( + chart_url_settings_whitelist is not None + and len(chart_url_settings_whitelist) > 1 + and isinstance(chart_url_settings_whitelist, list) + ): + self.state["state"]["url_state"]["whitelist"] = " \n ".join( + chart_url_settings_whitelist + ) + else: + self.state["state"]["url_state"]["whitelist"] = chart_url_settings_whitelist + + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_chord_diagram_details( + self, + opacity_default: float = None, + opacity_focused: float = None, + opacity_defocused: float = None, + selected_chords: Union[list, str] = None, + use_mouseover_label: bool = None, + show_selected_label: bool = None, + chord_labels_reponsive: bool = None, + chord_label_font_size: float = None, + chord_label_font_size_min: float = None, + chord_label_font_size_max: float = None, + show_chord_stroke: bool = None, + chord_stroke_color: str = None, + chord_stroke_opacity: float = None, + arc_thickness: float = None, + arc_spacing: float = None, + pad_angle: float = None, + label_alignment: str = None, + label_responsive: bool = None, + label_font_size: float = None, + label_font_size_min: float = None, + label_font_size_max: float = None, + label_color: str = None, + use_label_color_arc: bool = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + gradient_type: str = None, + chart_popup_show_popups: bool = None, + chart_popup_is_custom: bool = None, + chart_popup_custom_template: Union[list, str] = None, + chart_popup_show_pointer: bool = None, + chart_popup_show_shadow: bool = None, + chart_popup_style_popups: bool = None, + chart_popup_text_color: str = None, + chart_popup_align: str = None, + chart_popup_text_size: float = None, + chart_popup_fill_color: str = None, + chart_popup_opacity: float = None, + chart_popup_padding: float = None, + chart_popup_border_radius: float = None, + chart_popup_max_width: float = None, + popup_type: str = None, + popup_content: Union[list, str] = None, + animation_speed: float = None, + chart_number_localization_input_decimal_separator: str = None, + chart_number_localization_output_separators: str = None, + chart_label_number_date_format_prefix: str = None, + chart_label_number_date_format_suffix: str = None, + chart_label_number_date_format_n_dec: float = None, + chart_label_number_date_format_advanced: bool = None, + chart_label_number_date_format_negative_sign: str = None, + chart_label_number_date_format_strip_zeros: bool = None, + chart_label_number_date_format_strip_separator: bool = None, + chart_label_number_date_format_transform_labels: bool = None, + chart_label_number_date_format_transform: str = None, + chart_label_number_date_format_multiply_divide_constant: float = None, + chart_label_number_date_format_exponentiate_constant: float = None, + chart_scale: float = None, + allow_resize: bool = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: chord diagram. + + + :param opacity_default: Default opacity. Opacity for the default view. Flourish type hint: number, defaults to None. + :type opacity_default: float, optional + :param opacity_focused: Focused opacity. Opacity for the selected and/or hovered chords. Flourish type hint: number, defaults to None. + :type opacity_focused: float, optional + :param opacity_defocused: Defocused opacity. Opacity for the background chords when one is in focus. Flourish type hint: number, defaults to None. + :type opacity_defocused: float, optional + :param selected_chords: Highlight chords. You can highlight all of an arcs chords by typing the name of the arc. Alternatively, you can highlight individual chords by typing the name of the two arcs that it connects using the format: Arc 1 >> Arc 2 If you wanted to highlight all chords from "Arc 3" and any chords between "Arc 1" and "Arc 2" you would write: Arc 3 Arc 1 >> Arc 2 If you wish to highlight/unhighlight in the story editor you can do so by clicking on chords. Flourish type hint: text, defaults to None. + :type selected_chords: Union[list, str], optional + :param use_mouseover_label: Show chord values on hover. Flourish type hint: boolean, defaults to None. + :type use_mouseover_label: bool, optional + :param show_selected_label: Keep chord values on click. Flourish type hint: boolean, defaults to None. + :type show_selected_label: bool, optional + :param chord_labels_reponsive: Label text size. Choices: True, False. Auto changes the label size based on the window size, subject to the specified min and max. Flourish type hint: boolean, defaults to None. + :type chord_labels_reponsive: bool, optional + :param chord_label_font_size: Text size. Flourish type hint: number, defaults to None. + :type chord_label_font_size: float, optional + :param chord_label_font_size_min: Min size. Flourish type hint: number, defaults to None. + :type chord_label_font_size_min: float, optional + :param chord_label_font_size_max: Max size. Flourish type hint: number, defaults to None. + :type chord_label_font_size_max: float, optional + :param show_chord_stroke: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type show_chord_stroke: bool, optional + :param chord_stroke_color: Stroke color. Flourish type hint: color, defaults to None. + :type chord_stroke_color: str, optional + :param chord_stroke_opacity: Stroke opacity. Flourish type hint: number, defaults to None. + :type chord_stroke_opacity: float, optional + :param arc_thickness: Thickness. As a percentage of the radius. Flourish type hint: number, defaults to None. + :type arc_thickness: float, optional + :param arc_spacing: Space below. As a percentage of the radius. Flourish type hint: number, defaults to None. + :type arc_spacing: float, optional + :param pad_angle: Space between. In degrees. Flourish type hint: number, defaults to None. + :type pad_angle: float, optional + :param label_alignment: Alignment. Choices: along_arcs, 90_rotated. Flourish type hint: string, defaults to None. + :type label_alignment: str, optional + :param label_responsive: Label text size. Choices: True, False. Auto changes the label size based on the window size, subject to the specified min and max. Flourish type hint: boolean, defaults to None. + :type label_responsive: bool, optional + :param label_font_size: Text size. Flourish type hint: number, defaults to None. + :type label_font_size: float, optional + :param label_font_size_min: Min size. Flourish type hint: number, defaults to None. + :type label_font_size_min: float, optional + :param label_font_size_max: Max size. Flourish type hint: number, defaults to None. + :type label_font_size_max: float, optional + :param label_color: Label color. Flourish type hint: color, defaults to None. + :type label_color: str, optional + :param use_label_color_arc: Make the arc label color the same as the arc color. Flourish type hint: boolean, defaults to None. + :type use_label_color_arc: bool, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param gradient_type: Chord color mode. Choices: linear_gradient, largest_end, smallest_end. Flourish type hint: string, defaults to None. + :type gradient_type: str, optional + :param chart_popup_show_popups: Popups. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popups: bool, optional + :param chart_popup_is_custom: Popup contents. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_is_custom: bool, optional + :param chart_popup_custom_template: Popup content. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. Flourish type hint: text, defaults to None. + :type chart_popup_custom_template: Union[list, str], optional + :param chart_popup_show_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_pointer: bool, optional + :param chart_popup_show_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_shadow: bool, optional + :param chart_popup_style_popups: Custom styling. Flourish type hint: boolean, defaults to None. + :type chart_popup_style_popups: bool, optional + :param chart_popup_text_color: Text colour. Flourish type hint: color, defaults to None. + :type chart_popup_text_color: str, optional + :param chart_popup_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_popup_align: str, optional + :param chart_popup_text_size: Font size. Flourish type hint: number, defaults to None. + :type chart_popup_text_size: float, optional + :param chart_popup_fill_color: Fill colour. Flourish type hint: color, defaults to None. + :type chart_popup_fill_color: str, optional + :param chart_popup_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_opacity: float, optional + :param chart_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_padding: float, optional + :param chart_popup_border_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_border_radius: float, optional + :param chart_popup_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_popup_max_width: float, optional + :param popup_type: Position. Choices: directional, non_directional. Flourish type hint: string, defaults to None. + :type popup_type: str, optional + :param popup_content: Popup description. Add a title or a discription to help explain your tooltip. Flourish type hint: text, defaults to None. + :type popup_content: Union[list, str], optional + :param animation_speed: Animation duration. The duration, in seconds, of transitions for example between two slides in a story Flourish type hint: number, defaults to None. + :type animation_speed: float, optional + :param chart_number_localization_input_decimal_separator: Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to None. + :type chart_number_localization_input_decimal_separator: str, optional + :param chart_number_localization_output_separators: Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to None. + :type chart_number_localization_output_separators: str, optional + :param chart_label_number_date_format_prefix: Prefix. Text to place in front of number. Flourish type hint: string, defaults to None. + :type chart_label_number_date_format_prefix: str, optional + :param chart_label_number_date_format_suffix: Suffix. Text to place after number. Flourish type hint: string, defaults to None. + :type chart_label_number_date_format_suffix: str, optional + :param chart_label_number_date_format_n_dec: Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_label_number_date_format_n_dec: float, optional + :param chart_label_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_label_number_date_format_advanced: bool, optional + :param chart_label_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_label_number_date_format_negative_sign: str, optional + :param chart_label_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_label_number_date_format_strip_zeros: bool, optional + :param chart_label_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_label_number_date_format_strip_separator: bool, optional + :param chart_label_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_label_number_date_format_transform_labels: bool, optional + :param chart_label_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_label_number_date_format_transform: str, optional + :param chart_label_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_label_number_date_format_multiply_divide_constant: float, optional + :param chart_label_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_label_number_date_format_exponentiate_constant: float, optional + :param chart_scale: Chart scale. Flourish type hint: number, defaults to None. + :type chart_scale: float, optional + :param allow_resize: Allow embeds to resize. Checking this option allows the visualization to resize so the chord diagram is always a square without white space to the sides or top/bottom. Flourish type hint: boolean, defaults to None. + :type allow_resize: bool, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "popup": {}, + "localization": {}, + "label_format": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + self.state["state"]["opacity_default"] = opacity_default + self.state["state"]["opacity_focused"] = opacity_focused + self.state["state"]["opacity_defocused"] = opacity_defocused + + if ( + selected_chords is not None + and len(selected_chords) > 1 + and isinstance(selected_chords, list) + ): + self.state["state"]["selected_chords"] = " \n ".join(selected_chords) + else: + self.state["state"]["selected_chords"] = selected_chords + + self.state["state"]["use_mouseover_label"] = use_mouseover_label + self.state["state"]["show_selected_label"] = show_selected_label + + list_chord_labels_reponsive = [True, False] + [None] + if chord_labels_reponsive not in list_chord_labels_reponsive: + raise ValueError(f"`chord_labels_reponsive` must be one of: [True, False]") + elif ( + chord_labels_reponsive in list_chord_labels_reponsive + and chord_labels_reponsive is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chord_labels_reponsive in k + } + if len(filtered_dict) > 0: + self.state["state"]["chord_labels_reponsive"] = filtered_dict[ + chord_labels_reponsive + ] + self.state["state"]["chord_label_font_size"] = chord_label_font_size + self.state["state"]["chord_label_font_size_min"] = chord_label_font_size_min + self.state["state"]["chord_label_font_size_max"] = chord_label_font_size_max + + list_show_chord_stroke = [True, False] + [None] + if show_chord_stroke not in list_show_chord_stroke: + raise ValueError(f"`show_chord_stroke` must be one of: [True, False]") + elif ( + show_chord_stroke in list_show_chord_stroke + and show_chord_stroke is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if show_chord_stroke in k + } + if len(filtered_dict) > 0: + self.state["state"]["show_chord_stroke"] = filtered_dict[ + show_chord_stroke + ] + self.state["state"]["chord_stroke_color"] = chord_stroke_color + self.state["state"]["chord_stroke_opacity"] = chord_stroke_opacity + self.state["state"]["arc_thickness"] = arc_thickness + self.state["state"]["arc_spacing"] = arc_spacing + self.state["state"]["pad_angle"] = pad_angle + + list_label_alignment = ["along_arcs", "90_rotated"] + [None] + if label_alignment not in list_label_alignment: + raise ValueError( + f"`label_alignment` must be one of: ['along_arcs', '90_rotated']" + ) + elif label_alignment in list_label_alignment and label_alignment is not None: + filtered_dict = { + k: v + for (k, v) in { + "along_arcs": "along_arcs", + "90_rotated": "90_rotated", + }.items() + if label_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_alignment"] = filtered_dict[label_alignment] + + list_label_responsive = [True, False] + [None] + if label_responsive not in list_label_responsive: + raise ValueError(f"`label_responsive` must be one of: [True, False]") + elif label_responsive in list_label_responsive and label_responsive is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if label_responsive in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_responsive"] = filtered_dict[ + label_responsive + ] + self.state["state"]["label_font_size"] = label_font_size + self.state["state"]["label_font_size_min"] = label_font_size_min + self.state["state"]["label_font_size_max"] = label_font_size_max + self.state["state"]["label_color"] = label_color + self.state["state"]["use_label_color_arc"] = use_label_color_arc + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + + list_gradient_type = ["linear_gradient", "largest_end", "smallest_end"] + [None] + if gradient_type not in list_gradient_type: + raise ValueError( + f"`gradient_type` must be one of: ['linear_gradient', 'largest_end', 'smallest_end']" + ) + elif gradient_type in list_gradient_type and gradient_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "linear_gradient": "linear_gradient", + "largest_end": "largest_end", + "smallest_end": "smallest_end", + }.items() + if gradient_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["gradient_type"] = filtered_dict[gradient_type] + + list_chart_popup_show_popups = [True, False] + [None] + if chart_popup_show_popups not in list_chart_popup_show_popups: + raise ValueError(f"`chart_popup_show_popups` must be one of: [True, False]") + elif ( + chart_popup_show_popups in list_chart_popup_show_popups + and chart_popup_show_popups is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_popup_show_popups in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["show_popups"] = filtered_dict[ + chart_popup_show_popups + ] + + list_chart_popup_is_custom = [False, True] + [None] + if chart_popup_is_custom not in list_chart_popup_is_custom: + raise ValueError(f"`chart_popup_is_custom` must be one of: [False, True]") + elif ( + chart_popup_is_custom in list_chart_popup_is_custom + and chart_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["is_custom"] = filtered_dict[ + chart_popup_is_custom + ] + + if ( + chart_popup_custom_template is not None + and len(chart_popup_custom_template) > 1 + and isinstance(chart_popup_custom_template, list) + ): + self.state["state"]["popup"]["custom_template"] = " \n ".join( + chart_popup_custom_template + ) + else: + self.state["state"]["popup"][ + "custom_template" + ] = chart_popup_custom_template + + self.state["state"]["popup"]["show_pointer"] = chart_popup_show_pointer + self.state["state"]["popup"]["show_shadow"] = chart_popup_show_shadow + self.state["state"]["popup"]["style_popups"] = chart_popup_style_popups + self.state["state"]["popup"]["text_color"] = chart_popup_text_color + + list_chart_popup_align = ["left", "center", "right"] + [None] + if chart_popup_align not in list_chart_popup_align: + raise ValueError( + f"`chart_popup_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_popup_align in list_chart_popup_align + and chart_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["align"] = filtered_dict[chart_popup_align] + self.state["state"]["popup"]["text_size"] = chart_popup_text_size + self.state["state"]["popup"]["fill_color"] = chart_popup_fill_color + self.state["state"]["popup"]["opacity"] = chart_popup_opacity + self.state["state"]["popup"]["padding"] = chart_popup_padding + self.state["state"]["popup"]["border_radius"] = chart_popup_border_radius + self.state["state"]["popup"]["max_width"] = chart_popup_max_width + + list_popup_type = ["directional", "non_directional"] + [None] + if popup_type not in list_popup_type: + raise ValueError( + f"`popup_type` must be one of: ['directional', 'non_directional']" + ) + elif popup_type in list_popup_type and popup_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "directional": "directional", + "non_directional": "non_directional", + }.items() + if popup_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup_type"] = filtered_dict[popup_type] + + if ( + popup_content is not None + and len(popup_content) > 1 + and isinstance(popup_content, list) + ): + self.state["state"]["popup_content"] = " \n ".join(popup_content) + else: + self.state["state"]["popup_content"] = popup_content + + self.state["state"]["animation_speed"] = animation_speed + + list_chart_number_localization_input_decimal_separator = [".", ","] + [None] + if ( + chart_number_localization_input_decimal_separator + not in list_chart_number_localization_input_decimal_separator + ): + raise ValueError( + f"`chart_number_localization_input_decimal_separator` must be one of: ['.', ',']" + ) + elif ( + chart_number_localization_input_decimal_separator + in list_chart_number_localization_input_decimal_separator + and chart_number_localization_input_decimal_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in {".": ".", ",": ","}.items() + if chart_number_localization_input_decimal_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "input_decimal_separator" + ] = filtered_dict[chart_number_localization_input_decimal_separator] + + list_chart_number_localization_output_separators = [ + ",.", + ".,", + ".", + ",", + " .", + " ,", + ] + [None] + if ( + chart_number_localization_output_separators + not in list_chart_number_localization_output_separators + ): + raise ValueError( + f"`chart_number_localization_output_separators` must be one of: [',.', '.,', '.', ',', ' .', ' ,']" + ) + elif ( + chart_number_localization_output_separators + in list_chart_number_localization_output_separators + and chart_number_localization_output_separators is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ",.": ",.", + ".,": ".,", + ".": ".", + ",": ",", + " .": " .", + " ,": " ,", + }.items() + if chart_number_localization_output_separators in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "output_separators" + ] = filtered_dict[chart_number_localization_output_separators] + self.state["state"]["label_format"][ + "prefix" + ] = chart_label_number_date_format_prefix + self.state["state"]["label_format"][ + "suffix" + ] = chart_label_number_date_format_suffix + self.state["state"]["label_format"][ + "n_dec" + ] = chart_label_number_date_format_n_dec + self.state["state"]["label_format"][ + "advanced" + ] = chart_label_number_date_format_advanced + + list_chart_label_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_label_number_date_format_negative_sign + not in list_chart_label_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_label_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_label_number_date_format_negative_sign + in list_chart_label_number_date_format_negative_sign + and chart_label_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_label_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_format"]["negative_sign"] = filtered_dict[ + chart_label_number_date_format_negative_sign + ] + self.state["state"]["label_format"][ + "strip_zeros" + ] = chart_label_number_date_format_strip_zeros + self.state["state"]["label_format"][ + "strip_separator" + ] = chart_label_number_date_format_strip_separator + self.state["state"]["label_format"][ + "transform_labels" + ] = chart_label_number_date_format_transform_labels + + list_chart_label_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_label_number_date_format_transform + not in list_chart_label_number_date_format_transform + ): + raise ValueError( + f"`chart_label_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_label_number_date_format_transform + in list_chart_label_number_date_format_transform + and chart_label_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_label_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_format"]["transform"] = filtered_dict[ + chart_label_number_date_format_transform + ] + self.state["state"]["label_format"][ + "multiply_divide_constant" + ] = chart_label_number_date_format_multiply_divide_constant + self.state["state"]["label_format"][ + "exponentiate_constant" + ] = chart_label_number_date_format_exponentiate_constant + self.state["state"]["chart_scale"] = chart_scale + self.state["state"]["allow_resize"] = allow_resize + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_countdown_details( + self, + date_day: float = None, + date_month: float = None, + date_year: float = None, + date_hour: float = None, + date_minute: float = None, + date_second: float = None, + before_content_mode: str = None, + before_content_custom: Union[list, str] = None, + after_content_mode: str = None, + after_content_custom: Union[list, str] = None, + countdown_size: float = None, + countdown_color: str = None, + countdown_weight: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: countdown. + + + :param date_day: Day. Flourish type hint: number, defaults to None. + :type date_day: float, optional + :param date_month: Month. Flourish type hint: number, defaults to None. + :type date_month: float, optional + :param date_year: Year. If your date is in the future, the tool will count down to it If its in the past, the tool will count up, showing the number of days that have passed since the date. Flourish type hint: number, defaults to None. + :type date_year: float, optional + :param date_hour: Hour. 0 to 23. Flourish type hint: number, defaults to None. + :type date_hour: float, optional + :param date_minute: Minute. Flourish type hint: number, defaults to None. + :type date_minute: float, optional + :param date_second: Second. Flourish type hint: number, defaults to None. + :type date_second: float, optional + :param before_content_mode: Text mode. Choices: auto, custom. Displays while counting down to the specified time/date. Flourish type hint: string, defaults to None. + :type before_content_mode: str, optional + :param before_content_custom: Custom text before date/time reached. Can include any text or HTML Use `{{d}}` for days, `{{h}}` for hours, `{{m}}` for minutes and `{{s}}` for seconds. Flourish type hint: text, defaults to None. + :type before_content_custom: Union[list, str], optional + :param after_content_mode: Text mode. Choices: auto, custom. Displays while counting upwards after the specified time/date. Flourish type hint: string, defaults to None. + :type after_content_mode: str, optional + :param after_content_custom: Custom text after date/time reached. Can include any text or HTML Use `{{d}}` for days, `{{h}}` for hours, `{{m}}` for minutes and `{{s}}` for seconds. Flourish type hint: text, defaults to None. + :type after_content_custom: Union[list, str], optional + :param countdown_size: Size. Measured in vw (percentage of view window). This makes sure the countdown always scales with the page. Flourish type hint: number, defaults to None. + :type countdown_size: float, optional + :param countdown_color: Color. Flourish type hint: color, defaults to None. + :type countdown_color: str, optional + :param countdown_weight: Weight. Choices: 400, 600. Flourish type hint: string, defaults to None. + :type countdown_weight: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "date": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + self.state["state"]["date"]["day"] = date_day + self.state["state"]["date"]["month"] = date_month + self.state["state"]["date"]["year"] = date_year + self.state["state"]["date"]["hour"] = date_hour + self.state["state"]["date"]["minute"] = date_minute + self.state["state"]["date"]["second"] = date_second + + list_before_content_mode = ["auto", "custom"] + [None] + if before_content_mode not in list_before_content_mode: + raise ValueError( + f"`before_content_mode` must be one of: ['auto', 'custom']" + ) + elif ( + before_content_mode in list_before_content_mode + and before_content_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if before_content_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["before_content_mode"] = filtered_dict[ + before_content_mode + ] + + if ( + before_content_custom is not None + and len(before_content_custom) > 1 + and isinstance(before_content_custom, list) + ): + self.state["state"]["before_content_custom"] = " \n ".join( + before_content_custom + ) + else: + self.state["state"]["before_content_custom"] = before_content_custom + + list_after_content_mode = ["auto", "custom"] + [None] + if after_content_mode not in list_after_content_mode: + raise ValueError(f"`after_content_mode` must be one of: ['auto', 'custom']") + elif ( + after_content_mode in list_after_content_mode + and after_content_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if after_content_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["after_content_mode"] = filtered_dict[ + after_content_mode + ] + + if ( + after_content_custom is not None + and len(after_content_custom) > 1 + and isinstance(after_content_custom, list) + ): + self.state["state"]["after_content_custom"] = " \n ".join( + after_content_custom + ) + else: + self.state["state"]["after_content_custom"] = after_content_custom + + self.state["state"]["countdown_size"] = countdown_size + self.state["state"]["countdown_color"] = countdown_color + + list_countdown_weight = ["400", "600"] + [None] + if countdown_weight not in list_countdown_weight: + raise ValueError(f"`countdown_weight` must be one of: ['400', '600']") + elif countdown_weight in list_countdown_weight and countdown_weight is not None: + filtered_dict = { + k: v + for (k, v) in {"400": "400", "600": "600"}.items() + if countdown_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["countdown_weight"] = filtered_dict[ + countdown_weight + ] + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_draw_the_line_details( + self, + guess_lines_start: float = None, + guess_lines_width: float = None, + guess_lines_dot_radius: float = None, + guess_lines_dash: float = None, + fixed_lines_width: float = None, + fixed_lines_dot_radius: float = None, + line_curve: str = None, + guess_lines_panel_position: str = None, + message_styling: bool = None, + message_background: str = None, + message_opacity: float = None, + message_color: str = None, + message_font_size: float = None, + message_border: str = None, + message_border_width: float = None, + message_border_radius: float = None, + message_shadow: bool = None, + guess_lines_message_text: str = None, + scores_3_min: float = None, + scores_3_text: str = None, + scores_2_min: float = None, + scores_2_text: str = None, + scores_1_min: float = None, + scores_1_text: str = None, + scores_0_text: str = None, + guess_lines_submit_text: str = None, + submit_styling: bool = None, + submit_background: str = None, + submit_opacity: float = None, + submit_color: str = None, + submit_font_size: float = None, + submit_border: str = None, + submit_border_width: float = None, + submit_border_radius: float = None, + submit_shadow: bool = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_x_axis_axis_position: str = None, + chart_x_axis_y_axis_position: str = None, + chart_x_axis_numeric_scale_type: str = None, + chart_x_axis_linear_min: float = None, + chart_x_axis_linear_max: float = None, + chart_x_axis_log_min: float = None, + chart_x_axis_log_max: float = None, + chart_x_axis_datetime_min: str = None, + chart_x_axis_datetime_max: str = None, + chart_x_axis_flip: bool = None, + chart_x_axis_show_scale_settings: bool = None, + chart_x_axis_nice: bool = None, + chart_x_axis_zero_axis: str = None, + chart_x_axis_title_mode: str = None, + chart_x_axis_title: str = None, + chart_x_axis_title_styling: bool = None, + chart_x_axis_title_weight: str = None, + chart_x_axis_title_color: str = None, + chart_x_axis_title_size: float = None, + chart_x_axis_title_padding: float = None, + chart_x_axis_tick_label_position: str = None, + chart_x_axis_tick_label_styling: bool = None, + chart_x_axis_tick_label_size: float = None, + chart_x_axis_tick_label_color: str = None, + chart_x_axis_tick_padding: float = None, + chart_x_axis_tick_label_angle: str = None, + chart_x_axis_tick_label_weight: str = None, + chart_x_axis_tick_label_max_lines: float = None, + chart_x_axis_tick_label_line_height: float = None, + chart_x_axis_tick_label_space_mode: str = None, + chart_x_axis_tick_label_space: float = None, + chart_x_axis_tick_mode: str = None, + chart_x_axis_tick_number: float = None, + chart_x_axis_tick_custom: Union[list, str] = None, + chart_x_axis_line_and_tick_color: str = None, + chart_x_axis_line_and_tick_width: float = None, + chart_x_axis_tick_length: float = None, + chart_x_axis_tick_side: str = None, + chart_x_axis_line_visible: bool = None, + chart_x_axis_edge_padding: float = None, + chart_x_axis_gridlines_visible: bool = None, + chart_x_axis_gridlines_styling: bool = None, + chart_x_axis_gridline_color: str = None, + chart_x_axis_gridline_style: str = None, + chart_x_axis_gridline_width: float = None, + chart_x_axis_gridline_category_dividers: bool = None, + chart_x_axis_gridline_category_dividers_extend: bool = None, + chart_y_axis_axis_visible: bool = None, + chart_y_axis_numeric_scale_type: str = None, + chart_y_axis_linear_min: float = None, + chart_y_axis_linear_max: float = None, + chart_y_axis_log_min: float = None, + chart_y_axis_log_max: float = None, + chart_y_axis_datetime_min: str = None, + chart_y_axis_datetime_max: str = None, + chart_y_axis_flip: bool = None, + chart_y_axis_show_scale_settings: bool = None, + chart_y_axis_nice: bool = None, + chart_y_axis_zero_axis: str = None, + chart_y_axis_title_mode: str = None, + chart_y_axis_title: str = None, + chart_y_axis_title_styling: bool = None, + chart_y_axis_title_position: str = None, + chart_y_axis_title_weight: str = None, + chart_y_axis_title_color: str = None, + chart_y_axis_title_size: float = None, + chart_y_axis_title_padding: float = None, + chart_y_axis_tick_label_position: str = None, + chart_y_axis_tick_label_styling: bool = None, + chart_y_axis_tick_label_size: float = None, + chart_y_axis_tick_label_color: str = None, + chart_y_axis_tick_padding: float = None, + chart_y_axis_tick_label_angle: str = None, + chart_y_axis_tick_label_weight: str = None, + chart_y_axis_tick_label_max_lines: float = None, + chart_y_axis_tick_label_line_height: float = None, + chart_y_axis_tick_label_space_mode: str = None, + chart_y_axis_tick_label_space: float = None, + chart_y_axis_tick_mode: str = None, + chart_y_axis_tick_number: float = None, + chart_y_axis_tick_custom: Union[list, str] = None, + chart_y_axis_line_and_tick_color: str = None, + chart_y_axis_line_and_tick_width: float = None, + chart_y_axis_tick_length: float = None, + chart_y_axis_tick_side: str = None, + chart_y_axis_line_visible: bool = None, + chart_y_axis_edge_padding: float = None, + chart_y_axis_gridlines_visible: bool = None, + chart_y_axis_gridlines_styling: bool = None, + chart_y_axis_gridline_color: str = None, + chart_y_axis_gridline_style: str = None, + chart_y_axis_gridline_width: float = None, + chart_y_axis_gridline_category_dividers: bool = None, + chart_y_axis_gridline_category_dividers_extend: bool = None, + chart_background_background_color_enabled: bool = None, + chart_background_background_image_enabled: bool = None, + chart_background_background_color: str = None, + chart_background_background_image_src: str = None, + chart_background_background_image_size: str = None, + chart_background_background_image_position: str = None, + datetime_input_format: str = None, + date_format: str = None, + chart_number_localization_input_decimal_separator: str = None, + chart_number_localization_output_separators: str = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: draw the line chart. + + + :param guess_lines_start: Percent to reveal. What percentage of the line to show before a user starts drawing. Flourish type hint: number, defaults to None. + :type guess_lines_start: float, optional + :param guess_lines_width: Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type guess_lines_width: float, optional + :param guess_lines_dot_radius: Dot radius. Flourish type hint: number, defaults to None. + :type guess_lines_dot_radius: float, optional + :param guess_lines_dash: Drawing dash size. Only applies to the drawn section of the line. Set to zero for a solid line. Flourish type hint: number, defaults to None. + :type guess_lines_dash: float, optional + :param fixed_lines_width: Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type fixed_lines_width: float, optional + :param fixed_lines_dot_radius: Dot radius. Flourish type hint: number, defaults to None. + :type fixed_lines_dot_radius: float, optional + :param line_curve: Live curve. Choices: linear, step, curve. Flourish type hint: string, defaults to None. + :type line_curve: str, optional + :param guess_lines_panel_position: Position. Choices: top, middle, bottom. Flourish type hint: string, defaults to None. + :type guess_lines_panel_position: str, optional + :param message_styling: Styling. Flourish type hint: boolean, defaults to None. + :type message_styling: bool, optional + :param message_background: Background. Flourish type hint: color, defaults to None. + :type message_background: str, optional + :param message_opacity: Opacity. Flourish type hint: number, defaults to None. + :type message_opacity: float, optional + :param message_color: Font color. Flourish type hint: color, defaults to None. + :type message_color: str, optional + :param message_font_size: Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type message_font_size: float, optional + :param message_border: Border color. Flourish type hint: color, defaults to None. + :type message_border: str, optional + :param message_border_width: Border width. In pixels. Flourish type hint: number, defaults to None. + :type message_border_width: float, optional + :param message_border_radius: Border radius. In rems, a multiple of the panels font size. Flourish type hint: number, defaults to None. + :type message_border_radius: float, optional + :param message_shadow: Drop shadow. Flourish type hint: boolean, defaults to None. + :type message_shadow: bool, optional + :param guess_lines_message_text: Text. Include `{{LINE}}` to show the lines name, in color. Flourish type hint: string, defaults to None. + :type guess_lines_message_text: str, optional + :param scores_3_min: % error. Specified as the maximum percentage error allowed, relative to the total Y axis. Flourish type hint: number, defaults to None. + :type scores_3_min: float, optional + :param scores_3_text: Text. Use `{{DIFF}}` to show the average gap from the users guess to the real data point. Flourish type hint: string, defaults to None. + :type scores_3_text: str, optional + :param scores_2_min: % error. Specified as the maximum percentage error allowed, relative to the total Y axis. Flourish type hint: number, defaults to None. + :type scores_2_min: float, optional + :param scores_2_text: Text. Flourish type hint: string, defaults to None. + :type scores_2_text: str, optional + :param scores_1_min: % error. Specified as the maximum percentage error allowed, relative to the total Y axis. Flourish type hint: number, defaults to None. + :type scores_1_min: float, optional + :param scores_1_text: Text. Flourish type hint: string, defaults to None. + :type scores_1_text: str, optional + :param scores_0_text: Text. Flourish type hint: string, defaults to None. + :type scores_0_text: str, optional + :param guess_lines_submit_text: Text. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to None. + :type guess_lines_submit_text: str, optional + :param submit_styling: Styling. Flourish type hint: boolean, defaults to None. + :type submit_styling: bool, optional + :param submit_background: Background. Flourish type hint: color, defaults to None. + :type submit_background: str, optional + :param submit_opacity: Opacity. Flourish type hint: number, defaults to None. + :type submit_opacity: float, optional + :param submit_color: Font color. Flourish type hint: color, defaults to None. + :type submit_color: str, optional + :param submit_font_size: Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type submit_font_size: float, optional + :param submit_border: Border colour. Flourish type hint: color, defaults to None. + :type submit_border: str, optional + :param submit_border_width: Border width. In pixels. Flourish type hint: number, defaults to None. + :type submit_border_width: float, optional + :param submit_border_radius: Border radius. In ems a multiple of the panels font size. Flourish type hint: number, defaults to None. + :type submit_border_radius: float, optional + :param submit_shadow: Drop shadow. Flourish type hint: boolean, defaults to None. + :type submit_shadow: bool, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_x_axis_axis_position: Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to None. + :type chart_x_axis_axis_position: str, optional + :param chart_x_axis_y_axis_position: Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to None. + :type chart_x_axis_y_axis_position: str, optional + :param chart_x_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_x_axis_numeric_scale_type: str, optional + :param chart_x_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_min: float, optional + :param chart_x_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_max: float, optional + :param chart_x_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_min: float, optional + :param chart_x_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_max: float, optional + :param chart_x_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_min: str, optional + :param chart_x_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_max: str, optional + :param chart_x_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_flip: bool, optional + :param chart_x_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_show_scale_settings: bool, optional + :param chart_x_axis_nice: Round min/max. Choices: True, False. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_nice: bool, optional + :param chart_x_axis_zero_axis: Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to None. + :type chart_x_axis_zero_axis: str, optional + :param chart_x_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_mode: str, optional + :param chart_x_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_x_axis_title: str, optional + :param chart_x_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_title_styling: bool, optional + :param chart_x_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_weight: str, optional + :param chart_x_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_title_color: str, optional + :param chart_x_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_size: float, optional + :param chart_x_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_padding: float, optional + :param chart_x_axis_tick_label_position: Position. Choices: default, left, right. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_position: str, optional + :param chart_x_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_tick_label_styling: bool, optional + :param chart_x_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_size: float, optional + :param chart_x_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_tick_label_color: str, optional + :param chart_x_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_padding: float, optional + :param chart_x_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_angle: str, optional + :param chart_x_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_weight: str, optional + :param chart_x_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_max_lines: float, optional + :param chart_x_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_line_height: float, optional + :param chart_x_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_space_mode: str, optional + :param chart_x_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_space: float, optional + :param chart_x_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_mode: str, optional + :param chart_x_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_number: float, optional + :param chart_x_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_x_axis_tick_custom: Union[list, str], optional + :param chart_x_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_x_axis_line_and_tick_color: str, optional + :param chart_x_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_x_axis_line_and_tick_width: float, optional + :param chart_x_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_length: float, optional + :param chart_x_axis_tick_side: Tick side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_side: str, optional + :param chart_x_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_line_visible: bool, optional + :param chart_x_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_x_axis_edge_padding: float, optional + :param chart_x_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_visible: bool, optional + :param chart_x_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_styling: bool, optional + :param chart_x_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_gridline_color: str, optional + :param chart_x_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_x_axis_gridline_style: str, optional + :param chart_x_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_x_axis_gridline_width: float, optional + :param chart_x_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers: bool, optional + :param chart_x_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers_extend: bool, optional + :param chart_y_axis_axis_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_axis_visible: bool, optional + :param chart_y_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_y_axis_numeric_scale_type: str, optional + :param chart_y_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_min: float, optional + :param chart_y_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_max: float, optional + :param chart_y_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_min: float, optional + :param chart_y_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_max: float, optional + :param chart_y_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_min: str, optional + :param chart_y_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_max: str, optional + :param chart_y_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_flip: bool, optional + :param chart_y_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_show_scale_settings: bool, optional + :param chart_y_axis_nice: Round min/max. Choices: True, False. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_nice: bool, optional + :param chart_y_axis_zero_axis: Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to None. + :type chart_y_axis_zero_axis: str, optional + :param chart_y_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_mode: str, optional + :param chart_y_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_y_axis_title: str, optional + :param chart_y_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_title_styling: bool, optional + :param chart_y_axis_title_position: Position. Choices: side, end. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_position: str, optional + :param chart_y_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_weight: str, optional + :param chart_y_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_title_color: str, optional + :param chart_y_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_size: float, optional + :param chart_y_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_padding: float, optional + :param chart_y_axis_tick_label_position: Position. Choices: default, above, below. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_position: str, optional + :param chart_y_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_tick_label_styling: bool, optional + :param chart_y_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_size: float, optional + :param chart_y_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_tick_label_color: str, optional + :param chart_y_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_padding: float, optional + :param chart_y_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_angle: str, optional + :param chart_y_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_weight: str, optional + :param chart_y_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_max_lines: float, optional + :param chart_y_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_line_height: float, optional + :param chart_y_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_space_mode: str, optional + :param chart_y_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_space: float, optional + :param chart_y_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_mode: str, optional + :param chart_y_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_number: float, optional + :param chart_y_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_y_axis_tick_custom: Union[list, str], optional + :param chart_y_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_y_axis_line_and_tick_color: str, optional + :param chart_y_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_y_axis_line_and_tick_width: float, optional + :param chart_y_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_length: float, optional + :param chart_y_axis_tick_side: Side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_side: str, optional + :param chart_y_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_line_visible: bool, optional + :param chart_y_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_y_axis_edge_padding: float, optional + :param chart_y_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_visible: bool, optional + :param chart_y_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_styling: bool, optional + :param chart_y_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_gridline_color: str, optional + :param chart_y_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_y_axis_gridline_style: str, optional + :param chart_y_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_y_axis_gridline_width: float, optional + :param chart_y_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers: bool, optional + :param chart_y_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers_extend: bool, optional + :param chart_background_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_background_background_color_enabled: bool, optional + :param chart_background_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_background_background_image_enabled: bool, optional + :param chart_background_background_color: Color. Flourish type hint: color, defaults to None. + :type chart_background_background_color: str, optional + :param chart_background_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_background_background_image_src: str, optional + :param chart_background_background_image_size: Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to None. + :type chart_background_background_image_size: str, optional + :param chart_background_background_image_position: Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to None. + :type chart_background_background_image_position: str, optional + :param datetime_input_format: Format in data sheet. Choices: auto, %Y-%m-%dT%H:%M:%S.%LZ, %Y-%m-%d, %m/%d/%Y, %d/%m/%Y, %d-%b-%y, %m/%Y, %m/%y, %b %Y, %b %y, %B %d, %d %b, %Y, %y, %B, %b, %H:%M:%S, %I:%M %p, %H:%M. The date/time format in the datasheet. Leave as Auto for Flourish to make a best guess. If it isnt in the list, you can enter a custom format using d3-time-format syntax. See NPM d3-data-format for details. Flourish type hint: string, defaults to None. + :type datetime_input_format: str, optional + :param date_format: Display format. Choices: auto, %Y-%m-%dT%H:%M:%S.%LZ, %Y-%m-%d, %m/%d/%Y, %d/%m/%Y, %d-%b-%y, %m/%Y, %m/%y, %b %Y, %b %y, %B %d, %d %b, %Y, %y, %B, %b, %A, %a, %H:%M:%S, %I:%M %p, %H:%M. The date/time format to show in the graphic. If it isnt in the list, you can enter a custom format using d3-time-format syntax. See NPM d3-data-format for details. Flourish type hint: string, defaults to None. + :type date_format: str, optional + :param chart_number_localization_input_decimal_separator: Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to None. + :type chart_number_localization_input_decimal_separator: str, optional + :param chart_number_localization_output_separators: Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to None. + :type chart_number_localization_output_separators: str, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "legend_categorical": {}, + "legend_container": {}, + "x": {}, + "y": {}, + "background": {}, + "localization": {}, + "formatter": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + self.state["state"]["guess_lines_start"] = guess_lines_start + self.state["state"]["guess_lines_width"] = guess_lines_width + self.state["state"]["guess_lines_dot_radius"] = guess_lines_dot_radius + self.state["state"]["guess_lines_dash"] = guess_lines_dash + self.state["state"]["fixed_lines_width"] = fixed_lines_width + self.state["state"]["fixed_lines_dot_radius"] = fixed_lines_dot_radius + + list_line_curve = ["linear", "step", "curve"] + [None] + if line_curve not in list_line_curve: + raise ValueError( + f"`line_curve` must be one of: ['linear', 'step', 'curve']" + ) + elif line_curve in list_line_curve and line_curve is not None: + filtered_dict = { + k: v + for (k, v) in { + "linear": "linear", + "step": "step", + "curve": "curve", + }.items() + if line_curve in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_curve"] = filtered_dict[line_curve] + + list_guess_lines_panel_position = ["top", "middle", "bottom"] + [None] + if guess_lines_panel_position not in list_guess_lines_panel_position: + raise ValueError( + f"`guess_lines_panel_position` must be one of: ['top', 'middle', 'bottom']" + ) + elif ( + guess_lines_panel_position in list_guess_lines_panel_position + and guess_lines_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "middle": "middle", + "bottom": "bottom", + }.items() + if guess_lines_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["guess_lines_panel_position"] = filtered_dict[ + guess_lines_panel_position + ] + self.state["state"]["message_styling"] = message_styling + self.state["state"]["message_background"] = message_background + self.state["state"]["message_opacity"] = message_opacity + self.state["state"]["message_color"] = message_color + self.state["state"]["message_font_size"] = message_font_size + self.state["state"]["message_border"] = message_border + self.state["state"]["message_border_width"] = message_border_width + self.state["state"]["message_border_radius"] = message_border_radius + self.state["state"]["message_shadow"] = message_shadow + self.state["state"]["guess_lines_message_text"] = guess_lines_message_text + self.state["state"]["scores_3_min"] = scores_3_min + self.state["state"]["scores_3_text"] = scores_3_text + self.state["state"]["scores_2_min"] = scores_2_min + self.state["state"]["scores_2_text"] = scores_2_text + self.state["state"]["scores_1_min"] = scores_1_min + self.state["state"]["scores_1_text"] = scores_1_text + self.state["state"]["scores_0_text"] = scores_0_text + self.state["state"]["guess_lines_submit_text"] = guess_lines_submit_text + self.state["state"]["submit_styling"] = submit_styling + self.state["state"]["submit_background"] = submit_background + self.state["state"]["submit_opacity"] = submit_opacity + self.state["state"]["submit_color"] = submit_color + self.state["state"]["submit_font_size"] = submit_font_size + self.state["state"]["submit_border"] = submit_border + self.state["state"]["submit_border_width"] = submit_border_width + self.state["state"]["submit_border_radius"] = submit_border_radius + self.state["state"]["submit_shadow"] = submit_shadow + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_chart_x_axis_axis_position = [ + "bottom", + "float-below", + "float-above", + "top", + "off", + ] + [None] + if chart_x_axis_axis_position not in list_chart_x_axis_axis_position: + raise ValueError( + f"`chart_x_axis_axis_position` must be one of: ['bottom', 'float-below', 'float-above', 'top', 'off']" + ) + elif ( + chart_x_axis_axis_position in list_chart_x_axis_axis_position + and chart_x_axis_axis_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "float-below": "float-below", + "float-above": "float-above", + "top": "top", + "off": "off", + }.items() + if chart_x_axis_axis_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["axis_position"] = filtered_dict[ + chart_x_axis_axis_position + ] + self.state["state"]["x"]["y_axis_position"] = chart_x_axis_y_axis_position + + list_chart_x_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_x_axis_numeric_scale_type not in list_chart_x_axis_numeric_scale_type: + raise ValueError( + f"`chart_x_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_x_axis_numeric_scale_type in list_chart_x_axis_numeric_scale_type + and chart_x_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_x_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["numeric_scale_type"] = filtered_dict[ + chart_x_axis_numeric_scale_type + ] + self.state["state"]["x"]["linear_min"] = chart_x_axis_linear_min + self.state["state"]["x"]["linear_max"] = chart_x_axis_linear_max + self.state["state"]["x"]["log_min"] = chart_x_axis_log_min + self.state["state"]["x"]["log_max"] = chart_x_axis_log_max + self.state["state"]["x"]["datetime_min"] = chart_x_axis_datetime_min + self.state["state"]["x"]["datetime_max"] = chart_x_axis_datetime_max + self.state["state"]["x"]["flip"] = chart_x_axis_flip + self.state["state"]["x"][ + "show_scale_settings" + ] = chart_x_axis_show_scale_settings + + list_chart_x_axis_nice = [True, False] + [None] + if chart_x_axis_nice not in list_chart_x_axis_nice: + raise ValueError(f"`chart_x_axis_nice` must be one of: [True, False]") + elif ( + chart_x_axis_nice in list_chart_x_axis_nice + and chart_x_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["nice"] = filtered_dict[chart_x_axis_nice] + + list_chart_x_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_x_axis_zero_axis not in list_chart_x_axis_zero_axis: + raise ValueError( + f"`chart_x_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_x_axis_zero_axis in list_chart_x_axis_zero_axis + and chart_x_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_x_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["zero_axis"] = filtered_dict[ + chart_x_axis_zero_axis + ] + + list_chart_x_axis_title_mode = ["auto", "custom"] + [None] + if chart_x_axis_title_mode not in list_chart_x_axis_title_mode: + raise ValueError( + f"`chart_x_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_x_axis_title_mode in list_chart_x_axis_title_mode + and chart_x_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_x_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_mode"] = filtered_dict[ + chart_x_axis_title_mode + ] + self.state["state"]["x"]["title"] = chart_x_axis_title + self.state["state"]["x"]["title_styling"] = chart_x_axis_title_styling + + list_chart_x_axis_title_weight = ["bold", "normal"] + [None] + if chart_x_axis_title_weight not in list_chart_x_axis_title_weight: + raise ValueError( + f"`chart_x_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_title_weight in list_chart_x_axis_title_weight + and chart_x_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_weight"] = filtered_dict[ + chart_x_axis_title_weight + ] + self.state["state"]["x"]["title_color"] = chart_x_axis_title_color + self.state["state"]["x"]["title_size"] = chart_x_axis_title_size + self.state["state"]["x"]["title_padding"] = chart_x_axis_title_padding + + list_chart_x_axis_tick_label_position = ["default", "left", "right"] + [None] + if ( + chart_x_axis_tick_label_position + not in list_chart_x_axis_tick_label_position + ): + raise ValueError( + f"`chart_x_axis_tick_label_position` must be one of: ['default', 'left', 'right']" + ) + elif ( + chart_x_axis_tick_label_position in list_chart_x_axis_tick_label_position + and chart_x_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "left": "left", + "right": "right", + }.items() + if chart_x_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_position"] = filtered_dict[ + chart_x_axis_tick_label_position + ] + self.state["state"]["x"]["tick_label_styling"] = chart_x_axis_tick_label_styling + self.state["state"]["x"]["tick_label_size"] = chart_x_axis_tick_label_size + self.state["state"]["x"]["tick_label_color"] = chart_x_axis_tick_label_color + self.state["state"]["x"]["tick_padding"] = chart_x_axis_tick_padding + + list_chart_x_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_x_axis_tick_label_angle not in list_chart_x_axis_tick_label_angle: + raise ValueError( + f"`chart_x_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_x_axis_tick_label_angle in list_chart_x_axis_tick_label_angle + and chart_x_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_x_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_angle"] = filtered_dict[ + chart_x_axis_tick_label_angle + ] + + list_chart_x_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_x_axis_tick_label_weight not in list_chart_x_axis_tick_label_weight: + raise ValueError( + f"`chart_x_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_tick_label_weight in list_chart_x_axis_tick_label_weight + and chart_x_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_weight"] = filtered_dict[ + chart_x_axis_tick_label_weight + ] + self.state["state"]["x"][ + "tick_label_max_lines" + ] = chart_x_axis_tick_label_max_lines + self.state["state"]["x"][ + "tick_label_line_height" + ] = chart_x_axis_tick_label_line_height + + list_chart_x_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_x_axis_tick_label_space_mode + not in list_chart_x_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_x_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_x_axis_tick_label_space_mode + in list_chart_x_axis_tick_label_space_mode + and chart_x_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_x_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_space_mode"] = filtered_dict[ + chart_x_axis_tick_label_space_mode + ] + self.state["state"]["x"]["tick_label_space"] = chart_x_axis_tick_label_space + + list_chart_x_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_x_axis_tick_mode not in list_chart_x_axis_tick_mode: + raise ValueError( + f"`chart_x_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_x_axis_tick_mode in list_chart_x_axis_tick_mode + and chart_x_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_x_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_mode"] = filtered_dict[ + chart_x_axis_tick_mode + ] + self.state["state"]["x"]["tick_number"] = chart_x_axis_tick_number + + if ( + chart_x_axis_tick_custom is not None + and len(chart_x_axis_tick_custom) > 1 + and isinstance(chart_x_axis_tick_custom, list) + ): + self.state["state"]["x"]["tick_custom"] = " \n ".join( + chart_x_axis_tick_custom + ) + else: + self.state["state"]["x"]["tick_custom"] = chart_x_axis_tick_custom + + self.state["state"]["x"][ + "line_and_tick_color" + ] = chart_x_axis_line_and_tick_color + self.state["state"]["x"][ + "line_and_tick_width" + ] = chart_x_axis_line_and_tick_width + self.state["state"]["x"]["tick_length"] = chart_x_axis_tick_length + + list_chart_x_axis_tick_side = ["out", "in"] + [None] + if chart_x_axis_tick_side not in list_chart_x_axis_tick_side: + raise ValueError(f"`chart_x_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_x_axis_tick_side in list_chart_x_axis_tick_side + and chart_x_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_x_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_side"] = filtered_dict[ + chart_x_axis_tick_side + ] + self.state["state"]["x"]["line_visible"] = chart_x_axis_line_visible + self.state["state"]["x"]["edge_padding"] = chart_x_axis_edge_padding + + list_chart_x_axis_gridlines_visible = [True, False] + [None] + if chart_x_axis_gridlines_visible not in list_chart_x_axis_gridlines_visible: + raise ValueError( + f"`chart_x_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_x_axis_gridlines_visible in list_chart_x_axis_gridlines_visible + and chart_x_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridlines_visible"] = filtered_dict[ + chart_x_axis_gridlines_visible + ] + self.state["state"]["x"]["gridlines_styling"] = chart_x_axis_gridlines_styling + self.state["state"]["x"]["gridline_color"] = chart_x_axis_gridline_color + + list_chart_x_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_x_axis_gridline_style not in list_chart_x_axis_gridline_style: + raise ValueError( + f"`chart_x_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_x_axis_gridline_style in list_chart_x_axis_gridline_style + and chart_x_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_x_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridline_style"] = filtered_dict[ + chart_x_axis_gridline_style + ] + self.state["state"]["x"]["gridline_width"] = chart_x_axis_gridline_width + self.state["state"]["x"][ + "gridline_category_dividers" + ] = chart_x_axis_gridline_category_dividers + self.state["state"]["x"][ + "gridline_category_dividers_extend" + ] = chart_x_axis_gridline_category_dividers_extend + + list_chart_y_axis_axis_visible = [True, False] + [None] + if chart_y_axis_axis_visible not in list_chart_y_axis_axis_visible: + raise ValueError( + f"`chart_y_axis_axis_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_axis_visible in list_chart_y_axis_axis_visible + and chart_y_axis_axis_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_axis_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["axis_visible"] = filtered_dict[ + chart_y_axis_axis_visible + ] + + list_chart_y_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_y_axis_numeric_scale_type not in list_chart_y_axis_numeric_scale_type: + raise ValueError( + f"`chart_y_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_y_axis_numeric_scale_type in list_chart_y_axis_numeric_scale_type + and chart_y_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_y_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["numeric_scale_type"] = filtered_dict[ + chart_y_axis_numeric_scale_type + ] + self.state["state"]["y"]["linear_min"] = chart_y_axis_linear_min + self.state["state"]["y"]["linear_max"] = chart_y_axis_linear_max + self.state["state"]["y"]["log_min"] = chart_y_axis_log_min + self.state["state"]["y"]["log_max"] = chart_y_axis_log_max + self.state["state"]["y"]["datetime_min"] = chart_y_axis_datetime_min + self.state["state"]["y"]["datetime_max"] = chart_y_axis_datetime_max + self.state["state"]["y"]["flip"] = chart_y_axis_flip + self.state["state"]["y"][ + "show_scale_settings" + ] = chart_y_axis_show_scale_settings + + list_chart_y_axis_nice = [True, False] + [None] + if chart_y_axis_nice not in list_chart_y_axis_nice: + raise ValueError(f"`chart_y_axis_nice` must be one of: [True, False]") + elif ( + chart_y_axis_nice in list_chart_y_axis_nice + and chart_y_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["nice"] = filtered_dict[chart_y_axis_nice] + + list_chart_y_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_y_axis_zero_axis not in list_chart_y_axis_zero_axis: + raise ValueError( + f"`chart_y_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_y_axis_zero_axis in list_chart_y_axis_zero_axis + and chart_y_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_y_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["zero_axis"] = filtered_dict[ + chart_y_axis_zero_axis + ] + + list_chart_y_axis_title_mode = ["auto", "custom"] + [None] + if chart_y_axis_title_mode not in list_chart_y_axis_title_mode: + raise ValueError( + f"`chart_y_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_y_axis_title_mode in list_chart_y_axis_title_mode + and chart_y_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_y_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_mode"] = filtered_dict[ + chart_y_axis_title_mode + ] + self.state["state"]["y"]["title"] = chart_y_axis_title + self.state["state"]["y"]["title_styling"] = chart_y_axis_title_styling + + list_chart_y_axis_title_position = ["side", "end"] + [None] + if chart_y_axis_title_position not in list_chart_y_axis_title_position: + raise ValueError( + f"`chart_y_axis_title_position` must be one of: ['side', 'end']" + ) + elif ( + chart_y_axis_title_position in list_chart_y_axis_title_position + and chart_y_axis_title_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"side": "side", "end": "end"}.items() + if chart_y_axis_title_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_position"] = filtered_dict[ + chart_y_axis_title_position + ] + + list_chart_y_axis_title_weight = ["bold", "normal"] + [None] + if chart_y_axis_title_weight not in list_chart_y_axis_title_weight: + raise ValueError( + f"`chart_y_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_title_weight in list_chart_y_axis_title_weight + and chart_y_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_weight"] = filtered_dict[ + chart_y_axis_title_weight + ] + self.state["state"]["y"]["title_color"] = chart_y_axis_title_color + self.state["state"]["y"]["title_size"] = chart_y_axis_title_size + self.state["state"]["y"]["title_padding"] = chart_y_axis_title_padding + + list_chart_y_axis_tick_label_position = ["default", "above", "below"] + [None] + if ( + chart_y_axis_tick_label_position + not in list_chart_y_axis_tick_label_position + ): + raise ValueError( + f"`chart_y_axis_tick_label_position` must be one of: ['default', 'above', 'below']" + ) + elif ( + chart_y_axis_tick_label_position in list_chart_y_axis_tick_label_position + and chart_y_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "above": "above", + "below": "below", + }.items() + if chart_y_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_position"] = filtered_dict[ + chart_y_axis_tick_label_position + ] + self.state["state"]["y"]["tick_label_styling"] = chart_y_axis_tick_label_styling + self.state["state"]["y"]["tick_label_size"] = chart_y_axis_tick_label_size + self.state["state"]["y"]["tick_label_color"] = chart_y_axis_tick_label_color + self.state["state"]["y"]["tick_padding"] = chart_y_axis_tick_padding + + list_chart_y_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_y_axis_tick_label_angle not in list_chart_y_axis_tick_label_angle: + raise ValueError( + f"`chart_y_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_y_axis_tick_label_angle in list_chart_y_axis_tick_label_angle + and chart_y_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_y_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_angle"] = filtered_dict[ + chart_y_axis_tick_label_angle + ] + + list_chart_y_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_y_axis_tick_label_weight not in list_chart_y_axis_tick_label_weight: + raise ValueError( + f"`chart_y_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_tick_label_weight in list_chart_y_axis_tick_label_weight + and chart_y_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_weight"] = filtered_dict[ + chart_y_axis_tick_label_weight + ] + self.state["state"]["y"][ + "tick_label_max_lines" + ] = chart_y_axis_tick_label_max_lines + self.state["state"]["y"][ + "tick_label_line_height" + ] = chart_y_axis_tick_label_line_height + + list_chart_y_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_y_axis_tick_label_space_mode + not in list_chart_y_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_y_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_y_axis_tick_label_space_mode + in list_chart_y_axis_tick_label_space_mode + and chart_y_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_y_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_space_mode"] = filtered_dict[ + chart_y_axis_tick_label_space_mode + ] + self.state["state"]["y"]["tick_label_space"] = chart_y_axis_tick_label_space + + list_chart_y_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_y_axis_tick_mode not in list_chart_y_axis_tick_mode: + raise ValueError( + f"`chart_y_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_y_axis_tick_mode in list_chart_y_axis_tick_mode + and chart_y_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_y_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_mode"] = filtered_dict[ + chart_y_axis_tick_mode + ] + self.state["state"]["y"]["tick_number"] = chart_y_axis_tick_number + + if ( + chart_y_axis_tick_custom is not None + and len(chart_y_axis_tick_custom) > 1 + and isinstance(chart_y_axis_tick_custom, list) + ): + self.state["state"]["y"]["tick_custom"] = " \n ".join( + chart_y_axis_tick_custom + ) + else: + self.state["state"]["y"]["tick_custom"] = chart_y_axis_tick_custom + + self.state["state"]["y"][ + "line_and_tick_color" + ] = chart_y_axis_line_and_tick_color + self.state["state"]["y"][ + "line_and_tick_width" + ] = chart_y_axis_line_and_tick_width + self.state["state"]["y"]["tick_length"] = chart_y_axis_tick_length + + list_chart_y_axis_tick_side = ["out", "in"] + [None] + if chart_y_axis_tick_side not in list_chart_y_axis_tick_side: + raise ValueError(f"`chart_y_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_y_axis_tick_side in list_chart_y_axis_tick_side + and chart_y_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_y_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_side"] = filtered_dict[ + chart_y_axis_tick_side + ] + self.state["state"]["y"]["line_visible"] = chart_y_axis_line_visible + self.state["state"]["y"]["edge_padding"] = chart_y_axis_edge_padding + + list_chart_y_axis_gridlines_visible = [True, False] + [None] + if chart_y_axis_gridlines_visible not in list_chart_y_axis_gridlines_visible: + raise ValueError( + f"`chart_y_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_gridlines_visible in list_chart_y_axis_gridlines_visible + and chart_y_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridlines_visible"] = filtered_dict[ + chart_y_axis_gridlines_visible + ] + self.state["state"]["y"]["gridlines_styling"] = chart_y_axis_gridlines_styling + self.state["state"]["y"]["gridline_color"] = chart_y_axis_gridline_color + + list_chart_y_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_y_axis_gridline_style not in list_chart_y_axis_gridline_style: + raise ValueError( + f"`chart_y_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_y_axis_gridline_style in list_chart_y_axis_gridline_style + and chart_y_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_y_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridline_style"] = filtered_dict[ + chart_y_axis_gridline_style + ] + self.state["state"]["y"]["gridline_width"] = chart_y_axis_gridline_width + self.state["state"]["y"][ + "gridline_category_dividers" + ] = chart_y_axis_gridline_category_dividers + self.state["state"]["y"][ + "gridline_category_dividers_extend" + ] = chart_y_axis_gridline_category_dividers_extend + + list_chart_background_background_color_enabled = [True, False] + [None] + if ( + chart_background_background_color_enabled + not in list_chart_background_background_color_enabled + ): + raise ValueError( + f"`chart_background_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_background_background_color_enabled + in list_chart_background_background_color_enabled + and chart_background_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_background_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["background"][ + "background_color_enabled" + ] = filtered_dict[chart_background_background_color_enabled] + + list_chart_background_background_image_enabled = [True, False] + [None] + if ( + chart_background_background_image_enabled + not in list_chart_background_background_image_enabled + ): + raise ValueError( + f"`chart_background_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_background_background_image_enabled + in list_chart_background_background_image_enabled + and chart_background_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_background_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["background"][ + "background_image_enabled" + ] = filtered_dict[chart_background_background_image_enabled] + self.state["state"]["background"][ + "background_color" + ] = chart_background_background_color + self.state["state"]["background"][ + "background_image_src" + ] = chart_background_background_image_src + + list_chart_background_background_image_size = ["stretch", "slice", "meet"] + [ + None + ] + if ( + chart_background_background_image_size + not in list_chart_background_background_image_size + ): + raise ValueError( + f"`chart_background_background_image_size` must be one of: ['stretch', 'slice', 'meet']" + ) + elif ( + chart_background_background_image_size + in list_chart_background_background_image_size + and chart_background_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "stretch": "stretch", + "slice": "slice", + "meet": "meet", + }.items() + if chart_background_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["background"][ + "background_image_size" + ] = filtered_dict[chart_background_background_image_size] + + list_chart_background_background_image_position = [ + "x_min_y_min", + "x_mid_y_min", + "x_max_y_min", + "x_max_y_mid", + "x_mid_y_mid", + "x_min_y_max", + "x_mid_y_max", + "x_max_y_max", + ] + [None] + if ( + chart_background_background_image_position + not in list_chart_background_background_image_position + ): + raise ValueError( + f"`chart_background_background_image_position` must be one of: ['x_min_y_min', 'x_mid_y_min', 'x_max_y_min', 'x_max_y_mid', 'x_mid_y_mid', 'x_min_y_max', 'x_mid_y_max', 'x_max_y_max']" + ) + elif ( + chart_background_background_image_position + in list_chart_background_background_image_position + and chart_background_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "x_min_y_min": "xMinYMin", + "x_mid_y_min": "xMidYMin", + "x_max_y_min": "xMaxYMin", + "x_max_y_mid": "xMaxYMid", + "x_mid_y_mid": "xMidYMid", + "x_min_y_max": "xMinYMax", + "x_mid_y_max": "xMidYMax", + "x_max_y_max": "xMaxYMax", + }.items() + if chart_background_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["background"][ + "background_image_position" + ] = filtered_dict[chart_background_background_image_position] + + list_datetime_input_format = [ + "auto", + "%Y-%m-%dT%H:%M:%S.%LZ", + "%Y-%m-%d", + "%m/%d/%Y", + "%d/%m/%Y", + "%d-%b-%y", + "%m/%Y", + "%m/%y", + "%b %Y", + "%b %y", + "%B %d", + "%d %b", + "%Y", + "%y", + "%B", + "%b", + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + ] + [None] + if datetime_input_format not in list_datetime_input_format: + raise ValueError( + f"`datetime_input_format` must be one of: ['auto', '%Y-%m-%dT%H:%M:%S.%LZ', '%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%d-%b-%y', '%m/%Y', '%m/%y', '%b %Y', '%b %y', '%B %d', '%d %b', '%Y', '%y', '%B', '%b', '%H:%M:%S', '%I:%M %p', '%H:%M']" + ) + elif ( + datetime_input_format in list_datetime_input_format + and datetime_input_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", + "%Y-%m-%d": "%Y-%m-%d", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%d-%b-%y": "%d-%b-%y", + "%m/%Y": "%m/%Y", + "%m/%y": "%m/%y", + "%b %Y": "%b %Y", + "%b %y": "%b %y", + "%B %d": "%B %d", + "%d %b": "%d %b", + "%Y": "%Y", + "%y": "%y", + "%B": "%B", + "%b": "%b", + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + }.items() + if datetime_input_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["datetime_input_format"] = filtered_dict[ + datetime_input_format + ] + + list_date_format = [ + "auto", + "%Y-%m-%dT%H:%M:%S.%LZ", + "%Y-%m-%d", + "%m/%d/%Y", + "%d/%m/%Y", + "%d-%b-%y", + "%m/%Y", + "%m/%y", + "%b %Y", + "%b %y", + "%B %d", + "%d %b", + "%Y", + "%y", + "%B", + "%b", + "%A", + "%a", + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + ] + [None] + if date_format not in list_date_format: + raise ValueError( + f"`date_format` must be one of: ['auto', '%Y-%m-%dT%H:%M:%S.%LZ', '%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%d-%b-%y', '%m/%Y', '%m/%y', '%b %Y', '%b %y', '%B %d', '%d %b', '%Y', '%y', '%B', '%b', '%A', '%a', '%H:%M:%S', '%I:%M %p', '%H:%M']" + ) + elif date_format in list_date_format and date_format is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", + "%Y-%m-%d": "%Y-%m-%d", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%d-%b-%y": "%d-%b-%y", + "%m/%Y": "%m/%Y", + "%m/%y": "%m/%y", + "%b %Y": "%b %Y", + "%b %y": "%b %y", + "%B %d": "%B %d", + "%d %b": "%d %b", + "%Y": "%Y", + "’%y": "’%y", + "%B": "%B", + "%b": "%b", + "%A": "%A", + "%a": "%a", + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + }.items() + if date_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["date_format"] = filtered_dict[date_format] + + list_chart_number_localization_input_decimal_separator = [".", ","] + [None] + if ( + chart_number_localization_input_decimal_separator + not in list_chart_number_localization_input_decimal_separator + ): + raise ValueError( + f"`chart_number_localization_input_decimal_separator` must be one of: ['.', ',']" + ) + elif ( + chart_number_localization_input_decimal_separator + in list_chart_number_localization_input_decimal_separator + and chart_number_localization_input_decimal_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in {".": ".", ",": ","}.items() + if chart_number_localization_input_decimal_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "input_decimal_separator" + ] = filtered_dict[chart_number_localization_input_decimal_separator] + + list_chart_number_localization_output_separators = [ + ",.", + ".,", + ".", + ",", + " .", + " ,", + ] + [None] + if ( + chart_number_localization_output_separators + not in list_chart_number_localization_output_separators + ): + raise ValueError( + f"`chart_number_localization_output_separators` must be one of: [',.', '.,', '.', ',', ' .', ' ,']" + ) + elif ( + chart_number_localization_output_separators + in list_chart_number_localization_output_separators + and chart_number_localization_output_separators is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ",.": ",.", + ".,": ".,", + ".": ".", + ",": ",", + " .": " .", + " ,": " ,", + }.items() + if chart_number_localization_output_separators in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "output_separators" + ] = filtered_dict[chart_number_localization_output_separators] + self.state["state"]["formatter"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["formatter"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["formatter"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["formatter"]["advanced"] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatter"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["formatter"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["formatter"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["formatter"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatter"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["formatter"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["formatter"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_election_results_chart_details( + self, + bar_height: float = None, + bar_background: str = None, + show_party_name: bool = None, + label_font_size: float = None, + label_font_color: str = None, + use_custom_scale: bool = None, + custom_scale_max: float = None, + middle_line_position: float = None, + middle_line_content: str = None, + middle_line_text_color: str = None, + middle_line_dashoffset: str = None, + middle_line_width: float = None, + middle_line_color: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + chart_filter_controls_container_alignment: str = None, + chart_filter_controls_container_controls_spacing: float = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + legend_position: str = None, + hide_empty_legend_items: bool = None, + placeholder_text: str = None, + subtitle_text: str = None, + value_change_abbreviation: str = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + chart_label_number_date_format_prefix: str = None, + chart_label_number_date_format_suffix: str = None, + chart_label_number_date_format_n_dec: float = None, + chart_label_number_date_format_advanced: bool = None, + chart_label_number_date_format_negative_sign: str = None, + chart_label_number_date_format_strip_zeros: bool = None, + chart_label_number_date_format_strip_separator: bool = None, + chart_label_number_date_format_transform_labels: bool = None, + chart_label_number_date_format_transform: str = None, + chart_label_number_date_format_multiply_divide_constant: float = None, + chart_label_number_date_format_exponentiate_constant: float = None, + label_suffix: str = None, + chart_number_localization_input_decimal_separator: str = None, + chart_number_localization_output_separators: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + chart_url_settings_enabled: bool = None, + chart_url_settings_whitelist: Union[list, str] = None, + ): + """ + Set chart details for: election results chart. + + + :param bar_height: Height. Flourish type hint: number, defaults to None. + :type bar_height: float, optional + :param bar_background: Background. Background color of part of chart thats not filled with data (ie. when filtering parties). Flourish type hint: color, defaults to None. + :type bar_background: str, optional + :param show_party_name: Show party name. Flourish type hint: boolean, defaults to None. + :type show_party_name: bool, optional + :param label_font_size: Text size. Flourish type hint: number, defaults to None. + :type label_font_size: float, optional + :param label_font_color: Text color. Flourish type hint: color, defaults to None. + :type label_font_color: str, optional + :param use_custom_scale: Scale type. Choices: False, True. On default, will use the sum of all data points as the max value. Enable this setting to use a custom value. Flourish type hint: boolean, defaults to None. + :type use_custom_scale: bool, optional + :param custom_scale_max: Max value for scale. This will set the maximum value of the scale. Eg. the total amount of seats to be won in an election. Flourish type hint: number, defaults to None. + :type custom_scale_max: float, optional + :param middle_line_position: Position. Flourish type hint: number, defaults to None. + :type middle_line_position: float, optional + :param middle_line_content: Text. Flourish type hint: string, defaults to None. + :type middle_line_content: str, optional + :param middle_line_text_color: Color. Flourish type hint: color, defaults to None. + :type middle_line_text_color: str, optional + :param middle_line_dashoffset: Dash width and offset. Length of dashes and spaces seperated by a comma for example, 2,2. Measured in pixels. Flourish type hint: string, defaults to None. + :type middle_line_dashoffset: str, optional + :param middle_line_width: Thickness. Flourish type hint: number, defaults to None. + :type middle_line_width: float, optional + :param middle_line_color: Color. Flourish type hint: color, defaults to None. + :type middle_line_color: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param chart_filter_controls_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_filter_controls_container_alignment: str, optional + :param chart_filter_controls_container_controls_spacing: Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to None. + :type chart_filter_controls_container_controls_spacing: float, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param legend_position: Position. Choices: below, above. Flourish type hint: string, defaults to None. + :type legend_position: str, optional + :param hide_empty_legend_items: Hide zero-valued entries. Flourish type hint: boolean, defaults to None. + :type hide_empty_legend_items: bool, optional + :param placeholder_text: No data placeholder text. Placeholder text if there is no data. Flourish type hint: string, defaults to None. + :type placeholder_text: str, optional + :param subtitle_text: Text below results. Flourish type hint: string, defaults to None. + :type subtitle_text: str, optional + :param value_change_abbreviation: Value change abbreviation. A suffix used to describe the change since the previous election. Flourish type hint: string, defaults to None. + :type value_change_abbreviation: str, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. You can use various keywords to add informtion to custom popups. These include: `{{PARTY}}` : name of the party `{{CURRENT}}` : current value `{{HISTORICAL}}` : historical value `{{CHANGE}}` : change between the current and historical values Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. You can use various keywords to add informtion to custom popups. These include: `{{PARTY}}` : name of the party `{{CURRENT}}` : current value `{{HISTORICAL}}` : historical value `{{CHANGE}}` : change between the current and historical values Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param chart_label_number_date_format_prefix: Prefix. Text to place in front of number. Flourish type hint: string, defaults to None. + :type chart_label_number_date_format_prefix: str, optional + :param chart_label_number_date_format_suffix: Suffix. Text to place after number. Flourish type hint: string, defaults to None. + :type chart_label_number_date_format_suffix: str, optional + :param chart_label_number_date_format_n_dec: Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_label_number_date_format_n_dec: float, optional + :param chart_label_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_label_number_date_format_advanced: bool, optional + :param chart_label_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_label_number_date_format_negative_sign: str, optional + :param chart_label_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_label_number_date_format_strip_zeros: bool, optional + :param chart_label_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_label_number_date_format_strip_separator: bool, optional + :param chart_label_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_label_number_date_format_transform_labels: bool, optional + :param chart_label_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_label_number_date_format_transform: str, optional + :param chart_label_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_label_number_date_format_multiply_divide_constant: float, optional + :param chart_label_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_label_number_date_format_exponentiate_constant: float, optional + :param label_suffix: Historical label suffix. Suffix used to compare current and historical results. For example, "%" when data measures vote shares, or "seats" when data measures seats won. Flourish type hint: string, defaults to None. + :type label_suffix: str, optional + :param chart_number_localization_input_decimal_separator: Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to None. + :type chart_number_localization_input_decimal_separator: str, optional + :param chart_number_localization_output_separators: Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to None. + :type chart_number_localization_output_separators: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + :param chart_url_settings_enabled: Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to None. + :type chart_url_settings_enabled: bool, optional + :param chart_url_settings_whitelist: Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to None. + :type chart_url_settings_whitelist: Union[list, str], optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "filter_control": {}, + "controls_container": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "slider_style": {}, + "legend_categorical": {}, + "legend_container": {}, + "popup": {}, + "label_format": {}, + "localization": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + "url_state": {}, + } + } + + self.state["state"]["bar_height"] = bar_height + self.state["state"]["bar_background"] = bar_background + self.state["state"]["show_party_name"] = show_party_name + self.state["state"]["label_font_size"] = label_font_size + self.state["state"]["label_font_color"] = label_font_color + + list_use_custom_scale = [False, True] + [None] + if use_custom_scale not in list_use_custom_scale: + raise ValueError(f"`use_custom_scale` must be one of: [False, True]") + elif use_custom_scale in list_use_custom_scale and use_custom_scale is not None: + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if use_custom_scale in k + } + if len(filtered_dict) > 0: + self.state["state"]["use_custom_scale"] = filtered_dict[ + use_custom_scale + ] + self.state["state"]["custom_scale_max"] = custom_scale_max + self.state["state"]["middle_line_position"] = middle_line_position + self.state["state"]["middle_line_content"] = middle_line_content + self.state["state"]["middle_line_text_color"] = middle_line_text_color + self.state["state"]["middle_line_dashoffset"] = middle_line_dashoffset + self.state["state"]["middle_line_width"] = middle_line_width + self.state["state"]["middle_line_color"] = middle_line_color + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["filter_control"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["filter_control"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["filter_control"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_filter_controls_dropdown_width_mode] + self.state["state"]["filter_control"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["filter_control"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["filter_control"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["filter_control"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["filter_control"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["filter_control"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + + list_chart_filter_controls_container_alignment = ["start", "center", "end"] + [ + None + ] + if ( + chart_filter_controls_container_alignment + not in list_chart_filter_controls_container_alignment + ): + raise ValueError( + f"`chart_filter_controls_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_filter_controls_container_alignment + in list_chart_filter_controls_container_alignment + and chart_filter_controls_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_filter_controls_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_container"]["alignment"] = filtered_dict[ + chart_filter_controls_container_alignment + ] + self.state["state"]["controls_container"][ + "controls_spacing" + ] = chart_filter_controls_container_controls_spacing + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["slider_style"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["slider_style"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["slider_style"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["slider_style"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["slider_style"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["slider_style"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["slider_style"][ + "play_button" + ] = chart_slider_control_style_play_button + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_legend_position = ["below", "above"] + [None] + if legend_position not in list_legend_position: + raise ValueError(f"`legend_position` must be one of: ['below', 'above']") + elif legend_position in list_legend_position and legend_position is not None: + filtered_dict = { + k: v + for (k, v) in {"below": "below", "above": "above"}.items() + if legend_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_position"] = filtered_dict[legend_position] + self.state["state"]["hide_empty_legend_items"] = hide_empty_legend_items + self.state["state"]["placeholder_text"] = placeholder_text + self.state["state"]["subtitle_text"] = subtitle_text + self.state["state"]["value_change_abbreviation"] = value_change_abbreviation + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + self.state["state"]["label_format"][ + "prefix" + ] = chart_label_number_date_format_prefix + self.state["state"]["label_format"][ + "suffix" + ] = chart_label_number_date_format_suffix + self.state["state"]["label_format"][ + "n_dec" + ] = chart_label_number_date_format_n_dec + self.state["state"]["label_format"][ + "advanced" + ] = chart_label_number_date_format_advanced + + list_chart_label_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_label_number_date_format_negative_sign + not in list_chart_label_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_label_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_label_number_date_format_negative_sign + in list_chart_label_number_date_format_negative_sign + and chart_label_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_label_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_format"]["negative_sign"] = filtered_dict[ + chart_label_number_date_format_negative_sign + ] + self.state["state"]["label_format"][ + "strip_zeros" + ] = chart_label_number_date_format_strip_zeros + self.state["state"]["label_format"][ + "strip_separator" + ] = chart_label_number_date_format_strip_separator + self.state["state"]["label_format"][ + "transform_labels" + ] = chart_label_number_date_format_transform_labels + + list_chart_label_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_label_number_date_format_transform + not in list_chart_label_number_date_format_transform + ): + raise ValueError( + f"`chart_label_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_label_number_date_format_transform + in list_chart_label_number_date_format_transform + and chart_label_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_label_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_format"]["transform"] = filtered_dict[ + chart_label_number_date_format_transform + ] + self.state["state"]["label_format"][ + "multiply_divide_constant" + ] = chart_label_number_date_format_multiply_divide_constant + self.state["state"]["label_format"][ + "exponentiate_constant" + ] = chart_label_number_date_format_exponentiate_constant + self.state["state"]["label_suffix"] = label_suffix + + list_chart_number_localization_input_decimal_separator = [".", ","] + [None] + if ( + chart_number_localization_input_decimal_separator + not in list_chart_number_localization_input_decimal_separator + ): + raise ValueError( + f"`chart_number_localization_input_decimal_separator` must be one of: ['.', ',']" + ) + elif ( + chart_number_localization_input_decimal_separator + in list_chart_number_localization_input_decimal_separator + and chart_number_localization_input_decimal_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in {".": ".", ",": ","}.items() + if chart_number_localization_input_decimal_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "input_decimal_separator" + ] = filtered_dict[chart_number_localization_input_decimal_separator] + + list_chart_number_localization_output_separators = [ + ",.", + ".,", + ".", + ",", + " .", + " ,", + ] + [None] + if ( + chart_number_localization_output_separators + not in list_chart_number_localization_output_separators + ): + raise ValueError( + f"`chart_number_localization_output_separators` must be one of: [',.', '.,', '.', ',', ' .', ' ,']" + ) + elif ( + chart_number_localization_output_separators + in list_chart_number_localization_output_separators + and chart_number_localization_output_separators is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ",.": ",.", + ".,": ".,", + ".": ".", + ",": ",", + " .": " .", + " ,": " ,", + }.items() + if chart_number_localization_output_separators in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "output_separators" + ] = filtered_dict[chart_number_localization_output_separators] + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + self.state["state"]["url_state"]["enabled"] = chart_url_settings_enabled + + if ( + chart_url_settings_whitelist is not None + and len(chart_url_settings_whitelist) > 1 + and isinstance(chart_url_settings_whitelist, list) + ): + self.state["state"]["url_state"]["whitelist"] = " \n ".join( + chart_url_settings_whitelist + ) + else: + self.state["state"]["url_state"]["whitelist"] = chart_url_settings_whitelist + + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_gantt_details( + self, + gantt_height: float = None, + gantt_padding: float = None, + border_radius: float = None, + border_width: float = None, + border_color: str = None, + gantt_progress: bool = None, + gantt_text: bool = None, + gantt_font_size: float = None, + gantt_text_color: str = None, + gantt_font_weight: str = None, + missing_value_label: str = None, + scale_type: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + color_single: str = None, + chart_background_color: str = None, + chart_background_opacity: float = None, + chart_background_panels: bool = None, + chart_x_axis_axis_position: str = None, + chart_x_axis_y_axis_position: str = None, + chart_x_axis_numeric_scale_type: str = None, + chart_x_axis_linear_min: float = None, + chart_x_axis_linear_max: float = None, + chart_x_axis_log_min: float = None, + chart_x_axis_log_max: float = None, + chart_x_axis_datetime_min: str = None, + chart_x_axis_datetime_max: str = None, + chart_x_axis_flip: bool = None, + chart_x_axis_show_scale_settings: bool = None, + chart_x_axis_nice: bool = None, + chart_x_axis_zero_axis: str = None, + chart_x_axis_title_mode: str = None, + chart_x_axis_title: str = None, + chart_x_axis_title_styling: bool = None, + chart_x_axis_title_weight: str = None, + chart_x_axis_title_color: str = None, + chart_x_axis_title_size: float = None, + chart_x_axis_title_padding: float = None, + chart_x_axis_tick_label_position: str = None, + chart_x_axis_tick_label_styling: bool = None, + chart_x_axis_tick_label_size: float = None, + chart_x_axis_tick_label_color: str = None, + chart_x_axis_tick_padding: float = None, + chart_x_axis_tick_label_angle: str = None, + chart_x_axis_tick_label_weight: str = None, + chart_x_axis_tick_label_max_lines: float = None, + chart_x_axis_tick_label_line_height: float = None, + chart_x_axis_tick_label_space_mode: str = None, + chart_x_axis_tick_label_space: float = None, + chart_x_axis_tick_mode: str = None, + chart_x_axis_tick_number: float = None, + chart_x_axis_tick_custom: Union[list, str] = None, + chart_x_axis_line_and_tick_color: str = None, + chart_x_axis_line_and_tick_width: float = None, + chart_x_axis_tick_length: float = None, + chart_x_axis_tick_side: str = None, + chart_x_axis_line_visible: bool = None, + chart_x_axis_edge_padding: float = None, + chart_x_axis_gridlines_visible: bool = None, + chart_x_axis_gridlines_styling: bool = None, + chart_x_axis_gridline_color: str = None, + chart_x_axis_gridline_style: str = None, + chart_x_axis_gridline_width: float = None, + chart_x_axis_gridline_category_dividers: bool = None, + chart_x_axis_gridline_category_dividers_extend: bool = None, + date_format: str = None, + format_locale: str = None, + format_weekday: str = None, + format_year: str = None, + format_month: str = None, + format_day: str = None, + format_hour: str = None, + format_minute: str = None, + y_font_size: float = None, + y_font_weight: str = None, + y_font_fill: str = None, + y_max_width: float = None, + y_text_dx: float = None, + y_text_dy: float = None, + y_gridline_color: str = None, + y_gridline_width: float = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + filter_control_all: str = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + chart_filter_controls_container_alignment: str = None, + chart_filter_controls_container_controls_spacing: float = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + chart_continous_legend_show_legend: bool = None, + chart_continous_legend_title_mode: str = None, + chart_continous_legend_title: str = None, + chart_continous_legend_color_band_width: float = None, + chart_continous_legend_color_band_height: float = None, + chart_continous_legend_color_band_radius: float = None, + chart_continous_legend_binned_label_mode: str = None, + chart_continous_legend_binned_label_custom: str = None, + chart_continous_legend_legend_min: float = None, + chart_continous_legend_additional_min_label: str = None, + chart_continous_legend_legend_max: float = None, + chart_continous_legend_additional_max_label: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + chart_axes_highlights_x_enabled: bool = None, + chart_axes_highlights_x_lines: Union[list, str] = None, + chart_axes_highlights_x_line_color: str = None, + chart_axes_highlights_x_line_width: float = None, + chart_axes_highlights_x_line_dash: float = None, + chart_axes_highlights_x_areas: Union[list, str] = None, + chart_axes_highlights_x_area_color: str = None, + chart_axes_highlights_x_area_opacity: float = None, + chart_axes_highlights_x_area_texture: str = None, + chart_axes_highlights_x_label_vertical: bool = None, + chart_axes_highlights_x_label_y_position: str = None, + chart_axes_highlights_x_label_x_position: str = None, + chart_axes_highlights_x_label_max_width: float = None, + chart_axes_highlights_x_font_size: float = None, + chart_axes_highlights_x_font_weight: str = None, + chart_axes_highlights_x_label_color: str = None, + chart_axes_highlights_x_shadow_color: str = None, + chart_axes_highlights_x_shadow_enabled: bool = None, + chart_axes_highlights_y_enabled: bool = None, + chart_axes_highlights_y_lines: Union[list, str] = None, + chart_axes_highlights_y_line_color: str = None, + chart_axes_highlights_y_line_width: float = None, + chart_axes_highlights_y_line_dash: float = None, + chart_axes_highlights_y_areas: Union[list, str] = None, + chart_axes_highlights_y_area_color: str = None, + chart_axes_highlights_y_area_opacity: float = None, + chart_axes_highlights_y_area_texture: str = None, + chart_axes_highlights_y_label_x_position: str = None, + chart_axes_highlights_y_label_y_position: str = None, + chart_axes_highlights_y_label_max_width: float = None, + chart_axes_highlights_y_font_size: float = None, + chart_axes_highlights_y_font_weight: str = None, + chart_axes_highlights_y_label_color: str = None, + chart_axes_highlights_y_shadow_color: str = None, + chart_axes_highlights_y_shadow_enabled: bool = None, + animation_duration: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: gantt chart. + + + :param gantt_height: Height. Choose the height of each bar in rems (i.e. it will scale up and down in relation to screen size). Flourish type hint: number, defaults to None. + :type gantt_height: float, optional + :param gantt_padding: Padding. Flourish type hint: number, defaults to None. + :type gantt_padding: float, optional + :param border_radius: Roundness. Flourish type hint: number, defaults to None. + :type border_radius: float, optional + :param border_width: Border width. Flourish type hint: number, defaults to None. + :type border_width: float, optional + :param border_color: Border color. Flourish type hint: color, defaults to None. + :type border_color: str, optional + :param gantt_progress: Show progress. Choices: True, False. If enabled, each bar will be filled with an overlay relating to the value supplied in the Progress column. Flourish type hint: boolean, defaults to None. + :type gantt_progress: bool, optional + :param gantt_text: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type gantt_text: bool, optional + :param gantt_font_size: Size. Flourish type hint: number, defaults to None. + :type gantt_font_size: float, optional + :param gantt_text_color: Color. Flourish type hint: color, defaults to None. + :type gantt_text_color: str, optional + :param gantt_font_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type gantt_font_weight: str, optional + :param missing_value_label: Label for missing values. If a bar dosent have a category, the legend will show the placeholder value.. Flourish type hint: string, defaults to None. + :type missing_value_label: str, optional + :param scale_type: Scale type. Choices: categorical, numeric. Flourish type hint: string, defaults to None. + :type scale_type: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param color_single: Color. Flourish type hint: color, defaults to None. + :type color_single: str, optional + :param chart_background_color: Color. Flourish type hint: color, defaults to None. + :type chart_background_color: str, optional + :param chart_background_opacity: Opacity. Flourish type hint: number, defaults to None. + :type chart_background_opacity: float, optional + :param chart_background_panels: Area. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_background_panels: bool, optional + :param chart_x_axis_axis_position: Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to None. + :type chart_x_axis_axis_position: str, optional + :param chart_x_axis_y_axis_position: Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to None. + :type chart_x_axis_y_axis_position: str, optional + :param chart_x_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_x_axis_numeric_scale_type: str, optional + :param chart_x_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_min: float, optional + :param chart_x_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_max: float, optional + :param chart_x_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_min: float, optional + :param chart_x_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_max: float, optional + :param chart_x_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_min: str, optional + :param chart_x_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_max: str, optional + :param chart_x_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_flip: bool, optional + :param chart_x_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_show_scale_settings: bool, optional + :param chart_x_axis_nice: Round min/max. Choices: True, False. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_nice: bool, optional + :param chart_x_axis_zero_axis: Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to None. + :type chart_x_axis_zero_axis: str, optional + :param chart_x_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_mode: str, optional + :param chart_x_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_x_axis_title: str, optional + :param chart_x_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_title_styling: bool, optional + :param chart_x_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_weight: str, optional + :param chart_x_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_title_color: str, optional + :param chart_x_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_size: float, optional + :param chart_x_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_padding: float, optional + :param chart_x_axis_tick_label_position: Position. Choices: default, left, right. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_position: str, optional + :param chart_x_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_tick_label_styling: bool, optional + :param chart_x_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_size: float, optional + :param chart_x_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_tick_label_color: str, optional + :param chart_x_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_padding: float, optional + :param chart_x_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_angle: str, optional + :param chart_x_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_weight: str, optional + :param chart_x_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_max_lines: float, optional + :param chart_x_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_line_height: float, optional + :param chart_x_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_space_mode: str, optional + :param chart_x_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_space: float, optional + :param chart_x_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_mode: str, optional + :param chart_x_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_number: float, optional + :param chart_x_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_x_axis_tick_custom: Union[list, str], optional + :param chart_x_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_x_axis_line_and_tick_color: str, optional + :param chart_x_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_x_axis_line_and_tick_width: float, optional + :param chart_x_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_length: float, optional + :param chart_x_axis_tick_side: Tick side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_side: str, optional + :param chart_x_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_line_visible: bool, optional + :param chart_x_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_x_axis_edge_padding: float, optional + :param chart_x_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_visible: bool, optional + :param chart_x_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_styling: bool, optional + :param chart_x_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_gridline_color: str, optional + :param chart_x_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_x_axis_gridline_style: str, optional + :param chart_x_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_x_axis_gridline_width: float, optional + :param chart_x_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers: bool, optional + :param chart_x_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers_extend: bool, optional + :param date_format: Format in data sheet. Choices: auto, %Y-%m-%dT%H:%M:%S.%LZ, %Y-%m-%d, %m/%d/%Y, %d/%m/%Y, %d-%b-%y, %m/%Y, %b %Y, %b %y, %B %d, %d %b, %Y, %B, %b, %A, %a, %H:%M:%S, %I:%M %p, %H:%M. The date/time format in your datasheet. If it isnt in the list, you can enter a custom format using d3-time-format syntax. See npm - d3 time format for details. Flourish type hint: string, defaults to None. + :type date_format: str, optional + :param format_locale: Date and time locale. Choices: none, ady, af-_n_a, af-_z_a, af, ak, ar-_m_a, ar-_s_a, hy-_a_m, ay-_b_o, eu-_e_s, be-_b_y, bn-_b_d, bn-_i_n, bn, bs-_b_a, my, ck-_u_s, zh-_c_n, zh-_s_g, zh-_hans, zh-_h_k, zh-_t_w, zh-_hant, zh, gx-_g_r, nl-_b_e, nl-_n_l, nl, en-_a_u, en-_c_a, en-_i_n, en-_i_e, en@pirate, en-_z_a, en-_g_b, en-_u_d, en-_u_s, en, eo-_e_o, et-_e_e, fo-_f_o, fi-_f_i, fr-_b_e, fr-_c_a, fr-_f_r, fr-_c_h, fr, fy-_n_l, ff, gl-_e_s, ka-_g_e, de-_a_t, de-_d_e, de-_c_h, de, el-_g_r, el, gn-_p_y, gu-_i_n, ht, is-_i_s, is, ga-_i_e, ga, jv-_i_d, kab, kn-_i_n, kn, cak, kk-_k_z, tlh, ko-_k_r, ko, ku-_t_r, fb-_l_t, li-_n_l, dsb, lb, mk-_m_k, mk, mai, mg-_m_g, mn-_m_n, se-_n_o, nn-_n_o, no, oc, or-_i_n, ps-_a_f, i_r, pt-_b_r, pt-_p_t, pt, pa-_i_n, pa, qu-_p_e, rm-_c_h, sa-_i_n, sr-_r_s, sr, si-_l_k, sk-_s_k, sk, so-_s_o, es-_a_r, es-_c_l, es-_c_o, es-_e_c, es-_m_x, es-_n_i, es-_e_s, es-_u_s, es-_v_e, es, su, sw-_k_e, sw, tt-_r_u, th-_t_h, th, hsb, xh-_z_a, yi-_d_e, yi, zu-_z_a. The regional date/time format ( date locale ). You can specify each part of the format in the fields below. Flourish type hint: string, defaults to None. + :type format_locale: str, optional + :param format_weekday: Weekday. Choices: none, narrow, short, long. Flourish type hint: string, defaults to None. + :type format_weekday: str, optional + :param format_year: Year. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to None. + :type format_year: str, optional + :param format_month: Month. Choices: none, numeric, 2-digit, narrow, short, long. Flourish type hint: string, defaults to None. + :type format_month: str, optional + :param format_day: Day. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to None. + :type format_day: str, optional + :param format_hour: Hour. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to None. + :type format_hour: str, optional + :param format_minute: Minute. Choices: none, numeric, 2-digit. Flourish type hint: string, defaults to None. + :type format_minute: str, optional + :param y_font_size: Size. Flourish type hint: number, defaults to None. + :type y_font_size: float, optional + :param y_font_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type y_font_weight: str, optional + :param y_font_fill: Color. Flourish type hint: color, defaults to None. + :type y_font_fill: str, optional + :param y_max_width: Max width. Flourish type hint: number, defaults to None. + :type y_max_width: float, optional + :param y_text_dx: Horizontal padding. Flourish type hint: number, defaults to None. + :type y_text_dx: float, optional + :param y_text_dy: Vertical padding. Flourish type hint: number, defaults to None. + :type y_text_dy: float, optional + :param y_gridline_color: Color. Flourish type hint: color, defaults to None. + :type y_gridline_color: str, optional + :param y_gridline_width: Width. Flourish type hint: number, defaults to None. + :type y_gridline_width: float, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param filter_control_all: Name for "All". Leave blank to not include an "All" option. Flourish type hint: string, defaults to None. + :type filter_control_all: str, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param chart_filter_controls_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_filter_controls_container_alignment: str, optional + :param chart_filter_controls_container_controls_spacing: Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to None. + :type chart_filter_controls_container_controls_spacing: float, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param chart_continous_legend_show_legend: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_continous_legend_show_legend: bool, optional + :param chart_continous_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_continous_legend_title_mode: str, optional + :param chart_continous_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_continous_legend_title: str, optional + :param chart_continous_legend_color_band_width: Width. Flourish type hint: number, defaults to None. + :type chart_continous_legend_color_band_width: float, optional + :param chart_continous_legend_color_band_height: Height. Flourish type hint: number, defaults to None. + :type chart_continous_legend_color_band_height: float, optional + :param chart_continous_legend_color_band_radius: Roundness. The radius of the corners of the color band (in pixels). Flourish type hint: number, defaults to None. + :type chart_continous_legend_color_band_radius: float, optional + :param chart_continous_legend_binned_label_mode: Binned label mode. Choices: thresholds, centers, custom. Flourish type hint: string, defaults to None. + :type chart_continous_legend_binned_label_mode: str, optional + :param chart_continous_legend_binned_label_custom: Custom bin labels. List numeric values, separated by semi-colons. Flourish type hint: string, defaults to None. + :type chart_continous_legend_binned_label_custom: str, optional + :param chart_continous_legend_legend_min: Legend min. Flourish type hint: number, defaults to None. + :type chart_continous_legend_legend_min: float, optional + :param chart_continous_legend_additional_min_label: Custom min label. Flourish type hint: string, defaults to None. + :type chart_continous_legend_additional_min_label: str, optional + :param chart_continous_legend_legend_max: Legend max. Flourish type hint: number, defaults to None. + :type chart_continous_legend_legend_max: float, optional + :param chart_continous_legend_additional_max_label: Custom max label. Flourish type hint: string, defaults to None. + :type chart_continous_legend_additional_max_label: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param chart_axes_highlights_x_enabled: Show highlights on the x axis. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_enabled: bool, optional + :param chart_axes_highlights_x_lines: One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example, `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to None. + :type chart_axes_highlights_x_lines: Union[list, str], optional + :param chart_axes_highlights_x_line_color: Line color. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_line_color: str, optional + :param chart_axes_highlights_x_line_width: Line width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_line_width: float, optional + :param chart_axes_highlights_x_line_dash: Dash. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_line_dash: float, optional + :param chart_axes_highlights_x_areas: One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to None. + :type chart_axes_highlights_x_areas: Union[list, str], optional + :param chart_axes_highlights_x_area_color: Area. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_area_color: str, optional + :param chart_axes_highlights_x_area_opacity: Area opacity. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_area_opacity: float, optional + :param chart_axes_highlights_x_area_texture: Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_area_texture: str, optional + :param chart_axes_highlights_x_label_vertical: Vertical. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_label_vertical: bool, optional + :param chart_axes_highlights_x_label_y_position: Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_label_y_position: str, optional + :param chart_axes_highlights_x_label_x_position: X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_label_x_position: str, optional + :param chart_axes_highlights_x_label_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_label_max_width: float, optional + :param chart_axes_highlights_x_font_size: Font size. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_font_size: float, optional + :param chart_axes_highlights_x_font_weight: Font weight. Choices: regular, bold. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_font_weight: str, optional + :param chart_axes_highlights_x_label_color: Text. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_label_color: str, optional + :param chart_axes_highlights_x_shadow_color: Shadow. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_shadow_color: str, optional + :param chart_axes_highlights_x_shadow_enabled: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_shadow_enabled: bool, optional + :param chart_axes_highlights_y_enabled: Show highlights on the y axis. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_y_enabled: bool, optional + :param chart_axes_highlights_y_lines: One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example: `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to None. + :type chart_axes_highlights_y_lines: Union[list, str], optional + :param chart_axes_highlights_y_line_color: Line color. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_line_color: str, optional + :param chart_axes_highlights_y_line_width: line width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_line_width: float, optional + :param chart_axes_highlights_y_line_dash: Dash. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_line_dash: float, optional + :param chart_axes_highlights_y_areas: One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to None. + :type chart_axes_highlights_y_areas: Union[list, str], optional + :param chart_axes_highlights_y_area_color: Area. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_area_color: str, optional + :param chart_axes_highlights_y_area_opacity: Area opacity. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_area_opacity: float, optional + :param chart_axes_highlights_y_area_texture: Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_area_texture: str, optional + :param chart_axes_highlights_y_label_x_position: X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_label_x_position: str, optional + :param chart_axes_highlights_y_label_y_position: Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_label_y_position: str, optional + :param chart_axes_highlights_y_label_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_label_max_width: float, optional + :param chart_axes_highlights_y_font_size: Font size. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_font_size: float, optional + :param chart_axes_highlights_y_font_weight: Font weight. Choices: regular, bold. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_font_weight: str, optional + :param chart_axes_highlights_y_label_color: Text. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_label_color: str, optional + :param chart_axes_highlights_y_shadow_color: Shadow. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_shadow_color: str, optional + :param chart_axes_highlights_y_shadow_enabled: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_y_shadow_enabled: bool, optional + :param animation_duration: Animation duration. The duration, in seconds, of transitions for example, on load of visualization or between two slides in a story Flourish type hint: number, defaults to None. + :type animation_duration: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "chart_bg": {}, + "x": {}, + "filter_control": {}, + "style_controls": {}, + "style_button": {}, + "style_dropdown": {}, + "style_slider": {}, + "controls_container": {}, + "legend_categorical": {}, + "legend_continuous": {}, + "legend_container": {}, + "popup": {}, + "axes_highlights": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + self.state["state"]["gantt_height"] = gantt_height + self.state["state"]["gantt_padding"] = gantt_padding + self.state["state"]["border_radius"] = border_radius + self.state["state"]["border_width"] = border_width + self.state["state"]["border_color"] = border_color + + list_gantt_progress = [True, False] + [None] + if gantt_progress not in list_gantt_progress: + raise ValueError(f"`gantt_progress` must be one of: [True, False]") + elif gantt_progress in list_gantt_progress and gantt_progress is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if gantt_progress in k + } + if len(filtered_dict) > 0: + self.state["state"]["gantt_progress"] = filtered_dict[gantt_progress] + + list_gantt_text = [True, False] + [None] + if gantt_text not in list_gantt_text: + raise ValueError(f"`gantt_text` must be one of: [True, False]") + elif gantt_text in list_gantt_text and gantt_text is not None: + filtered_dict = { + k: v for (k, v) in {True: True, False: False}.items() if gantt_text in k + } + if len(filtered_dict) > 0: + self.state["state"]["gantt_text"] = filtered_dict[gantt_text] + self.state["state"]["gantt_font_size"] = gantt_font_size + self.state["state"]["gantt_text_color"] = gantt_text_color + + list_gantt_font_weight = ["bold", "normal"] + [None] + if gantt_font_weight not in list_gantt_font_weight: + raise ValueError(f"`gantt_font_weight` must be one of: ['bold', 'normal']") + elif ( + gantt_font_weight in list_gantt_font_weight + and gantt_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if gantt_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["gantt_font_weight"] = filtered_dict[ + gantt_font_weight + ] + self.state["state"]["missing_value_label"] = missing_value_label + + list_scale_type = ["categorical", "numeric"] + [None] + if scale_type not in list_scale_type: + raise ValueError(f"`scale_type` must be one of: ['categorical', 'numeric']") + elif scale_type in list_scale_type and scale_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "categorical": "categorical", + "numeric": "numeric", + }.items() + if scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["scale_type"] = filtered_dict[scale_type] + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["color_single"] = color_single + self.state["state"]["chart_bg"]["color"] = chart_background_color + self.state["state"]["chart_bg"]["opacity"] = chart_background_opacity + + list_chart_background_panels = [False, True] + [None] + if chart_background_panels not in list_chart_background_panels: + raise ValueError(f"`chart_background_panels` must be one of: [False, True]") + elif ( + chart_background_panels in list_chart_background_panels + and chart_background_panels is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_background_panels in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"]["panels"] = filtered_dict[ + chart_background_panels + ] + + list_chart_x_axis_axis_position = [ + "bottom", + "float-below", + "float-above", + "top", + "off", + ] + [None] + if chart_x_axis_axis_position not in list_chart_x_axis_axis_position: + raise ValueError( + f"`chart_x_axis_axis_position` must be one of: ['bottom', 'float-below', 'float-above', 'top', 'off']" + ) + elif ( + chart_x_axis_axis_position in list_chart_x_axis_axis_position + and chart_x_axis_axis_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "float-below": "float-below", + "float-above": "float-above", + "top": "top", + "off": "off", + }.items() + if chart_x_axis_axis_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["axis_position"] = filtered_dict[ + chart_x_axis_axis_position + ] + self.state["state"]["x"]["y_axis_position"] = chart_x_axis_y_axis_position + + list_chart_x_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_x_axis_numeric_scale_type not in list_chart_x_axis_numeric_scale_type: + raise ValueError( + f"`chart_x_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_x_axis_numeric_scale_type in list_chart_x_axis_numeric_scale_type + and chart_x_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_x_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["numeric_scale_type"] = filtered_dict[ + chart_x_axis_numeric_scale_type + ] + self.state["state"]["x"]["linear_min"] = chart_x_axis_linear_min + self.state["state"]["x"]["linear_max"] = chart_x_axis_linear_max + self.state["state"]["x"]["log_min"] = chart_x_axis_log_min + self.state["state"]["x"]["log_max"] = chart_x_axis_log_max + self.state["state"]["x"]["datetime_min"] = chart_x_axis_datetime_min + self.state["state"]["x"]["datetime_max"] = chart_x_axis_datetime_max + self.state["state"]["x"]["flip"] = chart_x_axis_flip + self.state["state"]["x"][ + "show_scale_settings" + ] = chart_x_axis_show_scale_settings + + list_chart_x_axis_nice = [True, False] + [None] + if chart_x_axis_nice not in list_chart_x_axis_nice: + raise ValueError(f"`chart_x_axis_nice` must be one of: [True, False]") + elif ( + chart_x_axis_nice in list_chart_x_axis_nice + and chart_x_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["nice"] = filtered_dict[chart_x_axis_nice] + + list_chart_x_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_x_axis_zero_axis not in list_chart_x_axis_zero_axis: + raise ValueError( + f"`chart_x_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_x_axis_zero_axis in list_chart_x_axis_zero_axis + and chart_x_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_x_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["zero_axis"] = filtered_dict[ + chart_x_axis_zero_axis + ] + + list_chart_x_axis_title_mode = ["auto", "custom"] + [None] + if chart_x_axis_title_mode not in list_chart_x_axis_title_mode: + raise ValueError( + f"`chart_x_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_x_axis_title_mode in list_chart_x_axis_title_mode + and chart_x_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_x_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_mode"] = filtered_dict[ + chart_x_axis_title_mode + ] + self.state["state"]["x"]["title"] = chart_x_axis_title + self.state["state"]["x"]["title_styling"] = chart_x_axis_title_styling + + list_chart_x_axis_title_weight = ["bold", "normal"] + [None] + if chart_x_axis_title_weight not in list_chart_x_axis_title_weight: + raise ValueError( + f"`chart_x_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_title_weight in list_chart_x_axis_title_weight + and chart_x_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_weight"] = filtered_dict[ + chart_x_axis_title_weight + ] + self.state["state"]["x"]["title_color"] = chart_x_axis_title_color + self.state["state"]["x"]["title_size"] = chart_x_axis_title_size + self.state["state"]["x"]["title_padding"] = chart_x_axis_title_padding + + list_chart_x_axis_tick_label_position = ["default", "left", "right"] + [None] + if ( + chart_x_axis_tick_label_position + not in list_chart_x_axis_tick_label_position + ): + raise ValueError( + f"`chart_x_axis_tick_label_position` must be one of: ['default', 'left', 'right']" + ) + elif ( + chart_x_axis_tick_label_position in list_chart_x_axis_tick_label_position + and chart_x_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "left": "left", + "right": "right", + }.items() + if chart_x_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_position"] = filtered_dict[ + chart_x_axis_tick_label_position + ] + self.state["state"]["x"]["tick_label_styling"] = chart_x_axis_tick_label_styling + self.state["state"]["x"]["tick_label_size"] = chart_x_axis_tick_label_size + self.state["state"]["x"]["tick_label_color"] = chart_x_axis_tick_label_color + self.state["state"]["x"]["tick_padding"] = chart_x_axis_tick_padding + + list_chart_x_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_x_axis_tick_label_angle not in list_chart_x_axis_tick_label_angle: + raise ValueError( + f"`chart_x_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_x_axis_tick_label_angle in list_chart_x_axis_tick_label_angle + and chart_x_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_x_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_angle"] = filtered_dict[ + chart_x_axis_tick_label_angle + ] + + list_chart_x_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_x_axis_tick_label_weight not in list_chart_x_axis_tick_label_weight: + raise ValueError( + f"`chart_x_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_tick_label_weight in list_chart_x_axis_tick_label_weight + and chart_x_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_weight"] = filtered_dict[ + chart_x_axis_tick_label_weight + ] + self.state["state"]["x"][ + "tick_label_max_lines" + ] = chart_x_axis_tick_label_max_lines + self.state["state"]["x"][ + "tick_label_line_height" + ] = chart_x_axis_tick_label_line_height + + list_chart_x_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_x_axis_tick_label_space_mode + not in list_chart_x_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_x_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_x_axis_tick_label_space_mode + in list_chart_x_axis_tick_label_space_mode + and chart_x_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_x_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_space_mode"] = filtered_dict[ + chart_x_axis_tick_label_space_mode + ] + self.state["state"]["x"]["tick_label_space"] = chart_x_axis_tick_label_space + + list_chart_x_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_x_axis_tick_mode not in list_chart_x_axis_tick_mode: + raise ValueError( + f"`chart_x_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_x_axis_tick_mode in list_chart_x_axis_tick_mode + and chart_x_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_x_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_mode"] = filtered_dict[ + chart_x_axis_tick_mode + ] + self.state["state"]["x"]["tick_number"] = chart_x_axis_tick_number + + if ( + chart_x_axis_tick_custom is not None + and len(chart_x_axis_tick_custom) > 1 + and isinstance(chart_x_axis_tick_custom, list) + ): + self.state["state"]["x"]["tick_custom"] = " \n ".join( + chart_x_axis_tick_custom + ) + else: + self.state["state"]["x"]["tick_custom"] = chart_x_axis_tick_custom + + self.state["state"]["x"][ + "line_and_tick_color" + ] = chart_x_axis_line_and_tick_color + self.state["state"]["x"][ + "line_and_tick_width" + ] = chart_x_axis_line_and_tick_width + self.state["state"]["x"]["tick_length"] = chart_x_axis_tick_length + + list_chart_x_axis_tick_side = ["out", "in"] + [None] + if chart_x_axis_tick_side not in list_chart_x_axis_tick_side: + raise ValueError(f"`chart_x_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_x_axis_tick_side in list_chart_x_axis_tick_side + and chart_x_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_x_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_side"] = filtered_dict[ + chart_x_axis_tick_side + ] + self.state["state"]["x"]["line_visible"] = chart_x_axis_line_visible + self.state["state"]["x"]["edge_padding"] = chart_x_axis_edge_padding + + list_chart_x_axis_gridlines_visible = [True, False] + [None] + if chart_x_axis_gridlines_visible not in list_chart_x_axis_gridlines_visible: + raise ValueError( + f"`chart_x_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_x_axis_gridlines_visible in list_chart_x_axis_gridlines_visible + and chart_x_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridlines_visible"] = filtered_dict[ + chart_x_axis_gridlines_visible + ] + self.state["state"]["x"]["gridlines_styling"] = chart_x_axis_gridlines_styling + self.state["state"]["x"]["gridline_color"] = chart_x_axis_gridline_color + + list_chart_x_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_x_axis_gridline_style not in list_chart_x_axis_gridline_style: + raise ValueError( + f"`chart_x_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_x_axis_gridline_style in list_chart_x_axis_gridline_style + and chart_x_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_x_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridline_style"] = filtered_dict[ + chart_x_axis_gridline_style + ] + self.state["state"]["x"]["gridline_width"] = chart_x_axis_gridline_width + self.state["state"]["x"][ + "gridline_category_dividers" + ] = chart_x_axis_gridline_category_dividers + self.state["state"]["x"][ + "gridline_category_dividers_extend" + ] = chart_x_axis_gridline_category_dividers_extend + + list_date_format = [ + "auto", + "%Y-%m-%dT%H:%M:%S.%LZ", + "%Y-%m-%d", + "%m/%d/%Y", + "%d/%m/%Y", + "%d-%b-%y", + "%m/%Y", + "%b %Y", + "%b %y", + "%B %d", + "%d %b", + "%Y", + "%B", + "%b", + "%A", + "%a", + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + ] + [None] + if date_format not in list_date_format: + raise ValueError( + f"`date_format` must be one of: ['auto', '%Y-%m-%dT%H:%M:%S.%LZ', '%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%d-%b-%y', '%m/%Y', '%b %Y', '%b %y', '%B %d', '%d %b', '%Y', '%B', '%b', '%A', '%a', '%H:%M:%S', '%I:%M %p', '%H:%M']" + ) + elif date_format in list_date_format and date_format is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", + "%Y-%m-%d": "%Y-%m-%d", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%d-%b-%y": "%d-%b-%y", + "%m/%Y": "%m/%Y", + "%b %Y": "%b %Y", + "%b %y": "%b %y", + "%B %d": "%B %d", + "%d %b": "%d %b", + "%Y": "%Y", + "%B": "%B", + "%b": "%b", + "%A": "%A", + "%a": "%a", + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + }.items() + if date_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["date_format"] = filtered_dict[date_format] + + list_format_locale = [ + "none", + "ady", + "af-_n_a", + "af-_z_a", + "af", + "ak", + "ar-_m_a", + "ar-_s_a", + "hy-_a_m", + "ay-_b_o", + "eu-_e_s", + "be-_b_y", + "bn-_b_d", + "bn-_i_n", + "bn", + "bs-_b_a", + "my", + "ck-_u_s", + "zh-_c_n", + "zh-_s_g", + "zh-_hans", + "zh-_h_k", + "zh-_t_w", + "zh-_hant", + "zh", + "gx-_g_r", + "nl-_b_e", + "nl-_n_l", + "nl", + "en-_a_u", + "en-_c_a", + "en-_i_n", + "en-_i_e", + "en@pirate", + "en-_z_a", + "en-_g_b", + "en-_u_d", + "en-_u_s", + "en", + "eo-_e_o", + "et-_e_e", + "fo-_f_o", + "fi-_f_i", + "fr-_b_e", + "fr-_c_a", + "fr-_f_r", + "fr-_c_h", + "fr", + "fy-_n_l", + "ff", + "gl-_e_s", + "ka-_g_e", + "de-_a_t", + "de-_d_e", + "de-_c_h", + "de", + "el-_g_r", + "el", + "gn-_p_y", + "gu-_i_n", + "ht", + "is-_i_s", + "is", + "ga-_i_e", + "ga", + "jv-_i_d", + "kab", + "kn-_i_n", + "kn", + "cak", + "kk-_k_z", + "tlh", + "ko-_k_r", + "ko", + "ku-_t_r", + "fb-_l_t", + "li-_n_l", + "dsb", + "lb", + "mk-_m_k", + "mk", + "mai", + "mg-_m_g", + "mn-_m_n", + "se-_n_o", + "nn-_n_o", + "no", + "oc", + "or-_i_n", + "ps-_a_f", + "i_r", + "pt-_b_r", + "pt-_p_t", + "pt", + "pa-_i_n", + "pa", + "qu-_p_e", + "rm-_c_h", + "sa-_i_n", + "sr-_r_s", + "sr", + "si-_l_k", + "sk-_s_k", + "sk", + "so-_s_o", + "es-_a_r", + "es-_c_l", + "es-_c_o", + "es-_e_c", + "es-_m_x", + "es-_n_i", + "es-_e_s", + "es-_u_s", + "es-_v_e", + "es", + "su", + "sw-_k_e", + "sw", + "tt-_r_u", + "th-_t_h", + "th", + "hsb", + "xh-_z_a", + "yi-_d_e", + "yi", + "zu-_z_a", + ] + [None] + if format_locale not in list_format_locale: + raise ValueError( + f"`format_locale` must be one of: ['none', 'ady', 'af-_n_a', 'af-_z_a', 'af', 'ak', 'ar-_m_a', 'ar-_s_a', 'hy-_a_m', 'ay-_b_o', 'eu-_e_s', 'be-_b_y', 'bn-_b_d', 'bn-_i_n', 'bn', 'bs-_b_a', 'my', 'ck-_u_s', 'zh-_c_n', 'zh-_s_g', 'zh-_hans', 'zh-_h_k', 'zh-_t_w', 'zh-_hant', 'zh', 'gx-_g_r', 'nl-_b_e', 'nl-_n_l', 'nl', 'en-_a_u', 'en-_c_a', 'en-_i_n', 'en-_i_e', 'en@pirate', 'en-_z_a', 'en-_g_b', 'en-_u_d', 'en-_u_s', 'en', 'eo-_e_o', 'et-_e_e', 'fo-_f_o', 'fi-_f_i', 'fr-_b_e', 'fr-_c_a', 'fr-_f_r', 'fr-_c_h', 'fr', 'fy-_n_l', 'ff', 'gl-_e_s', 'ka-_g_e', 'de-_a_t', 'de-_d_e', 'de-_c_h', 'de', 'el-_g_r', 'el', 'gn-_p_y', 'gu-_i_n', 'ht', 'is-_i_s', 'is', 'ga-_i_e', 'ga', 'jv-_i_d', 'kab', 'kn-_i_n', 'kn', 'cak', 'kk-_k_z', 'tlh', 'ko-_k_r', 'ko', 'ku-_t_r', 'fb-_l_t', 'li-_n_l', 'dsb', 'lb', 'mk-_m_k', 'mk', 'mai', 'mg-_m_g', 'mn-_m_n', 'se-_n_o', 'nn-_n_o', 'no', 'oc', 'or-_i_n', 'ps-_a_f', 'i_r', 'pt-_b_r', 'pt-_p_t', 'pt', 'pa-_i_n', 'pa', 'qu-_p_e', 'rm-_c_h', 'sa-_i_n', 'sr-_r_s', 'sr', 'si-_l_k', 'sk-_s_k', 'sk', 'so-_s_o', 'es-_a_r', 'es-_c_l', 'es-_c_o', 'es-_e_c', 'es-_m_x', 'es-_n_i', 'es-_e_s', 'es-_u_s', 'es-_v_e', 'es', 'su', 'sw-_k_e', 'sw', 'tt-_r_u', 'th-_t_h', 'th', 'hsb', 'xh-_z_a', 'yi-_d_e', 'yi', 'zu-_z_a']" + ) + elif format_locale in list_format_locale and format_locale is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "ady": "ady", + "af-_n_a": "af-NA", + "af-_z_a": "af-ZA", + "af": "af", + "ak": "ak", + "ar-_m_a": "ar-MA", + "ar-_s_a": "ar-SA", + "hy-_a_m": "hy-AM", + "ay-_b_o": "ay-BO", + "eu-_e_s": "eu-ES", + "be-_b_y": "be-BY", + "bn-_b_d": "bn-BD", + "bn-_i_n": "bn-IN", + "bn": "bn", + "bs-_b_a": "bs-BA", + "my": "my", + "ck-_u_s": "ck-US", + "zh-_c_n": "zh-CN", + "zh-_s_g": "zh-SG", + "zh-_hans": "zh-Hans", + "zh-_h_k": "zh-HK", + "zh-_t_w": "zh-TW", + "zh-_hant": "zh-Hant", + "zh": "zh", + "gx-_g_r": "gx-GR", + "nl-_b_e": "nl-BE", + "nl-_n_l": "nl-NL", + "nl": "nl", + "en-_a_u": "en-AU", + "en-_c_a": "en-CA", + "en-_i_n": "en-IN", + "en-_i_e": "en-IE", + "en@pirate": "en@pirate", + "en-_z_a": "en-ZA", + "en-_g_b": "en-GB", + "en-_u_d": "en-UD", + "en-_u_s": "en-US", + "en": "en", + "eo-_e_o": "eo-EO", + "et-_e_e": "et-EE", + "fo-_f_o": "fo-FO", + "fi-_f_i": "fi-FI", + "fr-_b_e": "fr-BE", + "fr-_c_a": "fr-CA", + "fr-_f_r": "fr-FR", + "fr-_c_h": "fr-CH", + "fr": "fr", + "fy-_n_l": "fy-NL", + "ff": "ff", + "gl-_e_s": "gl-ES", + "ka-_g_e": "ka-GE", + "de-_a_t": "de-AT", + "de-_d_e": "de-DE", + "de-_c_h": "de-CH", + "de": "de", + "el-_g_r": "el-GR", + "el": "el", + "gn-_p_y": "gn-PY", + "gu-_i_n": "gu-IN", + "ht": "ht", + "is-_i_s": "is-IS", + "is": "is", + "ga-_i_e": "ga-IE", + "ga": "ga", + "jv-_i_d": "jv-ID", + "kab": "kab", + "kn-_i_n": "kn-IN", + "kn": "kn", + "cak": "cak", + "kk-_k_z": "kk-KZ", + "tlh": "tlh", + "ko-_k_r": "ko-KR", + "ko": "ko", + "ku-_t_r": "ku-TR", + "fb-_l_t": "fb-LT", + "li-_n_l": "li-NL", + "dsb": "dsb", + "lb": "lb", + "mk-_m_k": "mk-MK", + "mk": "mk", + "mai": "mai", + "mg-_m_g": "mg-MG", + "mn-_m_n": "mn-MN", + "se-_n_o": "se-NO", + "nn-_n_o": "nn-NO", + "no": "no", + "oc": "oc", + "or-_i_n": "or-IN", + "ps-_a_f": "ps-AF", + "i_r": "fa-IR", + "pt-_b_r": "pt-BR", + "pt-_p_t": "pt-PT", + "pt": "pt", + "pa-_i_n": "pa-IN", + "pa": "pa", + "qu-_p_e": "qu-PE", + "rm-_c_h": "rm-CH", + "sa-_i_n": "sa-IN", + "sr-_r_s": "sr-RS", + "sr": "sr", + "si-_l_k": "si-LK", + "sk-_s_k": "sk-SK", + "sk": "sk", + "so-_s_o": "so-SO", + "es-_a_r": "es-AR", + "es-_c_l": "es-CL", + "es-_c_o": "es-CO", + "es-_e_c": "es-EC", + "es-_m_x": "es-MX", + "es-_n_i": "es-NI", + "es-_e_s": "es-ES", + "es-_u_s": "es-US", + "es-_v_e": "es-VE", + "es": "es", + "su": "su", + "sw-_k_e": "sw-KE", + "sw": "sw", + "tt-_r_u": "tt-RU", + "th-_t_h": "th-TH", + "th": "th", + "hsb": "hsb", + "xh-_z_a": "xh-ZA", + "yi-_d_e": "yi-DE", + "yi": "yi", + "zu-_z_a": "zu-ZA", + }.items() + if format_locale in k + } + if len(filtered_dict) > 0: + self.state["state"]["format_locale"] = filtered_dict[format_locale] + + list_format_weekday = ["none", "narrow", "short", "long"] + [None] + if format_weekday not in list_format_weekday: + raise ValueError( + f"`format_weekday` must be one of: ['none', 'narrow', 'short', 'long']" + ) + elif format_weekday in list_format_weekday and format_weekday is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "narrow": "narrow", + "short": "short", + "long": "long", + }.items() + if format_weekday in k + } + if len(filtered_dict) > 0: + self.state["state"]["format_weekday"] = filtered_dict[format_weekday] + + list_format_year = ["none", "numeric", "2-digit"] + [None] + if format_year not in list_format_year: + raise ValueError( + f"`format_year` must be one of: ['none', 'numeric', '2-digit']" + ) + elif format_year in list_format_year and format_year is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "numeric": "numeric", + "2-digit": "2-digit", + }.items() + if format_year in k + } + if len(filtered_dict) > 0: + self.state["state"]["format_year"] = filtered_dict[format_year] + + list_format_month = [ + "none", + "numeric", + "2-digit", + "narrow", + "short", + "long", + ] + [None] + if format_month not in list_format_month: + raise ValueError( + f"`format_month` must be one of: ['none', 'numeric', '2-digit', 'narrow', 'short', 'long']" + ) + elif format_month in list_format_month and format_month is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "numeric": "numeric", + "2-digit": "2-digit", + "narrow": "narrow", + "short": "short", + "long": "long", + }.items() + if format_month in k + } + if len(filtered_dict) > 0: + self.state["state"]["format_month"] = filtered_dict[format_month] + + list_format_day = ["none", "numeric", "2-digit"] + [None] + if format_day not in list_format_day: + raise ValueError( + f"`format_day` must be one of: ['none', 'numeric', '2-digit']" + ) + elif format_day in list_format_day and format_day is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "numeric": "numeric", + "2-digit": "2-digit", + }.items() + if format_day in k + } + if len(filtered_dict) > 0: + self.state["state"]["format_day"] = filtered_dict[format_day] + + list_format_hour = ["none", "numeric", "2-digit"] + [None] + if format_hour not in list_format_hour: + raise ValueError( + f"`format_hour` must be one of: ['none', 'numeric', '2-digit']" + ) + elif format_hour in list_format_hour and format_hour is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "numeric": "numeric", + "2-digit": "2-digit", + }.items() + if format_hour in k + } + if len(filtered_dict) > 0: + self.state["state"]["format_hour"] = filtered_dict[format_hour] + + list_format_minute = ["none", "numeric", "2-digit"] + [None] + if format_minute not in list_format_minute: + raise ValueError( + f"`format_minute` must be one of: ['none', 'numeric', '2-digit']" + ) + elif format_minute in list_format_minute and format_minute is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "numeric": "numeric", + "2-digit": "2-digit", + }.items() + if format_minute in k + } + if len(filtered_dict) > 0: + self.state["state"]["format_minute"] = filtered_dict[format_minute] + self.state["state"]["y_font_size"] = y_font_size + + list_y_font_weight = ["bold", "normal"] + [None] + if y_font_weight not in list_y_font_weight: + raise ValueError(f"`y_font_weight` must be one of: ['bold', 'normal']") + elif y_font_weight in list_y_font_weight and y_font_weight is not None: + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if y_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y_font_weight"] = filtered_dict[y_font_weight] + self.state["state"]["y_font_fill"] = y_font_fill + self.state["state"]["y_max_width"] = y_max_width + self.state["state"]["y_text_dx"] = y_text_dx + self.state["state"]["y_text_dy"] = y_text_dy + self.state["state"]["y_gridline_color"] = y_gridline_color + self.state["state"]["y_gridline_width"] = y_gridline_width + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["filter_control"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["filter_control"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["filter_control"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_filter_controls_dropdown_width_mode] + self.state["state"]["filter_control"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["filter_control"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["filter_control"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["filter_control"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["filter_control"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["filter_control"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["filter_control_all"] = filter_control_all + self.state["state"]["style_controls"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["style_controls"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["style_controls"]["height"] = chart_controls_style_height + self.state["state"]["style_button"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["style_button"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["style_button"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["style_button"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["style_button"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["style_button"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["style_button"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["style_button"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["style_button"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["style_button"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["style_button"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["style_dropdown"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["style_dropdown"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["style_dropdown"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["style_dropdown"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["style_dropdown"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["style_dropdown"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["style_dropdown"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["style_dropdown"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["style_slider"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["style_slider"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["style_slider"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["style_slider"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["style_slider"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["style_slider"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["style_slider"][ + "play_button" + ] = chart_slider_control_style_play_button + + list_chart_filter_controls_container_alignment = ["start", "center", "end"] + [ + None + ] + if ( + chart_filter_controls_container_alignment + not in list_chart_filter_controls_container_alignment + ): + raise ValueError( + f"`chart_filter_controls_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_filter_controls_container_alignment + in list_chart_filter_controls_container_alignment + and chart_filter_controls_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_filter_controls_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_container"]["alignment"] = filtered_dict[ + chart_filter_controls_container_alignment + ] + self.state["state"]["controls_container"][ + "controls_spacing" + ] = chart_filter_controls_container_controls_spacing + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_chart_continous_legend_show_legend = [True, False] + [None] + if ( + chart_continous_legend_show_legend + not in list_chart_continous_legend_show_legend + ): + raise ValueError( + f"`chart_continous_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_continous_legend_show_legend + in list_chart_continous_legend_show_legend + and chart_continous_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_continous_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_continuous"]["show_legend"] = filtered_dict[ + chart_continous_legend_show_legend + ] + + list_chart_continous_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_continous_legend_title_mode + not in list_chart_continous_legend_title_mode + ): + raise ValueError( + f"`chart_continous_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_continous_legend_title_mode in list_chart_continous_legend_title_mode + and chart_continous_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_continous_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_continuous"]["title_mode"] = filtered_dict[ + chart_continous_legend_title_mode + ] + self.state["state"]["legend_continuous"]["title"] = chart_continous_legend_title + self.state["state"]["legend_continuous"][ + "color_band_width" + ] = chart_continous_legend_color_band_width + self.state["state"]["legend_continuous"][ + "color_band_height" + ] = chart_continous_legend_color_band_height + self.state["state"]["legend_continuous"][ + "color_band_radius" + ] = chart_continous_legend_color_band_radius + + list_chart_continous_legend_binned_label_mode = [ + "thresholds", + "centers", + "custom", + ] + [None] + if ( + chart_continous_legend_binned_label_mode + not in list_chart_continous_legend_binned_label_mode + ): + raise ValueError( + f"`chart_continous_legend_binned_label_mode` must be one of: ['thresholds', 'centers', 'custom']" + ) + elif ( + chart_continous_legend_binned_label_mode + in list_chart_continous_legend_binned_label_mode + and chart_continous_legend_binned_label_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "thresholds": "thresholds", + "centers": "centers", + "custom": "custom", + }.items() + if chart_continous_legend_binned_label_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_continuous"][ + "binned_label_mode" + ] = filtered_dict[chart_continous_legend_binned_label_mode] + self.state["state"]["legend_continuous"][ + "binned_label_custom" + ] = chart_continous_legend_binned_label_custom + self.state["state"]["legend_continuous"][ + "legend_min" + ] = chart_continous_legend_legend_min + self.state["state"]["legend_continuous"][ + "additional_min_label" + ] = chart_continous_legend_additional_min_label + self.state["state"]["legend_continuous"][ + "legend_max" + ] = chart_continous_legend_legend_max + self.state["state"]["legend_continuous"][ + "additional_max_label" + ] = chart_continous_legend_additional_max_label + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + self.state["state"]["axes_highlights"][ + "x_enabled" + ] = chart_axes_highlights_x_enabled + + if ( + chart_axes_highlights_x_lines is not None + and len(chart_axes_highlights_x_lines) > 1 + and isinstance(chart_axes_highlights_x_lines, list) + ): + self.state["state"]["axes_highlights"]["x_lines"] = " \n ".join( + chart_axes_highlights_x_lines + ) + else: + self.state["state"]["axes_highlights"][ + "x_lines" + ] = chart_axes_highlights_x_lines + + self.state["state"]["axes_highlights"][ + "x_line_color" + ] = chart_axes_highlights_x_line_color + self.state["state"]["axes_highlights"][ + "x_line_width" + ] = chart_axes_highlights_x_line_width + self.state["state"]["axes_highlights"][ + "x_line_dash" + ] = chart_axes_highlights_x_line_dash + + if ( + chart_axes_highlights_x_areas is not None + and len(chart_axes_highlights_x_areas) > 1 + and isinstance(chart_axes_highlights_x_areas, list) + ): + self.state["state"]["axes_highlights"]["x_areas"] = " \n ".join( + chart_axes_highlights_x_areas + ) + else: + self.state["state"]["axes_highlights"][ + "x_areas" + ] = chart_axes_highlights_x_areas + + self.state["state"]["axes_highlights"][ + "x_area_color" + ] = chart_axes_highlights_x_area_color + self.state["state"]["axes_highlights"][ + "x_area_opacity" + ] = chart_axes_highlights_x_area_opacity + + list_chart_axes_highlights_x_area_texture = [ + "none", + "pattern-diagonal", + "pattern-grid", + "pattern-dots", + ] + [None] + if ( + chart_axes_highlights_x_area_texture + not in list_chart_axes_highlights_x_area_texture + ): + raise ValueError( + f"`chart_axes_highlights_x_area_texture` must be one of: ['none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots']" + ) + elif ( + chart_axes_highlights_x_area_texture + in list_chart_axes_highlights_x_area_texture + and chart_axes_highlights_x_area_texture is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "pattern-diagonal": "fl-pattern-diagonal", + "pattern-grid": "fl-pattern-grid", + "pattern-dots": "fl-pattern-dots", + }.items() + if chart_axes_highlights_x_area_texture in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_area_texture" + ] = filtered_dict[chart_axes_highlights_x_area_texture] + self.state["state"]["axes_highlights"][ + "x_label_vertical" + ] = chart_axes_highlights_x_label_vertical + + list_chart_axes_highlights_x_label_y_position = ["bottom", "middle", "top"] + [ + None + ] + if ( + chart_axes_highlights_x_label_y_position + not in list_chart_axes_highlights_x_label_y_position + ): + raise ValueError( + f"`chart_axes_highlights_x_label_y_position` must be one of: ['bottom', 'middle', 'top']" + ) + elif ( + chart_axes_highlights_x_label_y_position + in list_chart_axes_highlights_x_label_y_position + and chart_axes_highlights_x_label_y_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "middle": "middle", + "top": "top", + }.items() + if chart_axes_highlights_x_label_y_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_label_y_position" + ] = filtered_dict[chart_axes_highlights_x_label_y_position] + + list_chart_axes_highlights_x_label_x_position = ["left", "middle", "right"] + [ + None + ] + if ( + chart_axes_highlights_x_label_x_position + not in list_chart_axes_highlights_x_label_x_position + ): + raise ValueError( + f"`chart_axes_highlights_x_label_x_position` must be one of: ['left', 'middle', 'right']" + ) + elif ( + chart_axes_highlights_x_label_x_position + in list_chart_axes_highlights_x_label_x_position + and chart_axes_highlights_x_label_x_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "middle": "middle", + "right": "right", + }.items() + if chart_axes_highlights_x_label_x_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_label_x_position" + ] = filtered_dict[chart_axes_highlights_x_label_x_position] + self.state["state"]["axes_highlights"][ + "x_label_max_width" + ] = chart_axes_highlights_x_label_max_width + self.state["state"]["axes_highlights"][ + "x_font_size" + ] = chart_axes_highlights_x_font_size + + list_chart_axes_highlights_x_font_weight = ["regular", "bold"] + [None] + if ( + chart_axes_highlights_x_font_weight + not in list_chart_axes_highlights_x_font_weight + ): + raise ValueError( + f"`chart_axes_highlights_x_font_weight` must be one of: ['regular', 'bold']" + ) + elif ( + chart_axes_highlights_x_font_weight + in list_chart_axes_highlights_x_font_weight + and chart_axes_highlights_x_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"regular": "regular", "bold": "bold"}.items() + if chart_axes_highlights_x_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"]["x_font_weight"] = filtered_dict[ + chart_axes_highlights_x_font_weight + ] + self.state["state"]["axes_highlights"][ + "x_label_color" + ] = chart_axes_highlights_x_label_color + self.state["state"]["axes_highlights"][ + "x_shadow_color" + ] = chart_axes_highlights_x_shadow_color + self.state["state"]["axes_highlights"][ + "x_shadow_enabled" + ] = chart_axes_highlights_x_shadow_enabled + self.state["state"]["axes_highlights"][ + "y_enabled" + ] = chart_axes_highlights_y_enabled + + if ( + chart_axes_highlights_y_lines is not None + and len(chart_axes_highlights_y_lines) > 1 + and isinstance(chart_axes_highlights_y_lines, list) + ): + self.state["state"]["axes_highlights"]["y_lines"] = " \n ".join( + chart_axes_highlights_y_lines + ) + else: + self.state["state"]["axes_highlights"][ + "y_lines" + ] = chart_axes_highlights_y_lines + + self.state["state"]["axes_highlights"][ + "y_line_color" + ] = chart_axes_highlights_y_line_color + self.state["state"]["axes_highlights"][ + "y_line_width" + ] = chart_axes_highlights_y_line_width + self.state["state"]["axes_highlights"][ + "y_line_dash" + ] = chart_axes_highlights_y_line_dash + + if ( + chart_axes_highlights_y_areas is not None + and len(chart_axes_highlights_y_areas) > 1 + and isinstance(chart_axes_highlights_y_areas, list) + ): + self.state["state"]["axes_highlights"]["y_areas"] = " \n ".join( + chart_axes_highlights_y_areas + ) + else: + self.state["state"]["axes_highlights"][ + "y_areas" + ] = chart_axes_highlights_y_areas + + self.state["state"]["axes_highlights"][ + "y_area_color" + ] = chart_axes_highlights_y_area_color + self.state["state"]["axes_highlights"][ + "y_area_opacity" + ] = chart_axes_highlights_y_area_opacity + + list_chart_axes_highlights_y_area_texture = [ + "none", + "pattern-diagonal", + "pattern-grid", + "pattern-dots", + ] + [None] + if ( + chart_axes_highlights_y_area_texture + not in list_chart_axes_highlights_y_area_texture + ): + raise ValueError( + f"`chart_axes_highlights_y_area_texture` must be one of: ['none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots']" + ) + elif ( + chart_axes_highlights_y_area_texture + in list_chart_axes_highlights_y_area_texture + and chart_axes_highlights_y_area_texture is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "pattern-diagonal": "fl-pattern-diagonal", + "pattern-grid": "fl-pattern-grid", + "pattern-dots": "fl-pattern-dots", + }.items() + if chart_axes_highlights_y_area_texture in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_area_texture" + ] = filtered_dict[chart_axes_highlights_y_area_texture] + + list_chart_axes_highlights_y_label_x_position = ["left", "middle", "right"] + [ + None + ] + if ( + chart_axes_highlights_y_label_x_position + not in list_chart_axes_highlights_y_label_x_position + ): + raise ValueError( + f"`chart_axes_highlights_y_label_x_position` must be one of: ['left', 'middle', 'right']" + ) + elif ( + chart_axes_highlights_y_label_x_position + in list_chart_axes_highlights_y_label_x_position + and chart_axes_highlights_y_label_x_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "middle": "middle", + "right": "right", + }.items() + if chart_axes_highlights_y_label_x_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_label_x_position" + ] = filtered_dict[chart_axes_highlights_y_label_x_position] + + list_chart_axes_highlights_y_label_y_position = ["above", "middle", "below"] + [ + None + ] + if ( + chart_axes_highlights_y_label_y_position + not in list_chart_axes_highlights_y_label_y_position + ): + raise ValueError( + f"`chart_axes_highlights_y_label_y_position` must be one of: ['above', 'middle', 'below']" + ) + elif ( + chart_axes_highlights_y_label_y_position + in list_chart_axes_highlights_y_label_y_position + and chart_axes_highlights_y_label_y_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "above": "above", + "middle": "middle", + "below": "below", + }.items() + if chart_axes_highlights_y_label_y_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_label_y_position" + ] = filtered_dict[chart_axes_highlights_y_label_y_position] + self.state["state"]["axes_highlights"][ + "y_label_max_width" + ] = chart_axes_highlights_y_label_max_width + self.state["state"]["axes_highlights"][ + "y_font_size" + ] = chart_axes_highlights_y_font_size + + list_chart_axes_highlights_y_font_weight = ["regular", "bold"] + [None] + if ( + chart_axes_highlights_y_font_weight + not in list_chart_axes_highlights_y_font_weight + ): + raise ValueError( + f"`chart_axes_highlights_y_font_weight` must be one of: ['regular', 'bold']" + ) + elif ( + chart_axes_highlights_y_font_weight + in list_chart_axes_highlights_y_font_weight + and chart_axes_highlights_y_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"regular": "regular", "bold": "bold"}.items() + if chart_axes_highlights_y_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"]["y_font_weight"] = filtered_dict[ + chart_axes_highlights_y_font_weight + ] + self.state["state"]["axes_highlights"][ + "y_label_color" + ] = chart_axes_highlights_y_label_color + self.state["state"]["axes_highlights"][ + "y_shadow_color" + ] = chart_axes_highlights_y_shadow_color + self.state["state"]["axes_highlights"][ + "y_shadow_enabled" + ] = chart_axes_highlights_y_shadow_enabled + self.state["state"]["animation_duration"] = animation_duration + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_gauge_details( + self, + gauge_radial_extent: str = None, + gauge_radial_extent_custom: float = None, + gauge_width: str = None, + gauge_width_custom: float = None, + gauge_scale_domain: str = None, + gauge_scale_domain_min: float = None, + gauge_scale_domain_max: float = None, + gauge_color: str = None, + gauge_opacity: float = None, + gauge_border_color: str = None, + gauge_border_size: float = None, + height_mode: str = None, + aspect_ratio: str = None, + aspect_ratio_custom: float = None, + add_aspect_ratio_mobile: str = None, + breakpoint: float = None, + aspect_ratio_mobile: str = None, + aspect_ratio_mobile_custom: float = None, + chart_facet_columns_fixed: bool = None, + chart_facet_min_width: float = None, + chart_facet_max_width: float = None, + chart_facet_columns: float = None, + chart_facet_gutter_w: float = None, + chart_facet_gutter_h: float = None, + chart_facet_animation: str = None, + chart_facet_titles: bool = None, + chart_facet_title_align: str = None, + chart_facet_title_size: float = None, + chart_facet_title_unit: str = None, + chart_facet_title_color: str = None, + chart_facet_title_padding_top: float = None, + chart_facet_title_padding_bottom: float = None, + chart_facet_title_bg: str = None, + chart_facet_title_bg_color: str = None, + chart_facet_title_bg_padding: float = None, + segment_width: str = None, + segment_width_custom: float = None, + segment_number: str = None, + segment_fixed_number: float = None, + segment_custom: Union[list, str] = None, + segment_labels: Union[list, str] = None, + segment_label_size: str = None, + segment_label_size_custom: float = None, + segment_label_weight: str = None, + segment_label_rotation: str = None, + segment_label_color: str = None, + segment_label_padding: float = None, + color_type: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + ticks_mode: str = None, + ticks_number: float = None, + ticks_custom: Union[list, str] = None, + ticks_width: float = None, + ticks_color: str = None, + ticks_length: str = None, + ticks_length_custom: float = None, + ticks_animation: str = None, + ticks_animation_duration: float = None, + intermediate_ticks: str = None, + intermediate_ticks_number: float = None, + intermediate_ticks_width: float = None, + ticks_direction: str = None, + label_position: str = None, + ticks_label_padding: float = None, + ticks_label_color: str = None, + label_rotation: str = None, + label_flip: bool = None, + ticks_label_size: str = None, + ticks_label_size_custom: float = None, + ticks_label_weight: str = None, + needle_size: str = None, + needle_size_custom: float = None, + needle_hand_length: str = None, + needle_hand_length_custom: float = None, + needle_color: str = None, + needle_color_custom: str = None, + needle_centre_size: str = None, + needle_centre_size_custom: float = None, + needle_centre_stroke_width: float = None, + needle_centre_stroke: str = None, + needle_animation: str = None, + needle_animation_duration: float = None, + jitter: str = None, + jitter_speed: float = None, + gauge_text_align: str = None, + gauge_text_position: str = None, + gauge_text_position_flip: bool = None, + gauge_name_size: str = None, + gauge_name_size_custom: float = None, + gauge_name_styling: bool = None, + gauge_name_weight: str = None, + gauge_name_color: str = None, + gauge_name_color_custom: str = None, + gauge_name_space_above: str = None, + gauge_name_space_above_custom: float = None, + gauge_name_space_below: str = None, + gauge_name_space_below_custom: float = None, + gauge_value_size: str = None, + gauge_value_size_custom: float = None, + gauge_value_styling: bool = None, + gauge_value_weight: str = None, + gauge_value_color: str = None, + gauge_value_color_custom: str = None, + gauge_value_space_above: str = None, + gauge_value_space_above_custom: float = None, + gauge_value_space_below: str = None, + gauge_value_space_below_custom: float = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_filter_controls_container_alignment: str = None, + chart_filter_controls_container_controls_spacing: float = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: gauge. + + + :param gauge_radial_extent: Shape. Choices: 90, 180, 270, custom. Flourish type hint: string, defaults to None. + :type gauge_radial_extent: str, optional + :param gauge_radial_extent_custom: Angle. Flourish type hint: number, defaults to None. + :type gauge_radial_extent_custom: float, optional + :param gauge_width: Inner radius. Choices: 1, 0.75, 0.5, custom. Flourish type hint: string, defaults to None. + :type gauge_width: str, optional + :param gauge_width_custom: Custom. Flourish type hint: number, defaults to None. + :type gauge_width_custom: float, optional + :param gauge_scale_domain: Range. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type gauge_scale_domain: str, optional + :param gauge_scale_domain_min: Min. Flourish type hint: number, defaults to None. + :type gauge_scale_domain_min: float, optional + :param gauge_scale_domain_max: Max. Flourish type hint: number, defaults to None. + :type gauge_scale_domain_max: float, optional + :param gauge_color: Color. Flourish type hint: color, defaults to None. + :type gauge_color: str, optional + :param gauge_opacity: Opacity. Flourish type hint: number, defaults to None. + :type gauge_opacity: float, optional + :param gauge_border_color: Border. Flourish type hint: color, defaults to None. + :type gauge_border_color: str, optional + :param gauge_border_size: Border size. Flourish type hint: number, defaults to None. + :type gauge_border_size: float, optional + :param height_mode: Height mode. Choices: auto, standard, aspect. Auto: sets the height based on the chart type, data and width. Standard: default Flourish responsive sizing. Aspect ratio: sets the aspect of each plot. This setting is ignored when embedded in a fixed-height context, such as a simple Iframe embedFlourish type hint: string, defaults to None. + :type height_mode: str, optional + :param aspect_ratio: Aspect ratio. Choices: 0.75, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type aspect_ratio: str, optional + :param aspect_ratio_custom: Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type aspect_ratio_custom: float, optional + :param add_aspect_ratio_mobile: Mobile aspect ratio. Choices: disabled, enabled. Flourish type hint: string, defaults to None. + :type add_aspect_ratio_mobile: str, optional + :param breakpoint: Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to None. + :type breakpoint: float, optional + :param aspect_ratio_mobile: Mobile aspect ratio. Choices: 0.75, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type aspect_ratio_mobile: str, optional + :param aspect_ratio_mobile_custom: Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type aspect_ratio_mobile_custom: float, optional + :param chart_facet_columns_fixed: Number of columns. Choices: False, True. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to None. + :type chart_facet_columns_fixed: bool, optional + :param chart_facet_min_width: Min gauge width. Determines the minimum size (in pixels) at which each gauge will appear. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_min_width: float, optional + :param chart_facet_max_width: Max gauge width. Determines the maximum size (in pixels) at which each gauge will appear. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_max_width: float, optional + :param chart_facet_columns: Fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_columns: float, optional + :param chart_facet_gutter_w: Horizontal margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_w: float, optional + :param chart_facet_gutter_h: Vertical margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_h: float, optional + :param chart_facet_animation: On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to None. + :type chart_facet_animation: str, optional + :param chart_facet_titles: Show titles. Flourish type hint: boolean, defaults to None. + :type chart_facet_titles: bool, optional + :param chart_facet_title_align: Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to None. + :type chart_facet_title_align: str, optional + :param chart_facet_title_size: Size. Relative to the width of the chart. Flourish type hint: number, defaults to None. + :type chart_facet_title_size: float, optional + :param chart_facet_title_unit: Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to None. + :type chart_facet_title_unit: str, optional + :param chart_facet_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_color: str, optional + :param chart_facet_title_padding_top: Space above. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_top: float, optional + :param chart_facet_title_padding_bottom: Space below. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_bottom: float, optional + :param chart_facet_title_bg: Background. Choices: none, full, text. Flourish type hint: string, defaults to None. + :type chart_facet_title_bg: str, optional + :param chart_facet_title_bg_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_bg_color: str, optional + :param chart_facet_title_bg_padding: Padding. Horizontal space between text and background. Flourish type hint: number, defaults to None. + :type chart_facet_title_bg_padding: float, optional + :param segment_width: Size. Choices: 0.1, 0.2, 1, custom. Flourish type hint: string, defaults to None. + :type segment_width: str, optional + :param segment_width_custom: Custom. Flourish type hint: number, defaults to None. + :type segment_width_custom: float, optional + :param segment_number: Number. Choices: auto, fixed, custom. Flourish type hint: string, defaults to None. + :type segment_number: str, optional + :param segment_fixed_number: Number. Flourish type hint: number, defaults to None. + :type segment_fixed_number: float, optional + :param segment_custom: Two values per line in the following format 0 :: 5. Flourish type hint: text, defaults to None. + :type segment_custom: Union[list, str], optional + :param segment_labels: One label per line. If the number of segments is Fixed, labels will be added to each segment according to the order they appear in the gauge. If the number of segments is Custom, labels will be added to each segment according to the order in the custom segments have been inputted. Flourish type hint: text, defaults to None. + :type segment_labels: Union[list, str], optional + :param segment_label_size: Size. Choices: auto, 0.8, 1, 1.2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to None. + :type segment_label_size: str, optional + :param segment_label_size_custom: Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type segment_label_size_custom: float, optional + :param segment_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type segment_label_weight: str, optional + :param segment_label_rotation: Rotation. Choices: none, ring. Flourish type hint: string, defaults to None. + :type segment_label_rotation: str, optional + :param segment_label_color: Color. Flourish type hint: color, defaults to None. + :type segment_label_color: str, optional + :param segment_label_padding: Padding. Flourish type hint: number, defaults to None. + :type segment_label_padding: float, optional + :param color_type: Choices: categorical, numeric. Flourish type hint: string, defaults to None. + :type color_type: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param ticks_mode: Mode. Choices: none, auto, number, custom. Flourish type hint: string, defaults to None. + :type ticks_mode: str, optional + :param ticks_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type ticks_number: float, optional + :param ticks_custom: One tick value per line. Flourish type hint: text, defaults to None. + :type ticks_custom: Union[list, str], optional + :param ticks_width: Width. Flourish type hint: number, defaults to None. + :type ticks_width: float, optional + :param ticks_color: Color. Flourish type hint: color, defaults to None. + :type ticks_color: str, optional + :param ticks_length: Size. Choices: 0.1, 0.2, 0.3, custom. Flourish type hint: string, defaults to None. + :type ticks_length: str, optional + :param ticks_length_custom: Custom. Flourish type hint: number, defaults to None. + :type ticks_length_custom: float, optional + :param ticks_animation: Animation. Choices: disabled, enabled. Flourish type hint: string, defaults to None. + :type ticks_animation: str, optional + :param ticks_animation_duration: Duration. The duration, in seconds, of the transitions for example, between two slides in a story Flourish type hint: number, defaults to None. + :type ticks_animation_duration: float, optional + :param intermediate_ticks: Intermediate ticks. Choices: off, on. Flourish type hint: string, defaults to None. + :type intermediate_ticks: str, optional + :param intermediate_ticks_number: Number. Approximate number of intermediate ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type intermediate_ticks_number: float, optional + :param intermediate_ticks_width: Size. As a proportion of the tick size. Flourish type hint: number, defaults to None. + :type intermediate_ticks_width: float, optional + :param ticks_direction: Direction. Choices: inwards, outwards. Flourish type hint: string, defaults to None. + :type ticks_direction: str, optional + :param label_position: Position. Choices: inside, outside. Flourish type hint: string, defaults to None. + :type label_position: str, optional + :param ticks_label_padding: Space. Flourish type hint: number, defaults to None. + :type ticks_label_padding: float, optional + :param ticks_label_color: Color. Flourish type hint: color, defaults to None. + :type ticks_label_color: str, optional + :param label_rotation: Rotation. Choices: none, auto, ring. Flourish type hint: string, defaults to None. + :type label_rotation: str, optional + :param label_flip: Auto flip. Automatically flip when labels become less legible. Flourish type hint: boolean, defaults to None. + :type label_flip: bool, optional + :param ticks_label_size: Size. Choices: 1, 1.5, 2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to None. + :type ticks_label_size: str, optional + :param ticks_label_size_custom: Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type ticks_label_size_custom: float, optional + :param ticks_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type ticks_label_weight: str, optional + :param needle_size: Size. Choices: 0.03, 0.06, 0.09, custom. Flourish type hint: string, defaults to None. + :type needle_size: str, optional + :param needle_size_custom: Custom. Flourish type hint: number, defaults to None. + :type needle_size_custom: float, optional + :param needle_hand_length: Length. Choices: 0.5, 0.75, 1, custom. Flourish type hint: string, defaults to None. + :type needle_hand_length: str, optional + :param needle_hand_length_custom: Custom. Flourish type hint: number, defaults to None. + :type needle_hand_length_custom: float, optional + :param needle_color: Color. Choices: gauge, custom. Flourish type hint: string, defaults to None. + :type needle_color: str, optional + :param needle_color_custom: Flourish type hint: color, defaults to None. + :type needle_color_custom: str, optional + :param needle_centre_size: Size. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type needle_centre_size: str, optional + :param needle_centre_size_custom: Custom. Flourish type hint: number, defaults to None. + :type needle_centre_size_custom: float, optional + :param needle_centre_stroke_width: Border width. Flourish type hint: number, defaults to None. + :type needle_centre_stroke_width: float, optional + :param needle_centre_stroke: Border color. Flourish type hint: color, defaults to None. + :type needle_centre_stroke: str, optional + :param needle_animation: Animation. Choices: disabled, enabled. Flourish type hint: string, defaults to None. + :type needle_animation: str, optional + :param needle_animation_duration: Duration. The duration, in seconds, of the transitions for example, between two slides in a story Flourish type hint: number, defaults to None. + :type needle_animation_duration: float, optional + :param jitter: Amplitude. Choices: none, low, medium, high. Sets how much the gauge needle moves when it animates up and down. To turn off the animation click NoneFlourish type hint: string, defaults to None. + :type jitter: str, optional + :param jitter_speed: Speed. Flourish type hint: number, defaults to None. + :type jitter_speed: float, optional + :param gauge_text_align: Alignment. Choices: start, middle, end. Flourish type hint: string, defaults to None. + :type gauge_text_align: str, optional + :param gauge_text_position: Position. Choices: above, below, split. Flourish type hint: string, defaults to None. + :type gauge_text_position: str, optional + :param gauge_text_position_flip: Flip order. Flourish type hint: boolean, defaults to None. + :type gauge_text_position_flip: bool, optional + :param gauge_name_size: Size. Choices: 1, 1.5, 2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to None. + :type gauge_name_size: str, optional + :param gauge_name_size_custom: Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type gauge_name_size_custom: float, optional + :param gauge_name_styling: Change styling. Flourish type hint: boolean, defaults to None. + :type gauge_name_styling: bool, optional + :param gauge_name_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type gauge_name_weight: str, optional + :param gauge_name_color: Color. Choices: gauge, custom. Flourish type hint: string, defaults to None. + :type gauge_name_color: str, optional + :param gauge_name_color_custom: Flourish type hint: color, defaults to None. + :type gauge_name_color_custom: str, optional + :param gauge_name_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type gauge_name_space_above: str, optional + :param gauge_name_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type gauge_name_space_above_custom: float, optional + :param gauge_name_space_below: Space below. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type gauge_name_space_below: str, optional + :param gauge_name_space_below_custom: Custom. Flourish type hint: number, defaults to None. + :type gauge_name_space_below_custom: float, optional + :param gauge_value_size: Size. Choices: 1, 1.5, 2, custom. In rems, a multiple of the pages base font size. Flourish type hint: string, defaults to None. + :type gauge_value_size: str, optional + :param gauge_value_size_custom: Custom. In rems, a multiple of the pages base font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type gauge_value_size_custom: float, optional + :param gauge_value_styling: Change styling. Flourish type hint: boolean, defaults to None. + :type gauge_value_styling: bool, optional + :param gauge_value_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type gauge_value_weight: str, optional + :param gauge_value_color: Color. Choices: gauge, custom. Flourish type hint: string, defaults to None. + :type gauge_value_color: str, optional + :param gauge_value_color_custom: Flourish type hint: color, defaults to None. + :type gauge_value_color_custom: str, optional + :param gauge_value_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type gauge_value_space_above: str, optional + :param gauge_value_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type gauge_value_space_above_custom: float, optional + :param gauge_value_space_below: Space below. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type gauge_value_space_below: str, optional + :param gauge_value_space_below_custom: Custom. Flourish type hint: number, defaults to None. + :type gauge_value_space_below_custom: float, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_filter_controls_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_filter_controls_container_alignment: str, optional + :param chart_filter_controls_container_controls_spacing: Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to None. + :type chart_filter_controls_container_controls_spacing: float, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "facets": {}, + "color": {}, + "formatting": {}, + "controls_container": {}, + "controls": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "slider_style": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_gauge_radial_extent = ["90", "180", "270", "custom"] + [None] + if gauge_radial_extent not in list_gauge_radial_extent: + raise ValueError( + f"`gauge_radial_extent` must be one of: ['90', '180', '270', 'custom']" + ) + elif ( + gauge_radial_extent in list_gauge_radial_extent + and gauge_radial_extent is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "90": "90", + "180": "180", + "270": "270", + "custom": "custom", + }.items() + if gauge_radial_extent in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_radial_extent"] = filtered_dict[ + gauge_radial_extent + ] + self.state["state"]["gauge_radial_extent_custom"] = gauge_radial_extent_custom + + list_gauge_width = ["1", "0.75", "0.5", "custom"] + [None] + if gauge_width not in list_gauge_width: + raise ValueError( + f"`gauge_width` must be one of: ['1', '0.75', '0.5', 'custom']" + ) + elif gauge_width in list_gauge_width and gauge_width is not None: + filtered_dict = { + k: v + for (k, v) in { + "1": "1", + "0.75": "0.75", + "0.5": "0.5", + "custom": "custom", + }.items() + if gauge_width in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_width"] = filtered_dict[gauge_width] + self.state["state"]["gauge_width_custom"] = gauge_width_custom + + list_gauge_scale_domain = ["auto", "custom"] + [None] + if gauge_scale_domain not in list_gauge_scale_domain: + raise ValueError(f"`gauge_scale_domain` must be one of: ['auto', 'custom']") + elif ( + gauge_scale_domain in list_gauge_scale_domain + and gauge_scale_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if gauge_scale_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_scale_domain"] = filtered_dict[ + gauge_scale_domain + ] + self.state["state"]["gauge_scale_domain_min"] = gauge_scale_domain_min + self.state["state"]["gauge_scale_domain_max"] = gauge_scale_domain_max + self.state["state"]["gauge_color"] = gauge_color + self.state["state"]["gauge_opacity"] = gauge_opacity + self.state["state"]["gauge_border_color"] = gauge_border_color + self.state["state"]["gauge_border_size"] = gauge_border_size + + list_height_mode = ["auto", "standard", "aspect"] + [None] + if height_mode not in list_height_mode: + raise ValueError( + f"`height_mode` must be one of: ['auto', 'standard', 'aspect']" + ) + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "standard": "standard", + "aspect": "aspect", + }.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + + list_aspect_ratio = ["0.75", "1", "1.5", "custom"] + [None] + if aspect_ratio not in list_aspect_ratio: + raise ValueError( + f"`aspect_ratio` must be one of: ['0.75', '1', '1.5', 'custom']" + ) + elif aspect_ratio in list_aspect_ratio and aspect_ratio is not None: + filtered_dict = { + k: v + for (k, v) in { + "0.75": "0.75", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if aspect_ratio in k + } + if len(filtered_dict) > 0: + self.state["state"]["aspect_ratio"] = filtered_dict[aspect_ratio] + self.state["state"]["aspect_ratio_custom"] = aspect_ratio_custom + + list_add_aspect_ratio_mobile = ["disabled", "enabled"] + [None] + if add_aspect_ratio_mobile not in list_add_aspect_ratio_mobile: + raise ValueError( + f"`add_aspect_ratio_mobile` must be one of: ['disabled', 'enabled']" + ) + elif ( + add_aspect_ratio_mobile in list_add_aspect_ratio_mobile + and add_aspect_ratio_mobile is not None + ): + filtered_dict = { + k: v + for (k, v) in {"disabled": "disabled", "enabled": "enabled"}.items() + if add_aspect_ratio_mobile in k + } + if len(filtered_dict) > 0: + self.state["state"]["add_aspect_ratio_mobile"] = filtered_dict[ + add_aspect_ratio_mobile + ] + self.state["state"]["breakpoint"] = breakpoint + + list_aspect_ratio_mobile = ["0.75", "1", "1.5", "custom"] + [None] + if aspect_ratio_mobile not in list_aspect_ratio_mobile: + raise ValueError( + f"`aspect_ratio_mobile` must be one of: ['0.75', '1', '1.5', 'custom']" + ) + elif ( + aspect_ratio_mobile in list_aspect_ratio_mobile + and aspect_ratio_mobile is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.75": "0.75", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if aspect_ratio_mobile in k + } + if len(filtered_dict) > 0: + self.state["state"]["aspect_ratio_mobile"] = filtered_dict[ + aspect_ratio_mobile + ] + self.state["state"]["aspect_ratio_mobile_custom"] = aspect_ratio_mobile_custom + + list_chart_facet_columns_fixed = [False, True] + [None] + if chart_facet_columns_fixed not in list_chart_facet_columns_fixed: + raise ValueError( + f"`chart_facet_columns_fixed` must be one of: [False, True]" + ) + elif ( + chart_facet_columns_fixed in list_chart_facet_columns_fixed + and chart_facet_columns_fixed is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_facet_columns_fixed in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["columns_fixed"] = filtered_dict[ + chart_facet_columns_fixed + ] + self.state["state"]["facets"]["min_width"] = chart_facet_min_width + self.state["state"]["facets"]["max_width"] = chart_facet_max_width + self.state["state"]["facets"]["columns"] = chart_facet_columns + self.state["state"]["facets"]["gutter_w"] = chart_facet_gutter_w + self.state["state"]["facets"]["gutter_h"] = chart_facet_gutter_h + + list_chart_facet_animation = ["auto", "name", "reuse"] + [None] + if chart_facet_animation not in list_chart_facet_animation: + raise ValueError( + f"`chart_facet_animation` must be one of: ['auto', 'name', 'reuse']" + ) + elif ( + chart_facet_animation in list_chart_facet_animation + and chart_facet_animation is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "name": "name", "reuse": "reuse"}.items() + if chart_facet_animation in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["animation"] = filtered_dict[ + chart_facet_animation + ] + self.state["state"]["facets"]["titles"] = chart_facet_titles + + list_chart_facet_title_align = ["auto", "left", "center", "right"] + [None] + if chart_facet_title_align not in list_chart_facet_title_align: + raise ValueError( + f"`chart_facet_title_align` must be one of: ['auto', 'left', 'center', 'right']" + ) + elif ( + chart_facet_title_align in list_chart_facet_title_align + and chart_facet_title_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_facet_title_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_align"] = filtered_dict[ + chart_facet_title_align + ] + self.state["state"]["facets"]["title_size"] = chart_facet_title_size + + list_chart_facet_title_unit = ["rem", "facet"] + [None] + if chart_facet_title_unit not in list_chart_facet_title_unit: + raise ValueError( + f"`chart_facet_title_unit` must be one of: ['rem', 'facet']" + ) + elif ( + chart_facet_title_unit in list_chart_facet_title_unit + and chart_facet_title_unit is not None + ): + filtered_dict = { + k: v + for (k, v) in {"rem": "rem", "facet": "facet"}.items() + if chart_facet_title_unit in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_unit"] = filtered_dict[ + chart_facet_title_unit + ] + self.state["state"]["facets"]["title_color"] = chart_facet_title_color + self.state["state"]["facets"][ + "title_padding_top" + ] = chart_facet_title_padding_top + self.state["state"]["facets"][ + "title_padding_bottom" + ] = chart_facet_title_padding_bottom + + list_chart_facet_title_bg = ["none", "full", "text"] + [None] + if chart_facet_title_bg not in list_chart_facet_title_bg: + raise ValueError( + f"`chart_facet_title_bg` must be one of: ['none', 'full', 'text']" + ) + elif ( + chart_facet_title_bg in list_chart_facet_title_bg + and chart_facet_title_bg is not None + ): + filtered_dict = { + k: v + for (k, v) in {"none": "none", "full": "full", "text": "text"}.items() + if chart_facet_title_bg in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_bg"] = filtered_dict[ + chart_facet_title_bg + ] + self.state["state"]["facets"]["title_bg_color"] = chart_facet_title_bg_color + self.state["state"]["facets"]["title_bg_padding"] = chart_facet_title_bg_padding + + list_segment_width = ["0.1", "0.2", "1", "custom"] + [None] + if segment_width not in list_segment_width: + raise ValueError( + f"`segment_width` must be one of: ['0.1', '0.2', '1', 'custom']" + ) + elif segment_width in list_segment_width and segment_width is not None: + filtered_dict = { + k: v + for (k, v) in { + "0.1": "0.1", + "0.2": "0.2", + "1": "1", + "custom": "custom", + }.items() + if segment_width in k + } + if len(filtered_dict) > 0: + self.state["state"]["segment_width"] = filtered_dict[segment_width] + self.state["state"]["segment_width_custom"] = segment_width_custom + + list_segment_number = ["auto", "fixed", "custom"] + [None] + if segment_number not in list_segment_number: + raise ValueError( + f"`segment_number` must be one of: ['auto', 'fixed', 'custom']" + ) + elif segment_number in list_segment_number and segment_number is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "fixed": "fixed", + "custom": "custom", + }.items() + if segment_number in k + } + if len(filtered_dict) > 0: + self.state["state"]["segment_number"] = filtered_dict[segment_number] + self.state["state"]["segment_fixed_number"] = segment_fixed_number + + if ( + segment_custom is not None + and len(segment_custom) > 1 + and isinstance(segment_custom, list) + ): + self.state["state"]["segment_custom"] = " \n ".join(segment_custom) + else: + self.state["state"]["segment_custom"] = segment_custom + + if ( + segment_labels is not None + and len(segment_labels) > 1 + and isinstance(segment_labels, list) + ): + self.state["state"]["segment_labels"] = " \n ".join(segment_labels) + else: + self.state["state"]["segment_labels"] = segment_labels + + list_segment_label_size = ["auto", "0.8", "1", "1.2", "custom"] + [None] + if segment_label_size not in list_segment_label_size: + raise ValueError( + f"`segment_label_size` must be one of: ['auto', '0.8', '1', '1.2', 'custom']" + ) + elif ( + segment_label_size in list_segment_label_size + and segment_label_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "0.8": "0.8", + "1": "1", + "1.2": "1.2", + "custom": "custom", + }.items() + if segment_label_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["segment_label_size"] = filtered_dict[ + segment_label_size + ] + self.state["state"]["segment_label_size_custom"] = segment_label_size_custom + + list_segment_label_weight = ["bold", "normal"] + [None] + if segment_label_weight not in list_segment_label_weight: + raise ValueError( + f"`segment_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + segment_label_weight in list_segment_label_weight + and segment_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if segment_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["segment_label_weight"] = filtered_dict[ + segment_label_weight + ] + + list_segment_label_rotation = ["none", "ring"] + [None] + if segment_label_rotation not in list_segment_label_rotation: + raise ValueError( + f"`segment_label_rotation` must be one of: ['none', 'ring']" + ) + elif ( + segment_label_rotation in list_segment_label_rotation + and segment_label_rotation is not None + ): + filtered_dict = { + k: v + for (k, v) in {"none": "none", "ring": "ring"}.items() + if segment_label_rotation in k + } + if len(filtered_dict) > 0: + self.state["state"]["segment_label_rotation"] = filtered_dict[ + segment_label_rotation + ] + self.state["state"]["segment_label_color"] = segment_label_color + self.state["state"]["segment_label_padding"] = segment_label_padding + + list_color_type = ["categorical", "numeric"] + [None] + if color_type not in list_color_type: + raise ValueError(f"`color_type` must be one of: ['categorical', 'numeric']") + elif color_type in list_color_type and color_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "categorical": "categorical", + "numeric": "numeric", + }.items() + if color_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color_type"] = filtered_dict[color_type] + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + + list_ticks_mode = ["none", "auto", "number", "custom"] + [None] + if ticks_mode not in list_ticks_mode: + raise ValueError( + f"`ticks_mode` must be one of: ['none', 'auto', 'number', 'custom']" + ) + elif ticks_mode in list_ticks_mode and ticks_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if ticks_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["ticks_mode"] = filtered_dict[ticks_mode] + self.state["state"]["ticks_number"] = ticks_number + + if ( + ticks_custom is not None + and len(ticks_custom) > 1 + and isinstance(ticks_custom, list) + ): + self.state["state"]["ticks_custom"] = " \n ".join(ticks_custom) + else: + self.state["state"]["ticks_custom"] = ticks_custom + + self.state["state"]["ticks_width"] = ticks_width + self.state["state"]["ticks_color"] = ticks_color + + list_ticks_length = ["0.1", "0.2", "0.3", "custom"] + [None] + if ticks_length not in list_ticks_length: + raise ValueError( + f"`ticks_length` must be one of: ['0.1', '0.2', '0.3', 'custom']" + ) + elif ticks_length in list_ticks_length and ticks_length is not None: + filtered_dict = { + k: v + for (k, v) in { + "0.1": "0.1", + "0.2": "0.2", + "0.3": "0.3", + "custom": "custom", + }.items() + if ticks_length in k + } + if len(filtered_dict) > 0: + self.state["state"]["ticks_length"] = filtered_dict[ticks_length] + self.state["state"]["ticks_length_custom"] = ticks_length_custom + + list_ticks_animation = ["disabled", "enabled"] + [None] + if ticks_animation not in list_ticks_animation: + raise ValueError( + f"`ticks_animation` must be one of: ['disabled', 'enabled']" + ) + elif ticks_animation in list_ticks_animation and ticks_animation is not None: + filtered_dict = { + k: v + for (k, v) in {"disabled": "disabled", "enabled": "enabled"}.items() + if ticks_animation in k + } + if len(filtered_dict) > 0: + self.state["state"]["ticks_animation"] = filtered_dict[ticks_animation] + self.state["state"]["ticks_animation_duration"] = ticks_animation_duration + + list_intermediate_ticks = ["off", "on"] + [None] + if intermediate_ticks not in list_intermediate_ticks: + raise ValueError(f"`intermediate_ticks` must be one of: ['off', 'on']") + elif ( + intermediate_ticks in list_intermediate_ticks + and intermediate_ticks is not None + ): + filtered_dict = { + k: v + for (k, v) in {"off": "off", "on": "on"}.items() + if intermediate_ticks in k + } + if len(filtered_dict) > 0: + self.state["state"]["intermediate_ticks"] = filtered_dict[ + intermediate_ticks + ] + self.state["state"]["intermediate_ticks_number"] = intermediate_ticks_number + self.state["state"]["intermediate_ticks_width"] = intermediate_ticks_width + + list_ticks_direction = ["inwards", "outwards"] + [None] + if ticks_direction not in list_ticks_direction: + raise ValueError( + f"`ticks_direction` must be one of: ['inwards', 'outwards']" + ) + elif ticks_direction in list_ticks_direction and ticks_direction is not None: + filtered_dict = { + k: v + for (k, v) in {"inwards": "inwards", "outwards": "outwards"}.items() + if ticks_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["ticks_direction"] = filtered_dict[ticks_direction] + + list_label_position = ["inside", "outside"] + [None] + if label_position not in list_label_position: + raise ValueError(f"`label_position` must be one of: ['inside', 'outside']") + elif label_position in list_label_position and label_position is not None: + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_position"] = filtered_dict[label_position] + self.state["state"]["ticks_label_padding"] = ticks_label_padding + self.state["state"]["ticks_label_color"] = ticks_label_color + + list_label_rotation = ["none", "auto", "ring"] + [None] + if label_rotation not in list_label_rotation: + raise ValueError( + f"`label_rotation` must be one of: ['none', 'auto', 'ring']" + ) + elif label_rotation in list_label_rotation and label_rotation is not None: + filtered_dict = { + k: v + for (k, v) in {"none": "none", "auto": "auto", "ring": "ring"}.items() + if label_rotation in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_rotation"] = filtered_dict[label_rotation] + self.state["state"]["label_flip"] = label_flip + + list_ticks_label_size = ["1", "1.5", "2", "custom"] + [None] + if ticks_label_size not in list_ticks_label_size: + raise ValueError( + f"`ticks_label_size` must be one of: ['1', '1.5', '2', 'custom']" + ) + elif ticks_label_size in list_ticks_label_size and ticks_label_size is not None: + filtered_dict = { + k: v + for (k, v) in { + "1": "1", + "1.5": "1.5", + "2": "2", + "custom": "custom", + }.items() + if ticks_label_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["ticks_label_size"] = filtered_dict[ + ticks_label_size + ] + self.state["state"]["ticks_label_size_custom"] = ticks_label_size_custom + + list_ticks_label_weight = ["bold", "normal"] + [None] + if ticks_label_weight not in list_ticks_label_weight: + raise ValueError(f"`ticks_label_weight` must be one of: ['bold', 'normal']") + elif ( + ticks_label_weight in list_ticks_label_weight + and ticks_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if ticks_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["ticks_label_weight"] = filtered_dict[ + ticks_label_weight + ] + + list_needle_size = ["0.03", "0.06", "0.09", "custom"] + [None] + if needle_size not in list_needle_size: + raise ValueError( + f"`needle_size` must be one of: ['0.03', '0.06', '0.09', 'custom']" + ) + elif needle_size in list_needle_size and needle_size is not None: + filtered_dict = { + k: v + for (k, v) in { + "0.03": "0.03", + "0.06": "0.06", + "0.09": "0.09", + "custom": "custom", + }.items() + if needle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["needle_size"] = filtered_dict[needle_size] + self.state["state"]["needle_size_custom"] = needle_size_custom + + list_needle_hand_length = ["0.5", "0.75", "1", "custom"] + [None] + if needle_hand_length not in list_needle_hand_length: + raise ValueError( + f"`needle_hand_length` must be one of: ['0.5', '0.75', '1', 'custom']" + ) + elif ( + needle_hand_length in list_needle_hand_length + and needle_hand_length is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "0.75": "0.75", + "1": "1", + "custom": "custom", + }.items() + if needle_hand_length in k + } + if len(filtered_dict) > 0: + self.state["state"]["needle_hand_length"] = filtered_dict[ + needle_hand_length + ] + self.state["state"]["needle_hand_length_custom"] = needle_hand_length_custom + + list_needle_color = ["gauge", "custom"] + [None] + if needle_color not in list_needle_color: + raise ValueError(f"`needle_color` must be one of: ['gauge', 'custom']") + elif needle_color in list_needle_color and needle_color is not None: + filtered_dict = { + k: v + for (k, v) in {"gauge": "gauge", "custom": "custom"}.items() + if needle_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["needle_color"] = filtered_dict[needle_color] + self.state["state"]["needle_color_custom"] = needle_color_custom + + list_needle_centre_size = ["0.5", "1", "1.5", "custom"] + [None] + if needle_centre_size not in list_needle_centre_size: + raise ValueError( + f"`needle_centre_size` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + needle_centre_size in list_needle_centre_size + and needle_centre_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if needle_centre_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["needle_centre_size"] = filtered_dict[ + needle_centre_size + ] + self.state["state"]["needle_centre_size_custom"] = needle_centre_size_custom + self.state["state"]["needle_centre_stroke_width"] = needle_centre_stroke_width + self.state["state"]["needle_centre_stroke"] = needle_centre_stroke + + list_needle_animation = ["disabled", "enabled"] + [None] + if needle_animation not in list_needle_animation: + raise ValueError( + f"`needle_animation` must be one of: ['disabled', 'enabled']" + ) + elif needle_animation in list_needle_animation and needle_animation is not None: + filtered_dict = { + k: v + for (k, v) in {"disabled": "disabled", "enabled": "enabled"}.items() + if needle_animation in k + } + if len(filtered_dict) > 0: + self.state["state"]["needle_animation"] = filtered_dict[ + needle_animation + ] + self.state["state"]["needle_animation_duration"] = needle_animation_duration + + list_jitter = ["none", "low", "medium", "high"] + [None] + if jitter not in list_jitter: + raise ValueError( + f"`jitter` must be one of: ['none', 'low', 'medium', 'high']" + ) + elif jitter in list_jitter and jitter is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "low": "low", + "medium": "medium", + "high": "high", + }.items() + if jitter in k + } + if len(filtered_dict) > 0: + self.state["state"]["jitter"] = filtered_dict[jitter] + self.state["state"]["jitter_speed"] = jitter_speed + + list_gauge_text_align = ["start", "middle", "end"] + [None] + if gauge_text_align not in list_gauge_text_align: + raise ValueError( + f"`gauge_text_align` must be one of: ['start', 'middle', 'end']" + ) + elif gauge_text_align in list_gauge_text_align and gauge_text_align is not None: + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "middle": "middle", + "end": "end", + }.items() + if gauge_text_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_text_align"] = filtered_dict[ + gauge_text_align + ] + + list_gauge_text_position = ["above", "below", "split"] + [None] + if gauge_text_position not in list_gauge_text_position: + raise ValueError( + f"`gauge_text_position` must be one of: ['above', 'below', 'split']" + ) + elif ( + gauge_text_position in list_gauge_text_position + and gauge_text_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "above": "above", + "below": "below", + "split": "split", + }.items() + if gauge_text_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_text_position"] = filtered_dict[ + gauge_text_position + ] + self.state["state"]["gauge_text_position_flip"] = gauge_text_position_flip + + list_gauge_name_size = ["1", "1.5", "2", "custom"] + [None] + if gauge_name_size not in list_gauge_name_size: + raise ValueError( + f"`gauge_name_size` must be one of: ['1', '1.5', '2', 'custom']" + ) + elif gauge_name_size in list_gauge_name_size and gauge_name_size is not None: + filtered_dict = { + k: v + for (k, v) in { + "1": "1", + "1.5": "1.5", + "2": "2", + "custom": "custom", + }.items() + if gauge_name_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_name_size"] = filtered_dict[gauge_name_size] + self.state["state"]["gauge_name_size_custom"] = gauge_name_size_custom + self.state["state"]["gauge_name_styling"] = gauge_name_styling + + list_gauge_name_weight = ["bold", "normal"] + [None] + if gauge_name_weight not in list_gauge_name_weight: + raise ValueError(f"`gauge_name_weight` must be one of: ['bold', 'normal']") + elif ( + gauge_name_weight in list_gauge_name_weight + and gauge_name_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if gauge_name_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_name_weight"] = filtered_dict[ + gauge_name_weight + ] + + list_gauge_name_color = ["gauge", "custom"] + [None] + if gauge_name_color not in list_gauge_name_color: + raise ValueError(f"`gauge_name_color` must be one of: ['gauge', 'custom']") + elif gauge_name_color in list_gauge_name_color and gauge_name_color is not None: + filtered_dict = { + k: v + for (k, v) in {"gauge": "gauge", "custom": "custom"}.items() + if gauge_name_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_name_color"] = filtered_dict[ + gauge_name_color + ] + self.state["state"]["gauge_name_color_custom"] = gauge_name_color_custom + + list_gauge_name_space_above = ["0", "0.5", "1", "custom"] + [None] + if gauge_name_space_above not in list_gauge_name_space_above: + raise ValueError( + f"`gauge_name_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + gauge_name_space_above in list_gauge_name_space_above + and gauge_name_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if gauge_name_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_name_space_above"] = filtered_dict[ + gauge_name_space_above + ] + self.state["state"][ + "gauge_name_space_above_custom" + ] = gauge_name_space_above_custom + + list_gauge_name_space_below = ["0", "0.5", "1", "custom"] + [None] + if gauge_name_space_below not in list_gauge_name_space_below: + raise ValueError( + f"`gauge_name_space_below` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + gauge_name_space_below in list_gauge_name_space_below + and gauge_name_space_below is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if gauge_name_space_below in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_name_space_below"] = filtered_dict[ + gauge_name_space_below + ] + self.state["state"][ + "gauge_name_space_below_custom" + ] = gauge_name_space_below_custom + + list_gauge_value_size = ["1", "1.5", "2", "custom"] + [None] + if gauge_value_size not in list_gauge_value_size: + raise ValueError( + f"`gauge_value_size` must be one of: ['1', '1.5', '2', 'custom']" + ) + elif gauge_value_size in list_gauge_value_size and gauge_value_size is not None: + filtered_dict = { + k: v + for (k, v) in { + "1": "1", + "1.5": "1.5", + "2": "2", + "custom": "custom", + }.items() + if gauge_value_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_value_size"] = filtered_dict[ + gauge_value_size + ] + self.state["state"]["gauge_value_size_custom"] = gauge_value_size_custom + self.state["state"]["gauge_value_styling"] = gauge_value_styling + + list_gauge_value_weight = ["bold", "normal"] + [None] + if gauge_value_weight not in list_gauge_value_weight: + raise ValueError(f"`gauge_value_weight` must be one of: ['bold', 'normal']") + elif ( + gauge_value_weight in list_gauge_value_weight + and gauge_value_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if gauge_value_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_value_weight"] = filtered_dict[ + gauge_value_weight + ] + + list_gauge_value_color = ["gauge", "custom"] + [None] + if gauge_value_color not in list_gauge_value_color: + raise ValueError(f"`gauge_value_color` must be one of: ['gauge', 'custom']") + elif ( + gauge_value_color in list_gauge_value_color + and gauge_value_color is not None + ): + filtered_dict = { + k: v + for (k, v) in {"gauge": "gauge", "custom": "custom"}.items() + if gauge_value_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_value_color"] = filtered_dict[ + gauge_value_color + ] + self.state["state"]["gauge_value_color_custom"] = gauge_value_color_custom + + list_gauge_value_space_above = ["0", "0.5", "1", "custom"] + [None] + if gauge_value_space_above not in list_gauge_value_space_above: + raise ValueError( + f"`gauge_value_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + gauge_value_space_above in list_gauge_value_space_above + and gauge_value_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if gauge_value_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_value_space_above"] = filtered_dict[ + gauge_value_space_above + ] + self.state["state"][ + "gauge_value_space_above_custom" + ] = gauge_value_space_above_custom + + list_gauge_value_space_below = ["0", "0.5", "1", "custom"] + [None] + if gauge_value_space_below not in list_gauge_value_space_below: + raise ValueError( + f"`gauge_value_space_below` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + gauge_value_space_below in list_gauge_value_space_below + and gauge_value_space_below is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if gauge_value_space_below in k + } + if len(filtered_dict) > 0: + self.state["state"]["gauge_value_space_below"] = filtered_dict[ + gauge_value_space_below + ] + self.state["state"][ + "gauge_value_space_below_custom" + ] = gauge_value_space_below_custom + self.state["state"]["formatting"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["formatting"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["formatting"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["formatting"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["formatting"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["formatting"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["formatting"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["formatting"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["formatting"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + + list_chart_filter_controls_container_alignment = ["start", "center", "end"] + [ + None + ] + if ( + chart_filter_controls_container_alignment + not in list_chart_filter_controls_container_alignment + ): + raise ValueError( + f"`chart_filter_controls_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_filter_controls_container_alignment + in list_chart_filter_controls_container_alignment + and chart_filter_controls_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_filter_controls_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_container"]["alignment"] = filtered_dict[ + chart_filter_controls_container_alignment + ] + self.state["state"]["controls_container"][ + "controls_spacing" + ] = chart_filter_controls_container_controls_spacing + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["controls"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["controls"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["controls"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["dropdown_width_mode"] = filtered_dict[ + chart_filter_controls_dropdown_width_mode + ] + self.state["state"]["controls"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["controls"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["controls"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["controls"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["controls"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["controls"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["slider_style"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["slider_style"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["slider_style"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["slider_style"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["slider_style"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["slider_style"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["slider_style"][ + "play_button" + ] = chart_slider_control_style_play_button + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_hierarchy_details( + self, + sort_by: str = None, + aggregation_type: str = None, + num_of_visible_levels: float = None, + auto_set_height: bool = None, + treemap_aspect_ratio_normal: float = None, + treemap_aspect_ratio_narrow: float = None, + responsive_narrow_breakpoint: float = None, + treemap_type: str = None, + treemap_ratio: float = None, + cellPadding: str = None, + sunburst_depth_fade: float = None, + sunburst_labelling: str = None, + sunburst_inner_radius: float = None, + sunburst_show_zoomed_node_in_center: bool = None, + bar_min_bar_thickness: float = None, + bar_max_bar_thickness: float = None, + bar_bar_padding: float = None, + bar_max_value: float = None, + radial_tree_outer_radius: float = None, + radial_tree_bar_length: float = None, + radial_tree_bar_width: float = None, + radial_tree_rotation: float = None, + label_color: str = None, + label_size: float = None, + min_label_size: float = None, + max_label_size: float = None, + label_padding: float = None, + label_case: str = None, + label_weight: str = None, + bar_axis_label_size: float = None, + bar_axis_labels_above: bool = None, + bar_axis_label_space: float = None, + multi_line_labels: bool = None, + show_value_labels: bool = None, + bar_value_label_space: float = None, + value_label_bold: bool = None, + value_label_relative_size: float = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + stroke_color: str = None, + axis_label_color: str = None, + radial_tree_colored_links: bool = None, + radial_tree_link_color: str = None, + legend_mode: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + legend_position: str = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + popup_active_levels: str = None, + filter_control_visibility: str = None, + filter_include_all: bool = None, + filter_all_label: str = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + size_by_control_visibility: str = None, + chart_size_filter_controls_control_type: str = None, + chart_size_filter_controls_control_styles: bool = None, + chart_size_filter_controls_control_title: str = None, + chart_size_filter_controls_button_group: bool = None, + chart_size_filter_controls_button_group_width_mode: str = None, + chart_size_filter_controls_button_group_width_fixed: float = None, + chart_size_filter_controls_dropdown_width_mode: str = None, + chart_size_filter_controls_dropdown_width_fixed: float = None, + chart_size_filter_controls_slider_width: float = None, + chart_size_filter_controls_slider_max_label_width: float = None, + chart_size_filter_controls_slider_step_time: float = None, + chart_size_filter_controls_slider_loop: bool = None, + chart_size_filter_controls_slider_restart_pause: float = None, + chart_size_filter_controls_sort: bool = None, + ascend_button_visibility: str = None, + zoom_out_button_color: str = None, + zoom_out_arrow_color: str = None, + chart_filter_controls_container_alignment: str = None, + chart_filter_controls_container_controls_spacing: float = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + animation_duration: float = None, + size_by_number_formatter_prefix: str = None, + size_by_number_formatter_suffix: str = None, + size_by_number_formatter_n_dec: float = None, + size_by_number_formatter_advanced: bool = None, + size_by_number_formatter_negative_sign: str = None, + size_by_number_formatter_strip_zeros: bool = None, + size_by_number_formatter_strip_separator: bool = None, + size_by_number_formatter_transform_labels: bool = None, + size_by_number_formatter_transform: str = None, + size_by_number_formatter_multiply_divide_constant: float = None, + size_by_number_formatter_exponentiate_constant: float = None, + filter_number_formatter_prefix: str = None, + filter_number_formatter_suffix: str = None, + filter_number_formatter_n_dec: float = None, + filter_number_formatter_advanced: bool = None, + filter_number_formatter_negative_sign: str = None, + filter_number_formatter_strip_zeros: bool = None, + filter_number_formatter_strip_separator: bool = None, + filter_number_formatter_transform_labels: bool = None, + filter_number_formatter_transform: str = None, + filter_number_formatter_multiply_divide_constant: float = None, + filter_number_formatter_exponentiate_constant: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + chart_url_settings_enabled: bool = None, + chart_url_settings_whitelist: Union[list, str] = None, + ): + """ + Set chart details for: hierarchy. + + + :param sort_by: Sort by. Choices: data, value, name. Sort cells by value or by name. (In the Circles layout, the circles are placed in the specified order following an approximately spiral path.). Flourish type hint: string, defaults to None. + :type sort_by: str, optional + :param aggregation_type: Size cells by. Choices: sum, count. Flourish type hint: string, defaults to None. + :type aggregation_type: str, optional + :param num_of_visible_levels: Depth. How many hierarchy levels are visible at once. Flourish type hint: number, defaults to None. + :type num_of_visible_levels: float, optional + :param auto_set_height: Automatic height. Choices: True, False. Whether responsive embeds can adjust their height automatically. Ignored in simple Iframe embeds, Canva and other fixed-height contexts. Flourish type hint: boolean, defaults to None. + :type auto_set_height: bool, optional + :param treemap_aspect_ratio_normal: Aspect (desktop). Height of treemap, as % of width. Flourish type hint: number, defaults to None. + :type treemap_aspect_ratio_normal: float, optional + :param treemap_aspect_ratio_narrow: Aspect (mobile). Height of treemap, as % of width. Flourish type hint: number, defaults to None. + :type treemap_aspect_ratio_narrow: float, optional + :param responsive_narrow_breakpoint: Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to None. + :type responsive_narrow_breakpoint: float, optional + :param treemap_type: Tile layout. Choices: treemap_binary, treemap_resquarify, treemap_slice, treemap_dice, treemap_slice_dice. Flourish type hint: string, defaults to None. + :type treemap_type: str, optional + :param treemap_ratio: Target. The target ratio between width and height, where 1 is sqaure and a large number is a tall or wide rectangle. Flourish type hint: number, defaults to None. + :type treemap_ratio: float, optional + :param cellPadding: Padding. Choices: low, medium, high. Flourish type hint: string, defaults to None. + :type cellPadding: str, optional + :param sunburst_depth_fade: Fade. How quickly the segments fade with hierachical depth. (Use 1 for no fade.). Flourish type hint: number, defaults to None. + :type sunburst_depth_fade: float, optional + :param sunburst_labelling: Orientation. Choices: auto, radial, circular. How the labels should be oriented. Flourish type hint: string, defaults to None. + :type sunburst_labelling: str, optional + :param sunburst_inner_radius: Hole size. As a % of overall radius. Flourish type hint: number, defaults to None. + :type sunburst_inner_radius: float, optional + :param sunburst_show_zoomed_node_in_center: Show zoomed node in center. Show zoomed node as a circle in the center of the sunburst chart. (If not zoomed, the space is left blank.). Flourish type hint: boolean, defaults to None. + :type sunburst_show_zoomed_node_in_center: bool, optional + :param bar_min_bar_thickness: Height. Minimum bar thickness in pixels. This also determines bar thickness if Automatic height is selected and container height isnt fixed. Flourish type hint: number, defaults to None. + :type bar_min_bar_thickness: float, optional + :param bar_max_bar_thickness: Max height. Maximum bar thickness in pixels. Applies when Automatic height is false. Flourish type hint: number, defaults to None. + :type bar_max_bar_thickness: float, optional + :param bar_bar_padding: Spacing. Distance between bars in pixels. Flourish type hint: number, defaults to None. + :type bar_bar_padding: float, optional + :param bar_max_value: Max value. The maximum value represented by bar length (leave blank for auto-scaling). Flourish type hint: number, defaults to None. + :type bar_max_value: float, optional + :param radial_tree_outer_radius: Outer radius (%). Radius of outer nodes (as a percent of the container size). Flourish type hint: number, defaults to None. + :type radial_tree_outer_radius: float, optional + :param radial_tree_bar_length: Bar length (%). Bar length (as a percent of the container size). Flourish type hint: number, defaults to None. + :type radial_tree_bar_length: float, optional + :param radial_tree_bar_width: Bar width (pixels). Bar width in pixels. Flourish type hint: number, defaults to None. + :type radial_tree_bar_width: float, optional + :param radial_tree_rotation: Rotation (degrees). Rotates the whole tree. Flourish type hint: number, defaults to None. + :type radial_tree_rotation: float, optional + :param label_color: Color. Flourish type hint: color, defaults to None. + :type label_color: str, optional + :param label_size: Label size. Label size in rems Flourish type hint: number, defaults to None. + :type label_size: float, optional + :param min_label_size: Min size. Minimum label size, in rems Flourish type hint: number, defaults to None. + :type min_label_size: float, optional + :param max_label_size: Max size. Max label size, in rems Flourish type hint: number, defaults to None. + :type max_label_size: float, optional + :param label_padding: Padding. Padding between label and border, in rems Flourish type hint: number, defaults to None. + :type label_padding: float, optional + :param label_case: Label case. Choices: all_upper_case, all_lower_case, top_upper_case, bottom_upper_case. Determines whether labels are lower or upper case. Items at the top level of the hierarchy can have a different case to the remaining items. Flourish type hint: string, defaults to None. + :type label_case: str, optional + :param label_weight: Label weight. Choices: all_normal, all_bold, top_bold, bottom_bold. Determines the font weight (normal or bold) of labels. Items at the top level of the hierarchy can have a different weight to the remaining items. Flourish type hint: string, defaults to None. + :type label_weight: str, optional + :param bar_axis_label_size: Label size. Axis label size, in rems Flourish type hint: number, defaults to None. + :type bar_axis_label_size: float, optional + :param bar_axis_labels_above: Position. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type bar_axis_labels_above: bool, optional + :param bar_axis_label_space: Width. Space available for axis labels, in rems Flourish type hint: number, defaults to None. + :type bar_axis_label_space: float, optional + :param multi_line_labels: Wrap long labels. Display long labels across multiple lines where possible. Currently supported in treemap and circle packing. Flourish type hint: boolean, defaults to None. + :type multi_line_labels: bool, optional + :param show_value_labels: Show values. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type show_value_labels: bool, optional + :param bar_value_label_space: Space. Space available for value labels, in rems Flourish type hint: number, defaults to None. + :type bar_value_label_space: float, optional + :param value_label_bold: Bold. Flourish type hint: boolean, defaults to None. + :type value_label_bold: bool, optional + :param value_label_relative_size: Relative size. The size of the value label relative to the name label. Flourish type hint: number, defaults to None. + :type value_label_relative_size: float, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param stroke_color: Stroke color. Flourish type hint: color, defaults to None. + :type stroke_color: str, optional + :param axis_label_color: Axis color. Flourish type hint: color, defaults to None. + :type axis_label_color: str, optional + :param radial_tree_colored_links: Colored links. Use colored links. Flourish type hint: boolean, defaults to None. + :type radial_tree_colored_links: bool, optional + :param radial_tree_link_color: Radial tree link color. Flourish type hint: color, defaults to None. + :type radial_tree_link_color: str, optional + :param legend_mode: Legend mode. Choices: on, off. Flourish type hint: string, defaults to None. + :type legend_mode: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param legend_position: Legend position. Choices: above, below. Flourish type hint: string, defaults to None. + :type legend_position: str, optional + :param chart_popup_mode: Choices: none, popup, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. You can also use `{{NAME}}` to include the name of the current item, `{{VALUE}}` to include the value of the current item and `{{SIZEBY}}` to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}`. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. You can also use `{{NAME}}` to include the name of the current item, `{{VALUE}}` to include the value of the current item and `{{SIZEBY}}` to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}`. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. The text to appear in the panel. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the panel. You can also use `{{NAME}}` to include the name of the current item, `{{VALUE}}` to include the value of the current item and `{{SIZEBY}}` to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}`. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. The text to appear in the panel. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the panel. You can also use `{{NAME}}` to include the name of the current item, `{{VALUE}}` to include the value of the current item and `{{SIZEBY}}` to include the name of the column chosen to size items. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}`. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param popup_active_levels: When to show popup or panel. Choices: all_levels, top_level, below_top_level, above_bottom_level, bottom_level. Specify which hierarchy levels popup is active on. Flourish type hint: string, defaults to None. + :type popup_active_levels: str, optional + :param filter_control_visibility: Visibility. Choices: always, editor, never. Sets whether the Filter is always visible, only visible when editing or never visible. Flourish type hint: string, defaults to None. + :type filter_control_visibility: str, optional + :param filter_include_all: Include "All" in filter. Flourish type hint: boolean, defaults to None. + :type filter_include_all: bool, optional + :param filter_all_label: Filter All label. Flourish type hint: string, defaults to None. + :type filter_all_label: str, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param size_by_control_visibility: Visibility. Choices: always, editor, never. Sets whether the Size by control is always visible, only visible when editing or never visible. Flourish type hint: string, defaults to None. + :type size_by_control_visibility: str, optional + :param chart_size_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_size_filter_controls_control_type: str, optional + :param chart_size_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_size_filter_controls_control_styles: bool, optional + :param chart_size_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_size_filter_controls_control_title: str, optional + :param chart_size_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_size_filter_controls_button_group: bool, optional + :param chart_size_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_size_filter_controls_button_group_width_mode: str, optional + :param chart_size_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_size_filter_controls_button_group_width_fixed: float, optional + :param chart_size_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_size_filter_controls_dropdown_width_mode: str, optional + :param chart_size_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_size_filter_controls_dropdown_width_fixed: float, optional + :param chart_size_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_size_filter_controls_slider_width: float, optional + :param chart_size_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_size_filter_controls_slider_max_label_width: float, optional + :param chart_size_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_size_filter_controls_slider_step_time: float, optional + :param chart_size_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_size_filter_controls_slider_loop: bool, optional + :param chart_size_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_size_filter_controls_slider_restart_pause: float, optional + :param chart_size_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_size_filter_controls_sort: bool, optional + :param ascend_button_visibility: Visibility. Choices: always, editor, never. Flourish type hint: string, defaults to None. + :type ascend_button_visibility: str, optional + :param zoom_out_button_color: Button. Flourish type hint: color, defaults to None. + :type zoom_out_button_color: str, optional + :param zoom_out_arrow_color: Arrow. Flourish type hint: color, defaults to None. + :type zoom_out_arrow_color: str, optional + :param chart_filter_controls_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_filter_controls_container_alignment: str, optional + :param chart_filter_controls_container_controls_spacing: Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to None. + :type chart_filter_controls_container_controls_spacing: float, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param animation_duration: Duration. The duration, in seconds, of transitions for example, between two slides in a storyFlourish type hint: number, defaults to None. + :type animation_duration: float, optional + :param size_by_number_formatter_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type size_by_number_formatter_prefix: str, optional + :param size_by_number_formatter_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type size_by_number_formatter_suffix: str, optional + :param size_by_number_formatter_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type size_by_number_formatter_n_dec: float, optional + :param size_by_number_formatter_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type size_by_number_formatter_advanced: bool, optional + :param size_by_number_formatter_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type size_by_number_formatter_negative_sign: str, optional + :param size_by_number_formatter_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type size_by_number_formatter_strip_zeros: bool, optional + :param size_by_number_formatter_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type size_by_number_formatter_strip_separator: bool, optional + :param size_by_number_formatter_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type size_by_number_formatter_transform_labels: bool, optional + :param size_by_number_formatter_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type size_by_number_formatter_transform: str, optional + :param size_by_number_formatter_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type size_by_number_formatter_multiply_divide_constant: float, optional + :param size_by_number_formatter_exponentiate_constant: Flourish type hint: number, defaults to None. + :type size_by_number_formatter_exponentiate_constant: float, optional + :param filter_number_formatter_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type filter_number_formatter_prefix: str, optional + :param filter_number_formatter_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type filter_number_formatter_suffix: str, optional + :param filter_number_formatter_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type filter_number_formatter_n_dec: float, optional + :param filter_number_formatter_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type filter_number_formatter_advanced: bool, optional + :param filter_number_formatter_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type filter_number_formatter_negative_sign: str, optional + :param filter_number_formatter_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type filter_number_formatter_strip_zeros: bool, optional + :param filter_number_formatter_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type filter_number_formatter_strip_separator: bool, optional + :param filter_number_formatter_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type filter_number_formatter_transform_labels: bool, optional + :param filter_number_formatter_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type filter_number_formatter_transform: str, optional + :param filter_number_formatter_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type filter_number_formatter_multiply_divide_constant: float, optional + :param filter_number_formatter_exponentiate_constant: Flourish type hint: number, defaults to None. + :type filter_number_formatter_exponentiate_constant: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + :param chart_url_settings_enabled: Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to None. + :type chart_url_settings_enabled: bool, optional + :param chart_url_settings_whitelist: Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to None. + :type chart_url_settings_whitelist: Union[list, str], optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "legend_container": {}, + "legend_categorical": {}, + "popup": {}, + "filter_control": {}, + "size_by_control": {}, + "controls_container": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "slider_style": {}, + "size_by_number_formatter": {}, + "filter_number_formatter": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + "url_state": {}, + } + } + + list_sort_by = ["data", "value", "name"] + [None] + if sort_by not in list_sort_by: + raise ValueError(f"`sort_by` must be one of: ['data', 'value', 'name']") + elif sort_by in list_sort_by and sort_by is not None: + filtered_dict = { + k: v + for (k, v) in {"data": "data", "value": "value", "name": "name"}.items() + if sort_by in k + } + if len(filtered_dict) > 0: + self.state["state"]["sort_by"] = filtered_dict[sort_by] + + list_aggregation_type = ["sum", "count"] + [None] + if aggregation_type not in list_aggregation_type: + raise ValueError(f"`aggregation_type` must be one of: ['sum', 'count']") + elif aggregation_type in list_aggregation_type and aggregation_type is not None: + filtered_dict = { + k: v + for (k, v) in {"sum": "Sum", "count": "Count"}.items() + if aggregation_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["aggregation_type"] = filtered_dict[ + aggregation_type + ] + self.state["state"]["num_of_visible_levels"] = num_of_visible_levels + + list_auto_set_height = [True, False] + [None] + if auto_set_height not in list_auto_set_height: + raise ValueError(f"`auto_set_height` must be one of: [True, False]") + elif auto_set_height in list_auto_set_height and auto_set_height is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if auto_set_height in k + } + if len(filtered_dict) > 0: + self.state["state"]["auto_set_height"] = filtered_dict[auto_set_height] + self.state["state"]["treemap_aspect_ratio_normal"] = treemap_aspect_ratio_normal + self.state["state"]["treemap_aspect_ratio_narrow"] = treemap_aspect_ratio_narrow + self.state["state"][ + "responsive_narrow_breakpoint" + ] = responsive_narrow_breakpoint + + list_treemap_type = [ + "treemap_binary", + "treemap_resquarify", + "treemap_slice", + "treemap_dice", + "treemap_slice_dice", + ] + [None] + if treemap_type not in list_treemap_type: + raise ValueError( + f"`treemap_type` must be one of: ['treemap_binary', 'treemap_resquarify', 'treemap_slice', 'treemap_dice', 'treemap_slice_dice']" + ) + elif treemap_type in list_treemap_type and treemap_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "treemap_binary": "treemapBinary", + "treemap_resquarify": "treemapResquarify", + "treemap_slice": "treemapSlice", + "treemap_dice": "treemapDice", + "treemap_slice_dice": "treemapSliceDice", + }.items() + if treemap_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["treemap_type"] = filtered_dict[treemap_type] + self.state["state"]["treemap_ratio"] = treemap_ratio + + list_cellPadding = ["low", "medium", "high"] + [None] + if cellPadding not in list_cellPadding: + raise ValueError(f"`cellPadding` must be one of: ['low', 'medium', 'high']") + elif cellPadding in list_cellPadding and cellPadding is not None: + filtered_dict = { + k: v + for (k, v) in {"low": "low", "medium": "medium", "high": "high"}.items() + if cellPadding in k + } + if len(filtered_dict) > 0: + self.state["state"]["cellPadding"] = filtered_dict[cellPadding] + self.state["state"]["sunburst_depth_fade"] = sunburst_depth_fade + + list_sunburst_labelling = ["auto", "radial", "circular"] + [None] + if sunburst_labelling not in list_sunburst_labelling: + raise ValueError( + f"`sunburst_labelling` must be one of: ['auto', 'radial', 'circular']" + ) + elif ( + sunburst_labelling in list_sunburst_labelling + and sunburst_labelling is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "radial": "radial", + "circular": "circular", + }.items() + if sunburst_labelling in k + } + if len(filtered_dict) > 0: + self.state["state"]["sunburst_labelling"] = filtered_dict[ + sunburst_labelling + ] + self.state["state"]["sunburst_inner_radius"] = sunburst_inner_radius + self.state["state"][ + "sunburst_show_zoomed_node_in_center" + ] = sunburst_show_zoomed_node_in_center + self.state["state"]["bar_min_bar_thickness"] = bar_min_bar_thickness + self.state["state"]["bar_max_bar_thickness"] = bar_max_bar_thickness + self.state["state"]["bar_bar_padding"] = bar_bar_padding + self.state["state"]["bar_max_value"] = bar_max_value + self.state["state"]["radial_tree_outer_radius"] = radial_tree_outer_radius + self.state["state"]["radial_tree_bar_length"] = radial_tree_bar_length + self.state["state"]["radial_tree_bar_width"] = radial_tree_bar_width + self.state["state"]["radial_tree_rotation"] = radial_tree_rotation + self.state["state"]["label_color"] = label_color + self.state["state"]["label_size"] = label_size + self.state["state"]["min_label_size"] = min_label_size + self.state["state"]["max_label_size"] = max_label_size + self.state["state"]["label_padding"] = label_padding + + list_label_case = [ + "all_upper_case", + "all_lower_case", + "top_upper_case", + "bottom_upper_case", + ] + [None] + if label_case not in list_label_case: + raise ValueError( + f"`label_case` must be one of: ['all_upper_case', 'all_lower_case', 'top_upper_case', 'bottom_upper_case']" + ) + elif label_case in list_label_case and label_case is not None: + filtered_dict = { + k: v + for (k, v) in { + "all_upper_case": "allUpperCase", + "all_lower_case": "allLowerCase", + "top_upper_case": "topUpperCase", + "bottom_upper_case": "bottomUpperCase", + }.items() + if label_case in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_case"] = filtered_dict[label_case] + + list_label_weight = ["all_normal", "all_bold", "top_bold", "bottom_bold"] + [ + None + ] + if label_weight not in list_label_weight: + raise ValueError( + f"`label_weight` must be one of: ['all_normal', 'all_bold', 'top_bold', 'bottom_bold']" + ) + elif label_weight in list_label_weight and label_weight is not None: + filtered_dict = { + k: v + for (k, v) in { + "all_normal": "allNormal", + "all_bold": "allBold", + "top_bold": "topBold", + "bottom_bold": "bottomBold", + }.items() + if label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_weight"] = filtered_dict[label_weight] + self.state["state"]["bar_axis_label_size"] = bar_axis_label_size + + list_bar_axis_labels_above = [False, True] + [None] + if bar_axis_labels_above not in list_bar_axis_labels_above: + raise ValueError(f"`bar_axis_labels_above` must be one of: [False, True]") + elif ( + bar_axis_labels_above in list_bar_axis_labels_above + and bar_axis_labels_above is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if bar_axis_labels_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["bar_axis_labels_above"] = filtered_dict[ + bar_axis_labels_above + ] + self.state["state"]["bar_axis_label_space"] = bar_axis_label_space + self.state["state"]["multi_line_labels"] = multi_line_labels + + list_show_value_labels = [True, False] + [None] + if show_value_labels not in list_show_value_labels: + raise ValueError(f"`show_value_labels` must be one of: [True, False]") + elif ( + show_value_labels in list_show_value_labels + and show_value_labels is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if show_value_labels in k + } + if len(filtered_dict) > 0: + self.state["state"]["show_value_labels"] = filtered_dict[ + show_value_labels + ] + self.state["state"]["bar_value_label_space"] = bar_value_label_space + self.state["state"]["value_label_bold"] = value_label_bold + self.state["state"]["value_label_relative_size"] = value_label_relative_size + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["stroke_color"] = stroke_color + self.state["state"]["axis_label_color"] = axis_label_color + self.state["state"]["radial_tree_colored_links"] = radial_tree_colored_links + self.state["state"]["radial_tree_link_color"] = radial_tree_link_color + + list_legend_mode = ["on", "off"] + [None] + if legend_mode not in list_legend_mode: + raise ValueError(f"`legend_mode` must be one of: ['on', 'off']") + elif legend_mode in list_legend_mode and legend_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"on": "on", "off": "off"}.items() + if legend_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_mode"] = filtered_dict[legend_mode] + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_legend_position = ["above", "below"] + [None] + if legend_position not in list_legend_position: + raise ValueError(f"`legend_position` must be one of: ['above', 'below']") + elif legend_position in list_legend_position and legend_position is not None: + filtered_dict = { + k: v + for (k, v) in {"above": "above", "below": "below"}.items() + if legend_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_position"] = filtered_dict[legend_position] + + list_chart_popup_mode = ["none", "popup", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"none": "none", "popup": "popup", "both": "both"}.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + + list_popup_active_levels = [ + "all_levels", + "top_level", + "below_top_level", + "above_bottom_level", + "bottom_level", + ] + [None] + if popup_active_levels not in list_popup_active_levels: + raise ValueError( + f"`popup_active_levels` must be one of: ['all_levels', 'top_level', 'below_top_level', 'above_bottom_level', 'bottom_level']" + ) + elif ( + popup_active_levels in list_popup_active_levels + and popup_active_levels is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "all_levels": "all_levels", + "top_level": "top_level", + "below_top_level": "below_top_level", + "above_bottom_level": "above_bottom_level", + "bottom_level": "bottom_level", + }.items() + if popup_active_levels in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup_active_levels"] = filtered_dict[ + popup_active_levels + ] + + list_filter_control_visibility = ["always", "editor", "never"] + [None] + if filter_control_visibility not in list_filter_control_visibility: + raise ValueError( + f"`filter_control_visibility` must be one of: ['always', 'editor', 'never']" + ) + elif ( + filter_control_visibility in list_filter_control_visibility + and filter_control_visibility is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "always": "always", + "editor": "editor", + "never": "never", + }.items() + if filter_control_visibility in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control_visibility"] = filtered_dict[ + filter_control_visibility + ] + self.state["state"]["filter_include_all"] = filter_include_all + self.state["state"]["filter_all_label"] = filter_all_label + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["filter_control"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["filter_control"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["filter_control"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_filter_controls_dropdown_width_mode] + self.state["state"]["filter_control"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["filter_control"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["filter_control"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["filter_control"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["filter_control"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["filter_control"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + + list_size_by_control_visibility = ["always", "editor", "never"] + [None] + if size_by_control_visibility not in list_size_by_control_visibility: + raise ValueError( + f"`size_by_control_visibility` must be one of: ['always', 'editor', 'never']" + ) + elif ( + size_by_control_visibility in list_size_by_control_visibility + and size_by_control_visibility is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "always": "always", + "editor": "editor", + "never": "never", + }.items() + if size_by_control_visibility in k + } + if len(filtered_dict) > 0: + self.state["state"]["size_by_control_visibility"] = filtered_dict[ + size_by_control_visibility + ] + + list_chart_size_filter_controls_control_type = [ + "dropdown", + "buttons", + "slider", + ] + [None] + if ( + chart_size_filter_controls_control_type + not in list_chart_size_filter_controls_control_type + ): + raise ValueError( + f"`chart_size_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_size_filter_controls_control_type + in list_chart_size_filter_controls_control_type + and chart_size_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_size_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["size_by_control"]["control_type"] = filtered_dict[ + chart_size_filter_controls_control_type + ] + self.state["state"]["size_by_control"][ + "control_styles" + ] = chart_size_filter_controls_control_styles + self.state["state"]["size_by_control"][ + "control_title" + ] = chart_size_filter_controls_control_title + + list_chart_size_filter_controls_button_group = [True, False] + [None] + if ( + chart_size_filter_controls_button_group + not in list_chart_size_filter_controls_button_group + ): + raise ValueError( + f"`chart_size_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_size_filter_controls_button_group + in list_chart_size_filter_controls_button_group + and chart_size_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_size_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["size_by_control"]["button_group"] = filtered_dict[ + chart_size_filter_controls_button_group + ] + + list_chart_size_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_size_filter_controls_button_group_width_mode + not in list_chart_size_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_size_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_size_filter_controls_button_group_width_mode + in list_chart_size_filter_controls_button_group_width_mode + and chart_size_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_size_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["size_by_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_size_filter_controls_button_group_width_mode] + self.state["state"]["size_by_control"][ + "button_group_width_fixed" + ] = chart_size_filter_controls_button_group_width_fixed + + list_chart_size_filter_controls_dropdown_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_size_filter_controls_dropdown_width_mode + not in list_chart_size_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_size_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_size_filter_controls_dropdown_width_mode + in list_chart_size_filter_controls_dropdown_width_mode + and chart_size_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_size_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["size_by_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_size_filter_controls_dropdown_width_mode] + self.state["state"]["size_by_control"][ + "dropdown_width_fixed" + ] = chart_size_filter_controls_dropdown_width_fixed + self.state["state"]["size_by_control"][ + "slider_width" + ] = chart_size_filter_controls_slider_width + self.state["state"]["size_by_control"][ + "slider_max_label_width" + ] = chart_size_filter_controls_slider_max_label_width + self.state["state"]["size_by_control"][ + "slider_step_time" + ] = chart_size_filter_controls_slider_step_time + self.state["state"]["size_by_control"][ + "slider_loop" + ] = chart_size_filter_controls_slider_loop + self.state["state"]["size_by_control"][ + "slider_restart_pause" + ] = chart_size_filter_controls_slider_restart_pause + + list_chart_size_filter_controls_sort = [True, False] + [None] + if chart_size_filter_controls_sort not in list_chart_size_filter_controls_sort: + raise ValueError( + f"`chart_size_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_size_filter_controls_sort in list_chart_size_filter_controls_sort + and chart_size_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_size_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["size_by_control"]["sort"] = filtered_dict[ + chart_size_filter_controls_sort + ] + + list_ascend_button_visibility = ["always", "editor", "never"] + [None] + if ascend_button_visibility not in list_ascend_button_visibility: + raise ValueError( + f"`ascend_button_visibility` must be one of: ['always', 'editor', 'never']" + ) + elif ( + ascend_button_visibility in list_ascend_button_visibility + and ascend_button_visibility is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "always": "always", + "editor": "editor", + "never": "never", + }.items() + if ascend_button_visibility in k + } + if len(filtered_dict) > 0: + self.state["state"]["ascend_button_visibility"] = filtered_dict[ + ascend_button_visibility + ] + self.state["state"]["zoom_out_button_color"] = zoom_out_button_color + self.state["state"]["zoom_out_arrow_color"] = zoom_out_arrow_color + + list_chart_filter_controls_container_alignment = ["start", "center", "end"] + [ + None + ] + if ( + chart_filter_controls_container_alignment + not in list_chart_filter_controls_container_alignment + ): + raise ValueError( + f"`chart_filter_controls_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_filter_controls_container_alignment + in list_chart_filter_controls_container_alignment + and chart_filter_controls_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_filter_controls_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_container"]["alignment"] = filtered_dict[ + chart_filter_controls_container_alignment + ] + self.state["state"]["controls_container"][ + "controls_spacing" + ] = chart_filter_controls_container_controls_spacing + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["slider_style"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["slider_style"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["slider_style"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["slider_style"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["slider_style"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["slider_style"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["slider_style"][ + "play_button" + ] = chart_slider_control_style_play_button + self.state["state"]["animation_duration"] = animation_duration + self.state["state"]["size_by_number_formatter"][ + "prefix" + ] = size_by_number_formatter_prefix + self.state["state"]["size_by_number_formatter"][ + "suffix" + ] = size_by_number_formatter_suffix + self.state["state"]["size_by_number_formatter"][ + "n_dec" + ] = size_by_number_formatter_n_dec + self.state["state"]["size_by_number_formatter"][ + "advanced" + ] = size_by_number_formatter_advanced + + list_size_by_number_formatter_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + size_by_number_formatter_negative_sign + not in list_size_by_number_formatter_negative_sign + ): + raise ValueError( + f"`size_by_number_formatter_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + size_by_number_formatter_negative_sign + in list_size_by_number_formatter_negative_sign + and size_by_number_formatter_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if size_by_number_formatter_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["size_by_number_formatter"][ + "negative_sign" + ] = filtered_dict[size_by_number_formatter_negative_sign] + self.state["state"]["size_by_number_formatter"][ + "strip_zeros" + ] = size_by_number_formatter_strip_zeros + self.state["state"]["size_by_number_formatter"][ + "strip_separator" + ] = size_by_number_formatter_strip_separator + self.state["state"]["size_by_number_formatter"][ + "transform_labels" + ] = size_by_number_formatter_transform_labels + + list_size_by_number_formatter_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + size_by_number_formatter_transform + not in list_size_by_number_formatter_transform + ): + raise ValueError( + f"`size_by_number_formatter_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + size_by_number_formatter_transform + in list_size_by_number_formatter_transform + and size_by_number_formatter_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if size_by_number_formatter_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["size_by_number_formatter"][ + "transform" + ] = filtered_dict[size_by_number_formatter_transform] + self.state["state"]["size_by_number_formatter"][ + "multiply_divide_constant" + ] = size_by_number_formatter_multiply_divide_constant + self.state["state"]["size_by_number_formatter"][ + "exponentiate_constant" + ] = size_by_number_formatter_exponentiate_constant + self.state["state"]["filter_number_formatter"][ + "prefix" + ] = filter_number_formatter_prefix + self.state["state"]["filter_number_formatter"][ + "suffix" + ] = filter_number_formatter_suffix + self.state["state"]["filter_number_formatter"][ + "n_dec" + ] = filter_number_formatter_n_dec + self.state["state"]["filter_number_formatter"][ + "advanced" + ] = filter_number_formatter_advanced + + list_filter_number_formatter_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + filter_number_formatter_negative_sign + not in list_filter_number_formatter_negative_sign + ): + raise ValueError( + f"`filter_number_formatter_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + filter_number_formatter_negative_sign + in list_filter_number_formatter_negative_sign + and filter_number_formatter_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if filter_number_formatter_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_number_formatter"][ + "negative_sign" + ] = filtered_dict[filter_number_formatter_negative_sign] + self.state["state"]["filter_number_formatter"][ + "strip_zeros" + ] = filter_number_formatter_strip_zeros + self.state["state"]["filter_number_formatter"][ + "strip_separator" + ] = filter_number_formatter_strip_separator + self.state["state"]["filter_number_formatter"][ + "transform_labels" + ] = filter_number_formatter_transform_labels + + list_filter_number_formatter_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + filter_number_formatter_transform + not in list_filter_number_formatter_transform + ): + raise ValueError( + f"`filter_number_formatter_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + filter_number_formatter_transform in list_filter_number_formatter_transform + and filter_number_formatter_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if filter_number_formatter_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_number_formatter"][ + "transform" + ] = filtered_dict[filter_number_formatter_transform] + self.state["state"]["filter_number_formatter"][ + "multiply_divide_constant" + ] = filter_number_formatter_multiply_divide_constant + self.state["state"]["filter_number_formatter"][ + "exponentiate_constant" + ] = filter_number_formatter_exponentiate_constant + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + self.state["state"]["url_state"]["enabled"] = chart_url_settings_enabled + + if ( + chart_url_settings_whitelist is not None + and len(chart_url_settings_whitelist) > 1 + and isinstance(chart_url_settings_whitelist, list) + ): + self.state["state"]["url_state"]["whitelist"] = " \n ".join( + chart_url_settings_whitelist + ) + else: + self.state["state"]["url_state"]["whitelist"] = chart_url_settings_whitelist + + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_horserace_details( + self, + play_mode: str = None, + zoom_steps_to_show: float = None, + value_type: str = None, + higher_scores_win: bool = None, + ties_mode: str = None, + height_mode: str = None, + padding_top: float = None, + padding_right: float = None, + padding_bottom: float = None, + padding_left: float = None, + show_buttons: bool = None, + show_replay: bool = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_background_color: str = None, + chart_filter_controls_slider_font_color: str = None, + chart_filter_controls_slider_handle_color: str = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_margin: float = None, + chart_filter_controls_slider_handle_height: float = None, + chart_filter_controls_slider_track_height: float = None, + chart_filter_controls_slider_play_button: bool = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + filter_include_all: bool = None, + label_ranks: str = None, + label_scores: str = None, + label_replay: str = None, + filter_all_label: str = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + color_mode: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + color_single: str = None, + color_single_overrides: Union[list, str] = None, + line_width: float = None, + line_opacity: float = None, + curve: str = None, + shade: bool = None, + shade_width: float = None, + shade_opacity: float = None, + missing: bool = None, + missing_opacity: float = None, + missing_width: float = None, + missing_stroke_dash: float = None, + start_circle_r: float = None, + end_circle_r: float = None, + end_circle_stroke: float = None, + circle_space_between: float = None, + end_circle_stroke_bg: bool = None, + horse_images: bool = None, + show_labels: str = None, + animate_scores: bool = None, + rank_outside_picture: bool = None, + label_divider: str = None, + rank_inside_color: str = None, + chart_labels_max_width: float = None, + chart_labels_overlap_mode: str = None, + chart_labels_spreading_margin: float = None, + chart_labels_data_point_margin: float = None, + chart_labels_show_only_labels: Union[list, str] = None, + chart_labels_text_color: str = None, + chart_labels_text_size: float = None, + chart_labels_text_bg_color: str = None, + chart_labels_text_bg_size: float = None, + chart_labels_text_line_height: float = None, + chart_labels_text_max_lines: float = None, + chart_labels_text_weight: str = None, + chart_labels_lines: str = None, + chart_labels_line_style: str = None, + chart_labels_line_color: str = None, + chart_labels_line_width: float = None, + chart_labels_line_range: float = None, + chart_labels_line_padding: float = None, + chart_x_axis_axis_position: str = None, + chart_x_axis_y_axis_position: str = None, + chart_x_axis_numeric_scale_type: str = None, + chart_x_axis_linear_min: float = None, + chart_x_axis_linear_max: float = None, + chart_x_axis_log_min: float = None, + chart_x_axis_log_max: float = None, + chart_x_axis_datetime_min: str = None, + chart_x_axis_datetime_max: str = None, + chart_x_axis_flip: bool = None, + chart_x_axis_show_scale_settings: bool = None, + chart_x_axis_nice: bool = None, + chart_x_axis_zero_axis: str = None, + chart_x_axis_title_mode: str = None, + chart_x_axis_title: str = None, + chart_x_axis_title_styling: bool = None, + chart_x_axis_title_weight: str = None, + chart_x_axis_title_color: str = None, + chart_x_axis_title_size: float = None, + chart_x_axis_title_padding: float = None, + chart_x_axis_tick_label_position: str = None, + chart_x_axis_tick_label_styling: bool = None, + chart_x_axis_tick_label_size: float = None, + chart_x_axis_tick_label_color: str = None, + chart_x_axis_tick_padding: float = None, + chart_x_axis_tick_label_angle: str = None, + chart_x_axis_tick_label_weight: str = None, + chart_x_axis_tick_label_max_lines: float = None, + chart_x_axis_tick_label_line_height: float = None, + chart_x_axis_tick_label_space_mode: str = None, + chart_x_axis_tick_label_space: float = None, + chart_x_axis_tick_mode: str = None, + chart_x_axis_tick_number: float = None, + chart_x_axis_tick_custom: Union[list, str] = None, + chart_x_axis_line_and_tick_color: str = None, + chart_x_axis_line_and_tick_width: float = None, + chart_x_axis_tick_length: float = None, + chart_x_axis_tick_side: str = None, + chart_x_axis_line_visible: bool = None, + chart_x_axis_edge_padding: float = None, + chart_x_axis_gridlines_visible: bool = None, + chart_x_axis_gridlines_styling: bool = None, + chart_x_axis_gridline_color: str = None, + chart_x_axis_gridline_style: str = None, + chart_x_axis_gridline_width: float = None, + chart_x_axis_gridline_category_dividers: bool = None, + chart_x_axis_gridline_category_dividers_extend: bool = None, + chart_y_axis_axis_visible: bool = None, + chart_y_axis_numeric_scale_type: str = None, + chart_y_axis_linear_min: float = None, + chart_y_axis_linear_max: float = None, + chart_y_axis_log_min: float = None, + chart_y_axis_log_max: float = None, + chart_y_axis_datetime_min: str = None, + chart_y_axis_datetime_max: str = None, + chart_y_axis_flip: bool = None, + chart_y_axis_show_scale_settings: bool = None, + chart_y_axis_nice: bool = None, + chart_y_axis_zero_axis: str = None, + chart_y_axis_title_mode: str = None, + chart_y_axis_title: str = None, + chart_y_axis_title_styling: bool = None, + chart_y_axis_title_position: str = None, + chart_y_axis_title_weight: str = None, + chart_y_axis_title_color: str = None, + chart_y_axis_title_size: float = None, + chart_y_axis_title_padding: float = None, + chart_y_axis_tick_label_position: str = None, + chart_y_axis_tick_label_styling: bool = None, + chart_y_axis_tick_label_size: float = None, + chart_y_axis_tick_label_color: str = None, + chart_y_axis_tick_padding: float = None, + chart_y_axis_tick_label_angle: str = None, + chart_y_axis_tick_label_weight: str = None, + chart_y_axis_tick_label_max_lines: float = None, + chart_y_axis_tick_label_line_height: float = None, + chart_y_axis_tick_label_space_mode: str = None, + chart_y_axis_tick_label_space: float = None, + chart_y_axis_tick_mode: str = None, + chart_y_axis_tick_number: float = None, + chart_y_axis_tick_custom: Union[list, str] = None, + chart_y_axis_line_and_tick_color: str = None, + chart_y_axis_line_and_tick_width: float = None, + chart_y_axis_tick_length: float = None, + chart_y_axis_tick_side: str = None, + chart_y_axis_line_visible: bool = None, + chart_y_axis_edge_padding: float = None, + chart_y_axis_gridlines_visible: bool = None, + chart_y_axis_gridlines_styling: bool = None, + chart_y_axis_gridline_color: str = None, + chart_y_axis_gridline_style: str = None, + chart_y_axis_gridline_width: float = None, + chart_y_axis_gridline_category_dividers: bool = None, + chart_y_axis_gridline_category_dividers_extend: bool = None, + zoom_y_axis: bool = None, + caption_background_color: str = None, + caption_border_color: str = None, + caption_border_radius: float = None, + caption_opacity: float = None, + caption_padding: float = None, + caption_position: str = None, + caption_text_width: float = None, + caption_font_size: float = None, + caption_text_weight: str = None, + caption_text_color: str = None, + caption_mode: str = None, + caption_text_align_h: str = None, + caption_text_align_v: str = None, + caption_image_width: float = None, + caption_image_position: str = None, + caption_space_between: float = None, + stage_duration: float = None, + update_duration: float = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: line chart race. + + + :param play_mode: Play mode. In All mode, the entire X axis is visible In Zoomed mode, the X axis is only visible for a specified amount of stages In Reveal mode, the X axis is visible from the start until the current stage Flourish type hint: string, defaults to None. + :type play_mode: str, optional + :param zoom_steps_to_show: Visible stages. The number of time slices (each of which is column of data) to show on the X axis. When in Zoom mode, these time slices are shown to the left and right of the current time. In Reveal mode, these time slices are shown at the beginning. (Value is ignored if the number specified is greater than the number of stages in the data.). Flourish type hint: number, defaults to None. + :type zoom_steps_to_show: float, optional + :param value_type: Chart mode to show on load. Choices: ranks, scores. Flourish type hint: string, defaults to None. + :type value_type: str, optional + :param higher_scores_win: Data type. Choices: True, False. Useful for data where lower scores beat higher scores e.g. race times. Flourish type hint: boolean, defaults to None. + :type higher_scores_win: bool, optional + :param ties_mode: Rank ties mode. Choices: competition, dense. What ranks should be given when there are ties? See Wikipedia for an explanation of names. Flourish type hint: string, defaults to None. + :type ties_mode: str, optional + :param height_mode: Height mode. Choices: auto, fixed, flexible. In Fill space mode, the lines will be spread out over the available chart height, which by default will be the standard Flourish chart sizes for any given screen width. In this mode, the circles/images may overlap if you have lots of lines. Match data mode will resize the embedded graphic so there is enough vertical space to avoid overlaps. (Note this wont have any effect if you embed the graphic as a fixed height.) Auto mode switches between the two modes depending on the number of lines. Flourish type hint: string, defaults to None. + :type height_mode: str, optional + :param padding_top: Top. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type padding_top: float, optional + :param padding_right: Right. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type padding_right: float, optional + :param padding_bottom: Bottom. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type padding_bottom: float, optional + :param padding_left: Left (mobile). In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type padding_left: float, optional + :param show_buttons: Ranks/scores toggle. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type show_buttons: bool, optional + :param show_replay: Replay button. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type show_replay: bool, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_background_color: Background. Flourish type hint: color, defaults to None. + :type chart_filter_controls_slider_background_color: str, optional + :param chart_filter_controls_slider_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_filter_controls_slider_font_color: str, optional + :param chart_filter_controls_slider_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_filter_controls_slider_handle_color: str, optional + :param chart_filter_controls_slider_width: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_margin: Label width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_margin: float, optional + :param chart_filter_controls_slider_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_handle_height: float, optional + :param chart_filter_controls_slider_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_track_height: float, optional + :param chart_filter_controls_slider_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_play_button: bool, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param filter_include_all: Include “All” option. Flourish type hint: boolean, defaults to None. + :type filter_include_all: bool, optional + :param label_ranks: “Ranks”. Flourish type hint: string, defaults to None. + :type label_ranks: str, optional + :param label_scores: “Scores”. Flourish type hint: string, defaults to None. + :type label_scores: str, optional + :param label_replay: “Replay”. Flourish type hint: string, defaults to None. + :type label_replay: str, optional + :param filter_all_label: “All”. Flourish type hint: string, defaults to None. + :type filter_all_label: str, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param color_mode: Color mode. Choices: category, line, single. Whether to color by category (if you have a category column set in the Datasheet), by each individual line, or give every line the same color. Flourish type hint: string, defaults to None. + :type color_mode: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param color_single: Single color. Flourish type hint: color, defaults to None. + :type color_single: str, optional + :param color_single_overrides: Color overrides. Type the label of the line whose color you want to set, a colon and then a color (using a name, hex-code or rgb). Multiple colors can be set using multiple lines. For example: China: red India: #4455AA Brazil: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type color_single_overrides: Union[list, str], optional + :param line_width: Line width. Flourish type hint: number, defaults to None. + :type line_width: float, optional + :param line_opacity: Opacity. Flourish type hint: number, defaults to None. + :type line_opacity: float, optional + :param curve: Curve. Choices: curve_linear, curve_monotone_x, curve_natural, curve_step, curve_step_after, curve_step_before. Flourish type hint: string, defaults to None. + :type curve: str, optional + :param shade: Shading behind line. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type shade: bool, optional + :param shade_width: Width. Width in pixels. Flourish type hint: number, defaults to None. + :type shade_width: float, optional + :param shade_opacity: Opacity. Set to a value between 0 and 1. Flourish type hint: number, defaults to None. + :type shade_opacity: float, optional + :param missing: Lines between missing data points. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type missing: bool, optional + :param missing_opacity: Opacity. Flourish type hint: number, defaults to None. + :type missing_opacity: float, optional + :param missing_width: Width. Flourish type hint: number, defaults to None. + :type missing_width: float, optional + :param missing_stroke_dash: Stroke dash. Flourish type hint: number, defaults to None. + :type missing_stroke_dash: float, optional + :param start_circle_r: Start radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type start_circle_r: float, optional + :param end_circle_r: End radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type end_circle_r: float, optional + :param end_circle_stroke: End stroke. Flourish type hint: number, defaults to None. + :type end_circle_stroke: float, optional + :param circle_space_between: Space between. Minimum space between the circles. The space is ignored when the chart is set to fill available space. Flourish type hint: number, defaults to None. + :type circle_space_between: float, optional + :param end_circle_stroke_bg: Stroke color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type end_circle_stroke_bg: bool, optional + :param horse_images: Image inside circle. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type horse_images: bool, optional + :param show_labels: Show labels. Choices: always, hover, never. Flourish type hint: string, defaults to None. + :type show_labels: str, optional + :param animate_scores: Animate scores. Flourish type hint: boolean, defaults to None. + :type animate_scores: bool, optional + :param rank_outside_picture: Value label position. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type rank_outside_picture: bool, optional + :param label_divider: Divider. The character between label and value. Flourish type hint: string, defaults to None. + :type label_divider: str, optional + :param rank_inside_color: Color. Flourish type hint: color, defaults to None. + :type rank_inside_color: str, optional + :param chart_labels_max_width: Max label width. The maximum allowed label width. Flourish type hint: number, defaults to None. + :type chart_labels_max_width: float, optional + :param chart_labels_overlap_mode: Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to None. + :type chart_labels_overlap_mode: str, optional + :param chart_labels_spreading_margin: Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to None. + :type chart_labels_spreading_margin: float, optional + :param chart_labels_data_point_margin: Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to None. + :type chart_labels_data_point_margin: float, optional + :param chart_labels_show_only_labels: Show only certain labels. Manually specify which labels youd like to display (one entry per line that should match entries in the Label column). Flourish type hint: text, defaults to None. + :type chart_labels_show_only_labels: Union[list, str], optional + :param chart_labels_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_labels_text_color: str, optional + :param chart_labels_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_labels_text_size: float, optional + :param chart_labels_text_bg_color: Outline. Flourish type hint: color, defaults to None. + :type chart_labels_text_bg_color: str, optional + :param chart_labels_text_bg_size: Outline width. As a % of the font size. Flourish type hint: number, defaults to None. + :type chart_labels_text_bg_size: float, optional + :param chart_labels_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_labels_text_line_height: float, optional + :param chart_labels_text_max_lines: Max lines. The max number of lines for each label. Flourish type hint: number, defaults to None. + :type chart_labels_text_max_lines: float, optional + :param chart_labels_text_weight: Weight. Choices: 400, 700. Flourish type hint: string, defaults to None. + :type chart_labels_text_weight: str, optional + :param chart_labels_lines: Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to None. + :type chart_labels_lines: str, optional + :param chart_labels_line_style: Line style. Choices: straight, step. Flourish type hint: string, defaults to None. + :type chart_labels_line_style: str, optional + :param chart_labels_line_color: Color. Flourish type hint: color, defaults to None. + :type chart_labels_line_color: str, optional + :param chart_labels_line_width: Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to None. + :type chart_labels_line_width: float, optional + :param chart_labels_line_range: Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to None. + :type chart_labels_line_range: float, optional + :param chart_labels_line_padding: Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to None. + :type chart_labels_line_padding: float, optional + :param chart_x_axis_axis_position: Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to None. + :type chart_x_axis_axis_position: str, optional + :param chart_x_axis_y_axis_position: Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to None. + :type chart_x_axis_y_axis_position: str, optional + :param chart_x_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_x_axis_numeric_scale_type: str, optional + :param chart_x_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_min: float, optional + :param chart_x_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_max: float, optional + :param chart_x_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_min: float, optional + :param chart_x_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_max: float, optional + :param chart_x_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_min: str, optional + :param chart_x_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_max: str, optional + :param chart_x_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_flip: bool, optional + :param chart_x_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_show_scale_settings: bool, optional + :param chart_x_axis_nice: Round min/max. Choices: True, False. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_nice: bool, optional + :param chart_x_axis_zero_axis: Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to None. + :type chart_x_axis_zero_axis: str, optional + :param chart_x_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_mode: str, optional + :param chart_x_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_x_axis_title: str, optional + :param chart_x_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_title_styling: bool, optional + :param chart_x_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_weight: str, optional + :param chart_x_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_title_color: str, optional + :param chart_x_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_size: float, optional + :param chart_x_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_padding: float, optional + :param chart_x_axis_tick_label_position: Position. Choices: default, left, right. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_position: str, optional + :param chart_x_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_tick_label_styling: bool, optional + :param chart_x_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_size: float, optional + :param chart_x_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_tick_label_color: str, optional + :param chart_x_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_padding: float, optional + :param chart_x_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_angle: str, optional + :param chart_x_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_weight: str, optional + :param chart_x_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_max_lines: float, optional + :param chart_x_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_line_height: float, optional + :param chart_x_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_space_mode: str, optional + :param chart_x_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_space: float, optional + :param chart_x_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_mode: str, optional + :param chart_x_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_number: float, optional + :param chart_x_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_x_axis_tick_custom: Union[list, str], optional + :param chart_x_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_x_axis_line_and_tick_color: str, optional + :param chart_x_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_x_axis_line_and_tick_width: float, optional + :param chart_x_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_length: float, optional + :param chart_x_axis_tick_side: Tick side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_side: str, optional + :param chart_x_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_line_visible: bool, optional + :param chart_x_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_x_axis_edge_padding: float, optional + :param chart_x_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_visible: bool, optional + :param chart_x_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_styling: bool, optional + :param chart_x_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_gridline_color: str, optional + :param chart_x_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_x_axis_gridline_style: str, optional + :param chart_x_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_x_axis_gridline_width: float, optional + :param chart_x_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers: bool, optional + :param chart_x_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers_extend: bool, optional + :param chart_y_axis_axis_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_axis_visible: bool, optional + :param chart_y_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_y_axis_numeric_scale_type: str, optional + :param chart_y_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_min: float, optional + :param chart_y_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_max: float, optional + :param chart_y_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_min: float, optional + :param chart_y_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_max: float, optional + :param chart_y_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_min: str, optional + :param chart_y_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_max: str, optional + :param chart_y_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_flip: bool, optional + :param chart_y_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_show_scale_settings: bool, optional + :param chart_y_axis_nice: Round min/max. Choices: True, False. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_nice: bool, optional + :param chart_y_axis_zero_axis: Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to None. + :type chart_y_axis_zero_axis: str, optional + :param chart_y_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_mode: str, optional + :param chart_y_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_y_axis_title: str, optional + :param chart_y_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_title_styling: bool, optional + :param chart_y_axis_title_position: Position. Choices: side, end. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_position: str, optional + :param chart_y_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_weight: str, optional + :param chart_y_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_title_color: str, optional + :param chart_y_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_size: float, optional + :param chart_y_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_padding: float, optional + :param chart_y_axis_tick_label_position: Position. Choices: default, above, below. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_position: str, optional + :param chart_y_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_tick_label_styling: bool, optional + :param chart_y_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_size: float, optional + :param chart_y_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_tick_label_color: str, optional + :param chart_y_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_padding: float, optional + :param chart_y_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_angle: str, optional + :param chart_y_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_weight: str, optional + :param chart_y_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_max_lines: float, optional + :param chart_y_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_line_height: float, optional + :param chart_y_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_space_mode: str, optional + :param chart_y_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_space: float, optional + :param chart_y_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_mode: str, optional + :param chart_y_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_number: float, optional + :param chart_y_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_y_axis_tick_custom: Union[list, str], optional + :param chart_y_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_y_axis_line_and_tick_color: str, optional + :param chart_y_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_y_axis_line_and_tick_width: float, optional + :param chart_y_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_length: float, optional + :param chart_y_axis_tick_side: Side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_side: str, optional + :param chart_y_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_line_visible: bool, optional + :param chart_y_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_y_axis_edge_padding: float, optional + :param chart_y_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_visible: bool, optional + :param chart_y_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_styling: bool, optional + :param chart_y_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_gridline_color: str, optional + :param chart_y_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_y_axis_gridline_style: str, optional + :param chart_y_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_y_axis_gridline_width: float, optional + :param chart_y_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers: bool, optional + :param chart_y_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers_extend: bool, optional + :param zoom_y_axis: Dynamic Y axis. Rescales the y axis when filtering or playing in zoomed mode. Flourish type hint: boolean, defaults to None. + :type zoom_y_axis: bool, optional + :param caption_background_color: Background. Flourish type hint: color, defaults to None. + :type caption_background_color: str, optional + :param caption_border_color: Border. Flourish type hint: color, defaults to None. + :type caption_border_color: str, optional + :param caption_border_radius: Radius. Flourish type hint: number, defaults to None. + :type caption_border_radius: float, optional + :param caption_opacity: Opacity. Flourish type hint: number, defaults to None. + :type caption_opacity: float, optional + :param caption_padding: Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type caption_padding: float, optional + :param caption_position: Position. Choices: top-left, center-left, bottom-left, top-right, center-right, bottom-right, top-center, center-center, bottom-center. Flourish type hint: string, defaults to None. + :type caption_position: str, optional + :param caption_text_width: Width. Flourish type hint: number, defaults to None. + :type caption_text_width: float, optional + :param caption_font_size: Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type caption_font_size: float, optional + :param caption_text_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type caption_text_weight: str, optional + :param caption_text_color: Color. Flourish type hint: color, defaults to None. + :type caption_text_color: str, optional + :param caption_mode: Content mode. Choices: text_legend, html. In Text with colors mode, any phrases matching category names will be automatically colored. In HTML mode, no colors will be applied, but you can include any HTML in the datasheet to add images, etc. Flourish type hint: string, defaults to None. + :type caption_mode: str, optional + :param caption_text_align_h: Horizontal align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type caption_text_align_h: str, optional + :param caption_text_align_v: Vertical align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type caption_text_align_v: str, optional + :param caption_image_width: Width. Flourish type hint: number, defaults to None. + :type caption_image_width: float, optional + :param caption_image_position: Position. Choices: column, column-reverse, row, row-reverse. Flourish type hint: string, defaults to None. + :type caption_image_position: str, optional + :param caption_space_between: Space between. Space between image and text. Flourish type hint: number, defaults to None. + :type caption_space_between: float, optional + :param stage_duration: Animation duration. The race animation length, in milliseconds per stage(A stage is equal to each column of your data). Flourish type hint: number, defaults to None. + :type stage_duration: float, optional + :param update_duration: Mode duration. The animation duration when change between ranks and scores modes. Flourish type hint: number, defaults to None. + :type update_duration: float, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "filter_control": {}, + "controls_style": {}, + "button_style": {}, + "dropdown_style": {}, + "color": {}, + "labels": {}, + "x": {}, + "y": {}, + "formatting": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + self.state["state"]["play_mode"] = play_mode + self.state["state"]["zoom_steps_to_show"] = zoom_steps_to_show + + list_value_type = ["ranks", "scores"] + [None] + if value_type not in list_value_type: + raise ValueError(f"`value_type` must be one of: ['ranks', 'scores']") + elif value_type in list_value_type and value_type is not None: + filtered_dict = { + k: v + for (k, v) in {"ranks": "ranks", "scores": "scores"}.items() + if value_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_type"] = filtered_dict[value_type] + + list_higher_scores_win = [True, False] + [None] + if higher_scores_win not in list_higher_scores_win: + raise ValueError(f"`higher_scores_win` must be one of: [True, False]") + elif ( + higher_scores_win in list_higher_scores_win + and higher_scores_win is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if higher_scores_win in k + } + if len(filtered_dict) > 0: + self.state["state"]["higher_scores_win"] = filtered_dict[ + higher_scores_win + ] + + list_ties_mode = ["competition", "dense"] + [None] + if ties_mode not in list_ties_mode: + raise ValueError(f"`ties_mode` must be one of: ['competition', 'dense']") + elif ties_mode in list_ties_mode and ties_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"competition": "competition", "dense": "dense"}.items() + if ties_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["ties_mode"] = filtered_dict[ties_mode] + + list_height_mode = ["auto", "fixed", "flexible"] + [None] + if height_mode not in list_height_mode: + raise ValueError( + f"`height_mode` must be one of: ['auto', 'fixed', 'flexible']" + ) + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "fixed": "fixed", + "flexible": "flexible", + }.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + self.state["state"]["padding_top"] = padding_top + self.state["state"]["padding_right"] = padding_right + self.state["state"]["padding_bottom"] = padding_bottom + self.state["state"]["padding_left"] = padding_left + + list_show_buttons = [True, False] + [None] + if show_buttons not in list_show_buttons: + raise ValueError(f"`show_buttons` must be one of: [True, False]") + elif show_buttons in list_show_buttons and show_buttons is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if show_buttons in k + } + if len(filtered_dict) > 0: + self.state["state"]["show_buttons"] = filtered_dict[show_buttons] + + list_show_replay = [True, False] + [None] + if show_replay not in list_show_replay: + raise ValueError(f"`show_replay` must be one of: [True, False]") + elif show_replay in list_show_replay and show_replay is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if show_replay in k + } + if len(filtered_dict) > 0: + self.state["state"]["show_replay"] = filtered_dict[show_replay] + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["filter_control"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["filter_control"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["filter_control"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_filter_controls_dropdown_width_mode] + self.state["state"]["filter_control"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["filter_control"][ + "slider_background_color" + ] = chart_filter_controls_slider_background_color + self.state["state"]["filter_control"][ + "slider_font_color" + ] = chart_filter_controls_slider_font_color + self.state["state"]["filter_control"][ + "slider_handle_color" + ] = chart_filter_controls_slider_handle_color + self.state["state"]["filter_control"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["filter_control"][ + "slider_margin" + ] = chart_filter_controls_slider_margin + self.state["state"]["filter_control"][ + "slider_handle_height" + ] = chart_filter_controls_slider_handle_height + self.state["state"]["filter_control"][ + "slider_track_height" + ] = chart_filter_controls_slider_track_height + self.state["state"]["filter_control"][ + "slider_play_button" + ] = chart_filter_controls_slider_play_button + self.state["state"]["filter_control"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["filter_control"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["filter_control"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["filter_include_all"] = filter_include_all + self.state["state"]["label_ranks"] = label_ranks + self.state["state"]["label_scores"] = label_scores + self.state["state"]["label_replay"] = label_replay + self.state["state"]["filter_all_label"] = filter_all_label + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + + list_color_mode = ["category", "line", "single"] + [None] + if color_mode not in list_color_mode: + raise ValueError( + f"`color_mode` must be one of: ['category', 'line', 'single']" + ) + elif color_mode in list_color_mode and color_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "category": "category", + "line": "line", + "single": "single", + }.items() + if color_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color_mode"] = filtered_dict[color_mode] + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["color_single"] = color_single + + if ( + color_single_overrides is not None + and len(color_single_overrides) > 1 + and isinstance(color_single_overrides, list) + ): + self.state["state"]["color_single_overrides"] = " \n ".join( + color_single_overrides + ) + else: + self.state["state"]["color_single_overrides"] = color_single_overrides + + self.state["state"]["line_width"] = line_width + self.state["state"]["line_opacity"] = line_opacity + + list_curve = [ + "curve_linear", + "curve_monotone_x", + "curve_natural", + "curve_step", + "curve_step_after", + "curve_step_before", + ] + [None] + if curve not in list_curve: + raise ValueError( + f"`curve` must be one of: ['curve_linear', 'curve_monotone_x', 'curve_natural', 'curve_step', 'curve_step_after', 'curve_step_before']" + ) + elif curve in list_curve and curve is not None: + filtered_dict = { + k: v + for (k, v) in { + "curve_linear": "curveLinear", + "curve_monotone_x": "curveMonotoneX", + "curve_natural": "curveNatural", + "curve_step": "curveStep", + "curve_step_after": "curveStepAfter", + "curve_step_before": "curveStepBefore", + }.items() + if curve in k + } + if len(filtered_dict) > 0: + self.state["state"]["curve"] = filtered_dict[curve] + + list_shade = [True, False] + [None] + if shade not in list_shade: + raise ValueError(f"`shade` must be one of: [True, False]") + elif shade in list_shade and shade is not None: + filtered_dict = { + k: v for (k, v) in {True: True, False: False}.items() if shade in k + } + if len(filtered_dict) > 0: + self.state["state"]["shade"] = filtered_dict[shade] + self.state["state"]["shade_width"] = shade_width + self.state["state"]["shade_opacity"] = shade_opacity + + list_missing = [True, False] + [None] + if missing not in list_missing: + raise ValueError(f"`missing` must be one of: [True, False]") + elif missing in list_missing and missing is not None: + filtered_dict = { + k: v for (k, v) in {True: True, False: False}.items() if missing in k + } + if len(filtered_dict) > 0: + self.state["state"]["missing"] = filtered_dict[missing] + self.state["state"]["missing_opacity"] = missing_opacity + self.state["state"]["missing_width"] = missing_width + self.state["state"]["missing_stroke_dash"] = missing_stroke_dash + self.state["state"]["start_circle_r"] = start_circle_r + self.state["state"]["end_circle_r"] = end_circle_r + self.state["state"]["end_circle_stroke"] = end_circle_stroke + self.state["state"]["circle_space_between"] = circle_space_between + + list_end_circle_stroke_bg = [True, False] + [None] + if end_circle_stroke_bg not in list_end_circle_stroke_bg: + raise ValueError(f"`end_circle_stroke_bg` must be one of: [True, False]") + elif ( + end_circle_stroke_bg in list_end_circle_stroke_bg + and end_circle_stroke_bg is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if end_circle_stroke_bg in k + } + if len(filtered_dict) > 0: + self.state["state"]["end_circle_stroke_bg"] = filtered_dict[ + end_circle_stroke_bg + ] + + list_horse_images = [True, False] + [None] + if horse_images not in list_horse_images: + raise ValueError(f"`horse_images` must be one of: [True, False]") + elif horse_images in list_horse_images and horse_images is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if horse_images in k + } + if len(filtered_dict) > 0: + self.state["state"]["horse_images"] = filtered_dict[horse_images] + + list_show_labels = ["always", "hover", "never"] + [None] + if show_labels not in list_show_labels: + raise ValueError( + f"`show_labels` must be one of: ['always', 'hover', 'never']" + ) + elif show_labels in list_show_labels and show_labels is not None: + filtered_dict = { + k: v + for (k, v) in { + "always": "always", + "hover": "hover", + "never": "never", + }.items() + if show_labels in k + } + if len(filtered_dict) > 0: + self.state["state"]["show_labels"] = filtered_dict[show_labels] + self.state["state"]["animate_scores"] = animate_scores + + list_rank_outside_picture = [False, True] + [None] + if rank_outside_picture not in list_rank_outside_picture: + raise ValueError(f"`rank_outside_picture` must be one of: [False, True]") + elif ( + rank_outside_picture in list_rank_outside_picture + and rank_outside_picture is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if rank_outside_picture in k + } + if len(filtered_dict) > 0: + self.state["state"]["rank_outside_picture"] = filtered_dict[ + rank_outside_picture + ] + self.state["state"]["label_divider"] = label_divider + self.state["state"]["rank_inside_color"] = rank_inside_color + self.state["state"]["labels"]["max_width"] = chart_labels_max_width + + list_chart_labels_overlap_mode = ["spread", "hide", "none"] + [None] + if chart_labels_overlap_mode not in list_chart_labels_overlap_mode: + raise ValueError( + f"`chart_labels_overlap_mode` must be one of: ['spread', 'hide', 'none']" + ) + elif ( + chart_labels_overlap_mode in list_chart_labels_overlap_mode + and chart_labels_overlap_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "spread": "spread", + "hide": "hide", + "none": "none", + }.items() + if chart_labels_overlap_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels"]["overlap_mode"] = filtered_dict[ + chart_labels_overlap_mode + ] + self.state["state"]["labels"][ + "spreading_margin" + ] = chart_labels_spreading_margin + self.state["state"]["labels"][ + "data_point_margin" + ] = chart_labels_data_point_margin + + if ( + chart_labels_show_only_labels is not None + and len(chart_labels_show_only_labels) > 1 + and isinstance(chart_labels_show_only_labels, list) + ): + self.state["state"]["labels"]["show_only_labels"] = " \n ".join( + chart_labels_show_only_labels + ) + else: + self.state["state"]["labels"][ + "show_only_labels" + ] = chart_labels_show_only_labels + + self.state["state"]["labels"]["text_color"] = chart_labels_text_color + self.state["state"]["labels"]["text_size"] = chart_labels_text_size + self.state["state"]["labels"]["text_bg_color"] = chart_labels_text_bg_color + self.state["state"]["labels"]["text_bg_size"] = chart_labels_text_bg_size + self.state["state"]["labels"][ + "text_line_height" + ] = chart_labels_text_line_height + self.state["state"]["labels"]["text_max_lines"] = chart_labels_text_max_lines + + list_chart_labels_text_weight = [400, 700] + [None] + if chart_labels_text_weight not in list_chart_labels_text_weight: + raise ValueError(f"`chart_labels_text_weight` must be one of: [400, 700]") + elif ( + chart_labels_text_weight in list_chart_labels_text_weight + and chart_labels_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {400: 400, 700: 700}.items() + if chart_labels_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels"]["text_weight"] = filtered_dict[ + chart_labels_text_weight + ] + + list_chart_labels_lines = ["auto", "on", "off"] + [None] + if chart_labels_lines not in list_chart_labels_lines: + raise ValueError( + f"`chart_labels_lines` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_labels_lines in list_chart_labels_lines + and chart_labels_lines is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_labels_lines in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels"]["lines"] = filtered_dict[ + chart_labels_lines + ] + + list_chart_labels_line_style = ["straight", "step"] + [None] + if chart_labels_line_style not in list_chart_labels_line_style: + raise ValueError( + f"`chart_labels_line_style` must be one of: ['straight', 'step']" + ) + elif ( + chart_labels_line_style in list_chart_labels_line_style + and chart_labels_line_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"straight": "straight", "step": "step"}.items() + if chart_labels_line_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels"]["line_style"] = filtered_dict[ + chart_labels_line_style + ] + self.state["state"]["labels"]["line_color"] = chart_labels_line_color + self.state["state"]["labels"]["line_width"] = chart_labels_line_width + self.state["state"]["labels"]["line_range"] = chart_labels_line_range + self.state["state"]["labels"]["line_padding"] = chart_labels_line_padding + + list_chart_x_axis_axis_position = [ + "bottom", + "float-below", + "float-above", + "top", + "off", + ] + [None] + if chart_x_axis_axis_position not in list_chart_x_axis_axis_position: + raise ValueError( + f"`chart_x_axis_axis_position` must be one of: ['bottom', 'float-below', 'float-above', 'top', 'off']" + ) + elif ( + chart_x_axis_axis_position in list_chart_x_axis_axis_position + and chart_x_axis_axis_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "float-below": "float-below", + "float-above": "float-above", + "top": "top", + "off": "off", + }.items() + if chart_x_axis_axis_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["axis_position"] = filtered_dict[ + chart_x_axis_axis_position + ] + self.state["state"]["x"]["y_axis_position"] = chart_x_axis_y_axis_position + + list_chart_x_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_x_axis_numeric_scale_type not in list_chart_x_axis_numeric_scale_type: + raise ValueError( + f"`chart_x_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_x_axis_numeric_scale_type in list_chart_x_axis_numeric_scale_type + and chart_x_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_x_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["numeric_scale_type"] = filtered_dict[ + chart_x_axis_numeric_scale_type + ] + self.state["state"]["x"]["linear_min"] = chart_x_axis_linear_min + self.state["state"]["x"]["linear_max"] = chart_x_axis_linear_max + self.state["state"]["x"]["log_min"] = chart_x_axis_log_min + self.state["state"]["x"]["log_max"] = chart_x_axis_log_max + self.state["state"]["x"]["datetime_min"] = chart_x_axis_datetime_min + self.state["state"]["x"]["datetime_max"] = chart_x_axis_datetime_max + self.state["state"]["x"]["flip"] = chart_x_axis_flip + self.state["state"]["x"][ + "show_scale_settings" + ] = chart_x_axis_show_scale_settings + + list_chart_x_axis_nice = [True, False] + [None] + if chart_x_axis_nice not in list_chart_x_axis_nice: + raise ValueError(f"`chart_x_axis_nice` must be one of: [True, False]") + elif ( + chart_x_axis_nice in list_chart_x_axis_nice + and chart_x_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["nice"] = filtered_dict[chart_x_axis_nice] + + list_chart_x_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_x_axis_zero_axis not in list_chart_x_axis_zero_axis: + raise ValueError( + f"`chart_x_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_x_axis_zero_axis in list_chart_x_axis_zero_axis + and chart_x_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_x_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["zero_axis"] = filtered_dict[ + chart_x_axis_zero_axis + ] + + list_chart_x_axis_title_mode = ["auto", "custom"] + [None] + if chart_x_axis_title_mode not in list_chart_x_axis_title_mode: + raise ValueError( + f"`chart_x_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_x_axis_title_mode in list_chart_x_axis_title_mode + and chart_x_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_x_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_mode"] = filtered_dict[ + chart_x_axis_title_mode + ] + self.state["state"]["x"]["title"] = chart_x_axis_title + self.state["state"]["x"]["title_styling"] = chart_x_axis_title_styling + + list_chart_x_axis_title_weight = ["bold", "normal"] + [None] + if chart_x_axis_title_weight not in list_chart_x_axis_title_weight: + raise ValueError( + f"`chart_x_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_title_weight in list_chart_x_axis_title_weight + and chart_x_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_weight"] = filtered_dict[ + chart_x_axis_title_weight + ] + self.state["state"]["x"]["title_color"] = chart_x_axis_title_color + self.state["state"]["x"]["title_size"] = chart_x_axis_title_size + self.state["state"]["x"]["title_padding"] = chart_x_axis_title_padding + + list_chart_x_axis_tick_label_position = ["default", "left", "right"] + [None] + if ( + chart_x_axis_tick_label_position + not in list_chart_x_axis_tick_label_position + ): + raise ValueError( + f"`chart_x_axis_tick_label_position` must be one of: ['default', 'left', 'right']" + ) + elif ( + chart_x_axis_tick_label_position in list_chart_x_axis_tick_label_position + and chart_x_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "left": "left", + "right": "right", + }.items() + if chart_x_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_position"] = filtered_dict[ + chart_x_axis_tick_label_position + ] + self.state["state"]["x"]["tick_label_styling"] = chart_x_axis_tick_label_styling + self.state["state"]["x"]["tick_label_size"] = chart_x_axis_tick_label_size + self.state["state"]["x"]["tick_label_color"] = chart_x_axis_tick_label_color + self.state["state"]["x"]["tick_padding"] = chart_x_axis_tick_padding + + list_chart_x_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_x_axis_tick_label_angle not in list_chart_x_axis_tick_label_angle: + raise ValueError( + f"`chart_x_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_x_axis_tick_label_angle in list_chart_x_axis_tick_label_angle + and chart_x_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_x_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_angle"] = filtered_dict[ + chart_x_axis_tick_label_angle + ] + + list_chart_x_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_x_axis_tick_label_weight not in list_chart_x_axis_tick_label_weight: + raise ValueError( + f"`chart_x_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_tick_label_weight in list_chart_x_axis_tick_label_weight + and chart_x_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_weight"] = filtered_dict[ + chart_x_axis_tick_label_weight + ] + self.state["state"]["x"][ + "tick_label_max_lines" + ] = chart_x_axis_tick_label_max_lines + self.state["state"]["x"][ + "tick_label_line_height" + ] = chart_x_axis_tick_label_line_height + + list_chart_x_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_x_axis_tick_label_space_mode + not in list_chart_x_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_x_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_x_axis_tick_label_space_mode + in list_chart_x_axis_tick_label_space_mode + and chart_x_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_x_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_space_mode"] = filtered_dict[ + chart_x_axis_tick_label_space_mode + ] + self.state["state"]["x"]["tick_label_space"] = chart_x_axis_tick_label_space + + list_chart_x_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_x_axis_tick_mode not in list_chart_x_axis_tick_mode: + raise ValueError( + f"`chart_x_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_x_axis_tick_mode in list_chart_x_axis_tick_mode + and chart_x_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_x_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_mode"] = filtered_dict[ + chart_x_axis_tick_mode + ] + self.state["state"]["x"]["tick_number"] = chart_x_axis_tick_number + + if ( + chart_x_axis_tick_custom is not None + and len(chart_x_axis_tick_custom) > 1 + and isinstance(chart_x_axis_tick_custom, list) + ): + self.state["state"]["x"]["tick_custom"] = " \n ".join( + chart_x_axis_tick_custom + ) + else: + self.state["state"]["x"]["tick_custom"] = chart_x_axis_tick_custom + + self.state["state"]["x"][ + "line_and_tick_color" + ] = chart_x_axis_line_and_tick_color + self.state["state"]["x"][ + "line_and_tick_width" + ] = chart_x_axis_line_and_tick_width + self.state["state"]["x"]["tick_length"] = chart_x_axis_tick_length + + list_chart_x_axis_tick_side = ["out", "in"] + [None] + if chart_x_axis_tick_side not in list_chart_x_axis_tick_side: + raise ValueError(f"`chart_x_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_x_axis_tick_side in list_chart_x_axis_tick_side + and chart_x_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_x_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_side"] = filtered_dict[ + chart_x_axis_tick_side + ] + self.state["state"]["x"]["line_visible"] = chart_x_axis_line_visible + self.state["state"]["x"]["edge_padding"] = chart_x_axis_edge_padding + + list_chart_x_axis_gridlines_visible = [True, False] + [None] + if chart_x_axis_gridlines_visible not in list_chart_x_axis_gridlines_visible: + raise ValueError( + f"`chart_x_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_x_axis_gridlines_visible in list_chart_x_axis_gridlines_visible + and chart_x_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridlines_visible"] = filtered_dict[ + chart_x_axis_gridlines_visible + ] + self.state["state"]["x"]["gridlines_styling"] = chart_x_axis_gridlines_styling + self.state["state"]["x"]["gridline_color"] = chart_x_axis_gridline_color + + list_chart_x_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_x_axis_gridline_style not in list_chart_x_axis_gridline_style: + raise ValueError( + f"`chart_x_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_x_axis_gridline_style in list_chart_x_axis_gridline_style + and chart_x_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_x_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridline_style"] = filtered_dict[ + chart_x_axis_gridline_style + ] + self.state["state"]["x"]["gridline_width"] = chart_x_axis_gridline_width + self.state["state"]["x"][ + "gridline_category_dividers" + ] = chart_x_axis_gridline_category_dividers + self.state["state"]["x"][ + "gridline_category_dividers_extend" + ] = chart_x_axis_gridline_category_dividers_extend + + list_chart_y_axis_axis_visible = [True, False] + [None] + if chart_y_axis_axis_visible not in list_chart_y_axis_axis_visible: + raise ValueError( + f"`chart_y_axis_axis_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_axis_visible in list_chart_y_axis_axis_visible + and chart_y_axis_axis_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_axis_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["axis_visible"] = filtered_dict[ + chart_y_axis_axis_visible + ] + + list_chart_y_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_y_axis_numeric_scale_type not in list_chart_y_axis_numeric_scale_type: + raise ValueError( + f"`chart_y_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_y_axis_numeric_scale_type in list_chart_y_axis_numeric_scale_type + and chart_y_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_y_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["numeric_scale_type"] = filtered_dict[ + chart_y_axis_numeric_scale_type + ] + self.state["state"]["y"]["linear_min"] = chart_y_axis_linear_min + self.state["state"]["y"]["linear_max"] = chart_y_axis_linear_max + self.state["state"]["y"]["log_min"] = chart_y_axis_log_min + self.state["state"]["y"]["log_max"] = chart_y_axis_log_max + self.state["state"]["y"]["datetime_min"] = chart_y_axis_datetime_min + self.state["state"]["y"]["datetime_max"] = chart_y_axis_datetime_max + self.state["state"]["y"]["flip"] = chart_y_axis_flip + self.state["state"]["y"][ + "show_scale_settings" + ] = chart_y_axis_show_scale_settings + + list_chart_y_axis_nice = [True, False] + [None] + if chart_y_axis_nice not in list_chart_y_axis_nice: + raise ValueError(f"`chart_y_axis_nice` must be one of: [True, False]") + elif ( + chart_y_axis_nice in list_chart_y_axis_nice + and chart_y_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["nice"] = filtered_dict[chart_y_axis_nice] + + list_chart_y_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_y_axis_zero_axis not in list_chart_y_axis_zero_axis: + raise ValueError( + f"`chart_y_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_y_axis_zero_axis in list_chart_y_axis_zero_axis + and chart_y_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_y_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["zero_axis"] = filtered_dict[ + chart_y_axis_zero_axis + ] + + list_chart_y_axis_title_mode = ["auto", "custom"] + [None] + if chart_y_axis_title_mode not in list_chart_y_axis_title_mode: + raise ValueError( + f"`chart_y_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_y_axis_title_mode in list_chart_y_axis_title_mode + and chart_y_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_y_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_mode"] = filtered_dict[ + chart_y_axis_title_mode + ] + self.state["state"]["y"]["title"] = chart_y_axis_title + self.state["state"]["y"]["title_styling"] = chart_y_axis_title_styling + + list_chart_y_axis_title_position = ["side", "end"] + [None] + if chart_y_axis_title_position not in list_chart_y_axis_title_position: + raise ValueError( + f"`chart_y_axis_title_position` must be one of: ['side', 'end']" + ) + elif ( + chart_y_axis_title_position in list_chart_y_axis_title_position + and chart_y_axis_title_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"side": "side", "end": "end"}.items() + if chart_y_axis_title_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_position"] = filtered_dict[ + chart_y_axis_title_position + ] + + list_chart_y_axis_title_weight = ["bold", "normal"] + [None] + if chart_y_axis_title_weight not in list_chart_y_axis_title_weight: + raise ValueError( + f"`chart_y_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_title_weight in list_chart_y_axis_title_weight + and chart_y_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_weight"] = filtered_dict[ + chart_y_axis_title_weight + ] + self.state["state"]["y"]["title_color"] = chart_y_axis_title_color + self.state["state"]["y"]["title_size"] = chart_y_axis_title_size + self.state["state"]["y"]["title_padding"] = chart_y_axis_title_padding + + list_chart_y_axis_tick_label_position = ["default", "above", "below"] + [None] + if ( + chart_y_axis_tick_label_position + not in list_chart_y_axis_tick_label_position + ): + raise ValueError( + f"`chart_y_axis_tick_label_position` must be one of: ['default', 'above', 'below']" + ) + elif ( + chart_y_axis_tick_label_position in list_chart_y_axis_tick_label_position + and chart_y_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "above": "above", + "below": "below", + }.items() + if chart_y_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_position"] = filtered_dict[ + chart_y_axis_tick_label_position + ] + self.state["state"]["y"]["tick_label_styling"] = chart_y_axis_tick_label_styling + self.state["state"]["y"]["tick_label_size"] = chart_y_axis_tick_label_size + self.state["state"]["y"]["tick_label_color"] = chart_y_axis_tick_label_color + self.state["state"]["y"]["tick_padding"] = chart_y_axis_tick_padding + + list_chart_y_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_y_axis_tick_label_angle not in list_chart_y_axis_tick_label_angle: + raise ValueError( + f"`chart_y_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_y_axis_tick_label_angle in list_chart_y_axis_tick_label_angle + and chart_y_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_y_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_angle"] = filtered_dict[ + chart_y_axis_tick_label_angle + ] + + list_chart_y_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_y_axis_tick_label_weight not in list_chart_y_axis_tick_label_weight: + raise ValueError( + f"`chart_y_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_tick_label_weight in list_chart_y_axis_tick_label_weight + and chart_y_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_weight"] = filtered_dict[ + chart_y_axis_tick_label_weight + ] + self.state["state"]["y"][ + "tick_label_max_lines" + ] = chart_y_axis_tick_label_max_lines + self.state["state"]["y"][ + "tick_label_line_height" + ] = chart_y_axis_tick_label_line_height + + list_chart_y_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_y_axis_tick_label_space_mode + not in list_chart_y_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_y_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_y_axis_tick_label_space_mode + in list_chart_y_axis_tick_label_space_mode + and chart_y_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_y_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_space_mode"] = filtered_dict[ + chart_y_axis_tick_label_space_mode + ] + self.state["state"]["y"]["tick_label_space"] = chart_y_axis_tick_label_space + + list_chart_y_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_y_axis_tick_mode not in list_chart_y_axis_tick_mode: + raise ValueError( + f"`chart_y_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_y_axis_tick_mode in list_chart_y_axis_tick_mode + and chart_y_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_y_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_mode"] = filtered_dict[ + chart_y_axis_tick_mode + ] + self.state["state"]["y"]["tick_number"] = chart_y_axis_tick_number + + if ( + chart_y_axis_tick_custom is not None + and len(chart_y_axis_tick_custom) > 1 + and isinstance(chart_y_axis_tick_custom, list) + ): + self.state["state"]["y"]["tick_custom"] = " \n ".join( + chart_y_axis_tick_custom + ) + else: + self.state["state"]["y"]["tick_custom"] = chart_y_axis_tick_custom + + self.state["state"]["y"][ + "line_and_tick_color" + ] = chart_y_axis_line_and_tick_color + self.state["state"]["y"][ + "line_and_tick_width" + ] = chart_y_axis_line_and_tick_width + self.state["state"]["y"]["tick_length"] = chart_y_axis_tick_length + + list_chart_y_axis_tick_side = ["out", "in"] + [None] + if chart_y_axis_tick_side not in list_chart_y_axis_tick_side: + raise ValueError(f"`chart_y_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_y_axis_tick_side in list_chart_y_axis_tick_side + and chart_y_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_y_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_side"] = filtered_dict[ + chart_y_axis_tick_side + ] + self.state["state"]["y"]["line_visible"] = chart_y_axis_line_visible + self.state["state"]["y"]["edge_padding"] = chart_y_axis_edge_padding + + list_chart_y_axis_gridlines_visible = [True, False] + [None] + if chart_y_axis_gridlines_visible not in list_chart_y_axis_gridlines_visible: + raise ValueError( + f"`chart_y_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_gridlines_visible in list_chart_y_axis_gridlines_visible + and chart_y_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridlines_visible"] = filtered_dict[ + chart_y_axis_gridlines_visible + ] + self.state["state"]["y"]["gridlines_styling"] = chart_y_axis_gridlines_styling + self.state["state"]["y"]["gridline_color"] = chart_y_axis_gridline_color + + list_chart_y_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_y_axis_gridline_style not in list_chart_y_axis_gridline_style: + raise ValueError( + f"`chart_y_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_y_axis_gridline_style in list_chart_y_axis_gridline_style + and chart_y_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_y_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridline_style"] = filtered_dict[ + chart_y_axis_gridline_style + ] + self.state["state"]["y"]["gridline_width"] = chart_y_axis_gridline_width + self.state["state"]["y"][ + "gridline_category_dividers" + ] = chart_y_axis_gridline_category_dividers + self.state["state"]["y"][ + "gridline_category_dividers_extend" + ] = chart_y_axis_gridline_category_dividers_extend + self.state["state"]["zoom_y_axis"] = zoom_y_axis + self.state["state"]["caption_background_color"] = caption_background_color + self.state["state"]["caption_border_color"] = caption_border_color + self.state["state"]["caption_border_radius"] = caption_border_radius + self.state["state"]["caption_opacity"] = caption_opacity + self.state["state"]["caption_padding"] = caption_padding + + list_caption_position = [ + "top-left", + "center-left", + "bottom-left", + "top-right", + "center-right", + "bottom-right", + "top-center", + "center-center", + "bottom-center", + ] + [None] + if caption_position not in list_caption_position: + raise ValueError( + f"`caption_position` must be one of: ['top-left', 'center-left', 'bottom-left', 'top-right', 'center-right', 'bottom-right', 'top-center', 'center-center', 'bottom-center']" + ) + elif caption_position in list_caption_position and caption_position is not None: + filtered_dict = { + k: v + for (k, v) in { + "top-left": "top-left", + "center-left": "center-left", + "bottom-left": "bottom-left", + "top-right": "top-right", + "center-right": "center-right", + "bottom-right": "bottom-right", + "top-center": "top-center", + "center-center": "center-center", + "bottom-center": "bottom-center", + }.items() + if caption_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["caption_position"] = filtered_dict[ + caption_position + ] + self.state["state"]["caption_text_width"] = caption_text_width + self.state["state"]["caption_font_size"] = caption_font_size + + list_caption_text_weight = ["normal", "bold"] + [None] + if caption_text_weight not in list_caption_text_weight: + raise ValueError( + f"`caption_text_weight` must be one of: ['normal', 'bold']" + ) + elif ( + caption_text_weight in list_caption_text_weight + and caption_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if caption_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["caption_text_weight"] = filtered_dict[ + caption_text_weight + ] + self.state["state"]["caption_text_color"] = caption_text_color + + list_caption_mode = ["text_legend", "html"] + [None] + if caption_mode not in list_caption_mode: + raise ValueError(f"`caption_mode` must be one of: ['text_legend', 'html']") + elif caption_mode in list_caption_mode and caption_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"text_legend": "text_legend", "html": "html"}.items() + if caption_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["caption_mode"] = filtered_dict[caption_mode] + + list_caption_text_align_h = ["start", "center", "end"] + [None] + if caption_text_align_h not in list_caption_text_align_h: + raise ValueError( + f"`caption_text_align_h` must be one of: ['start', 'center', 'end']" + ) + elif ( + caption_text_align_h in list_caption_text_align_h + and caption_text_align_h is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if caption_text_align_h in k + } + if len(filtered_dict) > 0: + self.state["state"]["caption_text_align_h"] = filtered_dict[ + caption_text_align_h + ] + + list_caption_text_align_v = ["flex-start", "center", "flex-end"] + [None] + if caption_text_align_v not in list_caption_text_align_v: + raise ValueError( + f"`caption_text_align_v` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + caption_text_align_v in list_caption_text_align_v + and caption_text_align_v is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if caption_text_align_v in k + } + if len(filtered_dict) > 0: + self.state["state"]["caption_text_align_v"] = filtered_dict[ + caption_text_align_v + ] + self.state["state"]["caption_image_width"] = caption_image_width + + list_caption_image_position = [ + "column", + "column-reverse", + "row", + "row-reverse", + ] + [None] + if caption_image_position not in list_caption_image_position: + raise ValueError( + f"`caption_image_position` must be one of: ['column', 'column-reverse', 'row', 'row-reverse']" + ) + elif ( + caption_image_position in list_caption_image_position + and caption_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "column": "column", + "column-reverse": "column-reverse", + "row": "row", + "row-reverse": "row-reverse", + }.items() + if caption_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["caption_image_position"] = filtered_dict[ + caption_image_position + ] + self.state["state"]["caption_space_between"] = caption_space_between + self.state["state"]["stage_duration"] = stage_duration + self.state["state"]["update_duration"] = update_duration + self.state["state"]["formatting"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["formatting"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["formatting"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["formatting"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["formatting"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["formatting"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["formatting"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["formatting"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["formatting"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_interactive_svg_details( + self, + svg_url: str = None, + svg_width_wide: float = None, + mobile_view: bool = None, + mobile_breakpoint: float = None, + mobile_svg_mode: str = None, + mobile_svg_url: str = None, + mobile_svg_width: float = None, + mobile_content_mode: str = None, + clickable_svg_animation: str = None, + clickable_svg_animation_duration: float = None, + clickable_svg_animation_config: bool = None, + clickable_svg_animation_attr: str = None, + clickable_svg_animation_values: str = None, + clickable_svg_animation_repeat: str = None, + text_panel_enabled: bool = None, + h3_default: Union[list, str] = None, + h3_size: float = None, + h4_default: Union[list, str] = None, + h4_size: float = None, + content_default: Union[list, str] = None, + content_size: float = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + svg_reset_fonts: bool = None, + show_css: bool = None, + stylesheet: Union[list, str] = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: interactive svg. + + + :param svg_url: SVG file. Flourish type hint: url, defaults to None. + :type svg_url: str, optional + :param svg_width_wide: Image width. The width in percentage of the image in standard wide-screen view. Flourish type hint: number, defaults to None. + :type svg_width_wide: float, optional + :param mobile_view: Different mobile view. Flourish type hint: boolean, defaults to None. + :type mobile_view: bool, optional + :param mobile_breakpoint: Breakpoint. The size in pixels at which to switch to mobile layout Flourish type hint: number, defaults to None. + :type mobile_breakpoint: float, optional + :param mobile_svg_mode: Image on mobile. Choices: none, same, different. Whether to show the image at all on mobile. Flourish type hint: string, defaults to None. + :type mobile_svg_mode: str, optional + :param mobile_svg_url: SVG file (mobile). Flourish type hint: url, defaults to None. + :type mobile_svg_url: str, optional + :param mobile_svg_width: Width. The width in percentage of the image on a mobile view. Flourish type hint: number, defaults to None. + :type mobile_svg_width: float, optional + :param mobile_content_mode: Mobile content mode. Choices: interactive, all, accordion. If turned on all content will display on load in mobile view. Flourish type hint: string, defaults to None. + :type mobile_content_mode: str, optional + :param clickable_svg_animation: Animation clickable elements. Choices: off, animation. Flourish type hint: string, defaults to None. + :type clickable_svg_animation: str, optional + :param clickable_svg_animation_duration: Duration. The duration of the highlight animation on each clickable element. Flourish type hint: number, defaults to None. + :type clickable_svg_animation_duration: float, optional + :param clickable_svg_animation_config: Advanced. Reveal settings to adjust the SVG Animation properties on clickable elements. See Mozilla docs for more detailsFlourish type hint: boolean, defaults to None. + :type clickable_svg_animation_config: bool, optional + :param clickable_svg_animation_attr: Attribute. Flourish type hint: string, defaults to None. + :type clickable_svg_animation_attr: str, optional + :param clickable_svg_animation_values: Values. Flourish type hint: string, defaults to None. + :type clickable_svg_animation_values: str, optional + :param clickable_svg_animation_repeat: Repeat. Flourish type hint: string, defaults to None. + :type clickable_svg_animation_repeat: str, optional + :param text_panel_enabled: Text panel enabled. Disable to only show text in popups. Flourish type hint: boolean, defaults to None. + :type text_panel_enabled: bool, optional + :param h3_default: Default heading. The text to show on load. Flourish type hint: text, defaults to None. + :type h3_default: Union[list, str], optional + :param h3_size: Size. Flourish type hint: number, defaults to None. + :type h3_size: float, optional + :param h4_default: Default subheading. The text to show on load. Flourish type hint: text, defaults to None. + :type h4_default: Union[list, str], optional + :param h4_size: Size. Flourish type hint: number, defaults to None. + :type h4_size: float, optional + :param content_default: Default text. The text to show on load. Flourish type hint: text, defaults to None. + :type content_default: Union[list, str], optional + :param content_size: Size. Flourish type hint: number, defaults to None. + :type content_size: float, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param svg_reset_fonts: Override fonts in SVG. If enabled, font-family styles will be removed in the SVG, allowing the text to be inherited from the current theme or settings. Flourish type hint: boolean, defaults to None. + :type svg_reset_fonts: bool, optional + :param show_css: Edit CSS. Flourish type hint: boolean, defaults to None. + :type show_css: bool, optional + :param stylesheet: Custom styles. Use the CSS class .clickable-element to target all interactive elements. When one is clicked, it has the CSS class is .highlighted and the others are .faded. The text for each clickable element is inside a .text-block, which is also .accordion in accordion mode. Flourish type hint: code, defaults to None. + :type stylesheet: Union[list, str], optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "popup": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + self.state["state"]["svg_url"] = svg_url + self.state["state"]["svg_width_wide"] = svg_width_wide + self.state["state"]["mobile_view"] = mobile_view + self.state["state"]["mobile_breakpoint"] = mobile_breakpoint + + list_mobile_svg_mode = ["none", "same", "different"] + [None] + if mobile_svg_mode not in list_mobile_svg_mode: + raise ValueError( + f"`mobile_svg_mode` must be one of: ['none', 'same', 'different']" + ) + elif mobile_svg_mode in list_mobile_svg_mode and mobile_svg_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "same": "same", + "different": "different", + }.items() + if mobile_svg_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["mobile_svg_mode"] = filtered_dict[mobile_svg_mode] + self.state["state"]["mobile_svg_url"] = mobile_svg_url + self.state["state"]["mobile_svg_width"] = mobile_svg_width + + list_mobile_content_mode = ["interactive", "all", "accordion"] + [None] + if mobile_content_mode not in list_mobile_content_mode: + raise ValueError( + f"`mobile_content_mode` must be one of: ['interactive', 'all', 'accordion']" + ) + elif ( + mobile_content_mode in list_mobile_content_mode + and mobile_content_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "interactive": "interactive", + "all": "all", + "accordion": "accordion", + }.items() + if mobile_content_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["mobile_content_mode"] = filtered_dict[ + mobile_content_mode + ] + + list_clickable_svg_animation = ["off", "animation"] + [None] + if clickable_svg_animation not in list_clickable_svg_animation: + raise ValueError( + f"`clickable_svg_animation` must be one of: ['off', 'animation']" + ) + elif ( + clickable_svg_animation in list_clickable_svg_animation + and clickable_svg_animation is not None + ): + filtered_dict = { + k: v + for (k, v) in {"off": "off", "animation": "animation"}.items() + if clickable_svg_animation in k + } + if len(filtered_dict) > 0: + self.state["state"]["clickable_svg_animation"] = filtered_dict[ + clickable_svg_animation + ] + self.state["state"][ + "clickable_svg_animation_duration" + ] = clickable_svg_animation_duration + self.state["state"][ + "clickable_svg_animation_config" + ] = clickable_svg_animation_config + self.state["state"][ + "clickable_svg_animation_attr" + ] = clickable_svg_animation_attr + self.state["state"][ + "clickable_svg_animation_values" + ] = clickable_svg_animation_values + self.state["state"][ + "clickable_svg_animation_repeat" + ] = clickable_svg_animation_repeat + self.state["state"]["text_panel_enabled"] = text_panel_enabled + + if ( + h3_default is not None + and len(h3_default) > 1 + and isinstance(h3_default, list) + ): + self.state["state"]["h3_default"] = " \n ".join(h3_default) + else: + self.state["state"]["h3_default"] = h3_default + + self.state["state"]["h3_size"] = h3_size + + if ( + h4_default is not None + and len(h4_default) > 1 + and isinstance(h4_default, list) + ): + self.state["state"]["h4_default"] = " \n ".join(h4_default) + else: + self.state["state"]["h4_default"] = h4_default + + self.state["state"]["h4_size"] = h4_size + + if ( + content_default is not None + and len(content_default) > 1 + and isinstance(content_default, list) + ): + self.state["state"]["content_default"] = " \n ".join(content_default) + else: + self.state["state"]["content_default"] = content_default + + self.state["state"]["content_size"] = content_size + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + self.state["state"]["svg_reset_fonts"] = svg_reset_fonts + self.state["state"]["show_css"] = show_css + + if ( + stylesheet is not None + and len(stylesheet) > 1 + and isinstance(stylesheet, list) + ): + self.state["state"]["stylesheet"] = " \n ".join(stylesheet) + else: + self.state["state"]["stylesheet"] = stylesheet + + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_line_bar_pie_details( + self, + dual_axis: bool = None, + secondary_series: float = None, + stack_sort: str = None, + facet_layout: str = None, + height_mode: str = None, + facet_aspect: float = None, + facet_aspect_mobile: float = None, + facet_aspect_breakpoint: float = None, + sort_mode: str = None, + chart_facet_columns_fixed: bool = None, + chart_facet_min_width: float = None, + chart_facet_max_width: float = None, + chart_facet_columns: float = None, + chart_facet_gutter_w: float = None, + chart_facet_gutter_h: float = None, + chart_facet_animation: str = None, + chart_facet_titles: bool = None, + chart_facet_title_align: str = None, + chart_facet_title_size: float = None, + chart_facet_title_unit: str = None, + chart_facet_title_color: str = None, + chart_facet_title_padding_top: float = None, + chart_facet_title_padding_bottom: float = None, + chart_facet_title_bg: str = None, + chart_facet_title_bg_color: str = None, + chart_facet_title_bg_padding: float = None, + x_axis_matching: bool = None, + x_axis_last_row_only: bool = None, + y_axis_matching: bool = None, + y_axis_first_col_only: bool = None, + y2_axis_matching: bool = None, + y2_axis_last_col_only: bool = None, + series_filter_mode: str = None, + series_control_multi_text: str = None, + series_control_multi_none_text: str = None, + series_control_select_text: str = None, + max_series: float = None, + series_control_background: str = None, + series_control_text: str = None, + series_control_border: str = None, + series_control_pill_background: str = None, + series_control_pill_text: str = None, + series_control_pill_radius: float = None, + series_control_single_all: bool = None, + series_control_single_all_text: str = None, + filter_rows_with_no_data: bool = None, + chart_series_filter_controls_control_type: str = None, + chart_series_filter_controls_control_styles: bool = None, + chart_series_filter_controls_control_title: str = None, + chart_series_filter_controls_button_group: bool = None, + chart_series_filter_controls_button_group_width_mode: str = None, + chart_series_filter_controls_button_group_width_fixed: float = None, + chart_series_filter_controls_dropdown_width_mode: str = None, + chart_series_filter_controls_dropdown_width_fixed: float = None, + chart_series_filter_controls_slider_width: float = None, + chart_series_filter_controls_slider_max_label_width: float = None, + chart_series_filter_controls_slider_step_time: float = None, + chart_series_filter_controls_slider_loop: bool = None, + chart_series_filter_controls_slider_restart_pause: float = None, + chart_series_filter_controls_sort: bool = None, + row_filter_control_all: bool = None, + row_filter_control_all_text: str = None, + chart_row_filter_controls_control_type: str = None, + chart_row_filter_controls_control_styles: bool = None, + chart_row_filter_controls_control_title: str = None, + chart_row_filter_controls_button_group: bool = None, + chart_row_filter_controls_button_group_width_mode: str = None, + chart_row_filter_controls_button_group_width_fixed: float = None, + chart_row_filter_controls_dropdown_width_mode: str = None, + chart_row_filter_controls_dropdown_width_fixed: float = None, + chart_row_filter_controls_slider_width: float = None, + chart_row_filter_controls_slider_max_label_width: float = None, + chart_row_filter_controls_slider_step_time: float = None, + chart_row_filter_controls_slider_loop: bool = None, + chart_row_filter_controls_slider_restart_pause: float = None, + chart_row_filter_controls_sort: bool = None, + log_control_y_visible: bool = None, + chart_log_control_y_filter_controls_control_type: str = None, + chart_log_control_y_filter_controls_control_styles: bool = None, + chart_log_control_y_filter_controls_control_title: str = None, + chart_log_control_y_filter_controls_button_group: bool = None, + chart_log_control_y_filter_controls_button_group_width_mode: str = None, + chart_log_control_y_filter_controls_button_group_width_fixed: float = None, + chart_log_control_y_filter_controls_dropdown_width_mode: str = None, + chart_log_control_y_filter_controls_dropdown_width_fixed: float = None, + chart_log_control_y_filter_controls_slider_width: float = None, + chart_log_control_y_filter_controls_slider_max_label_width: float = None, + chart_log_control_y_filter_controls_slider_step_time: float = None, + chart_log_control_y_filter_controls_slider_loop: bool = None, + chart_log_control_y_filter_controls_slider_restart_pause: float = None, + chart_log_control_y_filter_controls_sort: bool = None, + log_control_y_text_linear: str = None, + log_control_y_text_log: str = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_filter_controls_container_alignment: str = None, + chart_filter_controls_container_controls_spacing: float = None, + controls_position: str = None, + color_mode: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + line_width: float = None, + line_opacity: float = None, + line_stroke: bool = None, + line_curve: str = None, + line_dash_items: Union[list, str] = None, + line_dash_width: float = None, + line_dash_space_width: float = None, + line_interpolate: bool = None, + shade_between_lines: bool = None, + shade_between_lines_config: Union[list, str] = None, + shade_between_lines_color: str = None, + shade_between_lines_opacity: float = None, + area_opacity: float = None, + dot_mode: str = None, + dot_opacity: float = None, + dot_radius: float = None, + dot_radius_last: float = None, + dot_hollow: bool = None, + bar_height: float = None, + column_opacity: float = None, + uniform_column_width: bool = None, + uniform_bar_height: bool = None, + column_padding_inner: float = None, + column_padding_in_group: float = None, + column_padding_stack: float = None, + column_stroke: bool = None, + column_stroke_opacity: float = None, + column_stroke_color: str = None, + donut_inner_radius: float = None, + donut_corner_radius: float = None, + donut_pad_angle: float = None, + donut_auto_scale: bool = None, + bar_labels_above: bool = None, + bar_labels_color: str = None, + bar_labels_font_size: float = None, + bar_labels_weight: str = None, + line_end_labels: bool = None, + chart_line_labels_max_width: float = None, + chart_line_labels_overlap_mode: str = None, + chart_line_labels_spreading_margin: float = None, + chart_line_labels_data_point_margin: float = None, + chart_line_labels_show_only_labels: Union[list, str] = None, + chart_line_labels_text_color: str = None, + chart_line_labels_text_size: float = None, + chart_line_labels_text_bg_color: str = None, + chart_line_labels_text_bg_size: float = None, + chart_line_labels_text_line_height: float = None, + chart_line_labels_text_max_lines: float = None, + chart_line_labels_text_weight: str = None, + chart_line_labels_lines: str = None, + chart_line_labels_line_style: str = None, + chart_line_labels_line_color: str = None, + chart_line_labels_line_width: float = None, + chart_line_labels_line_range: float = None, + chart_line_labels_line_padding: float = None, + labels: bool = None, + labels_hide_overlaps: bool = None, + labels_dot_center: bool = None, + labels_column_align: str = None, + labels_column_padding: float = None, + labels_bar_align: str = None, + labels_bar_autohide: bool = None, + labels_color_mode: str = None, + labels_fixed_color: str = None, + labels_font_weight: str = None, + labels_font_size_mode: str = None, + labels_font_size: float = None, + labels_bg_mode: str = None, + labels_bg_size: float = None, + labels_content: str = None, + stack_labels: bool = None, + stack_labels_color: str = None, + stack_labels_font_size: float = None, + stack_labels_weight: str = None, + chart_x_axis_axis_position: str = None, + chart_x_axis_y_axis_position: str = None, + chart_x_axis_numeric_scale_type: str = None, + chart_x_axis_linear_min: float = None, + chart_x_axis_linear_max: float = None, + chart_x_axis_log_min: float = None, + chart_x_axis_log_max: float = None, + chart_x_axis_datetime_min: str = None, + chart_x_axis_datetime_max: str = None, + chart_x_axis_flip: bool = None, + chart_x_axis_show_scale_settings: bool = None, + chart_x_axis_nice: bool = None, + chart_x_axis_zero_axis: str = None, + chart_x_axis_title_mode: str = None, + chart_x_axis_title: str = None, + chart_x_axis_title_styling: bool = None, + chart_x_axis_title_weight: str = None, + chart_x_axis_title_color: str = None, + chart_x_axis_title_size: float = None, + chart_x_axis_title_padding: float = None, + chart_x_axis_tick_label_position: str = None, + chart_x_axis_tick_label_styling: bool = None, + chart_x_axis_tick_label_size: float = None, + chart_x_axis_tick_label_color: str = None, + chart_x_axis_tick_padding: float = None, + chart_x_axis_tick_label_angle: str = None, + chart_x_axis_tick_label_weight: str = None, + chart_x_axis_tick_label_max_lines: float = None, + chart_x_axis_tick_label_line_height: float = None, + chart_x_axis_tick_label_space_mode: str = None, + chart_x_axis_tick_label_space: float = None, + chart_x_axis_tick_mode: str = None, + chart_x_axis_tick_number: float = None, + chart_x_axis_tick_custom: Union[list, str] = None, + chart_x_axis_line_and_tick_color: str = None, + chart_x_axis_line_and_tick_width: float = None, + chart_x_axis_tick_length: float = None, + chart_x_axis_tick_side: str = None, + chart_x_axis_line_visible: bool = None, + chart_x_axis_edge_padding: float = None, + chart_x_axis_gridlines_visible: bool = None, + chart_x_axis_gridlines_styling: bool = None, + chart_x_axis_gridline_color: str = None, + chart_x_axis_gridline_style: str = None, + chart_x_axis_gridline_width: float = None, + chart_x_axis_gridline_category_dividers: bool = None, + chart_x_axis_gridline_category_dividers_extend: bool = None, + chart_y_axis_axis_visible: bool = None, + chart_y_axis_numeric_scale_type: str = None, + chart_y_axis_linear_min: float = None, + chart_y_axis_linear_max: float = None, + chart_y_axis_log_min: float = None, + chart_y_axis_log_max: float = None, + chart_y_axis_datetime_min: str = None, + chart_y_axis_datetime_max: str = None, + chart_y_axis_flip: bool = None, + chart_y_axis_show_scale_settings: bool = None, + chart_y_axis_nice: bool = None, + chart_y_axis_zero_axis: str = None, + chart_y_axis_title_mode: str = None, + chart_y_axis_title: str = None, + chart_y_axis_title_styling: bool = None, + chart_y_axis_title_position: str = None, + chart_y_axis_title_weight: str = None, + chart_y_axis_title_color: str = None, + chart_y_axis_title_size: float = None, + chart_y_axis_title_padding: float = None, + chart_y_axis_tick_label_position: str = None, + chart_y_axis_tick_label_styling: bool = None, + chart_y_axis_tick_label_size: float = None, + chart_y_axis_tick_label_color: str = None, + chart_y_axis_tick_padding: float = None, + chart_y_axis_tick_label_angle: str = None, + chart_y_axis_tick_label_weight: str = None, + chart_y_axis_tick_label_max_lines: float = None, + chart_y_axis_tick_label_line_height: float = None, + chart_y_axis_tick_label_space_mode: str = None, + chart_y_axis_tick_label_space: float = None, + chart_y_axis_tick_mode: str = None, + chart_y_axis_tick_number: float = None, + chart_y_axis_tick_custom: Union[list, str] = None, + chart_y_axis_line_and_tick_color: str = None, + chart_y_axis_line_and_tick_width: float = None, + chart_y_axis_tick_length: float = None, + chart_y_axis_tick_side: str = None, + chart_y_axis_line_visible: bool = None, + chart_y_axis_edge_padding: float = None, + chart_y_axis_gridlines_visible: bool = None, + chart_y_axis_gridlines_styling: bool = None, + chart_y_axis_gridline_color: str = None, + chart_y_axis_gridline_style: str = None, + chart_y_axis_gridline_width: float = None, + chart_y_axis_gridline_category_dividers: bool = None, + chart_y_axis_gridline_category_dividers_extend: bool = None, + chart_secondary_y_axis_axis_visible: bool = None, + chart_secondary_y_axis_numeric_scale_type: str = None, + chart_secondary_y_axis_linear_min: float = None, + chart_secondary_y_axis_linear_max: float = None, + chart_secondary_y_axis_log_min: float = None, + chart_secondary_y_axis_log_max: float = None, + chart_secondary_y_axis_datetime_min: str = None, + chart_secondary_y_axis_datetime_max: str = None, + chart_secondary_y_axis_flip: bool = None, + chart_secondary_y_axis_show_scale_settings: bool = None, + chart_secondary_y_axis_nice: bool = None, + chart_secondary_y_axis_zero_axis: str = None, + chart_secondary_y_axis_title_mode: str = None, + chart_secondary_y_axis_title: str = None, + chart_secondary_y_axis_title_styling: bool = None, + chart_secondary_y_axis_title_position: str = None, + chart_secondary_y_axis_title_weight: str = None, + chart_secondary_y_axis_title_color: str = None, + chart_secondary_y_axis_title_size: float = None, + chart_secondary_y_axis_title_padding: float = None, + chart_secondary_y_axis_tick_label_position: str = None, + chart_secondary_y_axis_tick_label_styling: bool = None, + chart_secondary_y_axis_tick_label_size: float = None, + chart_secondary_y_axis_tick_label_color: str = None, + chart_secondary_y_axis_tick_padding: float = None, + chart_secondary_y_axis_tick_label_angle: str = None, + chart_secondary_y_axis_tick_label_weight: str = None, + chart_secondary_y_axis_tick_label_max_lines: float = None, + chart_secondary_y_axis_tick_label_line_height: float = None, + chart_secondary_y_axis_tick_label_space_mode: str = None, + chart_secondary_y_axis_tick_label_space: float = None, + chart_secondary_y_axis_tick_mode: str = None, + chart_secondary_y_axis_tick_number: float = None, + chart_secondary_y_axis_tick_custom: Union[list, str] = None, + chart_secondary_y_axis_line_and_tick_color: str = None, + chart_secondary_y_axis_line_and_tick_width: float = None, + chart_secondary_y_axis_tick_length: float = None, + chart_secondary_y_axis_tick_side: str = None, + chart_secondary_y_axis_line_visible: bool = None, + chart_secondary_y_axis_edge_padding: float = None, + chart_secondary_y_axis_gridlines_visible: bool = None, + chart_secondary_y_axis_gridlines_styling: bool = None, + chart_secondary_y_axis_gridline_color: str = None, + chart_secondary_y_axis_gridline_style: str = None, + chart_secondary_y_axis_gridline_width: float = None, + chart_secondary_y_axis_gridline_category_dividers: bool = None, + chart_secondary_y_axis_gridline_category_dividers_extend: bool = None, + chart_background_background_color_enabled: bool = None, + chart_background_background_image_enabled: bool = None, + chart_background_background_color: str = None, + chart_background_background_image_src: str = None, + chart_background_background_image_size: str = None, + chart_background_background_image_position: str = None, + number_format_labels_prefix: str = None, + number_format_labels_suffix: str = None, + number_format_labels_n_dec: float = None, + number_format_labels_advanced: bool = None, + number_format_labels_negative_sign: str = None, + number_format_labels_strip_zeros: bool = None, + number_format_labels_strip_separator: bool = None, + number_format_labels_transform_labels: bool = None, + number_format_labels_transform: str = None, + number_format_labels_multiply_divide_constant: float = None, + number_format_labels_exponentiate_constant: float = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + number_format_prop: bool = None, + chart_secondary_number_date_format_prefix: str = None, + chart_secondary_number_date_format_suffix: str = None, + chart_secondary_number_date_format_n_dec: float = None, + chart_secondary_number_date_format_advanced: bool = None, + chart_secondary_number_date_format_negative_sign: str = None, + chart_secondary_number_date_format_strip_zeros: bool = None, + chart_secondary_number_date_format_strip_separator: bool = None, + chart_secondary_number_date_format_transform_labels: bool = None, + chart_secondary_number_date_format_transform: str = None, + chart_secondary_number_date_format_multiply_divide_constant: float = None, + chart_secondary_number_date_format_exponentiate_constant: float = None, + legend_mode: str = None, + legend_filter_mode: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + legend_position: str = None, + text_legend: str = None, + text_legend_title: bool = None, + text_legend_subtitle: bool = None, + text_legend_bold: bool = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + popup_color_headers: bool = None, + show_series_text: bool = None, + popup_series_text: Union[list, str] = None, + chart_axes_highlights_placement: str = None, + chart_axes_highlights_x_enabled: bool = None, + chart_axes_highlights_x_lines: Union[list, str] = None, + chart_axes_highlights_x_line_color: str = None, + chart_axes_highlights_x_line_width: float = None, + chart_axes_highlights_x_line_dash: float = None, + chart_axes_highlights_x_areas: Union[list, str] = None, + chart_axes_highlights_x_area_color: str = None, + chart_axes_highlights_x_area_opacity: float = None, + chart_axes_highlights_x_area_texture: str = None, + chart_axes_highlights_x_label_vertical: bool = None, + chart_axes_highlights_x_label_y_position: str = None, + chart_axes_highlights_x_label_x_position: str = None, + chart_axes_highlights_x_label_max_width: float = None, + chart_axes_highlights_x_font_size: float = None, + chart_axes_highlights_x_font_weight: str = None, + chart_axes_highlights_x_label_color: str = None, + chart_axes_highlights_x_shadow_color: str = None, + chart_axes_highlights_x_shadow_enabled: bool = None, + chart_axes_highlights_y_enabled: bool = None, + chart_axes_highlights_y_lines: Union[list, str] = None, + chart_axes_highlights_y_line_color: str = None, + chart_axes_highlights_y_line_width: float = None, + chart_axes_highlights_y_line_dash: float = None, + chart_axes_highlights_y_areas: Union[list, str] = None, + chart_axes_highlights_y_area_color: str = None, + chart_axes_highlights_y_area_opacity: float = None, + chart_axes_highlights_y_area_texture: str = None, + chart_axes_highlights_y_label_x_position: str = None, + chart_axes_highlights_y_label_y_position: str = None, + chart_axes_highlights_y_label_max_width: float = None, + chart_axes_highlights_y_font_size: float = None, + chart_axes_highlights_y_font_weight: str = None, + chart_axes_highlights_y_label_color: str = None, + chart_axes_highlights_y_shadow_color: str = None, + chart_axes_highlights_y_shadow_enabled: bool = None, + annotations_styles: bool = None, + chart_annotations_defaults_text_weight: str = None, + chart_annotations_defaults_text_size: float = None, + chart_annotations_defaults_text_color: str = None, + chart_annotations_defaults_label_width: float = None, + chart_annotations_defaults_text_background_mode: str = None, + chart_annotations_defaults_text_bg: str = None, + chart_annotations_defaults_label_bg: str = None, + chart_annotations_defaults_text_alignment: str = None, + chart_annotations_defaults_popup_position: str = None, + chart_annotations_defaults_line_marker: str = None, + chart_annotations_defaults_stroke_width: float = None, + chart_annotations_defaults_stroke_color: str = None, + chart_annotations_defaults_connector_extend_line: str = None, + data_trans_duration: float = None, + animate_on_load: bool = None, + data_trans_bind_series: bool = None, + data_trans_bind_data_points: bool = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + chart_url_settings_enabled: bool = None, + chart_url_settings_whitelist: Union[list, str] = None, + ): + """ + Set chart details for: line, bar and pie charts. + + + :param dual_axis: Axis type. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type dual_axis: bool, optional + :param secondary_series: Number of combo lines. In line-bar mode , sets how many of your value columns are treated as lines. In line-line mode , sets how many lines use the right axis. The order counts from the start, so if you want column B as a line and A as a column, set the order in the column bindings to "B, A". Flourish type hint: number, defaults to None. + :type secondary_series: float, optional + :param stack_sort: Stack sort mode. Choices: data, ascending, descending. Whether each stack is in the default order or sorted by value. Use ascending or descending with a stacked area chart to make a "bump" area chart. Flourish type hint: string, defaults to None. + :type stack_sort: str, optional + :param facet_layout: Grid mode. Choices: single, facets. By default, Grid of charts creates a mini chart for each series. If Grid of charts is set in your column bindings, a mini chart will be created for each unique value in your specified column. Flourish type hint: string, defaults to None. + :type facet_layout: str, optional + :param height_mode: Height mode. Choices: auto, fill_space, aspect. Auto: sets the height based on the chart type, data and width. Standard: uses the default Flourish responsive sizing. Aspect ratio: sets the aspect of each plot. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to None. + :type height_mode: str, optional + :param facet_aspect: Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type facet_aspect: float, optional + :param facet_aspect_mobile: Aspect (mobile). Aspect of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type facet_aspect_mobile: float, optional + :param facet_aspect_breakpoint: Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to None. + :type facet_aspect_breakpoint: float, optional + :param sort_mode: Sort mode. Choices: data, value, label. Flourish type hint: string, defaults to None. + :type sort_mode: str, optional + :param chart_facet_columns_fixed: Number of columns. Choices: False, True. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to None. + :type chart_facet_columns_fixed: bool, optional + :param chart_facet_min_width: Min chart width. Determines how many columns of charts are displayed in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_min_width: float, optional + :param chart_facet_max_width: Max chart width. Determines how many columns of charts are in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_max_width: float, optional + :param chart_facet_columns: Fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_columns: float, optional + :param chart_facet_gutter_w: Horizontal margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_w: float, optional + :param chart_facet_gutter_h: Vertical margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_h: float, optional + :param chart_facet_animation: On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to None. + :type chart_facet_animation: str, optional + :param chart_facet_titles: Show titles. Flourish type hint: boolean, defaults to None. + :type chart_facet_titles: bool, optional + :param chart_facet_title_align: Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to None. + :type chart_facet_title_align: str, optional + :param chart_facet_title_size: Size. Relative to the width of the chart. Flourish type hint: number, defaults to None. + :type chart_facet_title_size: float, optional + :param chart_facet_title_unit: Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to None. + :type chart_facet_title_unit: str, optional + :param chart_facet_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_color: str, optional + :param chart_facet_title_padding_top: Space above. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_top: float, optional + :param chart_facet_title_padding_bottom: Space below. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_bottom: float, optional + :param chart_facet_title_bg: Background. Choices: none, full, text. Flourish type hint: string, defaults to None. + :type chart_facet_title_bg: str, optional + :param chart_facet_title_bg_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_bg_color: str, optional + :param chart_facet_title_bg_padding: Padding. Horizontal space between text and background. Flourish type hint: number, defaults to None. + :type chart_facet_title_bg_padding: float, optional + :param x_axis_matching: Same across grid. Ensure the X scale is the same across the grid. Flourish type hint: boolean, defaults to None. + :type x_axis_matching: bool, optional + :param x_axis_last_row_only: Last row only. Only show the X axis on the last row, where possible. Ignored if the X axis is not positioned at the bottom. Flourish type hint: boolean, defaults to None. + :type x_axis_last_row_only: bool, optional + :param y_axis_matching: Same across grid. Ensure the Y scale is the same across the grid. Flourish type hint: boolean, defaults to None. + :type y_axis_matching: bool, optional + :param y_axis_first_col_only: First column only. Only show the Y axis on the first column of the grid, where possible. Flourish type hint: boolean, defaults to None. + :type y_axis_first_col_only: bool, optional + :param y2_axis_matching: Same across grid. Ensure the secondary Y scale is the same across the grid. Flourish type hint: boolean, defaults to None. + :type y2_axis_matching: bool, optional + :param y2_axis_last_col_only: Last column only. Only show the secondary Y axis on the last column of the grid, where possible. Flourish type hint: boolean, defaults to None. + :type y2_axis_last_col_only: bool, optional + :param series_filter_mode: Series filter. Choices: none, single, multi. Filter control for series/columns. The user can also filter by clicking on the legend, except in single select mode. Use the animation settings panel to determine whether series animate when changing the filter. Flourish type hint: string, defaults to None. + :type series_filter_mode: str, optional + :param series_control_multi_text: Placeholder text. Flourish type hint: string, defaults to None. + :type series_control_multi_text: str, optional + :param series_control_multi_none_text: No more results text. Flourish type hint: string, defaults to None. + :type series_control_multi_none_text: str, optional + :param series_control_select_text: Select text. Flourish type hint: string, defaults to None. + :type series_control_select_text: str, optional + :param max_series: Max series to show. Limits the number of series/columns that will be visualized at once. Flourish type hint: number, defaults to None. + :type max_series: float, optional + :param series_control_background: Background. Flourish type hint: color, defaults to None. + :type series_control_background: str, optional + :param series_control_text: Text. Flourish type hint: color, defaults to None. + :type series_control_text: str, optional + :param series_control_border: Border. Flourish type hint: color, defaults to None. + :type series_control_border: str, optional + :param series_control_pill_background: Background. Flourish type hint: color, defaults to None. + :type series_control_pill_background: str, optional + :param series_control_pill_text: Text. Flourish type hint: color, defaults to None. + :type series_control_pill_text: str, optional + :param series_control_pill_radius: Border radius. Flourish type hint: number, defaults to None. + :type series_control_pill_radius: float, optional + :param series_control_single_all: Include "All". Flourish type hint: boolean, defaults to None. + :type series_control_single_all: bool, optional + :param series_control_single_all_text: Name for "All". Flourish type hint: string, defaults to None. + :type series_control_single_all_text: str, optional + :param filter_rows_with_no_data: Filter rows that have no data. This setting filters rows that have no data, this is useful in combination with filters and datasets that have a lot of empty cells. Flourish type hint: boolean, defaults to None. + :type filter_rows_with_no_data: bool, optional + :param chart_series_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_series_filter_controls_control_type: str, optional + :param chart_series_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_series_filter_controls_control_styles: bool, optional + :param chart_series_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_series_filter_controls_control_title: str, optional + :param chart_series_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_series_filter_controls_button_group: bool, optional + :param chart_series_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_series_filter_controls_button_group_width_mode: str, optional + :param chart_series_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_series_filter_controls_button_group_width_fixed: float, optional + :param chart_series_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_series_filter_controls_dropdown_width_mode: str, optional + :param chart_series_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_series_filter_controls_dropdown_width_fixed: float, optional + :param chart_series_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_series_filter_controls_slider_width: float, optional + :param chart_series_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_series_filter_controls_slider_max_label_width: float, optional + :param chart_series_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_series_filter_controls_slider_step_time: float, optional + :param chart_series_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_series_filter_controls_slider_loop: bool, optional + :param chart_series_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_series_filter_controls_slider_restart_pause: float, optional + :param chart_series_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_series_filter_controls_sort: bool, optional + :param row_filter_control_all: Include "All". Flourish type hint: boolean, defaults to None. + :type row_filter_control_all: bool, optional + :param row_filter_control_all_text: Name for "All". Flourish type hint: string, defaults to None. + :type row_filter_control_all_text: str, optional + :param chart_row_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_row_filter_controls_control_type: str, optional + :param chart_row_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_row_filter_controls_control_styles: bool, optional + :param chart_row_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_row_filter_controls_control_title: str, optional + :param chart_row_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_row_filter_controls_button_group: bool, optional + :param chart_row_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_row_filter_controls_button_group_width_mode: str, optional + :param chart_row_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_row_filter_controls_button_group_width_fixed: float, optional + :param chart_row_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_row_filter_controls_dropdown_width_mode: str, optional + :param chart_row_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_row_filter_controls_dropdown_width_fixed: float, optional + :param chart_row_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_row_filter_controls_slider_width: float, optional + :param chart_row_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_row_filter_controls_slider_max_label_width: float, optional + :param chart_row_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_row_filter_controls_slider_step_time: float, optional + :param chart_row_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_row_filter_controls_slider_loop: bool, optional + :param chart_row_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_row_filter_controls_slider_restart_pause: float, optional + :param chart_row_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_row_filter_controls_sort: bool, optional + :param log_control_y_visible: Show log control for Y axis. Adds a tabbed control to allow users to switch between log and linear Y scales. Flourish type hint: boolean, defaults to None. + :type log_control_y_visible: bool, optional + :param chart_log_control_y_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_log_control_y_filter_controls_control_type: str, optional + :param chart_log_control_y_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_log_control_y_filter_controls_control_styles: bool, optional + :param chart_log_control_y_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_log_control_y_filter_controls_control_title: str, optional + :param chart_log_control_y_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_log_control_y_filter_controls_button_group: bool, optional + :param chart_log_control_y_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_log_control_y_filter_controls_button_group_width_mode: str, optional + :param chart_log_control_y_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_log_control_y_filter_controls_button_group_width_fixed: float, optional + :param chart_log_control_y_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_log_control_y_filter_controls_dropdown_width_mode: str, optional + :param chart_log_control_y_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_log_control_y_filter_controls_dropdown_width_fixed: float, optional + :param chart_log_control_y_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_log_control_y_filter_controls_slider_width: float, optional + :param chart_log_control_y_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_log_control_y_filter_controls_slider_max_label_width: float, optional + :param chart_log_control_y_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_log_control_y_filter_controls_slider_step_time: float, optional + :param chart_log_control_y_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_log_control_y_filter_controls_slider_loop: bool, optional + :param chart_log_control_y_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_log_control_y_filter_controls_slider_restart_pause: float, optional + :param chart_log_control_y_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_log_control_y_filter_controls_sort: bool, optional + :param log_control_y_text_linear: Linear text. Flourish type hint: string, defaults to None. + :type log_control_y_text_linear: str, optional + :param log_control_y_text_log: Log text. Flourish type hint: string, defaults to None. + :type log_control_y_text_log: str, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_filter_controls_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_filter_controls_container_alignment: str, optional + :param chart_filter_controls_container_controls_spacing: Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to None. + :type chart_filter_controls_container_controls_spacing: float, optional + :param controls_position: Control position. Choices: log_series_row, series_log_row, log_row_series, series_row_log, row_log_series, row_series_log. If you have two or more controls turned on for your chart, you can change the order the controls appear. Flourish type hint: string, defaults to None. + :type controls_position: str, optional + :param color_mode: Color mode. Choices: column, row. By column will set the colors by series. Each column listed in the value column binding in the datasheet will have a different color. By row will instead set the color depending on the datas label/time column binding. Flourish type hint: string, defaults to None. + :type color_mode: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param line_width: Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type line_width: float, optional + :param line_opacity: Opacity. Flourish type hint: number, defaults to None. + :type line_opacity: float, optional + :param line_stroke: Outline. Add a stroke around your lines to enhance visibility when overlapping. Flourish type hint: boolean, defaults to None. + :type line_stroke: bool, optional + :param line_curve: Line curve. Choices: curve_linear, curve_monotone_x, curve_natural, curve_step, curve_step_before, curve_step_after. Flourish type hint: string, defaults to None. + :type line_curve: str, optional + :param line_dash_items: Dashed lines. Specify the series that you would like to display with a dashed line. Multiple dashed lines can be set using multiple lines. For example: Party 1 Party 2 Party 3. Flourish type hint: text, defaults to None. + :type line_dash_items: Union[list, str], optional + :param line_dash_width: Dash width. Flourish type hint: number, defaults to None. + :type line_dash_width: float, optional + :param line_dash_space_width: Space width. Flourish type hint: number, defaults to None. + :type line_dash_space_width: float, optional + :param line_interpolate: Missing data points. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type line_interpolate: bool, optional + :param shade_between_lines: Shade areas between lines. Shade the gap between any two lines on your chart. Flourish type hint: boolean, defaults to None. + :type shade_between_lines: bool, optional + :param shade_between_lines_config: Which lines to shade between. Specify each area as a pair of line names separated by `::`. For example: Series A :: Series B Series C :: Series D You can optionally add a specific color and opacity for each area, e.g. `Series A :: Series B :: red :: 0.1`. Flourish type hint: text, defaults to None. + :type shade_between_lines_config: Union[list, str], optional + :param shade_between_lines_color: Color. Flourish type hint: color, defaults to None. + :type shade_between_lines_color: str, optional + :param shade_between_lines_opacity: Opacity. Flourish type hint: number, defaults to None. + :type shade_between_lines_opacity: float, optional + :param area_opacity: Opacity. Flourish type hint: number, defaults to None. + :type area_opacity: float, optional + :param dot_mode: Choices: auto, on, off. " Auto will automatically show dots on lines if fewer than 250 data points. Note: avoid showing dots for large datasets since it can lead to poor performance issues and poor-looking charts". Flourish type hint: string, defaults to None. + :type dot_mode: str, optional + :param dot_opacity: Opacity. Flourish type hint: number, defaults to None. + :type dot_opacity: float, optional + :param dot_radius: Radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type dot_radius: float, optional + :param dot_radius_last: Final dot scale (%). Making the last point on a line larger can help emphasise the final value. This will usually be the dot furthest right on the axis. Flourish type hint: number, defaults to None. + :type dot_radius_last: float, optional + :param dot_hollow: Hollow. Flourish type hint: boolean, defaults to None. + :type dot_hollow: bool, optional + :param bar_height: Bar height. The approximate height of the bar, the exact height depends on padding and label style. Specified in rems Ignored if the chart is embedded at a fixed height. Flourish type hint: number, defaults to None. + :type bar_height: float, optional + :param column_opacity: Bar opacity. Flourish type hint: number, defaults to None. + :type column_opacity: float, optional + :param uniform_column_width: Uniform column width. Flourish type hint: boolean, defaults to None. + :type uniform_column_width: bool, optional + :param uniform_bar_height: Uniform bar height. Flourish type hint: boolean, defaults to None. + :type uniform_bar_height: bool, optional + :param column_padding_inner: Spacing (main). Space between bar stacks or groups, as a % of the width of a whole bar stack or group. Flourish type hint: number, defaults to None. + :type column_padding_inner: float, optional + :param column_padding_in_group: Spacing (in group). Space between bars in groups, as a % of the width of a single bar in the group. Ignored if only a single series is selected. Flourish type hint: number, defaults to None. + :type column_padding_in_group: float, optional + :param column_padding_stack: Spacing (in stack). Space each bar in the stack, in tenths of a rem Flourish type hint: number, defaults to None. + :type column_padding_stack: float, optional + :param column_stroke: Outline. Add a stroke around your columns or bars (same color as text). Flourish type hint: boolean, defaults to None. + :type column_stroke: bool, optional + :param column_stroke_opacity: Outline opacity. Flourish type hint: number, defaults to None. + :type column_stroke_opacity: float, optional + :param column_stroke_color: Outline color. Flourish type hint: color, defaults to None. + :type column_stroke_color: str, optional + :param donut_inner_radius: Doughnut hole (%). Flourish type hint: number, defaults to None. + :type donut_inner_radius: float, optional + :param donut_corner_radius: Corner curve (pixels). Flourish type hint: number, defaults to None. + :type donut_corner_radius: float, optional + :param donut_pad_angle: Segment padding (degrees). Flourish type hint: number, defaults to None. + :type donut_pad_angle: float, optional + :param donut_auto_scale: Scale pies based on data. Scale each pie chart in the grid so that the area of each pie/donut reflect its value. Flourish type hint: boolean, defaults to None. + :type donut_auto_scale: bool, optional + :param bar_labels_above: Label style. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type bar_labels_above: bool, optional + :param bar_labels_color: Color. Flourish type hint: color, defaults to None. + :type bar_labels_color: str, optional + :param bar_labels_font_size: Size. When in Standard or Aspect ratio height mode, the font size of the labels will be limited to the space available. In remsFlourish type hint: number, defaults to None. + :type bar_labels_font_size: float, optional + :param bar_labels_weight: Choices: 600, 400. Flourish type hint: string, defaults to None. + :type bar_labels_weight: str, optional + :param line_end_labels: Show labels on lines. Show series labels on the end of lines if theres enough space. Flourish type hint: boolean, defaults to None. + :type line_end_labels: bool, optional + :param chart_line_labels_max_width: Max label width. The maximum allowed label width. Flourish type hint: number, defaults to None. + :type chart_line_labels_max_width: float, optional + :param chart_line_labels_overlap_mode: Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to None. + :type chart_line_labels_overlap_mode: str, optional + :param chart_line_labels_spreading_margin: Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to None. + :type chart_line_labels_spreading_margin: float, optional + :param chart_line_labels_data_point_margin: Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to None. + :type chart_line_labels_data_point_margin: float, optional + :param chart_line_labels_show_only_labels: Show only certain labels. Manually specify which labels youd like to display (one entry per line that should match headers from the Values columns). Flourish type hint: text, defaults to None. + :type chart_line_labels_show_only_labels: Union[list, str], optional + :param chart_line_labels_text_color: Color. If cleared, uses the main text color from the Layout settings panel. Flourish type hint: color, defaults to None. + :type chart_line_labels_text_color: str, optional + :param chart_line_labels_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_line_labels_text_size: float, optional + :param chart_line_labels_text_bg_color: Outline. If cleared, uses the main background color from the Layout settings panel. Flourish type hint: color, defaults to None. + :type chart_line_labels_text_bg_color: str, optional + :param chart_line_labels_text_bg_size: Outline width. As a % of the font size. Flourish type hint: number, defaults to None. + :type chart_line_labels_text_bg_size: float, optional + :param chart_line_labels_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_line_labels_text_line_height: float, optional + :param chart_line_labels_text_max_lines: Max lines. The max number of lines for each label. Flourish type hint: number, defaults to None. + :type chart_line_labels_text_max_lines: float, optional + :param chart_line_labels_text_weight: Weight. Choices: 400, 700. Flourish type hint: string, defaults to None. + :type chart_line_labels_text_weight: str, optional + :param chart_line_labels_lines: Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to None. + :type chart_line_labels_lines: str, optional + :param chart_line_labels_line_style: Line style. Choices: straight, step. Flourish type hint: string, defaults to None. + :type chart_line_labels_line_style: str, optional + :param chart_line_labels_line_color: Color. If cleared, uses the main text color from the Layout settings panel. Flourish type hint: color, defaults to None. + :type chart_line_labels_line_color: str, optional + :param chart_line_labels_line_width: Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to None. + :type chart_line_labels_line_width: float, optional + :param chart_line_labels_line_range: Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to None. + :type chart_line_labels_line_range: float, optional + :param chart_line_labels_line_padding: Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to None. + :type chart_line_labels_line_padding: float, optional + :param labels: Show labels on data points. Flourish type hint: boolean, defaults to None. + :type labels: bool, optional + :param labels_hide_overlaps: Hide overlapping labels. Flourish type hint: boolean, defaults to None. + :type labels_hide_overlaps: bool, optional + :param labels_dot_center: Position labels on center of dot. Flourish type hint: boolean, defaults to None. + :type labels_dot_center: bool, optional + :param labels_column_align: Bar label alignment. Choices: bottom, middle, top, above. The final above option puts the labels above the bars in standard column charts. In stacked charts, where the space above the stack is reserved for stack total the labels falls back to top alignment. Flourish type hint: string, defaults to None. + :type labels_column_align: str, optional + :param labels_column_padding: Padding. Space above or below, as a proportion of the font size in rems Flourish type hint: number, defaults to None. + :type labels_column_padding: float, optional + :param labels_bar_align: Label alignment. Choices: left, center, right, out. In stacked bar charts the final out (outside of bar) option falls back to right alignment, since the space after the stack is reserved for stack total labels (see below). Flourish type hint: string, defaults to None. + :type labels_bar_align: str, optional + :param labels_bar_autohide: Hide if too big. Turn off to force labels to show, even if they will overflow the bars. Ignored when labels are not inside the bars. Flourish type hint: boolean, defaults to None. + :type labels_bar_autohide: bool, optional + :param labels_color_mode: Text color. Choices: auto, data, contrast, fixed. Contrast mode is black or white depending on the color of the data point (or the background color for labels positioned over the background). Flourish type hint: string, defaults to None. + :type labels_color_mode: str, optional + :param labels_fixed_color: Color. Flourish type hint: color, defaults to None. + :type labels_fixed_color: str, optional + :param labels_font_weight: Weight. Choices: 600, 400. Flourish type hint: string, defaults to None. + :type labels_font_weight: str, optional + :param labels_font_size_mode: Size. Choices: auto, fixed. Flourish type hint: string, defaults to None. + :type labels_font_size_mode: str, optional + :param labels_font_size: Size. Flourish type hint: number, defaults to None. + :type labels_font_size: float, optional + :param labels_bg_mode: Outline. Choices: on, off. A text outline/background can make the text more readable by increasing contrast. Flourish type hint: string, defaults to None. + :type labels_bg_mode: str, optional + :param labels_bg_size: Size. Size of the background, as % of text size. Flourish type hint: number, defaults to None. + :type labels_bg_size: float, optional + :param labels_content: Label content. Choices: auto, value, label, both. Flourish type hint: string, defaults to None. + :type labels_content: str, optional + :param stack_labels: Show labels for stack totals. Flourish type hint: boolean, defaults to None. + :type stack_labels: bool, optional + :param stack_labels_color: Color. Flourish type hint: color, defaults to None. + :type stack_labels_color: str, optional + :param stack_labels_font_size: Size. Flourish type hint: number, defaults to None. + :type stack_labels_font_size: float, optional + :param stack_labels_weight: Weight. Choices: 600, 400. Flourish type hint: string, defaults to None. + :type stack_labels_weight: str, optional + :param chart_x_axis_axis_position: Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to None. + :type chart_x_axis_axis_position: str, optional + :param chart_x_axis_y_axis_position: Y value. Vertical position of the x axis on the y scale. Flourish type hint: string, defaults to None. + :type chart_x_axis_y_axis_position: str, optional + :param chart_x_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_x_axis_numeric_scale_type: str, optional + :param chart_x_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_min: float, optional + :param chart_x_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_max: float, optional + :param chart_x_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_min: float, optional + :param chart_x_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_max: float, optional + :param chart_x_axis_datetime_min: Min (date). Use the input date format as specified in the datasheet. Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_min: str, optional + :param chart_x_axis_datetime_max: Max (date). Use the input date format as specified in the datasheet. Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_max: str, optional + :param chart_x_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_flip: bool, optional + :param chart_x_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_show_scale_settings: bool, optional + :param chart_x_axis_nice: Round min/max. Choices: True, False. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Overridden by any explicitly specified scale min and max. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_nice: bool, optional + :param chart_x_axis_zero_axis: Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Overridden by any explicitly specified scale min and max. Flourish type hint: string, defaults to None. + :type chart_x_axis_zero_axis: str, optional + :param chart_x_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_mode: str, optional + :param chart_x_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_x_axis_title: str, optional + :param chart_x_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_title_styling: bool, optional + :param chart_x_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_weight: str, optional + :param chart_x_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_title_color: str, optional + :param chart_x_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_size: float, optional + :param chart_x_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_padding: float, optional + :param chart_x_axis_tick_label_position: Position. Choices: default, left, right. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_position: str, optional + :param chart_x_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_tick_label_styling: bool, optional + :param chart_x_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_size: float, optional + :param chart_x_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_tick_label_color: str, optional + :param chart_x_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_padding: float, optional + :param chart_x_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_angle: str, optional + :param chart_x_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_weight: str, optional + :param chart_x_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_max_lines: float, optional + :param chart_x_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_line_height: float, optional + :param chart_x_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. How the vertical space available for tick labels is determined. "Auto" means that the space is automatically determined. "Max" lets you specify the maximum vertical space tick labels may occupy. "Fixed" lets you specify a fixed amount of vertical space for tick labels. Tick labels will be truncated to fit within the allocated horizontal space. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_space_mode: str, optional + :param chart_x_axis_tick_label_space: Space. The space allocated for tick labels (relative to the root font size). Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_space: float, optional + :param chart_x_axis_tick_mode: Mode. Choices: auto, number, custom. Determines how the tick values are chosen. "Auto" mode chooses the ticks automatically. "Number" mode lets you specify how many ticks are drawn. "Custom" mode lets you specify which ticks are drawn. If the axis is categorical, "Number" mode is ignored. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_mode: str, optional + :param chart_x_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_number: float, optional + :param chart_x_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_x_axis_tick_custom: Union[list, str], optional + :param chart_x_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_x_axis_line_and_tick_color: str, optional + :param chart_x_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_x_axis_line_and_tick_width: float, optional + :param chart_x_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_length: float, optional + :param chart_x_axis_tick_side: Tick side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_side: str, optional + :param chart_x_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_line_visible: bool, optional + :param chart_x_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_x_axis_edge_padding: float, optional + :param chart_x_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_visible: bool, optional + :param chart_x_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_styling: bool, optional + :param chart_x_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_gridline_color: str, optional + :param chart_x_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_x_axis_gridline_style: str, optional + :param chart_x_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_x_axis_gridline_width: float, optional + :param chart_x_axis_gridline_category_dividers: Put lines between categories. On a categorical axis this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers: bool, optional + :param chart_x_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers_extend: bool, optional + :param chart_y_axis_axis_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_axis_visible: bool, optional + :param chart_y_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_y_axis_numeric_scale_type: str, optional + :param chart_y_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_min: float, optional + :param chart_y_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_max: float, optional + :param chart_y_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_min: float, optional + :param chart_y_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_max: float, optional + :param chart_y_axis_datetime_min: Min (date). Use the same format as displayed in the axis. Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_min: str, optional + :param chart_y_axis_datetime_max: Max (date). Use the same format as displayed in the axis. Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_max: str, optional + :param chart_y_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_flip: bool, optional + :param chart_y_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_show_scale_settings: bool, optional + :param chart_y_axis_nice: Round min/max. Choices: True, False. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_nice: bool, optional + :param chart_y_axis_zero_axis: Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to None. + :type chart_y_axis_zero_axis: str, optional + :param chart_y_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_mode: str, optional + :param chart_y_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_y_axis_title: str, optional + :param chart_y_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_title_styling: bool, optional + :param chart_y_axis_title_position: Position. Choices: side, end. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_position: str, optional + :param chart_y_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_weight: str, optional + :param chart_y_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_title_color: str, optional + :param chart_y_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_size: float, optional + :param chart_y_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_padding: float, optional + :param chart_y_axis_tick_label_position: Position. Choices: default, above, below. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_position: str, optional + :param chart_y_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_tick_label_styling: bool, optional + :param chart_y_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_size: float, optional + :param chart_y_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_tick_label_color: str, optional + :param chart_y_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_padding: float, optional + :param chart_y_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_angle: str, optional + :param chart_y_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_weight: str, optional + :param chart_y_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_max_lines: float, optional + :param chart_y_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_line_height: float, optional + :param chart_y_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Sets how the horizontal space available for tick labels is determined. "Auto" means that the space is automatically determined. "Max" lets you specify the maximum horizontal space tick labels may occupy. "Fixed" lets you specify a fixed amount of horizontal space for tick labels. Tick labels will be truncated to fit within the allocated horizontal space. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_space_mode: str, optional + :param chart_y_axis_tick_label_space: Space. The space allocated for tick labels (relative to the root font size). Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_space: float, optional + :param chart_y_axis_tick_mode: Mode. Choices: auto, number, custom. Determines how the tick values are chosen. "Auto" mode chooses the ticks automatically. "Number" mode lets you specify how many ticks are drawn. "Custom" mode lets you specify which ticks are drawn. If the axis is categorical, "Number" mode is ignored. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_mode: str, optional + :param chart_y_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_number: float, optional + :param chart_y_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_y_axis_tick_custom: Union[list, str], optional + :param chart_y_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_y_axis_line_and_tick_color: str, optional + :param chart_y_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_y_axis_line_and_tick_width: float, optional + :param chart_y_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_length: float, optional + :param chart_y_axis_tick_side: Side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_side: str, optional + :param chart_y_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_line_visible: bool, optional + :param chart_y_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_y_axis_edge_padding: float, optional + :param chart_y_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_visible: bool, optional + :param chart_y_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_styling: bool, optional + :param chart_y_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_gridline_color: str, optional + :param chart_y_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_y_axis_gridline_style: str, optional + :param chart_y_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_y_axis_gridline_width: float, optional + :param chart_y_axis_gridline_category_dividers: Put lines between categories. On a categorical axis this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers: bool, optional + :param chart_y_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers_extend: bool, optional + :param chart_secondary_y_axis_axis_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_secondary_y_axis_axis_visible: bool, optional + :param chart_secondary_y_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_numeric_scale_type: str, optional + :param chart_secondary_y_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_linear_min: float, optional + :param chart_secondary_y_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_linear_max: float, optional + :param chart_secondary_y_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_log_min: float, optional + :param chart_secondary_y_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_log_max: float, optional + :param chart_secondary_y_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_datetime_min: str, optional + :param chart_secondary_y_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_datetime_max: str, optional + :param chart_secondary_y_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_secondary_y_axis_flip: bool, optional + :param chart_secondary_y_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_secondary_y_axis_show_scale_settings: bool, optional + :param chart_secondary_y_axis_nice: Round min/max. Choices: True, False. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to None. + :type chart_secondary_y_axis_nice: bool, optional + :param chart_secondary_y_axis_zero_axis: Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_zero_axis: str, optional + :param chart_secondary_y_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_title_mode: str, optional + :param chart_secondary_y_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_title: str, optional + :param chart_secondary_y_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_secondary_y_axis_title_styling: bool, optional + :param chart_secondary_y_axis_title_position: Position. Choices: side, end. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_title_position: str, optional + :param chart_secondary_y_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_title_weight: str, optional + :param chart_secondary_y_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_secondary_y_axis_title_color: str, optional + :param chart_secondary_y_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_title_size: float, optional + :param chart_secondary_y_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_title_padding: float, optional + :param chart_secondary_y_axis_tick_label_position: Position. Choices: default, above, below. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_tick_label_position: str, optional + :param chart_secondary_y_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_secondary_y_axis_tick_label_styling: bool, optional + :param chart_secondary_y_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_tick_label_size: float, optional + :param chart_secondary_y_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_secondary_y_axis_tick_label_color: str, optional + :param chart_secondary_y_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_tick_padding: float, optional + :param chart_secondary_y_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_tick_label_angle: str, optional + :param chart_secondary_y_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_tick_label_weight: str, optional + :param chart_secondary_y_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_tick_label_max_lines: float, optional + :param chart_secondary_y_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_tick_label_line_height: float, optional + :param chart_secondary_y_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Sets how the horizontal space available for tick labels is determined. "Auto" means that the space is automatically determined. "Max" lets you specify the maximum horizontal space tick labels may occupy. "Fixed" lets you specify a fixed amount of horizontal space for tick labels. Tick labels will be truncated to fit within the allocated horizontal space. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_tick_label_space_mode: str, optional + :param chart_secondary_y_axis_tick_label_space: Space. The space allocated for tick labels (relative to the root font size). Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_tick_label_space: float, optional + :param chart_secondary_y_axis_tick_mode: Mode. Choices: auto, number, custom. Determines how the tick values are chosen. "Auto" mode chooses the ticks automatically. "Number" mode lets you specify how many ticks are drawn. "Custom" mode lets you specify which ticks are drawn. If the axis is categorical, "Number" mode is ignored. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_tick_mode: str, optional + :param chart_secondary_y_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_tick_number: float, optional + :param chart_secondary_y_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_secondary_y_axis_tick_custom: Union[list, str], optional + :param chart_secondary_y_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_secondary_y_axis_line_and_tick_color: str, optional + :param chart_secondary_y_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_line_and_tick_width: float, optional + :param chart_secondary_y_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_tick_length: float, optional + :param chart_secondary_y_axis_tick_side: Side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_tick_side: str, optional + :param chart_secondary_y_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_secondary_y_axis_line_visible: bool, optional + :param chart_secondary_y_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_edge_padding: float, optional + :param chart_secondary_y_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_secondary_y_axis_gridlines_visible: bool, optional + :param chart_secondary_y_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_secondary_y_axis_gridlines_styling: bool, optional + :param chart_secondary_y_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_secondary_y_axis_gridline_color: str, optional + :param chart_secondary_y_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_secondary_y_axis_gridline_style: str, optional + :param chart_secondary_y_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_secondary_y_axis_gridline_width: float, optional + :param chart_secondary_y_axis_gridline_category_dividers: Put lines between categories. On a categorical axis this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to None. + :type chart_secondary_y_axis_gridline_category_dividers: bool, optional + :param chart_secondary_y_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_secondary_y_axis_gridline_category_dividers_extend: bool, optional + :param chart_background_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_background_background_color_enabled: bool, optional + :param chart_background_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_background_background_image_enabled: bool, optional + :param chart_background_background_color: Color. Flourish type hint: color, defaults to None. + :type chart_background_background_color: str, optional + :param chart_background_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_background_background_image_src: str, optional + :param chart_background_background_image_size: Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to None. + :type chart_background_background_image_size: str, optional + :param chart_background_background_image_position: Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to None. + :type chart_background_background_image_position: str, optional + :param number_format_labels_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type number_format_labels_prefix: str, optional + :param number_format_labels_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type number_format_labels_suffix: str, optional + :param number_format_labels_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type number_format_labels_n_dec: float, optional + :param number_format_labels_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type number_format_labels_advanced: bool, optional + :param number_format_labels_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type number_format_labels_negative_sign: str, optional + :param number_format_labels_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type number_format_labels_strip_zeros: bool, optional + :param number_format_labels_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type number_format_labels_strip_separator: bool, optional + :param number_format_labels_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type number_format_labels_transform_labels: bool, optional + :param number_format_labels_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type number_format_labels_transform: str, optional + :param number_format_labels_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type number_format_labels_multiply_divide_constant: float, optional + :param number_format_labels_exponentiate_constant: Flourish type hint: number, defaults to None. + :type number_format_labels_exponentiate_constant: float, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param number_format_prop: Show % values. Toggles between showing the raw values from the datasheet and the computed percent values for the row in popups/panels. Flourish type hint: boolean, defaults to None. + :type number_format_prop: bool, optional + :param chart_secondary_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_secondary_number_date_format_prefix: str, optional + :param chart_secondary_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_secondary_number_date_format_suffix: str, optional + :param chart_secondary_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_secondary_number_date_format_n_dec: float, optional + :param chart_secondary_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_secondary_number_date_format_advanced: bool, optional + :param chart_secondary_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_secondary_number_date_format_negative_sign: str, optional + :param chart_secondary_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_secondary_number_date_format_strip_zeros: bool, optional + :param chart_secondary_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_secondary_number_date_format_strip_separator: bool, optional + :param chart_secondary_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_secondary_number_date_format_transform_labels: bool, optional + :param chart_secondary_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_secondary_number_date_format_transform: str, optional + :param chart_secondary_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_secondary_number_date_format_multiply_divide_constant: float, optional + :param chart_secondary_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_secondary_number_date_format_exponentiate_constant: float, optional + :param legend_mode: Legend mode. Choices: auto, on, off. Auto mode hides the legend in certain situations, such as when each color is already explained by the chart titles in a grid of charts A legend will not show with a single entry. Flourish type hint: string, defaults to None. + :type legend_mode: str, optional + :param legend_filter_mode: Click legend to filter data. Choices: none, filter-in, filter-out. Single select : When clicked only shows the series selected Multi select : When clicked, hides series selected. Multiple series can be hidden Filterable legends are ignored in certain situations, such as when shading by series and using a series filter Flourish type hint: string, defaults to None. + :type legend_filter_mode: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param legend_position: Legend position. Choices: above, below. Flourish type hint: string, defaults to None. + :type legend_position: str, optional + :param text_legend: Add data colors to header text. Choices: auto, custom, off. When selected, this will change the color of any text in your header which matches the name of a series in your data. This feature can be used instead of a legend when there are a small number of series, or it can be used to highlight a particular series. Note using optional HTML in the header is disabled if using this feature. Flourish type hint: string, defaults to None. + :type text_legend: str, optional + :param text_legend_title: Title. Flourish type hint: boolean, defaults to None. + :type text_legend_title: bool, optional + :param text_legend_subtitle: Subtitle. Flourish type hint: boolean, defaults to None. + :type text_legend_subtitle: bool, optional + :param text_legend_bold: Bold. If checked, always use bold for colored items. Flourish type hint: boolean, defaults to None. + :type text_legend_bold: bool, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{VALUE}}` to include the numerical value of the current data point, or `{{SERIES}}` to display its series name. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}} Text to display when column_name is not empty {{/if}}`. For example, `{{Country}}` `{{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{VALUE}}` to include the numerical value of the current data point, or `{{SERIES}}` to display its series name. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}} Text to display when column_name is not empty {{/if}}`. For example, `{{Country}}` `{{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{VALUE}}` to include the numerical value of the current data point, or `{{SERIES}}` to display its series name. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}} Text to display when column_name is not empty {{/if}}`. For example, `{{Country}}` `{{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{VALUE}}` to include the numerical value of the current data point, or `{{SERIES}}` to display its series name. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{#if column_name}} Text to display when column_name is not empty {{/if}}`. For example, `{{Country}}` `{{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param popup_color_headers: Color headers to match data. Flourish type hint: boolean, defaults to None. + :type popup_color_headers: bool, optional + :param show_series_text: Set series info in popups. Allows you to add information about each series/column (e.g. each line) to the popups. Note: This is incompatible with custom popup content. Flourish type hint: boolean, defaults to None. + :type show_series_text: bool, optional + :param popup_series_text: Popup content for series. Adds content to the popup about the series. Separate column name and text with a double colon. For example: Series 1 :: Comment about Series 1 Series 2 :: Comment about series 2. Flourish type hint: text, defaults to None. + :type popup_series_text: Union[list, str], optional + :param chart_axes_highlights_placement: Placement of axis highlights. Choices: above, below. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_placement: str, optional + :param chart_axes_highlights_x_enabled: Show highlights on the x axis. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_enabled: bool, optional + :param chart_axes_highlights_x_lines: One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example, `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to None. + :type chart_axes_highlights_x_lines: Union[list, str], optional + :param chart_axes_highlights_x_line_color: Line color. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_line_color: str, optional + :param chart_axes_highlights_x_line_width: Line width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_line_width: float, optional + :param chart_axes_highlights_x_line_dash: Dash. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_line_dash: float, optional + :param chart_axes_highlights_x_areas: One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to None. + :type chart_axes_highlights_x_areas: Union[list, str], optional + :param chart_axes_highlights_x_area_color: Area. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_area_color: str, optional + :param chart_axes_highlights_x_area_opacity: Area opacity. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_area_opacity: float, optional + :param chart_axes_highlights_x_area_texture: Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_area_texture: str, optional + :param chart_axes_highlights_x_label_vertical: Vertical. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_label_vertical: bool, optional + :param chart_axes_highlights_x_label_y_position: Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_label_y_position: str, optional + :param chart_axes_highlights_x_label_x_position: X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_label_x_position: str, optional + :param chart_axes_highlights_x_label_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_label_max_width: float, optional + :param chart_axes_highlights_x_font_size: Font size. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_font_size: float, optional + :param chart_axes_highlights_x_font_weight: Font weight. Choices: regular, bold. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_font_weight: str, optional + :param chart_axes_highlights_x_label_color: Text. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_label_color: str, optional + :param chart_axes_highlights_x_shadow_color: Shadow. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_shadow_color: str, optional + :param chart_axes_highlights_x_shadow_enabled: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_shadow_enabled: bool, optional + :param chart_axes_highlights_y_enabled: Show highlights on the y axis. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_y_enabled: bool, optional + :param chart_axes_highlights_y_lines: One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example: `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to None. + :type chart_axes_highlights_y_lines: Union[list, str], optional + :param chart_axes_highlights_y_line_color: Line color. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_line_color: str, optional + :param chart_axes_highlights_y_line_width: line width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_line_width: float, optional + :param chart_axes_highlights_y_line_dash: Dash. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_line_dash: float, optional + :param chart_axes_highlights_y_areas: One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to None. + :type chart_axes_highlights_y_areas: Union[list, str], optional + :param chart_axes_highlights_y_area_color: Area. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_area_color: str, optional + :param chart_axes_highlights_y_area_opacity: Area opacity. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_area_opacity: float, optional + :param chart_axes_highlights_y_area_texture: Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_area_texture: str, optional + :param chart_axes_highlights_y_label_x_position: X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_label_x_position: str, optional + :param chart_axes_highlights_y_label_y_position: Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_label_y_position: str, optional + :param chart_axes_highlights_y_label_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_label_max_width: float, optional + :param chart_axes_highlights_y_font_size: Font size. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_font_size: float, optional + :param chart_axes_highlights_y_font_weight: Font weight. Choices: regular, bold. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_font_weight: str, optional + :param chart_axes_highlights_y_label_color: Text. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_label_color: str, optional + :param chart_axes_highlights_y_shadow_color: Shadow. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_shadow_color: str, optional + :param chart_axes_highlights_y_shadow_enabled: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_y_shadow_enabled: bool, optional + :param annotations_styles: Show styling options. Flourish type hint: boolean, defaults to None. + :type annotations_styles: bool, optional + :param chart_annotations_defaults_text_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_text_weight: str, optional + :param chart_annotations_defaults_text_size: Text size. Flourish type hint: number, defaults to None. + :type chart_annotations_defaults_text_size: float, optional + :param chart_annotations_defaults_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_text_color: str, optional + :param chart_annotations_defaults_label_width: Max width. Flourish type hint: number, defaults to None. + :type chart_annotations_defaults_label_width: float, optional + :param chart_annotations_defaults_text_background_mode: Text background. Choices: none, outline, background. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_text_background_mode: str, optional + :param chart_annotations_defaults_text_bg: Outline. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_text_bg: str, optional + :param chart_annotations_defaults_label_bg: Background. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_label_bg: str, optional + :param chart_annotations_defaults_text_alignment: Alignment. Choices: auto, start, center, end. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_text_alignment: str, optional + :param chart_annotations_defaults_popup_position: Popup position. Choices: center, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_popup_position: str, optional + :param chart_annotations_defaults_line_marker: Marker. Choices: none, arrowhead_open, arrowhead. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_line_marker: str, optional + :param chart_annotations_defaults_stroke_width: Width. Flourish type hint: number, defaults to None. + :type chart_annotations_defaults_stroke_width: float, optional + :param chart_annotations_defaults_stroke_color: Color. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_stroke_color: str, optional + :param chart_annotations_defaults_connector_extend_line: Extend line. Choices: enabled, disabled. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_connector_extend_line: str, optional + :param data_trans_duration: Animation duration. The duration of transitions in milliseconds, for example between two slides in a story. Flourish type hint: number, defaults to None. + :type data_trans_duration: float, optional + :param animate_on_load: Animate on load. Flourish type hint: boolean, defaults to None. + :type animate_on_load: bool, optional + :param data_trans_bind_series: Only animate series with same name. Determines how animations work when the data changes (e.g. between slides in a story ). When this is on, series (e.g. lines) will attempt to animate to become another line only if they have the same name (i.e. the same column header). Flourish type hint: boolean, defaults to None. + :type data_trans_bind_series: bool, optional + :param data_trans_bind_data_points: Only animate points with same label. Determines how animations work when the data changes (e.g. between slides in a story ). When this is on, data points (e.g. dots or bars) will attempt to animate to become other data points if they have the same label (e.g. date or category). Flourish type hint: boolean, defaults to None. + :type data_trans_bind_data_points: bool, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + :param chart_url_settings_enabled: Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to None. + :type chart_url_settings_enabled: bool, optional + :param chart_url_settings_whitelist: Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to None. + :type chart_url_settings_whitelist: Union[list, str], optional + """ + details_error(self) + + self.state = { + "state": { + "facets": {}, + "series_control_single": {}, + "row_filter_control": {}, + "log_control_y": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "controls_container": {}, + "color": {}, + "line_labels": {}, + "x": {}, + "y": {}, + "y2": {}, + "chart_bg": {}, + "number_format_labels": {}, + "number_format": {}, + "number_format_secondary": {}, + "legend_container": {}, + "legend_categorical": {}, + "popup": {}, + "axes_highlights": {}, + "annotations": {"defaults": {}}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + "url_state": {}, + } + } + + list_dual_axis = [False, True] + [None] + if dual_axis not in list_dual_axis: + raise ValueError(f"`dual_axis` must be one of: [False, True]") + elif dual_axis in list_dual_axis and dual_axis is not None: + filtered_dict = { + k: v for (k, v) in {False: False, True: True}.items() if dual_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["dual_axis"] = filtered_dict[dual_axis] + self.state["state"]["secondary_series"] = secondary_series + + list_stack_sort = ["data", "ascending", "descending"] + [None] + if stack_sort not in list_stack_sort: + raise ValueError( + f"`stack_sort` must be one of: ['data', 'ascending', 'descending']" + ) + elif stack_sort in list_stack_sort and stack_sort is not None: + filtered_dict = { + k: v + for (k, v) in { + "data": "data", + "ascending": "ascending", + "descending": "descending", + }.items() + if stack_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["stack_sort"] = filtered_dict[stack_sort] + + list_facet_layout = ["single", "facets"] + [None] + if facet_layout not in list_facet_layout: + raise ValueError(f"`facet_layout` must be one of: ['single', 'facets']") + elif facet_layout in list_facet_layout and facet_layout is not None: + filtered_dict = { + k: v + for (k, v) in {"single": "single", "facets": "facets"}.items() + if facet_layout in k + } + if len(filtered_dict) > 0: + self.state["state"]["facet_layout"] = filtered_dict[facet_layout] + + list_height_mode = ["auto", "fill_space", "aspect"] + [None] + if height_mode not in list_height_mode: + raise ValueError( + f"`height_mode` must be one of: ['auto', 'fill_space', 'aspect']" + ) + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "fill_space": "fill_space", + "aspect": "aspect", + }.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + self.state["state"]["facet_aspect"] = facet_aspect + self.state["state"]["facet_aspect_mobile"] = facet_aspect_mobile + self.state["state"]["facet_aspect_breakpoint"] = facet_aspect_breakpoint + + list_sort_mode = ["data", "value", "label"] + [None] + if sort_mode not in list_sort_mode: + raise ValueError(f"`sort_mode` must be one of: ['data', 'value', 'label']") + elif sort_mode in list_sort_mode and sort_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "data": "data", + "value": "value", + "label": "label", + }.items() + if sort_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["sort_mode"] = filtered_dict[sort_mode] + + list_chart_facet_columns_fixed = [False, True] + [None] + if chart_facet_columns_fixed not in list_chart_facet_columns_fixed: + raise ValueError( + f"`chart_facet_columns_fixed` must be one of: [False, True]" + ) + elif ( + chart_facet_columns_fixed in list_chart_facet_columns_fixed + and chart_facet_columns_fixed is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_facet_columns_fixed in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["columns_fixed"] = filtered_dict[ + chart_facet_columns_fixed + ] + self.state["state"]["facets"]["min_width"] = chart_facet_min_width + self.state["state"]["facets"]["max_width"] = chart_facet_max_width + self.state["state"]["facets"]["columns"] = chart_facet_columns + self.state["state"]["facets"]["gutter_w"] = chart_facet_gutter_w + self.state["state"]["facets"]["gutter_h"] = chart_facet_gutter_h + + list_chart_facet_animation = ["auto", "name", "reuse"] + [None] + if chart_facet_animation not in list_chart_facet_animation: + raise ValueError( + f"`chart_facet_animation` must be one of: ['auto', 'name', 'reuse']" + ) + elif ( + chart_facet_animation in list_chart_facet_animation + and chart_facet_animation is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "name": "name", "reuse": "reuse"}.items() + if chart_facet_animation in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["animation"] = filtered_dict[ + chart_facet_animation + ] + self.state["state"]["facets"]["titles"] = chart_facet_titles + + list_chart_facet_title_align = ["auto", "left", "center", "right"] + [None] + if chart_facet_title_align not in list_chart_facet_title_align: + raise ValueError( + f"`chart_facet_title_align` must be one of: ['auto', 'left', 'center', 'right']" + ) + elif ( + chart_facet_title_align in list_chart_facet_title_align + and chart_facet_title_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_facet_title_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_align"] = filtered_dict[ + chart_facet_title_align + ] + self.state["state"]["facets"]["title_size"] = chart_facet_title_size + + list_chart_facet_title_unit = ["rem", "facet"] + [None] + if chart_facet_title_unit not in list_chart_facet_title_unit: + raise ValueError( + f"`chart_facet_title_unit` must be one of: ['rem', 'facet']" + ) + elif ( + chart_facet_title_unit in list_chart_facet_title_unit + and chart_facet_title_unit is not None + ): + filtered_dict = { + k: v + for (k, v) in {"rem": "rem", "facet": "facet"}.items() + if chart_facet_title_unit in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_unit"] = filtered_dict[ + chart_facet_title_unit + ] + self.state["state"]["facets"]["title_color"] = chart_facet_title_color + self.state["state"]["facets"][ + "title_padding_top" + ] = chart_facet_title_padding_top + self.state["state"]["facets"][ + "title_padding_bottom" + ] = chart_facet_title_padding_bottom + + list_chart_facet_title_bg = ["none", "full", "text"] + [None] + if chart_facet_title_bg not in list_chart_facet_title_bg: + raise ValueError( + f"`chart_facet_title_bg` must be one of: ['none', 'full', 'text']" + ) + elif ( + chart_facet_title_bg in list_chart_facet_title_bg + and chart_facet_title_bg is not None + ): + filtered_dict = { + k: v + for (k, v) in {"none": "none", "full": "full", "text": "text"}.items() + if chart_facet_title_bg in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_bg"] = filtered_dict[ + chart_facet_title_bg + ] + self.state["state"]["facets"]["title_bg_color"] = chart_facet_title_bg_color + self.state["state"]["facets"]["title_bg_padding"] = chart_facet_title_bg_padding + self.state["state"]["x_axis_matching"] = x_axis_matching + self.state["state"]["x_axis_last_row_only"] = x_axis_last_row_only + self.state["state"]["y_axis_matching"] = y_axis_matching + self.state["state"]["y_axis_first_col_only"] = y_axis_first_col_only + self.state["state"]["y2_axis_matching"] = y2_axis_matching + self.state["state"]["y2_axis_last_col_only"] = y2_axis_last_col_only + + list_series_filter_mode = ["none", "single", "multi"] + [None] + if series_filter_mode not in list_series_filter_mode: + raise ValueError( + f"`series_filter_mode` must be one of: ['none', 'single', 'multi']" + ) + elif ( + series_filter_mode in list_series_filter_mode + and series_filter_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "single": "single", + "multi": "multi", + }.items() + if series_filter_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["series_filter_mode"] = filtered_dict[ + series_filter_mode + ] + self.state["state"]["series_control_multi_text"] = series_control_multi_text + self.state["state"][ + "series_control_multi_none_text" + ] = series_control_multi_none_text + self.state["state"]["series_control_select_text"] = series_control_select_text + self.state["state"]["max_series"] = max_series + self.state["state"]["series_control_background"] = series_control_background + self.state["state"]["series_control_text"] = series_control_text + self.state["state"]["series_control_border"] = series_control_border + self.state["state"][ + "series_control_pill_background" + ] = series_control_pill_background + self.state["state"]["series_control_pill_text"] = series_control_pill_text + self.state["state"]["series_control_pill_radius"] = series_control_pill_radius + self.state["state"]["series_control_single_all"] = series_control_single_all + self.state["state"][ + "series_control_single_all_text" + ] = series_control_single_all_text + self.state["state"]["filter_rows_with_no_data"] = filter_rows_with_no_data + + list_chart_series_filter_controls_control_type = [ + "dropdown", + "buttons", + "slider", + ] + [None] + if ( + chart_series_filter_controls_control_type + not in list_chart_series_filter_controls_control_type + ): + raise ValueError( + f"`chart_series_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_series_filter_controls_control_type + in list_chart_series_filter_controls_control_type + and chart_series_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_series_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["series_control_single"][ + "control_type" + ] = filtered_dict[chart_series_filter_controls_control_type] + self.state["state"]["series_control_single"][ + "control_styles" + ] = chart_series_filter_controls_control_styles + self.state["state"]["series_control_single"][ + "control_title" + ] = chart_series_filter_controls_control_title + + list_chart_series_filter_controls_button_group = [True, False] + [None] + if ( + chart_series_filter_controls_button_group + not in list_chart_series_filter_controls_button_group + ): + raise ValueError( + f"`chart_series_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_series_filter_controls_button_group + in list_chart_series_filter_controls_button_group + and chart_series_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_series_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["series_control_single"][ + "button_group" + ] = filtered_dict[chart_series_filter_controls_button_group] + + list_chart_series_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_series_filter_controls_button_group_width_mode + not in list_chart_series_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_series_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_series_filter_controls_button_group_width_mode + in list_chart_series_filter_controls_button_group_width_mode + and chart_series_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_series_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["series_control_single"][ + "button_group_width_mode" + ] = filtered_dict[chart_series_filter_controls_button_group_width_mode] + self.state["state"]["series_control_single"][ + "button_group_width_fixed" + ] = chart_series_filter_controls_button_group_width_fixed + + list_chart_series_filter_controls_dropdown_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_series_filter_controls_dropdown_width_mode + not in list_chart_series_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_series_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_series_filter_controls_dropdown_width_mode + in list_chart_series_filter_controls_dropdown_width_mode + and chart_series_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_series_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["series_control_single"][ + "dropdown_width_mode" + ] = filtered_dict[chart_series_filter_controls_dropdown_width_mode] + self.state["state"]["series_control_single"][ + "dropdown_width_fixed" + ] = chart_series_filter_controls_dropdown_width_fixed + self.state["state"]["series_control_single"][ + "slider_width" + ] = chart_series_filter_controls_slider_width + self.state["state"]["series_control_single"][ + "slider_max_label_width" + ] = chart_series_filter_controls_slider_max_label_width + self.state["state"]["series_control_single"][ + "slider_step_time" + ] = chart_series_filter_controls_slider_step_time + self.state["state"]["series_control_single"][ + "slider_loop" + ] = chart_series_filter_controls_slider_loop + self.state["state"]["series_control_single"][ + "slider_restart_pause" + ] = chart_series_filter_controls_slider_restart_pause + + list_chart_series_filter_controls_sort = [True, False] + [None] + if ( + chart_series_filter_controls_sort + not in list_chart_series_filter_controls_sort + ): + raise ValueError( + f"`chart_series_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_series_filter_controls_sort in list_chart_series_filter_controls_sort + and chart_series_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_series_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["series_control_single"]["sort"] = filtered_dict[ + chart_series_filter_controls_sort + ] + self.state["state"]["row_filter_control_all"] = row_filter_control_all + self.state["state"]["row_filter_control_all_text"] = row_filter_control_all_text + + list_chart_row_filter_controls_control_type = [ + "dropdown", + "buttons", + "slider", + ] + [None] + if ( + chart_row_filter_controls_control_type + not in list_chart_row_filter_controls_control_type + ): + raise ValueError( + f"`chart_row_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_row_filter_controls_control_type + in list_chart_row_filter_controls_control_type + and chart_row_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_row_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["row_filter_control"][ + "control_type" + ] = filtered_dict[chart_row_filter_controls_control_type] + self.state["state"]["row_filter_control"][ + "control_styles" + ] = chart_row_filter_controls_control_styles + self.state["state"]["row_filter_control"][ + "control_title" + ] = chart_row_filter_controls_control_title + + list_chart_row_filter_controls_button_group = [True, False] + [None] + if ( + chart_row_filter_controls_button_group + not in list_chart_row_filter_controls_button_group + ): + raise ValueError( + f"`chart_row_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_row_filter_controls_button_group + in list_chart_row_filter_controls_button_group + and chart_row_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_row_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["row_filter_control"][ + "button_group" + ] = filtered_dict[chart_row_filter_controls_button_group] + + list_chart_row_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_row_filter_controls_button_group_width_mode + not in list_chart_row_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_row_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_row_filter_controls_button_group_width_mode + in list_chart_row_filter_controls_button_group_width_mode + and chart_row_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_row_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["row_filter_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_row_filter_controls_button_group_width_mode] + self.state["state"]["row_filter_control"][ + "button_group_width_fixed" + ] = chart_row_filter_controls_button_group_width_fixed + + list_chart_row_filter_controls_dropdown_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_row_filter_controls_dropdown_width_mode + not in list_chart_row_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_row_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_row_filter_controls_dropdown_width_mode + in list_chart_row_filter_controls_dropdown_width_mode + and chart_row_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_row_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["row_filter_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_row_filter_controls_dropdown_width_mode] + self.state["state"]["row_filter_control"][ + "dropdown_width_fixed" + ] = chart_row_filter_controls_dropdown_width_fixed + self.state["state"]["row_filter_control"][ + "slider_width" + ] = chart_row_filter_controls_slider_width + self.state["state"]["row_filter_control"][ + "slider_max_label_width" + ] = chart_row_filter_controls_slider_max_label_width + self.state["state"]["row_filter_control"][ + "slider_step_time" + ] = chart_row_filter_controls_slider_step_time + self.state["state"]["row_filter_control"][ + "slider_loop" + ] = chart_row_filter_controls_slider_loop + self.state["state"]["row_filter_control"][ + "slider_restart_pause" + ] = chart_row_filter_controls_slider_restart_pause + + list_chart_row_filter_controls_sort = [True, False] + [None] + if chart_row_filter_controls_sort not in list_chart_row_filter_controls_sort: + raise ValueError( + f"`chart_row_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_row_filter_controls_sort in list_chart_row_filter_controls_sort + and chart_row_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_row_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["row_filter_control"]["sort"] = filtered_dict[ + chart_row_filter_controls_sort + ] + self.state["state"]["log_control_y_visible"] = log_control_y_visible + + list_chart_log_control_y_filter_controls_control_type = [ + "dropdown", + "buttons", + "slider", + ] + [None] + if ( + chart_log_control_y_filter_controls_control_type + not in list_chart_log_control_y_filter_controls_control_type + ): + raise ValueError( + f"`chart_log_control_y_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_log_control_y_filter_controls_control_type + in list_chart_log_control_y_filter_controls_control_type + and chart_log_control_y_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_log_control_y_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["log_control_y"]["control_type"] = filtered_dict[ + chart_log_control_y_filter_controls_control_type + ] + self.state["state"]["log_control_y"][ + "control_styles" + ] = chart_log_control_y_filter_controls_control_styles + self.state["state"]["log_control_y"][ + "control_title" + ] = chart_log_control_y_filter_controls_control_title + + list_chart_log_control_y_filter_controls_button_group = [True, False] + [None] + if ( + chart_log_control_y_filter_controls_button_group + not in list_chart_log_control_y_filter_controls_button_group + ): + raise ValueError( + f"`chart_log_control_y_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_log_control_y_filter_controls_button_group + in list_chart_log_control_y_filter_controls_button_group + and chart_log_control_y_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_log_control_y_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["log_control_y"]["button_group"] = filtered_dict[ + chart_log_control_y_filter_controls_button_group + ] + + list_chart_log_control_y_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_log_control_y_filter_controls_button_group_width_mode + not in list_chart_log_control_y_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_log_control_y_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_log_control_y_filter_controls_button_group_width_mode + in list_chart_log_control_y_filter_controls_button_group_width_mode + and chart_log_control_y_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_log_control_y_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["log_control_y"][ + "button_group_width_mode" + ] = filtered_dict[ + chart_log_control_y_filter_controls_button_group_width_mode + ] + self.state["state"]["log_control_y"][ + "button_group_width_fixed" + ] = chart_log_control_y_filter_controls_button_group_width_fixed + + list_chart_log_control_y_filter_controls_dropdown_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_log_control_y_filter_controls_dropdown_width_mode + not in list_chart_log_control_y_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_log_control_y_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_log_control_y_filter_controls_dropdown_width_mode + in list_chart_log_control_y_filter_controls_dropdown_width_mode + and chart_log_control_y_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_log_control_y_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["log_control_y"][ + "dropdown_width_mode" + ] = filtered_dict[ + chart_log_control_y_filter_controls_dropdown_width_mode + ] + self.state["state"]["log_control_y"][ + "dropdown_width_fixed" + ] = chart_log_control_y_filter_controls_dropdown_width_fixed + self.state["state"]["log_control_y"][ + "slider_width" + ] = chart_log_control_y_filter_controls_slider_width + self.state["state"]["log_control_y"][ + "slider_max_label_width" + ] = chart_log_control_y_filter_controls_slider_max_label_width + self.state["state"]["log_control_y"][ + "slider_step_time" + ] = chart_log_control_y_filter_controls_slider_step_time + self.state["state"]["log_control_y"][ + "slider_loop" + ] = chart_log_control_y_filter_controls_slider_loop + self.state["state"]["log_control_y"][ + "slider_restart_pause" + ] = chart_log_control_y_filter_controls_slider_restart_pause + + list_chart_log_control_y_filter_controls_sort = [True, False] + [None] + if ( + chart_log_control_y_filter_controls_sort + not in list_chart_log_control_y_filter_controls_sort + ): + raise ValueError( + f"`chart_log_control_y_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_log_control_y_filter_controls_sort + in list_chart_log_control_y_filter_controls_sort + and chart_log_control_y_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_log_control_y_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["log_control_y"]["sort"] = filtered_dict[ + chart_log_control_y_filter_controls_sort + ] + self.state["state"]["log_control_y_text_linear"] = log_control_y_text_linear + self.state["state"]["log_control_y_text_log"] = log_control_y_text_log + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + + list_chart_filter_controls_container_alignment = ["start", "center", "end"] + [ + None + ] + if ( + chart_filter_controls_container_alignment + not in list_chart_filter_controls_container_alignment + ): + raise ValueError( + f"`chart_filter_controls_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_filter_controls_container_alignment + in list_chart_filter_controls_container_alignment + and chart_filter_controls_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_filter_controls_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_container"]["alignment"] = filtered_dict[ + chart_filter_controls_container_alignment + ] + self.state["state"]["controls_container"][ + "controls_spacing" + ] = chart_filter_controls_container_controls_spacing + + list_controls_position = [ + "log_series_row", + "series_log_row", + "log_row_series", + "series_row_log", + "row_log_series", + "row_series_log", + ] + [None] + if controls_position not in list_controls_position: + raise ValueError( + f"`controls_position` must be one of: ['log_series_row', 'series_log_row', 'log_row_series', 'series_row_log', 'row_log_series', 'row_series_log']" + ) + elif ( + controls_position in list_controls_position + and controls_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "log_series_row": "log_series_row", + "series_log_row": "series_log_row", + "log_row_series": "log_row_series", + "series_row_log": "series_row_log", + "row_log_series": "row_log_series", + "row_series_log": "row_series_log", + }.items() + if controls_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_position"] = filtered_dict[ + controls_position + ] + + list_color_mode = ["column", "row"] + [None] + if color_mode not in list_color_mode: + raise ValueError(f"`color_mode` must be one of: ['column', 'row']") + elif color_mode in list_color_mode and color_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"column": "column", "row": "row"}.items() + if color_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color_mode"] = filtered_dict[color_mode] + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["line_width"] = line_width + self.state["state"]["line_opacity"] = line_opacity + self.state["state"]["line_stroke"] = line_stroke + + list_line_curve = [ + "curve_linear", + "curve_monotone_x", + "curve_natural", + "curve_step", + "curve_step_before", + "curve_step_after", + ] + [None] + if line_curve not in list_line_curve: + raise ValueError( + f"`line_curve` must be one of: ['curve_linear', 'curve_monotone_x', 'curve_natural', 'curve_step', 'curve_step_before', 'curve_step_after']" + ) + elif line_curve in list_line_curve and line_curve is not None: + filtered_dict = { + k: v + for (k, v) in { + "curve_linear": "curveLinear", + "curve_monotone_x": "curveMonotoneX", + "curve_natural": "curveNatural", + "curve_step": "curveStep", + "curve_step_before": "curveStepBefore", + "curve_step_after": "curveStepAfter", + }.items() + if line_curve in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_curve"] = filtered_dict[line_curve] + + if ( + line_dash_items is not None + and len(line_dash_items) > 1 + and isinstance(line_dash_items, list) + ): + self.state["state"]["line_dash_items"] = " \n ".join(line_dash_items) + else: + self.state["state"]["line_dash_items"] = line_dash_items + + self.state["state"]["line_dash_width"] = line_dash_width + self.state["state"]["line_dash_space_width"] = line_dash_space_width + + list_line_interpolate = [True, False] + [None] + if line_interpolate not in list_line_interpolate: + raise ValueError(f"`line_interpolate` must be one of: [True, False]") + elif line_interpolate in list_line_interpolate and line_interpolate is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if line_interpolate in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_interpolate"] = filtered_dict[ + line_interpolate + ] + self.state["state"]["shade_between_lines"] = shade_between_lines + + if ( + shade_between_lines_config is not None + and len(shade_between_lines_config) > 1 + and isinstance(shade_between_lines_config, list) + ): + self.state["state"]["shade_between_lines_config"] = " \n ".join( + shade_between_lines_config + ) + else: + self.state["state"][ + "shade_between_lines_config" + ] = shade_between_lines_config + + self.state["state"]["shade_between_lines_color"] = shade_between_lines_color + self.state["state"]["shade_between_lines_opacity"] = shade_between_lines_opacity + self.state["state"]["area_opacity"] = area_opacity + + list_dot_mode = ["auto", "on", "off"] + [None] + if dot_mode not in list_dot_mode: + raise ValueError(f"`dot_mode` must be one of: ['auto', 'on', 'off']") + elif dot_mode in list_dot_mode and dot_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if dot_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["dot_mode"] = filtered_dict[dot_mode] + self.state["state"]["dot_opacity"] = dot_opacity + self.state["state"]["dot_radius"] = dot_radius + self.state["state"]["dot_radius_last"] = dot_radius_last + self.state["state"]["dot_hollow"] = dot_hollow + self.state["state"]["bar_height"] = bar_height + self.state["state"]["column_opacity"] = column_opacity + self.state["state"]["uniform_column_width"] = uniform_column_width + self.state["state"]["uniform_bar_height"] = uniform_bar_height + self.state["state"]["column_padding_inner"] = column_padding_inner + self.state["state"]["column_padding_in_group"] = column_padding_in_group + self.state["state"]["column_padding_stack"] = column_padding_stack + self.state["state"]["column_stroke"] = column_stroke + self.state["state"]["column_stroke_opacity"] = column_stroke_opacity + self.state["state"]["column_stroke_color"] = column_stroke_color + self.state["state"]["donut_inner_radius"] = donut_inner_radius + self.state["state"]["donut_corner_radius"] = donut_corner_radius + self.state["state"]["donut_pad_angle"] = donut_pad_angle + self.state["state"]["donut_auto_scale"] = donut_auto_scale + + list_bar_labels_above = [True, False] + [None] + if bar_labels_above not in list_bar_labels_above: + raise ValueError(f"`bar_labels_above` must be one of: [True, False]") + elif bar_labels_above in list_bar_labels_above and bar_labels_above is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if bar_labels_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["bar_labels_above"] = filtered_dict[ + bar_labels_above + ] + self.state["state"]["bar_labels_color"] = bar_labels_color + self.state["state"]["bar_labels_font_size"] = bar_labels_font_size + + list_bar_labels_weight = ["600", "400"] + [None] + if bar_labels_weight not in list_bar_labels_weight: + raise ValueError(f"`bar_labels_weight` must be one of: ['600', '400']") + elif ( + bar_labels_weight in list_bar_labels_weight + and bar_labels_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"600": "600", "400": "400"}.items() + if bar_labels_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["bar_labels_weight"] = filtered_dict[ + bar_labels_weight + ] + self.state["state"]["line_end_labels"] = line_end_labels + self.state["state"]["line_labels"]["max_width"] = chart_line_labels_max_width + + list_chart_line_labels_overlap_mode = ["spread", "hide", "none"] + [None] + if chart_line_labels_overlap_mode not in list_chart_line_labels_overlap_mode: + raise ValueError( + f"`chart_line_labels_overlap_mode` must be one of: ['spread', 'hide', 'none']" + ) + elif ( + chart_line_labels_overlap_mode in list_chart_line_labels_overlap_mode + and chart_line_labels_overlap_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "spread": "spread", + "hide": "hide", + "none": "none", + }.items() + if chart_line_labels_overlap_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_labels"]["overlap_mode"] = filtered_dict[ + chart_line_labels_overlap_mode + ] + self.state["state"]["line_labels"][ + "spreading_margin" + ] = chart_line_labels_spreading_margin + self.state["state"]["line_labels"][ + "data_point_margin" + ] = chart_line_labels_data_point_margin + + if ( + chart_line_labels_show_only_labels is not None + and len(chart_line_labels_show_only_labels) > 1 + and isinstance(chart_line_labels_show_only_labels, list) + ): + self.state["state"]["line_labels"]["show_only_labels"] = " \n ".join( + chart_line_labels_show_only_labels + ) + else: + self.state["state"]["line_labels"][ + "show_only_labels" + ] = chart_line_labels_show_only_labels + + self.state["state"]["line_labels"]["text_color"] = chart_line_labels_text_color + self.state["state"]["line_labels"]["text_size"] = chart_line_labels_text_size + self.state["state"]["line_labels"][ + "text_bg_color" + ] = chart_line_labels_text_bg_color + self.state["state"]["line_labels"][ + "text_bg_size" + ] = chart_line_labels_text_bg_size + self.state["state"]["line_labels"][ + "text_line_height" + ] = chart_line_labels_text_line_height + self.state["state"]["line_labels"][ + "text_max_lines" + ] = chart_line_labels_text_max_lines + + list_chart_line_labels_text_weight = [400, 700] + [None] + if chart_line_labels_text_weight not in list_chart_line_labels_text_weight: + raise ValueError( + f"`chart_line_labels_text_weight` must be one of: [400, 700]" + ) + elif ( + chart_line_labels_text_weight in list_chart_line_labels_text_weight + and chart_line_labels_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {400: 400, 700: 700}.items() + if chart_line_labels_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_labels"]["text_weight"] = filtered_dict[ + chart_line_labels_text_weight + ] + + list_chart_line_labels_lines = ["auto", "on", "off"] + [None] + if chart_line_labels_lines not in list_chart_line_labels_lines: + raise ValueError( + f"`chart_line_labels_lines` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_line_labels_lines in list_chart_line_labels_lines + and chart_line_labels_lines is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_line_labels_lines in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_labels"]["lines"] = filtered_dict[ + chart_line_labels_lines + ] + + list_chart_line_labels_line_style = ["straight", "step"] + [None] + if chart_line_labels_line_style not in list_chart_line_labels_line_style: + raise ValueError( + f"`chart_line_labels_line_style` must be one of: ['straight', 'step']" + ) + elif ( + chart_line_labels_line_style in list_chart_line_labels_line_style + and chart_line_labels_line_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"straight": "straight", "step": "step"}.items() + if chart_line_labels_line_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_labels"]["line_style"] = filtered_dict[ + chart_line_labels_line_style + ] + self.state["state"]["line_labels"]["line_color"] = chart_line_labels_line_color + self.state["state"]["line_labels"]["line_width"] = chart_line_labels_line_width + self.state["state"]["line_labels"]["line_range"] = chart_line_labels_line_range + self.state["state"]["line_labels"][ + "line_padding" + ] = chart_line_labels_line_padding + self.state["state"]["labels"] = labels + self.state["state"]["labels_hide_overlaps"] = labels_hide_overlaps + self.state["state"]["labels_dot_center"] = labels_dot_center + + list_labels_column_align = ["bottom", "middle", "top", "above"] + [None] + if labels_column_align not in list_labels_column_align: + raise ValueError( + f"`labels_column_align` must be one of: ['bottom', 'middle', 'top', 'above']" + ) + elif ( + labels_column_align in list_labels_column_align + and labels_column_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "middle": "middle", + "top": "top", + "above": "above", + }.items() + if labels_column_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_column_align"] = filtered_dict[ + labels_column_align + ] + self.state["state"]["labels_column_padding"] = labels_column_padding + + list_labels_bar_align = ["left", "center", "right", "out"] + [None] + if labels_bar_align not in list_labels_bar_align: + raise ValueError( + f"`labels_bar_align` must be one of: ['left', 'center', 'right', 'out']" + ) + elif labels_bar_align in list_labels_bar_align and labels_bar_align is not None: + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "out": "out", + }.items() + if labels_bar_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_bar_align"] = filtered_dict[ + labels_bar_align + ] + self.state["state"]["labels_bar_autohide"] = labels_bar_autohide + + list_labels_color_mode = ["auto", "data", "contrast", "fixed"] + [None] + if labels_color_mode not in list_labels_color_mode: + raise ValueError( + f"`labels_color_mode` must be one of: ['auto', 'data', 'contrast', 'fixed']" + ) + elif ( + labels_color_mode in list_labels_color_mode + and labels_color_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "data": "data", + "contrast": "contrast", + "fixed": "fixed", + }.items() + if labels_color_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_color_mode"] = filtered_dict[ + labels_color_mode + ] + self.state["state"]["labels_fixed_color"] = labels_fixed_color + + list_labels_font_weight = ["600", "400"] + [None] + if labels_font_weight not in list_labels_font_weight: + raise ValueError(f"`labels_font_weight` must be one of: ['600', '400']") + elif ( + labels_font_weight in list_labels_font_weight + and labels_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"600": "600", "400": "400"}.items() + if labels_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_font_weight"] = filtered_dict[ + labels_font_weight + ] + + list_labels_font_size_mode = ["auto", "fixed"] + [None] + if labels_font_size_mode not in list_labels_font_size_mode: + raise ValueError( + f"`labels_font_size_mode` must be one of: ['auto', 'fixed']" + ) + elif ( + labels_font_size_mode in list_labels_font_size_mode + and labels_font_size_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "fixed": "fixed"}.items() + if labels_font_size_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_font_size_mode"] = filtered_dict[ + labels_font_size_mode + ] + self.state["state"]["labels_font_size"] = labels_font_size + + list_labels_bg_mode = ["on", "off"] + [None] + if labels_bg_mode not in list_labels_bg_mode: + raise ValueError(f"`labels_bg_mode` must be one of: ['on', 'off']") + elif labels_bg_mode in list_labels_bg_mode and labels_bg_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"on": "on", "off": "off"}.items() + if labels_bg_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_bg_mode"] = filtered_dict[labels_bg_mode] + self.state["state"]["labels_bg_size"] = labels_bg_size + + list_labels_content = ["auto", "value", "label", "both"] + [None] + if labels_content not in list_labels_content: + raise ValueError( + f"`labels_content` must be one of: ['auto', 'value', 'label', 'both']" + ) + elif labels_content in list_labels_content and labels_content is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "value": "value", + "label": "label", + "both": "both", + }.items() + if labels_content in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_content"] = filtered_dict[labels_content] + self.state["state"]["stack_labels"] = stack_labels + self.state["state"]["stack_labels_color"] = stack_labels_color + self.state["state"]["stack_labels_font_size"] = stack_labels_font_size + + list_stack_labels_weight = ["600", "400"] + [None] + if stack_labels_weight not in list_stack_labels_weight: + raise ValueError(f"`stack_labels_weight` must be one of: ['600', '400']") + elif ( + stack_labels_weight in list_stack_labels_weight + and stack_labels_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"600": "600", "400": "400"}.items() + if stack_labels_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["stack_labels_weight"] = filtered_dict[ + stack_labels_weight + ] + + list_chart_x_axis_axis_position = [ + "bottom", + "float-below", + "float-above", + "top", + "off", + ] + [None] + if chart_x_axis_axis_position not in list_chart_x_axis_axis_position: + raise ValueError( + f"`chart_x_axis_axis_position` must be one of: ['bottom', 'float-below', 'float-above', 'top', 'off']" + ) + elif ( + chart_x_axis_axis_position in list_chart_x_axis_axis_position + and chart_x_axis_axis_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "float-below": "float-below", + "float-above": "float-above", + "top": "top", + "off": "off", + }.items() + if chart_x_axis_axis_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["axis_position"] = filtered_dict[ + chart_x_axis_axis_position + ] + self.state["state"]["x"]["y_axis_position"] = chart_x_axis_y_axis_position + + list_chart_x_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_x_axis_numeric_scale_type not in list_chart_x_axis_numeric_scale_type: + raise ValueError( + f"`chart_x_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_x_axis_numeric_scale_type in list_chart_x_axis_numeric_scale_type + and chart_x_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_x_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["numeric_scale_type"] = filtered_dict[ + chart_x_axis_numeric_scale_type + ] + self.state["state"]["x"]["linear_min"] = chart_x_axis_linear_min + self.state["state"]["x"]["linear_max"] = chart_x_axis_linear_max + self.state["state"]["x"]["log_min"] = chart_x_axis_log_min + self.state["state"]["x"]["log_max"] = chart_x_axis_log_max + self.state["state"]["x"]["datetime_min"] = chart_x_axis_datetime_min + self.state["state"]["x"]["datetime_max"] = chart_x_axis_datetime_max + self.state["state"]["x"]["flip"] = chart_x_axis_flip + self.state["state"]["x"][ + "show_scale_settings" + ] = chart_x_axis_show_scale_settings + + list_chart_x_axis_nice = [True, False] + [None] + if chart_x_axis_nice not in list_chart_x_axis_nice: + raise ValueError(f"`chart_x_axis_nice` must be one of: [True, False]") + elif ( + chart_x_axis_nice in list_chart_x_axis_nice + and chart_x_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["nice"] = filtered_dict[chart_x_axis_nice] + + list_chart_x_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_x_axis_zero_axis not in list_chart_x_axis_zero_axis: + raise ValueError( + f"`chart_x_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_x_axis_zero_axis in list_chart_x_axis_zero_axis + and chart_x_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_x_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["zero_axis"] = filtered_dict[ + chart_x_axis_zero_axis + ] + + list_chart_x_axis_title_mode = ["auto", "custom"] + [None] + if chart_x_axis_title_mode not in list_chart_x_axis_title_mode: + raise ValueError( + f"`chart_x_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_x_axis_title_mode in list_chart_x_axis_title_mode + and chart_x_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_x_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_mode"] = filtered_dict[ + chart_x_axis_title_mode + ] + self.state["state"]["x"]["title"] = chart_x_axis_title + self.state["state"]["x"]["title_styling"] = chart_x_axis_title_styling + + list_chart_x_axis_title_weight = ["bold", "normal"] + [None] + if chart_x_axis_title_weight not in list_chart_x_axis_title_weight: + raise ValueError( + f"`chart_x_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_title_weight in list_chart_x_axis_title_weight + and chart_x_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_weight"] = filtered_dict[ + chart_x_axis_title_weight + ] + self.state["state"]["x"]["title_color"] = chart_x_axis_title_color + self.state["state"]["x"]["title_size"] = chart_x_axis_title_size + self.state["state"]["x"]["title_padding"] = chart_x_axis_title_padding + + list_chart_x_axis_tick_label_position = ["default", "left", "right"] + [None] + if ( + chart_x_axis_tick_label_position + not in list_chart_x_axis_tick_label_position + ): + raise ValueError( + f"`chart_x_axis_tick_label_position` must be one of: ['default', 'left', 'right']" + ) + elif ( + chart_x_axis_tick_label_position in list_chart_x_axis_tick_label_position + and chart_x_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "left": "left", + "right": "right", + }.items() + if chart_x_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_position"] = filtered_dict[ + chart_x_axis_tick_label_position + ] + self.state["state"]["x"]["tick_label_styling"] = chart_x_axis_tick_label_styling + self.state["state"]["x"]["tick_label_size"] = chart_x_axis_tick_label_size + self.state["state"]["x"]["tick_label_color"] = chart_x_axis_tick_label_color + self.state["state"]["x"]["tick_padding"] = chart_x_axis_tick_padding + + list_chart_x_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_x_axis_tick_label_angle not in list_chart_x_axis_tick_label_angle: + raise ValueError( + f"`chart_x_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_x_axis_tick_label_angle in list_chart_x_axis_tick_label_angle + and chart_x_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_x_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_angle"] = filtered_dict[ + chart_x_axis_tick_label_angle + ] + + list_chart_x_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_x_axis_tick_label_weight not in list_chart_x_axis_tick_label_weight: + raise ValueError( + f"`chart_x_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_tick_label_weight in list_chart_x_axis_tick_label_weight + and chart_x_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_weight"] = filtered_dict[ + chart_x_axis_tick_label_weight + ] + self.state["state"]["x"][ + "tick_label_max_lines" + ] = chart_x_axis_tick_label_max_lines + self.state["state"]["x"][ + "tick_label_line_height" + ] = chart_x_axis_tick_label_line_height + + list_chart_x_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_x_axis_tick_label_space_mode + not in list_chart_x_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_x_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_x_axis_tick_label_space_mode + in list_chart_x_axis_tick_label_space_mode + and chart_x_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_x_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_space_mode"] = filtered_dict[ + chart_x_axis_tick_label_space_mode + ] + self.state["state"]["x"]["tick_label_space"] = chart_x_axis_tick_label_space + + list_chart_x_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_x_axis_tick_mode not in list_chart_x_axis_tick_mode: + raise ValueError( + f"`chart_x_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_x_axis_tick_mode in list_chart_x_axis_tick_mode + and chart_x_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_x_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_mode"] = filtered_dict[ + chart_x_axis_tick_mode + ] + self.state["state"]["x"]["tick_number"] = chart_x_axis_tick_number + + if ( + chart_x_axis_tick_custom is not None + and len(chart_x_axis_tick_custom) > 1 + and isinstance(chart_x_axis_tick_custom, list) + ): + self.state["state"]["x"]["tick_custom"] = " \n ".join( + chart_x_axis_tick_custom + ) + else: + self.state["state"]["x"]["tick_custom"] = chart_x_axis_tick_custom + + self.state["state"]["x"][ + "line_and_tick_color" + ] = chart_x_axis_line_and_tick_color + self.state["state"]["x"][ + "line_and_tick_width" + ] = chart_x_axis_line_and_tick_width + self.state["state"]["x"]["tick_length"] = chart_x_axis_tick_length + + list_chart_x_axis_tick_side = ["out", "in"] + [None] + if chart_x_axis_tick_side not in list_chart_x_axis_tick_side: + raise ValueError(f"`chart_x_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_x_axis_tick_side in list_chart_x_axis_tick_side + and chart_x_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_x_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_side"] = filtered_dict[ + chart_x_axis_tick_side + ] + self.state["state"]["x"]["line_visible"] = chart_x_axis_line_visible + self.state["state"]["x"]["edge_padding"] = chart_x_axis_edge_padding + + list_chart_x_axis_gridlines_visible = [True, False] + [None] + if chart_x_axis_gridlines_visible not in list_chart_x_axis_gridlines_visible: + raise ValueError( + f"`chart_x_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_x_axis_gridlines_visible in list_chart_x_axis_gridlines_visible + and chart_x_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridlines_visible"] = filtered_dict[ + chart_x_axis_gridlines_visible + ] + self.state["state"]["x"]["gridlines_styling"] = chart_x_axis_gridlines_styling + self.state["state"]["x"]["gridline_color"] = chart_x_axis_gridline_color + + list_chart_x_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_x_axis_gridline_style not in list_chart_x_axis_gridline_style: + raise ValueError( + f"`chart_x_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_x_axis_gridline_style in list_chart_x_axis_gridline_style + and chart_x_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_x_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridline_style"] = filtered_dict[ + chart_x_axis_gridline_style + ] + self.state["state"]["x"]["gridline_width"] = chart_x_axis_gridline_width + self.state["state"]["x"][ + "gridline_category_dividers" + ] = chart_x_axis_gridline_category_dividers + self.state["state"]["x"][ + "gridline_category_dividers_extend" + ] = chart_x_axis_gridline_category_dividers_extend + + list_chart_y_axis_axis_visible = [True, False] + [None] + if chart_y_axis_axis_visible not in list_chart_y_axis_axis_visible: + raise ValueError( + f"`chart_y_axis_axis_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_axis_visible in list_chart_y_axis_axis_visible + and chart_y_axis_axis_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_axis_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["axis_visible"] = filtered_dict[ + chart_y_axis_axis_visible + ] + + list_chart_y_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_y_axis_numeric_scale_type not in list_chart_y_axis_numeric_scale_type: + raise ValueError( + f"`chart_y_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_y_axis_numeric_scale_type in list_chart_y_axis_numeric_scale_type + and chart_y_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_y_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["numeric_scale_type"] = filtered_dict[ + chart_y_axis_numeric_scale_type + ] + self.state["state"]["y"]["linear_min"] = chart_y_axis_linear_min + self.state["state"]["y"]["linear_max"] = chart_y_axis_linear_max + self.state["state"]["y"]["log_min"] = chart_y_axis_log_min + self.state["state"]["y"]["log_max"] = chart_y_axis_log_max + self.state["state"]["y"]["datetime_min"] = chart_y_axis_datetime_min + self.state["state"]["y"]["datetime_max"] = chart_y_axis_datetime_max + self.state["state"]["y"]["flip"] = chart_y_axis_flip + self.state["state"]["y"][ + "show_scale_settings" + ] = chart_y_axis_show_scale_settings + + list_chart_y_axis_nice = [True, False] + [None] + if chart_y_axis_nice not in list_chart_y_axis_nice: + raise ValueError(f"`chart_y_axis_nice` must be one of: [True, False]") + elif ( + chart_y_axis_nice in list_chart_y_axis_nice + and chart_y_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["nice"] = filtered_dict[chart_y_axis_nice] + + list_chart_y_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_y_axis_zero_axis not in list_chart_y_axis_zero_axis: + raise ValueError( + f"`chart_y_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_y_axis_zero_axis in list_chart_y_axis_zero_axis + and chart_y_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_y_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["zero_axis"] = filtered_dict[ + chart_y_axis_zero_axis + ] + + list_chart_y_axis_title_mode = ["auto", "custom"] + [None] + if chart_y_axis_title_mode not in list_chart_y_axis_title_mode: + raise ValueError( + f"`chart_y_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_y_axis_title_mode in list_chart_y_axis_title_mode + and chart_y_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_y_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_mode"] = filtered_dict[ + chart_y_axis_title_mode + ] + self.state["state"]["y"]["title"] = chart_y_axis_title + self.state["state"]["y"]["title_styling"] = chart_y_axis_title_styling + + list_chart_y_axis_title_position = ["side", "end"] + [None] + if chart_y_axis_title_position not in list_chart_y_axis_title_position: + raise ValueError( + f"`chart_y_axis_title_position` must be one of: ['side', 'end']" + ) + elif ( + chart_y_axis_title_position in list_chart_y_axis_title_position + and chart_y_axis_title_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"side": "side", "end": "end"}.items() + if chart_y_axis_title_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_position"] = filtered_dict[ + chart_y_axis_title_position + ] + + list_chart_y_axis_title_weight = ["bold", "normal"] + [None] + if chart_y_axis_title_weight not in list_chart_y_axis_title_weight: + raise ValueError( + f"`chart_y_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_title_weight in list_chart_y_axis_title_weight + and chart_y_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_weight"] = filtered_dict[ + chart_y_axis_title_weight + ] + self.state["state"]["y"]["title_color"] = chart_y_axis_title_color + self.state["state"]["y"]["title_size"] = chart_y_axis_title_size + self.state["state"]["y"]["title_padding"] = chart_y_axis_title_padding + + list_chart_y_axis_tick_label_position = ["default", "above", "below"] + [None] + if ( + chart_y_axis_tick_label_position + not in list_chart_y_axis_tick_label_position + ): + raise ValueError( + f"`chart_y_axis_tick_label_position` must be one of: ['default', 'above', 'below']" + ) + elif ( + chart_y_axis_tick_label_position in list_chart_y_axis_tick_label_position + and chart_y_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "above": "above", + "below": "below", + }.items() + if chart_y_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_position"] = filtered_dict[ + chart_y_axis_tick_label_position + ] + self.state["state"]["y"]["tick_label_styling"] = chart_y_axis_tick_label_styling + self.state["state"]["y"]["tick_label_size"] = chart_y_axis_tick_label_size + self.state["state"]["y"]["tick_label_color"] = chart_y_axis_tick_label_color + self.state["state"]["y"]["tick_padding"] = chart_y_axis_tick_padding + + list_chart_y_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_y_axis_tick_label_angle not in list_chart_y_axis_tick_label_angle: + raise ValueError( + f"`chart_y_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_y_axis_tick_label_angle in list_chart_y_axis_tick_label_angle + and chart_y_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_y_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_angle"] = filtered_dict[ + chart_y_axis_tick_label_angle + ] + + list_chart_y_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_y_axis_tick_label_weight not in list_chart_y_axis_tick_label_weight: + raise ValueError( + f"`chart_y_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_tick_label_weight in list_chart_y_axis_tick_label_weight + and chart_y_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_weight"] = filtered_dict[ + chart_y_axis_tick_label_weight + ] + self.state["state"]["y"][ + "tick_label_max_lines" + ] = chart_y_axis_tick_label_max_lines + self.state["state"]["y"][ + "tick_label_line_height" + ] = chart_y_axis_tick_label_line_height + + list_chart_y_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_y_axis_tick_label_space_mode + not in list_chart_y_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_y_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_y_axis_tick_label_space_mode + in list_chart_y_axis_tick_label_space_mode + and chart_y_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_y_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_space_mode"] = filtered_dict[ + chart_y_axis_tick_label_space_mode + ] + self.state["state"]["y"]["tick_label_space"] = chart_y_axis_tick_label_space + + list_chart_y_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_y_axis_tick_mode not in list_chart_y_axis_tick_mode: + raise ValueError( + f"`chart_y_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_y_axis_tick_mode in list_chart_y_axis_tick_mode + and chart_y_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_y_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_mode"] = filtered_dict[ + chart_y_axis_tick_mode + ] + self.state["state"]["y"]["tick_number"] = chart_y_axis_tick_number + + if ( + chart_y_axis_tick_custom is not None + and len(chart_y_axis_tick_custom) > 1 + and isinstance(chart_y_axis_tick_custom, list) + ): + self.state["state"]["y"]["tick_custom"] = " \n ".join( + chart_y_axis_tick_custom + ) + else: + self.state["state"]["y"]["tick_custom"] = chart_y_axis_tick_custom + + self.state["state"]["y"][ + "line_and_tick_color" + ] = chart_y_axis_line_and_tick_color + self.state["state"]["y"][ + "line_and_tick_width" + ] = chart_y_axis_line_and_tick_width + self.state["state"]["y"]["tick_length"] = chart_y_axis_tick_length + + list_chart_y_axis_tick_side = ["out", "in"] + [None] + if chart_y_axis_tick_side not in list_chart_y_axis_tick_side: + raise ValueError(f"`chart_y_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_y_axis_tick_side in list_chart_y_axis_tick_side + and chart_y_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_y_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_side"] = filtered_dict[ + chart_y_axis_tick_side + ] + self.state["state"]["y"]["line_visible"] = chart_y_axis_line_visible + self.state["state"]["y"]["edge_padding"] = chart_y_axis_edge_padding + + list_chart_y_axis_gridlines_visible = [True, False] + [None] + if chart_y_axis_gridlines_visible not in list_chart_y_axis_gridlines_visible: + raise ValueError( + f"`chart_y_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_gridlines_visible in list_chart_y_axis_gridlines_visible + and chart_y_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridlines_visible"] = filtered_dict[ + chart_y_axis_gridlines_visible + ] + self.state["state"]["y"]["gridlines_styling"] = chart_y_axis_gridlines_styling + self.state["state"]["y"]["gridline_color"] = chart_y_axis_gridline_color + + list_chart_y_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_y_axis_gridline_style not in list_chart_y_axis_gridline_style: + raise ValueError( + f"`chart_y_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_y_axis_gridline_style in list_chart_y_axis_gridline_style + and chart_y_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_y_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridline_style"] = filtered_dict[ + chart_y_axis_gridline_style + ] + self.state["state"]["y"]["gridline_width"] = chart_y_axis_gridline_width + self.state["state"]["y"][ + "gridline_category_dividers" + ] = chart_y_axis_gridline_category_dividers + self.state["state"]["y"][ + "gridline_category_dividers_extend" + ] = chart_y_axis_gridline_category_dividers_extend + + list_chart_secondary_y_axis_axis_visible = [True, False] + [None] + if ( + chart_secondary_y_axis_axis_visible + not in list_chart_secondary_y_axis_axis_visible + ): + raise ValueError( + f"`chart_secondary_y_axis_axis_visible` must be one of: [True, False]" + ) + elif ( + chart_secondary_y_axis_axis_visible + in list_chart_secondary_y_axis_axis_visible + and chart_secondary_y_axis_axis_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_secondary_y_axis_axis_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["axis_visible"] = filtered_dict[ + chart_secondary_y_axis_axis_visible + ] + + list_chart_secondary_y_axis_numeric_scale_type = ["linear", "log"] + [None] + if ( + chart_secondary_y_axis_numeric_scale_type + not in list_chart_secondary_y_axis_numeric_scale_type + ): + raise ValueError( + f"`chart_secondary_y_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_secondary_y_axis_numeric_scale_type + in list_chart_secondary_y_axis_numeric_scale_type + and chart_secondary_y_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_secondary_y_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["numeric_scale_type"] = filtered_dict[ + chart_secondary_y_axis_numeric_scale_type + ] + self.state["state"]["y2"]["linear_min"] = chart_secondary_y_axis_linear_min + self.state["state"]["y2"]["linear_max"] = chart_secondary_y_axis_linear_max + self.state["state"]["y2"]["log_min"] = chart_secondary_y_axis_log_min + self.state["state"]["y2"]["log_max"] = chart_secondary_y_axis_log_max + self.state["state"]["y2"]["datetime_min"] = chart_secondary_y_axis_datetime_min + self.state["state"]["y2"]["datetime_max"] = chart_secondary_y_axis_datetime_max + self.state["state"]["y2"]["flip"] = chart_secondary_y_axis_flip + self.state["state"]["y2"][ + "show_scale_settings" + ] = chart_secondary_y_axis_show_scale_settings + + list_chart_secondary_y_axis_nice = [True, False] + [None] + if chart_secondary_y_axis_nice not in list_chart_secondary_y_axis_nice: + raise ValueError( + f"`chart_secondary_y_axis_nice` must be one of: [True, False]" + ) + elif ( + chart_secondary_y_axis_nice in list_chart_secondary_y_axis_nice + and chart_secondary_y_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_secondary_y_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["nice"] = filtered_dict[ + chart_secondary_y_axis_nice + ] + + list_chart_secondary_y_axis_zero_axis = ["auto", "on", "off"] + [None] + if ( + chart_secondary_y_axis_zero_axis + not in list_chart_secondary_y_axis_zero_axis + ): + raise ValueError( + f"`chart_secondary_y_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_secondary_y_axis_zero_axis in list_chart_secondary_y_axis_zero_axis + and chart_secondary_y_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_secondary_y_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["zero_axis"] = filtered_dict[ + chart_secondary_y_axis_zero_axis + ] + + list_chart_secondary_y_axis_title_mode = ["auto", "custom"] + [None] + if ( + chart_secondary_y_axis_title_mode + not in list_chart_secondary_y_axis_title_mode + ): + raise ValueError( + f"`chart_secondary_y_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_secondary_y_axis_title_mode in list_chart_secondary_y_axis_title_mode + and chart_secondary_y_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_secondary_y_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["title_mode"] = filtered_dict[ + chart_secondary_y_axis_title_mode + ] + self.state["state"]["y2"]["title"] = chart_secondary_y_axis_title + self.state["state"]["y2"][ + "title_styling" + ] = chart_secondary_y_axis_title_styling + + list_chart_secondary_y_axis_title_position = ["side", "end"] + [None] + if ( + chart_secondary_y_axis_title_position + not in list_chart_secondary_y_axis_title_position + ): + raise ValueError( + f"`chart_secondary_y_axis_title_position` must be one of: ['side', 'end']" + ) + elif ( + chart_secondary_y_axis_title_position + in list_chart_secondary_y_axis_title_position + and chart_secondary_y_axis_title_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"side": "side", "end": "end"}.items() + if chart_secondary_y_axis_title_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["title_position"] = filtered_dict[ + chart_secondary_y_axis_title_position + ] + + list_chart_secondary_y_axis_title_weight = ["bold", "normal"] + [None] + if ( + chart_secondary_y_axis_title_weight + not in list_chart_secondary_y_axis_title_weight + ): + raise ValueError( + f"`chart_secondary_y_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_secondary_y_axis_title_weight + in list_chart_secondary_y_axis_title_weight + and chart_secondary_y_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_secondary_y_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["title_weight"] = filtered_dict[ + chart_secondary_y_axis_title_weight + ] + self.state["state"]["y2"]["title_color"] = chart_secondary_y_axis_title_color + self.state["state"]["y2"]["title_size"] = chart_secondary_y_axis_title_size + self.state["state"]["y2"][ + "title_padding" + ] = chart_secondary_y_axis_title_padding + + list_chart_secondary_y_axis_tick_label_position = [ + "default", + "above", + "below", + ] + [None] + if ( + chart_secondary_y_axis_tick_label_position + not in list_chart_secondary_y_axis_tick_label_position + ): + raise ValueError( + f"`chart_secondary_y_axis_tick_label_position` must be one of: ['default', 'above', 'below']" + ) + elif ( + chart_secondary_y_axis_tick_label_position + in list_chart_secondary_y_axis_tick_label_position + and chart_secondary_y_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "above": "above", + "below": "below", + }.items() + if chart_secondary_y_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["tick_label_position"] = filtered_dict[ + chart_secondary_y_axis_tick_label_position + ] + self.state["state"]["y2"][ + "tick_label_styling" + ] = chart_secondary_y_axis_tick_label_styling + self.state["state"]["y2"][ + "tick_label_size" + ] = chart_secondary_y_axis_tick_label_size + self.state["state"]["y2"][ + "tick_label_color" + ] = chart_secondary_y_axis_tick_label_color + self.state["state"]["y2"]["tick_padding"] = chart_secondary_y_axis_tick_padding + + list_chart_secondary_y_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [ + None + ] + if ( + chart_secondary_y_axis_tick_label_angle + not in list_chart_secondary_y_axis_tick_label_angle + ): + raise ValueError( + f"`chart_secondary_y_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_secondary_y_axis_tick_label_angle + in list_chart_secondary_y_axis_tick_label_angle + and chart_secondary_y_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_secondary_y_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["tick_label_angle"] = filtered_dict[ + chart_secondary_y_axis_tick_label_angle + ] + + list_chart_secondary_y_axis_tick_label_weight = ["bold", "normal"] + [None] + if ( + chart_secondary_y_axis_tick_label_weight + not in list_chart_secondary_y_axis_tick_label_weight + ): + raise ValueError( + f"`chart_secondary_y_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_secondary_y_axis_tick_label_weight + in list_chart_secondary_y_axis_tick_label_weight + and chart_secondary_y_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_secondary_y_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["tick_label_weight"] = filtered_dict[ + chart_secondary_y_axis_tick_label_weight + ] + self.state["state"]["y2"][ + "tick_label_max_lines" + ] = chart_secondary_y_axis_tick_label_max_lines + self.state["state"]["y2"][ + "tick_label_line_height" + ] = chart_secondary_y_axis_tick_label_line_height + + list_chart_secondary_y_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [ + None + ] + if ( + chart_secondary_y_axis_tick_label_space_mode + not in list_chart_secondary_y_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_secondary_y_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_secondary_y_axis_tick_label_space_mode + in list_chart_secondary_y_axis_tick_label_space_mode + and chart_secondary_y_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_secondary_y_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["tick_label_space_mode"] = filtered_dict[ + chart_secondary_y_axis_tick_label_space_mode + ] + self.state["state"]["y2"][ + "tick_label_space" + ] = chart_secondary_y_axis_tick_label_space + + list_chart_secondary_y_axis_tick_mode = ["auto", "number", "custom"] + [None] + if ( + chart_secondary_y_axis_tick_mode + not in list_chart_secondary_y_axis_tick_mode + ): + raise ValueError( + f"`chart_secondary_y_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_secondary_y_axis_tick_mode in list_chart_secondary_y_axis_tick_mode + and chart_secondary_y_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_secondary_y_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["tick_mode"] = filtered_dict[ + chart_secondary_y_axis_tick_mode + ] + self.state["state"]["y2"]["tick_number"] = chart_secondary_y_axis_tick_number + + if ( + chart_secondary_y_axis_tick_custom is not None + and len(chart_secondary_y_axis_tick_custom) > 1 + and isinstance(chart_secondary_y_axis_tick_custom, list) + ): + self.state["state"]["y2"]["tick_custom"] = " \n ".join( + chart_secondary_y_axis_tick_custom + ) + else: + self.state["state"]["y2"][ + "tick_custom" + ] = chart_secondary_y_axis_tick_custom + + self.state["state"]["y2"][ + "line_and_tick_color" + ] = chart_secondary_y_axis_line_and_tick_color + self.state["state"]["y2"][ + "line_and_tick_width" + ] = chart_secondary_y_axis_line_and_tick_width + self.state["state"]["y2"]["tick_length"] = chart_secondary_y_axis_tick_length + + list_chart_secondary_y_axis_tick_side = ["out", "in"] + [None] + if ( + chart_secondary_y_axis_tick_side + not in list_chart_secondary_y_axis_tick_side + ): + raise ValueError( + f"`chart_secondary_y_axis_tick_side` must be one of: ['out', 'in']" + ) + elif ( + chart_secondary_y_axis_tick_side in list_chart_secondary_y_axis_tick_side + and chart_secondary_y_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_secondary_y_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["tick_side"] = filtered_dict[ + chart_secondary_y_axis_tick_side + ] + self.state["state"]["y2"]["line_visible"] = chart_secondary_y_axis_line_visible + self.state["state"]["y2"]["edge_padding"] = chart_secondary_y_axis_edge_padding + + list_chart_secondary_y_axis_gridlines_visible = [True, False] + [None] + if ( + chart_secondary_y_axis_gridlines_visible + not in list_chart_secondary_y_axis_gridlines_visible + ): + raise ValueError( + f"`chart_secondary_y_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_secondary_y_axis_gridlines_visible + in list_chart_secondary_y_axis_gridlines_visible + and chart_secondary_y_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_secondary_y_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["gridlines_visible"] = filtered_dict[ + chart_secondary_y_axis_gridlines_visible + ] + self.state["state"]["y2"][ + "gridlines_styling" + ] = chart_secondary_y_axis_gridlines_styling + self.state["state"]["y2"][ + "gridline_color" + ] = chart_secondary_y_axis_gridline_color + + list_chart_secondary_y_axis_gridline_style = [ + "solid", + "dash", + "dot", + "dot_dash", + ] + [None] + if ( + chart_secondary_y_axis_gridline_style + not in list_chart_secondary_y_axis_gridline_style + ): + raise ValueError( + f"`chart_secondary_y_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_secondary_y_axis_gridline_style + in list_chart_secondary_y_axis_gridline_style + and chart_secondary_y_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_secondary_y_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["y2"]["gridline_style"] = filtered_dict[ + chart_secondary_y_axis_gridline_style + ] + self.state["state"]["y2"][ + "gridline_width" + ] = chart_secondary_y_axis_gridline_width + self.state["state"]["y2"][ + "gridline_category_dividers" + ] = chart_secondary_y_axis_gridline_category_dividers + self.state["state"]["y2"][ + "gridline_category_dividers_extend" + ] = chart_secondary_y_axis_gridline_category_dividers_extend + + list_chart_background_background_color_enabled = [True, False] + [None] + if ( + chart_background_background_color_enabled + not in list_chart_background_background_color_enabled + ): + raise ValueError( + f"`chart_background_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_background_background_color_enabled + in list_chart_background_background_color_enabled + and chart_background_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_background_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_color_enabled" + ] = filtered_dict[chart_background_background_color_enabled] + + list_chart_background_background_image_enabled = [True, False] + [None] + if ( + chart_background_background_image_enabled + not in list_chart_background_background_image_enabled + ): + raise ValueError( + f"`chart_background_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_background_background_image_enabled + in list_chart_background_background_image_enabled + and chart_background_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_background_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_image_enabled" + ] = filtered_dict[chart_background_background_image_enabled] + self.state["state"]["chart_bg"][ + "background_color" + ] = chart_background_background_color + self.state["state"]["chart_bg"][ + "background_image_src" + ] = chart_background_background_image_src + + list_chart_background_background_image_size = ["stretch", "slice", "meet"] + [ + None + ] + if ( + chart_background_background_image_size + not in list_chart_background_background_image_size + ): + raise ValueError( + f"`chart_background_background_image_size` must be one of: ['stretch', 'slice', 'meet']" + ) + elif ( + chart_background_background_image_size + in list_chart_background_background_image_size + and chart_background_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "stretch": "stretch", + "slice": "slice", + "meet": "meet", + }.items() + if chart_background_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_image_size" + ] = filtered_dict[chart_background_background_image_size] + + list_chart_background_background_image_position = [ + "x_min_y_min", + "x_mid_y_min", + "x_max_y_min", + "x_max_y_mid", + "x_mid_y_mid", + "x_min_y_max", + "x_mid_y_max", + "x_max_y_max", + ] + [None] + if ( + chart_background_background_image_position + not in list_chart_background_background_image_position + ): + raise ValueError( + f"`chart_background_background_image_position` must be one of: ['x_min_y_min', 'x_mid_y_min', 'x_max_y_min', 'x_max_y_mid', 'x_mid_y_mid', 'x_min_y_max', 'x_mid_y_max', 'x_max_y_max']" + ) + elif ( + chart_background_background_image_position + in list_chart_background_background_image_position + and chart_background_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "x_min_y_min": "xMinYMin", + "x_mid_y_min": "xMidYMin", + "x_max_y_min": "xMaxYMin", + "x_max_y_mid": "xMaxYMid", + "x_mid_y_mid": "xMidYMid", + "x_min_y_max": "xMinYMax", + "x_mid_y_max": "xMidYMax", + "x_max_y_max": "xMaxYMax", + }.items() + if chart_background_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_image_position" + ] = filtered_dict[chart_background_background_image_position] + self.state["state"]["number_format_labels"][ + "prefix" + ] = number_format_labels_prefix + self.state["state"]["number_format_labels"][ + "suffix" + ] = number_format_labels_suffix + self.state["state"]["number_format_labels"][ + "n_dec" + ] = number_format_labels_n_dec + self.state["state"]["number_format_labels"][ + "advanced" + ] = number_format_labels_advanced + + list_number_format_labels_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + number_format_labels_negative_sign + not in list_number_format_labels_negative_sign + ): + raise ValueError( + f"`number_format_labels_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + number_format_labels_negative_sign + in list_number_format_labels_negative_sign + and number_format_labels_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if number_format_labels_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format_labels"][ + "negative_sign" + ] = filtered_dict[number_format_labels_negative_sign] + self.state["state"]["number_format_labels"][ + "strip_zeros" + ] = number_format_labels_strip_zeros + self.state["state"]["number_format_labels"][ + "strip_separator" + ] = number_format_labels_strip_separator + self.state["state"]["number_format_labels"][ + "transform_labels" + ] = number_format_labels_transform_labels + + list_number_format_labels_transform = ["multiply", "divide", "exponentiate"] + [ + None + ] + if number_format_labels_transform not in list_number_format_labels_transform: + raise ValueError( + f"`number_format_labels_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + number_format_labels_transform in list_number_format_labels_transform + and number_format_labels_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if number_format_labels_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format_labels"][ + "transform" + ] = filtered_dict[number_format_labels_transform] + self.state["state"]["number_format_labels"][ + "multiply_divide_constant" + ] = number_format_labels_multiply_divide_constant + self.state["state"]["number_format_labels"][ + "exponentiate_constant" + ] = number_format_labels_exponentiate_constant + self.state["state"]["number_format"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["number_format"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["number_format"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["number_format"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["number_format"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["number_format"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["number_format"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["number_format"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["number_format"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + self.state["state"]["number_format_prop"] = number_format_prop + self.state["state"]["number_format_secondary"][ + "prefix" + ] = chart_secondary_number_date_format_prefix + self.state["state"]["number_format_secondary"][ + "suffix" + ] = chart_secondary_number_date_format_suffix + self.state["state"]["number_format_secondary"][ + "n_dec" + ] = chart_secondary_number_date_format_n_dec + self.state["state"]["number_format_secondary"][ + "advanced" + ] = chart_secondary_number_date_format_advanced + + list_chart_secondary_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_secondary_number_date_format_negative_sign + not in list_chart_secondary_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_secondary_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_secondary_number_date_format_negative_sign + in list_chart_secondary_number_date_format_negative_sign + and chart_secondary_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_secondary_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format_secondary"][ + "negative_sign" + ] = filtered_dict[chart_secondary_number_date_format_negative_sign] + self.state["state"]["number_format_secondary"][ + "strip_zeros" + ] = chart_secondary_number_date_format_strip_zeros + self.state["state"]["number_format_secondary"][ + "strip_separator" + ] = chart_secondary_number_date_format_strip_separator + self.state["state"]["number_format_secondary"][ + "transform_labels" + ] = chart_secondary_number_date_format_transform_labels + + list_chart_secondary_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_secondary_number_date_format_transform + not in list_chart_secondary_number_date_format_transform + ): + raise ValueError( + f"`chart_secondary_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_secondary_number_date_format_transform + in list_chart_secondary_number_date_format_transform + and chart_secondary_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_secondary_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format_secondary"][ + "transform" + ] = filtered_dict[chart_secondary_number_date_format_transform] + self.state["state"]["number_format_secondary"][ + "multiply_divide_constant" + ] = chart_secondary_number_date_format_multiply_divide_constant + self.state["state"]["number_format_secondary"][ + "exponentiate_constant" + ] = chart_secondary_number_date_format_exponentiate_constant + + list_legend_mode = ["auto", "on", "off"] + [None] + if legend_mode not in list_legend_mode: + raise ValueError(f"`legend_mode` must be one of: ['auto', 'on', 'off']") + elif legend_mode in list_legend_mode and legend_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if legend_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_mode"] = filtered_dict[legend_mode] + + list_legend_filter_mode = ["none", "filter-in", "filter-out"] + [None] + if legend_filter_mode not in list_legend_filter_mode: + raise ValueError( + f"`legend_filter_mode` must be one of: ['none', 'filter-in', 'filter-out']" + ) + elif ( + legend_filter_mode in list_legend_filter_mode + and legend_filter_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "filter-in": "filter-in", + "filter-out": "filter-out", + }.items() + if legend_filter_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_filter_mode"] = filtered_dict[ + legend_filter_mode + ] + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_legend_position = ["above", "below"] + [None] + if legend_position not in list_legend_position: + raise ValueError(f"`legend_position` must be one of: ['above', 'below']") + elif legend_position in list_legend_position and legend_position is not None: + filtered_dict = { + k: v + for (k, v) in {"above": "above", "below": "below"}.items() + if legend_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_position"] = filtered_dict[legend_position] + + list_text_legend = ["auto", "custom", "off"] + [None] + if text_legend not in list_text_legend: + raise ValueError(f"`text_legend` must be one of: ['auto', 'custom', 'off']") + elif text_legend in list_text_legend and text_legend is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom", "off": "off"}.items() + if text_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["text_legend"] = filtered_dict[text_legend] + self.state["state"]["text_legend_title"] = text_legend_title + self.state["state"]["text_legend_subtitle"] = text_legend_subtitle + self.state["state"]["text_legend_bold"] = text_legend_bold + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + self.state["state"]["popup_color_headers"] = popup_color_headers + self.state["state"]["show_series_text"] = show_series_text + + if ( + popup_series_text is not None + and len(popup_series_text) > 1 + and isinstance(popup_series_text, list) + ): + self.state["state"]["popup_series_text"] = " \n ".join(popup_series_text) + else: + self.state["state"]["popup_series_text"] = popup_series_text + + list_chart_axes_highlights_placement = ["above", "below"] + [None] + if chart_axes_highlights_placement not in list_chart_axes_highlights_placement: + raise ValueError( + f"`chart_axes_highlights_placement` must be one of: ['above', 'below']" + ) + elif ( + chart_axes_highlights_placement in list_chart_axes_highlights_placement + and chart_axes_highlights_placement is not None + ): + filtered_dict = { + k: v + for (k, v) in {"above": "above", "below": "below"}.items() + if chart_axes_highlights_placement in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"]["placement"] = filtered_dict[ + chart_axes_highlights_placement + ] + self.state["state"]["axes_highlights"][ + "x_enabled" + ] = chart_axes_highlights_x_enabled + + if ( + chart_axes_highlights_x_lines is not None + and len(chart_axes_highlights_x_lines) > 1 + and isinstance(chart_axes_highlights_x_lines, list) + ): + self.state["state"]["axes_highlights"]["x_lines"] = " \n ".join( + chart_axes_highlights_x_lines + ) + else: + self.state["state"]["axes_highlights"][ + "x_lines" + ] = chart_axes_highlights_x_lines + + self.state["state"]["axes_highlights"][ + "x_line_color" + ] = chart_axes_highlights_x_line_color + self.state["state"]["axes_highlights"][ + "x_line_width" + ] = chart_axes_highlights_x_line_width + self.state["state"]["axes_highlights"][ + "x_line_dash" + ] = chart_axes_highlights_x_line_dash + + if ( + chart_axes_highlights_x_areas is not None + and len(chart_axes_highlights_x_areas) > 1 + and isinstance(chart_axes_highlights_x_areas, list) + ): + self.state["state"]["axes_highlights"]["x_areas"] = " \n ".join( + chart_axes_highlights_x_areas + ) + else: + self.state["state"]["axes_highlights"][ + "x_areas" + ] = chart_axes_highlights_x_areas + + self.state["state"]["axes_highlights"][ + "x_area_color" + ] = chart_axes_highlights_x_area_color + self.state["state"]["axes_highlights"][ + "x_area_opacity" + ] = chart_axes_highlights_x_area_opacity + + list_chart_axes_highlights_x_area_texture = [ + "none", + "pattern-diagonal", + "pattern-grid", + "pattern-dots", + ] + [None] + if ( + chart_axes_highlights_x_area_texture + not in list_chart_axes_highlights_x_area_texture + ): + raise ValueError( + f"`chart_axes_highlights_x_area_texture` must be one of: ['none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots']" + ) + elif ( + chart_axes_highlights_x_area_texture + in list_chart_axes_highlights_x_area_texture + and chart_axes_highlights_x_area_texture is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "pattern-diagonal": "fl-pattern-diagonal", + "pattern-grid": "fl-pattern-grid", + "pattern-dots": "fl-pattern-dots", + }.items() + if chart_axes_highlights_x_area_texture in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_area_texture" + ] = filtered_dict[chart_axes_highlights_x_area_texture] + self.state["state"]["axes_highlights"][ + "x_label_vertical" + ] = chart_axes_highlights_x_label_vertical + + list_chart_axes_highlights_x_label_y_position = ["bottom", "middle", "top"] + [ + None + ] + if ( + chart_axes_highlights_x_label_y_position + not in list_chart_axes_highlights_x_label_y_position + ): + raise ValueError( + f"`chart_axes_highlights_x_label_y_position` must be one of: ['bottom', 'middle', 'top']" + ) + elif ( + chart_axes_highlights_x_label_y_position + in list_chart_axes_highlights_x_label_y_position + and chart_axes_highlights_x_label_y_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "middle": "middle", + "top": "top", + }.items() + if chart_axes_highlights_x_label_y_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_label_y_position" + ] = filtered_dict[chart_axes_highlights_x_label_y_position] + + list_chart_axes_highlights_x_label_x_position = ["left", "middle", "right"] + [ + None + ] + if ( + chart_axes_highlights_x_label_x_position + not in list_chart_axes_highlights_x_label_x_position + ): + raise ValueError( + f"`chart_axes_highlights_x_label_x_position` must be one of: ['left', 'middle', 'right']" + ) + elif ( + chart_axes_highlights_x_label_x_position + in list_chart_axes_highlights_x_label_x_position + and chart_axes_highlights_x_label_x_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "middle": "middle", + "right": "right", + }.items() + if chart_axes_highlights_x_label_x_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_label_x_position" + ] = filtered_dict[chart_axes_highlights_x_label_x_position] + self.state["state"]["axes_highlights"][ + "x_label_max_width" + ] = chart_axes_highlights_x_label_max_width + self.state["state"]["axes_highlights"][ + "x_font_size" + ] = chart_axes_highlights_x_font_size + + list_chart_axes_highlights_x_font_weight = ["regular", "bold"] + [None] + if ( + chart_axes_highlights_x_font_weight + not in list_chart_axes_highlights_x_font_weight + ): + raise ValueError( + f"`chart_axes_highlights_x_font_weight` must be one of: ['regular', 'bold']" + ) + elif ( + chart_axes_highlights_x_font_weight + in list_chart_axes_highlights_x_font_weight + and chart_axes_highlights_x_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"regular": "regular", "bold": "bold"}.items() + if chart_axes_highlights_x_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"]["x_font_weight"] = filtered_dict[ + chart_axes_highlights_x_font_weight + ] + self.state["state"]["axes_highlights"][ + "x_label_color" + ] = chart_axes_highlights_x_label_color + self.state["state"]["axes_highlights"][ + "x_shadow_color" + ] = chart_axes_highlights_x_shadow_color + self.state["state"]["axes_highlights"][ + "x_shadow_enabled" + ] = chart_axes_highlights_x_shadow_enabled + self.state["state"]["axes_highlights"][ + "y_enabled" + ] = chart_axes_highlights_y_enabled + + if ( + chart_axes_highlights_y_lines is not None + and len(chart_axes_highlights_y_lines) > 1 + and isinstance(chart_axes_highlights_y_lines, list) + ): + self.state["state"]["axes_highlights"]["y_lines"] = " \n ".join( + chart_axes_highlights_y_lines + ) + else: + self.state["state"]["axes_highlights"][ + "y_lines" + ] = chart_axes_highlights_y_lines + + self.state["state"]["axes_highlights"][ + "y_line_color" + ] = chart_axes_highlights_y_line_color + self.state["state"]["axes_highlights"][ + "y_line_width" + ] = chart_axes_highlights_y_line_width + self.state["state"]["axes_highlights"][ + "y_line_dash" + ] = chart_axes_highlights_y_line_dash + + if ( + chart_axes_highlights_y_areas is not None + and len(chart_axes_highlights_y_areas) > 1 + and isinstance(chart_axes_highlights_y_areas, list) + ): + self.state["state"]["axes_highlights"]["y_areas"] = " \n ".join( + chart_axes_highlights_y_areas + ) + else: + self.state["state"]["axes_highlights"][ + "y_areas" + ] = chart_axes_highlights_y_areas + + self.state["state"]["axes_highlights"][ + "y_area_color" + ] = chart_axes_highlights_y_area_color + self.state["state"]["axes_highlights"][ + "y_area_opacity" + ] = chart_axes_highlights_y_area_opacity + + list_chart_axes_highlights_y_area_texture = [ + "none", + "pattern-diagonal", + "pattern-grid", + "pattern-dots", + ] + [None] + if ( + chart_axes_highlights_y_area_texture + not in list_chart_axes_highlights_y_area_texture + ): + raise ValueError( + f"`chart_axes_highlights_y_area_texture` must be one of: ['none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots']" + ) + elif ( + chart_axes_highlights_y_area_texture + in list_chart_axes_highlights_y_area_texture + and chart_axes_highlights_y_area_texture is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "pattern-diagonal": "fl-pattern-diagonal", + "pattern-grid": "fl-pattern-grid", + "pattern-dots": "fl-pattern-dots", + }.items() + if chart_axes_highlights_y_area_texture in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_area_texture" + ] = filtered_dict[chart_axes_highlights_y_area_texture] + + list_chart_axes_highlights_y_label_x_position = ["left", "middle", "right"] + [ + None + ] + if ( + chart_axes_highlights_y_label_x_position + not in list_chart_axes_highlights_y_label_x_position + ): + raise ValueError( + f"`chart_axes_highlights_y_label_x_position` must be one of: ['left', 'middle', 'right']" + ) + elif ( + chart_axes_highlights_y_label_x_position + in list_chart_axes_highlights_y_label_x_position + and chart_axes_highlights_y_label_x_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "middle": "middle", + "right": "right", + }.items() + if chart_axes_highlights_y_label_x_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_label_x_position" + ] = filtered_dict[chart_axes_highlights_y_label_x_position] + + list_chart_axes_highlights_y_label_y_position = ["above", "middle", "below"] + [ + None + ] + if ( + chart_axes_highlights_y_label_y_position + not in list_chart_axes_highlights_y_label_y_position + ): + raise ValueError( + f"`chart_axes_highlights_y_label_y_position` must be one of: ['above', 'middle', 'below']" + ) + elif ( + chart_axes_highlights_y_label_y_position + in list_chart_axes_highlights_y_label_y_position + and chart_axes_highlights_y_label_y_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "above": "above", + "middle": "middle", + "below": "below", + }.items() + if chart_axes_highlights_y_label_y_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_label_y_position" + ] = filtered_dict[chart_axes_highlights_y_label_y_position] + self.state["state"]["axes_highlights"][ + "y_label_max_width" + ] = chart_axes_highlights_y_label_max_width + self.state["state"]["axes_highlights"][ + "y_font_size" + ] = chart_axes_highlights_y_font_size + + list_chart_axes_highlights_y_font_weight = ["regular", "bold"] + [None] + if ( + chart_axes_highlights_y_font_weight + not in list_chart_axes_highlights_y_font_weight + ): + raise ValueError( + f"`chart_axes_highlights_y_font_weight` must be one of: ['regular', 'bold']" + ) + elif ( + chart_axes_highlights_y_font_weight + in list_chart_axes_highlights_y_font_weight + and chart_axes_highlights_y_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"regular": "regular", "bold": "bold"}.items() + if chart_axes_highlights_y_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"]["y_font_weight"] = filtered_dict[ + chart_axes_highlights_y_font_weight + ] + self.state["state"]["axes_highlights"][ + "y_label_color" + ] = chart_axes_highlights_y_label_color + self.state["state"]["axes_highlights"][ + "y_shadow_color" + ] = chart_axes_highlights_y_shadow_color + self.state["state"]["axes_highlights"][ + "y_shadow_enabled" + ] = chart_axes_highlights_y_shadow_enabled + self.state["state"]["annotations_styles"] = annotations_styles + + list_chart_annotations_defaults_text_weight = ["normal", "bold"] + [None] + if ( + chart_annotations_defaults_text_weight + not in list_chart_annotations_defaults_text_weight + ): + raise ValueError( + f"`chart_annotations_defaults_text_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_annotations_defaults_text_weight + in list_chart_annotations_defaults_text_weight + and chart_annotations_defaults_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_annotations_defaults_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "text_weight" + ] = filtered_dict[chart_annotations_defaults_text_weight] + self.state["state"]["annotations"]["defaults"][ + "text_size" + ] = chart_annotations_defaults_text_size + self.state["state"]["annotations"]["defaults"][ + "text_color" + ] = chart_annotations_defaults_text_color + self.state["state"]["annotations"]["defaults"][ + "label_width" + ] = chart_annotations_defaults_label_width + + list_chart_annotations_defaults_text_background_mode = [ + "none", + "outline", + "background", + ] + [None] + if ( + chart_annotations_defaults_text_background_mode + not in list_chart_annotations_defaults_text_background_mode + ): + raise ValueError( + f"`chart_annotations_defaults_text_background_mode` must be one of: ['none', 'outline', 'background']" + ) + elif ( + chart_annotations_defaults_text_background_mode + in list_chart_annotations_defaults_text_background_mode + and chart_annotations_defaults_text_background_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "outline": "outline", + "background": "background", + }.items() + if chart_annotations_defaults_text_background_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "text_background_mode" + ] = filtered_dict[chart_annotations_defaults_text_background_mode] + self.state["state"]["annotations"]["defaults"][ + "text_bg" + ] = chart_annotations_defaults_text_bg + self.state["state"]["annotations"]["defaults"][ + "label_bg" + ] = chart_annotations_defaults_label_bg + + list_chart_annotations_defaults_text_alignment = [ + "auto", + "start", + "center", + "end", + ] + [None] + if ( + chart_annotations_defaults_text_alignment + not in list_chart_annotations_defaults_text_alignment + ): + raise ValueError( + f"`chart_annotations_defaults_text_alignment` must be one of: ['auto', 'start', 'center', 'end']" + ) + elif ( + chart_annotations_defaults_text_alignment + in list_chart_annotations_defaults_text_alignment + and chart_annotations_defaults_text_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_annotations_defaults_text_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "text_alignment" + ] = filtered_dict[chart_annotations_defaults_text_alignment] + + list_chart_annotations_defaults_popup_position = [ + "center", + "left", + "right", + "top", + "bottom", + ] + [None] + if ( + chart_annotations_defaults_popup_position + not in list_chart_annotations_defaults_popup_position + ): + raise ValueError( + f"`chart_annotations_defaults_popup_position` must be one of: ['center', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_annotations_defaults_popup_position + in list_chart_annotations_defaults_popup_position + and chart_annotations_defaults_popup_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "center": "center", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_annotations_defaults_popup_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "popup_position" + ] = filtered_dict[chart_annotations_defaults_popup_position] + + list_chart_annotations_defaults_line_marker = [ + "none", + "arrowhead_open", + "arrowhead", + ] + [None] + if ( + chart_annotations_defaults_line_marker + not in list_chart_annotations_defaults_line_marker + ): + raise ValueError( + f"`chart_annotations_defaults_line_marker` must be one of: ['none', 'arrowhead_open', 'arrowhead']" + ) + elif ( + chart_annotations_defaults_line_marker + in list_chart_annotations_defaults_line_marker + and chart_annotations_defaults_line_marker is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "arrowhead_open": "arrowhead_open", + "arrowhead": "arrowhead", + }.items() + if chart_annotations_defaults_line_marker in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "line_marker" + ] = filtered_dict[chart_annotations_defaults_line_marker] + self.state["state"]["annotations"]["defaults"][ + "stroke_width" + ] = chart_annotations_defaults_stroke_width + self.state["state"]["annotations"]["defaults"][ + "stroke_color" + ] = chart_annotations_defaults_stroke_color + + list_chart_annotations_defaults_connector_extend_line = [ + "enabled", + "disabled", + ] + [None] + if ( + chart_annotations_defaults_connector_extend_line + not in list_chart_annotations_defaults_connector_extend_line + ): + raise ValueError( + f"`chart_annotations_defaults_connector_extend_line` must be one of: ['enabled', 'disabled']" + ) + elif ( + chart_annotations_defaults_connector_extend_line + in list_chart_annotations_defaults_connector_extend_line + and chart_annotations_defaults_connector_extend_line is not None + ): + filtered_dict = { + k: v + for (k, v) in {"enabled": "enabled", "disabled": "disabled"}.items() + if chart_annotations_defaults_connector_extend_line in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "connector_extend_line" + ] = filtered_dict[chart_annotations_defaults_connector_extend_line] + self.state["state"]["data_trans_duration"] = data_trans_duration + self.state["state"]["animate_on_load"] = animate_on_load + self.state["state"]["data_trans_bind_series"] = data_trans_bind_series + self.state["state"]["data_trans_bind_data_points"] = data_trans_bind_data_points + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + self.state["state"]["url_state"]["enabled"] = chart_url_settings_enabled + + if ( + chart_url_settings_whitelist is not None + and len(chart_url_settings_whitelist) > 1 + and isinstance(chart_url_settings_whitelist, list) + ): + self.state["state"]["url_state"]["whitelist"] = " \n ".join( + chart_url_settings_whitelist + ) + else: + self.state["state"]["url_state"]["whitelist"] = chart_url_settings_whitelist + + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_marimekko_details( + self, + sort_by: str = None, + sort_direction: str = None, + orientation: str = None, + height_mode: str = None, + facet_aspect: float = None, + facet_aspect_mobile: float = None, + facet_aspect_breakpoint: float = None, + stack_padding_stacked: float = None, + stack_padding_unstacked: float = None, + color_mode: str = None, + stack_fade: float = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + enable_labels: str = None, + label_position: str = None, + chart_labels_max_width: float = None, + chart_labels_overlap_mode: str = None, + chart_labels_spreading_margin: float = None, + chart_labels_data_point_margin: float = None, + chart_labels_show_only_labels: Union[list, str] = None, + chart_labels_text_color: str = None, + chart_labels_text_size: float = None, + chart_labels_text_bg_color: str = None, + chart_labels_text_bg_size: float = None, + chart_labels_text_line_height: float = None, + chart_labels_text_max_lines: float = None, + chart_labels_text_weight: str = None, + chart_labels_lines: str = None, + chart_labels_line_style: str = None, + chart_labels_line_color: str = None, + chart_labels_line_width: float = None, + chart_labels_line_range: float = None, + chart_labels_line_padding: float = None, + chart_facet_columns_fixed: bool = None, + chart_facet_min_width: float = None, + chart_facet_max_width: float = None, + chart_facet_columns: float = None, + chart_facet_gutter_w: float = None, + chart_facet_gutter_h: float = None, + chart_facet_animation: str = None, + chart_facet_titles: bool = None, + chart_facet_title_align: str = None, + chart_facet_title_size: float = None, + chart_facet_title_unit: str = None, + chart_facet_title_color: str = None, + chart_facet_title_padding_top: float = None, + chart_facet_title_padding_bottom: float = None, + chart_facet_title_bg: str = None, + chart_facet_title_bg_color: str = None, + chart_facet_title_bg_padding: float = None, + x_as_percentage: bool = None, + matching_x_axis: bool = None, + chart_x_axis_axis_position: str = None, + chart_x_axis_y_axis_position: str = None, + chart_x_axis_numeric_scale_type: str = None, + chart_x_axis_linear_min: float = None, + chart_x_axis_linear_max: float = None, + chart_x_axis_log_min: float = None, + chart_x_axis_log_max: float = None, + chart_x_axis_datetime_min: str = None, + chart_x_axis_datetime_max: str = None, + chart_x_axis_flip: bool = None, + chart_x_axis_show_scale_settings: bool = None, + chart_x_axis_nice: bool = None, + chart_x_axis_zero_axis: str = None, + chart_x_axis_title_mode: str = None, + chart_x_axis_title: str = None, + chart_x_axis_title_styling: bool = None, + chart_x_axis_title_weight: str = None, + chart_x_axis_title_color: str = None, + chart_x_axis_title_size: float = None, + chart_x_axis_title_padding: float = None, + chart_x_axis_tick_label_position: str = None, + chart_x_axis_tick_label_styling: bool = None, + chart_x_axis_tick_label_size: float = None, + chart_x_axis_tick_label_color: str = None, + chart_x_axis_tick_padding: float = None, + chart_x_axis_tick_label_angle: str = None, + chart_x_axis_tick_label_weight: str = None, + chart_x_axis_tick_label_max_lines: float = None, + chart_x_axis_tick_label_line_height: float = None, + chart_x_axis_tick_label_space_mode: str = None, + chart_x_axis_tick_label_space: float = None, + chart_x_axis_tick_mode: str = None, + chart_x_axis_tick_number: float = None, + chart_x_axis_tick_custom: Union[list, str] = None, + chart_x_axis_line_and_tick_color: str = None, + chart_x_axis_line_and_tick_width: float = None, + chart_x_axis_tick_length: float = None, + chart_x_axis_tick_side: str = None, + chart_x_axis_line_visible: bool = None, + chart_x_axis_edge_padding: float = None, + chart_x_axis_gridlines_visible: bool = None, + chart_x_axis_gridlines_styling: bool = None, + chart_x_axis_gridline_color: str = None, + chart_x_axis_gridline_style: str = None, + chart_x_axis_gridline_width: float = None, + chart_x_axis_gridline_category_dividers: bool = None, + chart_x_axis_gridline_category_dividers_extend: bool = None, + chart_x_axis_number_date_format_prefix: str = None, + chart_x_axis_number_date_format_suffix: str = None, + chart_x_axis_number_date_format_n_dec: float = None, + chart_x_axis_number_date_format_advanced: bool = None, + chart_x_axis_number_date_format_negative_sign: str = None, + chart_x_axis_number_date_format_strip_zeros: bool = None, + chart_x_axis_number_date_format_strip_separator: bool = None, + chart_x_axis_number_date_format_transform_labels: bool = None, + chart_x_axis_number_date_format_transform: str = None, + chart_x_axis_number_date_format_multiply_divide_constant: float = None, + chart_x_axis_number_date_format_exponentiate_constant: float = None, + y_as_percentage: bool = None, + matching_y_axis: bool = None, + chart_y_axis_axis_visible: bool = None, + chart_y_axis_numeric_scale_type: str = None, + chart_y_axis_linear_min: float = None, + chart_y_axis_linear_max: float = None, + chart_y_axis_log_min: float = None, + chart_y_axis_log_max: float = None, + chart_y_axis_datetime_min: str = None, + chart_y_axis_datetime_max: str = None, + chart_y_axis_flip: bool = None, + chart_y_axis_show_scale_settings: bool = None, + chart_y_axis_nice: bool = None, + chart_y_axis_zero_axis: str = None, + chart_y_axis_title_mode: str = None, + chart_y_axis_title: str = None, + chart_y_axis_title_styling: bool = None, + chart_y_axis_title_position: str = None, + chart_y_axis_title_weight: str = None, + chart_y_axis_title_color: str = None, + chart_y_axis_title_size: float = None, + chart_y_axis_title_padding: float = None, + chart_y_axis_tick_label_position: str = None, + chart_y_axis_tick_label_styling: bool = None, + chart_y_axis_tick_label_size: float = None, + chart_y_axis_tick_label_color: str = None, + chart_y_axis_tick_padding: float = None, + chart_y_axis_tick_label_angle: str = None, + chart_y_axis_tick_label_weight: str = None, + chart_y_axis_tick_label_max_lines: float = None, + chart_y_axis_tick_label_line_height: float = None, + chart_y_axis_tick_label_space_mode: str = None, + chart_y_axis_tick_label_space: float = None, + chart_y_axis_tick_mode: str = None, + chart_y_axis_tick_number: float = None, + chart_y_axis_tick_custom: Union[list, str] = None, + chart_y_axis_line_and_tick_color: str = None, + chart_y_axis_line_and_tick_width: float = None, + chart_y_axis_tick_length: float = None, + chart_y_axis_tick_side: str = None, + chart_y_axis_line_visible: bool = None, + chart_y_axis_edge_padding: float = None, + chart_y_axis_gridlines_visible: bool = None, + chart_y_axis_gridlines_styling: bool = None, + chart_y_axis_gridline_color: str = None, + chart_y_axis_gridline_style: str = None, + chart_y_axis_gridline_width: float = None, + chart_y_axis_gridline_category_dividers: bool = None, + chart_y_axis_gridline_category_dividers_extend: bool = None, + chart_y_axis_number_date_format_prefix: str = None, + chart_y_axis_number_date_format_suffix: str = None, + chart_y_axis_number_date_format_n_dec: float = None, + chart_y_axis_number_date_format_advanced: bool = None, + chart_y_axis_number_date_format_negative_sign: str = None, + chart_y_axis_number_date_format_strip_zeros: bool = None, + chart_y_axis_number_date_format_strip_separator: bool = None, + chart_y_axis_number_date_format_transform_labels: bool = None, + chart_y_axis_number_date_format_transform: str = None, + chart_y_axis_number_date_format_multiply_divide_constant: float = None, + chart_y_axis_number_date_format_exponentiate_constant: float = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + filter_show_all: bool = None, + filter_show_all_text: str = None, + chart_filter_controls_container_alignment: str = None, + chart_filter_controls_container_controls_spacing: float = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + chart_axes_highlights_x_enabled: bool = None, + chart_axes_highlights_x_lines: Union[list, str] = None, + chart_axes_highlights_x_line_color: str = None, + chart_axes_highlights_x_line_width: float = None, + chart_axes_highlights_x_line_dash: float = None, + chart_axes_highlights_x_areas: Union[list, str] = None, + chart_axes_highlights_x_area_color: str = None, + chart_axes_highlights_x_area_opacity: float = None, + chart_axes_highlights_x_area_texture: str = None, + chart_axes_highlights_x_label_vertical: bool = None, + chart_axes_highlights_x_label_y_position: str = None, + chart_axes_highlights_x_label_x_position: str = None, + chart_axes_highlights_x_label_max_width: float = None, + chart_axes_highlights_x_font_size: float = None, + chart_axes_highlights_x_font_weight: str = None, + chart_axes_highlights_x_label_color: str = None, + chart_axes_highlights_x_shadow_color: str = None, + chart_axes_highlights_x_shadow_enabled: bool = None, + chart_axes_highlights_y_enabled: bool = None, + chart_axes_highlights_y_lines: Union[list, str] = None, + chart_axes_highlights_y_line_color: str = None, + chart_axes_highlights_y_line_width: float = None, + chart_axes_highlights_y_line_dash: float = None, + chart_axes_highlights_y_areas: Union[list, str] = None, + chart_axes_highlights_y_area_color: str = None, + chart_axes_highlights_y_area_opacity: float = None, + chart_axes_highlights_y_area_texture: str = None, + chart_axes_highlights_y_label_x_position: str = None, + chart_axes_highlights_y_label_y_position: str = None, + chart_axes_highlights_y_label_max_width: float = None, + chart_axes_highlights_y_font_size: float = None, + chart_axes_highlights_y_font_weight: str = None, + chart_axes_highlights_y_label_color: str = None, + chart_axes_highlights_y_shadow_color: str = None, + chart_axes_highlights_y_shadow_enabled: bool = None, + axes_highlights_stack_order: str = None, + annotations_styles: bool = None, + chart_annotations_defaults_text_weight: str = None, + chart_annotations_defaults_text_size: float = None, + chart_annotations_defaults_text_color: str = None, + chart_annotations_defaults_label_width: float = None, + chart_annotations_defaults_text_background_mode: str = None, + chart_annotations_defaults_text_bg: str = None, + chart_annotations_defaults_label_bg: str = None, + chart_annotations_defaults_text_alignment: str = None, + chart_annotations_defaults_popup_position: str = None, + chart_annotations_defaults_line_marker: str = None, + chart_annotations_defaults_stroke_width: float = None, + chart_annotations_defaults_stroke_color: str = None, + chart_annotations_defaults_connector_extend_line: str = None, + animation_duration: float = None, + chart_background_background_color_enabled: bool = None, + chart_background_background_image_enabled: bool = None, + chart_background_background_color: str = None, + chart_background_background_image_src: str = None, + chart_background_background_image_size: str = None, + chart_background_background_image_position: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: marimekko. + + + :param sort_by: Sort by. Choices: none, unstacked, stacked. Whether your chart is sorted by the primary (unstacked) or the secondary (stacked) metric. Flourish type hint: string, defaults to None. + :type sort_by: str, optional + :param sort_direction: Sort direction. Choices: desc, asc. Flourish type hint: string, defaults to None. + :type sort_direction: str, optional + :param orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type orientation: str, optional + :param height_mode: Height mode. Choices: auto, aspect_ratio. How the graphics height is determined. Auto uses the default Flourish responsive sizing. In Aspect ratio mode, you set the aspect ratio of the plot, and the container will be updated to accommodate it (not supported when embedded in a simple fixed-height iframe ). Flourish type hint: string, defaults to None. + :type height_mode: str, optional + :param facet_aspect: Aspect (desktop). Aspect ratio of each chart in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type facet_aspect: float, optional + :param facet_aspect_mobile: Aspect (mobile). Aspect ratio of each chart in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type facet_aspect_mobile: float, optional + :param facet_aspect_breakpoint: Breakpoint. The width at which mobile mode ends and desktop begins (in px). Flourish type hint: number, defaults to None. + :type facet_aspect_breakpoint: float, optional + :param stack_padding_stacked: Space between stacked values. The space between stacked values (in rems ). Flourish type hint: number, defaults to None. + :type stack_padding_stacked: float, optional + :param stack_padding_unstacked: Space between stacks. The space between stacks (in rems). Flourish type hint: number, defaults to None. + :type stack_padding_unstacked: float, optional + :param color_mode: Color mode. Choices: stack, bar. In order to color by stack, you need to have at least two columns bound to the Secondary metric Flourish type hint: string, defaults to None. + :type color_mode: str, optional + :param stack_fade: Stack fade. How quickly the stacks fade. (Use 1 for no fade). Flourish type hint: number, defaults to None. + :type stack_fade: float, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param enable_labels: Show labels. Choices: auto, on, off. Auto turns labels off if there are more than 50. Flourish type hint: string, defaults to None. + :type enable_labels: str, optional + :param label_position: Label position. Choices: edge_of_chart, edge_of_bar. This alters the position of the label from being at the edge of the chart to the edge of the bars. Note these two positions will only be different when the secondary measure is not being treated as a percentage. Flourish type hint: string, defaults to None. + :type label_position: str, optional + :param chart_labels_max_width: Max label width. The maximum allowed label width. Flourish type hint: number, defaults to None. + :type chart_labels_max_width: float, optional + :param chart_labels_overlap_mode: Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to None. + :type chart_labels_overlap_mode: str, optional + :param chart_labels_spreading_margin: Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to None. + :type chart_labels_spreading_margin: float, optional + :param chart_labels_data_point_margin: Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to None. + :type chart_labels_data_point_margin: float, optional + :param chart_labels_show_only_labels: Show only certain labels. Manually specify which labels youd like to display (one entry per line). Flourish type hint: text, defaults to None. + :type chart_labels_show_only_labels: Union[list, str], optional + :param chart_labels_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_labels_text_color: str, optional + :param chart_labels_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_labels_text_size: float, optional + :param chart_labels_text_bg_color: Outline. Flourish type hint: color, defaults to None. + :type chart_labels_text_bg_color: str, optional + :param chart_labels_text_bg_size: Outline width. As a % of the font size. Flourish type hint: number, defaults to None. + :type chart_labels_text_bg_size: float, optional + :param chart_labels_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_labels_text_line_height: float, optional + :param chart_labels_text_max_lines: Max lines. The max number of lines for each label. Flourish type hint: number, defaults to None. + :type chart_labels_text_max_lines: float, optional + :param chart_labels_text_weight: Weight. Choices: 400, 700. Flourish type hint: string, defaults to None. + :type chart_labels_text_weight: str, optional + :param chart_labels_lines: Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to None. + :type chart_labels_lines: str, optional + :param chart_labels_line_style: Line style. Choices: straight, step. Flourish type hint: string, defaults to None. + :type chart_labels_line_style: str, optional + :param chart_labels_line_color: Color. Flourish type hint: color, defaults to None. + :type chart_labels_line_color: str, optional + :param chart_labels_line_width: Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to None. + :type chart_labels_line_width: float, optional + :param chart_labels_line_range: Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to None. + :type chart_labels_line_range: float, optional + :param chart_labels_line_padding: Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to None. + :type chart_labels_line_padding: float, optional + :param chart_facet_columns_fixed: Number of columns. Choices: False, True. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to None. + :type chart_facet_columns_fixed: bool, optional + :param chart_facet_min_width: Min chart width. Determines how many columns of charts there should be in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_min_width: float, optional + :param chart_facet_max_width: Max chart width. Determines how many columns of charts there should be in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_max_width: float, optional + :param chart_facet_columns: Fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_columns: float, optional + :param chart_facet_gutter_w: Horizontal margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_w: float, optional + :param chart_facet_gutter_h: Vertical margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_h: float, optional + :param chart_facet_animation: On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to None. + :type chart_facet_animation: str, optional + :param chart_facet_titles: Show titles. Flourish type hint: boolean, defaults to None. + :type chart_facet_titles: bool, optional + :param chart_facet_title_align: Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to None. + :type chart_facet_title_align: str, optional + :param chart_facet_title_size: Size. Relative to the width of the chart. Flourish type hint: number, defaults to None. + :type chart_facet_title_size: float, optional + :param chart_facet_title_unit: Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to None. + :type chart_facet_title_unit: str, optional + :param chart_facet_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_color: str, optional + :param chart_facet_title_padding_top: Space above. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_top: float, optional + :param chart_facet_title_padding_bottom: Space below. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_bottom: float, optional + :param chart_facet_title_bg: Background. Choices: none, full, text. Flourish type hint: string, defaults to None. + :type chart_facet_title_bg: str, optional + :param chart_facet_title_bg_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_bg_color: str, optional + :param chart_facet_title_bg_padding: Padding. Horizontal space between text and background. Flourish type hint: number, defaults to None. + :type chart_facet_title_bg_padding: float, optional + :param x_as_percentage: Treat as percentage. Displays values summed to 100%. This is useful for comparing proportional contributions across all categories. Flourish type hint: boolean, defaults to None. + :type x_as_percentage: bool, optional + :param matching_x_axis: Match x axes accross facets. Flourish type hint: boolean, defaults to None. + :type matching_x_axis: bool, optional + :param chart_x_axis_axis_position: Choices: bottom, off. Flourish type hint: string, defaults to None. + :type chart_x_axis_axis_position: str, optional + :param chart_x_axis_y_axis_position: Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to None. + :type chart_x_axis_y_axis_position: str, optional + :param chart_x_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_x_axis_numeric_scale_type: str, optional + :param chart_x_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_min: float, optional + :param chart_x_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_max: float, optional + :param chart_x_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_min: float, optional + :param chart_x_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_max: float, optional + :param chart_x_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_min: str, optional + :param chart_x_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_max: str, optional + :param chart_x_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_flip: bool, optional + :param chart_x_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_show_scale_settings: bool, optional + :param chart_x_axis_nice: Round min/max. Choices: True, False. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_nice: bool, optional + :param chart_x_axis_zero_axis: Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to None. + :type chart_x_axis_zero_axis: str, optional + :param chart_x_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_mode: str, optional + :param chart_x_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_x_axis_title: str, optional + :param chart_x_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_title_styling: bool, optional + :param chart_x_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_weight: str, optional + :param chart_x_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_title_color: str, optional + :param chart_x_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_size: float, optional + :param chart_x_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_padding: float, optional + :param chart_x_axis_tick_label_position: Position. Choices: default, left, right. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_position: str, optional + :param chart_x_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_tick_label_styling: bool, optional + :param chart_x_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_size: float, optional + :param chart_x_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_tick_label_color: str, optional + :param chart_x_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_padding: float, optional + :param chart_x_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_angle: str, optional + :param chart_x_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_weight: str, optional + :param chart_x_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_max_lines: float, optional + :param chart_x_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_line_height: float, optional + :param chart_x_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_space_mode: str, optional + :param chart_x_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_space: float, optional + :param chart_x_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_mode: str, optional + :param chart_x_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_number: float, optional + :param chart_x_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_x_axis_tick_custom: Union[list, str], optional + :param chart_x_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_x_axis_line_and_tick_color: str, optional + :param chart_x_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_x_axis_line_and_tick_width: float, optional + :param chart_x_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_length: float, optional + :param chart_x_axis_tick_side: Tick side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_side: str, optional + :param chart_x_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_line_visible: bool, optional + :param chart_x_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_x_axis_edge_padding: float, optional + :param chart_x_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_visible: bool, optional + :param chart_x_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_styling: bool, optional + :param chart_x_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_gridline_color: str, optional + :param chart_x_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_x_axis_gridline_style: str, optional + :param chart_x_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_x_axis_gridline_width: float, optional + :param chart_x_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers: bool, optional + :param chart_x_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers_extend: bool, optional + :param chart_x_axis_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_x_axis_number_date_format_prefix: str, optional + :param chart_x_axis_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_x_axis_number_date_format_suffix: str, optional + :param chart_x_axis_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_x_axis_number_date_format_n_dec: float, optional + :param chart_x_axis_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_number_date_format_advanced: bool, optional + :param chart_x_axis_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_x_axis_number_date_format_negative_sign: str, optional + :param chart_x_axis_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_number_date_format_strip_zeros: bool, optional + :param chart_x_axis_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_number_date_format_strip_separator: bool, optional + :param chart_x_axis_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_number_date_format_transform_labels: bool, optional + :param chart_x_axis_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_x_axis_number_date_format_transform: str, optional + :param chart_x_axis_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_x_axis_number_date_format_multiply_divide_constant: float, optional + :param chart_x_axis_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_x_axis_number_date_format_exponentiate_constant: float, optional + :param y_as_percentage: Treat as percentage. Displays values summed to 100%. This is useful for comparing proportional contributions across all categories. Flourish type hint: boolean, defaults to None. + :type y_as_percentage: bool, optional + :param matching_y_axis: Match y axes accross facets. Flourish type hint: boolean, defaults to None. + :type matching_y_axis: bool, optional + :param chart_y_axis_axis_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_axis_visible: bool, optional + :param chart_y_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_y_axis_numeric_scale_type: str, optional + :param chart_y_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_min: float, optional + :param chart_y_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_max: float, optional + :param chart_y_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_min: float, optional + :param chart_y_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_max: float, optional + :param chart_y_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_min: str, optional + :param chart_y_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_max: str, optional + :param chart_y_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_flip: bool, optional + :param chart_y_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_show_scale_settings: bool, optional + :param chart_y_axis_nice: Round min/max. Choices: True, False. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_nice: bool, optional + :param chart_y_axis_zero_axis: Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to None. + :type chart_y_axis_zero_axis: str, optional + :param chart_y_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_mode: str, optional + :param chart_y_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_y_axis_title: str, optional + :param chart_y_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_title_styling: bool, optional + :param chart_y_axis_title_position: Position. Choices: side, end. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_position: str, optional + :param chart_y_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_weight: str, optional + :param chart_y_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_title_color: str, optional + :param chart_y_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_size: float, optional + :param chart_y_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_padding: float, optional + :param chart_y_axis_tick_label_position: Position. Choices: default, above, below. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_position: str, optional + :param chart_y_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_tick_label_styling: bool, optional + :param chart_y_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_size: float, optional + :param chart_y_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_tick_label_color: str, optional + :param chart_y_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_padding: float, optional + :param chart_y_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_angle: str, optional + :param chart_y_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_weight: str, optional + :param chart_y_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_max_lines: float, optional + :param chart_y_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_line_height: float, optional + :param chart_y_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_space_mode: str, optional + :param chart_y_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_space: float, optional + :param chart_y_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_mode: str, optional + :param chart_y_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_number: float, optional + :param chart_y_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_y_axis_tick_custom: Union[list, str], optional + :param chart_y_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_y_axis_line_and_tick_color: str, optional + :param chart_y_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_y_axis_line_and_tick_width: float, optional + :param chart_y_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_length: float, optional + :param chart_y_axis_tick_side: Side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_side: str, optional + :param chart_y_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_line_visible: bool, optional + :param chart_y_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_y_axis_edge_padding: float, optional + :param chart_y_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_visible: bool, optional + :param chart_y_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_styling: bool, optional + :param chart_y_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_gridline_color: str, optional + :param chart_y_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_y_axis_gridline_style: str, optional + :param chart_y_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_y_axis_gridline_width: float, optional + :param chart_y_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers: bool, optional + :param chart_y_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers_extend: bool, optional + :param chart_y_axis_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_y_axis_number_date_format_prefix: str, optional + :param chart_y_axis_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_y_axis_number_date_format_suffix: str, optional + :param chart_y_axis_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_y_axis_number_date_format_n_dec: float, optional + :param chart_y_axis_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_number_date_format_advanced: bool, optional + :param chart_y_axis_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_y_axis_number_date_format_negative_sign: str, optional + :param chart_y_axis_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_number_date_format_strip_zeros: bool, optional + :param chart_y_axis_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_number_date_format_strip_separator: bool, optional + :param chart_y_axis_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_number_date_format_transform_labels: bool, optional + :param chart_y_axis_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_y_axis_number_date_format_transform: str, optional + :param chart_y_axis_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_y_axis_number_date_format_multiply_divide_constant: float, optional + :param chart_y_axis_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_y_axis_number_date_format_exponentiate_constant: float, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param filter_show_all: Include "All". Flourish type hint: boolean, defaults to None. + :type filter_show_all: bool, optional + :param filter_show_all_text: Name for "All". Leave blank to not include an All option. Flourish type hint: string, defaults to None. + :type filter_show_all_text: str, optional + :param chart_filter_controls_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_filter_controls_container_alignment: str, optional + :param chart_filter_controls_container_controls_spacing: Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to None. + :type chart_filter_controls_container_controls_spacing: float, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param chart_axes_highlights_x_enabled: Show highlights on the x axis. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_enabled: bool, optional + :param chart_axes_highlights_x_lines: One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example, `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to None. + :type chart_axes_highlights_x_lines: Union[list, str], optional + :param chart_axes_highlights_x_line_color: Line color. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_line_color: str, optional + :param chart_axes_highlights_x_line_width: Line width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_line_width: float, optional + :param chart_axes_highlights_x_line_dash: Dash. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_line_dash: float, optional + :param chart_axes_highlights_x_areas: One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to None. + :type chart_axes_highlights_x_areas: Union[list, str], optional + :param chart_axes_highlights_x_area_color: Area. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_area_color: str, optional + :param chart_axes_highlights_x_area_opacity: Area opacity. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_area_opacity: float, optional + :param chart_axes_highlights_x_area_texture: Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_area_texture: str, optional + :param chart_axes_highlights_x_label_vertical: Vertical. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_label_vertical: bool, optional + :param chart_axes_highlights_x_label_y_position: Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_label_y_position: str, optional + :param chart_axes_highlights_x_label_x_position: X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_label_x_position: str, optional + :param chart_axes_highlights_x_label_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_label_max_width: float, optional + :param chart_axes_highlights_x_font_size: Font size. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_font_size: float, optional + :param chart_axes_highlights_x_font_weight: Font weight. Choices: regular, bold. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_font_weight: str, optional + :param chart_axes_highlights_x_label_color: Text. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_label_color: str, optional + :param chart_axes_highlights_x_shadow_color: Shadow. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_shadow_color: str, optional + :param chart_axes_highlights_x_shadow_enabled: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_shadow_enabled: bool, optional + :param chart_axes_highlights_y_enabled: Show highlights on the y axis. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_y_enabled: bool, optional + :param chart_axes_highlights_y_lines: One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example: `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to None. + :type chart_axes_highlights_y_lines: Union[list, str], optional + :param chart_axes_highlights_y_line_color: Line color. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_line_color: str, optional + :param chart_axes_highlights_y_line_width: line width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_line_width: float, optional + :param chart_axes_highlights_y_line_dash: Dash. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_line_dash: float, optional + :param chart_axes_highlights_y_areas: One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to None. + :type chart_axes_highlights_y_areas: Union[list, str], optional + :param chart_axes_highlights_y_area_color: Area. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_area_color: str, optional + :param chart_axes_highlights_y_area_opacity: Area opacity. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_area_opacity: float, optional + :param chart_axes_highlights_y_area_texture: Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_area_texture: str, optional + :param chart_axes_highlights_y_label_x_position: X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_label_x_position: str, optional + :param chart_axes_highlights_y_label_y_position: Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_label_y_position: str, optional + :param chart_axes_highlights_y_label_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_label_max_width: float, optional + :param chart_axes_highlights_y_font_size: Font size. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_font_size: float, optional + :param chart_axes_highlights_y_font_weight: Font weight. Choices: regular, bold. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_font_weight: str, optional + :param chart_axes_highlights_y_label_color: Text. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_label_color: str, optional + :param chart_axes_highlights_y_shadow_color: Shadow. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_shadow_color: str, optional + :param chart_axes_highlights_y_shadow_enabled: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_y_shadow_enabled: bool, optional + :param axes_highlights_stack_order: Stack order. Choices: above_data, below_data. Whether your axis highlights should be displayed above or below your chart area. Flourish type hint: string, defaults to None. + :type axes_highlights_stack_order: str, optional + :param annotations_styles: Show styling options. Flourish type hint: boolean, defaults to None. + :type annotations_styles: bool, optional + :param chart_annotations_defaults_text_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_text_weight: str, optional + :param chart_annotations_defaults_text_size: Text size. Flourish type hint: number, defaults to None. + :type chart_annotations_defaults_text_size: float, optional + :param chart_annotations_defaults_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_text_color: str, optional + :param chart_annotations_defaults_label_width: Max width. Flourish type hint: number, defaults to None. + :type chart_annotations_defaults_label_width: float, optional + :param chart_annotations_defaults_text_background_mode: Text background. Choices: none, outline, background. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_text_background_mode: str, optional + :param chart_annotations_defaults_text_bg: Outline. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_text_bg: str, optional + :param chart_annotations_defaults_label_bg: Background. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_label_bg: str, optional + :param chart_annotations_defaults_text_alignment: Alignment. Choices: auto, start, center, end. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_text_alignment: str, optional + :param chart_annotations_defaults_popup_position: Popup position. Choices: center, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_popup_position: str, optional + :param chart_annotations_defaults_line_marker: Marker. Choices: none, arrowhead_open, arrowhead. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_line_marker: str, optional + :param chart_annotations_defaults_stroke_width: Width. Flourish type hint: number, defaults to None. + :type chart_annotations_defaults_stroke_width: float, optional + :param chart_annotations_defaults_stroke_color: Color. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_stroke_color: str, optional + :param chart_annotations_defaults_connector_extend_line: Extend line. Choices: enabled, disabled. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_connector_extend_line: str, optional + :param animation_duration: Animation duration. The duration of the animation (in seconds) when changing data or mode for example, between slides in a story Flourish type hint: number, defaults to None. + :type animation_duration: float, optional + :param chart_background_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_background_background_color_enabled: bool, optional + :param chart_background_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_background_background_image_enabled: bool, optional + :param chart_background_background_color: Color. Flourish type hint: color, defaults to None. + :type chart_background_background_color: str, optional + :param chart_background_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_background_background_image_src: str, optional + :param chart_background_background_image_size: Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to None. + :type chart_background_background_image_size: str, optional + :param chart_background_background_image_position: Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to None. + :type chart_background_background_image_position: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "labels": {}, + "facets": {}, + "x": {}, + "x_formatting": {}, + "y": {}, + "y_formatting": {}, + "filter_control": {}, + "controls_container": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "legend_categorical": {}, + "legend_container": {}, + "popup": {}, + "axes_highlights": {}, + "annotations": {"defaults": {}}, + "chart_bg": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_sort_by = ["none", "unstacked", "stacked"] + [None] + if sort_by not in list_sort_by: + raise ValueError( + f"`sort_by` must be one of: ['none', 'unstacked', 'stacked']" + ) + elif sort_by in list_sort_by and sort_by is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "unstacked": "unstacked", + "stacked": "stacked", + }.items() + if sort_by in k + } + if len(filtered_dict) > 0: + self.state["state"]["sort_by"] = filtered_dict[sort_by] + + list_sort_direction = ["desc", "asc"] + [None] + if sort_direction not in list_sort_direction: + raise ValueError(f"`sort_direction` must be one of: ['desc', 'asc']") + elif sort_direction in list_sort_direction and sort_direction is not None: + filtered_dict = { + k: v + for (k, v) in {"desc": "desc", "asc": "asc"}.items() + if sort_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["sort_direction"] = filtered_dict[sort_direction] + + list_orientation = ["horizontal", "vertical"] + [None] + if orientation not in list_orientation: + raise ValueError( + f"`orientation` must be one of: ['horizontal', 'vertical']" + ) + elif orientation in list_orientation and orientation is not None: + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["orientation"] = filtered_dict[orientation] + + list_height_mode = ["auto", "aspect_ratio"] + [None] + if height_mode not in list_height_mode: + raise ValueError(f"`height_mode` must be one of: ['auto', 'aspect_ratio']") + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "aspect_ratio": "aspect_ratio"}.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + self.state["state"]["facet_aspect"] = facet_aspect + self.state["state"]["facet_aspect_mobile"] = facet_aspect_mobile + self.state["state"]["facet_aspect_breakpoint"] = facet_aspect_breakpoint + self.state["state"]["stack_padding_stacked"] = stack_padding_stacked + self.state["state"]["stack_padding_unstacked"] = stack_padding_unstacked + + list_color_mode = ["stack", "bar"] + [None] + if color_mode not in list_color_mode: + raise ValueError(f"`color_mode` must be one of: ['stack', 'bar']") + elif color_mode in list_color_mode and color_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"stack": "stack", "bar": "bar"}.items() + if color_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color_mode"] = filtered_dict[color_mode] + self.state["state"]["stack_fade"] = stack_fade + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + + list_enable_labels = ["auto", "on", "off"] + [None] + if enable_labels not in list_enable_labels: + raise ValueError(f"`enable_labels` must be one of: ['auto', 'on', 'off']") + elif enable_labels in list_enable_labels and enable_labels is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if enable_labels in k + } + if len(filtered_dict) > 0: + self.state["state"]["enable_labels"] = filtered_dict[enable_labels] + + list_label_position = ["edge_of_chart", "edge_of_bar"] + [None] + if label_position not in list_label_position: + raise ValueError( + f"`label_position` must be one of: ['edge_of_chart', 'edge_of_bar']" + ) + elif label_position in list_label_position and label_position is not None: + filtered_dict = { + k: v + for (k, v) in { + "edge_of_chart": "edge_of_chart", + "edge_of_bar": "edge_of_bar", + }.items() + if label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_position"] = filtered_dict[label_position] + self.state["state"]["labels"]["max_width"] = chart_labels_max_width + + list_chart_labels_overlap_mode = ["spread", "hide", "none"] + [None] + if chart_labels_overlap_mode not in list_chart_labels_overlap_mode: + raise ValueError( + f"`chart_labels_overlap_mode` must be one of: ['spread', 'hide', 'none']" + ) + elif ( + chart_labels_overlap_mode in list_chart_labels_overlap_mode + and chart_labels_overlap_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "spread": "spread", + "hide": "hide", + "none": "none", + }.items() + if chart_labels_overlap_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels"]["overlap_mode"] = filtered_dict[ + chart_labels_overlap_mode + ] + self.state["state"]["labels"][ + "spreading_margin" + ] = chart_labels_spreading_margin + self.state["state"]["labels"][ + "data_point_margin" + ] = chart_labels_data_point_margin + + if ( + chart_labels_show_only_labels is not None + and len(chart_labels_show_only_labels) > 1 + and isinstance(chart_labels_show_only_labels, list) + ): + self.state["state"]["labels"]["show_only_labels"] = " \n ".join( + chart_labels_show_only_labels + ) + else: + self.state["state"]["labels"][ + "show_only_labels" + ] = chart_labels_show_only_labels + + self.state["state"]["labels"]["text_color"] = chart_labels_text_color + self.state["state"]["labels"]["text_size"] = chart_labels_text_size + self.state["state"]["labels"]["text_bg_color"] = chart_labels_text_bg_color + self.state["state"]["labels"]["text_bg_size"] = chart_labels_text_bg_size + self.state["state"]["labels"][ + "text_line_height" + ] = chart_labels_text_line_height + self.state["state"]["labels"]["text_max_lines"] = chart_labels_text_max_lines + + list_chart_labels_text_weight = [400, 700] + [None] + if chart_labels_text_weight not in list_chart_labels_text_weight: + raise ValueError(f"`chart_labels_text_weight` must be one of: [400, 700]") + elif ( + chart_labels_text_weight in list_chart_labels_text_weight + and chart_labels_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {400: 400, 700: 700}.items() + if chart_labels_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels"]["text_weight"] = filtered_dict[ + chart_labels_text_weight + ] + + list_chart_labels_lines = ["auto", "on", "off"] + [None] + if chart_labels_lines not in list_chart_labels_lines: + raise ValueError( + f"`chart_labels_lines` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_labels_lines in list_chart_labels_lines + and chart_labels_lines is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_labels_lines in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels"]["lines"] = filtered_dict[ + chart_labels_lines + ] + + list_chart_labels_line_style = ["straight", "step"] + [None] + if chart_labels_line_style not in list_chart_labels_line_style: + raise ValueError( + f"`chart_labels_line_style` must be one of: ['straight', 'step']" + ) + elif ( + chart_labels_line_style in list_chart_labels_line_style + and chart_labels_line_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"straight": "straight", "step": "step"}.items() + if chart_labels_line_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels"]["line_style"] = filtered_dict[ + chart_labels_line_style + ] + self.state["state"]["labels"]["line_color"] = chart_labels_line_color + self.state["state"]["labels"]["line_width"] = chart_labels_line_width + self.state["state"]["labels"]["line_range"] = chart_labels_line_range + self.state["state"]["labels"]["line_padding"] = chart_labels_line_padding + + list_chart_facet_columns_fixed = [False, True] + [None] + if chart_facet_columns_fixed not in list_chart_facet_columns_fixed: + raise ValueError( + f"`chart_facet_columns_fixed` must be one of: [False, True]" + ) + elif ( + chart_facet_columns_fixed in list_chart_facet_columns_fixed + and chart_facet_columns_fixed is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_facet_columns_fixed in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["columns_fixed"] = filtered_dict[ + chart_facet_columns_fixed + ] + self.state["state"]["facets"]["min_width"] = chart_facet_min_width + self.state["state"]["facets"]["max_width"] = chart_facet_max_width + self.state["state"]["facets"]["columns"] = chart_facet_columns + self.state["state"]["facets"]["gutter_w"] = chart_facet_gutter_w + self.state["state"]["facets"]["gutter_h"] = chart_facet_gutter_h + + list_chart_facet_animation = ["auto", "name", "reuse"] + [None] + if chart_facet_animation not in list_chart_facet_animation: + raise ValueError( + f"`chart_facet_animation` must be one of: ['auto', 'name', 'reuse']" + ) + elif ( + chart_facet_animation in list_chart_facet_animation + and chart_facet_animation is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "name": "name", "reuse": "reuse"}.items() + if chart_facet_animation in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["animation"] = filtered_dict[ + chart_facet_animation + ] + self.state["state"]["facets"]["titles"] = chart_facet_titles + + list_chart_facet_title_align = ["auto", "left", "center", "right"] + [None] + if chart_facet_title_align not in list_chart_facet_title_align: + raise ValueError( + f"`chart_facet_title_align` must be one of: ['auto', 'left', 'center', 'right']" + ) + elif ( + chart_facet_title_align in list_chart_facet_title_align + and chart_facet_title_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_facet_title_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_align"] = filtered_dict[ + chart_facet_title_align + ] + self.state["state"]["facets"]["title_size"] = chart_facet_title_size + + list_chart_facet_title_unit = ["rem", "facet"] + [None] + if chart_facet_title_unit not in list_chart_facet_title_unit: + raise ValueError( + f"`chart_facet_title_unit` must be one of: ['rem', 'facet']" + ) + elif ( + chart_facet_title_unit in list_chart_facet_title_unit + and chart_facet_title_unit is not None + ): + filtered_dict = { + k: v + for (k, v) in {"rem": "rem", "facet": "facet"}.items() + if chart_facet_title_unit in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_unit"] = filtered_dict[ + chart_facet_title_unit + ] + self.state["state"]["facets"]["title_color"] = chart_facet_title_color + self.state["state"]["facets"][ + "title_padding_top" + ] = chart_facet_title_padding_top + self.state["state"]["facets"][ + "title_padding_bottom" + ] = chart_facet_title_padding_bottom + + list_chart_facet_title_bg = ["none", "full", "text"] + [None] + if chart_facet_title_bg not in list_chart_facet_title_bg: + raise ValueError( + f"`chart_facet_title_bg` must be one of: ['none', 'full', 'text']" + ) + elif ( + chart_facet_title_bg in list_chart_facet_title_bg + and chart_facet_title_bg is not None + ): + filtered_dict = { + k: v + for (k, v) in {"none": "none", "full": "full", "text": "text"}.items() + if chart_facet_title_bg in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_bg"] = filtered_dict[ + chart_facet_title_bg + ] + self.state["state"]["facets"]["title_bg_color"] = chart_facet_title_bg_color + self.state["state"]["facets"]["title_bg_padding"] = chart_facet_title_bg_padding + self.state["state"]["x_as_percentage"] = x_as_percentage + self.state["state"]["matching_x_axis"] = matching_x_axis + + list_chart_x_axis_axis_position = ["bottom", "off"] + [None] + if chart_x_axis_axis_position not in list_chart_x_axis_axis_position: + raise ValueError( + f"`chart_x_axis_axis_position` must be one of: ['bottom', 'off']" + ) + elif ( + chart_x_axis_axis_position in list_chart_x_axis_axis_position + and chart_x_axis_axis_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bottom": "bottom", "off": "off"}.items() + if chart_x_axis_axis_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["axis_position"] = filtered_dict[ + chart_x_axis_axis_position + ] + self.state["state"]["x"]["y_axis_position"] = chart_x_axis_y_axis_position + + list_chart_x_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_x_axis_numeric_scale_type not in list_chart_x_axis_numeric_scale_type: + raise ValueError( + f"`chart_x_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_x_axis_numeric_scale_type in list_chart_x_axis_numeric_scale_type + and chart_x_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_x_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["numeric_scale_type"] = filtered_dict[ + chart_x_axis_numeric_scale_type + ] + self.state["state"]["x"]["linear_min"] = chart_x_axis_linear_min + self.state["state"]["x"]["linear_max"] = chart_x_axis_linear_max + self.state["state"]["x"]["log_min"] = chart_x_axis_log_min + self.state["state"]["x"]["log_max"] = chart_x_axis_log_max + self.state["state"]["x"]["datetime_min"] = chart_x_axis_datetime_min + self.state["state"]["x"]["datetime_max"] = chart_x_axis_datetime_max + self.state["state"]["x"]["flip"] = chart_x_axis_flip + self.state["state"]["x"][ + "show_scale_settings" + ] = chart_x_axis_show_scale_settings + + list_chart_x_axis_nice = [True, False] + [None] + if chart_x_axis_nice not in list_chart_x_axis_nice: + raise ValueError(f"`chart_x_axis_nice` must be one of: [True, False]") + elif ( + chart_x_axis_nice in list_chart_x_axis_nice + and chart_x_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["nice"] = filtered_dict[chart_x_axis_nice] + + list_chart_x_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_x_axis_zero_axis not in list_chart_x_axis_zero_axis: + raise ValueError( + f"`chart_x_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_x_axis_zero_axis in list_chart_x_axis_zero_axis + and chart_x_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_x_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["zero_axis"] = filtered_dict[ + chart_x_axis_zero_axis + ] + + list_chart_x_axis_title_mode = ["auto", "custom"] + [None] + if chart_x_axis_title_mode not in list_chart_x_axis_title_mode: + raise ValueError( + f"`chart_x_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_x_axis_title_mode in list_chart_x_axis_title_mode + and chart_x_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_x_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_mode"] = filtered_dict[ + chart_x_axis_title_mode + ] + self.state["state"]["x"]["title"] = chart_x_axis_title + self.state["state"]["x"]["title_styling"] = chart_x_axis_title_styling + + list_chart_x_axis_title_weight = ["bold", "normal"] + [None] + if chart_x_axis_title_weight not in list_chart_x_axis_title_weight: + raise ValueError( + f"`chart_x_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_title_weight in list_chart_x_axis_title_weight + and chart_x_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_weight"] = filtered_dict[ + chart_x_axis_title_weight + ] + self.state["state"]["x"]["title_color"] = chart_x_axis_title_color + self.state["state"]["x"]["title_size"] = chart_x_axis_title_size + self.state["state"]["x"]["title_padding"] = chart_x_axis_title_padding + + list_chart_x_axis_tick_label_position = ["default", "left", "right"] + [None] + if ( + chart_x_axis_tick_label_position + not in list_chart_x_axis_tick_label_position + ): + raise ValueError( + f"`chart_x_axis_tick_label_position` must be one of: ['default', 'left', 'right']" + ) + elif ( + chart_x_axis_tick_label_position in list_chart_x_axis_tick_label_position + and chart_x_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "left": "left", + "right": "right", + }.items() + if chart_x_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_position"] = filtered_dict[ + chart_x_axis_tick_label_position + ] + self.state["state"]["x"]["tick_label_styling"] = chart_x_axis_tick_label_styling + self.state["state"]["x"]["tick_label_size"] = chart_x_axis_tick_label_size + self.state["state"]["x"]["tick_label_color"] = chart_x_axis_tick_label_color + self.state["state"]["x"]["tick_padding"] = chart_x_axis_tick_padding + + list_chart_x_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_x_axis_tick_label_angle not in list_chart_x_axis_tick_label_angle: + raise ValueError( + f"`chart_x_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_x_axis_tick_label_angle in list_chart_x_axis_tick_label_angle + and chart_x_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_x_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_angle"] = filtered_dict[ + chart_x_axis_tick_label_angle + ] + + list_chart_x_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_x_axis_tick_label_weight not in list_chart_x_axis_tick_label_weight: + raise ValueError( + f"`chart_x_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_tick_label_weight in list_chart_x_axis_tick_label_weight + and chart_x_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_weight"] = filtered_dict[ + chart_x_axis_tick_label_weight + ] + self.state["state"]["x"][ + "tick_label_max_lines" + ] = chart_x_axis_tick_label_max_lines + self.state["state"]["x"][ + "tick_label_line_height" + ] = chart_x_axis_tick_label_line_height + + list_chart_x_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_x_axis_tick_label_space_mode + not in list_chart_x_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_x_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_x_axis_tick_label_space_mode + in list_chart_x_axis_tick_label_space_mode + and chart_x_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_x_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_space_mode"] = filtered_dict[ + chart_x_axis_tick_label_space_mode + ] + self.state["state"]["x"]["tick_label_space"] = chart_x_axis_tick_label_space + + list_chart_x_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_x_axis_tick_mode not in list_chart_x_axis_tick_mode: + raise ValueError( + f"`chart_x_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_x_axis_tick_mode in list_chart_x_axis_tick_mode + and chart_x_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_x_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_mode"] = filtered_dict[ + chart_x_axis_tick_mode + ] + self.state["state"]["x"]["tick_number"] = chart_x_axis_tick_number + + if ( + chart_x_axis_tick_custom is not None + and len(chart_x_axis_tick_custom) > 1 + and isinstance(chart_x_axis_tick_custom, list) + ): + self.state["state"]["x"]["tick_custom"] = " \n ".join( + chart_x_axis_tick_custom + ) + else: + self.state["state"]["x"]["tick_custom"] = chart_x_axis_tick_custom + + self.state["state"]["x"][ + "line_and_tick_color" + ] = chart_x_axis_line_and_tick_color + self.state["state"]["x"][ + "line_and_tick_width" + ] = chart_x_axis_line_and_tick_width + self.state["state"]["x"]["tick_length"] = chart_x_axis_tick_length + + list_chart_x_axis_tick_side = ["out", "in"] + [None] + if chart_x_axis_tick_side not in list_chart_x_axis_tick_side: + raise ValueError(f"`chart_x_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_x_axis_tick_side in list_chart_x_axis_tick_side + and chart_x_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_x_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_side"] = filtered_dict[ + chart_x_axis_tick_side + ] + self.state["state"]["x"]["line_visible"] = chart_x_axis_line_visible + self.state["state"]["x"]["edge_padding"] = chart_x_axis_edge_padding + + list_chart_x_axis_gridlines_visible = [True, False] + [None] + if chart_x_axis_gridlines_visible not in list_chart_x_axis_gridlines_visible: + raise ValueError( + f"`chart_x_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_x_axis_gridlines_visible in list_chart_x_axis_gridlines_visible + and chart_x_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridlines_visible"] = filtered_dict[ + chart_x_axis_gridlines_visible + ] + self.state["state"]["x"]["gridlines_styling"] = chart_x_axis_gridlines_styling + self.state["state"]["x"]["gridline_color"] = chart_x_axis_gridline_color + + list_chart_x_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_x_axis_gridline_style not in list_chart_x_axis_gridline_style: + raise ValueError( + f"`chart_x_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_x_axis_gridline_style in list_chart_x_axis_gridline_style + and chart_x_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_x_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridline_style"] = filtered_dict[ + chart_x_axis_gridline_style + ] + self.state["state"]["x"]["gridline_width"] = chart_x_axis_gridline_width + self.state["state"]["x"][ + "gridline_category_dividers" + ] = chart_x_axis_gridline_category_dividers + self.state["state"]["x"][ + "gridline_category_dividers_extend" + ] = chart_x_axis_gridline_category_dividers_extend + self.state["state"]["x_formatting"][ + "prefix" + ] = chart_x_axis_number_date_format_prefix + self.state["state"]["x_formatting"][ + "suffix" + ] = chart_x_axis_number_date_format_suffix + self.state["state"]["x_formatting"][ + "n_dec" + ] = chart_x_axis_number_date_format_n_dec + self.state["state"]["x_formatting"][ + "advanced" + ] = chart_x_axis_number_date_format_advanced + + list_chart_x_axis_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_x_axis_number_date_format_negative_sign + not in list_chart_x_axis_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_x_axis_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_x_axis_number_date_format_negative_sign + in list_chart_x_axis_number_date_format_negative_sign + and chart_x_axis_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_x_axis_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["x_formatting"]["negative_sign"] = filtered_dict[ + chart_x_axis_number_date_format_negative_sign + ] + self.state["state"]["x_formatting"][ + "strip_zeros" + ] = chart_x_axis_number_date_format_strip_zeros + self.state["state"]["x_formatting"][ + "strip_separator" + ] = chart_x_axis_number_date_format_strip_separator + self.state["state"]["x_formatting"][ + "transform_labels" + ] = chart_x_axis_number_date_format_transform_labels + + list_chart_x_axis_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_x_axis_number_date_format_transform + not in list_chart_x_axis_number_date_format_transform + ): + raise ValueError( + f"`chart_x_axis_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_x_axis_number_date_format_transform + in list_chart_x_axis_number_date_format_transform + and chart_x_axis_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_x_axis_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["x_formatting"]["transform"] = filtered_dict[ + chart_x_axis_number_date_format_transform + ] + self.state["state"]["x_formatting"][ + "multiply_divide_constant" + ] = chart_x_axis_number_date_format_multiply_divide_constant + self.state["state"]["x_formatting"][ + "exponentiate_constant" + ] = chart_x_axis_number_date_format_exponentiate_constant + self.state["state"]["y_as_percentage"] = y_as_percentage + self.state["state"]["matching_y_axis"] = matching_y_axis + + list_chart_y_axis_axis_visible = [True, False] + [None] + if chart_y_axis_axis_visible not in list_chart_y_axis_axis_visible: + raise ValueError( + f"`chart_y_axis_axis_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_axis_visible in list_chart_y_axis_axis_visible + and chart_y_axis_axis_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_axis_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["axis_visible"] = filtered_dict[ + chart_y_axis_axis_visible + ] + + list_chart_y_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_y_axis_numeric_scale_type not in list_chart_y_axis_numeric_scale_type: + raise ValueError( + f"`chart_y_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_y_axis_numeric_scale_type in list_chart_y_axis_numeric_scale_type + and chart_y_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_y_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["numeric_scale_type"] = filtered_dict[ + chart_y_axis_numeric_scale_type + ] + self.state["state"]["y"]["linear_min"] = chart_y_axis_linear_min + self.state["state"]["y"]["linear_max"] = chart_y_axis_linear_max + self.state["state"]["y"]["log_min"] = chart_y_axis_log_min + self.state["state"]["y"]["log_max"] = chart_y_axis_log_max + self.state["state"]["y"]["datetime_min"] = chart_y_axis_datetime_min + self.state["state"]["y"]["datetime_max"] = chart_y_axis_datetime_max + self.state["state"]["y"]["flip"] = chart_y_axis_flip + self.state["state"]["y"][ + "show_scale_settings" + ] = chart_y_axis_show_scale_settings + + list_chart_y_axis_nice = [True, False] + [None] + if chart_y_axis_nice not in list_chart_y_axis_nice: + raise ValueError(f"`chart_y_axis_nice` must be one of: [True, False]") + elif ( + chart_y_axis_nice in list_chart_y_axis_nice + and chart_y_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["nice"] = filtered_dict[chart_y_axis_nice] + + list_chart_y_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_y_axis_zero_axis not in list_chart_y_axis_zero_axis: + raise ValueError( + f"`chart_y_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_y_axis_zero_axis in list_chart_y_axis_zero_axis + and chart_y_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_y_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["zero_axis"] = filtered_dict[ + chart_y_axis_zero_axis + ] + + list_chart_y_axis_title_mode = ["auto", "custom"] + [None] + if chart_y_axis_title_mode not in list_chart_y_axis_title_mode: + raise ValueError( + f"`chart_y_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_y_axis_title_mode in list_chart_y_axis_title_mode + and chart_y_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_y_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_mode"] = filtered_dict[ + chart_y_axis_title_mode + ] + self.state["state"]["y"]["title"] = chart_y_axis_title + self.state["state"]["y"]["title_styling"] = chart_y_axis_title_styling + + list_chart_y_axis_title_position = ["side", "end"] + [None] + if chart_y_axis_title_position not in list_chart_y_axis_title_position: + raise ValueError( + f"`chart_y_axis_title_position` must be one of: ['side', 'end']" + ) + elif ( + chart_y_axis_title_position in list_chart_y_axis_title_position + and chart_y_axis_title_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"side": "side", "end": "end"}.items() + if chart_y_axis_title_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_position"] = filtered_dict[ + chart_y_axis_title_position + ] + + list_chart_y_axis_title_weight = ["bold", "normal"] + [None] + if chart_y_axis_title_weight not in list_chart_y_axis_title_weight: + raise ValueError( + f"`chart_y_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_title_weight in list_chart_y_axis_title_weight + and chart_y_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_weight"] = filtered_dict[ + chart_y_axis_title_weight + ] + self.state["state"]["y"]["title_color"] = chart_y_axis_title_color + self.state["state"]["y"]["title_size"] = chart_y_axis_title_size + self.state["state"]["y"]["title_padding"] = chart_y_axis_title_padding + + list_chart_y_axis_tick_label_position = ["default", "above", "below"] + [None] + if ( + chart_y_axis_tick_label_position + not in list_chart_y_axis_tick_label_position + ): + raise ValueError( + f"`chart_y_axis_tick_label_position` must be one of: ['default', 'above', 'below']" + ) + elif ( + chart_y_axis_tick_label_position in list_chart_y_axis_tick_label_position + and chart_y_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "above": "above", + "below": "below", + }.items() + if chart_y_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_position"] = filtered_dict[ + chart_y_axis_tick_label_position + ] + self.state["state"]["y"]["tick_label_styling"] = chart_y_axis_tick_label_styling + self.state["state"]["y"]["tick_label_size"] = chart_y_axis_tick_label_size + self.state["state"]["y"]["tick_label_color"] = chart_y_axis_tick_label_color + self.state["state"]["y"]["tick_padding"] = chart_y_axis_tick_padding + + list_chart_y_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_y_axis_tick_label_angle not in list_chart_y_axis_tick_label_angle: + raise ValueError( + f"`chart_y_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_y_axis_tick_label_angle in list_chart_y_axis_tick_label_angle + and chart_y_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_y_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_angle"] = filtered_dict[ + chart_y_axis_tick_label_angle + ] + + list_chart_y_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_y_axis_tick_label_weight not in list_chart_y_axis_tick_label_weight: + raise ValueError( + f"`chart_y_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_tick_label_weight in list_chart_y_axis_tick_label_weight + and chart_y_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_weight"] = filtered_dict[ + chart_y_axis_tick_label_weight + ] + self.state["state"]["y"][ + "tick_label_max_lines" + ] = chart_y_axis_tick_label_max_lines + self.state["state"]["y"][ + "tick_label_line_height" + ] = chart_y_axis_tick_label_line_height + + list_chart_y_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_y_axis_tick_label_space_mode + not in list_chart_y_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_y_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_y_axis_tick_label_space_mode + in list_chart_y_axis_tick_label_space_mode + and chart_y_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_y_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_space_mode"] = filtered_dict[ + chart_y_axis_tick_label_space_mode + ] + self.state["state"]["y"]["tick_label_space"] = chart_y_axis_tick_label_space + + list_chart_y_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_y_axis_tick_mode not in list_chart_y_axis_tick_mode: + raise ValueError( + f"`chart_y_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_y_axis_tick_mode in list_chart_y_axis_tick_mode + and chart_y_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_y_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_mode"] = filtered_dict[ + chart_y_axis_tick_mode + ] + self.state["state"]["y"]["tick_number"] = chart_y_axis_tick_number + + if ( + chart_y_axis_tick_custom is not None + and len(chart_y_axis_tick_custom) > 1 + and isinstance(chart_y_axis_tick_custom, list) + ): + self.state["state"]["y"]["tick_custom"] = " \n ".join( + chart_y_axis_tick_custom + ) + else: + self.state["state"]["y"]["tick_custom"] = chart_y_axis_tick_custom + + self.state["state"]["y"][ + "line_and_tick_color" + ] = chart_y_axis_line_and_tick_color + self.state["state"]["y"][ + "line_and_tick_width" + ] = chart_y_axis_line_and_tick_width + self.state["state"]["y"]["tick_length"] = chart_y_axis_tick_length + + list_chart_y_axis_tick_side = ["out", "in"] + [None] + if chart_y_axis_tick_side not in list_chart_y_axis_tick_side: + raise ValueError(f"`chart_y_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_y_axis_tick_side in list_chart_y_axis_tick_side + and chart_y_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_y_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_side"] = filtered_dict[ + chart_y_axis_tick_side + ] + self.state["state"]["y"]["line_visible"] = chart_y_axis_line_visible + self.state["state"]["y"]["edge_padding"] = chart_y_axis_edge_padding + + list_chart_y_axis_gridlines_visible = [True, False] + [None] + if chart_y_axis_gridlines_visible not in list_chart_y_axis_gridlines_visible: + raise ValueError( + f"`chart_y_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_gridlines_visible in list_chart_y_axis_gridlines_visible + and chart_y_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridlines_visible"] = filtered_dict[ + chart_y_axis_gridlines_visible + ] + self.state["state"]["y"]["gridlines_styling"] = chart_y_axis_gridlines_styling + self.state["state"]["y"]["gridline_color"] = chart_y_axis_gridline_color + + list_chart_y_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_y_axis_gridline_style not in list_chart_y_axis_gridline_style: + raise ValueError( + f"`chart_y_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_y_axis_gridline_style in list_chart_y_axis_gridline_style + and chart_y_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_y_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridline_style"] = filtered_dict[ + chart_y_axis_gridline_style + ] + self.state["state"]["y"]["gridline_width"] = chart_y_axis_gridline_width + self.state["state"]["y"][ + "gridline_category_dividers" + ] = chart_y_axis_gridline_category_dividers + self.state["state"]["y"][ + "gridline_category_dividers_extend" + ] = chart_y_axis_gridline_category_dividers_extend + self.state["state"]["y_formatting"][ + "prefix" + ] = chart_y_axis_number_date_format_prefix + self.state["state"]["y_formatting"][ + "suffix" + ] = chart_y_axis_number_date_format_suffix + self.state["state"]["y_formatting"][ + "n_dec" + ] = chart_y_axis_number_date_format_n_dec + self.state["state"]["y_formatting"][ + "advanced" + ] = chart_y_axis_number_date_format_advanced + + list_chart_y_axis_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_y_axis_number_date_format_negative_sign + not in list_chart_y_axis_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_y_axis_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_y_axis_number_date_format_negative_sign + in list_chart_y_axis_number_date_format_negative_sign + and chart_y_axis_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_y_axis_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["y_formatting"]["negative_sign"] = filtered_dict[ + chart_y_axis_number_date_format_negative_sign + ] + self.state["state"]["y_formatting"][ + "strip_zeros" + ] = chart_y_axis_number_date_format_strip_zeros + self.state["state"]["y_formatting"][ + "strip_separator" + ] = chart_y_axis_number_date_format_strip_separator + self.state["state"]["y_formatting"][ + "transform_labels" + ] = chart_y_axis_number_date_format_transform_labels + + list_chart_y_axis_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_y_axis_number_date_format_transform + not in list_chart_y_axis_number_date_format_transform + ): + raise ValueError( + f"`chart_y_axis_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_y_axis_number_date_format_transform + in list_chart_y_axis_number_date_format_transform + and chart_y_axis_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_y_axis_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["y_formatting"]["transform"] = filtered_dict[ + chart_y_axis_number_date_format_transform + ] + self.state["state"]["y_formatting"][ + "multiply_divide_constant" + ] = chart_y_axis_number_date_format_multiply_divide_constant + self.state["state"]["y_formatting"][ + "exponentiate_constant" + ] = chart_y_axis_number_date_format_exponentiate_constant + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["filter_control"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["filter_control"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["filter_control"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_filter_controls_dropdown_width_mode] + self.state["state"]["filter_control"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["filter_control"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["filter_control"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["filter_control"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["filter_control"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["filter_control"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["filter_show_all"] = filter_show_all + self.state["state"]["filter_show_all_text"] = filter_show_all_text + + list_chart_filter_controls_container_alignment = ["start", "center", "end"] + [ + None + ] + if ( + chart_filter_controls_container_alignment + not in list_chart_filter_controls_container_alignment + ): + raise ValueError( + f"`chart_filter_controls_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_filter_controls_container_alignment + in list_chart_filter_controls_container_alignment + and chart_filter_controls_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_filter_controls_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_container"]["alignment"] = filtered_dict[ + chart_filter_controls_container_alignment + ] + self.state["state"]["controls_container"][ + "controls_spacing" + ] = chart_filter_controls_container_controls_spacing + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + self.state["state"]["axes_highlights"][ + "x_enabled" + ] = chart_axes_highlights_x_enabled + + if ( + chart_axes_highlights_x_lines is not None + and len(chart_axes_highlights_x_lines) > 1 + and isinstance(chart_axes_highlights_x_lines, list) + ): + self.state["state"]["axes_highlights"]["x_lines"] = " \n ".join( + chart_axes_highlights_x_lines + ) + else: + self.state["state"]["axes_highlights"][ + "x_lines" + ] = chart_axes_highlights_x_lines + + self.state["state"]["axes_highlights"][ + "x_line_color" + ] = chart_axes_highlights_x_line_color + self.state["state"]["axes_highlights"][ + "x_line_width" + ] = chart_axes_highlights_x_line_width + self.state["state"]["axes_highlights"][ + "x_line_dash" + ] = chart_axes_highlights_x_line_dash + + if ( + chart_axes_highlights_x_areas is not None + and len(chart_axes_highlights_x_areas) > 1 + and isinstance(chart_axes_highlights_x_areas, list) + ): + self.state["state"]["axes_highlights"]["x_areas"] = " \n ".join( + chart_axes_highlights_x_areas + ) + else: + self.state["state"]["axes_highlights"][ + "x_areas" + ] = chart_axes_highlights_x_areas + + self.state["state"]["axes_highlights"][ + "x_area_color" + ] = chart_axes_highlights_x_area_color + self.state["state"]["axes_highlights"][ + "x_area_opacity" + ] = chart_axes_highlights_x_area_opacity + + list_chart_axes_highlights_x_area_texture = [ + "none", + "pattern-diagonal", + "pattern-grid", + "pattern-dots", + ] + [None] + if ( + chart_axes_highlights_x_area_texture + not in list_chart_axes_highlights_x_area_texture + ): + raise ValueError( + f"`chart_axes_highlights_x_area_texture` must be one of: ['none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots']" + ) + elif ( + chart_axes_highlights_x_area_texture + in list_chart_axes_highlights_x_area_texture + and chart_axes_highlights_x_area_texture is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "pattern-diagonal": "fl-pattern-diagonal", + "pattern-grid": "fl-pattern-grid", + "pattern-dots": "fl-pattern-dots", + }.items() + if chart_axes_highlights_x_area_texture in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_area_texture" + ] = filtered_dict[chart_axes_highlights_x_area_texture] + self.state["state"]["axes_highlights"][ + "x_label_vertical" + ] = chart_axes_highlights_x_label_vertical + + list_chart_axes_highlights_x_label_y_position = ["bottom", "middle", "top"] + [ + None + ] + if ( + chart_axes_highlights_x_label_y_position + not in list_chart_axes_highlights_x_label_y_position + ): + raise ValueError( + f"`chart_axes_highlights_x_label_y_position` must be one of: ['bottom', 'middle', 'top']" + ) + elif ( + chart_axes_highlights_x_label_y_position + in list_chart_axes_highlights_x_label_y_position + and chart_axes_highlights_x_label_y_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "middle": "middle", + "top": "top", + }.items() + if chart_axes_highlights_x_label_y_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_label_y_position" + ] = filtered_dict[chart_axes_highlights_x_label_y_position] + + list_chart_axes_highlights_x_label_x_position = ["left", "middle", "right"] + [ + None + ] + if ( + chart_axes_highlights_x_label_x_position + not in list_chart_axes_highlights_x_label_x_position + ): + raise ValueError( + f"`chart_axes_highlights_x_label_x_position` must be one of: ['left', 'middle', 'right']" + ) + elif ( + chart_axes_highlights_x_label_x_position + in list_chart_axes_highlights_x_label_x_position + and chart_axes_highlights_x_label_x_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "middle": "middle", + "right": "right", + }.items() + if chart_axes_highlights_x_label_x_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_label_x_position" + ] = filtered_dict[chart_axes_highlights_x_label_x_position] + self.state["state"]["axes_highlights"][ + "x_label_max_width" + ] = chart_axes_highlights_x_label_max_width + self.state["state"]["axes_highlights"][ + "x_font_size" + ] = chart_axes_highlights_x_font_size + + list_chart_axes_highlights_x_font_weight = ["regular", "bold"] + [None] + if ( + chart_axes_highlights_x_font_weight + not in list_chart_axes_highlights_x_font_weight + ): + raise ValueError( + f"`chart_axes_highlights_x_font_weight` must be one of: ['regular', 'bold']" + ) + elif ( + chart_axes_highlights_x_font_weight + in list_chart_axes_highlights_x_font_weight + and chart_axes_highlights_x_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"regular": "regular", "bold": "bold"}.items() + if chart_axes_highlights_x_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"]["x_font_weight"] = filtered_dict[ + chart_axes_highlights_x_font_weight + ] + self.state["state"]["axes_highlights"][ + "x_label_color" + ] = chart_axes_highlights_x_label_color + self.state["state"]["axes_highlights"][ + "x_shadow_color" + ] = chart_axes_highlights_x_shadow_color + self.state["state"]["axes_highlights"][ + "x_shadow_enabled" + ] = chart_axes_highlights_x_shadow_enabled + self.state["state"]["axes_highlights"][ + "y_enabled" + ] = chart_axes_highlights_y_enabled + + if ( + chart_axes_highlights_y_lines is not None + and len(chart_axes_highlights_y_lines) > 1 + and isinstance(chart_axes_highlights_y_lines, list) + ): + self.state["state"]["axes_highlights"]["y_lines"] = " \n ".join( + chart_axes_highlights_y_lines + ) + else: + self.state["state"]["axes_highlights"][ + "y_lines" + ] = chart_axes_highlights_y_lines + + self.state["state"]["axes_highlights"][ + "y_line_color" + ] = chart_axes_highlights_y_line_color + self.state["state"]["axes_highlights"][ + "y_line_width" + ] = chart_axes_highlights_y_line_width + self.state["state"]["axes_highlights"][ + "y_line_dash" + ] = chart_axes_highlights_y_line_dash + + if ( + chart_axes_highlights_y_areas is not None + and len(chart_axes_highlights_y_areas) > 1 + and isinstance(chart_axes_highlights_y_areas, list) + ): + self.state["state"]["axes_highlights"]["y_areas"] = " \n ".join( + chart_axes_highlights_y_areas + ) + else: + self.state["state"]["axes_highlights"][ + "y_areas" + ] = chart_axes_highlights_y_areas + + self.state["state"]["axes_highlights"][ + "y_area_color" + ] = chart_axes_highlights_y_area_color + self.state["state"]["axes_highlights"][ + "y_area_opacity" + ] = chart_axes_highlights_y_area_opacity + + list_chart_axes_highlights_y_area_texture = [ + "none", + "pattern-diagonal", + "pattern-grid", + "pattern-dots", + ] + [None] + if ( + chart_axes_highlights_y_area_texture + not in list_chart_axes_highlights_y_area_texture + ): + raise ValueError( + f"`chart_axes_highlights_y_area_texture` must be one of: ['none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots']" + ) + elif ( + chart_axes_highlights_y_area_texture + in list_chart_axes_highlights_y_area_texture + and chart_axes_highlights_y_area_texture is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "pattern-diagonal": "fl-pattern-diagonal", + "pattern-grid": "fl-pattern-grid", + "pattern-dots": "fl-pattern-dots", + }.items() + if chart_axes_highlights_y_area_texture in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_area_texture" + ] = filtered_dict[chart_axes_highlights_y_area_texture] + + list_chart_axes_highlights_y_label_x_position = ["left", "middle", "right"] + [ + None + ] + if ( + chart_axes_highlights_y_label_x_position + not in list_chart_axes_highlights_y_label_x_position + ): + raise ValueError( + f"`chart_axes_highlights_y_label_x_position` must be one of: ['left', 'middle', 'right']" + ) + elif ( + chart_axes_highlights_y_label_x_position + in list_chart_axes_highlights_y_label_x_position + and chart_axes_highlights_y_label_x_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "middle": "middle", + "right": "right", + }.items() + if chart_axes_highlights_y_label_x_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_label_x_position" + ] = filtered_dict[chart_axes_highlights_y_label_x_position] + + list_chart_axes_highlights_y_label_y_position = ["above", "middle", "below"] + [ + None + ] + if ( + chart_axes_highlights_y_label_y_position + not in list_chart_axes_highlights_y_label_y_position + ): + raise ValueError( + f"`chart_axes_highlights_y_label_y_position` must be one of: ['above', 'middle', 'below']" + ) + elif ( + chart_axes_highlights_y_label_y_position + in list_chart_axes_highlights_y_label_y_position + and chart_axes_highlights_y_label_y_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "above": "above", + "middle": "middle", + "below": "below", + }.items() + if chart_axes_highlights_y_label_y_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_label_y_position" + ] = filtered_dict[chart_axes_highlights_y_label_y_position] + self.state["state"]["axes_highlights"][ + "y_label_max_width" + ] = chart_axes_highlights_y_label_max_width + self.state["state"]["axes_highlights"][ + "y_font_size" + ] = chart_axes_highlights_y_font_size + + list_chart_axes_highlights_y_font_weight = ["regular", "bold"] + [None] + if ( + chart_axes_highlights_y_font_weight + not in list_chart_axes_highlights_y_font_weight + ): + raise ValueError( + f"`chart_axes_highlights_y_font_weight` must be one of: ['regular', 'bold']" + ) + elif ( + chart_axes_highlights_y_font_weight + in list_chart_axes_highlights_y_font_weight + and chart_axes_highlights_y_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"regular": "regular", "bold": "bold"}.items() + if chart_axes_highlights_y_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"]["y_font_weight"] = filtered_dict[ + chart_axes_highlights_y_font_weight + ] + self.state["state"]["axes_highlights"][ + "y_label_color" + ] = chart_axes_highlights_y_label_color + self.state["state"]["axes_highlights"][ + "y_shadow_color" + ] = chart_axes_highlights_y_shadow_color + self.state["state"]["axes_highlights"][ + "y_shadow_enabled" + ] = chart_axes_highlights_y_shadow_enabled + + list_axes_highlights_stack_order = ["above_data", "below_data"] + [None] + if axes_highlights_stack_order not in list_axes_highlights_stack_order: + raise ValueError( + f"`axes_highlights_stack_order` must be one of: ['above_data', 'below_data']" + ) + elif ( + axes_highlights_stack_order in list_axes_highlights_stack_order + and axes_highlights_stack_order is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "above_data": "above_data", + "below_data": "below_data", + }.items() + if axes_highlights_stack_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights_stack_order"] = filtered_dict[ + axes_highlights_stack_order + ] + self.state["state"]["annotations_styles"] = annotations_styles + + list_chart_annotations_defaults_text_weight = ["normal", "bold"] + [None] + if ( + chart_annotations_defaults_text_weight + not in list_chart_annotations_defaults_text_weight + ): + raise ValueError( + f"`chart_annotations_defaults_text_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_annotations_defaults_text_weight + in list_chart_annotations_defaults_text_weight + and chart_annotations_defaults_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_annotations_defaults_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "text_weight" + ] = filtered_dict[chart_annotations_defaults_text_weight] + self.state["state"]["annotations"]["defaults"][ + "text_size" + ] = chart_annotations_defaults_text_size + self.state["state"]["annotations"]["defaults"][ + "text_color" + ] = chart_annotations_defaults_text_color + self.state["state"]["annotations"]["defaults"][ + "label_width" + ] = chart_annotations_defaults_label_width + + list_chart_annotations_defaults_text_background_mode = [ + "none", + "outline", + "background", + ] + [None] + if ( + chart_annotations_defaults_text_background_mode + not in list_chart_annotations_defaults_text_background_mode + ): + raise ValueError( + f"`chart_annotations_defaults_text_background_mode` must be one of: ['none', 'outline', 'background']" + ) + elif ( + chart_annotations_defaults_text_background_mode + in list_chart_annotations_defaults_text_background_mode + and chart_annotations_defaults_text_background_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "outline": "outline", + "background": "background", + }.items() + if chart_annotations_defaults_text_background_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "text_background_mode" + ] = filtered_dict[chart_annotations_defaults_text_background_mode] + self.state["state"]["annotations"]["defaults"][ + "text_bg" + ] = chart_annotations_defaults_text_bg + self.state["state"]["annotations"]["defaults"][ + "label_bg" + ] = chart_annotations_defaults_label_bg + + list_chart_annotations_defaults_text_alignment = [ + "auto", + "start", + "center", + "end", + ] + [None] + if ( + chart_annotations_defaults_text_alignment + not in list_chart_annotations_defaults_text_alignment + ): + raise ValueError( + f"`chart_annotations_defaults_text_alignment` must be one of: ['auto', 'start', 'center', 'end']" + ) + elif ( + chart_annotations_defaults_text_alignment + in list_chart_annotations_defaults_text_alignment + and chart_annotations_defaults_text_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_annotations_defaults_text_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "text_alignment" + ] = filtered_dict[chart_annotations_defaults_text_alignment] + + list_chart_annotations_defaults_popup_position = [ + "center", + "left", + "right", + "top", + "bottom", + ] + [None] + if ( + chart_annotations_defaults_popup_position + not in list_chart_annotations_defaults_popup_position + ): + raise ValueError( + f"`chart_annotations_defaults_popup_position` must be one of: ['center', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_annotations_defaults_popup_position + in list_chart_annotations_defaults_popup_position + and chart_annotations_defaults_popup_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "center": "center", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_annotations_defaults_popup_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "popup_position" + ] = filtered_dict[chart_annotations_defaults_popup_position] + + list_chart_annotations_defaults_line_marker = [ + "none", + "arrowhead_open", + "arrowhead", + ] + [None] + if ( + chart_annotations_defaults_line_marker + not in list_chart_annotations_defaults_line_marker + ): + raise ValueError( + f"`chart_annotations_defaults_line_marker` must be one of: ['none', 'arrowhead_open', 'arrowhead']" + ) + elif ( + chart_annotations_defaults_line_marker + in list_chart_annotations_defaults_line_marker + and chart_annotations_defaults_line_marker is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "arrowhead_open": "arrowhead_open", + "arrowhead": "arrowhead", + }.items() + if chart_annotations_defaults_line_marker in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "line_marker" + ] = filtered_dict[chart_annotations_defaults_line_marker] + self.state["state"]["annotations"]["defaults"][ + "stroke_width" + ] = chart_annotations_defaults_stroke_width + self.state["state"]["annotations"]["defaults"][ + "stroke_color" + ] = chart_annotations_defaults_stroke_color + + list_chart_annotations_defaults_connector_extend_line = [ + "enabled", + "disabled", + ] + [None] + if ( + chart_annotations_defaults_connector_extend_line + not in list_chart_annotations_defaults_connector_extend_line + ): + raise ValueError( + f"`chart_annotations_defaults_connector_extend_line` must be one of: ['enabled', 'disabled']" + ) + elif ( + chart_annotations_defaults_connector_extend_line + in list_chart_annotations_defaults_connector_extend_line + and chart_annotations_defaults_connector_extend_line is not None + ): + filtered_dict = { + k: v + for (k, v) in {"enabled": "enabled", "disabled": "disabled"}.items() + if chart_annotations_defaults_connector_extend_line in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "connector_extend_line" + ] = filtered_dict[chart_annotations_defaults_connector_extend_line] + self.state["state"]["animation_duration"] = animation_duration + + list_chart_background_background_color_enabled = [True, False] + [None] + if ( + chart_background_background_color_enabled + not in list_chart_background_background_color_enabled + ): + raise ValueError( + f"`chart_background_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_background_background_color_enabled + in list_chart_background_background_color_enabled + and chart_background_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_background_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_color_enabled" + ] = filtered_dict[chart_background_background_color_enabled] + + list_chart_background_background_image_enabled = [True, False] + [None] + if ( + chart_background_background_image_enabled + not in list_chart_background_background_image_enabled + ): + raise ValueError( + f"`chart_background_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_background_background_image_enabled + in list_chart_background_background_image_enabled + and chart_background_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_background_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_image_enabled" + ] = filtered_dict[chart_background_background_image_enabled] + self.state["state"]["chart_bg"][ + "background_color" + ] = chart_background_background_color + self.state["state"]["chart_bg"][ + "background_image_src" + ] = chart_background_background_image_src + + list_chart_background_background_image_size = ["stretch", "slice", "meet"] + [ + None + ] + if ( + chart_background_background_image_size + not in list_chart_background_background_image_size + ): + raise ValueError( + f"`chart_background_background_image_size` must be one of: ['stretch', 'slice', 'meet']" + ) + elif ( + chart_background_background_image_size + in list_chart_background_background_image_size + and chart_background_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "stretch": "stretch", + "slice": "slice", + "meet": "meet", + }.items() + if chart_background_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_image_size" + ] = filtered_dict[chart_background_background_image_size] + + list_chart_background_background_image_position = [ + "x_min_y_min", + "x_mid_y_min", + "x_max_y_min", + "x_max_y_mid", + "x_mid_y_mid", + "x_min_y_max", + "x_mid_y_max", + "x_max_y_max", + ] + [None] + if ( + chart_background_background_image_position + not in list_chart_background_background_image_position + ): + raise ValueError( + f"`chart_background_background_image_position` must be one of: ['x_min_y_min', 'x_mid_y_min', 'x_max_y_min', 'x_max_y_mid', 'x_mid_y_mid', 'x_min_y_max', 'x_mid_y_max', 'x_max_y_max']" + ) + elif ( + chart_background_background_image_position + in list_chart_background_background_image_position + and chart_background_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "x_min_y_min": "xMinYMin", + "x_mid_y_min": "xMidYMin", + "x_max_y_min": "xMaxYMin", + "x_max_y_mid": "xMaxYMid", + "x_mid_y_mid": "xMidYMid", + "x_min_y_max": "xMinYMax", + "x_mid_y_max": "xMidYMax", + "x_max_y_max": "xMaxYMax", + }.items() + if chart_background_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_image_position" + ] = filtered_dict[chart_background_background_image_position] + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_network_graph_details( + self, + chart_type: str = None, + radial_sort: str = None, + radial_sort_primary: str = None, + radial_sort_secondary: str = None, + height_mode: str = None, + facet_aspect: float = None, + facet_aspect_mobile: float = None, + facet_aspect_breakpoint: float = None, + ring_padding: float = None, + ring_angle: float = None, + fill_color: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + node_scale_pack: bool = None, + constant_node_radius: float = None, + min_node_radius: float = None, + max_node_radius: float = None, + point_opacity: float = None, + fade_opacity: float = None, + image_opacity: float = None, + node_stroke_width: float = None, + node_stroke_color: str = None, + node_highlight_stroke_color: str = None, + points_advanced: bool = None, + node_scale_type: str = None, + max_node_value: float = None, + auto_scale: bool = None, + max_fullness: float = None, + label_size: float = None, + label_weight: str = None, + label_color_mode: str = None, + label_color: str = None, + label_show: str = None, + link_color: str = None, + link_opacity: float = None, + constant_link_width: float = None, + min_link_width: float = None, + max_link_width: float = None, + max_link_value: float = None, + links_advanced: bool = None, + directional: bool = None, + link_scale_type: str = None, + link_highlight_color: str = None, + link_highlight_opacity: float = None, + chart_popup_show_popups: bool = None, + chart_popup_is_custom: bool = None, + chart_popup_custom_template: Union[list, str] = None, + chart_popup_show_pointer: bool = None, + chart_popup_show_shadow: bool = None, + chart_popup_style_popups: bool = None, + chart_popup_text_color: str = None, + chart_popup_align: str = None, + chart_popup_text_size: float = None, + chart_popup_fill_color: str = None, + chart_popup_opacity: float = None, + chart_popup_padding: float = None, + chart_popup_border_radius: float = None, + chart_popup_max_width: float = None, + popup_opacity: float = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + legend_position: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + legend_interaction: str = None, + animate_simulation: bool = None, + simulation_speed: float = None, + animate_transition: bool = None, + transition_scale: float = None, + many_body_strength: float = None, + collision_strength: float = None, + chart_number_localization_input_decimal_separator: str = None, + chart_number_localization_output_separators: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: network graph. + + + :param chart_type: Choices: regular, radial. Flourish type hint: string, defaults to None. + :type chart_type: str, optional + :param radial_sort: Radial sort mode. Choices: auto, none, clockwise, counter_clockwise. Whether sorting will be applied or not and in which direction. Flourish type hint: string, defaults to None. + :type radial_sort: str, optional + :param radial_sort_primary: Primary sort. Choices: group, id, size, link_count, link_value. The primary criteria used when ordering points. If there are ties when sorting the data the secondary sorting criteria is applied. Flourish type hint: string, defaults to None. + :type radial_sort_primary: str, optional + :param radial_sort_secondary: Secondary sort. Choices: group, id, size, link_count, link_value. The secondary criteria used when ordering points. It is applied in cases where the primary sorting criteria results in a tie. Flourish type hint: string, defaults to None. + :type radial_sort_secondary: str, optional + :param height_mode: Height mode. Choices: auto, fill_space, aspect. How the graphics height is determined; ignored when embedded in a fixed-height context such as a simple iframe embed. Auto sets the height based on the chart type, data and width. Standard uses the default Flourish responsive sizing. Aspect ratio sets the aspect of each plot. Please note that animations between slides in a story will only work in Aspect ratio mode. Flourish type hint: string, defaults to None. + :type height_mode: str, optional + :param facet_aspect: Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type facet_aspect: float, optional + :param facet_aspect_mobile: Aspect (mobile). Aspect of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type facet_aspect_mobile: float, optional + :param facet_aspect_breakpoint: Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to None. + :type facet_aspect_breakpoint: float, optional + :param ring_padding: Ring padding (%). Adds extra spacing around the outside of the radial layout. Flourish type hint: number, defaults to None. + :type ring_padding: float, optional + :param ring_angle: Ring rotation. The number of degrees to rotate the radial layout. Flourish type hint: number, defaults to None. + :type ring_angle: float, optional + :param fill_color: Fill color. Flourish type hint: color, defaults to None. + :type fill_color: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param node_scale_pack: Pack points to fit radial layout. Scale points relatively to fit tightly around the perimiter of the radial layout, without leaving space between points. If enabled this option overrides other point sizing options in this section. Flourish type hint: boolean, defaults to None. + :type node_scale_pack: bool, optional + :param constant_node_radius: Radius. The radius of your points (in px). Flourish type hint: number, defaults to None. + :type constant_node_radius: float, optional + :param min_node_radius: Minimum radius. Flourish type hint: number, defaults to None. + :type min_node_radius: float, optional + :param max_node_radius: Maximum radius. The maximum radius of your points (in px). Flourish type hint: number, defaults to None. + :type max_node_radius: float, optional + :param point_opacity: Opacity (default). How opaque the default state of the points in your network should be. Flourish type hint: number, defaults to None. + :type point_opacity: float, optional + :param fade_opacity: Opacity (unhighlighted). When a point is emphasized, how opaque the rest of the network should be. Flourish type hint: number, defaults to None. + :type fade_opacity: float, optional + :param image_opacity: Image opacity. How opaque the images in your points should be. Flourish type hint: number, defaults to None. + :type image_opacity: float, optional + :param node_stroke_width: Width. Flourish type hint: number, defaults to None. + :type node_stroke_width: float, optional + :param node_stroke_color: Color. When not set, stroke color is same as background color. Flourish type hint: color, defaults to None. + :type node_stroke_color: str, optional + :param node_highlight_stroke_color: Color (highlighted). When not set, stroke color is same as background color. Flourish type hint: color, defaults to None. + :type node_highlight_stroke_color: str, optional + :param points_advanced: Advanced point settings. Flourish type hint: boolean, defaults to None. + :type points_advanced: bool, optional + :param node_scale_type: Scale points relative to:. Choices: current, arbitrary. Flourish type hint: string, defaults to None. + :type node_scale_type: str, optional + :param max_node_value: Value. Values bigger than this maximum will have a radius equal to the maximum radius. Flourish type hint: number, defaults to None. + :type max_node_value: float, optional + :param auto_scale: Scale points down when not enough space. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type auto_scale: bool, optional + :param max_fullness: Max total point area. What percent of the space can the points fill before they are scaled down. Flourish type hint: number, defaults to None. + :type max_fullness: float, optional + :param label_size: Size. Flourish type hint: number, defaults to None. + :type label_size: float, optional + :param label_weight: Weight. Choices: bold, regular. Flourish type hint: string, defaults to None. + :type label_weight: str, optional + :param label_color_mode: Color mode. Choices: auto, fixed. Flourish type hint: string, defaults to None. + :type label_color_mode: str, optional + :param label_color: Color. Flourish type hint: color, defaults to None. + :type label_color: str, optional + :param label_show: Show. Choices: auto, all, neighbourhood, click, none. When to show node labels. If set to "Auto" behavior is dynamic depending on chart type and available space. Flourish type hint: string, defaults to None. + :type label_show: str, optional + :param link_color: Color. When not set, uses same color as main text. Flourish type hint: color, defaults to None. + :type link_color: str, optional + :param link_opacity: Opacity. How opaque the links between your points should be. Flourish type hint: number, defaults to None. + :type link_opacity: float, optional + :param constant_link_width: Width. Flourish type hint: number, defaults to None. + :type constant_link_width: float, optional + :param min_link_width: Minimum width. Any smaller links will be scaled up to the specified level. (Ignored if greater than the Maximum width setting.). Flourish type hint: number, defaults to None. + :type min_link_width: float, optional + :param max_link_width: Maximum width. Flourish type hint: number, defaults to None. + :type max_link_width: float, optional + :param max_link_value: Value. Values bigger than this maximum will have a width equal to the maximum width. Flourish type hint: number, defaults to None. + :type max_link_value: float, optional + :param links_advanced: Advanced link settings. Flourish type hint: boolean, defaults to None. + :type links_advanced: bool, optional + :param directional: Show arrows on links. Flourish type hint: boolean, defaults to None. + :type directional: bool, optional + :param link_scale_type: Scale links relative to:. Choices: current, arbitrary. Flourish type hint: string, defaults to None. + :type link_scale_type: str, optional + :param link_highlight_color: Color (highlighted). When not set, uses same color as main text. Flourish type hint: color, defaults to None. + :type link_highlight_color: str, optional + :param link_highlight_opacity: Opacity (highlighted). Flourish type hint: number, defaults to None. + :type link_highlight_opacity: float, optional + :param chart_popup_show_popups: Popups. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popups: bool, optional + :param chart_popup_is_custom: Popup contents. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_is_custom: bool, optional + :param chart_popup_custom_template: Popup content. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. Flourish type hint: text, defaults to None. + :type chart_popup_custom_template: Union[list, str], optional + :param chart_popup_show_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_pointer: bool, optional + :param chart_popup_show_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_shadow: bool, optional + :param chart_popup_style_popups: Custom styling. Flourish type hint: boolean, defaults to None. + :type chart_popup_style_popups: bool, optional + :param chart_popup_text_color: Text colour. Flourish type hint: color, defaults to None. + :type chart_popup_text_color: str, optional + :param chart_popup_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_popup_align: str, optional + :param chart_popup_text_size: Font size. Flourish type hint: number, defaults to None. + :type chart_popup_text_size: float, optional + :param chart_popup_fill_color: Fill colour. Flourish type hint: color, defaults to None. + :type chart_popup_fill_color: str, optional + :param chart_popup_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_opacity: float, optional + :param chart_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_padding: float, optional + :param chart_popup_border_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_border_radius: float, optional + :param chart_popup_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_popup_max_width: float, optional + :param popup_opacity: Popup opacity on overlap. When the popup is overlapping other points and links, the opacity of the popup will change so most of the chart is still visible. Flourish type hint: number, defaults to None. + :type popup_opacity: float, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param legend_position: Position. Choices: above, below. Flourish type hint: string, defaults to None. + :type legend_position: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param legend_interaction: When clicking a legend item. Choices: filter_and_layout, filter_in_position, none. Flourish type hint: string, defaults to None. + :type legend_interaction: str, optional + :param animate_simulation: Animate network simulation. Display the initial animation of the network. Flourish type hint: boolean, defaults to None. + :type animate_simulation: bool, optional + :param simulation_speed: Animation speed. The speed of the initial animation (in ms). Flourish type hint: number, defaults to None. + :type simulation_speed: float, optional + :param animate_transition: Animate layout transitions. Enable or disable layout transitions. Flourish type hint: boolean, defaults to None. + :type animate_transition: bool, optional + :param transition_scale: Transition duration. The duration multiplier for transition animations. Flourish type hint: number, defaults to None. + :type transition_scale: float, optional + :param many_body_strength: Repulsion between points. How strongly the points repulse each others. Known as many-body force. Measured in arbitrary units. Flourish type hint: number, defaults to None. + :type many_body_strength: float, optional + :param collision_strength: Collision-force strength. How strongly the points push away from each other when colliding. In arbitrary units. Flourish type hint: number, defaults to None. + :type collision_strength: float, optional + :param chart_number_localization_input_decimal_separator: Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to None. + :type chart_number_localization_input_decimal_separator: str, optional + :param chart_number_localization_output_separators: Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to None. + :type chart_number_localization_output_separators: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "popup": {}, + "legend_categorical": {}, + "legend_container": {}, + "localization": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_chart_type = ["regular", "radial"] + [None] + if chart_type not in list_chart_type: + raise ValueError(f"`chart_type` must be one of: ['regular', 'radial']") + elif chart_type in list_chart_type and chart_type is not None: + filtered_dict = { + k: v + for (k, v) in {"regular": "regular", "radial": "radial"}.items() + if chart_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_type"] = filtered_dict[chart_type] + + list_radial_sort = ["auto", "none", "clockwise", "counter_clockwise"] + [None] + if radial_sort not in list_radial_sort: + raise ValueError( + f"`radial_sort` must be one of: ['auto', 'none', 'clockwise', 'counter_clockwise']" + ) + elif radial_sort in list_radial_sort and radial_sort is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "none": "none", + "clockwise": "clockwise", + "counter_clockwise": "counter_clockwise", + }.items() + if radial_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["radial_sort"] = filtered_dict[radial_sort] + + list_radial_sort_primary = [ + "group", + "id", + "size", + "link_count", + "link_value", + ] + [None] + if radial_sort_primary not in list_radial_sort_primary: + raise ValueError( + f"`radial_sort_primary` must be one of: ['group', 'id', 'size', 'link_count', 'link_value']" + ) + elif ( + radial_sort_primary in list_radial_sort_primary + and radial_sort_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "group": "group", + "id": "id", + "size": "size", + "link_count": "link_count", + "link_value": "link_value", + }.items() + if radial_sort_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["radial_sort_primary"] = filtered_dict[ + radial_sort_primary + ] + + list_radial_sort_secondary = [ + "group", + "id", + "size", + "link_count", + "link_value", + ] + [None] + if radial_sort_secondary not in list_radial_sort_secondary: + raise ValueError( + f"`radial_sort_secondary` must be one of: ['group', 'id', 'size', 'link_count', 'link_value']" + ) + elif ( + radial_sort_secondary in list_radial_sort_secondary + and radial_sort_secondary is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "group": "group", + "id": "id", + "size": "size", + "link_count": "link_count", + "link_value": "link_value", + }.items() + if radial_sort_secondary in k + } + if len(filtered_dict) > 0: + self.state["state"]["radial_sort_secondary"] = filtered_dict[ + radial_sort_secondary + ] + + list_height_mode = ["auto", "fill_space", "aspect"] + [None] + if height_mode not in list_height_mode: + raise ValueError( + f"`height_mode` must be one of: ['auto', 'fill_space', 'aspect']" + ) + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "fill_space": "fill_space", + "aspect": "aspect", + }.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + self.state["state"]["facet_aspect"] = facet_aspect + self.state["state"]["facet_aspect_mobile"] = facet_aspect_mobile + self.state["state"]["facet_aspect_breakpoint"] = facet_aspect_breakpoint + self.state["state"]["ring_padding"] = ring_padding + self.state["state"]["ring_angle"] = ring_angle + self.state["state"]["fill_color"] = fill_color + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["node_scale_pack"] = node_scale_pack + self.state["state"]["constant_node_radius"] = constant_node_radius + self.state["state"]["min_node_radius"] = min_node_radius + self.state["state"]["max_node_radius"] = max_node_radius + self.state["state"]["point_opacity"] = point_opacity + self.state["state"]["fade_opacity"] = fade_opacity + self.state["state"]["image_opacity"] = image_opacity + self.state["state"]["node_stroke_width"] = node_stroke_width + self.state["state"]["node_stroke_color"] = node_stroke_color + self.state["state"]["node_highlight_stroke_color"] = node_highlight_stroke_color + self.state["state"]["points_advanced"] = points_advanced + + list_node_scale_type = ["current", "arbitrary"] + [None] + if node_scale_type not in list_node_scale_type: + raise ValueError( + f"`node_scale_type` must be one of: ['current', 'arbitrary']" + ) + elif node_scale_type in list_node_scale_type and node_scale_type is not None: + filtered_dict = { + k: v + for (k, v) in {"current": "current", "arbitrary": "arbitrary"}.items() + if node_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["node_scale_type"] = filtered_dict[node_scale_type] + self.state["state"]["max_node_value"] = max_node_value + + list_auto_scale = [True, False] + [None] + if auto_scale not in list_auto_scale: + raise ValueError(f"`auto_scale` must be one of: [True, False]") + elif auto_scale in list_auto_scale and auto_scale is not None: + filtered_dict = { + k: v for (k, v) in {True: True, False: False}.items() if auto_scale in k + } + if len(filtered_dict) > 0: + self.state["state"]["auto_scale"] = filtered_dict[auto_scale] + self.state["state"]["max_fullness"] = max_fullness + self.state["state"]["label_size"] = label_size + + list_label_weight = ["bold", "regular"] + [None] + if label_weight not in list_label_weight: + raise ValueError(f"`label_weight` must be one of: ['bold', 'regular']") + elif label_weight in list_label_weight and label_weight is not None: + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "regular": "regular"}.items() + if label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_weight"] = filtered_dict[label_weight] + + list_label_color_mode = ["auto", "fixed"] + [None] + if label_color_mode not in list_label_color_mode: + raise ValueError(f"`label_color_mode` must be one of: ['auto', 'fixed']") + elif label_color_mode in list_label_color_mode and label_color_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "fixed": "fixed"}.items() + if label_color_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_color_mode"] = filtered_dict[ + label_color_mode + ] + self.state["state"]["label_color"] = label_color + + list_label_show = ["auto", "all", "neighbourhood", "click", "none"] + [None] + if label_show not in list_label_show: + raise ValueError( + f"`label_show` must be one of: ['auto', 'all', 'neighbourhood', 'click', 'none']" + ) + elif label_show in list_label_show and label_show is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "all": "all", + "neighbourhood": "neighbourhood", + "click": "click", + "none": "none", + }.items() + if label_show in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_show"] = filtered_dict[label_show] + self.state["state"]["link_color"] = link_color + self.state["state"]["link_opacity"] = link_opacity + self.state["state"]["constant_link_width"] = constant_link_width + self.state["state"]["min_link_width"] = min_link_width + self.state["state"]["max_link_width"] = max_link_width + self.state["state"]["max_link_value"] = max_link_value + self.state["state"]["links_advanced"] = links_advanced + self.state["state"]["directional"] = directional + + list_link_scale_type = ["current", "arbitrary"] + [None] + if link_scale_type not in list_link_scale_type: + raise ValueError( + f"`link_scale_type` must be one of: ['current', 'arbitrary']" + ) + elif link_scale_type in list_link_scale_type and link_scale_type is not None: + filtered_dict = { + k: v + for (k, v) in {"current": "current", "arbitrary": "arbitrary"}.items() + if link_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["link_scale_type"] = filtered_dict[link_scale_type] + self.state["state"]["link_highlight_color"] = link_highlight_color + self.state["state"]["link_highlight_opacity"] = link_highlight_opacity + + list_chart_popup_show_popups = [True, False] + [None] + if chart_popup_show_popups not in list_chart_popup_show_popups: + raise ValueError(f"`chart_popup_show_popups` must be one of: [True, False]") + elif ( + chart_popup_show_popups in list_chart_popup_show_popups + and chart_popup_show_popups is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_popup_show_popups in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["show_popups"] = filtered_dict[ + chart_popup_show_popups + ] + + list_chart_popup_is_custom = [False, True] + [None] + if chart_popup_is_custom not in list_chart_popup_is_custom: + raise ValueError(f"`chart_popup_is_custom` must be one of: [False, True]") + elif ( + chart_popup_is_custom in list_chart_popup_is_custom + and chart_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["is_custom"] = filtered_dict[ + chart_popup_is_custom + ] + + if ( + chart_popup_custom_template is not None + and len(chart_popup_custom_template) > 1 + and isinstance(chart_popup_custom_template, list) + ): + self.state["state"]["popup"]["custom_template"] = " \n ".join( + chart_popup_custom_template + ) + else: + self.state["state"]["popup"][ + "custom_template" + ] = chart_popup_custom_template + + self.state["state"]["popup"]["show_pointer"] = chart_popup_show_pointer + self.state["state"]["popup"]["show_shadow"] = chart_popup_show_shadow + self.state["state"]["popup"]["style_popups"] = chart_popup_style_popups + self.state["state"]["popup"]["text_color"] = chart_popup_text_color + + list_chart_popup_align = ["left", "center", "right"] + [None] + if chart_popup_align not in list_chart_popup_align: + raise ValueError( + f"`chart_popup_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_popup_align in list_chart_popup_align + and chart_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["align"] = filtered_dict[chart_popup_align] + self.state["state"]["popup"]["text_size"] = chart_popup_text_size + self.state["state"]["popup"]["fill_color"] = chart_popup_fill_color + self.state["state"]["popup"]["opacity"] = chart_popup_opacity + self.state["state"]["popup"]["padding"] = chart_popup_padding + self.state["state"]["popup"]["border_radius"] = chart_popup_border_radius + self.state["state"]["popup"]["max_width"] = chart_popup_max_width + self.state["state"]["popup_opacity"] = popup_opacity + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_legend_position = ["above", "below"] + [None] + if legend_position not in list_legend_position: + raise ValueError(f"`legend_position` must be one of: ['above', 'below']") + elif legend_position in list_legend_position and legend_position is not None: + filtered_dict = { + k: v + for (k, v) in {"above": "above", "below": "below"}.items() + if legend_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_position"] = filtered_dict[legend_position] + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_legend_interaction = [ + "filter_and_layout", + "filter_in_position", + "none", + ] + [None] + if legend_interaction not in list_legend_interaction: + raise ValueError( + f"`legend_interaction` must be one of: ['filter_and_layout', 'filter_in_position', 'none']" + ) + elif ( + legend_interaction in list_legend_interaction + and legend_interaction is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "filter_and_layout": "filter_and_layout", + "filter_in_position": "filter_in_position", + "none": "none", + }.items() + if legend_interaction in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_interaction"] = filtered_dict[ + legend_interaction + ] + self.state["state"]["animate_simulation"] = animate_simulation + self.state["state"]["simulation_speed"] = simulation_speed + self.state["state"]["animate_transition"] = animate_transition + self.state["state"]["transition_scale"] = transition_scale + self.state["state"]["many_body_strength"] = many_body_strength + self.state["state"]["collision_strength"] = collision_strength + + list_chart_number_localization_input_decimal_separator = [".", ","] + [None] + if ( + chart_number_localization_input_decimal_separator + not in list_chart_number_localization_input_decimal_separator + ): + raise ValueError( + f"`chart_number_localization_input_decimal_separator` must be one of: ['.', ',']" + ) + elif ( + chart_number_localization_input_decimal_separator + in list_chart_number_localization_input_decimal_separator + and chart_number_localization_input_decimal_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in {".": ".", ",": ","}.items() + if chart_number_localization_input_decimal_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "input_decimal_separator" + ] = filtered_dict[chart_number_localization_input_decimal_separator] + + list_chart_number_localization_output_separators = [ + ",.", + ".,", + ".", + ",", + " .", + " ,", + ] + [None] + if ( + chart_number_localization_output_separators + not in list_chart_number_localization_output_separators + ): + raise ValueError( + f"`chart_number_localization_output_separators` must be one of: [',.', '.,', '.', ',', ' .', ' ,']" + ) + elif ( + chart_number_localization_output_separators + in list_chart_number_localization_output_separators + and chart_number_localization_output_separators is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ",.": ",.", + ".,": ".,", + ".": ".", + ",": ",", + " .": " .", + " ,": " ,", + }.items() + if chart_number_localization_output_separators in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "output_separators" + ] = filtered_dict[chart_number_localization_output_separators] + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_number_ticker_details( + self, + mode: str = None, + number_start: float = None, + number: float = None, + custom_template: Union[list, str] = None, + font_unit: str = None, + font_size: float = None, + text_color: str = None, + font_weight: str = None, + line_height: float = None, + duration: float = None, + easing: str = None, + chart_number_localization_input_decimal_separator: str = None, + chart_number_localization_output_separators: str = None, + value_format_prefix: str = None, + value_format_suffix: str = None, + value_format_n_dec: float = None, + value_format_advanced: bool = None, + value_format_negative_sign: str = None, + value_format_strip_zeros: bool = None, + value_format_strip_separator: bool = None, + value_format_transform_labels: bool = None, + value_format_transform: str = None, + value_format_multiply_divide_constant: float = None, + value_format_exponentiate_constant: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: number ticker. + + + :param mode: Choices: simple, custom. Flourish type hint: string, defaults to None. + :type mode: str, optional + :param number_start: Tick from. Flourish type hint: number, defaults to None. + :type number_start: float, optional + :param number: Tick to. Flourish type hint: number, defaults to None. + :type number: float, optional + :param custom_template: Text and `{{numbers}}`. Put numbers to tick in double braces, e.g. `{{1000}}` to tick from 0 to 1000, or `{{-1000/1000}}` to count from -1000 to 1000. You can also use markdown styling, e.g. **bold** and *italic* or custom HTMLFlourish type hint: text, defaults to None. + :type custom_template: Union[list, str], optional + :param font_unit: Font size mode. Choices: vw, rem. When set to Scale with page, the text will always take up the same proportion of the page width, on any page size (e.g. mobile or desktop) When set to Default the text will be scaled responsively in the same way as other text components, such as the header text. Flourish type hint: string, defaults to None. + :type font_unit: str, optional + :param font_size: Font size. Flourish type hint: number, defaults to None. + :type font_size: float, optional + :param text_color: Color. Flourish type hint: color, defaults to None. + :type text_color: str, optional + :param font_weight: Font weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type font_weight: str, optional + :param line_height: Line height. Flourish type hint: number, defaults to None. + :type line_height: float, optional + :param duration: Duration. How many seconds you want the animation to last for. Flourish type hint: number, defaults to None. + :type duration: float, optional + :param easing: Tick rate. Choices: constant, speed_up, slow_down, fast_slow_fast. Flourish type hint: string, defaults to None. + :type easing: str, optional + :param chart_number_localization_input_decimal_separator: Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to None. + :type chart_number_localization_input_decimal_separator: str, optional + :param chart_number_localization_output_separators: Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to None. + :type chart_number_localization_output_separators: str, optional + :param value_format_prefix: Prefix. Text to place in front of number. Flourish type hint: string, defaults to None. + :type value_format_prefix: str, optional + :param value_format_suffix: Suffix. Text to place after number. Flourish type hint: string, defaults to None. + :type value_format_suffix: str, optional + :param value_format_n_dec: Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type value_format_n_dec: float, optional + :param value_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type value_format_advanced: bool, optional + :param value_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type value_format_negative_sign: str, optional + :param value_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type value_format_strip_zeros: bool, optional + :param value_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type value_format_strip_separator: bool, optional + :param value_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type value_format_transform_labels: bool, optional + :param value_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type value_format_transform: str, optional + :param value_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type value_format_multiply_divide_constant: float, optional + :param value_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type value_format_exponentiate_constant: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "localization": {}, + "value_format": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_mode = ["simple", "custom"] + [None] + if mode not in list_mode: + raise ValueError(f"`mode` must be one of: ['simple', 'custom']") + elif mode in list_mode and mode is not None: + filtered_dict = { + k: v + for (k, v) in {"simple": "simple", "custom": "custom"}.items() + if mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["mode"] = filtered_dict[mode] + self.state["state"]["number_start"] = number_start + self.state["state"]["number"] = number + + if ( + custom_template is not None + and len(custom_template) > 1 + and isinstance(custom_template, list) + ): + self.state["state"]["custom_template"] = " \n ".join(custom_template) + else: + self.state["state"]["custom_template"] = custom_template + + list_font_unit = ["vw", "rem"] + [None] + if font_unit not in list_font_unit: + raise ValueError(f"`font_unit` must be one of: ['vw', 'rem']") + elif font_unit in list_font_unit and font_unit is not None: + filtered_dict = { + k: v for (k, v) in {"vw": "vw", "rem": "rem"}.items() if font_unit in k + } + if len(filtered_dict) > 0: + self.state["state"]["font_unit"] = filtered_dict[font_unit] + self.state["state"]["font_size"] = font_size + self.state["state"]["text_color"] = text_color + + list_font_weight = ["normal", "bold"] + [None] + if font_weight not in list_font_weight: + raise ValueError(f"`font_weight` must be one of: ['normal', 'bold']") + elif font_weight in list_font_weight and font_weight is not None: + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["font_weight"] = filtered_dict[font_weight] + self.state["state"]["line_height"] = line_height + self.state["state"]["duration"] = duration + + list_easing = ["constant", "speed_up", "slow_down", "fast_slow_fast"] + [None] + if easing not in list_easing: + raise ValueError( + f"`easing` must be one of: ['constant', 'speed_up', 'slow_down', 'fast_slow_fast']" + ) + elif easing in list_easing and easing is not None: + filtered_dict = { + k: v + for (k, v) in { + "constant": "constant", + "speed_up": "speed_up", + "slow_down": "slow_down", + "fast_slow_fast": "fast_slow_fast", + }.items() + if easing in k + } + if len(filtered_dict) > 0: + self.state["state"]["easing"] = filtered_dict[easing] + + list_chart_number_localization_input_decimal_separator = [".", ","] + [None] + if ( + chart_number_localization_input_decimal_separator + not in list_chart_number_localization_input_decimal_separator + ): + raise ValueError( + f"`chart_number_localization_input_decimal_separator` must be one of: ['.', ',']" + ) + elif ( + chart_number_localization_input_decimal_separator + in list_chart_number_localization_input_decimal_separator + and chart_number_localization_input_decimal_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in {".": ".", ",": ","}.items() + if chart_number_localization_input_decimal_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "input_decimal_separator" + ] = filtered_dict[chart_number_localization_input_decimal_separator] + + list_chart_number_localization_output_separators = [ + ",.", + ".,", + ".", + ",", + " .", + " ,", + ] + [None] + if ( + chart_number_localization_output_separators + not in list_chart_number_localization_output_separators + ): + raise ValueError( + f"`chart_number_localization_output_separators` must be one of: [',.', '.,', '.', ',', ' .', ' ,']" + ) + elif ( + chart_number_localization_output_separators + in list_chart_number_localization_output_separators + and chart_number_localization_output_separators is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ",.": ",.", + ".,": ".,", + ".": ".", + ",": ",", + " .": " .", + " ,": " ,", + }.items() + if chart_number_localization_output_separators in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "output_separators" + ] = filtered_dict[chart_number_localization_output_separators] + self.state["state"]["value_format"]["prefix"] = value_format_prefix + self.state["state"]["value_format"]["suffix"] = value_format_suffix + self.state["state"]["value_format"]["n_dec"] = value_format_n_dec + self.state["state"]["value_format"]["advanced"] = value_format_advanced + + list_value_format_negative_sign = ["-$nk", "$-nk", "($nk)", "$(n)k", "none"] + [ + None + ] + if value_format_negative_sign not in list_value_format_negative_sign: + raise ValueError( + f"`value_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + value_format_negative_sign in list_value_format_negative_sign + and value_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if value_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_format"]["negative_sign"] = filtered_dict[ + value_format_negative_sign + ] + self.state["state"]["value_format"]["strip_zeros"] = value_format_strip_zeros + self.state["state"]["value_format"][ + "strip_separator" + ] = value_format_strip_separator + self.state["state"]["value_format"][ + "transform_labels" + ] = value_format_transform_labels + + list_value_format_transform = ["multiply", "divide", "exponentiate"] + [None] + if value_format_transform not in list_value_format_transform: + raise ValueError( + f"`value_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + value_format_transform in list_value_format_transform + and value_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if value_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_format"]["transform"] = filtered_dict[ + value_format_transform + ] + self.state["state"]["value_format"][ + "multiply_divide_constant" + ] = value_format_multiply_divide_constant + self.state["state"]["value_format"][ + "exponentiate_constant" + ] = value_format_exponentiate_constant + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_parliament_chart_details( + self, + num_of_seats: float = None, + hemicycle_arc: float = None, + circle_inner: float = None, + manual_row_count: bool = None, + num_of_rows: float = None, + use_hover_animation: bool = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + unassigned_color: str = None, + count_font_size: float = None, + count_weight: str = None, + party_font_size: float = None, + party_weight: str = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + legend_hide_empty_parties: bool = None, + show_table: bool = None, + gain_color: str = None, + loss_color: str = None, + default_text_color: str = None, + header_weight: str = None, + margin_table: float = None, + show_seat_change: str = None, + seat_change_before: str = None, + seat_change_after: str = None, + seat_change_label: str = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + majority_threshold_line_enabled: bool = None, + majority_threshold_line_content: str = None, + majority_threshold_line_text_color: str = None, + majority_threshold_line_dashoffset: str = None, + majority_threshold_line_width: float = None, + majority_threshold_line_color: str = None, + animation_duration: float = None, + animation_stagger: float = None, + animate_on_load: bool = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + chart_filter_controls_container_alignment: str = None, + chart_filter_controls_container_controls_spacing: float = None, + chart_number_localization_input_decimal_separator: str = None, + chart_number_localization_output_separators: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: parliament chart. + + + :param num_of_seats: Number of seats. This number is ignored if the value is lower than the actual number of seats in your data. Flourish type hint: number, defaults to None. + :type num_of_seats: float, optional + :param hemicycle_arc: Size of arc. In degrees. Flourish type hint: number, defaults to None. + :type hemicycle_arc: float, optional + :param circle_inner: Inner space. As a % of the circle. Flourish type hint: number, defaults to None. + :type circle_inner: float, optional + :param manual_row_count: Number of rows. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type manual_row_count: bool, optional + :param num_of_rows: Rows. Flourish type hint: number, defaults to None. + :type num_of_rows: float, optional + :param use_hover_animation: Highlight parties on hover. Flourish type hint: boolean, defaults to None. + :type use_hover_animation: bool, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param unassigned_color: Unassigned outline color. Flourish type hint: color, defaults to None. + :type unassigned_color: str, optional + :param count_font_size: Size. If the font size means that the seat count is too large to fit within the parliament, the text will be automatically scaled to fit. Flourish type hint: number, defaults to None. + :type count_font_size: float, optional + :param count_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type count_weight: str, optional + :param party_font_size: Size. If the font size means that the party name is too large to fit within the parliament, the text will be automatically scaled to fit. Flourish type hint: number, defaults to None. + :type party_font_size: float, optional + :param party_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type party_weight: str, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param legend_hide_empty_parties: Dont include parties that dont have any seats. Flourish type hint: boolean, defaults to None. + :type legend_hide_empty_parties: bool, optional + :param show_table: Show table. Flourish type hint: boolean, defaults to None. + :type show_table: bool, optional + :param gain_color: Gain color. Flourish type hint: color, defaults to None. + :type gain_color: str, optional + :param loss_color: Loss color. Flourish type hint: color, defaults to None. + :type loss_color: str, optional + :param default_text_color: Default color. Flourish type hint: color, defaults to None. + :type default_text_color: str, optional + :param header_weight: Header text. Choices: bold, normal, italic. Flourish type hint: string, defaults to None. + :type header_weight: str, optional + :param margin_table: Margin. Flourish type hint: number, defaults to None. + :type margin_table: float, optional + :param show_seat_change: Choices: off, auto, custom. This adds a new column that shows the change between 2 columns. "Auto" will compare the last 2 columns in your data "Custom" will allow you to handpick 2 columns to compare. Flourish type hint: string, defaults to None. + :type show_seat_change: str, optional + :param seat_change_before: Seat change before. Add the name of the column you want to compare with. Flourish type hint: string, defaults to None. + :type seat_change_before: str, optional + :param seat_change_after: Seat change after. Add the name of the column you want to compare with. Flourish type hint: string, defaults to None. + :type seat_change_after: str, optional + :param seat_change_label: Column name. Flourish type hint: string, defaults to None. + :type seat_change_label: str, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param majority_threshold_line_enabled: Show a line for the majority threshold. Draws a line at 50%. Flourish type hint: boolean, defaults to None. + :type majority_threshold_line_enabled: bool, optional + :param majority_threshold_line_content: Text. Flourish type hint: string, defaults to None. + :type majority_threshold_line_content: str, optional + :param majority_threshold_line_text_color: Color. Flourish type hint: color, defaults to None. + :type majority_threshold_line_text_color: str, optional + :param majority_threshold_line_dashoffset: Dash width and offset. In pixels, eg. 2,2. Flourish type hint: string, defaults to None. + :type majority_threshold_line_dashoffset: str, optional + :param majority_threshold_line_width: Thickness. In pixels. Flourish type hint: number, defaults to None. + :type majority_threshold_line_width: float, optional + :param majority_threshold_line_color: Color. Flourish type hint: color, defaults to None. + :type majority_threshold_line_color: str, optional + :param animation_duration: Animation duration. How long the seats take to "flip" when changing party, in seconds. Flourish type hint: number, defaults to None. + :type animation_duration: float, optional + :param animation_stagger: Animation spread. How many seconds to spread the seat animations across. Flourish type hint: number, defaults to None. + :type animation_stagger: float, optional + :param animate_on_load: Animate on load. Whether to animate the seats when the visualisations first loads. Flourish type hint: boolean, defaults to None. + :type animate_on_load: bool, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. The controls show up if youve selected multiple value columns. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param chart_filter_controls_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_filter_controls_container_alignment: str, optional + :param chart_filter_controls_container_controls_spacing: Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to None. + :type chart_filter_controls_container_controls_spacing: float, optional + :param chart_number_localization_input_decimal_separator: Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to None. + :type chart_number_localization_input_decimal_separator: str, optional + :param chart_number_localization_output_separators: Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to None. + :type chart_number_localization_output_separators: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "legend_categorical": {}, + "legend_container": {}, + "seat_format": {}, + "controls": {}, + "controls_style": {}, + "button_style": {}, + "dropdown_style": {}, + "slider_style": {}, + "controls_container": {}, + "localization": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + self.state["state"]["num_of_seats"] = num_of_seats + self.state["state"]["hemicycle_arc"] = hemicycle_arc + self.state["state"]["circle_inner"] = circle_inner + + list_manual_row_count = [False, True] + [None] + if manual_row_count not in list_manual_row_count: + raise ValueError(f"`manual_row_count` must be one of: [False, True]") + elif manual_row_count in list_manual_row_count and manual_row_count is not None: + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if manual_row_count in k + } + if len(filtered_dict) > 0: + self.state["state"]["manual_row_count"] = filtered_dict[ + manual_row_count + ] + self.state["state"]["num_of_rows"] = num_of_rows + self.state["state"]["use_hover_animation"] = use_hover_animation + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["unassigned_color"] = unassigned_color + self.state["state"]["count_font_size"] = count_font_size + + list_count_weight = ["normal", "bold"] + [None] + if count_weight not in list_count_weight: + raise ValueError(f"`count_weight` must be one of: ['normal', 'bold']") + elif count_weight in list_count_weight and count_weight is not None: + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if count_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["count_weight"] = filtered_dict[count_weight] + self.state["state"]["party_font_size"] = party_font_size + + list_party_weight = ["normal", "bold"] + [None] + if party_weight not in list_party_weight: + raise ValueError(f"`party_weight` must be one of: ['normal', 'bold']") + elif party_weight in list_party_weight and party_weight is not None: + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if party_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["party_weight"] = filtered_dict[party_weight] + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + self.state["state"]["legend_hide_empty_parties"] = legend_hide_empty_parties + self.state["state"]["show_table"] = show_table + self.state["state"]["gain_color"] = gain_color + self.state["state"]["loss_color"] = loss_color + self.state["state"]["default_text_color"] = default_text_color + + list_header_weight = ["bold", "normal", "italic"] + [None] + if header_weight not in list_header_weight: + raise ValueError( + f"`header_weight` must be one of: ['bold', 'normal', 'italic']" + ) + elif header_weight in list_header_weight and header_weight is not None: + filtered_dict = { + k: v + for (k, v) in { + "bold": "bold", + "normal": "normal", + "italic": "italic", + }.items() + if header_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["header_weight"] = filtered_dict[header_weight] + self.state["state"]["margin_table"] = margin_table + + list_show_seat_change = ["off", "auto", "custom"] + [None] + if show_seat_change not in list_show_seat_change: + raise ValueError( + f"`show_seat_change` must be one of: ['off', 'auto', 'custom']" + ) + elif show_seat_change in list_show_seat_change and show_seat_change is not None: + filtered_dict = { + k: v + for (k, v) in {"off": "off", "auto": "auto", "custom": "custom"}.items() + if show_seat_change in k + } + if len(filtered_dict) > 0: + self.state["state"]["show_seat_change"] = filtered_dict[ + show_seat_change + ] + self.state["state"]["seat_change_before"] = seat_change_before + self.state["state"]["seat_change_after"] = seat_change_after + self.state["state"]["seat_change_label"] = seat_change_label + self.state["state"]["seat_format"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["seat_format"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["seat_format"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["seat_format"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["seat_format"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["seat_format"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["seat_format"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["seat_format"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["seat_format"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["seat_format"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["seat_format"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + self.state["state"][ + "majority_threshold_line_enabled" + ] = majority_threshold_line_enabled + self.state["state"][ + "majority_threshold_line_content" + ] = majority_threshold_line_content + self.state["state"][ + "majority_threshold_line_text_color" + ] = majority_threshold_line_text_color + self.state["state"][ + "majority_threshold_line_dashoffset" + ] = majority_threshold_line_dashoffset + self.state["state"][ + "majority_threshold_line_width" + ] = majority_threshold_line_width + self.state["state"][ + "majority_threshold_line_color" + ] = majority_threshold_line_color + self.state["state"]["animation_duration"] = animation_duration + self.state["state"]["animation_stagger"] = animation_stagger + self.state["state"]["animate_on_load"] = animate_on_load + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["controls"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["controls"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["controls"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["dropdown_width_mode"] = filtered_dict[ + chart_filter_controls_dropdown_width_mode + ] + self.state["state"]["controls"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["controls"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["controls"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["controls"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["controls"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["controls"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["slider_style"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["slider_style"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["slider_style"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["slider_style"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["slider_style"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["slider_style"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["slider_style"][ + "play_button" + ] = chart_slider_control_style_play_button + + list_chart_filter_controls_container_alignment = ["start", "center", "end"] + [ + None + ] + if ( + chart_filter_controls_container_alignment + not in list_chart_filter_controls_container_alignment + ): + raise ValueError( + f"`chart_filter_controls_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_filter_controls_container_alignment + in list_chart_filter_controls_container_alignment + and chart_filter_controls_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_filter_controls_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_container"]["alignment"] = filtered_dict[ + chart_filter_controls_container_alignment + ] + self.state["state"]["controls_container"][ + "controls_spacing" + ] = chart_filter_controls_container_controls_spacing + + list_chart_number_localization_input_decimal_separator = [".", ","] + [None] + if ( + chart_number_localization_input_decimal_separator + not in list_chart_number_localization_input_decimal_separator + ): + raise ValueError( + f"`chart_number_localization_input_decimal_separator` must be one of: ['.', ',']" + ) + elif ( + chart_number_localization_input_decimal_separator + in list_chart_number_localization_input_decimal_separator + and chart_number_localization_input_decimal_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in {".": ".", ",": ","}.items() + if chart_number_localization_input_decimal_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "input_decimal_separator" + ] = filtered_dict[chart_number_localization_input_decimal_separator] + + list_chart_number_localization_output_separators = [ + ",.", + ".,", + ".", + ",", + " .", + " ,", + ] + [None] + if ( + chart_number_localization_output_separators + not in list_chart_number_localization_output_separators + ): + raise ValueError( + f"`chart_number_localization_output_separators` must be one of: [',.', '.,', '.', ',', ' .', ' ,']" + ) + elif ( + chart_number_localization_output_separators + in list_chart_number_localization_output_separators + and chart_number_localization_output_separators is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ",.": ",.", + ".,": ".,", + ".": ".", + ",": ",", + " .": " .", + " ,": " ,", + }.items() + if chart_number_localization_output_separators in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "output_separators" + ] = filtered_dict[chart_number_localization_output_separators] + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_photo_slider_details( + self, + mode: str = None, + spotlight_size: float = None, + spotlight_blur: float = None, + spotlight_speed: float = None, + photo_1_big: str = None, + has_photo_1_small: bool = None, + photo_1_small: str = None, + photo_2_big: str = None, + has_photo_2_small: bool = None, + photo_2_small: str = None, + slider_radius: float = None, + slider_fill_type: str = None, + slider_fill_image: str = None, + slider_fill_overlay: str = None, + slider_fill_standalone: str = None, + slider_line_thickness: float = None, + slider_line_color: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: photo slider. + + + :param mode: Before/after mode. Choices: slide, fade, spotlight. Flourish type hint: string, defaults to None. + :type mode: str, optional + :param spotlight_size: Spotlight size. Flourish type hint: number, defaults to None. + :type spotlight_size: float, optional + :param spotlight_blur: Spotlight blur. Flourish type hint: number, defaults to None. + :type spotlight_blur: float, optional + :param spotlight_speed: Spotlight animation. Time it takes to animate from one spotlight position to another in the story player Flourish type hint: number, defaults to None. + :type spotlight_speed: float, optional + :param photo_1_big: Flourish type hint: url, defaults to None. + :type photo_1_big: str, optional + :param has_photo_1_small: Add smaller version for mobile. (Optional) Mobile versions will be loaded quicker on smaller screens. Flourish type hint: boolean, defaults to None. + :type has_photo_1_small: bool, optional + :param photo_1_small: Photo 1 (mobile version). This picture should be roughly 500px wide. Flourish type hint: url, defaults to None. + :type photo_1_small: str, optional + :param photo_2_big: Flourish type hint: url, defaults to None. + :type photo_2_big: str, optional + :param has_photo_2_small: Add smaller version for mobile. (Optional) Mobile versions will be loaded quicker on smaller screens. Flourish type hint: boolean, defaults to None. + :type has_photo_2_small: bool, optional + :param photo_2_small: Photo 2 (mobile version). This picture should be roughly 500px wide. Flourish type hint: url, defaults to None. + :type photo_2_small: str, optional + :param slider_radius: Size. Flourish type hint: number, defaults to None. + :type slider_radius: float, optional + :param slider_fill_type: Type. Choices: color, image. Flourish type hint: string, defaults to None. + :type slider_fill_type: str, optional + :param slider_fill_image: Image. Flourish type hint: url, defaults to None. + :type slider_fill_image: str, optional + :param slider_fill_overlay: Fill. Flourish type hint: color, defaults to None. + :type slider_fill_overlay: str, optional + :param slider_fill_standalone: Fill (outside picture). Flourish type hint: color, defaults to None. + :type slider_fill_standalone: str, optional + :param slider_line_thickness: Slider line thickness. Flourish type hint: number, defaults to None. + :type slider_line_thickness: float, optional + :param slider_line_color: Slider line color. Flourish type hint: color, defaults to None. + :type slider_line_color: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_mode = ["slide", "fade", "spotlight"] + [None] + if mode not in list_mode: + raise ValueError(f"`mode` must be one of: ['slide', 'fade', 'spotlight']") + elif mode in list_mode and mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "slide": "slide", + "fade": "fade", + "spotlight": "spotlight", + }.items() + if mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["mode"] = filtered_dict[mode] + self.state["state"]["spotlight_size"] = spotlight_size + self.state["state"]["spotlight_blur"] = spotlight_blur + self.state["state"]["spotlight_speed"] = spotlight_speed + self.state["state"]["photo_1_big"] = photo_1_big + self.state["state"]["has_photo_1_small"] = has_photo_1_small + self.state["state"]["photo_1_small"] = photo_1_small + self.state["state"]["photo_2_big"] = photo_2_big + self.state["state"]["has_photo_2_small"] = has_photo_2_small + self.state["state"]["photo_2_small"] = photo_2_small + self.state["state"]["slider_radius"] = slider_radius + + list_slider_fill_type = ["color", "image"] + [None] + if slider_fill_type not in list_slider_fill_type: + raise ValueError(f"`slider_fill_type` must be one of: ['color', 'image']") + elif slider_fill_type in list_slider_fill_type and slider_fill_type is not None: + filtered_dict = { + k: v + for (k, v) in {"color": "color", "image": "image"}.items() + if slider_fill_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["slider_fill_type"] = filtered_dict[ + slider_fill_type + ] + self.state["state"]["slider_fill_image"] = slider_fill_image + self.state["state"]["slider_fill_overlay"] = slider_fill_overlay + self.state["state"]["slider_fill_standalone"] = slider_fill_standalone + self.state["state"]["slider_line_thickness"] = slider_line_thickness + self.state["state"]["slider_line_color"] = slider_line_color + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_pictogram_details( + self, + bar_orientation: str = None, + flip_bars: bool = None, + bar_padding: float = None, + plot_aspect_ratio: float = None, + plot_aspect_ratio_mobile: float = None, + plot_aspect_ratio_breakpoint: float = None, + icons: str = None, + icon_padding: float = None, + auto_icon_value: bool = None, + icon_value: float = None, + icon_color: str = None, + icon_style: str = None, + icon_stroke_thickness: float = None, + use_filler_icons: bool = None, + filler_icon_color: str = None, + max_bar_value: float = None, + fill_final_row: bool = None, + filler_icons: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + show_bar_labels: bool = None, + bar_label_size: float = None, + bar_label_color: str = None, + bar_label_weight: str = None, + chart_x_axis_axis_position: str = None, + chart_x_axis_y_axis_position: str = None, + chart_x_axis_numeric_scale_type: str = None, + chart_x_axis_linear_min: float = None, + chart_x_axis_linear_max: float = None, + chart_x_axis_log_min: float = None, + chart_x_axis_log_max: float = None, + chart_x_axis_datetime_min: str = None, + chart_x_axis_datetime_max: str = None, + chart_x_axis_flip: bool = None, + chart_x_axis_show_scale_settings: bool = None, + chart_x_axis_nice: bool = None, + chart_x_axis_zero_axis: str = None, + chart_x_axis_title_mode: str = None, + chart_x_axis_title: str = None, + chart_x_axis_title_styling: bool = None, + chart_x_axis_title_weight: str = None, + chart_x_axis_title_color: str = None, + chart_x_axis_title_size: float = None, + chart_x_axis_title_padding: float = None, + chart_x_axis_tick_label_position: str = None, + chart_x_axis_tick_label_styling: bool = None, + chart_x_axis_tick_label_size: float = None, + chart_x_axis_tick_label_color: str = None, + chart_x_axis_tick_padding: float = None, + chart_x_axis_tick_label_angle: str = None, + chart_x_axis_tick_label_weight: str = None, + chart_x_axis_tick_label_max_lines: float = None, + chart_x_axis_tick_label_line_height: float = None, + chart_x_axis_tick_label_space_mode: str = None, + chart_x_axis_tick_label_space: float = None, + chart_x_axis_tick_mode: str = None, + chart_x_axis_tick_number: float = None, + chart_x_axis_tick_custom: Union[list, str] = None, + chart_x_axis_line_and_tick_color: str = None, + chart_x_axis_line_and_tick_width: float = None, + chart_x_axis_tick_length: float = None, + chart_x_axis_tick_side: str = None, + chart_x_axis_line_visible: bool = None, + chart_x_axis_edge_padding: float = None, + chart_x_axis_gridlines_visible: bool = None, + chart_x_axis_gridlines_styling: bool = None, + chart_x_axis_gridline_color: str = None, + chart_x_axis_gridline_style: str = None, + chart_x_axis_gridline_width: float = None, + chart_x_axis_gridline_category_dividers: bool = None, + chart_x_axis_gridline_category_dividers_extend: bool = None, + chart_number_localization_input_decimal_separator: str = None, + chart_number_localization_output_separators: str = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_value_legend_show_legend: bool = None, + chart_value_legend_title_mode: str = None, + chart_value_legend_title: str = None, + chart_value_legend_swatch_width: float = None, + chart_value_legend_swatch_height: float = None, + chart_value_legend_swatch_radius: float = None, + chart_value_legend_legend_items_padding: float = None, + chart_value_legend_swatch_outline: bool = None, + chart_value_legend_swatch_outline_color: str = None, + chart_value_legend_order_override: Union[list, str] = None, + chart_value_legend_icon_height: float = None, + chart_value_legend_icon_color: str = None, + chart_value_legend_max_width: float = None, + chart_value_legend_orientation: str = None, + value_legend_icon: str = None, + chart_icon_legend_show_legend: bool = None, + chart_icon_legend_title_mode: str = None, + chart_icon_legend_title: str = None, + chart_icon_legend_swatch_width: float = None, + chart_icon_legend_swatch_height: float = None, + chart_icon_legend_swatch_radius: float = None, + chart_icon_legend_legend_items_padding: float = None, + chart_icon_legend_swatch_outline: bool = None, + chart_icon_legend_swatch_outline_color: str = None, + chart_icon_legend_order_override: Union[list, str] = None, + chart_icon_legend_icon_height: float = None, + chart_icon_legend_icon_color: str = None, + chart_icon_legend_max_width: float = None, + chart_icon_legend_orientation: str = None, + chart_color_legend_show_legend: bool = None, + chart_color_legend_title_mode: str = None, + chart_color_legend_title: str = None, + chart_color_legend_swatch_width: float = None, + chart_color_legend_swatch_height: float = None, + chart_color_legend_swatch_radius: float = None, + chart_color_legend_legend_items_padding: float = None, + chart_color_legend_swatch_outline: bool = None, + chart_color_legend_swatch_outline_color: str = None, + chart_color_legend_order_override: Union[list, str] = None, + chart_color_legend_icon_height: float = None, + chart_color_legend_icon_color: str = None, + chart_color_legend_max_width: float = None, + chart_color_legend_orientation: str = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + value_control_visibility: str = None, + chart_value_filter_controls_control_type: str = None, + chart_value_filter_controls_control_styles: bool = None, + chart_value_filter_controls_control_title: str = None, + chart_value_filter_controls_button_group: bool = None, + chart_value_filter_controls_button_group_width_mode: str = None, + chart_value_filter_controls_button_group_width_fixed: float = None, + chart_value_filter_controls_dropdown_width_mode: str = None, + chart_value_filter_controls_dropdown_width_fixed: float = None, + chart_value_filter_controls_slider_width: float = None, + chart_value_filter_controls_slider_max_label_width: float = None, + chart_value_filter_controls_slider_step_time: float = None, + chart_value_filter_controls_slider_loop: bool = None, + chart_value_filter_controls_slider_restart_pause: float = None, + chart_value_filter_controls_sort: bool = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: pictogram. + + + :param bar_orientation: Bar orientation. Choices: vertical, horizontal. Defines the orientation of the bars (vertical or horizontal). Flourish type hint: string, defaults to None. + :type bar_orientation: str, optional + :param flip_bars: Flip bars. Flip the bars so they point in the opposite direction. Flourish type hint: boolean, defaults to None. + :type flip_bars: bool, optional + :param bar_padding: Bar padding (%). Padding surrounding bars (as a percentage of bar width). Flourish type hint: number, defaults to None. + :type bar_padding: float, optional + :param plot_aspect_ratio: Aspect (desktop). The aspect ratio of the pictogram plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. This only applies when embedding using a script (i.e., not AMP or iframe ). Flourish type hint: number, defaults to None. + :type plot_aspect_ratio: float, optional + :param plot_aspect_ratio_mobile: Aspect (mobile). The aspect ratio of the pictogram plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. This only applies when embedding using a script (i.e., not AMP or iframe ). Flourish type hint: number, defaults to None. + :type plot_aspect_ratio_mobile: float, optional + :param plot_aspect_ratio_breakpoint: Breakpoint. The screen width at which mobile mode ends and desktop begins. This only applies when embedding using a script (i.e., not AMP or iframe ). Flourish type hint: number, defaults to None. + :type plot_aspect_ratio_breakpoint: float, optional + :param icons: Icons. Choices: binding, user, female, male, baby, child, wheelchair, angry, frown, meh, smile, smile-beam, thumbs-up, thumbs-down, hands-helping, hand-rock, hand-peace, dollar-sign, euro-sign, money-bill, money-bill-wave, pound-sign, coins, shopping-bag, shopping-cart, circle, square, star, heart, comment, cat, dog, dove, bus, car, biking, running, plane, suitcase, pizza-slice, ice-cream, coffee, wine-glass-alt, building, home, store, industry, database, laptop, microchip, phone, mobile-alt, tv, clock, atom, award, music, leaf, lightbulb, sun, wrench, airbnb, amazon, android, apple, bitcoin, facebook, google, linux, microsoft, twitter, windows, youtube. Use your own icons using icon bindings, or choose a built-in icon Flourish type hint: string, defaults to None. + :type icons: str, optional + :param icon_padding: Icon padding (%). Padding surrounding icons (as a percentage of the icon size). Flourish type hint: number, defaults to None. + :type icon_padding: float, optional + :param auto_icon_value: Auto icon value. Automatically calculate a sensible value for each icon. Flourish type hint: boolean, defaults to None. + :type auto_icon_value: bool, optional + :param icon_value: Icon value. The value that each icon represents. Flourish type hint: number, defaults to None. + :type icon_value: float, optional + :param icon_color: Icon color. The color of the icons. Flourish type hint: color, defaults to None. + :type icon_color: str, optional + :param icon_style: Icon style. Choices: solid, outline. The style (solid or outline) of the icons. Flourish type hint: string, defaults to None. + :type icon_style: str, optional + :param icon_stroke_thickness: Icon outline thickness (%). The outline thickness (as a percentage of the icon size). Flourish type hint: number, defaults to None. + :type icon_stroke_thickness: float, optional + :param use_filler_icons: Use filler icons. Fill empty space with icons Flourish type hint: boolean, defaults to None. + :type use_filler_icons: bool, optional + :param filler_icon_color: Filler icon color. Color of filler icons. Flourish type hint: color, defaults to None. + :type filler_icon_color: str, optional + :param max_bar_value: Maximum bar value. (Optional) Maximum bar value (the remaining bar space will be filled with filler icons ). A value less than the largest bar value is disregarded. Flourish type hint: number, defaults to None. + :type max_bar_value: float, optional + :param fill_final_row: Fill final row. Fill the final row of icons with filler icons (so that a grid of icons is formed). Flourish type hint: boolean, defaults to None. + :type fill_final_row: bool, optional + :param filler_icons: Filler icon. Choices: auto, user, female, male, baby, child, wheelchair, angry, frown, meh, smile, smile-beam, thumbs-up, thumbs-down, hands-helping, hand-rock, hand-peace, dollar-sign, euro-sign, money-bill, money-bill-wave, pound-sign, coins, shopping-bag, shopping-cart, circle, square, star, heart, comment, cat, dog, dove, bus, car, biking, running, plane, suitcase, pizza-slice, ice-cream, coffee, wine-glass-alt, building, home, store, industry, database, laptop, microchip, phone, mobile-alt, tv, clock, atom, award, music, leaf, lightbulb, sun, wrench, airbnb, amazon, android, apple, bitcoin, facebook, google, linux, microsoft, twitter, windows, youtube. Icon used to fill remaining space. Flourish type hint: string, defaults to None. + :type filler_icons: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param show_bar_labels: Show bar labels. Flourish type hint: boolean, defaults to None. + :type show_bar_labels: bool, optional + :param bar_label_size: Size. Bar label size in rems (relative to the root font size). Flourish type hint: number, defaults to None. + :type bar_label_size: float, optional + :param bar_label_color: Color. Bar label color. Flourish type hint: color, defaults to None. + :type bar_label_color: str, optional + :param bar_label_weight: Weight. Choices: normal, bold. Bar label font weight. Flourish type hint: string, defaults to None. + :type bar_label_weight: str, optional + :param chart_x_axis_axis_position: Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to None. + :type chart_x_axis_axis_position: str, optional + :param chart_x_axis_y_axis_position: Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to None. + :type chart_x_axis_y_axis_position: str, optional + :param chart_x_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_x_axis_numeric_scale_type: str, optional + :param chart_x_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_min: float, optional + :param chart_x_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_max: float, optional + :param chart_x_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_min: float, optional + :param chart_x_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_max: float, optional + :param chart_x_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_min: str, optional + :param chart_x_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_max: str, optional + :param chart_x_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_flip: bool, optional + :param chart_x_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_show_scale_settings: bool, optional + :param chart_x_axis_nice: Round min/max. Choices: True, False. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_nice: bool, optional + :param chart_x_axis_zero_axis: Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to None. + :type chart_x_axis_zero_axis: str, optional + :param chart_x_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_mode: str, optional + :param chart_x_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_x_axis_title: str, optional + :param chart_x_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_title_styling: bool, optional + :param chart_x_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_weight: str, optional + :param chart_x_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_title_color: str, optional + :param chart_x_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_size: float, optional + :param chart_x_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_padding: float, optional + :param chart_x_axis_tick_label_position: Position. Choices: default, left, right. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_position: str, optional + :param chart_x_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_tick_label_styling: bool, optional + :param chart_x_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_size: float, optional + :param chart_x_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_tick_label_color: str, optional + :param chart_x_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_padding: float, optional + :param chart_x_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_angle: str, optional + :param chart_x_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_weight: str, optional + :param chart_x_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_max_lines: float, optional + :param chart_x_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_line_height: float, optional + :param chart_x_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_space_mode: str, optional + :param chart_x_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_space: float, optional + :param chart_x_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_mode: str, optional + :param chart_x_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_number: float, optional + :param chart_x_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_x_axis_tick_custom: Union[list, str], optional + :param chart_x_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_x_axis_line_and_tick_color: str, optional + :param chart_x_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_x_axis_line_and_tick_width: float, optional + :param chart_x_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_length: float, optional + :param chart_x_axis_tick_side: Tick side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_side: str, optional + :param chart_x_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_line_visible: bool, optional + :param chart_x_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_x_axis_edge_padding: float, optional + :param chart_x_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_visible: bool, optional + :param chart_x_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_styling: bool, optional + :param chart_x_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_gridline_color: str, optional + :param chart_x_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_x_axis_gridline_style: str, optional + :param chart_x_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_x_axis_gridline_width: float, optional + :param chart_x_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers: bool, optional + :param chart_x_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers_extend: bool, optional + :param chart_number_localization_input_decimal_separator: Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to None. + :type chart_number_localization_input_decimal_separator: str, optional + :param chart_number_localization_output_separators: Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to None. + :type chart_number_localization_output_separators: str, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_value_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_value_legend_show_legend: bool, optional + :param chart_value_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_value_legend_title_mode: str, optional + :param chart_value_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_value_legend_title: str, optional + :param chart_value_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_value_legend_swatch_width: float, optional + :param chart_value_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_value_legend_swatch_height: float, optional + :param chart_value_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_value_legend_swatch_radius: float, optional + :param chart_value_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_value_legend_legend_items_padding: float, optional + :param chart_value_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_value_legend_swatch_outline: bool, optional + :param chart_value_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_value_legend_swatch_outline_color: str, optional + :param chart_value_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_value_legend_order_override: Union[list, str], optional + :param chart_value_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_value_legend_icon_height: float, optional + :param chart_value_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_value_legend_icon_color: str, optional + :param chart_value_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_value_legend_max_width: float, optional + :param chart_value_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_value_legend_orientation: str, optional + :param value_legend_icon: Icon. Choices: auto, user, female, male, baby, child, wheelchair, angry, frown, meh, smile, smile-beam, thumbs-up, thumbs-down, hands-helping, hand-rock, hand-peace, dollar-sign, euro-sign, money-bill, money-bill-wave, pound-sign, coins, shopping-bag, shopping-cart, circle, square, star, heart, comment, cat, dog, dove, bus, car, biking, running, plane, suitcase, pizza-slice, ice-cream, coffee, wine-glass-alt, building, home, store, industry, database, laptop, microchip, phone, mobile-alt, tv, clock, atom, award, music, leaf, lightbulb, sun, wrench, airbnb, amazon, android, apple, bitcoin, facebook, google, linux, microsoft, twitter, windows, youtube. Icon used in legend. Flourish type hint: string, defaults to None. + :type value_legend_icon: str, optional + :param chart_icon_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_icon_legend_show_legend: bool, optional + :param chart_icon_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_icon_legend_title_mode: str, optional + :param chart_icon_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_icon_legend_title: str, optional + :param chart_icon_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_icon_legend_swatch_width: float, optional + :param chart_icon_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_icon_legend_swatch_height: float, optional + :param chart_icon_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_icon_legend_swatch_radius: float, optional + :param chart_icon_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_icon_legend_legend_items_padding: float, optional + :param chart_icon_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_icon_legend_swatch_outline: bool, optional + :param chart_icon_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_icon_legend_swatch_outline_color: str, optional + :param chart_icon_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_icon_legend_order_override: Union[list, str], optional + :param chart_icon_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_icon_legend_icon_height: float, optional + :param chart_icon_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_icon_legend_icon_color: str, optional + :param chart_icon_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_icon_legend_max_width: float, optional + :param chart_icon_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_icon_legend_orientation: str, optional + :param chart_color_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_color_legend_show_legend: bool, optional + :param chart_color_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_color_legend_title_mode: str, optional + :param chart_color_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_color_legend_title: str, optional + :param chart_color_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_color_legend_swatch_width: float, optional + :param chart_color_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_color_legend_swatch_height: float, optional + :param chart_color_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_color_legend_swatch_radius: float, optional + :param chart_color_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_color_legend_legend_items_padding: float, optional + :param chart_color_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_color_legend_swatch_outline: bool, optional + :param chart_color_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_color_legend_swatch_outline_color: str, optional + :param chart_color_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_color_legend_order_override: Union[list, str], optional + :param chart_color_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_color_legend_icon_height: float, optional + :param chart_color_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_color_legend_icon_color: str, optional + :param chart_color_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_color_legend_max_width: float, optional + :param chart_color_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_color_legend_orientation: str, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param value_control_visibility: Show value control. Choices: always, editor, never. Sets whether the value control is always visible, only visible when editing or never visible. Flourish type hint: string, defaults to None. + :type value_control_visibility: str, optional + :param chart_value_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_value_filter_controls_control_type: str, optional + :param chart_value_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_value_filter_controls_control_styles: bool, optional + :param chart_value_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_value_filter_controls_control_title: str, optional + :param chart_value_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_value_filter_controls_button_group: bool, optional + :param chart_value_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_value_filter_controls_button_group_width_mode: str, optional + :param chart_value_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_value_filter_controls_button_group_width_fixed: float, optional + :param chart_value_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_value_filter_controls_dropdown_width_mode: str, optional + :param chart_value_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_value_filter_controls_dropdown_width_fixed: float, optional + :param chart_value_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_value_filter_controls_slider_width: float, optional + :param chart_value_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_value_filter_controls_slider_max_label_width: float, optional + :param chart_value_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_value_filter_controls_slider_step_time: float, optional + :param chart_value_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_value_filter_controls_slider_loop: bool, optional + :param chart_value_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_value_filter_controls_slider_restart_pause: float, optional + :param chart_value_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_value_filter_controls_sort: bool, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "axis": {}, + "number_localization": {}, + "number_format": {}, + "legend_container": {}, + "value_legend": {}, + "icon_legend": {}, + "color_legend": {}, + "popup": {}, + "value_control": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "slider_style": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_bar_orientation = ["vertical", "horizontal"] + [None] + if bar_orientation not in list_bar_orientation: + raise ValueError( + f"`bar_orientation` must be one of: ['vertical', 'horizontal']" + ) + elif bar_orientation in list_bar_orientation and bar_orientation is not None: + filtered_dict = { + k: v + for (k, v) in { + "vertical": "vertical", + "horizontal": "horizontal", + }.items() + if bar_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["bar_orientation"] = filtered_dict[bar_orientation] + self.state["state"]["flip_bars"] = flip_bars + self.state["state"]["bar_padding"] = bar_padding + self.state["state"]["plot_aspect_ratio"] = plot_aspect_ratio + self.state["state"]["plot_aspect_ratio_mobile"] = plot_aspect_ratio_mobile + self.state["state"][ + "plot_aspect_ratio_breakpoint" + ] = plot_aspect_ratio_breakpoint + + list_icons = [ + "binding", + "user", + "female", + "male", + "baby", + "child", + "wheelchair", + "angry", + "frown", + "meh", + "smile", + "smile-beam", + "thumbs-up", + "thumbs-down", + "hands-helping", + "hand-rock", + "hand-peace", + "dollar-sign", + "euro-sign", + "money-bill", + "money-bill-wave", + "pound-sign", + "coins", + "shopping-bag", + "shopping-cart", + "circle", + "square", + "star", + "heart", + "comment", + "cat", + "dog", + "dove", + "bus", + "car", + "biking", + "running", + "plane", + "suitcase", + "pizza-slice", + "ice-cream", + "coffee", + "wine-glass-alt", + "building", + "home", + "store", + "industry", + "database", + "laptop", + "microchip", + "phone", + "mobile-alt", + "tv", + "clock", + "atom", + "award", + "music", + "leaf", + "lightbulb", + "sun", + "wrench", + "airbnb", + "amazon", + "android", + "apple", + "bitcoin", + "facebook", + "google", + "linux", + "microsoft", + "twitter", + "windows", + "youtube", + ] + [None] + if icons not in list_icons: + raise ValueError( + f"`icons` must be one of: ['binding', 'user', 'female', 'male', 'baby', 'child', 'wheelchair', 'angry', 'frown', 'meh', 'smile', 'smile-beam', 'thumbs-up', 'thumbs-down', 'hands-helping', 'hand-rock', 'hand-peace', 'dollar-sign', 'euro-sign', 'money-bill', 'money-bill-wave', 'pound-sign', 'coins', 'shopping-bag', 'shopping-cart', 'circle', 'square', 'star', 'heart', 'comment', 'cat', 'dog', 'dove', 'bus', 'car', 'biking', 'running', 'plane', 'suitcase', 'pizza-slice', 'ice-cream', 'coffee', 'wine-glass-alt', 'building', 'home', 'store', 'industry', 'database', 'laptop', 'microchip', 'phone', 'mobile-alt', 'tv', 'clock', 'atom', 'award', 'music', 'leaf', 'lightbulb', 'sun', 'wrench', 'airbnb', 'amazon', 'android', 'apple', 'bitcoin', 'facebook', 'google', 'linux', 'microsoft', 'twitter', 'windows', 'youtube']" + ) + elif icons in list_icons and icons is not None: + filtered_dict = { + k: v + for (k, v) in { + "binding": "binding", + "user": "user", + "female": "female", + "male": "male", + "baby": "baby", + "child": "child", + "wheelchair": "wheelchair", + "angry": "angry", + "frown": "frown", + "meh": "meh", + "smile": "smile", + "smile-beam": "smile-beam", + "thumbs-up": "thumbs-up", + "thumbs-down": "thumbs-down", + "hands-helping": "hands-helping", + "hand-rock": "hand-rock", + "hand-peace": "hand-peace", + "dollar-sign": "dollar-sign", + "euro-sign": "euro-sign", + "money-bill": "money-bill", + "money-bill-wave": "money-bill-wave", + "pound-sign": "pound-sign", + "coins": "coins", + "shopping-bag": "shopping-bag", + "shopping-cart": "shopping-cart", + "circle": "circle", + "square": "square", + "star": "star", + "heart": "heart", + "comment": "comment", + "cat": "cat", + "dog": "dog", + "dove": "dove", + "bus": "bus", + "car": "car", + "biking": "biking", + "running": "running", + "plane": "plane", + "suitcase": "suitcase", + "pizza-slice": "pizza-slice", + "ice-cream": "ice-cream", + "coffee": "coffee", + "wine-glass-alt": "wine-glass-alt", + "building": "building", + "home": "home", + "store": "store", + "industry": "industry", + "database": "database", + "laptop": "laptop", + "microchip": "microchip", + "phone": "phone", + "mobile-alt": "mobile-alt", + "tv": "tv", + "clock": "clock", + "atom": "atom", + "award": "award", + "music": "music", + "leaf": "leaf", + "lightbulb": "lightbulb", + "sun": "sun", + "wrench": "wrench", + "airbnb": "airbnb", + "amazon": "amazon", + "android": "android", + "apple": "apple", + "bitcoin": "bitcoin", + "facebook": "facebook", + "google": "google", + "linux": "linux", + "microsoft": "microsoft", + "twitter": "twitter", + "windows": "windows", + "youtube": "youtube", + }.items() + if icons in k + } + if len(filtered_dict) > 0: + self.state["state"]["icons"] = filtered_dict[icons] + self.state["state"]["icon_padding"] = icon_padding + self.state["state"]["auto_icon_value"] = auto_icon_value + self.state["state"]["icon_value"] = icon_value + self.state["state"]["icon_color"] = icon_color + + list_icon_style = ["solid", "outline"] + [None] + if icon_style not in list_icon_style: + raise ValueError(f"`icon_style` must be one of: ['solid', 'outline']") + elif icon_style in list_icon_style and icon_style is not None: + filtered_dict = { + k: v + for (k, v) in {"solid": "solid", "outline": "outline"}.items() + if icon_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["icon_style"] = filtered_dict[icon_style] + self.state["state"]["icon_stroke_thickness"] = icon_stroke_thickness + self.state["state"]["use_filler_icons"] = use_filler_icons + self.state["state"]["filler_icon_color"] = filler_icon_color + self.state["state"]["max_bar_value"] = max_bar_value + self.state["state"]["fill_final_row"] = fill_final_row + + list_filler_icons = [ + "auto", + "user", + "female", + "male", + "baby", + "child", + "wheelchair", + "angry", + "frown", + "meh", + "smile", + "smile-beam", + "thumbs-up", + "thumbs-down", + "hands-helping", + "hand-rock", + "hand-peace", + "dollar-sign", + "euro-sign", + "money-bill", + "money-bill-wave", + "pound-sign", + "coins", + "shopping-bag", + "shopping-cart", + "circle", + "square", + "star", + "heart", + "comment", + "cat", + "dog", + "dove", + "bus", + "car", + "biking", + "running", + "plane", + "suitcase", + "pizza-slice", + "ice-cream", + "coffee", + "wine-glass-alt", + "building", + "home", + "store", + "industry", + "database", + "laptop", + "microchip", + "phone", + "mobile-alt", + "tv", + "clock", + "atom", + "award", + "music", + "leaf", + "lightbulb", + "sun", + "wrench", + "airbnb", + "amazon", + "android", + "apple", + "bitcoin", + "facebook", + "google", + "linux", + "microsoft", + "twitter", + "windows", + "youtube", + ] + [None] + if filler_icons not in list_filler_icons: + raise ValueError( + f"`filler_icons` must be one of: ['auto', 'user', 'female', 'male', 'baby', 'child', 'wheelchair', 'angry', 'frown', 'meh', 'smile', 'smile-beam', 'thumbs-up', 'thumbs-down', 'hands-helping', 'hand-rock', 'hand-peace', 'dollar-sign', 'euro-sign', 'money-bill', 'money-bill-wave', 'pound-sign', 'coins', 'shopping-bag', 'shopping-cart', 'circle', 'square', 'star', 'heart', 'comment', 'cat', 'dog', 'dove', 'bus', 'car', 'biking', 'running', 'plane', 'suitcase', 'pizza-slice', 'ice-cream', 'coffee', 'wine-glass-alt', 'building', 'home', 'store', 'industry', 'database', 'laptop', 'microchip', 'phone', 'mobile-alt', 'tv', 'clock', 'atom', 'award', 'music', 'leaf', 'lightbulb', 'sun', 'wrench', 'airbnb', 'amazon', 'android', 'apple', 'bitcoin', 'facebook', 'google', 'linux', 'microsoft', 'twitter', 'windows', 'youtube']" + ) + elif filler_icons in list_filler_icons and filler_icons is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "user": "user", + "female": "female", + "male": "male", + "baby": "baby", + "child": "child", + "wheelchair": "wheelchair", + "angry": "angry", + "frown": "frown", + "meh": "meh", + "smile": "smile", + "smile-beam": "smile-beam", + "thumbs-up": "thumbs-up", + "thumbs-down": "thumbs-down", + "hands-helping": "hands-helping", + "hand-rock": "hand-rock", + "hand-peace": "hand-peace", + "dollar-sign": "dollar-sign", + "euro-sign": "euro-sign", + "money-bill": "money-bill", + "money-bill-wave": "money-bill-wave", + "pound-sign": "pound-sign", + "coins": "coins", + "shopping-bag": "shopping-bag", + "shopping-cart": "shopping-cart", + "circle": "circle", + "square": "square", + "star": "star", + "heart": "heart", + "comment": "comment", + "cat": "cat", + "dog": "dog", + "dove": "dove", + "bus": "bus", + "car": "car", + "biking": "biking", + "running": "running", + "plane": "plane", + "suitcase": "suitcase", + "pizza-slice": "pizza-slice", + "ice-cream": "ice-cream", + "coffee": "coffee", + "wine-glass-alt": "wine-glass-alt", + "building": "building", + "home": "home", + "store": "store", + "industry": "industry", + "database": "database", + "laptop": "laptop", + "microchip": "microchip", + "phone": "phone", + "mobile-alt": "mobile-alt", + "tv": "tv", + "clock": "clock", + "atom": "atom", + "award": "award", + "music": "music", + "leaf": "leaf", + "lightbulb": "lightbulb", + "sun": "sun", + "wrench": "wrench", + "airbnb": "airbnb", + "amazon": "amazon", + "android": "android", + "apple": "apple", + "bitcoin": "bitcoin", + "facebook": "facebook", + "google": "google", + "linux": "linux", + "microsoft": "microsoft", + "twitter": "twitter", + "windows": "windows", + "youtube": "youtube", + }.items() + if filler_icons in k + } + if len(filtered_dict) > 0: + self.state["state"]["filler_icons"] = filtered_dict[filler_icons] + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["show_bar_labels"] = show_bar_labels + self.state["state"]["bar_label_size"] = bar_label_size + self.state["state"]["bar_label_color"] = bar_label_color + + list_bar_label_weight = ["normal", "bold"] + [None] + if bar_label_weight not in list_bar_label_weight: + raise ValueError(f"`bar_label_weight` must be one of: ['normal', 'bold']") + elif bar_label_weight in list_bar_label_weight and bar_label_weight is not None: + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if bar_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["bar_label_weight"] = filtered_dict[ + bar_label_weight + ] + + list_chart_x_axis_axis_position = [ + "bottom", + "float-below", + "float-above", + "top", + "off", + ] + [None] + if chart_x_axis_axis_position not in list_chart_x_axis_axis_position: + raise ValueError( + f"`chart_x_axis_axis_position` must be one of: ['bottom', 'float-below', 'float-above', 'top', 'off']" + ) + elif ( + chart_x_axis_axis_position in list_chart_x_axis_axis_position + and chart_x_axis_axis_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "float-below": "float-below", + "float-above": "float-above", + "top": "top", + "off": "off", + }.items() + if chart_x_axis_axis_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["axis_position"] = filtered_dict[ + chart_x_axis_axis_position + ] + self.state["state"]["axis"]["y_axis_position"] = chart_x_axis_y_axis_position + + list_chart_x_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_x_axis_numeric_scale_type not in list_chart_x_axis_numeric_scale_type: + raise ValueError( + f"`chart_x_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_x_axis_numeric_scale_type in list_chart_x_axis_numeric_scale_type + and chart_x_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_x_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["numeric_scale_type"] = filtered_dict[ + chart_x_axis_numeric_scale_type + ] + self.state["state"]["axis"]["linear_min"] = chart_x_axis_linear_min + self.state["state"]["axis"]["linear_max"] = chart_x_axis_linear_max + self.state["state"]["axis"]["log_min"] = chart_x_axis_log_min + self.state["state"]["axis"]["log_max"] = chart_x_axis_log_max + self.state["state"]["axis"]["datetime_min"] = chart_x_axis_datetime_min + self.state["state"]["axis"]["datetime_max"] = chart_x_axis_datetime_max + self.state["state"]["axis"]["flip"] = chart_x_axis_flip + self.state["state"]["axis"][ + "show_scale_settings" + ] = chart_x_axis_show_scale_settings + + list_chart_x_axis_nice = [True, False] + [None] + if chart_x_axis_nice not in list_chart_x_axis_nice: + raise ValueError(f"`chart_x_axis_nice` must be one of: [True, False]") + elif ( + chart_x_axis_nice in list_chart_x_axis_nice + and chart_x_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["nice"] = filtered_dict[chart_x_axis_nice] + + list_chart_x_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_x_axis_zero_axis not in list_chart_x_axis_zero_axis: + raise ValueError( + f"`chart_x_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_x_axis_zero_axis in list_chart_x_axis_zero_axis + and chart_x_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_x_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["zero_axis"] = filtered_dict[ + chart_x_axis_zero_axis + ] + + list_chart_x_axis_title_mode = ["auto", "custom"] + [None] + if chart_x_axis_title_mode not in list_chart_x_axis_title_mode: + raise ValueError( + f"`chart_x_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_x_axis_title_mode in list_chart_x_axis_title_mode + and chart_x_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_x_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["title_mode"] = filtered_dict[ + chart_x_axis_title_mode + ] + self.state["state"]["axis"]["title"] = chart_x_axis_title + self.state["state"]["axis"]["title_styling"] = chart_x_axis_title_styling + + list_chart_x_axis_title_weight = ["bold", "normal"] + [None] + if chart_x_axis_title_weight not in list_chart_x_axis_title_weight: + raise ValueError( + f"`chart_x_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_title_weight in list_chart_x_axis_title_weight + and chart_x_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["title_weight"] = filtered_dict[ + chart_x_axis_title_weight + ] + self.state["state"]["axis"]["title_color"] = chart_x_axis_title_color + self.state["state"]["axis"]["title_size"] = chart_x_axis_title_size + self.state["state"]["axis"]["title_padding"] = chart_x_axis_title_padding + + list_chart_x_axis_tick_label_position = ["default", "left", "right"] + [None] + if ( + chart_x_axis_tick_label_position + not in list_chart_x_axis_tick_label_position + ): + raise ValueError( + f"`chart_x_axis_tick_label_position` must be one of: ['default', 'left', 'right']" + ) + elif ( + chart_x_axis_tick_label_position in list_chart_x_axis_tick_label_position + and chart_x_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "left": "left", + "right": "right", + }.items() + if chart_x_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["tick_label_position"] = filtered_dict[ + chart_x_axis_tick_label_position + ] + self.state["state"]["axis"][ + "tick_label_styling" + ] = chart_x_axis_tick_label_styling + self.state["state"]["axis"]["tick_label_size"] = chart_x_axis_tick_label_size + self.state["state"]["axis"]["tick_label_color"] = chart_x_axis_tick_label_color + self.state["state"]["axis"]["tick_padding"] = chart_x_axis_tick_padding + + list_chart_x_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_x_axis_tick_label_angle not in list_chart_x_axis_tick_label_angle: + raise ValueError( + f"`chart_x_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_x_axis_tick_label_angle in list_chart_x_axis_tick_label_angle + and chart_x_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_x_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["tick_label_angle"] = filtered_dict[ + chart_x_axis_tick_label_angle + ] + + list_chart_x_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_x_axis_tick_label_weight not in list_chart_x_axis_tick_label_weight: + raise ValueError( + f"`chart_x_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_tick_label_weight in list_chart_x_axis_tick_label_weight + and chart_x_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["tick_label_weight"] = filtered_dict[ + chart_x_axis_tick_label_weight + ] + self.state["state"]["axis"][ + "tick_label_max_lines" + ] = chart_x_axis_tick_label_max_lines + self.state["state"]["axis"][ + "tick_label_line_height" + ] = chart_x_axis_tick_label_line_height + + list_chart_x_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_x_axis_tick_label_space_mode + not in list_chart_x_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_x_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_x_axis_tick_label_space_mode + in list_chart_x_axis_tick_label_space_mode + and chart_x_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_x_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["tick_label_space_mode"] = filtered_dict[ + chart_x_axis_tick_label_space_mode + ] + self.state["state"]["axis"]["tick_label_space"] = chart_x_axis_tick_label_space + + list_chart_x_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_x_axis_tick_mode not in list_chart_x_axis_tick_mode: + raise ValueError( + f"`chart_x_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_x_axis_tick_mode in list_chart_x_axis_tick_mode + and chart_x_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_x_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["tick_mode"] = filtered_dict[ + chart_x_axis_tick_mode + ] + self.state["state"]["axis"]["tick_number"] = chart_x_axis_tick_number + + if ( + chart_x_axis_tick_custom is not None + and len(chart_x_axis_tick_custom) > 1 + and isinstance(chart_x_axis_tick_custom, list) + ): + self.state["state"]["axis"]["tick_custom"] = " \n ".join( + chart_x_axis_tick_custom + ) + else: + self.state["state"]["axis"]["tick_custom"] = chart_x_axis_tick_custom + + self.state["state"]["axis"][ + "line_and_tick_color" + ] = chart_x_axis_line_and_tick_color + self.state["state"]["axis"][ + "line_and_tick_width" + ] = chart_x_axis_line_and_tick_width + self.state["state"]["axis"]["tick_length"] = chart_x_axis_tick_length + + list_chart_x_axis_tick_side = ["out", "in"] + [None] + if chart_x_axis_tick_side not in list_chart_x_axis_tick_side: + raise ValueError(f"`chart_x_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_x_axis_tick_side in list_chart_x_axis_tick_side + and chart_x_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_x_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["tick_side"] = filtered_dict[ + chart_x_axis_tick_side + ] + self.state["state"]["axis"]["line_visible"] = chart_x_axis_line_visible + self.state["state"]["axis"]["edge_padding"] = chart_x_axis_edge_padding + + list_chart_x_axis_gridlines_visible = [True, False] + [None] + if chart_x_axis_gridlines_visible not in list_chart_x_axis_gridlines_visible: + raise ValueError( + f"`chart_x_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_x_axis_gridlines_visible in list_chart_x_axis_gridlines_visible + and chart_x_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["gridlines_visible"] = filtered_dict[ + chart_x_axis_gridlines_visible + ] + self.state["state"]["axis"][ + "gridlines_styling" + ] = chart_x_axis_gridlines_styling + self.state["state"]["axis"]["gridline_color"] = chart_x_axis_gridline_color + + list_chart_x_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_x_axis_gridline_style not in list_chart_x_axis_gridline_style: + raise ValueError( + f"`chart_x_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_x_axis_gridline_style in list_chart_x_axis_gridline_style + and chart_x_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_x_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis"]["gridline_style"] = filtered_dict[ + chart_x_axis_gridline_style + ] + self.state["state"]["axis"]["gridline_width"] = chart_x_axis_gridline_width + self.state["state"]["axis"][ + "gridline_category_dividers" + ] = chart_x_axis_gridline_category_dividers + self.state["state"]["axis"][ + "gridline_category_dividers_extend" + ] = chart_x_axis_gridline_category_dividers_extend + + list_chart_number_localization_input_decimal_separator = [".", ","] + [None] + if ( + chart_number_localization_input_decimal_separator + not in list_chart_number_localization_input_decimal_separator + ): + raise ValueError( + f"`chart_number_localization_input_decimal_separator` must be one of: ['.', ',']" + ) + elif ( + chart_number_localization_input_decimal_separator + in list_chart_number_localization_input_decimal_separator + and chart_number_localization_input_decimal_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in {".": ".", ",": ","}.items() + if chart_number_localization_input_decimal_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_localization"][ + "input_decimal_separator" + ] = filtered_dict[chart_number_localization_input_decimal_separator] + + list_chart_number_localization_output_separators = [ + ",.", + ".,", + ".", + ",", + " .", + " ,", + ] + [None] + if ( + chart_number_localization_output_separators + not in list_chart_number_localization_output_separators + ): + raise ValueError( + f"`chart_number_localization_output_separators` must be one of: [',.', '.,', '.', ',', ' .', ' ,']" + ) + elif ( + chart_number_localization_output_separators + in list_chart_number_localization_output_separators + and chart_number_localization_output_separators is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ",.": ",.", + ".,": ".,", + ".": ".", + ",": ",", + " .": " .", + " ,": " ,", + }.items() + if chart_number_localization_output_separators in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_localization"][ + "output_separators" + ] = filtered_dict[chart_number_localization_output_separators] + self.state["state"]["number_format"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["number_format"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["number_format"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["number_format"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["number_format"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["number_format"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["number_format"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["number_format"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["number_format"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_chart_value_legend_show_legend = [True, False] + [None] + if chart_value_legend_show_legend not in list_chart_value_legend_show_legend: + raise ValueError( + f"`chart_value_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_value_legend_show_legend in list_chart_value_legend_show_legend + and chart_value_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_value_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_legend"]["show_legend"] = filtered_dict[ + chart_value_legend_show_legend + ] + + list_chart_value_legend_title_mode = ["auto", "custom"] + [None] + if chart_value_legend_title_mode not in list_chart_value_legend_title_mode: + raise ValueError( + f"`chart_value_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_value_legend_title_mode in list_chart_value_legend_title_mode + and chart_value_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_value_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_legend"]["title_mode"] = filtered_dict[ + chart_value_legend_title_mode + ] + self.state["state"]["value_legend"]["title"] = chart_value_legend_title + self.state["state"]["value_legend"][ + "swatch_width" + ] = chart_value_legend_swatch_width + self.state["state"]["value_legend"][ + "swatch_height" + ] = chart_value_legend_swatch_height + self.state["state"]["value_legend"][ + "swatch_radius" + ] = chart_value_legend_swatch_radius + self.state["state"]["value_legend"][ + "legend_items_padding" + ] = chart_value_legend_legend_items_padding + self.state["state"]["value_legend"][ + "swatch_outline" + ] = chart_value_legend_swatch_outline + self.state["state"]["value_legend"][ + "swatch_outline_color" + ] = chart_value_legend_swatch_outline_color + + if ( + chart_value_legend_order_override is not None + and len(chart_value_legend_order_override) > 1 + and isinstance(chart_value_legend_order_override, list) + ): + self.state["state"]["value_legend"]["order_override"] = " \n ".join( + chart_value_legend_order_override + ) + else: + self.state["state"]["value_legend"][ + "order_override" + ] = chart_value_legend_order_override + + self.state["state"]["value_legend"][ + "icon_height" + ] = chart_value_legend_icon_height + self.state["state"]["value_legend"][ + "icon_color" + ] = chart_value_legend_icon_color + self.state["state"]["value_legend"]["max_width"] = chart_value_legend_max_width + + list_chart_value_legend_orientation = ["horizontal", "vertical"] + [None] + if chart_value_legend_orientation not in list_chart_value_legend_orientation: + raise ValueError( + f"`chart_value_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_value_legend_orientation in list_chart_value_legend_orientation + and chart_value_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_value_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_legend"]["orientation"] = filtered_dict[ + chart_value_legend_orientation + ] + + list_value_legend_icon = [ + "auto", + "user", + "female", + "male", + "baby", + "child", + "wheelchair", + "angry", + "frown", + "meh", + "smile", + "smile-beam", + "thumbs-up", + "thumbs-down", + "hands-helping", + "hand-rock", + "hand-peace", + "dollar-sign", + "euro-sign", + "money-bill", + "money-bill-wave", + "pound-sign", + "coins", + "shopping-bag", + "shopping-cart", + "circle", + "square", + "star", + "heart", + "comment", + "cat", + "dog", + "dove", + "bus", + "car", + "biking", + "running", + "plane", + "suitcase", + "pizza-slice", + "ice-cream", + "coffee", + "wine-glass-alt", + "building", + "home", + "store", + "industry", + "database", + "laptop", + "microchip", + "phone", + "mobile-alt", + "tv", + "clock", + "atom", + "award", + "music", + "leaf", + "lightbulb", + "sun", + "wrench", + "airbnb", + "amazon", + "android", + "apple", + "bitcoin", + "facebook", + "google", + "linux", + "microsoft", + "twitter", + "windows", + "youtube", + ] + [None] + if value_legend_icon not in list_value_legend_icon: + raise ValueError( + f"`value_legend_icon` must be one of: ['auto', 'user', 'female', 'male', 'baby', 'child', 'wheelchair', 'angry', 'frown', 'meh', 'smile', 'smile-beam', 'thumbs-up', 'thumbs-down', 'hands-helping', 'hand-rock', 'hand-peace', 'dollar-sign', 'euro-sign', 'money-bill', 'money-bill-wave', 'pound-sign', 'coins', 'shopping-bag', 'shopping-cart', 'circle', 'square', 'star', 'heart', 'comment', 'cat', 'dog', 'dove', 'bus', 'car', 'biking', 'running', 'plane', 'suitcase', 'pizza-slice', 'ice-cream', 'coffee', 'wine-glass-alt', 'building', 'home', 'store', 'industry', 'database', 'laptop', 'microchip', 'phone', 'mobile-alt', 'tv', 'clock', 'atom', 'award', 'music', 'leaf', 'lightbulb', 'sun', 'wrench', 'airbnb', 'amazon', 'android', 'apple', 'bitcoin', 'facebook', 'google', 'linux', 'microsoft', 'twitter', 'windows', 'youtube']" + ) + elif ( + value_legend_icon in list_value_legend_icon + and value_legend_icon is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "user": "user", + "female": "female", + "male": "male", + "baby": "baby", + "child": "child", + "wheelchair": "wheelchair", + "angry": "angry", + "frown": "frown", + "meh": "meh", + "smile": "smile", + "smile-beam": "smile-beam", + "thumbs-up": "thumbs-up", + "thumbs-down": "thumbs-down", + "hands-helping": "hands-helping", + "hand-rock": "hand-rock", + "hand-peace": "hand-peace", + "dollar-sign": "dollar-sign", + "euro-sign": "euro-sign", + "money-bill": "money-bill", + "money-bill-wave": "money-bill-wave", + "pound-sign": "pound-sign", + "coins": "coins", + "shopping-bag": "shopping-bag", + "shopping-cart": "shopping-cart", + "circle": "circle", + "square": "square", + "star": "star", + "heart": "heart", + "comment": "comment", + "cat": "cat", + "dog": "dog", + "dove": "dove", + "bus": "bus", + "car": "car", + "biking": "biking", + "running": "running", + "plane": "plane", + "suitcase": "suitcase", + "pizza-slice": "pizza-slice", + "ice-cream": "ice-cream", + "coffee": "coffee", + "wine-glass-alt": "wine-glass-alt", + "building": "building", + "home": "home", + "store": "store", + "industry": "industry", + "database": "database", + "laptop": "laptop", + "microchip": "microchip", + "phone": "phone", + "mobile-alt": "mobile-alt", + "tv": "tv", + "clock": "clock", + "atom": "atom", + "award": "award", + "music": "music", + "leaf": "leaf", + "lightbulb": "lightbulb", + "sun": "sun", + "wrench": "wrench", + "airbnb": "airbnb", + "amazon": "amazon", + "android": "android", + "apple": "apple", + "bitcoin": "bitcoin", + "facebook": "facebook", + "google": "google", + "linux": "linux", + "microsoft": "microsoft", + "twitter": "twitter", + "windows": "windows", + "youtube": "youtube", + }.items() + if value_legend_icon in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_legend_icon"] = filtered_dict[ + value_legend_icon + ] + + list_chart_icon_legend_show_legend = [True, False] + [None] + if chart_icon_legend_show_legend not in list_chart_icon_legend_show_legend: + raise ValueError( + f"`chart_icon_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_icon_legend_show_legend in list_chart_icon_legend_show_legend + and chart_icon_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_icon_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["icon_legend"]["show_legend"] = filtered_dict[ + chart_icon_legend_show_legend + ] + + list_chart_icon_legend_title_mode = ["auto", "custom"] + [None] + if chart_icon_legend_title_mode not in list_chart_icon_legend_title_mode: + raise ValueError( + f"`chart_icon_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_icon_legend_title_mode in list_chart_icon_legend_title_mode + and chart_icon_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_icon_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["icon_legend"]["title_mode"] = filtered_dict[ + chart_icon_legend_title_mode + ] + self.state["state"]["icon_legend"]["title"] = chart_icon_legend_title + self.state["state"]["icon_legend"][ + "swatch_width" + ] = chart_icon_legend_swatch_width + self.state["state"]["icon_legend"][ + "swatch_height" + ] = chart_icon_legend_swatch_height + self.state["state"]["icon_legend"][ + "swatch_radius" + ] = chart_icon_legend_swatch_radius + self.state["state"]["icon_legend"][ + "legend_items_padding" + ] = chart_icon_legend_legend_items_padding + self.state["state"]["icon_legend"][ + "swatch_outline" + ] = chart_icon_legend_swatch_outline + self.state["state"]["icon_legend"][ + "swatch_outline_color" + ] = chart_icon_legend_swatch_outline_color + + if ( + chart_icon_legend_order_override is not None + and len(chart_icon_legend_order_override) > 1 + and isinstance(chart_icon_legend_order_override, list) + ): + self.state["state"]["icon_legend"]["order_override"] = " \n ".join( + chart_icon_legend_order_override + ) + else: + self.state["state"]["icon_legend"][ + "order_override" + ] = chart_icon_legend_order_override + + self.state["state"]["icon_legend"][ + "icon_height" + ] = chart_icon_legend_icon_height + self.state["state"]["icon_legend"]["icon_color"] = chart_icon_legend_icon_color + self.state["state"]["icon_legend"]["max_width"] = chart_icon_legend_max_width + + list_chart_icon_legend_orientation = ["horizontal", "vertical"] + [None] + if chart_icon_legend_orientation not in list_chart_icon_legend_orientation: + raise ValueError( + f"`chart_icon_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_icon_legend_orientation in list_chart_icon_legend_orientation + and chart_icon_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_icon_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["icon_legend"]["orientation"] = filtered_dict[ + chart_icon_legend_orientation + ] + + list_chart_color_legend_show_legend = [True, False] + [None] + if chart_color_legend_show_legend not in list_chart_color_legend_show_legend: + raise ValueError( + f"`chart_color_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_color_legend_show_legend in list_chart_color_legend_show_legend + and chart_color_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_color_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["color_legend"]["show_legend"] = filtered_dict[ + chart_color_legend_show_legend + ] + + list_chart_color_legend_title_mode = ["auto", "custom"] + [None] + if chart_color_legend_title_mode not in list_chart_color_legend_title_mode: + raise ValueError( + f"`chart_color_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_color_legend_title_mode in list_chart_color_legend_title_mode + and chart_color_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_color_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color_legend"]["title_mode"] = filtered_dict[ + chart_color_legend_title_mode + ] + self.state["state"]["color_legend"]["title"] = chart_color_legend_title + self.state["state"]["color_legend"][ + "swatch_width" + ] = chart_color_legend_swatch_width + self.state["state"]["color_legend"][ + "swatch_height" + ] = chart_color_legend_swatch_height + self.state["state"]["color_legend"][ + "swatch_radius" + ] = chart_color_legend_swatch_radius + self.state["state"]["color_legend"][ + "legend_items_padding" + ] = chart_color_legend_legend_items_padding + self.state["state"]["color_legend"][ + "swatch_outline" + ] = chart_color_legend_swatch_outline + self.state["state"]["color_legend"][ + "swatch_outline_color" + ] = chart_color_legend_swatch_outline_color + + if ( + chart_color_legend_order_override is not None + and len(chart_color_legend_order_override) > 1 + and isinstance(chart_color_legend_order_override, list) + ): + self.state["state"]["color_legend"]["order_override"] = " \n ".join( + chart_color_legend_order_override + ) + else: + self.state["state"]["color_legend"][ + "order_override" + ] = chart_color_legend_order_override + + self.state["state"]["color_legend"][ + "icon_height" + ] = chart_color_legend_icon_height + self.state["state"]["color_legend"][ + "icon_color" + ] = chart_color_legend_icon_color + self.state["state"]["color_legend"]["max_width"] = chart_color_legend_max_width + + list_chart_color_legend_orientation = ["horizontal", "vertical"] + [None] + if chart_color_legend_orientation not in list_chart_color_legend_orientation: + raise ValueError( + f"`chart_color_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_color_legend_orientation in list_chart_color_legend_orientation + and chart_color_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_color_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["color_legend"]["orientation"] = filtered_dict[ + chart_color_legend_orientation + ] + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + + list_value_control_visibility = ["always", "editor", "never"] + [None] + if value_control_visibility not in list_value_control_visibility: + raise ValueError( + f"`value_control_visibility` must be one of: ['always', 'editor', 'never']" + ) + elif ( + value_control_visibility in list_value_control_visibility + and value_control_visibility is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "always": "always", + "editor": "editor", + "never": "never", + }.items() + if value_control_visibility in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_control_visibility"] = filtered_dict[ + value_control_visibility + ] + + list_chart_value_filter_controls_control_type = [ + "dropdown", + "buttons", + "slider", + ] + [None] + if ( + chart_value_filter_controls_control_type + not in list_chart_value_filter_controls_control_type + ): + raise ValueError( + f"`chart_value_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_value_filter_controls_control_type + in list_chart_value_filter_controls_control_type + and chart_value_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_value_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_control"]["control_type"] = filtered_dict[ + chart_value_filter_controls_control_type + ] + self.state["state"]["value_control"][ + "control_styles" + ] = chart_value_filter_controls_control_styles + self.state["state"]["value_control"][ + "control_title" + ] = chart_value_filter_controls_control_title + + list_chart_value_filter_controls_button_group = [True, False] + [None] + if ( + chart_value_filter_controls_button_group + not in list_chart_value_filter_controls_button_group + ): + raise ValueError( + f"`chart_value_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_value_filter_controls_button_group + in list_chart_value_filter_controls_button_group + and chart_value_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_value_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_control"]["button_group"] = filtered_dict[ + chart_value_filter_controls_button_group + ] + + list_chart_value_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_value_filter_controls_button_group_width_mode + not in list_chart_value_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_value_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_value_filter_controls_button_group_width_mode + in list_chart_value_filter_controls_button_group_width_mode + and chart_value_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_value_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_value_filter_controls_button_group_width_mode] + self.state["state"]["value_control"][ + "button_group_width_fixed" + ] = chart_value_filter_controls_button_group_width_fixed + + list_chart_value_filter_controls_dropdown_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_value_filter_controls_dropdown_width_mode + not in list_chart_value_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_value_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_value_filter_controls_dropdown_width_mode + in list_chart_value_filter_controls_dropdown_width_mode + and chart_value_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_value_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_value_filter_controls_dropdown_width_mode] + self.state["state"]["value_control"][ + "dropdown_width_fixed" + ] = chart_value_filter_controls_dropdown_width_fixed + self.state["state"]["value_control"][ + "slider_width" + ] = chart_value_filter_controls_slider_width + self.state["state"]["value_control"][ + "slider_max_label_width" + ] = chart_value_filter_controls_slider_max_label_width + self.state["state"]["value_control"][ + "slider_step_time" + ] = chart_value_filter_controls_slider_step_time + self.state["state"]["value_control"][ + "slider_loop" + ] = chart_value_filter_controls_slider_loop + self.state["state"]["value_control"][ + "slider_restart_pause" + ] = chart_value_filter_controls_slider_restart_pause + + list_chart_value_filter_controls_sort = [True, False] + [None] + if ( + chart_value_filter_controls_sort + not in list_chart_value_filter_controls_sort + ): + raise ValueError( + f"`chart_value_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_value_filter_controls_sort in list_chart_value_filter_controls_sort + and chart_value_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_value_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_control"]["sort"] = filtered_dict[ + chart_value_filter_controls_sort + ] + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["slider_style"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["slider_style"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["slider_style"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["slider_style"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["slider_style"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["slider_style"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["slider_style"][ + "play_button" + ] = chart_slider_control_style_play_button + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_quiz_details( + self, + color_primary: str = None, + color_neutral: str = None, + color_correct: str = None, + block_text_color: str = None, + text_border_color: str = None, + block_text_size: str = None, + block_text_size_custom: float = None, + block_background: str = None, + block_padding: float = None, + block_border_width: float = None, + block_border_color: str = None, + block_border_radius: float = None, + block_shadow: bool = None, + block_shadow_blur: float = None, + block_shadow_opacity: float = None, + block_btn_text_color: str = None, + block_btn_text_size: str = None, + block_btn_text_size_custom: float = None, + show_all_questions: bool = None, + slider_handle_fill: str = None, + slider_handle_radius: float = None, + slider_handle_stroke: float = None, + slider_channel_fill: str = None, + slider_channel_height: float = None, + slider_comparison_opacity: float = None, + slider_range_type: str = None, + slider_range_min: float = None, + slider_range_max: float = None, + slider_range_step: float = None, + slider_range_custom: Union[list, str] = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + mc_background: str = None, + mc_border_color: str = None, + mc_border_width: float = None, + mc_border_radius: float = None, + dropdown: bool = None, + dropdown_default_label: str = None, + dropdown_label_color: str = None, + slider_advanced_scoring: bool = None, + slider_score_zone_percent: float = None, + slider_correct_zone_percent: float = None, + end_result_default_text: Union[list, str] = None, + text_your_answer: str = None, + text_submit: str = None, + text_dropdown_label: str = None, + chart_number_localization_input_decimal_separator: str = None, + chart_number_localization_output_separators: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: quiz. + + + :param color_primary: User input. Flourish type hint: color, defaults to None. + :type color_primary: str, optional + :param color_neutral: Neutral. Flourish type hint: color, defaults to None. + :type color_neutral: str, optional + :param color_correct: Correct. Flourish type hint: color, defaults to None. + :type color_correct: str, optional + :param block_text_color: Color. Flourish type hint: color, defaults to None. + :type block_text_color: str, optional + :param text_border_color: Border color. Flourish type hint: color, defaults to None. + :type text_border_color: str, optional + :param block_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type block_text_size: str, optional + :param block_text_size_custom: Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type block_text_size_custom: float, optional + :param block_background: Background. Flourish type hint: color, defaults to None. + :type block_background: str, optional + :param block_padding: Padding. Flourish type hint: number, defaults to None. + :type block_padding: float, optional + :param block_border_width: Width. Flourish type hint: number, defaults to None. + :type block_border_width: float, optional + :param block_border_color: Color. Flourish type hint: color, defaults to None. + :type block_border_color: str, optional + :param block_border_radius: Radius. Flourish type hint: number, defaults to None. + :type block_border_radius: float, optional + :param block_shadow: Enabled. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type block_shadow: bool, optional + :param block_shadow_blur: Blur. Flourish type hint: number, defaults to None. + :type block_shadow_blur: float, optional + :param block_shadow_opacity: Opacity. Flourish type hint: number, defaults to None. + :type block_shadow_opacity: float, optional + :param block_btn_text_color: Text color. Flourish type hint: color, defaults to None. + :type block_btn_text_color: str, optional + :param block_btn_text_size: Size. Choices: 1.1, 1.2, 1.4, custom. Flourish type hint: string, defaults to None. + :type block_btn_text_size: str, optional + :param block_btn_text_size_custom: Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type block_btn_text_size_custom: float, optional + :param show_all_questions: Show unanswered questions. Flourish type hint: boolean, defaults to None. + :type show_all_questions: bool, optional + :param slider_handle_fill: Color. Flourish type hint: color, defaults to None. + :type slider_handle_fill: str, optional + :param slider_handle_radius: Radius. Flourish type hint: number, defaults to None. + :type slider_handle_radius: float, optional + :param slider_handle_stroke: Border. Flourish type hint: number, defaults to None. + :type slider_handle_stroke: float, optional + :param slider_channel_fill: Color. Flourish type hint: color, defaults to None. + :type slider_channel_fill: str, optional + :param slider_channel_height: Height. Flourish type hint: number, defaults to None. + :type slider_channel_height: float, optional + :param slider_comparison_opacity: Comparison opacity. Flourish type hint: number, defaults to None. + :type slider_comparison_opacity: float, optional + :param slider_range_type: Slider range. Choices: auto, fixed, custom. In Auto mode, the range will go from 0 to the nearest power of 10. In Fixed mode, you can set a fixed range for every question. In Custom mode, you can set a range for each individual question. Flourish type hint: string, defaults to None. + :type slider_range_type: str, optional + :param slider_range_min: Min. Flourish type hint: number, defaults to None. + :type slider_range_min: float, optional + :param slider_range_max: Max. Flourish type hint: number, defaults to None. + :type slider_range_max: float, optional + :param slider_range_step: Step. Flourish type hint: number, defaults to None. + :type slider_range_step: float, optional + :param slider_range_custom: Custom. Set a custom range for each question. Write a new range on each line with the following format: `question text :: range minimum :: range maximum :: range step`. < For example: `How many people live in London? :: 1000000 :: 20000000 :: 1000` Flourish type hint: text, defaults to None. + :type slider_range_custom: Union[list, str], optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param mc_background: Background. Flourish type hint: color, defaults to None. + :type mc_background: str, optional + :param mc_border_color: Color. Flourish type hint: color, defaults to None. + :type mc_border_color: str, optional + :param mc_border_width: Width. Flourish type hint: number, defaults to None. + :type mc_border_width: float, optional + :param mc_border_radius: Radius. Flourish type hint: number, defaults to None. + :type mc_border_radius: float, optional + :param dropdown: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type dropdown: bool, optional + :param dropdown_default_label: Default comparison. Type in an answer thats selected as a default when you load the visualization. Flourish type hint: string, defaults to None. + :type dropdown_default_label: str, optional + :param dropdown_label_color: Text color. Flourish type hint: color, defaults to None. + :type dropdown_label_color: str, optional + :param slider_advanced_scoring: Linear scores for slider questions. Rather than a slider answer just being "right" or "wrong", change this setting to get a higher score the closer you are to the correct answer. Flourish type hint: boolean, defaults to None. + :type slider_advanced_scoring: bool, optional + :param slider_score_zone_percent: Scoring zone (%). Defines how close (as a percentage of the slider range) the input needs to be to the correct answer to produce a score. For example, for a slider range of 0 to 200, a correct answer of 45, and a scoring zone of 10%, the score is non-zero if the input is between 25 and 65 (because 10% of the slider range is 20). The score increases linearly from 0 at the scoring zone boundary to a score of 1 at the correct answer. Flourish type hint: number, defaults to None. + :type slider_score_zone_percent: float, optional + :param slider_correct_zone_percent: Correct zone (%). Defines how close (as a percentage of the scoring zone) the input needs to be to the correct answer to produce a full score of 1. For example, for a slider range of 0 to 200, a correct answer of 45, a scoring zone of 10%, and a correct zone of 50%, the score is 1 if the input is between 35 and 55 (because 50% of the scoring zone is 10). The score increases linearly from the scoring zone boundary to the correct zone boundary. For example, inputs of 20, 25, 30, 35, or 40 scores 0, 0, 0.5, 1, or 1, respectively. Flourish type hint: number, defaults to None. + :type slider_correct_zone_percent: float, optional + :param end_result_default_text: Default end result text. This is the text that shows up after youve finished the quiz. You can add custom end result text for specific score ranges in the Data tab, inside the End result sheet. Flourish type hint: text, defaults to None. + :type end_result_default_text: Union[list, str], optional + :param text_your_answer: Slider your answer. Flourish type hint: string, defaults to None. + :type text_your_answer: str, optional + :param text_submit: Submit button. Flourish type hint: string, defaults to None. + :type text_submit: str, optional + :param text_dropdown_label: Dropdown label. Flourish type hint: string, defaults to None. + :type text_dropdown_label: str, optional + :param chart_number_localization_input_decimal_separator: Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to None. + :type chart_number_localization_input_decimal_separator: str, optional + :param chart_number_localization_output_separators: Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to None. + :type chart_number_localization_output_separators: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "slider_number_format": {}, + "localization": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + self.state["state"]["color_primary"] = color_primary + self.state["state"]["color_neutral"] = color_neutral + self.state["state"]["color_correct"] = color_correct + self.state["state"]["block_text_color"] = block_text_color + self.state["state"]["text_border_color"] = text_border_color + + list_block_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if block_text_size not in list_block_text_size: + raise ValueError( + f"`block_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif block_text_size in list_block_text_size and block_text_size is not None: + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if block_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["block_text_size"] = filtered_dict[block_text_size] + self.state["state"]["block_text_size_custom"] = block_text_size_custom + self.state["state"]["block_background"] = block_background + self.state["state"]["block_padding"] = block_padding + self.state["state"]["block_border_width"] = block_border_width + self.state["state"]["block_border_color"] = block_border_color + self.state["state"]["block_border_radius"] = block_border_radius + + list_block_shadow = [True, False] + [None] + if block_shadow not in list_block_shadow: + raise ValueError(f"`block_shadow` must be one of: [True, False]") + elif block_shadow in list_block_shadow and block_shadow is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if block_shadow in k + } + if len(filtered_dict) > 0: + self.state["state"]["block_shadow"] = filtered_dict[block_shadow] + self.state["state"]["block_shadow_blur"] = block_shadow_blur + self.state["state"]["block_shadow_opacity"] = block_shadow_opacity + self.state["state"]["block_btn_text_color"] = block_btn_text_color + + list_block_btn_text_size = ["1.1", "1.2", "1.4", "custom"] + [None] + if block_btn_text_size not in list_block_btn_text_size: + raise ValueError( + f"`block_btn_text_size` must be one of: ['1.1', '1.2', '1.4', 'custom']" + ) + elif ( + block_btn_text_size in list_block_btn_text_size + and block_btn_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.1": "1.1", + "1.2": "1.2", + "1.4": "1.4", + "custom": "custom", + }.items() + if block_btn_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["block_btn_text_size"] = filtered_dict[ + block_btn_text_size + ] + self.state["state"]["block_btn_text_size_custom"] = block_btn_text_size_custom + self.state["state"]["show_all_questions"] = show_all_questions + self.state["state"]["slider_handle_fill"] = slider_handle_fill + self.state["state"]["slider_handle_radius"] = slider_handle_radius + self.state["state"]["slider_handle_stroke"] = slider_handle_stroke + self.state["state"]["slider_channel_fill"] = slider_channel_fill + self.state["state"]["slider_channel_height"] = slider_channel_height + self.state["state"]["slider_comparison_opacity"] = slider_comparison_opacity + + list_slider_range_type = ["auto", "fixed", "custom"] + [None] + if slider_range_type not in list_slider_range_type: + raise ValueError( + f"`slider_range_type` must be one of: ['auto', 'fixed', 'custom']" + ) + elif ( + slider_range_type in list_slider_range_type + and slider_range_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "fixed": "fixed", + "custom": "custom", + }.items() + if slider_range_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["slider_range_type"] = filtered_dict[ + slider_range_type + ] + self.state["state"]["slider_range_min"] = slider_range_min + self.state["state"]["slider_range_max"] = slider_range_max + self.state["state"]["slider_range_step"] = slider_range_step + + if ( + slider_range_custom is not None + and len(slider_range_custom) > 1 + and isinstance(slider_range_custom, list) + ): + self.state["state"]["slider_range_custom"] = " \n ".join( + slider_range_custom + ) + else: + self.state["state"]["slider_range_custom"] = slider_range_custom + + self.state["state"]["slider_number_format"][ + "prefix" + ] = chart_number_date_format_prefix + self.state["state"]["slider_number_format"][ + "suffix" + ] = chart_number_date_format_suffix + self.state["state"]["slider_number_format"][ + "n_dec" + ] = chart_number_date_format_n_dec + self.state["state"]["slider_number_format"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["slider_number_format"][ + "negative_sign" + ] = filtered_dict[chart_number_date_format_negative_sign] + self.state["state"]["slider_number_format"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["slider_number_format"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["slider_number_format"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["slider_number_format"][ + "transform" + ] = filtered_dict[chart_number_date_format_transform] + self.state["state"]["slider_number_format"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["slider_number_format"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + self.state["state"]["mc_background"] = mc_background + self.state["state"]["mc_border_color"] = mc_border_color + self.state["state"]["mc_border_width"] = mc_border_width + self.state["state"]["mc_border_radius"] = mc_border_radius + + list_dropdown = [True, False] + [None] + if dropdown not in list_dropdown: + raise ValueError(f"`dropdown` must be one of: [True, False]") + elif dropdown in list_dropdown and dropdown is not None: + filtered_dict = { + k: v for (k, v) in {True: True, False: False}.items() if dropdown in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown"] = filtered_dict[dropdown] + self.state["state"]["dropdown_default_label"] = dropdown_default_label + self.state["state"]["dropdown_label_color"] = dropdown_label_color + self.state["state"]["slider_advanced_scoring"] = slider_advanced_scoring + self.state["state"]["slider_score_zone_percent"] = slider_score_zone_percent + self.state["state"]["slider_correct_zone_percent"] = slider_correct_zone_percent + + if ( + end_result_default_text is not None + and len(end_result_default_text) > 1 + and isinstance(end_result_default_text, list) + ): + self.state["state"]["end_result_default_text"] = " \n ".join( + end_result_default_text + ) + else: + self.state["state"]["end_result_default_text"] = end_result_default_text + + self.state["state"]["text_your_answer"] = text_your_answer + self.state["state"]["text_submit"] = text_submit + self.state["state"]["text_dropdown_label"] = text_dropdown_label + + list_chart_number_localization_input_decimal_separator = [".", ","] + [None] + if ( + chart_number_localization_input_decimal_separator + not in list_chart_number_localization_input_decimal_separator + ): + raise ValueError( + f"`chart_number_localization_input_decimal_separator` must be one of: ['.', ',']" + ) + elif ( + chart_number_localization_input_decimal_separator + in list_chart_number_localization_input_decimal_separator + and chart_number_localization_input_decimal_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in {".": ".", ",": ","}.items() + if chart_number_localization_input_decimal_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "input_decimal_separator" + ] = filtered_dict[chart_number_localization_input_decimal_separator] + + list_chart_number_localization_output_separators = [ + ",.", + ".,", + ".", + ",", + " .", + " ,", + ] + [None] + if ( + chart_number_localization_output_separators + not in list_chart_number_localization_output_separators + ): + raise ValueError( + f"`chart_number_localization_output_separators` must be one of: [',.', '.,', '.', ',', ' .', ' ,']" + ) + elif ( + chart_number_localization_output_separators + in list_chart_number_localization_output_separators + and chart_number_localization_output_separators is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ",.": ",.", + ".,": ".,", + ".": ".", + ",": ",", + " .": " .", + " ,": " ,", + }.items() + if chart_number_localization_output_separators in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "output_separators" + ] = filtered_dict[chart_number_localization_output_separators] + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_radar_details( + self, + radars_curve: str = None, + radars_star: bool = None, + radars_stroke_width: float = None, + radars_stroke_opacity: float = None, + radars_fill_opacity: float = None, + radars_star_inner_radius: float = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + facet_comparisons: bool = None, + facet_comparison_stroke: str = None, + facet_comparison_stroke_width: float = None, + facet_comparison_stroke_opacity: float = None, + facet_comparison_fill: str = None, + facet_comparison_fill_opacity: float = None, + chart_facet_columns_fixed: bool = None, + chart_facet_min_width: float = None, + chart_facet_max_width: float = None, + chart_facet_columns: float = None, + chart_facet_gutter_w: float = None, + chart_facet_gutter_h: float = None, + chart_facet_animation: str = None, + chart_facet_titles: bool = None, + chart_facet_title_align: str = None, + chart_facet_title_size: float = None, + chart_facet_title_unit: str = None, + chart_facet_title_color: str = None, + chart_facet_title_padding_top: float = None, + chart_facet_title_padding_bottom: float = None, + chart_facet_title_bg: str = None, + chart_facet_title_bg_color: str = None, + chart_facet_title_bg_padding: float = None, + chart_radial_axis_axis_show: bool = None, + chart_radial_axis_x_line_color: str = None, + chart_radial_axis_x_line_width: float = None, + chart_radial_axis_x_tick_label_color: str = None, + chart_radial_axis_x_tick_label_size: float = None, + chart_radial_axis_x_tick_label_outline: float = None, + chart_radial_axis_x_tick_label_weight: str = None, + chart_radial_axis_y_min: float = None, + chart_radial_axis_y_max: float = None, + chart_radial_axis_y_tick_number: float = None, + chart_radial_axis_y_line_color: str = None, + chart_radial_axis_y_line_width: str = None, + chart_radial_axis_y_line_dash: str = None, + chart_radial_axis_y_line_dash_gap: str = None, + chart_radial_axis_y_tick_label_color: str = None, + chart_radial_axis_y_tick_label_size: float = None, + chart_radial_axis_y_tick_label_outline: float = None, + chart_radial_axis_y_tick_label_space: float = None, + chart_radial_axis_y_tick_label_weight: str = None, + chart_radial_axis_margin_top: float = None, + chart_radial_axis_margin_right: float = None, + chart_radial_axis_margin_bottom: float = None, + chart_radial_axis_margin_left: float = None, + chart_radial_axis_group_labels: Union[list, str] = None, + chart_radial_axis_group_labels_color: str = None, + chart_radial_axis_group_labels_size: float = None, + chart_radial_axis_group_labels_letter_spacing: float = None, + chart_radial_axis_group_labels_space_above: float = None, + chart_radial_axis_group_labels_space_below: float = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_legend_show_legend: bool = None, + chart_legend_title_mode: str = None, + chart_legend_title: str = None, + chart_legend_swatch_width: float = None, + chart_legend_swatch_height: float = None, + chart_legend_swatch_radius: float = None, + chart_legend_legend_items_padding: float = None, + chart_legend_swatch_outline: bool = None, + chart_legend_swatch_outline_color: str = None, + chart_legend_order_override: Union[list, str] = None, + chart_legend_icon_height: float = None, + chart_legend_icon_color: str = None, + chart_legend_max_width: float = None, + chart_legend_orientation: str = None, + facet_control_show: bool = None, + facet_control_default: str = None, + facet_control_none: bool = None, + facets_label_combined: str = None, + facet_control_individual: bool = None, + facets_label_separate: str = None, + chart_facet_filter_controls_control_type: str = None, + chart_facet_filter_controls_control_styles: bool = None, + chart_facet_filter_controls_control_title: str = None, + chart_facet_filter_controls_button_group: bool = None, + chart_facet_filter_controls_button_group_width_mode: str = None, + chart_facet_filter_controls_button_group_width_fixed: float = None, + chart_facet_filter_controls_dropdown_width_mode: str = None, + chart_facet_filter_controls_dropdown_width_fixed: float = None, + chart_facet_filter_controls_slider_width: float = None, + chart_facet_filter_controls_slider_max_label_width: float = None, + chart_facet_filter_controls_slider_step_time: float = None, + chart_facet_filter_controls_slider_loop: bool = None, + chart_facet_filter_controls_slider_restart_pause: float = None, + chart_facet_filter_controls_sort: bool = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + filter_control_all: str = None, + filter_y_max: bool = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + chart_filter_controls_container_alignment: str = None, + chart_filter_controls_container_controls_spacing: float = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + popup_color_headings: bool = None, + duration: float = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: radar chart. + + + :param radars_curve: Line curve. Choices: linear, cardinal. Flourish type hint: string, defaults to None. + :type radars_curve: str, optional + :param radars_star: Line shape. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type radars_star: bool, optional + :param radars_stroke_width: Line width. Flourish type hint: number, defaults to None. + :type radars_stroke_width: float, optional + :param radars_stroke_opacity: Line opacity. Flourish type hint: number, defaults to None. + :type radars_stroke_opacity: float, optional + :param radars_fill_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type radars_fill_opacity: float, optional + :param radars_star_inner_radius: Star inner. The star shapes inner radius, as a percent of the max radius. Flourish type hint: number, defaults to None. + :type radars_star_inner_radius: float, optional + :param chart_color_scale_categorical_palette: Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param facet_comparisons: Show comparison lines in grid mode. Flourish type hint: boolean, defaults to None. + :type facet_comparisons: bool, optional + :param facet_comparison_stroke: Line. Flourish type hint: color, defaults to None. + :type facet_comparison_stroke: str, optional + :param facet_comparison_stroke_width: Line width. Flourish type hint: number, defaults to None. + :type facet_comparison_stroke_width: float, optional + :param facet_comparison_stroke_opacity: Line opacity. Flourish type hint: number, defaults to None. + :type facet_comparison_stroke_opacity: float, optional + :param facet_comparison_fill: Fill. Flourish type hint: color, defaults to None. + :type facet_comparison_fill: str, optional + :param facet_comparison_fill_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type facet_comparison_fill_opacity: float, optional + :param chart_facet_columns_fixed: Number of columns. Choices: False, True. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to None. + :type chart_facet_columns_fixed: bool, optional + :param chart_facet_min_width: Min chart width. Determines how many columns of charts there should be in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_min_width: float, optional + :param chart_facet_max_width: Max chart width. Determines how many columns of charts there should be in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_max_width: float, optional + :param chart_facet_columns: Fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_columns: float, optional + :param chart_facet_gutter_w: Horizontal margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_w: float, optional + :param chart_facet_gutter_h: Vertical margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_h: float, optional + :param chart_facet_animation: On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to None. + :type chart_facet_animation: str, optional + :param chart_facet_titles: Show titles. Flourish type hint: boolean, defaults to None. + :type chart_facet_titles: bool, optional + :param chart_facet_title_align: Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to None. + :type chart_facet_title_align: str, optional + :param chart_facet_title_size: Size. Relative to the width of the chart. Flourish type hint: number, defaults to None. + :type chart_facet_title_size: float, optional + :param chart_facet_title_unit: Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to None. + :type chart_facet_title_unit: str, optional + :param chart_facet_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_color: str, optional + :param chart_facet_title_padding_top: Space above. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_top: float, optional + :param chart_facet_title_padding_bottom: Space below. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_bottom: float, optional + :param chart_facet_title_bg: Background. Choices: none, full, text. Flourish type hint: string, defaults to None. + :type chart_facet_title_bg: str, optional + :param chart_facet_title_bg_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_bg_color: str, optional + :param chart_facet_title_bg_padding: Padding. Horizontal space between text and background. Flourish type hint: number, defaults to None. + :type chart_facet_title_bg_padding: float, optional + :param chart_radial_axis_axis_show: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_radial_axis_axis_show: bool, optional + :param chart_radial_axis_x_line_color: Line. Flourish type hint: color, defaults to None. + :type chart_radial_axis_x_line_color: str, optional + :param chart_radial_axis_x_line_width: Width. Flourish type hint: number, defaults to None. + :type chart_radial_axis_x_line_width: float, optional + :param chart_radial_axis_x_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_radial_axis_x_tick_label_color: str, optional + :param chart_radial_axis_x_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_radial_axis_x_tick_label_size: float, optional + :param chart_radial_axis_x_tick_label_outline: Outline. Flourish type hint: number, defaults to None. + :type chart_radial_axis_x_tick_label_outline: float, optional + :param chart_radial_axis_x_tick_label_weight: Choices: 600, 400. Flourish type hint: string, defaults to None. + :type chart_radial_axis_x_tick_label_weight: str, optional + :param chart_radial_axis_y_min: Min value. Flourish type hint: number, defaults to None. + :type chart_radial_axis_y_min: float, optional + :param chart_radial_axis_y_max: Max value. Flourish type hint: number, defaults to None. + :type chart_radial_axis_y_max: float, optional + :param chart_radial_axis_y_tick_number: Number. Flourish type hint: number, defaults to None. + :type chart_radial_axis_y_tick_number: float, optional + :param chart_radial_axis_y_line_color: Color. Flourish type hint: color, defaults to None. + :type chart_radial_axis_y_line_color: str, optional + :param chart_radial_axis_y_line_width: Width. Flourish type hint: string, defaults to None. + :type chart_radial_axis_y_line_width: str, optional + :param chart_radial_axis_y_line_dash: Dash. Flourish type hint: string, defaults to None. + :type chart_radial_axis_y_line_dash: str, optional + :param chart_radial_axis_y_line_dash_gap: Gap. Flourish type hint: string, defaults to None. + :type chart_radial_axis_y_line_dash_gap: str, optional + :param chart_radial_axis_y_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_radial_axis_y_tick_label_color: str, optional + :param chart_radial_axis_y_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_radial_axis_y_tick_label_size: float, optional + :param chart_radial_axis_y_tick_label_outline: Outline. Flourish type hint: number, defaults to None. + :type chart_radial_axis_y_tick_label_outline: float, optional + :param chart_radial_axis_y_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_radial_axis_y_tick_label_space: float, optional + :param chart_radial_axis_y_tick_label_weight: Choices: 600, 400. Flourish type hint: string, defaults to None. + :type chart_radial_axis_y_tick_label_weight: str, optional + :param chart_radial_axis_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_radial_axis_margin_top: float, optional + :param chart_radial_axis_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_radial_axis_margin_right: float, optional + :param chart_radial_axis_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_radial_axis_margin_bottom: float, optional + :param chart_radial_axis_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_radial_axis_margin_left: float, optional + :param chart_radial_axis_group_labels: Outer labels. Enter one per line, with an angle and a label separated by a colon, such as: 50: My Label. Flourish type hint: text, defaults to None. + :type chart_radial_axis_group_labels: Union[list, str], optional + :param chart_radial_axis_group_labels_color: Color. Flourish type hint: color, defaults to None. + :type chart_radial_axis_group_labels_color: str, optional + :param chart_radial_axis_group_labels_size: Size. Flourish type hint: number, defaults to None. + :type chart_radial_axis_group_labels_size: float, optional + :param chart_radial_axis_group_labels_letter_spacing: Letter spacing. Flourish type hint: number, defaults to None. + :type chart_radial_axis_group_labels_letter_spacing: float, optional + :param chart_radial_axis_group_labels_space_above: Space above. Flourish type hint: number, defaults to None. + :type chart_radial_axis_group_labels_space_above: float, optional + :param chart_radial_axis_group_labels_space_below: Space below. Flourish type hint: number, defaults to None. + :type chart_radial_axis_group_labels_space_below: float, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_legend_show_legend: bool, optional + :param chart_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_legend_title_mode: str, optional + :param chart_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_legend_title: str, optional + :param chart_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_legend_swatch_width: float, optional + :param chart_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_legend_swatch_height: float, optional + :param chart_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_legend_swatch_radius: float, optional + :param chart_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_legend_legend_items_padding: float, optional + :param chart_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_legend_swatch_outline: bool, optional + :param chart_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_swatch_outline_color: str, optional + :param chart_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_legend_order_override: Union[list, str], optional + :param chart_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_legend_icon_height: float, optional + :param chart_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_legend_icon_color: str, optional + :param chart_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_legend_max_width: float, optional + :param chart_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_orientation: str, optional + :param facet_control_show: Show charts grid control. Flourish type hint: boolean, defaults to None. + :type facet_control_show: bool, optional + :param facet_control_default: Option to show on load. If you want to specify a different facet view to show on load either make a story or enter the label from the relevant button here. Case sensitive. Flourish type hint: string, defaults to None. + :type facet_control_default: str, optional + :param facet_control_none: Include combined option. Flourish type hint: boolean, defaults to None. + :type facet_control_none: bool, optional + :param facets_label_combined: Combined label. Flourish type hint: string, defaults to None. + :type facets_label_combined: str, optional + :param facet_control_individual: Include separate option. Flourish type hint: boolean, defaults to None. + :type facet_control_individual: bool, optional + :param facets_label_separate: Separate label. Flourish type hint: string, defaults to None. + :type facets_label_separate: str, optional + :param chart_facet_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_facet_filter_controls_control_type: str, optional + :param chart_facet_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_facet_filter_controls_control_styles: bool, optional + :param chart_facet_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_facet_filter_controls_control_title: str, optional + :param chart_facet_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_facet_filter_controls_button_group: bool, optional + :param chart_facet_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_facet_filter_controls_button_group_width_mode: str, optional + :param chart_facet_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_facet_filter_controls_button_group_width_fixed: float, optional + :param chart_facet_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_facet_filter_controls_dropdown_width_mode: str, optional + :param chart_facet_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_facet_filter_controls_dropdown_width_fixed: float, optional + :param chart_facet_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_facet_filter_controls_slider_width: float, optional + :param chart_facet_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_facet_filter_controls_slider_max_label_width: float, optional + :param chart_facet_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_facet_filter_controls_slider_step_time: float, optional + :param chart_facet_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_facet_filter_controls_slider_loop: bool, optional + :param chart_facet_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_facet_filter_controls_slider_restart_pause: float, optional + :param chart_facet_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_facet_filter_controls_sort: bool, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param filter_control_all: Name for "All". Leave blank to not include an "All" option. Flourish type hint: string, defaults to None. + :type filter_control_all: str, optional + :param filter_y_max: Update axis y max when filtering. Flourish type hint: boolean, defaults to None. + :type filter_y_max: bool, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param chart_filter_controls_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_filter_controls_container_alignment: str, optional + :param chart_filter_controls_container_controls_spacing: Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to None. + :type chart_filter_controls_container_controls_spacing: float, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param popup_color_headings: Color popup headings. Flourish type hint: boolean, defaults to None. + :type popup_color_headings: bool, optional + :param duration: Duration. The duration, in seconds, of transitions for example between two slides in a story. Flourish type hint: number, defaults to None. + :type duration: float, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "radars": {}, + "color": {}, + "facets": {}, + "radial_axis": {}, + "legend_container": {}, + "legend": {}, + "facets_control": {}, + "filter_control": {}, + "style_controls": {}, + "style_button": {}, + "style_dropdown": {}, + "style_slider": {}, + "controls_container": {}, + "popup": {}, + "formatting": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_radars_curve = ["linear", "cardinal"] + [None] + if radars_curve not in list_radars_curve: + raise ValueError(f"`radars_curve` must be one of: ['linear', 'cardinal']") + elif radars_curve in list_radars_curve and radars_curve is not None: + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "cardinal": "cardinal"}.items() + if radars_curve in k + } + if len(filtered_dict) > 0: + self.state["state"]["radars"]["curve"] = filtered_dict[radars_curve] + + list_radars_star = [False, True] + [None] + if radars_star not in list_radars_star: + raise ValueError(f"`radars_star` must be one of: [False, True]") + elif radars_star in list_radars_star and radars_star is not None: + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if radars_star in k + } + if len(filtered_dict) > 0: + self.state["state"]["radars"]["star"] = filtered_dict[radars_star] + self.state["state"]["radars"]["stroke_width"] = radars_stroke_width + self.state["state"]["radars"]["stroke_opacity"] = radars_stroke_opacity + self.state["state"]["radars"]["fill_opacity"] = radars_fill_opacity + self.state["state"]["radars"]["star_inner_radius"] = radars_star_inner_radius + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["facet_comparisons"] = facet_comparisons + self.state["state"]["facet_comparison_stroke"] = facet_comparison_stroke + self.state["state"][ + "facet_comparison_stroke_width" + ] = facet_comparison_stroke_width + self.state["state"][ + "facet_comparison_stroke_opacity" + ] = facet_comparison_stroke_opacity + self.state["state"]["facet_comparison_fill"] = facet_comparison_fill + self.state["state"][ + "facet_comparison_fill_opacity" + ] = facet_comparison_fill_opacity + + list_chart_facet_columns_fixed = [False, True] + [None] + if chart_facet_columns_fixed not in list_chart_facet_columns_fixed: + raise ValueError( + f"`chart_facet_columns_fixed` must be one of: [False, True]" + ) + elif ( + chart_facet_columns_fixed in list_chart_facet_columns_fixed + and chart_facet_columns_fixed is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_facet_columns_fixed in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["columns_fixed"] = filtered_dict[ + chart_facet_columns_fixed + ] + self.state["state"]["facets"]["min_width"] = chart_facet_min_width + self.state["state"]["facets"]["max_width"] = chart_facet_max_width + self.state["state"]["facets"]["columns"] = chart_facet_columns + self.state["state"]["facets"]["gutter_w"] = chart_facet_gutter_w + self.state["state"]["facets"]["gutter_h"] = chart_facet_gutter_h + + list_chart_facet_animation = ["auto", "name", "reuse"] + [None] + if chart_facet_animation not in list_chart_facet_animation: + raise ValueError( + f"`chart_facet_animation` must be one of: ['auto', 'name', 'reuse']" + ) + elif ( + chart_facet_animation in list_chart_facet_animation + and chart_facet_animation is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "name": "name", "reuse": "reuse"}.items() + if chart_facet_animation in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["animation"] = filtered_dict[ + chart_facet_animation + ] + self.state["state"]["facets"]["titles"] = chart_facet_titles + + list_chart_facet_title_align = ["auto", "left", "center", "right"] + [None] + if chart_facet_title_align not in list_chart_facet_title_align: + raise ValueError( + f"`chart_facet_title_align` must be one of: ['auto', 'left', 'center', 'right']" + ) + elif ( + chart_facet_title_align in list_chart_facet_title_align + and chart_facet_title_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_facet_title_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_align"] = filtered_dict[ + chart_facet_title_align + ] + self.state["state"]["facets"]["title_size"] = chart_facet_title_size + + list_chart_facet_title_unit = ["rem", "facet"] + [None] + if chart_facet_title_unit not in list_chart_facet_title_unit: + raise ValueError( + f"`chart_facet_title_unit` must be one of: ['rem', 'facet']" + ) + elif ( + chart_facet_title_unit in list_chart_facet_title_unit + and chart_facet_title_unit is not None + ): + filtered_dict = { + k: v + for (k, v) in {"rem": "rem", "facet": "facet"}.items() + if chart_facet_title_unit in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_unit"] = filtered_dict[ + chart_facet_title_unit + ] + self.state["state"]["facets"]["title_color"] = chart_facet_title_color + self.state["state"]["facets"][ + "title_padding_top" + ] = chart_facet_title_padding_top + self.state["state"]["facets"][ + "title_padding_bottom" + ] = chart_facet_title_padding_bottom + + list_chart_facet_title_bg = ["none", "full", "text"] + [None] + if chart_facet_title_bg not in list_chart_facet_title_bg: + raise ValueError( + f"`chart_facet_title_bg` must be one of: ['none', 'full', 'text']" + ) + elif ( + chart_facet_title_bg in list_chart_facet_title_bg + and chart_facet_title_bg is not None + ): + filtered_dict = { + k: v + for (k, v) in {"none": "none", "full": "full", "text": "text"}.items() + if chart_facet_title_bg in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_bg"] = filtered_dict[ + chart_facet_title_bg + ] + self.state["state"]["facets"]["title_bg_color"] = chart_facet_title_bg_color + self.state["state"]["facets"]["title_bg_padding"] = chart_facet_title_bg_padding + + list_chart_radial_axis_axis_show = [True, False] + [None] + if chart_radial_axis_axis_show not in list_chart_radial_axis_axis_show: + raise ValueError( + f"`chart_radial_axis_axis_show` must be one of: [True, False]" + ) + elif ( + chart_radial_axis_axis_show in list_chart_radial_axis_axis_show + and chart_radial_axis_axis_show is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_radial_axis_axis_show in k + } + if len(filtered_dict) > 0: + self.state["state"]["radial_axis"]["axis_show"] = filtered_dict[ + chart_radial_axis_axis_show + ] + self.state["state"]["radial_axis"][ + "x_line_color" + ] = chart_radial_axis_x_line_color + self.state["state"]["radial_axis"][ + "x_line_width" + ] = chart_radial_axis_x_line_width + self.state["state"]["radial_axis"][ + "x_tick_label_color" + ] = chart_radial_axis_x_tick_label_color + self.state["state"]["radial_axis"][ + "x_tick_label_size" + ] = chart_radial_axis_x_tick_label_size + self.state["state"]["radial_axis"][ + "x_tick_label_outline" + ] = chart_radial_axis_x_tick_label_outline + + list_chart_radial_axis_x_tick_label_weight = ["600", "400"] + [None] + if ( + chart_radial_axis_x_tick_label_weight + not in list_chart_radial_axis_x_tick_label_weight + ): + raise ValueError( + f"`chart_radial_axis_x_tick_label_weight` must be one of: ['600', '400']" + ) + elif ( + chart_radial_axis_x_tick_label_weight + in list_chart_radial_axis_x_tick_label_weight + and chart_radial_axis_x_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"600": "600", "400": "400"}.items() + if chart_radial_axis_x_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["radial_axis"][ + "x_tick_label_weight" + ] = filtered_dict[chart_radial_axis_x_tick_label_weight] + self.state["state"]["radial_axis"]["y_min"] = chart_radial_axis_y_min + self.state["state"]["radial_axis"]["y_max"] = chart_radial_axis_y_max + self.state["state"]["radial_axis"][ + "y_tick_number" + ] = chart_radial_axis_y_tick_number + self.state["state"]["radial_axis"][ + "y_line_color" + ] = chart_radial_axis_y_line_color + self.state["state"]["radial_axis"][ + "y_line_width" + ] = chart_radial_axis_y_line_width + self.state["state"]["radial_axis"][ + "y_line_dash" + ] = chart_radial_axis_y_line_dash + self.state["state"]["radial_axis"][ + "y_line_dash_gap" + ] = chart_radial_axis_y_line_dash_gap + self.state["state"]["radial_axis"][ + "y_tick_label_color" + ] = chart_radial_axis_y_tick_label_color + self.state["state"]["radial_axis"][ + "y_tick_label_size" + ] = chart_radial_axis_y_tick_label_size + self.state["state"]["radial_axis"][ + "y_tick_label_outline" + ] = chart_radial_axis_y_tick_label_outline + self.state["state"]["radial_axis"][ + "y_tick_label_space" + ] = chart_radial_axis_y_tick_label_space + + list_chart_radial_axis_y_tick_label_weight = ["600", "400"] + [None] + if ( + chart_radial_axis_y_tick_label_weight + not in list_chart_radial_axis_y_tick_label_weight + ): + raise ValueError( + f"`chart_radial_axis_y_tick_label_weight` must be one of: ['600', '400']" + ) + elif ( + chart_radial_axis_y_tick_label_weight + in list_chart_radial_axis_y_tick_label_weight + and chart_radial_axis_y_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"600": "600", "400": "400"}.items() + if chart_radial_axis_y_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["radial_axis"][ + "y_tick_label_weight" + ] = filtered_dict[chart_radial_axis_y_tick_label_weight] + self.state["state"]["radial_axis"]["margin_top"] = chart_radial_axis_margin_top + self.state["state"]["radial_axis"][ + "margin_right" + ] = chart_radial_axis_margin_right + self.state["state"]["radial_axis"][ + "margin_bottom" + ] = chart_radial_axis_margin_bottom + self.state["state"]["radial_axis"][ + "margin_left" + ] = chart_radial_axis_margin_left + + if ( + chart_radial_axis_group_labels is not None + and len(chart_radial_axis_group_labels) > 1 + and isinstance(chart_radial_axis_group_labels, list) + ): + self.state["state"]["radial_axis"]["group_labels"] = " \n ".join( + chart_radial_axis_group_labels + ) + else: + self.state["state"]["radial_axis"][ + "group_labels" + ] = chart_radial_axis_group_labels + + self.state["state"]["radial_axis"][ + "group_labels_color" + ] = chart_radial_axis_group_labels_color + self.state["state"]["radial_axis"][ + "group_labels_size" + ] = chart_radial_axis_group_labels_size + self.state["state"]["radial_axis"][ + "group_labels_letter_spacing" + ] = chart_radial_axis_group_labels_letter_spacing + self.state["state"]["radial_axis"][ + "group_labels_space_above" + ] = chart_radial_axis_group_labels_space_above + self.state["state"]["radial_axis"][ + "group_labels_space_below" + ] = chart_radial_axis_group_labels_space_below + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_chart_legend_show_legend = [True, False] + [None] + if chart_legend_show_legend not in list_chart_legend_show_legend: + raise ValueError( + f"`chart_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_legend_show_legend in list_chart_legend_show_legend + and chart_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend"]["show_legend"] = filtered_dict[ + chart_legend_show_legend + ] + + list_chart_legend_title_mode = ["auto", "custom"] + [None] + if chart_legend_title_mode not in list_chart_legend_title_mode: + raise ValueError( + f"`chart_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_legend_title_mode in list_chart_legend_title_mode + and chart_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend"]["title_mode"] = filtered_dict[ + chart_legend_title_mode + ] + self.state["state"]["legend"]["title"] = chart_legend_title + self.state["state"]["legend"]["swatch_width"] = chart_legend_swatch_width + self.state["state"]["legend"]["swatch_height"] = chart_legend_swatch_height + self.state["state"]["legend"]["swatch_radius"] = chart_legend_swatch_radius + self.state["state"]["legend"][ + "legend_items_padding" + ] = chart_legend_legend_items_padding + self.state["state"]["legend"]["swatch_outline"] = chart_legend_swatch_outline + self.state["state"]["legend"][ + "swatch_outline_color" + ] = chart_legend_swatch_outline_color + + if ( + chart_legend_order_override is not None + and len(chart_legend_order_override) > 1 + and isinstance(chart_legend_order_override, list) + ): + self.state["state"]["legend"]["order_override"] = " \n ".join( + chart_legend_order_override + ) + else: + self.state["state"]["legend"][ + "order_override" + ] = chart_legend_order_override + + self.state["state"]["legend"]["icon_height"] = chart_legend_icon_height + self.state["state"]["legend"]["icon_color"] = chart_legend_icon_color + self.state["state"]["legend"]["max_width"] = chart_legend_max_width + + list_chart_legend_orientation = ["horizontal", "vertical"] + [None] + if chart_legend_orientation not in list_chart_legend_orientation: + raise ValueError( + f"`chart_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_orientation in list_chart_legend_orientation + and chart_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend"]["orientation"] = filtered_dict[ + chart_legend_orientation + ] + self.state["state"]["facet_control_show"] = facet_control_show + self.state["state"]["facet_control_default"] = facet_control_default + self.state["state"]["facet_control_none"] = facet_control_none + self.state["state"]["facets_label_combined"] = facets_label_combined + self.state["state"]["facet_control_individual"] = facet_control_individual + self.state["state"]["facets_label_separate"] = facets_label_separate + + list_chart_facet_filter_controls_control_type = [ + "dropdown", + "buttons", + "slider", + ] + [None] + if ( + chart_facet_filter_controls_control_type + not in list_chart_facet_filter_controls_control_type + ): + raise ValueError( + f"`chart_facet_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_facet_filter_controls_control_type + in list_chart_facet_filter_controls_control_type + and chart_facet_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_facet_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets_control"]["control_type"] = filtered_dict[ + chart_facet_filter_controls_control_type + ] + self.state["state"]["facets_control"][ + "control_styles" + ] = chart_facet_filter_controls_control_styles + self.state["state"]["facets_control"][ + "control_title" + ] = chart_facet_filter_controls_control_title + + list_chart_facet_filter_controls_button_group = [True, False] + [None] + if ( + chart_facet_filter_controls_button_group + not in list_chart_facet_filter_controls_button_group + ): + raise ValueError( + f"`chart_facet_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_facet_filter_controls_button_group + in list_chart_facet_filter_controls_button_group + and chart_facet_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_facet_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets_control"]["button_group"] = filtered_dict[ + chart_facet_filter_controls_button_group + ] + + list_chart_facet_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_facet_filter_controls_button_group_width_mode + not in list_chart_facet_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_facet_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_facet_filter_controls_button_group_width_mode + in list_chart_facet_filter_controls_button_group_width_mode + and chart_facet_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_facet_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_facet_filter_controls_button_group_width_mode] + self.state["state"]["facets_control"][ + "button_group_width_fixed" + ] = chart_facet_filter_controls_button_group_width_fixed + + list_chart_facet_filter_controls_dropdown_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_facet_filter_controls_dropdown_width_mode + not in list_chart_facet_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_facet_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_facet_filter_controls_dropdown_width_mode + in list_chart_facet_filter_controls_dropdown_width_mode + and chart_facet_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_facet_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_facet_filter_controls_dropdown_width_mode] + self.state["state"]["facets_control"][ + "dropdown_width_fixed" + ] = chart_facet_filter_controls_dropdown_width_fixed + self.state["state"]["facets_control"][ + "slider_width" + ] = chart_facet_filter_controls_slider_width + self.state["state"]["facets_control"][ + "slider_max_label_width" + ] = chart_facet_filter_controls_slider_max_label_width + self.state["state"]["facets_control"][ + "slider_step_time" + ] = chart_facet_filter_controls_slider_step_time + self.state["state"]["facets_control"][ + "slider_loop" + ] = chart_facet_filter_controls_slider_loop + self.state["state"]["facets_control"][ + "slider_restart_pause" + ] = chart_facet_filter_controls_slider_restart_pause + + list_chart_facet_filter_controls_sort = [True, False] + [None] + if ( + chart_facet_filter_controls_sort + not in list_chart_facet_filter_controls_sort + ): + raise ValueError( + f"`chart_facet_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_facet_filter_controls_sort in list_chart_facet_filter_controls_sort + and chart_facet_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_facet_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets_control"]["sort"] = filtered_dict[ + chart_facet_filter_controls_sort + ] + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["filter_control"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["filter_control"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["filter_control"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_filter_controls_dropdown_width_mode] + self.state["state"]["filter_control"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["filter_control"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["filter_control"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["filter_control"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["filter_control"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["filter_control"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["filter_control_all"] = filter_control_all + self.state["state"]["filter_y_max"] = filter_y_max + self.state["state"]["style_controls"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["style_controls"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["style_controls"]["height"] = chart_controls_style_height + self.state["state"]["style_button"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["style_button"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["style_button"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["style_button"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["style_button"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["style_button"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["style_button"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["style_button"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["style_button"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["style_button"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["style_button"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["style_dropdown"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["style_dropdown"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["style_dropdown"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["style_dropdown"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["style_dropdown"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["style_dropdown"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["style_dropdown"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["style_dropdown"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["style_slider"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["style_slider"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["style_slider"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["style_slider"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["style_slider"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["style_slider"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["style_slider"][ + "play_button" + ] = chart_slider_control_style_play_button + + list_chart_filter_controls_container_alignment = ["start", "center", "end"] + [ + None + ] + if ( + chart_filter_controls_container_alignment + not in list_chart_filter_controls_container_alignment + ): + raise ValueError( + f"`chart_filter_controls_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_filter_controls_container_alignment + in list_chart_filter_controls_container_alignment + and chart_filter_controls_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_filter_controls_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_container"]["alignment"] = filtered_dict[ + chart_filter_controls_container_alignment + ] + self.state["state"]["controls_container"][ + "controls_spacing" + ] = chart_filter_controls_container_controls_spacing + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + self.state["state"]["popup_color_headings"] = popup_color_headings + self.state["state"]["duration"] = duration + self.state["state"]["formatting"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["formatting"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["formatting"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["formatting"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["formatting"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["formatting"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["formatting"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["formatting"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["formatting"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_sankey_details( + self, + mode: str = None, + spread: str = None, + alignment: str = None, + sorting_mode: str = None, + node_sort_order: str = None, + iterations: float = None, + setup_settings: bool = None, + node_width: float = None, + node_padding: float = None, + top_padding: float = None, + bottom_padding: float = None, + height_mode: str = None, + facet_aspect: float = None, + chart_facet_columns_fixed: bool = None, + chart_facet_min_width: float = None, + chart_facet_max_width: float = None, + chart_facet_columns: float = None, + chart_facet_gutter_w: float = None, + chart_facet_gutter_h: float = None, + chart_facet_animation: str = None, + chart_facet_titles: bool = None, + chart_facet_title_align: str = None, + chart_facet_title_size: float = None, + chart_facet_title_unit: str = None, + chart_facet_title_color: str = None, + chart_facet_title_padding_top: float = None, + chart_facet_title_padding_bottom: float = None, + chart_facet_title_bg: str = None, + chart_facet_title_bg_color: str = None, + chart_facet_title_bg_padding: float = None, + facets_hide_empty: bool = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + link_opacity: float = None, + background_opacity: float = None, + custom_node_color: str = None, + links_color_mode: str = None, + label_mode: str = None, + label_outwards_max_width: float = None, + label_color_mode: str = None, + label_color: str = None, + label_bold: bool = None, + label_show_values: bool = None, + label_show_values_links: str = None, + label_color_links: str = None, + label_outline: bool = None, + label_outline_width: float = None, + label_font_size: float = None, + label_facet_scaling: bool = None, + show_node_headings: bool = None, + node_headings_bold: bool = None, + node_headings_font_size: float = None, + node_headings_padding: float = None, + node_headings_max_width: float = None, + node_headings_color: str = None, + node_headings_overrides: Union[list, str] = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + filter_show_all: bool = None, + filter_show_all_text: str = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + popup_type: str = None, + intro_duration: float = None, + intro_ease_range: float = None, + transition_duration: float = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: sankey diagram. + + + :param mode: Mode. Choices: alluvial, sankey. Flourish type hint: string, defaults to None. + :type mode: str, optional + :param spread: Spread. Choices: step, column. Flourish type hint: string, defaults to None. + :type spread: str, optional + :param alignment: Alignment. Choices: justify, center, left, right. Flourish type hint: string, defaults to None. + :type alignment: str, optional + :param sorting_mode: Sorting. Choices: datasheet, name, value, reduce_overlaps. Match sheet sorts based on the order of the categories as they appear in the datasheet. Value sorts by the value of the nodes at each stage. Reduce overlaps reduces the overlapping of links. Flourish type hint: string, defaults to None. + :type sorting_mode: str, optional + :param node_sort_order: Order. Choices: ascending, descending. Flourish type hint: string, defaults to None. + :type node_sort_order: str, optional + :param iterations: Iterations. Number of iterations of the layout algorithm before the diagram is drawn. The higher the value, the fewer link crossings you will see but the less likely the order is to match that in the datasheet. Flourish type hint: number, defaults to None. + :type iterations: float, optional + :param setup_settings: Advanced. Flourish type hint: boolean, defaults to None. + :type setup_settings: bool, optional + :param node_width: Node width. Flourish type hint: number, defaults to None. + :type node_width: float, optional + :param node_padding: Node spacing. The vertical gap between nodes. Flourish type hint: number, defaults to None. + :type node_padding: float, optional + :param top_padding: Margin above. Adds space at the top of the diagram; useful to accommodate any overflowing labels. Flourish type hint: number, defaults to None. + :type top_padding: float, optional + :param bottom_padding: Margin below. Adds space at the bottom of the diagram; useful to accommodate any overflowing labels. Flourish type hint: number, defaults to None. + :type bottom_padding: float, optional + :param height_mode: Height mode. Choices: aspect, standard. Whether responsive embeds should set their own height or use the standard responsive Flourish embed heights. Ignored in simple Iframe embeds, Canva and other fixed-height contexts. Flourish type hint: string, defaults to None. + :type height_mode: str, optional + :param facet_aspect: Aspect. Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type facet_aspect: float, optional + :param chart_facet_columns_fixed: Number of columns. Choices: False, True. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to None. + :type chart_facet_columns_fixed: bool, optional + :param chart_facet_min_width: Min chart width. Determines how many columns of charts are displayed in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_min_width: float, optional + :param chart_facet_max_width: Max chart width. Determines how many columns of charts are in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_max_width: float, optional + :param chart_facet_columns: Fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_columns: float, optional + :param chart_facet_gutter_w: Horizontal margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_w: float, optional + :param chart_facet_gutter_h: Vertical margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_h: float, optional + :param chart_facet_animation: On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to None. + :type chart_facet_animation: str, optional + :param chart_facet_titles: Show titles. Flourish type hint: boolean, defaults to None. + :type chart_facet_titles: bool, optional + :param chart_facet_title_align: Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to None. + :type chart_facet_title_align: str, optional + :param chart_facet_title_size: Size. Relative to the width of the chart. Flourish type hint: number, defaults to None. + :type chart_facet_title_size: float, optional + :param chart_facet_title_unit: Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to None. + :type chart_facet_title_unit: str, optional + :param chart_facet_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_color: str, optional + :param chart_facet_title_padding_top: Space above. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_top: float, optional + :param chart_facet_title_padding_bottom: Space below. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_bottom: float, optional + :param chart_facet_title_bg: Background. Choices: none, full, text. Flourish type hint: string, defaults to None. + :type chart_facet_title_bg: str, optional + :param chart_facet_title_bg_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_bg_color: str, optional + :param chart_facet_title_bg_padding: Padding. Horizontal space between text and background. Flourish type hint: number, defaults to None. + :type chart_facet_title_bg_padding: float, optional + :param facets_hide_empty: Hide empty charts when filtering. Flourish type hint: boolean, defaults to None. + :type facets_hide_empty: bool, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param link_opacity: Link opacity. Flourish type hint: number, defaults to None. + :type link_opacity: float, optional + :param background_opacity: Defocused opacity. When a node or link is in focus, this sets the opacity of the links and nodes not in focus. Flourish type hint: number, defaults to None. + :type background_opacity: float, optional + :param custom_node_color: Custom node color. Flourish type hint: color, defaults to None. + :type custom_node_color: str, optional + :param links_color_mode: Links color mode. Choices: node, source, target. Flourish type hint: string, defaults to None. + :type links_color_mode: str, optional + :param label_mode: Position. Choices: outwards, inwards. Flourish type hint: string, defaults to None. + :type label_mode: str, optional + :param label_outwards_max_width: Space. The max space available for the labels, as a percentage of the chart width. Flourish type hint: number, defaults to None. + :type label_outwards_max_width: float, optional + :param label_color_mode: Color mode. Choices: auto, fixed. Flourish type hint: string, defaults to None. + :type label_color_mode: str, optional + :param label_color: Color. Flourish type hint: color, defaults to None. + :type label_color: str, optional + :param label_bold: Bold. Flourish type hint: boolean, defaults to None. + :type label_bold: bool, optional + :param label_show_values: Include values. Flourish type hint: boolean, defaults to None. + :type label_show_values: bool, optional + :param label_show_values_links: Show link values. Choices: never, focused, always. Flourish type hint: string, defaults to None. + :type label_show_values_links: str, optional + :param label_color_links: Colour. Flourish type hint: color, defaults to None. + :type label_color_links: str, optional + :param label_outline: Outline. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type label_outline: bool, optional + :param label_outline_width: Width. As a percent of the font size. Flourish type hint: number, defaults to None. + :type label_outline_width: float, optional + :param label_font_size: Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type label_font_size: float, optional + :param label_facet_scaling: Scale with grid. Sets a max size based on the facet size, regardless of the page width. Flourish type hint: boolean, defaults to None. + :type label_facet_scaling: bool, optional + :param show_node_headings: Show headings. Enables the labels above each column of nodes in an Alluvial diagram. Flourish type hint: boolean, defaults to None. + :type show_node_headings: bool, optional + :param node_headings_bold: Bold. Flourish type hint: boolean, defaults to None. + :type node_headings_bold: bool, optional + :param node_headings_font_size: Font size. Flourish type hint: number, defaults to None. + :type node_headings_font_size: float, optional + :param node_headings_padding: Padding. Flourish type hint: number, defaults to None. + :type node_headings_padding: float, optional + :param node_headings_max_width: Max width. Flourish type hint: number, defaults to None. + :type node_headings_max_width: float, optional + :param node_headings_color: Color. Flourish type hint: color, defaults to None. + :type node_headings_color: str, optional + :param node_headings_overrides: Custom overrides. On each line, type the step heading that you want to override, a double colon and then the replacement step heading. For example: 1 :: Phase A 2 :: Phase B. Flourish type hint: text, defaults to None. + :type node_headings_overrides: Union[list, str], optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param filter_show_all: Include "All". Flourish type hint: boolean, defaults to None. + :type filter_show_all: bool, optional + :param filter_show_all_text: “All” label. Flourish type hint: string, defaults to None. + :type filter_show_all_text: str, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{LABEL}}` to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` If statements can also be used to show certain content for links only or nodes only. Use `{{#if IS_LINK}}` or `{{#if IS_NODE}}` like so: `{{#if IS_LINK}} This is a link popup {{/if}}` `{{#if IS_NODE}} This is a node popup {{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{LABEL}}` to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` If statements can also be used to show certain content for links only or nodes only. Use `{{#if IS_LINK}}` or `{{#if IS_NODE}}` like so: `{{#if IS_LINK}} This is a link popup {{/if}}` `{{#if IS_NODE}} This is a node popup {{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{LABEL}}` to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` If statements can also be used to show certain content for links only or nodes only. Use `{{#if IS_LINK}}` or `{{#if IS_NODE}}` like so: `{{#if IS_LINK}} This is a link panel {{/if}}` `{{#if IS_NODE}} This is a node panel {{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{LABEL}}` to include the Label for the current element. For links, this will show in the format of "Source Target", for nodes this will show the name of the node. For any other selected columns use `{{column_name}}`. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` If statements can also be used to show certain content for links only or nodes only. Use `{{#if IS_LINK}}` or `{{#if IS_NODE}}` like so: `{{#if IS_LINK}} This is a link panel {{/if}}` `{{#if IS_NODE}} This is a node panel {{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param popup_type: Type. Choices: links, nodes, all. Flourish type hint: string, defaults to None. + :type popup_type: str, optional + :param intro_duration: Duration. Flourish type hint: number, defaults to None. + :type intro_duration: float, optional + :param intro_ease_range: Speed variation. When set at zero, all the links are revealed at an even speed. When set above zero, the lines randomly accelerate and decelerate slightly to give a more natural effect. Flourish type hint: number, defaults to None. + :type intro_ease_range: float, optional + :param transition_duration: Duration. In seconds. Flourish type hint: number, defaults to None. + :type transition_duration: float, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "facets": {}, + "color": {}, + "filter_controls": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "slider_style": {}, + "popup": {}, + "formatting": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_mode = ["alluvial", "sankey"] + [None] + if mode not in list_mode: + raise ValueError(f"`mode` must be one of: ['alluvial', 'sankey']") + elif mode in list_mode and mode is not None: + filtered_dict = { + k: v + for (k, v) in {"alluvial": "alluvial", "sankey": "sankey"}.items() + if mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["mode"] = filtered_dict[mode] + + list_spread = ["step", "column"] + [None] + if spread not in list_spread: + raise ValueError(f"`spread` must be one of: ['step', 'column']") + elif spread in list_spread and spread is not None: + filtered_dict = { + k: v + for (k, v) in {"step": "step", "column": "column"}.items() + if spread in k + } + if len(filtered_dict) > 0: + self.state["state"]["spread"] = filtered_dict[spread] + + list_alignment = ["justify", "center", "left", "right"] + [None] + if alignment not in list_alignment: + raise ValueError( + f"`alignment` must be one of: ['justify', 'center', 'left', 'right']" + ) + elif alignment in list_alignment and alignment is not None: + filtered_dict = { + k: v + for (k, v) in { + "justify": "justify", + "center": "center", + "left": "left", + "right": "right", + }.items() + if alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["alignment"] = filtered_dict[alignment] + + list_sorting_mode = ["datasheet", "name", "value", "reduce_overlaps"] + [None] + if sorting_mode not in list_sorting_mode: + raise ValueError( + f"`sorting_mode` must be one of: ['datasheet', 'name', 'value', 'reduce_overlaps']" + ) + elif sorting_mode in list_sorting_mode and sorting_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "datasheet": "datasheet", + "name": "name", + "value": "value", + "reduce_overlaps": "reduce_overlaps", + }.items() + if sorting_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["sorting_mode"] = filtered_dict[sorting_mode] + + list_node_sort_order = ["ascending", "descending"] + [None] + if node_sort_order not in list_node_sort_order: + raise ValueError( + f"`node_sort_order` must be one of: ['ascending', 'descending']" + ) + elif node_sort_order in list_node_sort_order and node_sort_order is not None: + filtered_dict = { + k: v + for (k, v) in { + "ascending": "ascending", + "descending": "descending", + }.items() + if node_sort_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["node_sort_order"] = filtered_dict[node_sort_order] + self.state["state"]["iterations"] = iterations + self.state["state"]["setup_settings"] = setup_settings + self.state["state"]["node_width"] = node_width + self.state["state"]["node_padding"] = node_padding + self.state["state"]["top_padding"] = top_padding + self.state["state"]["bottom_padding"] = bottom_padding + + list_height_mode = ["aspect", "standard"] + [None] + if height_mode not in list_height_mode: + raise ValueError(f"`height_mode` must be one of: ['aspect', 'standard']") + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"aspect": "aspect", "standard": "standard"}.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + self.state["state"]["facet_aspect"] = facet_aspect + + list_chart_facet_columns_fixed = [False, True] + [None] + if chart_facet_columns_fixed not in list_chart_facet_columns_fixed: + raise ValueError( + f"`chart_facet_columns_fixed` must be one of: [False, True]" + ) + elif ( + chart_facet_columns_fixed in list_chart_facet_columns_fixed + and chart_facet_columns_fixed is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_facet_columns_fixed in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["columns_fixed"] = filtered_dict[ + chart_facet_columns_fixed + ] + self.state["state"]["facets"]["min_width"] = chart_facet_min_width + self.state["state"]["facets"]["max_width"] = chart_facet_max_width + self.state["state"]["facets"]["columns"] = chart_facet_columns + self.state["state"]["facets"]["gutter_w"] = chart_facet_gutter_w + self.state["state"]["facets"]["gutter_h"] = chart_facet_gutter_h + + list_chart_facet_animation = ["auto", "name", "reuse"] + [None] + if chart_facet_animation not in list_chart_facet_animation: + raise ValueError( + f"`chart_facet_animation` must be one of: ['auto', 'name', 'reuse']" + ) + elif ( + chart_facet_animation in list_chart_facet_animation + and chart_facet_animation is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "name": "name", "reuse": "reuse"}.items() + if chart_facet_animation in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["animation"] = filtered_dict[ + chart_facet_animation + ] + self.state["state"]["facets"]["titles"] = chart_facet_titles + + list_chart_facet_title_align = ["auto", "left", "center", "right"] + [None] + if chart_facet_title_align not in list_chart_facet_title_align: + raise ValueError( + f"`chart_facet_title_align` must be one of: ['auto', 'left', 'center', 'right']" + ) + elif ( + chart_facet_title_align in list_chart_facet_title_align + and chart_facet_title_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_facet_title_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_align"] = filtered_dict[ + chart_facet_title_align + ] + self.state["state"]["facets"]["title_size"] = chart_facet_title_size + + list_chart_facet_title_unit = ["rem", "facet"] + [None] + if chart_facet_title_unit not in list_chart_facet_title_unit: + raise ValueError( + f"`chart_facet_title_unit` must be one of: ['rem', 'facet']" + ) + elif ( + chart_facet_title_unit in list_chart_facet_title_unit + and chart_facet_title_unit is not None + ): + filtered_dict = { + k: v + for (k, v) in {"rem": "rem", "facet": "facet"}.items() + if chart_facet_title_unit in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_unit"] = filtered_dict[ + chart_facet_title_unit + ] + self.state["state"]["facets"]["title_color"] = chart_facet_title_color + self.state["state"]["facets"][ + "title_padding_top" + ] = chart_facet_title_padding_top + self.state["state"]["facets"][ + "title_padding_bottom" + ] = chart_facet_title_padding_bottom + + list_chart_facet_title_bg = ["none", "full", "text"] + [None] + if chart_facet_title_bg not in list_chart_facet_title_bg: + raise ValueError( + f"`chart_facet_title_bg` must be one of: ['none', 'full', 'text']" + ) + elif ( + chart_facet_title_bg in list_chart_facet_title_bg + and chart_facet_title_bg is not None + ): + filtered_dict = { + k: v + for (k, v) in {"none": "none", "full": "full", "text": "text"}.items() + if chart_facet_title_bg in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_bg"] = filtered_dict[ + chart_facet_title_bg + ] + self.state["state"]["facets"]["title_bg_color"] = chart_facet_title_bg_color + self.state["state"]["facets"]["title_bg_padding"] = chart_facet_title_bg_padding + self.state["state"]["facets_hide_empty"] = facets_hide_empty + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["link_opacity"] = link_opacity + self.state["state"]["background_opacity"] = background_opacity + self.state["state"]["custom_node_color"] = custom_node_color + + list_links_color_mode = ["node", "source", "target"] + [None] + if links_color_mode not in list_links_color_mode: + raise ValueError( + f"`links_color_mode` must be one of: ['node', 'source', 'target']" + ) + elif links_color_mode in list_links_color_mode and links_color_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "node": "node", + "source": "source", + "target": "target", + }.items() + if links_color_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["links_color_mode"] = filtered_dict[ + links_color_mode + ] + + list_label_mode = ["outwards", "inwards"] + [None] + if label_mode not in list_label_mode: + raise ValueError(f"`label_mode` must be one of: ['outwards', 'inwards']") + elif label_mode in list_label_mode and label_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"outwards": "outwards", "inwards": "inwards"}.items() + if label_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_mode"] = filtered_dict[label_mode] + self.state["state"]["label_outwards_max_width"] = label_outwards_max_width + + list_label_color_mode = ["auto", "fixed"] + [None] + if label_color_mode not in list_label_color_mode: + raise ValueError(f"`label_color_mode` must be one of: ['auto', 'fixed']") + elif label_color_mode in list_label_color_mode and label_color_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "fixed": "fixed"}.items() + if label_color_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_color_mode"] = filtered_dict[ + label_color_mode + ] + self.state["state"]["label_color"] = label_color + self.state["state"]["label_bold"] = label_bold + self.state["state"]["label_show_values"] = label_show_values + + list_label_show_values_links = ["never", "focused", "always"] + [None] + if label_show_values_links not in list_label_show_values_links: + raise ValueError( + f"`label_show_values_links` must be one of: ['never', 'focused', 'always']" + ) + elif ( + label_show_values_links in list_label_show_values_links + and label_show_values_links is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "never": "never", + "focused": "focused", + "always": "always", + }.items() + if label_show_values_links in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_show_values_links"] = filtered_dict[ + label_show_values_links + ] + self.state["state"]["label_color_links"] = label_color_links + + list_label_outline = [True, False] + [None] + if label_outline not in list_label_outline: + raise ValueError(f"`label_outline` must be one of: [True, False]") + elif label_outline in list_label_outline and label_outline is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if label_outline in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_outline"] = filtered_dict[label_outline] + self.state["state"]["label_outline_width"] = label_outline_width + self.state["state"]["label_font_size"] = label_font_size + self.state["state"]["label_facet_scaling"] = label_facet_scaling + self.state["state"]["show_node_headings"] = show_node_headings + self.state["state"]["node_headings_bold"] = node_headings_bold + self.state["state"]["node_headings_font_size"] = node_headings_font_size + self.state["state"]["node_headings_padding"] = node_headings_padding + self.state["state"]["node_headings_max_width"] = node_headings_max_width + self.state["state"]["node_headings_color"] = node_headings_color + + if ( + node_headings_overrides is not None + and len(node_headings_overrides) > 1 + and isinstance(node_headings_overrides, list) + ): + self.state["state"]["node_headings_overrides"] = " \n ".join( + node_headings_overrides + ) + else: + self.state["state"]["node_headings_overrides"] = node_headings_overrides + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_controls"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["filter_controls"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["filter_controls"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_controls"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_controls"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["filter_controls"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_controls"][ + "dropdown_width_mode" + ] = filtered_dict[chart_filter_controls_dropdown_width_mode] + self.state["state"]["filter_controls"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["filter_controls"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["filter_controls"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["filter_controls"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["filter_controls"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["filter_controls"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_controls"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["filter_show_all"] = filter_show_all + self.state["state"]["filter_show_all_text"] = filter_show_all_text + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["slider_style"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["slider_style"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["slider_style"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["slider_style"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["slider_style"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["slider_style"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["slider_style"][ + "play_button" + ] = chart_slider_control_style_play_button + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + + list_popup_type = ["links", "nodes", "all"] + [None] + if popup_type not in list_popup_type: + raise ValueError(f"`popup_type` must be one of: ['links', 'nodes', 'all']") + elif popup_type in list_popup_type and popup_type is not None: + filtered_dict = { + k: v + for (k, v) in {"links": "links", "nodes": "nodes", "all": "all"}.items() + if popup_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup_type"] = filtered_dict[popup_type] + self.state["state"]["intro_duration"] = intro_duration + self.state["state"]["intro_ease_range"] = intro_ease_range + self.state["state"]["transition_duration"] = transition_duration + self.state["state"]["formatting"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["formatting"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["formatting"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["formatting"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["formatting"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["formatting"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["formatting"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["formatting"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["formatting"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_scatter_details( + self, + default_color: str = None, + fill_opacity: float = None, + default_shape: str = None, + data_point_default_size: float = None, + data_point_min_size: float = None, + data_point_max_size: float = None, + responsive_dots: bool = None, + stroke_opacity: float = None, + stroke_width: float = None, + stroke_mode: str = None, + stroke_color: str = None, + render_mode: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + labels_show: bool = None, + labels_selective: bool = None, + label_color_type: str = None, + label_color: str = None, + labels_responsive: str = None, + label_font_size: float = None, + label_font_size_min: float = None, + label_font_size_max: float = None, + label_bg_size: float = None, + label_max_width: float = None, + label_align: str = None, + label_x_offset: str = None, + label_y_offset: str = None, + height_mode: str = None, + facet_aspect: float = None, + facet_aspect_mobile: float = None, + chart_background_background_color_enabled: bool = None, + chart_background_background_image_enabled: bool = None, + chart_background_background_color: str = None, + chart_background_background_image_src: str = None, + chart_background_background_image_size: str = None, + chart_background_background_image_position: str = None, + margin_top: float = None, + margin_right: float = None, + margin_bottom: float = None, + margin_left: float = None, + facet_fixed_cols: bool = None, + facet_min_w: float = None, + facet_cols: float = None, + facet_gutter_w: float = None, + facet_gutter_h: float = None, + facet_header_font_size: float = None, + facet_title_align: str = None, + facet_header_color: str = None, + lines_show: bool = None, + line_width: float = None, + line_curve: str = None, + line_opacity: float = None, + line_color_mode: str = None, + line_per_facet: bool = None, + line_color: str = None, + line_arrows: bool = None, + line_arrow_size: float = None, + line_arrow_color_mode: str = None, + line_arrow_color: str = None, + x_matching: bool = None, + x_single_row: bool = None, + chart_x_axis_axis_position: str = None, + chart_x_axis_y_axis_position: str = None, + chart_x_axis_numeric_scale_type: str = None, + chart_x_axis_linear_min: float = None, + chart_x_axis_linear_max: float = None, + chart_x_axis_log_min: float = None, + chart_x_axis_log_max: float = None, + chart_x_axis_datetime_min: str = None, + chart_x_axis_datetime_max: str = None, + chart_x_axis_flip: bool = None, + chart_x_axis_show_scale_settings: bool = None, + chart_x_axis_nice: bool = None, + chart_x_axis_zero_axis: str = None, + chart_x_axis_title_mode: str = None, + chart_x_axis_title: str = None, + chart_x_axis_title_styling: bool = None, + chart_x_axis_title_weight: str = None, + chart_x_axis_title_color: str = None, + chart_x_axis_title_size: float = None, + chart_x_axis_title_padding: float = None, + chart_x_axis_tick_label_position: str = None, + chart_x_axis_tick_label_styling: bool = None, + chart_x_axis_tick_label_size: float = None, + chart_x_axis_tick_label_color: str = None, + chart_x_axis_tick_padding: float = None, + chart_x_axis_tick_label_angle: str = None, + chart_x_axis_tick_label_weight: str = None, + chart_x_axis_tick_label_max_lines: float = None, + chart_x_axis_tick_label_line_height: float = None, + chart_x_axis_tick_label_space_mode: str = None, + chart_x_axis_tick_label_space: float = None, + chart_x_axis_tick_mode: str = None, + chart_x_axis_tick_number: float = None, + chart_x_axis_tick_custom: Union[list, str] = None, + chart_x_axis_line_and_tick_color: str = None, + chart_x_axis_line_and_tick_width: float = None, + chart_x_axis_tick_length: float = None, + chart_x_axis_tick_side: str = None, + chart_x_axis_line_visible: bool = None, + chart_x_axis_edge_padding: float = None, + chart_x_axis_gridlines_visible: bool = None, + chart_x_axis_gridlines_styling: bool = None, + chart_x_axis_gridline_color: str = None, + chart_x_axis_gridline_style: str = None, + chart_x_axis_gridline_width: float = None, + chart_x_axis_gridline_category_dividers: bool = None, + chart_x_axis_gridline_category_dividers_extend: bool = None, + chart_x_axis_number_date_format_prefix: str = None, + chart_x_axis_number_date_format_suffix: str = None, + chart_x_axis_number_date_format_n_dec: float = None, + chart_x_axis_number_date_format_advanced: bool = None, + chart_x_axis_number_date_format_negative_sign: str = None, + chart_x_axis_number_date_format_strip_zeros: bool = None, + chart_x_axis_number_date_format_strip_separator: bool = None, + chart_x_axis_number_date_format_transform_labels: bool = None, + chart_x_axis_number_date_format_transform: str = None, + chart_x_axis_number_date_format_multiply_divide_constant: float = None, + chart_x_axis_number_date_format_exponentiate_constant: float = None, + y_matching: bool = None, + y_single_col: bool = None, + chart_y_axis_axis_visible: bool = None, + chart_y_axis_numeric_scale_type: str = None, + chart_y_axis_linear_min: float = None, + chart_y_axis_linear_max: float = None, + chart_y_axis_log_min: float = None, + chart_y_axis_log_max: float = None, + chart_y_axis_datetime_min: str = None, + chart_y_axis_datetime_max: str = None, + chart_y_axis_flip: bool = None, + chart_y_axis_show_scale_settings: bool = None, + chart_y_axis_nice: bool = None, + chart_y_axis_zero_axis: str = None, + chart_y_axis_title_mode: str = None, + chart_y_axis_title: str = None, + chart_y_axis_title_styling: bool = None, + chart_y_axis_title_position: str = None, + chart_y_axis_title_weight: str = None, + chart_y_axis_title_color: str = None, + chart_y_axis_title_size: float = None, + chart_y_axis_title_padding: float = None, + chart_y_axis_tick_label_position: str = None, + chart_y_axis_tick_label_styling: bool = None, + chart_y_axis_tick_label_size: float = None, + chart_y_axis_tick_label_color: str = None, + chart_y_axis_tick_padding: float = None, + chart_y_axis_tick_label_angle: str = None, + chart_y_axis_tick_label_weight: str = None, + chart_y_axis_tick_label_max_lines: float = None, + chart_y_axis_tick_label_line_height: float = None, + chart_y_axis_tick_label_space_mode: str = None, + chart_y_axis_tick_label_space: float = None, + chart_y_axis_tick_mode: str = None, + chart_y_axis_tick_number: float = None, + chart_y_axis_tick_custom: Union[list, str] = None, + chart_y_axis_line_and_tick_color: str = None, + chart_y_axis_line_and_tick_width: float = None, + chart_y_axis_tick_length: float = None, + chart_y_axis_tick_side: str = None, + chart_y_axis_line_visible: bool = None, + chart_y_axis_edge_padding: float = None, + chart_y_axis_gridlines_visible: bool = None, + chart_y_axis_gridlines_styling: bool = None, + chart_y_axis_gridline_color: str = None, + chart_y_axis_gridline_style: str = None, + chart_y_axis_gridline_width: float = None, + chart_y_axis_gridline_category_dividers: bool = None, + chart_y_axis_gridline_category_dividers_extend: bool = None, + chart_y_axis_number_date_format_prefix: str = None, + chart_y_axis_number_date_format_suffix: str = None, + chart_y_axis_number_date_format_n_dec: float = None, + chart_y_axis_number_date_format_advanced: bool = None, + chart_y_axis_number_date_format_negative_sign: str = None, + chart_y_axis_number_date_format_strip_zeros: bool = None, + chart_y_axis_number_date_format_strip_separator: bool = None, + chart_y_axis_number_date_format_transform_labels: bool = None, + chart_y_axis_number_date_format_transform: str = None, + chart_y_axis_number_date_format_multiply_divide_constant: float = None, + chart_y_axis_number_date_format_exponentiate_constant: float = None, + legend_position: str = None, + legend_filtering_mode: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + chart_continous_legend_show_legend: bool = None, + chart_continous_legend_title_mode: str = None, + chart_continous_legend_title: str = None, + chart_continous_legend_color_band_width: float = None, + chart_continous_legend_color_band_height: float = None, + chart_continous_legend_color_band_radius: float = None, + chart_continous_legend_binned_label_mode: str = None, + chart_continous_legend_binned_label_custom: str = None, + chart_continous_legend_legend_min: float = None, + chart_continous_legend_additional_min_label: str = None, + chart_continous_legend_legend_max: float = None, + chart_continous_legend_additional_max_label: str = None, + text_legend: str = None, + text_legend_title: bool = None, + text_legend_subtitle: bool = None, + text_legend_bold: bool = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + filter_show_all: bool = None, + filter_show_all_text: str = None, + filter_updates_axes: str = None, + slider_updates_axes: str = None, + time_label_show: bool = None, + time_label_color: str = None, + time_label_opacity: float = None, + time_label_font_size: float = None, + chart_slider_filter_controls_control_type: str = None, + chart_slider_filter_controls_control_styles: bool = None, + chart_slider_filter_controls_control_title: str = None, + chart_slider_filter_controls_button_group: bool = None, + chart_slider_filter_controls_button_group_width_mode: str = None, + chart_slider_filter_controls_button_group_width_fixed: float = None, + chart_slider_filter_controls_dropdown_width_mode: str = None, + chart_slider_filter_controls_dropdown_width_fixed: float = None, + chart_slider_filter_controls_slider_width: float = None, + chart_slider_filter_controls_slider_max_label_width: float = None, + chart_slider_filter_controls_slider_step_time: float = None, + chart_slider_filter_controls_slider_loop: bool = None, + chart_slider_filter_controls_slider_restart_pause: float = None, + chart_slider_filter_controls_sort: bool = None, + chart_filter_controls_container_alignment: str = None, + chart_filter_controls_container_controls_spacing: float = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + fit_type: str = None, + fit_force_origin: bool = None, + fit_line_width: float = None, + fit_line_dash: float = None, + fit_line_color: str = None, + beeswarm_plot: bool = None, + box_plot: bool = None, + box_color: str = None, + box_opacity: float = None, + box_line_color: str = None, + box_line_width: float = None, + box_whisker_type: str = None, + box_whisker_multiplier: float = None, + use_box_popup: bool = None, + box_first_quartile_text: str = None, + box_median_text: str = None, + box_third_quartile_text: str = None, + violin_plot: bool = None, + violin_bandwidth: float = None, + violin_samples: float = None, + violin_color: str = None, + violin_opacity: float = None, + violin_sizing: str = None, + chart_axes_highlights_x_enabled: bool = None, + chart_axes_highlights_x_lines: Union[list, str] = None, + chart_axes_highlights_x_line_color: str = None, + chart_axes_highlights_x_line_width: float = None, + chart_axes_highlights_x_line_dash: float = None, + chart_axes_highlights_x_areas: Union[list, str] = None, + chart_axes_highlights_x_area_color: str = None, + chart_axes_highlights_x_area_opacity: float = None, + chart_axes_highlights_x_area_texture: str = None, + chart_axes_highlights_x_label_vertical: bool = None, + chart_axes_highlights_x_label_y_position: str = None, + chart_axes_highlights_x_label_x_position: str = None, + chart_axes_highlights_x_label_max_width: float = None, + chart_axes_highlights_x_font_size: float = None, + chart_axes_highlights_x_font_weight: str = None, + chart_axes_highlights_x_label_color: str = None, + chart_axes_highlights_x_shadow_color: str = None, + chart_axes_highlights_x_shadow_enabled: bool = None, + chart_axes_highlights_y_enabled: bool = None, + chart_axes_highlights_y_lines: Union[list, str] = None, + chart_axes_highlights_y_line_color: str = None, + chart_axes_highlights_y_line_width: float = None, + chart_axes_highlights_y_line_dash: float = None, + chart_axes_highlights_y_areas: Union[list, str] = None, + chart_axes_highlights_y_area_color: str = None, + chart_axes_highlights_y_area_opacity: float = None, + chart_axes_highlights_y_area_texture: str = None, + chart_axes_highlights_y_label_x_position: str = None, + chart_axes_highlights_y_label_y_position: str = None, + chart_axes_highlights_y_label_max_width: float = None, + chart_axes_highlights_y_font_size: float = None, + chart_axes_highlights_y_font_weight: str = None, + chart_axes_highlights_y_label_color: str = None, + chart_axes_highlights_y_shadow_color: str = None, + chart_axes_highlights_y_shadow_enabled: bool = None, + annotations_styling: bool = None, + chart_annotations_defaults_text_weight: str = None, + chart_annotations_defaults_text_size: float = None, + chart_annotations_defaults_text_color: str = None, + chart_annotations_defaults_label_width: float = None, + chart_annotations_defaults_text_background_mode: str = None, + chart_annotations_defaults_text_bg: str = None, + chart_annotations_defaults_label_bg: str = None, + chart_annotations_defaults_text_alignment: str = None, + chart_annotations_defaults_popup_position: str = None, + chart_annotations_defaults_line_marker: str = None, + chart_annotations_defaults_stroke_width: float = None, + chart_annotations_defaults_stroke_color: str = None, + chart_annotations_defaults_connector_extend_line: str = None, + animation_duration: float = None, + animation_stagger: float = None, + line_animate_in: bool = None, + line_animate_out: bool = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + chart_url_settings_enabled: bool = None, + chart_url_settings_whitelist: Union[list, str] = None, + ): + """ + Set chart details for: scatter. + + + :param default_color: Default color. Used when Color column is unspecified. Flourish type hint: color, defaults to None. + :type default_color: str, optional + :param fill_opacity: Dot opacity. Flourish type hint: number, defaults to None. + :type fill_opacity: float, optional + :param default_shape: Default shape. Choices: circle, cross, diamond, square, star, triangle, wye. Used when Shape column is unspecified or empty. Flourish type hint: string, defaults to None. + :type default_shape: str, optional + :param data_point_default_size: Size. In pixel area. Only used when Size column is unspecified or empty. Subject to scaling with the chart size (see setting below). Flourish type hint: number, defaults to None. + :type data_point_default_size: float, optional + :param data_point_min_size: Min size. In pixel area. Used when you have a Size column selected. Subject to scaling with the chart size. Flourish type hint: number, defaults to None. + :type data_point_min_size: float, optional + :param data_point_max_size: Max size. In pixel area. Used when you have a Size column selected. Subject to scaling with the chart size. Flourish type hint: number, defaults to None. + :type data_point_max_size: float, optional + :param responsive_dots: Scale dots based on chart size. Makes the dots get bigger or smaller relative to the chart size. Turn off to specify a fixed size regardless of chart size. Flourish type hint: boolean, defaults to None. + :type responsive_dots: bool, optional + :param stroke_opacity: Outline opacity. Flourish type hint: number, defaults to None. + :type stroke_opacity: float, optional + :param stroke_width: Outline width. Flourish type hint: number, defaults to None. + :type stroke_width: float, optional + :param stroke_mode: Outline mode. Choices: auto, fixed. Choose Auto for outline color to match dot color. Choose Fixed to give all dots a uniform outline color. Flourish type hint: string, defaults to None. + :type stroke_mode: str, optional + :param stroke_color: Outline color. Flourish type hint: color, defaults to None. + :type stroke_color: str, optional + :param render_mode: Renderer. Choices: svg, webgl. In most cases you should only need SVG, but you may want to choose WebGL if you have a lot of data or you notice your chart is running slowly on your device. Flourish type hint: string, defaults to None. + :type render_mode: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param labels_show: Show labels on points. Labels only show up if you have designated a Name column in the data tab. Flourish type hint: boolean, defaults to None. + :type labels_show: bool, optional + :param labels_selective: Labels to show. Choices: False, True. To show labels selectively, turn on this option and then make a story In the story editor, click on dots to hide/show the labels. Flourish type hint: boolean, defaults to None. + :type labels_selective: bool, optional + :param label_color_type: Label color. Choices: auto, match, fixed. Flourish type hint: string, defaults to None. + :type label_color_type: str, optional + :param label_color: Fixed. Flourish type hint: color, defaults to None. + :type label_color: str, optional + :param labels_responsive: Scale label. Choices: chart, data, none. Choose between no scale, scale by chart size, or try to fit the label in the data point. Flourish type hint: string, defaults to None. + :type labels_responsive: str, optional + :param label_font_size: Font size. Flourish type hint: number, defaults to None. + :type label_font_size: float, optional + :param label_font_size_min: Min font size. Flourish type hint: number, defaults to None. + :type label_font_size_min: float, optional + :param label_font_size_max: Max font size. Flourish type hint: number, defaults to None. + :type label_font_size_max: float, optional + :param label_bg_size: Shadow size. As percent of font size. Flourish type hint: number, defaults to None. + :type label_bg_size: float, optional + :param label_max_width: Max width. Flourish type hint: number, defaults to None. + :type label_max_width: float, optional + :param label_align: Alignment. Choices: auto, start, middle, end. Align the text at the start, middle or end of the data point. Flourish type hint: string, defaults to None. + :type label_align: str, optional + :param label_x_offset: Offset. Choices: top, next. Place labels on top of or next to the data point. Flourish type hint: string, defaults to None. + :type label_x_offset: str, optional + :param label_y_offset: Offset. Choices: top, above, below. Place labels on top of or next to the data point. Flourish type hint: string, defaults to None. + :type label_y_offset: str, optional + :param height_mode: Sizing mode. Choices: auto, fill_space, aspect. In Fill space mode the graphic will fill the container (which by default will be the the standard Flourish responsive chart size). In Aspect ratio mode, you set the aspect ratio of the plot, and the container will be updated to accommodate it (not supported when embedded in a simple fixed-height iframe ). Flourish type hint: string, defaults to None. + :type height_mode: str, optional + :param facet_aspect: Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type facet_aspect: float, optional + :param facet_aspect_mobile: Aspect (mobile). Aspect of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type facet_aspect_mobile: float, optional + :param chart_background_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_background_background_color_enabled: bool, optional + :param chart_background_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_background_background_image_enabled: bool, optional + :param chart_background_background_color: Color. Flourish type hint: color, defaults to None. + :type chart_background_background_color: str, optional + :param chart_background_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_background_background_image_src: str, optional + :param chart_background_background_image_size: Size. Choices: stretch, slice, meet. Flourish type hint: string, defaults to None. + :type chart_background_background_image_size: str, optional + :param chart_background_background_image_position: Position. Choices: x_min_y_min, x_mid_y_min, x_max_y_min, x_max_y_mid, x_mid_y_mid, x_min_y_max, x_mid_y_max, x_max_y_max. Flourish type hint: string, defaults to None. + :type chart_background_background_image_position: str, optional + :param margin_top: Top. Flourish type hint: number, defaults to None. + :type margin_top: float, optional + :param margin_right: Right. Flourish type hint: number, defaults to None. + :type margin_right: float, optional + :param margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type margin_bottom: float, optional + :param margin_left: Left. Flourish type hint: number, defaults to None. + :type margin_left: float, optional + :param facet_fixed_cols: Fixed number of columns in grid. Flourish type hint: boolean, defaults to None. + :type facet_fixed_cols: bool, optional + :param facet_min_w: Min chart width. Determines how many columns of charts there should be in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type facet_min_w: float, optional + :param facet_cols: Number of columns in grid. Flourish type hint: number, defaults to None. + :type facet_cols: float, optional + :param facet_gutter_w: Horizontal. In rems. Flourish type hint: number, defaults to None. + :type facet_gutter_w: float, optional + :param facet_gutter_h: Vertical. In rems. Flourish type hint: number, defaults to None. + :type facet_gutter_h: float, optional + :param facet_header_font_size: Text size. In rems. Flourish type hint: number, defaults to None. + :type facet_header_font_size: float, optional + :param facet_title_align: Alignment. Choices: auto, left, center. Flourish type hint: string, defaults to None. + :type facet_title_align: str, optional + :param facet_header_color: Color. Flourish type hint: color, defaults to None. + :type facet_header_color: str, optional + :param lines_show: Shows lines. Flourish type hint: boolean, defaults to None. + :type lines_show: bool, optional + :param line_width: Line width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type line_width: float, optional + :param line_curve: Line style. Choices: curve_linear, curve_natural. Flourish type hint: string, defaults to None. + :type line_curve: str, optional + :param line_opacity: Line opacity. Flourish type hint: number, defaults to None. + :type line_opacity: float, optional + :param line_color_mode: Line color. Choices: by_dot, fixed. When set to Match dots the lines will be the same as the first dot in the line. Flourish type hint: string, defaults to None. + :type line_color_mode: str, optional + :param line_per_facet: Lock lines to axes. Disable to allow lines to run between or animate between facets. Flourish type hint: boolean, defaults to None. + :type line_per_facet: bool, optional + :param line_color: Color. Flourish type hint: color, defaults to None. + :type line_color: str, optional + :param line_arrows: Arrow heads on lines. Flourish type hint: boolean, defaults to None. + :type line_arrows: bool, optional + :param line_arrow_size: Size. Flourish type hint: number, defaults to None. + :type line_arrow_size: float, optional + :param line_arrow_color_mode: Color mode. Choices: auto, fixed. Flourish type hint: string, defaults to None. + :type line_arrow_color_mode: str, optional + :param line_arrow_color: Color. Flourish type hint: color, defaults to None. + :type line_arrow_color: str, optional + :param x_matching: Matching x axis across grid of charts. Flourish type hint: boolean, defaults to None. + :type x_matching: bool, optional + :param x_single_row: Only show x axis on first column of grid. Flourish type hint: boolean, defaults to None. + :type x_single_row: bool, optional + :param chart_x_axis_axis_position: Position. Choices: bottom, float-below, float-above, top, off. Flourish type hint: string, defaults to None. + :type chart_x_axis_axis_position: str, optional + :param chart_x_axis_y_axis_position: Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to None. + :type chart_x_axis_y_axis_position: str, optional + :param chart_x_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_x_axis_numeric_scale_type: str, optional + :param chart_x_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_min: float, optional + :param chart_x_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_max: float, optional + :param chart_x_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_min: float, optional + :param chart_x_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_max: float, optional + :param chart_x_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_min: str, optional + :param chart_x_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_max: str, optional + :param chart_x_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_flip: bool, optional + :param chart_x_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_show_scale_settings: bool, optional + :param chart_x_axis_nice: Round min/max. Choices: True, False. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_nice: bool, optional + :param chart_x_axis_zero_axis: Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to None. + :type chart_x_axis_zero_axis: str, optional + :param chart_x_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_mode: str, optional + :param chart_x_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_x_axis_title: str, optional + :param chart_x_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_title_styling: bool, optional + :param chart_x_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_weight: str, optional + :param chart_x_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_title_color: str, optional + :param chart_x_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_size: float, optional + :param chart_x_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_padding: float, optional + :param chart_x_axis_tick_label_position: Position. Choices: default, left, right. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_position: str, optional + :param chart_x_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_tick_label_styling: bool, optional + :param chart_x_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_size: float, optional + :param chart_x_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_tick_label_color: str, optional + :param chart_x_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_padding: float, optional + :param chart_x_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_angle: str, optional + :param chart_x_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_weight: str, optional + :param chart_x_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_max_lines: float, optional + :param chart_x_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_line_height: float, optional + :param chart_x_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_space_mode: str, optional + :param chart_x_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_space: float, optional + :param chart_x_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_mode: str, optional + :param chart_x_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_number: float, optional + :param chart_x_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_x_axis_tick_custom: Union[list, str], optional + :param chart_x_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_x_axis_line_and_tick_color: str, optional + :param chart_x_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_x_axis_line_and_tick_width: float, optional + :param chart_x_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_length: float, optional + :param chart_x_axis_tick_side: Tick side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_side: str, optional + :param chart_x_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_line_visible: bool, optional + :param chart_x_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_x_axis_edge_padding: float, optional + :param chart_x_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_visible: bool, optional + :param chart_x_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_styling: bool, optional + :param chart_x_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_gridline_color: str, optional + :param chart_x_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_x_axis_gridline_style: str, optional + :param chart_x_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_x_axis_gridline_width: float, optional + :param chart_x_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers: bool, optional + :param chart_x_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers_extend: bool, optional + :param chart_x_axis_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_x_axis_number_date_format_prefix: str, optional + :param chart_x_axis_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_x_axis_number_date_format_suffix: str, optional + :param chart_x_axis_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_x_axis_number_date_format_n_dec: float, optional + :param chart_x_axis_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_number_date_format_advanced: bool, optional + :param chart_x_axis_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_x_axis_number_date_format_negative_sign: str, optional + :param chart_x_axis_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_number_date_format_strip_zeros: bool, optional + :param chart_x_axis_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_number_date_format_strip_separator: bool, optional + :param chart_x_axis_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_number_date_format_transform_labels: bool, optional + :param chart_x_axis_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_x_axis_number_date_format_transform: str, optional + :param chart_x_axis_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_x_axis_number_date_format_multiply_divide_constant: float, optional + :param chart_x_axis_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_x_axis_number_date_format_exponentiate_constant: float, optional + :param y_matching: Matching y axis across grid of charts. Flourish type hint: boolean, defaults to None. + :type y_matching: bool, optional + :param y_single_col: Only show Y axis on first column of grid. Flourish type hint: boolean, defaults to None. + :type y_single_col: bool, optional + :param chart_y_axis_axis_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_axis_visible: bool, optional + :param chart_y_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_y_axis_numeric_scale_type: str, optional + :param chart_y_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_min: float, optional + :param chart_y_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_max: float, optional + :param chart_y_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_min: float, optional + :param chart_y_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_max: float, optional + :param chart_y_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_min: str, optional + :param chart_y_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_max: str, optional + :param chart_y_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_flip: bool, optional + :param chart_y_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_show_scale_settings: bool, optional + :param chart_y_axis_nice: Round min/max. Choices: True, False. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_nice: bool, optional + :param chart_y_axis_zero_axis: Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to None. + :type chart_y_axis_zero_axis: str, optional + :param chart_y_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_mode: str, optional + :param chart_y_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_y_axis_title: str, optional + :param chart_y_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_title_styling: bool, optional + :param chart_y_axis_title_position: Position. Choices: side, end. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_position: str, optional + :param chart_y_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_weight: str, optional + :param chart_y_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_title_color: str, optional + :param chart_y_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_size: float, optional + :param chart_y_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_padding: float, optional + :param chart_y_axis_tick_label_position: Position. Choices: default, above, below. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_position: str, optional + :param chart_y_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_tick_label_styling: bool, optional + :param chart_y_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_size: float, optional + :param chart_y_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_tick_label_color: str, optional + :param chart_y_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_padding: float, optional + :param chart_y_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_angle: str, optional + :param chart_y_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_weight: str, optional + :param chart_y_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_max_lines: float, optional + :param chart_y_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_line_height: float, optional + :param chart_y_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_space_mode: str, optional + :param chart_y_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_space: float, optional + :param chart_y_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_mode: str, optional + :param chart_y_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_number: float, optional + :param chart_y_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_y_axis_tick_custom: Union[list, str], optional + :param chart_y_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_y_axis_line_and_tick_color: str, optional + :param chart_y_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_y_axis_line_and_tick_width: float, optional + :param chart_y_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_length: float, optional + :param chart_y_axis_tick_side: Side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_side: str, optional + :param chart_y_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_line_visible: bool, optional + :param chart_y_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_y_axis_edge_padding: float, optional + :param chart_y_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_visible: bool, optional + :param chart_y_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_styling: bool, optional + :param chart_y_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_gridline_color: str, optional + :param chart_y_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_y_axis_gridline_style: str, optional + :param chart_y_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_y_axis_gridline_width: float, optional + :param chart_y_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers: bool, optional + :param chart_y_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers_extend: bool, optional + :param chart_y_axis_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_y_axis_number_date_format_prefix: str, optional + :param chart_y_axis_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_y_axis_number_date_format_suffix: str, optional + :param chart_y_axis_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_y_axis_number_date_format_n_dec: float, optional + :param chart_y_axis_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_number_date_format_advanced: bool, optional + :param chart_y_axis_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_y_axis_number_date_format_negative_sign: str, optional + :param chart_y_axis_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_number_date_format_strip_zeros: bool, optional + :param chart_y_axis_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_number_date_format_strip_separator: bool, optional + :param chart_y_axis_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_number_date_format_transform_labels: bool, optional + :param chart_y_axis_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_y_axis_number_date_format_transform: str, optional + :param chart_y_axis_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_y_axis_number_date_format_multiply_divide_constant: float, optional + :param chart_y_axis_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_y_axis_number_date_format_exponentiate_constant: float, optional + :param legend_position: Legend position. Choices: above, below, off. The legend position relative to the chart. A legend will not show with a single entry. Flourish type hint: string, defaults to None. + :type legend_position: str, optional + :param legend_filtering_mode: Clickable legend. Choices: filter_out, filter_in, off. When a legend item is clicked on, the corresponding dots can either be hidden or shown. This option can also be turned off. Flourish type hint: string, defaults to None. + :type legend_filtering_mode: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param chart_continous_legend_show_legend: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_continous_legend_show_legend: bool, optional + :param chart_continous_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_continous_legend_title_mode: str, optional + :param chart_continous_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_continous_legend_title: str, optional + :param chart_continous_legend_color_band_width: Width. Flourish type hint: number, defaults to None. + :type chart_continous_legend_color_band_width: float, optional + :param chart_continous_legend_color_band_height: Height. Flourish type hint: number, defaults to None. + :type chart_continous_legend_color_band_height: float, optional + :param chart_continous_legend_color_band_radius: Roundness. The radius of the corners of the color band (in pixels). Flourish type hint: number, defaults to None. + :type chart_continous_legend_color_band_radius: float, optional + :param chart_continous_legend_binned_label_mode: Binned label mode. Choices: thresholds, centers, custom. Flourish type hint: string, defaults to None. + :type chart_continous_legend_binned_label_mode: str, optional + :param chart_continous_legend_binned_label_custom: Custom bin labels. List numeric values, separated by semi-colons. Flourish type hint: string, defaults to None. + :type chart_continous_legend_binned_label_custom: str, optional + :param chart_continous_legend_legend_min: Legend min. Flourish type hint: number, defaults to None. + :type chart_continous_legend_legend_min: float, optional + :param chart_continous_legend_additional_min_label: Custom min label. Flourish type hint: string, defaults to None. + :type chart_continous_legend_additional_min_label: str, optional + :param chart_continous_legend_legend_max: Legend max. Flourish type hint: number, defaults to None. + :type chart_continous_legend_legend_max: float, optional + :param chart_continous_legend_additional_max_label: Custom max label. Flourish type hint: string, defaults to None. + :type chart_continous_legend_additional_max_label: str, optional + :param text_legend: Choices: auto, custom, off. Flourish type hint: string, defaults to None. + :type text_legend: str, optional + :param text_legend_title: Title. Flourish type hint: boolean, defaults to None. + :type text_legend_title: bool, optional + :param text_legend_subtitle: Subtitle. Flourish type hint: boolean, defaults to None. + :type text_legend_subtitle: bool, optional + :param text_legend_bold: Bold. If checked, always use bold for colored items. Flourish type hint: boolean, defaults to None. + :type text_legend_bold: bool, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param filter_show_all: Include "All". Flourish type hint: boolean, defaults to None. + :type filter_show_all: bool, optional + :param filter_show_all_text: “All” label. Flourish type hint: string, defaults to None. + :type filter_show_all_text: str, optional + :param filter_updates_axes: Update axes when filtering. Choices: off, x, y, both. Flourish type hint: string, defaults to None. + :type filter_updates_axes: str, optional + :param slider_updates_axes: Update axes when using slider. Choices: off, x, y, both. Flourish type hint: string, defaults to None. + :type slider_updates_axes: str, optional + :param time_label_show: Show time label. Flourish type hint: boolean, defaults to None. + :type time_label_show: bool, optional + :param time_label_color: Color. Flourish type hint: color, defaults to None. + :type time_label_color: str, optional + :param time_label_opacity: Opacity. Flourish type hint: number, defaults to None. + :type time_label_opacity: float, optional + :param time_label_font_size: Size. As a percent of the default size; the actual size scales with the chart. Flourish type hint: number, defaults to None. + :type time_label_font_size: float, optional + :param chart_slider_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_slider_filter_controls_control_type: str, optional + :param chart_slider_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_slider_filter_controls_control_styles: bool, optional + :param chart_slider_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_slider_filter_controls_control_title: str, optional + :param chart_slider_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_slider_filter_controls_button_group: bool, optional + :param chart_slider_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_slider_filter_controls_button_group_width_mode: str, optional + :param chart_slider_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_button_group_width_fixed: float, optional + :param chart_slider_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_slider_filter_controls_dropdown_width_mode: str, optional + :param chart_slider_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_dropdown_width_fixed: float, optional + :param chart_slider_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_slider_width: float, optional + :param chart_slider_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_slider_max_label_width: float, optional + :param chart_slider_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_slider_step_time: float, optional + :param chart_slider_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_slider_filter_controls_slider_loop: bool, optional + :param chart_slider_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_slider_filter_controls_slider_restart_pause: float, optional + :param chart_slider_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_slider_filter_controls_sort: bool, optional + :param chart_filter_controls_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_filter_controls_container_alignment: str, optional + :param chart_filter_controls_container_controls_spacing: Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to None. + :type chart_filter_controls_container_controls_spacing: float, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param fit_type: Lines to show. Choices: none, both, color, chart, all. Flourish type hint: string, defaults to None. + :type fit_type: str, optional + :param fit_force_origin: Force line through origin. Flourish type hint: boolean, defaults to None. + :type fit_force_origin: bool, optional + :param fit_line_width: Width. Flourish type hint: number, defaults to None. + :type fit_line_width: float, optional + :param fit_line_dash: Dash. Flourish type hint: number, defaults to None. + :type fit_line_dash: float, optional + :param fit_line_color: Color. Flourish type hint: color, defaults to None. + :type fit_line_color: str, optional + :param beeswarm_plot: Show beeswarm when plotting one numerical and one categorical axis. Choices: True, False. Auto mode will make a beeswarm unless there are more than 5000 points in the dataset. Note: Performance will be reduced with thousands of rows due to the nature of how beeswarm positions are computed. Flourish type hint: boolean, defaults to None. + :type beeswarm_plot: bool, optional + :param box_plot: Show box plot when plotting one numerical and one categorical axis. Choices: True, False. To learn more about box plots see here. Flourish type hint: boolean, defaults to None. + :type box_plot: bool, optional + :param box_color: Box color. Flourish type hint: color, defaults to None. + :type box_color: str, optional + :param box_opacity: Box opacity. Flourish type hint: number, defaults to None. + :type box_opacity: float, optional + :param box_line_color: Line color. Flourish type hint: color, defaults to None. + :type box_line_color: str, optional + :param box_line_width: Line width. Flourish type hint: number, defaults to None. + :type box_line_width: float, optional + :param box_whisker_type: Whisker type. Choices: tukey, all. Flourish type hint: string, defaults to None. + :type box_whisker_type: str, optional + :param box_whisker_multiplier: Max whisker length (number of IQRs). Maximum distance whiskers should extend out from the box as a multiple of the interquartile range. 1.5 is John Tukeys classsic value. Flourish type hint: number, defaults to None. + :type box_whisker_multiplier: float, optional + :param use_box_popup: Box popup. If enabled, shows a popup for the box describing the first quartile, median, and third quartile. The user will not be able to access the popups for the points underneath the box. Flourish type hint: boolean, defaults to None. + :type use_box_popup: bool, optional + :param box_first_quartile_text: First quartile. Flourish type hint: string, defaults to None. + :type box_first_quartile_text: str, optional + :param box_median_text: Median. Flourish type hint: string, defaults to None. + :type box_median_text: str, optional + :param box_third_quartile_text: Third quartile. Flourish type hint: string, defaults to None. + :type box_third_quartile_text: str, optional + :param violin_plot: Show violin plot when plotting one numerical and one categorical axis. Choices: True, False. To learn more about violin plots see here. Flourish type hint: boolean, defaults to None. + :type violin_plot: bool, optional + :param violin_bandwidth: Bandwidth. The bandwidth in a violin plot determines the degree of smoothing applied to the probability density function estimating the shape of the plot. Generally, larger bandwidth values create a smoother plot with less detail, while smaller values create a more precise plot with more detail. Flourish type hint: number, defaults to None. + :type violin_bandwidth: float, optional + :param violin_samples: No. of samples. Number of points at which to calculate a violins distribution. More points means a more accurate curve but can also harm performance. Flourish type hint: number, defaults to None. + :type violin_samples: float, optional + :param violin_color: Color. Flourish type hint: color, defaults to None. + :type violin_color: str, optional + :param violin_opacity: Opacity. Flourish type hint: number, defaults to None. + :type violin_opacity: float, optional + :param violin_sizing: Sizing mode. Choices: area, width. Flourish type hint: string, defaults to None. + :type violin_sizing: str, optional + :param chart_axes_highlights_x_enabled: Show highlights on the x axis. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_enabled: bool, optional + :param chart_axes_highlights_x_lines: One per line, in format “My label :: 2012”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart. Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example, `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to None. + :type chart_axes_highlights_x_lines: Union[list, str], optional + :param chart_axes_highlights_x_line_color: Line color. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_line_color: str, optional + :param chart_axes_highlights_x_line_width: Line width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_line_width: float, optional + :param chart_axes_highlights_x_line_dash: Dash. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_line_dash: float, optional + :param chart_axes_highlights_x_areas: One per line, in format “My label :: 2013 >> 2015”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example, `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to None. + :type chart_axes_highlights_x_areas: Union[list, str], optional + :param chart_axes_highlights_x_area_color: Area. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_area_color: str, optional + :param chart_axes_highlights_x_area_opacity: Area opacity. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_area_opacity: float, optional + :param chart_axes_highlights_x_area_texture: Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_area_texture: str, optional + :param chart_axes_highlights_x_label_vertical: Vertical. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_label_vertical: bool, optional + :param chart_axes_highlights_x_label_y_position: Y position. Choices: bottom, middle, top. Vertically position the label at the top, bottom or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_label_y_position: str, optional + :param chart_axes_highlights_x_label_x_position: X position. Choices: left, middle, right. Horizontally position the label on the left, the right or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_label_x_position: str, optional + :param chart_axes_highlights_x_label_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_label_max_width: float, optional + :param chart_axes_highlights_x_font_size: Font size. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_x_font_size: float, optional + :param chart_axes_highlights_x_font_weight: Font weight. Choices: regular, bold. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_x_font_weight: str, optional + :param chart_axes_highlights_x_label_color: Text. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_label_color: str, optional + :param chart_axes_highlights_x_shadow_color: Shadow. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_x_shadow_color: str, optional + :param chart_axes_highlights_x_shadow_enabled: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_x_shadow_enabled: bool, optional + :param chart_axes_highlights_y_enabled: Show highlights on the y axis. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_y_enabled: bool, optional + :param chart_axes_highlights_y_lines: One per line, in format “My label :: 5000”. One per line, using the format : My label :: 2012 For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: `My label :: 2012 :: line_color / text_color :: facet_name`. For example: `My label :: 2012 :: #eb0000 / #0084bd :: Category 1`. If you want to add an annotation to just one specific chart but do not want to color the line/text, you can leave that part blank. For example: My label :: 2012 :: :: Category 1 Flourish type hint: text, defaults to None. + :type chart_axes_highlights_y_lines: Union[list, str], optional + :param chart_axes_highlights_y_line_color: Line color. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_line_color: str, optional + :param chart_axes_highlights_y_line_width: line width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_line_width: float, optional + :param chart_axes_highlights_y_line_dash: Dash. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_line_dash: float, optional + :param chart_axes_highlights_y_areas: One per line, in format “My label :: 2000 >> 8000”. One per line, using the format : My label :: date >> date For dates, use the input format as specified in the datasheet. You can optionally specify a line color and a text color For visualizations using a grid of charts , you can apply the annotation only on a specific chart Use the format: My label :: 2012 :: area_color / text_color :: facet_name For example: `My label :: 2012 >> 2015 :: #eb0000 / #0084bd :: Category 1`. Flourish type hint: text, defaults to None. + :type chart_axes_highlights_y_areas: Union[list, str], optional + :param chart_axes_highlights_y_area_color: Area. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_area_color: str, optional + :param chart_axes_highlights_y_area_opacity: Area opacity. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_area_opacity: float, optional + :param chart_axes_highlights_y_area_texture: Area texture. Choices: none, pattern-diagonal, pattern-grid, pattern-dots. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_area_texture: str, optional + :param chart_axes_highlights_y_label_x_position: X position. Choices: left, middle, right. Horizontally position label on the left, the middle or the right end of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_label_x_position: str, optional + :param chart_axes_highlights_y_label_y_position: Y position. Choices: above, middle, below. Vertically position the label above, below or in the middle of the line. This setting will be ignored if there is not enough space for the selected position. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_label_y_position: str, optional + :param chart_axes_highlights_y_label_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_label_max_width: float, optional + :param chart_axes_highlights_y_font_size: Font size. Flourish type hint: number, defaults to None. + :type chart_axes_highlights_y_font_size: float, optional + :param chart_axes_highlights_y_font_weight: Font weight. Choices: regular, bold. Flourish type hint: string, defaults to None. + :type chart_axes_highlights_y_font_weight: str, optional + :param chart_axes_highlights_y_label_color: Text. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_label_color: str, optional + :param chart_axes_highlights_y_shadow_color: Shadow. Flourish type hint: color, defaults to None. + :type chart_axes_highlights_y_shadow_color: str, optional + :param chart_axes_highlights_y_shadow_enabled: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_axes_highlights_y_shadow_enabled: bool, optional + :param annotations_styling: Show annotations styling. Flourish type hint: boolean, defaults to None. + :type annotations_styling: bool, optional + :param chart_annotations_defaults_text_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_text_weight: str, optional + :param chart_annotations_defaults_text_size: Text size. Flourish type hint: number, defaults to None. + :type chart_annotations_defaults_text_size: float, optional + :param chart_annotations_defaults_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_text_color: str, optional + :param chart_annotations_defaults_label_width: Max width. Flourish type hint: number, defaults to None. + :type chart_annotations_defaults_label_width: float, optional + :param chart_annotations_defaults_text_background_mode: Text background. Choices: none, outline, background. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_text_background_mode: str, optional + :param chart_annotations_defaults_text_bg: Outline. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_text_bg: str, optional + :param chart_annotations_defaults_label_bg: Background. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_label_bg: str, optional + :param chart_annotations_defaults_text_alignment: Alignment. Choices: auto, start, center, end. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_text_alignment: str, optional + :param chart_annotations_defaults_popup_position: Popup position. Choices: center, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_popup_position: str, optional + :param chart_annotations_defaults_line_marker: Marker. Choices: none, arrowhead_open, arrowhead. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_line_marker: str, optional + :param chart_annotations_defaults_stroke_width: Width. Flourish type hint: number, defaults to None. + :type chart_annotations_defaults_stroke_width: float, optional + :param chart_annotations_defaults_stroke_color: Color. Flourish type hint: color, defaults to None. + :type chart_annotations_defaults_stroke_color: str, optional + :param chart_annotations_defaults_connector_extend_line: Extend line. Choices: enabled, disabled. Flourish type hint: string, defaults to None. + :type chart_annotations_defaults_connector_extend_line: str, optional + :param animation_duration: Animation duration. The duration of the animation for each dot or axis, in seconds. The animation can be seen between slides in a Flourish story. Flourish type hint: number, defaults to None. + :type animation_duration: float, optional + :param animation_stagger: Animation stagger. The delay between each dot starting to move, in seconds; set to 0 to have all dots move simultaneously. Flourish type hint: number, defaults to None. + :type animation_stagger: float, optional + :param line_animate_in: Animate new lines in. Whether new lines should appear whole or be animated into view. Flourish type hint: boolean, defaults to None. + :type line_animate_in: bool, optional + :param line_animate_out: Animate exiting lines. Whether filtered/removed lines should be removed whole or animated out of view. Flourish type hint: boolean, defaults to None. + :type line_animate_out: bool, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + :param chart_url_settings_enabled: Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to None. + :type chart_url_settings_enabled: bool, optional + :param chart_url_settings_whitelist: Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to None. + :type chart_url_settings_whitelist: Union[list, str], optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "chart_bg": {}, + "x": {}, + "x_formatting": {}, + "y": {}, + "y_formatting": {}, + "legend_container": {}, + "categorical_legend": {}, + "continuous_legend": {}, + "color_formatting": {}, + "popup": {}, + "filter": {}, + "slider": {}, + "controls_container": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "slider_style": {}, + "axes_highlights": {}, + "annotations": {"defaults": {}}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + "url_state": {}, + } + } + + self.state["state"]["default_color"] = default_color + self.state["state"]["fill_opacity"] = fill_opacity + + list_default_shape = [ + "circle", + "cross", + "diamond", + "square", + "star", + "triangle", + "wye", + ] + [None] + if default_shape not in list_default_shape: + raise ValueError( + f"`default_shape` must be one of: ['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']" + ) + elif default_shape in list_default_shape and default_shape is not None: + filtered_dict = { + k: v + for (k, v) in { + "circle": "symbolCircle", + "cross": "symbolCross", + "diamond": "symbolDiamond", + "square": "symbolSquare", + "star": "symbolStar", + "triangle": "symbolTriangle", + "wye": "symbolWye", + }.items() + if default_shape in k + } + if len(filtered_dict) > 0: + self.state["state"]["default_shape"] = filtered_dict[default_shape] + self.state["state"]["data_point_default_size"] = data_point_default_size + self.state["state"]["data_point_min_size"] = data_point_min_size + self.state["state"]["data_point_max_size"] = data_point_max_size + self.state["state"]["responsive_dots"] = responsive_dots + self.state["state"]["stroke_opacity"] = stroke_opacity + self.state["state"]["stroke_width"] = stroke_width + + list_stroke_mode = ["auto", "fixed"] + [None] + if stroke_mode not in list_stroke_mode: + raise ValueError(f"`stroke_mode` must be one of: ['auto', 'fixed']") + elif stroke_mode in list_stroke_mode and stroke_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "fixed": "fixed"}.items() + if stroke_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["stroke_mode"] = filtered_dict[stroke_mode] + self.state["state"]["stroke_color"] = stroke_color + + list_render_mode = ["svg", "webgl"] + [None] + if render_mode not in list_render_mode: + raise ValueError(f"`render_mode` must be one of: ['svg', 'webgl']") + elif render_mode in list_render_mode and render_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"svg": "svg", "webgl": "webgl"}.items() + if render_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["render_mode"] = filtered_dict[render_mode] + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["labels_show"] = labels_show + + list_labels_selective = [False, True] + [None] + if labels_selective not in list_labels_selective: + raise ValueError(f"`labels_selective` must be one of: [False, True]") + elif labels_selective in list_labels_selective and labels_selective is not None: + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if labels_selective in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_selective"] = filtered_dict[ + labels_selective + ] + + list_label_color_type = ["auto", "match", "fixed"] + [None] + if label_color_type not in list_label_color_type: + raise ValueError( + f"`label_color_type` must be one of: ['auto', 'match', 'fixed']" + ) + elif label_color_type in list_label_color_type and label_color_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "match": "match", + "fixed": "fixed", + }.items() + if label_color_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_color_type"] = filtered_dict[ + label_color_type + ] + self.state["state"]["label_color"] = label_color + + list_labels_responsive = ["chart", "data", "none"] + [None] + if labels_responsive not in list_labels_responsive: + raise ValueError( + f"`labels_responsive` must be one of: ['chart', 'data', 'none']" + ) + elif ( + labels_responsive in list_labels_responsive + and labels_responsive is not None + ): + filtered_dict = { + k: v + for (k, v) in {"chart": "chart", "data": "data", "none": "none"}.items() + if labels_responsive in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_responsive"] = filtered_dict[ + labels_responsive + ] + self.state["state"]["label_font_size"] = label_font_size + self.state["state"]["label_font_size_min"] = label_font_size_min + self.state["state"]["label_font_size_max"] = label_font_size_max + self.state["state"]["label_bg_size"] = label_bg_size + self.state["state"]["label_max_width"] = label_max_width + + list_label_align = ["auto", "start", "middle", "end"] + [None] + if label_align not in list_label_align: + raise ValueError( + f"`label_align` must be one of: ['auto', 'start', 'middle', 'end']" + ) + elif label_align in list_label_align and label_align is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "start": "start", + "middle": "middle", + "end": "end", + }.items() + if label_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_align"] = filtered_dict[label_align] + + list_label_x_offset = ["top", "next"] + [None] + if label_x_offset not in list_label_x_offset: + raise ValueError(f"`label_x_offset` must be one of: ['top', 'next']") + elif label_x_offset in list_label_x_offset and label_x_offset is not None: + filtered_dict = { + k: v + for (k, v) in {"top": "top", "next": "next"}.items() + if label_x_offset in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_x_offset"] = filtered_dict[label_x_offset] + + list_label_y_offset = ["top", "above", "below"] + [None] + if label_y_offset not in list_label_y_offset: + raise ValueError( + f"`label_y_offset` must be one of: ['top', 'above', 'below']" + ) + elif label_y_offset in list_label_y_offset and label_y_offset is not None: + filtered_dict = { + k: v + for (k, v) in {"top": "top", "above": "above", "below": "below"}.items() + if label_y_offset in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_y_offset"] = filtered_dict[label_y_offset] + + list_height_mode = ["auto", "fill_space", "aspect"] + [None] + if height_mode not in list_height_mode: + raise ValueError( + f"`height_mode` must be one of: ['auto', 'fill_space', 'aspect']" + ) + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "fill_space": "fill_space", + "aspect": "aspect", + }.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + self.state["state"]["facet_aspect"] = facet_aspect + self.state["state"]["facet_aspect_mobile"] = facet_aspect_mobile + + list_chart_background_background_color_enabled = [True, False] + [None] + if ( + chart_background_background_color_enabled + not in list_chart_background_background_color_enabled + ): + raise ValueError( + f"`chart_background_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_background_background_color_enabled + in list_chart_background_background_color_enabled + and chart_background_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_background_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_color_enabled" + ] = filtered_dict[chart_background_background_color_enabled] + + list_chart_background_background_image_enabled = [True, False] + [None] + if ( + chart_background_background_image_enabled + not in list_chart_background_background_image_enabled + ): + raise ValueError( + f"`chart_background_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_background_background_image_enabled + in list_chart_background_background_image_enabled + and chart_background_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_background_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_image_enabled" + ] = filtered_dict[chart_background_background_image_enabled] + self.state["state"]["chart_bg"][ + "background_color" + ] = chart_background_background_color + self.state["state"]["chart_bg"][ + "background_image_src" + ] = chart_background_background_image_src + + list_chart_background_background_image_size = ["stretch", "slice", "meet"] + [ + None + ] + if ( + chart_background_background_image_size + not in list_chart_background_background_image_size + ): + raise ValueError( + f"`chart_background_background_image_size` must be one of: ['stretch', 'slice', 'meet']" + ) + elif ( + chart_background_background_image_size + in list_chart_background_background_image_size + and chart_background_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "stretch": "stretch", + "slice": "slice", + "meet": "meet", + }.items() + if chart_background_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_image_size" + ] = filtered_dict[chart_background_background_image_size] + + list_chart_background_background_image_position = [ + "x_min_y_min", + "x_mid_y_min", + "x_max_y_min", + "x_max_y_mid", + "x_mid_y_mid", + "x_min_y_max", + "x_mid_y_max", + "x_max_y_max", + ] + [None] + if ( + chart_background_background_image_position + not in list_chart_background_background_image_position + ): + raise ValueError( + f"`chart_background_background_image_position` must be one of: ['x_min_y_min', 'x_mid_y_min', 'x_max_y_min', 'x_max_y_mid', 'x_mid_y_mid', 'x_min_y_max', 'x_mid_y_max', 'x_max_y_max']" + ) + elif ( + chart_background_background_image_position + in list_chart_background_background_image_position + and chart_background_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "x_min_y_min": "xMinYMin", + "x_mid_y_min": "xMidYMin", + "x_max_y_min": "xMaxYMin", + "x_max_y_mid": "xMaxYMid", + "x_mid_y_mid": "xMidYMid", + "x_min_y_max": "xMinYMax", + "x_mid_y_max": "xMidYMax", + "x_max_y_max": "xMaxYMax", + }.items() + if chart_background_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_bg"][ + "background_image_position" + ] = filtered_dict[chart_background_background_image_position] + self.state["state"]["margin_top"] = margin_top + self.state["state"]["margin_right"] = margin_right + self.state["state"]["margin_bottom"] = margin_bottom + self.state["state"]["margin_left"] = margin_left + self.state["state"]["facet_fixed_cols"] = facet_fixed_cols + self.state["state"]["facet_min_w"] = facet_min_w + self.state["state"]["facet_cols"] = facet_cols + self.state["state"]["facet_gutter_w"] = facet_gutter_w + self.state["state"]["facet_gutter_h"] = facet_gutter_h + self.state["state"]["facet_header_font_size"] = facet_header_font_size + + list_facet_title_align = ["auto", "left", "center"] + [None] + if facet_title_align not in list_facet_title_align: + raise ValueError( + f"`facet_title_align` must be one of: ['auto', 'left', 'center']" + ) + elif ( + facet_title_align in list_facet_title_align + and facet_title_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "left": "left", + "center": "center", + }.items() + if facet_title_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["facet_title_align"] = filtered_dict[ + facet_title_align + ] + self.state["state"]["facet_header_color"] = facet_header_color + self.state["state"]["lines_show"] = lines_show + self.state["state"]["line_width"] = line_width + + list_line_curve = ["curve_linear", "curve_natural"] + [None] + if line_curve not in list_line_curve: + raise ValueError( + f"`line_curve` must be one of: ['curve_linear', 'curve_natural']" + ) + elif line_curve in list_line_curve and line_curve is not None: + filtered_dict = { + k: v + for (k, v) in { + "curve_linear": "curveLinear", + "curve_natural": "curveNatural", + }.items() + if line_curve in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_curve"] = filtered_dict[line_curve] + self.state["state"]["line_opacity"] = line_opacity + + list_line_color_mode = ["by_dot", "fixed"] + [None] + if line_color_mode not in list_line_color_mode: + raise ValueError(f"`line_color_mode` must be one of: ['by_dot', 'fixed']") + elif line_color_mode in list_line_color_mode and line_color_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"by_dot": "by_dot", "fixed": "fixed"}.items() + if line_color_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_color_mode"] = filtered_dict[line_color_mode] + self.state["state"]["line_per_facet"] = line_per_facet + self.state["state"]["line_color"] = line_color + self.state["state"]["line_arrows"] = line_arrows + self.state["state"]["line_arrow_size"] = line_arrow_size + + list_line_arrow_color_mode = ["auto", "fixed"] + [None] + if line_arrow_color_mode not in list_line_arrow_color_mode: + raise ValueError( + f"`line_arrow_color_mode` must be one of: ['auto', 'fixed']" + ) + elif ( + line_arrow_color_mode in list_line_arrow_color_mode + and line_arrow_color_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "fixed": "fixed"}.items() + if line_arrow_color_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_arrow_color_mode"] = filtered_dict[ + line_arrow_color_mode + ] + self.state["state"]["line_arrow_color"] = line_arrow_color + self.state["state"]["x_matching"] = x_matching + self.state["state"]["x_single_row"] = x_single_row + + list_chart_x_axis_axis_position = [ + "bottom", + "float-below", + "float-above", + "top", + "off", + ] + [None] + if chart_x_axis_axis_position not in list_chart_x_axis_axis_position: + raise ValueError( + f"`chart_x_axis_axis_position` must be one of: ['bottom', 'float-below', 'float-above', 'top', 'off']" + ) + elif ( + chart_x_axis_axis_position in list_chart_x_axis_axis_position + and chart_x_axis_axis_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "float-below": "float-below", + "float-above": "float-above", + "top": "top", + "off": "off", + }.items() + if chart_x_axis_axis_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["axis_position"] = filtered_dict[ + chart_x_axis_axis_position + ] + self.state["state"]["x"]["y_axis_position"] = chart_x_axis_y_axis_position + + list_chart_x_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_x_axis_numeric_scale_type not in list_chart_x_axis_numeric_scale_type: + raise ValueError( + f"`chart_x_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_x_axis_numeric_scale_type in list_chart_x_axis_numeric_scale_type + and chart_x_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_x_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["numeric_scale_type"] = filtered_dict[ + chart_x_axis_numeric_scale_type + ] + self.state["state"]["x"]["linear_min"] = chart_x_axis_linear_min + self.state["state"]["x"]["linear_max"] = chart_x_axis_linear_max + self.state["state"]["x"]["log_min"] = chart_x_axis_log_min + self.state["state"]["x"]["log_max"] = chart_x_axis_log_max + self.state["state"]["x"]["datetime_min"] = chart_x_axis_datetime_min + self.state["state"]["x"]["datetime_max"] = chart_x_axis_datetime_max + self.state["state"]["x"]["flip"] = chart_x_axis_flip + self.state["state"]["x"][ + "show_scale_settings" + ] = chart_x_axis_show_scale_settings + + list_chart_x_axis_nice = [True, False] + [None] + if chart_x_axis_nice not in list_chart_x_axis_nice: + raise ValueError(f"`chart_x_axis_nice` must be one of: [True, False]") + elif ( + chart_x_axis_nice in list_chart_x_axis_nice + and chart_x_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["nice"] = filtered_dict[chart_x_axis_nice] + + list_chart_x_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_x_axis_zero_axis not in list_chart_x_axis_zero_axis: + raise ValueError( + f"`chart_x_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_x_axis_zero_axis in list_chart_x_axis_zero_axis + and chart_x_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_x_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["zero_axis"] = filtered_dict[ + chart_x_axis_zero_axis + ] + + list_chart_x_axis_title_mode = ["auto", "custom"] + [None] + if chart_x_axis_title_mode not in list_chart_x_axis_title_mode: + raise ValueError( + f"`chart_x_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_x_axis_title_mode in list_chart_x_axis_title_mode + and chart_x_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_x_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_mode"] = filtered_dict[ + chart_x_axis_title_mode + ] + self.state["state"]["x"]["title"] = chart_x_axis_title + self.state["state"]["x"]["title_styling"] = chart_x_axis_title_styling + + list_chart_x_axis_title_weight = ["bold", "normal"] + [None] + if chart_x_axis_title_weight not in list_chart_x_axis_title_weight: + raise ValueError( + f"`chart_x_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_title_weight in list_chart_x_axis_title_weight + and chart_x_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_weight"] = filtered_dict[ + chart_x_axis_title_weight + ] + self.state["state"]["x"]["title_color"] = chart_x_axis_title_color + self.state["state"]["x"]["title_size"] = chart_x_axis_title_size + self.state["state"]["x"]["title_padding"] = chart_x_axis_title_padding + + list_chart_x_axis_tick_label_position = ["default", "left", "right"] + [None] + if ( + chart_x_axis_tick_label_position + not in list_chart_x_axis_tick_label_position + ): + raise ValueError( + f"`chart_x_axis_tick_label_position` must be one of: ['default', 'left', 'right']" + ) + elif ( + chart_x_axis_tick_label_position in list_chart_x_axis_tick_label_position + and chart_x_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "left": "left", + "right": "right", + }.items() + if chart_x_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_position"] = filtered_dict[ + chart_x_axis_tick_label_position + ] + self.state["state"]["x"]["tick_label_styling"] = chart_x_axis_tick_label_styling + self.state["state"]["x"]["tick_label_size"] = chart_x_axis_tick_label_size + self.state["state"]["x"]["tick_label_color"] = chart_x_axis_tick_label_color + self.state["state"]["x"]["tick_padding"] = chart_x_axis_tick_padding + + list_chart_x_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_x_axis_tick_label_angle not in list_chart_x_axis_tick_label_angle: + raise ValueError( + f"`chart_x_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_x_axis_tick_label_angle in list_chart_x_axis_tick_label_angle + and chart_x_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_x_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_angle"] = filtered_dict[ + chart_x_axis_tick_label_angle + ] + + list_chart_x_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_x_axis_tick_label_weight not in list_chart_x_axis_tick_label_weight: + raise ValueError( + f"`chart_x_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_tick_label_weight in list_chart_x_axis_tick_label_weight + and chart_x_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_weight"] = filtered_dict[ + chart_x_axis_tick_label_weight + ] + self.state["state"]["x"][ + "tick_label_max_lines" + ] = chart_x_axis_tick_label_max_lines + self.state["state"]["x"][ + "tick_label_line_height" + ] = chart_x_axis_tick_label_line_height + + list_chart_x_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_x_axis_tick_label_space_mode + not in list_chart_x_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_x_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_x_axis_tick_label_space_mode + in list_chart_x_axis_tick_label_space_mode + and chart_x_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_x_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_space_mode"] = filtered_dict[ + chart_x_axis_tick_label_space_mode + ] + self.state["state"]["x"]["tick_label_space"] = chart_x_axis_tick_label_space + + list_chart_x_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_x_axis_tick_mode not in list_chart_x_axis_tick_mode: + raise ValueError( + f"`chart_x_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_x_axis_tick_mode in list_chart_x_axis_tick_mode + and chart_x_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_x_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_mode"] = filtered_dict[ + chart_x_axis_tick_mode + ] + self.state["state"]["x"]["tick_number"] = chart_x_axis_tick_number + + if ( + chart_x_axis_tick_custom is not None + and len(chart_x_axis_tick_custom) > 1 + and isinstance(chart_x_axis_tick_custom, list) + ): + self.state["state"]["x"]["tick_custom"] = " \n ".join( + chart_x_axis_tick_custom + ) + else: + self.state["state"]["x"]["tick_custom"] = chart_x_axis_tick_custom + + self.state["state"]["x"][ + "line_and_tick_color" + ] = chart_x_axis_line_and_tick_color + self.state["state"]["x"][ + "line_and_tick_width" + ] = chart_x_axis_line_and_tick_width + self.state["state"]["x"]["tick_length"] = chart_x_axis_tick_length + + list_chart_x_axis_tick_side = ["out", "in"] + [None] + if chart_x_axis_tick_side not in list_chart_x_axis_tick_side: + raise ValueError(f"`chart_x_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_x_axis_tick_side in list_chart_x_axis_tick_side + and chart_x_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_x_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_side"] = filtered_dict[ + chart_x_axis_tick_side + ] + self.state["state"]["x"]["line_visible"] = chart_x_axis_line_visible + self.state["state"]["x"]["edge_padding"] = chart_x_axis_edge_padding + + list_chart_x_axis_gridlines_visible = [True, False] + [None] + if chart_x_axis_gridlines_visible not in list_chart_x_axis_gridlines_visible: + raise ValueError( + f"`chart_x_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_x_axis_gridlines_visible in list_chart_x_axis_gridlines_visible + and chart_x_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridlines_visible"] = filtered_dict[ + chart_x_axis_gridlines_visible + ] + self.state["state"]["x"]["gridlines_styling"] = chart_x_axis_gridlines_styling + self.state["state"]["x"]["gridline_color"] = chart_x_axis_gridline_color + + list_chart_x_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_x_axis_gridline_style not in list_chart_x_axis_gridline_style: + raise ValueError( + f"`chart_x_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_x_axis_gridline_style in list_chart_x_axis_gridline_style + and chart_x_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_x_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridline_style"] = filtered_dict[ + chart_x_axis_gridline_style + ] + self.state["state"]["x"]["gridline_width"] = chart_x_axis_gridline_width + self.state["state"]["x"][ + "gridline_category_dividers" + ] = chart_x_axis_gridline_category_dividers + self.state["state"]["x"][ + "gridline_category_dividers_extend" + ] = chart_x_axis_gridline_category_dividers_extend + self.state["state"]["x_formatting"][ + "prefix" + ] = chart_x_axis_number_date_format_prefix + self.state["state"]["x_formatting"][ + "suffix" + ] = chart_x_axis_number_date_format_suffix + self.state["state"]["x_formatting"][ + "n_dec" + ] = chart_x_axis_number_date_format_n_dec + self.state["state"]["x_formatting"][ + "advanced" + ] = chart_x_axis_number_date_format_advanced + + list_chart_x_axis_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_x_axis_number_date_format_negative_sign + not in list_chart_x_axis_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_x_axis_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_x_axis_number_date_format_negative_sign + in list_chart_x_axis_number_date_format_negative_sign + and chart_x_axis_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_x_axis_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["x_formatting"]["negative_sign"] = filtered_dict[ + chart_x_axis_number_date_format_negative_sign + ] + self.state["state"]["x_formatting"][ + "strip_zeros" + ] = chart_x_axis_number_date_format_strip_zeros + self.state["state"]["x_formatting"][ + "strip_separator" + ] = chart_x_axis_number_date_format_strip_separator + self.state["state"]["x_formatting"][ + "transform_labels" + ] = chart_x_axis_number_date_format_transform_labels + + list_chart_x_axis_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_x_axis_number_date_format_transform + not in list_chart_x_axis_number_date_format_transform + ): + raise ValueError( + f"`chart_x_axis_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_x_axis_number_date_format_transform + in list_chart_x_axis_number_date_format_transform + and chart_x_axis_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_x_axis_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["x_formatting"]["transform"] = filtered_dict[ + chart_x_axis_number_date_format_transform + ] + self.state["state"]["x_formatting"][ + "multiply_divide_constant" + ] = chart_x_axis_number_date_format_multiply_divide_constant + self.state["state"]["x_formatting"][ + "exponentiate_constant" + ] = chart_x_axis_number_date_format_exponentiate_constant + self.state["state"]["y_matching"] = y_matching + self.state["state"]["y_single_col"] = y_single_col + + list_chart_y_axis_axis_visible = [True, False] + [None] + if chart_y_axis_axis_visible not in list_chart_y_axis_axis_visible: + raise ValueError( + f"`chart_y_axis_axis_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_axis_visible in list_chart_y_axis_axis_visible + and chart_y_axis_axis_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_axis_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["axis_visible"] = filtered_dict[ + chart_y_axis_axis_visible + ] + + list_chart_y_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_y_axis_numeric_scale_type not in list_chart_y_axis_numeric_scale_type: + raise ValueError( + f"`chart_y_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_y_axis_numeric_scale_type in list_chart_y_axis_numeric_scale_type + and chart_y_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_y_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["numeric_scale_type"] = filtered_dict[ + chart_y_axis_numeric_scale_type + ] + self.state["state"]["y"]["linear_min"] = chart_y_axis_linear_min + self.state["state"]["y"]["linear_max"] = chart_y_axis_linear_max + self.state["state"]["y"]["log_min"] = chart_y_axis_log_min + self.state["state"]["y"]["log_max"] = chart_y_axis_log_max + self.state["state"]["y"]["datetime_min"] = chart_y_axis_datetime_min + self.state["state"]["y"]["datetime_max"] = chart_y_axis_datetime_max + self.state["state"]["y"]["flip"] = chart_y_axis_flip + self.state["state"]["y"][ + "show_scale_settings" + ] = chart_y_axis_show_scale_settings + + list_chart_y_axis_nice = [True, False] + [None] + if chart_y_axis_nice not in list_chart_y_axis_nice: + raise ValueError(f"`chart_y_axis_nice` must be one of: [True, False]") + elif ( + chart_y_axis_nice in list_chart_y_axis_nice + and chart_y_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["nice"] = filtered_dict[chart_y_axis_nice] + + list_chart_y_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_y_axis_zero_axis not in list_chart_y_axis_zero_axis: + raise ValueError( + f"`chart_y_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_y_axis_zero_axis in list_chart_y_axis_zero_axis + and chart_y_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_y_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["zero_axis"] = filtered_dict[ + chart_y_axis_zero_axis + ] + + list_chart_y_axis_title_mode = ["auto", "custom"] + [None] + if chart_y_axis_title_mode not in list_chart_y_axis_title_mode: + raise ValueError( + f"`chart_y_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_y_axis_title_mode in list_chart_y_axis_title_mode + and chart_y_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_y_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_mode"] = filtered_dict[ + chart_y_axis_title_mode + ] + self.state["state"]["y"]["title"] = chart_y_axis_title + self.state["state"]["y"]["title_styling"] = chart_y_axis_title_styling + + list_chart_y_axis_title_position = ["side", "end"] + [None] + if chart_y_axis_title_position not in list_chart_y_axis_title_position: + raise ValueError( + f"`chart_y_axis_title_position` must be one of: ['side', 'end']" + ) + elif ( + chart_y_axis_title_position in list_chart_y_axis_title_position + and chart_y_axis_title_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"side": "side", "end": "end"}.items() + if chart_y_axis_title_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_position"] = filtered_dict[ + chart_y_axis_title_position + ] + + list_chart_y_axis_title_weight = ["bold", "normal"] + [None] + if chart_y_axis_title_weight not in list_chart_y_axis_title_weight: + raise ValueError( + f"`chart_y_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_title_weight in list_chart_y_axis_title_weight + and chart_y_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_weight"] = filtered_dict[ + chart_y_axis_title_weight + ] + self.state["state"]["y"]["title_color"] = chart_y_axis_title_color + self.state["state"]["y"]["title_size"] = chart_y_axis_title_size + self.state["state"]["y"]["title_padding"] = chart_y_axis_title_padding + + list_chart_y_axis_tick_label_position = ["default", "above", "below"] + [None] + if ( + chart_y_axis_tick_label_position + not in list_chart_y_axis_tick_label_position + ): + raise ValueError( + f"`chart_y_axis_tick_label_position` must be one of: ['default', 'above', 'below']" + ) + elif ( + chart_y_axis_tick_label_position in list_chart_y_axis_tick_label_position + and chart_y_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "above": "above", + "below": "below", + }.items() + if chart_y_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_position"] = filtered_dict[ + chart_y_axis_tick_label_position + ] + self.state["state"]["y"]["tick_label_styling"] = chart_y_axis_tick_label_styling + self.state["state"]["y"]["tick_label_size"] = chart_y_axis_tick_label_size + self.state["state"]["y"]["tick_label_color"] = chart_y_axis_tick_label_color + self.state["state"]["y"]["tick_padding"] = chart_y_axis_tick_padding + + list_chart_y_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_y_axis_tick_label_angle not in list_chart_y_axis_tick_label_angle: + raise ValueError( + f"`chart_y_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_y_axis_tick_label_angle in list_chart_y_axis_tick_label_angle + and chart_y_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_y_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_angle"] = filtered_dict[ + chart_y_axis_tick_label_angle + ] + + list_chart_y_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_y_axis_tick_label_weight not in list_chart_y_axis_tick_label_weight: + raise ValueError( + f"`chart_y_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_tick_label_weight in list_chart_y_axis_tick_label_weight + and chart_y_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_weight"] = filtered_dict[ + chart_y_axis_tick_label_weight + ] + self.state["state"]["y"][ + "tick_label_max_lines" + ] = chart_y_axis_tick_label_max_lines + self.state["state"]["y"][ + "tick_label_line_height" + ] = chart_y_axis_tick_label_line_height + + list_chart_y_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_y_axis_tick_label_space_mode + not in list_chart_y_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_y_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_y_axis_tick_label_space_mode + in list_chart_y_axis_tick_label_space_mode + and chart_y_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_y_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_space_mode"] = filtered_dict[ + chart_y_axis_tick_label_space_mode + ] + self.state["state"]["y"]["tick_label_space"] = chart_y_axis_tick_label_space + + list_chart_y_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_y_axis_tick_mode not in list_chart_y_axis_tick_mode: + raise ValueError( + f"`chart_y_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_y_axis_tick_mode in list_chart_y_axis_tick_mode + and chart_y_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_y_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_mode"] = filtered_dict[ + chart_y_axis_tick_mode + ] + self.state["state"]["y"]["tick_number"] = chart_y_axis_tick_number + + if ( + chart_y_axis_tick_custom is not None + and len(chart_y_axis_tick_custom) > 1 + and isinstance(chart_y_axis_tick_custom, list) + ): + self.state["state"]["y"]["tick_custom"] = " \n ".join( + chart_y_axis_tick_custom + ) + else: + self.state["state"]["y"]["tick_custom"] = chart_y_axis_tick_custom + + self.state["state"]["y"][ + "line_and_tick_color" + ] = chart_y_axis_line_and_tick_color + self.state["state"]["y"][ + "line_and_tick_width" + ] = chart_y_axis_line_and_tick_width + self.state["state"]["y"]["tick_length"] = chart_y_axis_tick_length + + list_chart_y_axis_tick_side = ["out", "in"] + [None] + if chart_y_axis_tick_side not in list_chart_y_axis_tick_side: + raise ValueError(f"`chart_y_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_y_axis_tick_side in list_chart_y_axis_tick_side + and chart_y_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_y_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_side"] = filtered_dict[ + chart_y_axis_tick_side + ] + self.state["state"]["y"]["line_visible"] = chart_y_axis_line_visible + self.state["state"]["y"]["edge_padding"] = chart_y_axis_edge_padding + + list_chart_y_axis_gridlines_visible = [True, False] + [None] + if chart_y_axis_gridlines_visible not in list_chart_y_axis_gridlines_visible: + raise ValueError( + f"`chart_y_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_gridlines_visible in list_chart_y_axis_gridlines_visible + and chart_y_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridlines_visible"] = filtered_dict[ + chart_y_axis_gridlines_visible + ] + self.state["state"]["y"]["gridlines_styling"] = chart_y_axis_gridlines_styling + self.state["state"]["y"]["gridline_color"] = chart_y_axis_gridline_color + + list_chart_y_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_y_axis_gridline_style not in list_chart_y_axis_gridline_style: + raise ValueError( + f"`chart_y_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_y_axis_gridline_style in list_chart_y_axis_gridline_style + and chart_y_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_y_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridline_style"] = filtered_dict[ + chart_y_axis_gridline_style + ] + self.state["state"]["y"]["gridline_width"] = chart_y_axis_gridline_width + self.state["state"]["y"][ + "gridline_category_dividers" + ] = chart_y_axis_gridline_category_dividers + self.state["state"]["y"][ + "gridline_category_dividers_extend" + ] = chart_y_axis_gridline_category_dividers_extend + self.state["state"]["y_formatting"][ + "prefix" + ] = chart_y_axis_number_date_format_prefix + self.state["state"]["y_formatting"][ + "suffix" + ] = chart_y_axis_number_date_format_suffix + self.state["state"]["y_formatting"][ + "n_dec" + ] = chart_y_axis_number_date_format_n_dec + self.state["state"]["y_formatting"][ + "advanced" + ] = chart_y_axis_number_date_format_advanced + + list_chart_y_axis_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_y_axis_number_date_format_negative_sign + not in list_chart_y_axis_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_y_axis_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_y_axis_number_date_format_negative_sign + in list_chart_y_axis_number_date_format_negative_sign + and chart_y_axis_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_y_axis_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["y_formatting"]["negative_sign"] = filtered_dict[ + chart_y_axis_number_date_format_negative_sign + ] + self.state["state"]["y_formatting"][ + "strip_zeros" + ] = chart_y_axis_number_date_format_strip_zeros + self.state["state"]["y_formatting"][ + "strip_separator" + ] = chart_y_axis_number_date_format_strip_separator + self.state["state"]["y_formatting"][ + "transform_labels" + ] = chart_y_axis_number_date_format_transform_labels + + list_chart_y_axis_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_y_axis_number_date_format_transform + not in list_chart_y_axis_number_date_format_transform + ): + raise ValueError( + f"`chart_y_axis_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_y_axis_number_date_format_transform + in list_chart_y_axis_number_date_format_transform + and chart_y_axis_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_y_axis_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["y_formatting"]["transform"] = filtered_dict[ + chart_y_axis_number_date_format_transform + ] + self.state["state"]["y_formatting"][ + "multiply_divide_constant" + ] = chart_y_axis_number_date_format_multiply_divide_constant + self.state["state"]["y_formatting"][ + "exponentiate_constant" + ] = chart_y_axis_number_date_format_exponentiate_constant + + list_legend_position = ["above", "below", "off"] + [None] + if legend_position not in list_legend_position: + raise ValueError( + f"`legend_position` must be one of: ['above', 'below', 'off']" + ) + elif legend_position in list_legend_position and legend_position is not None: + filtered_dict = { + k: v + for (k, v) in {"above": "above", "below": "below", "off": "off"}.items() + if legend_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_position"] = filtered_dict[legend_position] + + list_legend_filtering_mode = ["filter_out", "filter_in", "off"] + [None] + if legend_filtering_mode not in list_legend_filtering_mode: + raise ValueError( + f"`legend_filtering_mode` must be one of: ['filter_out', 'filter_in', 'off']" + ) + elif ( + legend_filtering_mode in list_legend_filtering_mode + and legend_filtering_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "filter_out": "filter_out", + "filter_in": "filter_in", + "off": "off", + }.items() + if legend_filtering_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_filtering_mode"] = filtered_dict[ + legend_filtering_mode + ] + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["categorical_legend"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["categorical_legend"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["categorical_legend"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["categorical_legend"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["categorical_legend"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["categorical_legend"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["categorical_legend"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["categorical_legend"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["categorical_legend"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["categorical_legend"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["categorical_legend"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["categorical_legend"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["categorical_legend"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["categorical_legend"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["categorical_legend"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_chart_continous_legend_show_legend = [True, False] + [None] + if ( + chart_continous_legend_show_legend + not in list_chart_continous_legend_show_legend + ): + raise ValueError( + f"`chart_continous_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_continous_legend_show_legend + in list_chart_continous_legend_show_legend + and chart_continous_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_continous_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["continuous_legend"]["show_legend"] = filtered_dict[ + chart_continous_legend_show_legend + ] + + list_chart_continous_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_continous_legend_title_mode + not in list_chart_continous_legend_title_mode + ): + raise ValueError( + f"`chart_continous_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_continous_legend_title_mode in list_chart_continous_legend_title_mode + and chart_continous_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_continous_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["continuous_legend"]["title_mode"] = filtered_dict[ + chart_continous_legend_title_mode + ] + self.state["state"]["continuous_legend"]["title"] = chart_continous_legend_title + self.state["state"]["continuous_legend"][ + "color_band_width" + ] = chart_continous_legend_color_band_width + self.state["state"]["continuous_legend"][ + "color_band_height" + ] = chart_continous_legend_color_band_height + self.state["state"]["continuous_legend"][ + "color_band_radius" + ] = chart_continous_legend_color_band_radius + + list_chart_continous_legend_binned_label_mode = [ + "thresholds", + "centers", + "custom", + ] + [None] + if ( + chart_continous_legend_binned_label_mode + not in list_chart_continous_legend_binned_label_mode + ): + raise ValueError( + f"`chart_continous_legend_binned_label_mode` must be one of: ['thresholds', 'centers', 'custom']" + ) + elif ( + chart_continous_legend_binned_label_mode + in list_chart_continous_legend_binned_label_mode + and chart_continous_legend_binned_label_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "thresholds": "thresholds", + "centers": "centers", + "custom": "custom", + }.items() + if chart_continous_legend_binned_label_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["continuous_legend"][ + "binned_label_mode" + ] = filtered_dict[chart_continous_legend_binned_label_mode] + self.state["state"]["continuous_legend"][ + "binned_label_custom" + ] = chart_continous_legend_binned_label_custom + self.state["state"]["continuous_legend"][ + "legend_min" + ] = chart_continous_legend_legend_min + self.state["state"]["continuous_legend"][ + "additional_min_label" + ] = chart_continous_legend_additional_min_label + self.state["state"]["continuous_legend"][ + "legend_max" + ] = chart_continous_legend_legend_max + self.state["state"]["continuous_legend"][ + "additional_max_label" + ] = chart_continous_legend_additional_max_label + + list_text_legend = ["auto", "custom", "off"] + [None] + if text_legend not in list_text_legend: + raise ValueError(f"`text_legend` must be one of: ['auto', 'custom', 'off']") + elif text_legend in list_text_legend and text_legend is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom", "off": "off"}.items() + if text_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["text_legend"] = filtered_dict[text_legend] + self.state["state"]["text_legend_title"] = text_legend_title + self.state["state"]["text_legend_subtitle"] = text_legend_subtitle + self.state["state"]["text_legend_bold"] = text_legend_bold + self.state["state"]["color_formatting"][ + "prefix" + ] = chart_number_date_format_prefix + self.state["state"]["color_formatting"][ + "suffix" + ] = chart_number_date_format_suffix + self.state["state"]["color_formatting"][ + "n_dec" + ] = chart_number_date_format_n_dec + self.state["state"]["color_formatting"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["color_formatting"][ + "negative_sign" + ] = filtered_dict[chart_number_date_format_negative_sign] + self.state["state"]["color_formatting"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["color_formatting"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["color_formatting"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["color_formatting"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["color_formatting"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["color_formatting"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["filter"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["filter"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["filter"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter"]["dropdown_width_mode"] = filtered_dict[ + chart_filter_controls_dropdown_width_mode + ] + self.state["state"]["filter"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["filter"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["filter"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["filter"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["filter"]["slider_loop"] = chart_filter_controls_slider_loop + self.state["state"]["filter"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["filter_show_all"] = filter_show_all + self.state["state"]["filter_show_all_text"] = filter_show_all_text + + list_filter_updates_axes = ["off", "x", "y", "both"] + [None] + if filter_updates_axes not in list_filter_updates_axes: + raise ValueError( + f"`filter_updates_axes` must be one of: ['off', 'x', 'y', 'both']" + ) + elif ( + filter_updates_axes in list_filter_updates_axes + and filter_updates_axes is not None + ): + filtered_dict = { + k: v + for (k, v) in {"off": "off", "x": "x", "y": "y", "both": "both"}.items() + if filter_updates_axes in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_updates_axes"] = filtered_dict[ + filter_updates_axes + ] + + list_slider_updates_axes = ["off", "x", "y", "both"] + [None] + if slider_updates_axes not in list_slider_updates_axes: + raise ValueError( + f"`slider_updates_axes` must be one of: ['off', 'x', 'y', 'both']" + ) + elif ( + slider_updates_axes in list_slider_updates_axes + and slider_updates_axes is not None + ): + filtered_dict = { + k: v + for (k, v) in {"off": "off", "x": "x", "y": "y", "both": "both"}.items() + if slider_updates_axes in k + } + if len(filtered_dict) > 0: + self.state["state"]["slider_updates_axes"] = filtered_dict[ + slider_updates_axes + ] + self.state["state"]["time_label_show"] = time_label_show + self.state["state"]["time_label_color"] = time_label_color + self.state["state"]["time_label_opacity"] = time_label_opacity + self.state["state"]["time_label_font_size"] = time_label_font_size + + list_chart_slider_filter_controls_control_type = [ + "dropdown", + "buttons", + "slider", + ] + [None] + if ( + chart_slider_filter_controls_control_type + not in list_chart_slider_filter_controls_control_type + ): + raise ValueError( + f"`chart_slider_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_slider_filter_controls_control_type + in list_chart_slider_filter_controls_control_type + and chart_slider_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_slider_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["slider"]["control_type"] = filtered_dict[ + chart_slider_filter_controls_control_type + ] + self.state["state"]["slider"][ + "control_styles" + ] = chart_slider_filter_controls_control_styles + self.state["state"]["slider"][ + "control_title" + ] = chart_slider_filter_controls_control_title + + list_chart_slider_filter_controls_button_group = [True, False] + [None] + if ( + chart_slider_filter_controls_button_group + not in list_chart_slider_filter_controls_button_group + ): + raise ValueError( + f"`chart_slider_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_slider_filter_controls_button_group + in list_chart_slider_filter_controls_button_group + and chart_slider_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_slider_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["slider"]["button_group"] = filtered_dict[ + chart_slider_filter_controls_button_group + ] + + list_chart_slider_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_slider_filter_controls_button_group_width_mode + not in list_chart_slider_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_slider_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_slider_filter_controls_button_group_width_mode + in list_chart_slider_filter_controls_button_group_width_mode + and chart_slider_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_slider_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["slider"][ + "button_group_width_mode" + ] = filtered_dict[chart_slider_filter_controls_button_group_width_mode] + self.state["state"]["slider"][ + "button_group_width_fixed" + ] = chart_slider_filter_controls_button_group_width_fixed + + list_chart_slider_filter_controls_dropdown_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_slider_filter_controls_dropdown_width_mode + not in list_chart_slider_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_slider_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_slider_filter_controls_dropdown_width_mode + in list_chart_slider_filter_controls_dropdown_width_mode + and chart_slider_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_slider_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["slider"]["dropdown_width_mode"] = filtered_dict[ + chart_slider_filter_controls_dropdown_width_mode + ] + self.state["state"]["slider"][ + "dropdown_width_fixed" + ] = chart_slider_filter_controls_dropdown_width_fixed + self.state["state"]["slider"][ + "slider_width" + ] = chart_slider_filter_controls_slider_width + self.state["state"]["slider"][ + "slider_max_label_width" + ] = chart_slider_filter_controls_slider_max_label_width + self.state["state"]["slider"][ + "slider_step_time" + ] = chart_slider_filter_controls_slider_step_time + self.state["state"]["slider"][ + "slider_loop" + ] = chart_slider_filter_controls_slider_loop + self.state["state"]["slider"][ + "slider_restart_pause" + ] = chart_slider_filter_controls_slider_restart_pause + + list_chart_slider_filter_controls_sort = [True, False] + [None] + if ( + chart_slider_filter_controls_sort + not in list_chart_slider_filter_controls_sort + ): + raise ValueError( + f"`chart_slider_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_slider_filter_controls_sort in list_chart_slider_filter_controls_sort + and chart_slider_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_slider_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["slider"]["sort"] = filtered_dict[ + chart_slider_filter_controls_sort + ] + + list_chart_filter_controls_container_alignment = ["start", "center", "end"] + [ + None + ] + if ( + chart_filter_controls_container_alignment + not in list_chart_filter_controls_container_alignment + ): + raise ValueError( + f"`chart_filter_controls_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_filter_controls_container_alignment + in list_chart_filter_controls_container_alignment + and chart_filter_controls_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_filter_controls_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_container"]["alignment"] = filtered_dict[ + chart_filter_controls_container_alignment + ] + self.state["state"]["controls_container"][ + "controls_spacing" + ] = chart_filter_controls_container_controls_spacing + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["slider_style"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["slider_style"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["slider_style"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["slider_style"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["slider_style"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["slider_style"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["slider_style"][ + "play_button" + ] = chart_slider_control_style_play_button + + list_fit_type = ["none", "both", "color", "chart", "all"] + [None] + if fit_type not in list_fit_type: + raise ValueError( + f"`fit_type` must be one of: ['none', 'both', 'color', 'chart', 'all']" + ) + elif fit_type in list_fit_type and fit_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "both": "both", + "color": "color", + "chart": "chart", + "all": "all", + }.items() + if fit_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["fit_type"] = filtered_dict[fit_type] + self.state["state"]["fit_force_origin"] = fit_force_origin + self.state["state"]["fit_line_width"] = fit_line_width + self.state["state"]["fit_line_dash"] = fit_line_dash + self.state["state"]["fit_line_color"] = fit_line_color + + list_beeswarm_plot = [True, False] + [None] + if beeswarm_plot not in list_beeswarm_plot: + raise ValueError(f"`beeswarm_plot` must be one of: [True, False]") + elif beeswarm_plot in list_beeswarm_plot and beeswarm_plot is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if beeswarm_plot in k + } + if len(filtered_dict) > 0: + self.state["state"]["beeswarm_plot"] = filtered_dict[beeswarm_plot] + + list_box_plot = [True, False] + [None] + if box_plot not in list_box_plot: + raise ValueError(f"`box_plot` must be one of: [True, False]") + elif box_plot in list_box_plot and box_plot is not None: + filtered_dict = { + k: v for (k, v) in {True: True, False: False}.items() if box_plot in k + } + if len(filtered_dict) > 0: + self.state["state"]["box_plot"] = filtered_dict[box_plot] + self.state["state"]["box_color"] = box_color + self.state["state"]["box_opacity"] = box_opacity + self.state["state"]["box_line_color"] = box_line_color + self.state["state"]["box_line_width"] = box_line_width + + list_box_whisker_type = ["tukey", "all"] + [None] + if box_whisker_type not in list_box_whisker_type: + raise ValueError(f"`box_whisker_type` must be one of: ['tukey', 'all']") + elif box_whisker_type in list_box_whisker_type and box_whisker_type is not None: + filtered_dict = { + k: v + for (k, v) in {"tukey": "tukey", "all": "all"}.items() + if box_whisker_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["box_whisker_type"] = filtered_dict[ + box_whisker_type + ] + self.state["state"]["box_whisker_multiplier"] = box_whisker_multiplier + self.state["state"]["use_box_popup"] = use_box_popup + self.state["state"]["box_first_quartile_text"] = box_first_quartile_text + self.state["state"]["box_median_text"] = box_median_text + self.state["state"]["box_third_quartile_text"] = box_third_quartile_text + + list_violin_plot = [True, False] + [None] + if violin_plot not in list_violin_plot: + raise ValueError(f"`violin_plot` must be one of: [True, False]") + elif violin_plot in list_violin_plot and violin_plot is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if violin_plot in k + } + if len(filtered_dict) > 0: + self.state["state"]["violin_plot"] = filtered_dict[violin_plot] + self.state["state"]["violin_bandwidth"] = violin_bandwidth + self.state["state"]["violin_samples"] = violin_samples + self.state["state"]["violin_color"] = violin_color + self.state["state"]["violin_opacity"] = violin_opacity + + list_violin_sizing = ["area", "width"] + [None] + if violin_sizing not in list_violin_sizing: + raise ValueError(f"`violin_sizing` must be one of: ['area', 'width']") + elif violin_sizing in list_violin_sizing and violin_sizing is not None: + filtered_dict = { + k: v + for (k, v) in {"area": "area", "width": "width"}.items() + if violin_sizing in k + } + if len(filtered_dict) > 0: + self.state["state"]["violin_sizing"] = filtered_dict[violin_sizing] + self.state["state"]["axes_highlights"][ + "x_enabled" + ] = chart_axes_highlights_x_enabled + + if ( + chart_axes_highlights_x_lines is not None + and len(chart_axes_highlights_x_lines) > 1 + and isinstance(chart_axes_highlights_x_lines, list) + ): + self.state["state"]["axes_highlights"]["x_lines"] = " \n ".join( + chart_axes_highlights_x_lines + ) + else: + self.state["state"]["axes_highlights"][ + "x_lines" + ] = chart_axes_highlights_x_lines + + self.state["state"]["axes_highlights"][ + "x_line_color" + ] = chart_axes_highlights_x_line_color + self.state["state"]["axes_highlights"][ + "x_line_width" + ] = chart_axes_highlights_x_line_width + self.state["state"]["axes_highlights"][ + "x_line_dash" + ] = chart_axes_highlights_x_line_dash + + if ( + chart_axes_highlights_x_areas is not None + and len(chart_axes_highlights_x_areas) > 1 + and isinstance(chart_axes_highlights_x_areas, list) + ): + self.state["state"]["axes_highlights"]["x_areas"] = " \n ".join( + chart_axes_highlights_x_areas + ) + else: + self.state["state"]["axes_highlights"][ + "x_areas" + ] = chart_axes_highlights_x_areas + + self.state["state"]["axes_highlights"][ + "x_area_color" + ] = chart_axes_highlights_x_area_color + self.state["state"]["axes_highlights"][ + "x_area_opacity" + ] = chart_axes_highlights_x_area_opacity + + list_chart_axes_highlights_x_area_texture = [ + "none", + "pattern-diagonal", + "pattern-grid", + "pattern-dots", + ] + [None] + if ( + chart_axes_highlights_x_area_texture + not in list_chart_axes_highlights_x_area_texture + ): + raise ValueError( + f"`chart_axes_highlights_x_area_texture` must be one of: ['none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots']" + ) + elif ( + chart_axes_highlights_x_area_texture + in list_chart_axes_highlights_x_area_texture + and chart_axes_highlights_x_area_texture is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "pattern-diagonal": "fl-pattern-diagonal", + "pattern-grid": "fl-pattern-grid", + "pattern-dots": "fl-pattern-dots", + }.items() + if chart_axes_highlights_x_area_texture in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_area_texture" + ] = filtered_dict[chart_axes_highlights_x_area_texture] + self.state["state"]["axes_highlights"][ + "x_label_vertical" + ] = chart_axes_highlights_x_label_vertical + + list_chart_axes_highlights_x_label_y_position = ["bottom", "middle", "top"] + [ + None + ] + if ( + chart_axes_highlights_x_label_y_position + not in list_chart_axes_highlights_x_label_y_position + ): + raise ValueError( + f"`chart_axes_highlights_x_label_y_position` must be one of: ['bottom', 'middle', 'top']" + ) + elif ( + chart_axes_highlights_x_label_y_position + in list_chart_axes_highlights_x_label_y_position + and chart_axes_highlights_x_label_y_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "middle": "middle", + "top": "top", + }.items() + if chart_axes_highlights_x_label_y_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_label_y_position" + ] = filtered_dict[chart_axes_highlights_x_label_y_position] + + list_chart_axes_highlights_x_label_x_position = ["left", "middle", "right"] + [ + None + ] + if ( + chart_axes_highlights_x_label_x_position + not in list_chart_axes_highlights_x_label_x_position + ): + raise ValueError( + f"`chart_axes_highlights_x_label_x_position` must be one of: ['left', 'middle', 'right']" + ) + elif ( + chart_axes_highlights_x_label_x_position + in list_chart_axes_highlights_x_label_x_position + and chart_axes_highlights_x_label_x_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "middle": "middle", + "right": "right", + }.items() + if chart_axes_highlights_x_label_x_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "x_label_x_position" + ] = filtered_dict[chart_axes_highlights_x_label_x_position] + self.state["state"]["axes_highlights"][ + "x_label_max_width" + ] = chart_axes_highlights_x_label_max_width + self.state["state"]["axes_highlights"][ + "x_font_size" + ] = chart_axes_highlights_x_font_size + + list_chart_axes_highlights_x_font_weight = ["regular", "bold"] + [None] + if ( + chart_axes_highlights_x_font_weight + not in list_chart_axes_highlights_x_font_weight + ): + raise ValueError( + f"`chart_axes_highlights_x_font_weight` must be one of: ['regular', 'bold']" + ) + elif ( + chart_axes_highlights_x_font_weight + in list_chart_axes_highlights_x_font_weight + and chart_axes_highlights_x_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"regular": "regular", "bold": "bold"}.items() + if chart_axes_highlights_x_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"]["x_font_weight"] = filtered_dict[ + chart_axes_highlights_x_font_weight + ] + self.state["state"]["axes_highlights"][ + "x_label_color" + ] = chart_axes_highlights_x_label_color + self.state["state"]["axes_highlights"][ + "x_shadow_color" + ] = chart_axes_highlights_x_shadow_color + self.state["state"]["axes_highlights"][ + "x_shadow_enabled" + ] = chart_axes_highlights_x_shadow_enabled + self.state["state"]["axes_highlights"][ + "y_enabled" + ] = chart_axes_highlights_y_enabled + + if ( + chart_axes_highlights_y_lines is not None + and len(chart_axes_highlights_y_lines) > 1 + and isinstance(chart_axes_highlights_y_lines, list) + ): + self.state["state"]["axes_highlights"]["y_lines"] = " \n ".join( + chart_axes_highlights_y_lines + ) + else: + self.state["state"]["axes_highlights"][ + "y_lines" + ] = chart_axes_highlights_y_lines + + self.state["state"]["axes_highlights"][ + "y_line_color" + ] = chart_axes_highlights_y_line_color + self.state["state"]["axes_highlights"][ + "y_line_width" + ] = chart_axes_highlights_y_line_width + self.state["state"]["axes_highlights"][ + "y_line_dash" + ] = chart_axes_highlights_y_line_dash + + if ( + chart_axes_highlights_y_areas is not None + and len(chart_axes_highlights_y_areas) > 1 + and isinstance(chart_axes_highlights_y_areas, list) + ): + self.state["state"]["axes_highlights"]["y_areas"] = " \n ".join( + chart_axes_highlights_y_areas + ) + else: + self.state["state"]["axes_highlights"][ + "y_areas" + ] = chart_axes_highlights_y_areas + + self.state["state"]["axes_highlights"][ + "y_area_color" + ] = chart_axes_highlights_y_area_color + self.state["state"]["axes_highlights"][ + "y_area_opacity" + ] = chart_axes_highlights_y_area_opacity + + list_chart_axes_highlights_y_area_texture = [ + "none", + "pattern-diagonal", + "pattern-grid", + "pattern-dots", + ] + [None] + if ( + chart_axes_highlights_y_area_texture + not in list_chart_axes_highlights_y_area_texture + ): + raise ValueError( + f"`chart_axes_highlights_y_area_texture` must be one of: ['none', 'pattern-diagonal', 'pattern-grid', 'pattern-dots']" + ) + elif ( + chart_axes_highlights_y_area_texture + in list_chart_axes_highlights_y_area_texture + and chart_axes_highlights_y_area_texture is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "pattern-diagonal": "fl-pattern-diagonal", + "pattern-grid": "fl-pattern-grid", + "pattern-dots": "fl-pattern-dots", + }.items() + if chart_axes_highlights_y_area_texture in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_area_texture" + ] = filtered_dict[chart_axes_highlights_y_area_texture] + + list_chart_axes_highlights_y_label_x_position = ["left", "middle", "right"] + [ + None + ] + if ( + chart_axes_highlights_y_label_x_position + not in list_chart_axes_highlights_y_label_x_position + ): + raise ValueError( + f"`chart_axes_highlights_y_label_x_position` must be one of: ['left', 'middle', 'right']" + ) + elif ( + chart_axes_highlights_y_label_x_position + in list_chart_axes_highlights_y_label_x_position + and chart_axes_highlights_y_label_x_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "middle": "middle", + "right": "right", + }.items() + if chart_axes_highlights_y_label_x_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_label_x_position" + ] = filtered_dict[chart_axes_highlights_y_label_x_position] + + list_chart_axes_highlights_y_label_y_position = ["above", "middle", "below"] + [ + None + ] + if ( + chart_axes_highlights_y_label_y_position + not in list_chart_axes_highlights_y_label_y_position + ): + raise ValueError( + f"`chart_axes_highlights_y_label_y_position` must be one of: ['above', 'middle', 'below']" + ) + elif ( + chart_axes_highlights_y_label_y_position + in list_chart_axes_highlights_y_label_y_position + and chart_axes_highlights_y_label_y_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "above": "above", + "middle": "middle", + "below": "below", + }.items() + if chart_axes_highlights_y_label_y_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"][ + "y_label_y_position" + ] = filtered_dict[chart_axes_highlights_y_label_y_position] + self.state["state"]["axes_highlights"][ + "y_label_max_width" + ] = chart_axes_highlights_y_label_max_width + self.state["state"]["axes_highlights"][ + "y_font_size" + ] = chart_axes_highlights_y_font_size + + list_chart_axes_highlights_y_font_weight = ["regular", "bold"] + [None] + if ( + chart_axes_highlights_y_font_weight + not in list_chart_axes_highlights_y_font_weight + ): + raise ValueError( + f"`chart_axes_highlights_y_font_weight` must be one of: ['regular', 'bold']" + ) + elif ( + chart_axes_highlights_y_font_weight + in list_chart_axes_highlights_y_font_weight + and chart_axes_highlights_y_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"regular": "regular", "bold": "bold"}.items() + if chart_axes_highlights_y_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["axes_highlights"]["y_font_weight"] = filtered_dict[ + chart_axes_highlights_y_font_weight + ] + self.state["state"]["axes_highlights"][ + "y_label_color" + ] = chart_axes_highlights_y_label_color + self.state["state"]["axes_highlights"][ + "y_shadow_color" + ] = chart_axes_highlights_y_shadow_color + self.state["state"]["axes_highlights"][ + "y_shadow_enabled" + ] = chart_axes_highlights_y_shadow_enabled + self.state["state"]["annotations_styling"] = annotations_styling + + list_chart_annotations_defaults_text_weight = ["normal", "bold"] + [None] + if ( + chart_annotations_defaults_text_weight + not in list_chart_annotations_defaults_text_weight + ): + raise ValueError( + f"`chart_annotations_defaults_text_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_annotations_defaults_text_weight + in list_chart_annotations_defaults_text_weight + and chart_annotations_defaults_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_annotations_defaults_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "text_weight" + ] = filtered_dict[chart_annotations_defaults_text_weight] + self.state["state"]["annotations"]["defaults"][ + "text_size" + ] = chart_annotations_defaults_text_size + self.state["state"]["annotations"]["defaults"][ + "text_color" + ] = chart_annotations_defaults_text_color + self.state["state"]["annotations"]["defaults"][ + "label_width" + ] = chart_annotations_defaults_label_width + + list_chart_annotations_defaults_text_background_mode = [ + "none", + "outline", + "background", + ] + [None] + if ( + chart_annotations_defaults_text_background_mode + not in list_chart_annotations_defaults_text_background_mode + ): + raise ValueError( + f"`chart_annotations_defaults_text_background_mode` must be one of: ['none', 'outline', 'background']" + ) + elif ( + chart_annotations_defaults_text_background_mode + in list_chart_annotations_defaults_text_background_mode + and chart_annotations_defaults_text_background_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "outline": "outline", + "background": "background", + }.items() + if chart_annotations_defaults_text_background_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "text_background_mode" + ] = filtered_dict[chart_annotations_defaults_text_background_mode] + self.state["state"]["annotations"]["defaults"][ + "text_bg" + ] = chart_annotations_defaults_text_bg + self.state["state"]["annotations"]["defaults"][ + "label_bg" + ] = chart_annotations_defaults_label_bg + + list_chart_annotations_defaults_text_alignment = [ + "auto", + "start", + "center", + "end", + ] + [None] + if ( + chart_annotations_defaults_text_alignment + not in list_chart_annotations_defaults_text_alignment + ): + raise ValueError( + f"`chart_annotations_defaults_text_alignment` must be one of: ['auto', 'start', 'center', 'end']" + ) + elif ( + chart_annotations_defaults_text_alignment + in list_chart_annotations_defaults_text_alignment + and chart_annotations_defaults_text_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_annotations_defaults_text_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "text_alignment" + ] = filtered_dict[chart_annotations_defaults_text_alignment] + + list_chart_annotations_defaults_popup_position = [ + "center", + "left", + "right", + "top", + "bottom", + ] + [None] + if ( + chart_annotations_defaults_popup_position + not in list_chart_annotations_defaults_popup_position + ): + raise ValueError( + f"`chart_annotations_defaults_popup_position` must be one of: ['center', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_annotations_defaults_popup_position + in list_chart_annotations_defaults_popup_position + and chart_annotations_defaults_popup_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "center": "center", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_annotations_defaults_popup_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "popup_position" + ] = filtered_dict[chart_annotations_defaults_popup_position] + + list_chart_annotations_defaults_line_marker = [ + "none", + "arrowhead_open", + "arrowhead", + ] + [None] + if ( + chart_annotations_defaults_line_marker + not in list_chart_annotations_defaults_line_marker + ): + raise ValueError( + f"`chart_annotations_defaults_line_marker` must be one of: ['none', 'arrowhead_open', 'arrowhead']" + ) + elif ( + chart_annotations_defaults_line_marker + in list_chart_annotations_defaults_line_marker + and chart_annotations_defaults_line_marker is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "arrowhead_open": "arrowhead_open", + "arrowhead": "arrowhead", + }.items() + if chart_annotations_defaults_line_marker in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "line_marker" + ] = filtered_dict[chart_annotations_defaults_line_marker] + self.state["state"]["annotations"]["defaults"][ + "stroke_width" + ] = chart_annotations_defaults_stroke_width + self.state["state"]["annotations"]["defaults"][ + "stroke_color" + ] = chart_annotations_defaults_stroke_color + + list_chart_annotations_defaults_connector_extend_line = [ + "enabled", + "disabled", + ] + [None] + if ( + chart_annotations_defaults_connector_extend_line + not in list_chart_annotations_defaults_connector_extend_line + ): + raise ValueError( + f"`chart_annotations_defaults_connector_extend_line` must be one of: ['enabled', 'disabled']" + ) + elif ( + chart_annotations_defaults_connector_extend_line + in list_chart_annotations_defaults_connector_extend_line + and chart_annotations_defaults_connector_extend_line is not None + ): + filtered_dict = { + k: v + for (k, v) in {"enabled": "enabled", "disabled": "disabled"}.items() + if chart_annotations_defaults_connector_extend_line in k + } + if len(filtered_dict) > 0: + self.state["state"]["annotations"]["defaults"][ + "connector_extend_line" + ] = filtered_dict[chart_annotations_defaults_connector_extend_line] + self.state["state"]["animation_duration"] = animation_duration + self.state["state"]["animation_stagger"] = animation_stagger + self.state["state"]["line_animate_in"] = line_animate_in + self.state["state"]["line_animate_out"] = line_animate_out + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + self.state["state"]["url_state"]["enabled"] = chart_url_settings_enabled + + if ( + chart_url_settings_whitelist is not None + and len(chart_url_settings_whitelist) > 1 + and isinstance(chart_url_settings_whitelist, list) + ): + self.state["state"]["url_state"]["whitelist"] = " \n ".join( + chart_url_settings_whitelist + ) + else: + self.state["state"]["url_state"]["whitelist"] = chart_url_settings_whitelist + + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_slope_chart_details( + self, + circle_radius: float = None, + slope_width: float = None, + slope_width_max: float = None, + slope_color: str = None, + curve: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + selected_slopes: Union[list, str] = None, + value_type: str = None, + ties_mode: str = None, + sort_mode: str = None, + height_mode: str = None, + aspect_ratio: float = None, + chart_facet_columns_fixed: bool = None, + chart_facet_min_width: float = None, + chart_facet_max_width: float = None, + chart_facet_columns: float = None, + chart_facet_gutter_w: float = None, + chart_facet_gutter_h: float = None, + chart_facet_animation: str = None, + chart_facet_titles: bool = None, + chart_facet_title_align: str = None, + chart_facet_title_size: float = None, + chart_facet_title_unit: str = None, + chart_facet_title_color: str = None, + chart_facet_title_padding_top: float = None, + chart_facet_title_padding_bottom: float = None, + chart_facet_title_bg: str = None, + chart_facet_title_bg_color: str = None, + chart_facet_title_bg_padding: float = None, + axis_first_row_only: bool = None, + matching_y_axis: bool = None, + labels_name_position: str = None, + labels_position: str = None, + labels_inline_position: str = None, + labels_inline_position_custom: Union[list, str] = None, + only_show_highlights: bool = None, + chart_line_labels_max_width: float = None, + chart_line_labels_overlap_mode: str = None, + chart_line_labels_spreading_margin: float = None, + chart_line_labels_data_point_margin: float = None, + chart_line_labels_show_only_labels: Union[list, str] = None, + chart_line_labels_text_color: str = None, + chart_line_labels_text_size: float = None, + chart_line_labels_text_bg_color: str = None, + chart_line_labels_text_bg_size: float = None, + chart_line_labels_text_line_height: float = None, + chart_line_labels_text_max_lines: float = None, + chart_line_labels_text_weight: str = None, + chart_line_labels_lines: str = None, + chart_line_labels_line_style: str = None, + chart_line_labels_line_color: str = None, + chart_line_labels_line_width: float = None, + chart_line_labels_line_range: float = None, + chart_line_labels_line_padding: float = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + axis_labels_position: str = None, + axis_font_size: float = None, + axis_text_color: str = None, + axis_color: str = None, + axis_width: float = None, + axis_dashoffset: str = None, + update_y_axis_filter: bool = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + filter_show_all: bool = None, + filter_show_all_text: str = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + animation_duration: float = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + legend_position: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + chart_url_settings_enabled: bool = None, + chart_url_settings_whitelist: Union[list, str] = None, + ): + """ + Set chart details for: slope chart. + + + :param circle_radius: Circle radius. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type circle_radius: float, optional + :param slope_width: Slope width. In pixels. Flourish type hint: number, defaults to None. + :type slope_width: float, optional + :param slope_width_max: Max slope width. Flourish type hint: number, defaults to None. + :type slope_width_max: float, optional + :param slope_color: Slope color. If not set, will use same color as main text. Flourish type hint: color, defaults to None. + :type slope_color: str, optional + :param curve: Line curve. Choices: linear, cardinal, step. Flourish type hint: string, defaults to None. + :type curve: str, optional + :param chart_color_scale_categorical_palette: Palette for categories. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param selected_slopes: Highlight slopes. To highlight slopes, write the name of each slope on a line. You can also create a story and highlight/unhighlight by clicking on a slope. Leave empty to highlight all slopes. Flourish type hint: text, defaults to None. + :type selected_slopes: Union[list, str], optional + :param value_type: Value mode. Choices: ranks, scores, change. Flourish type hint: string, defaults to None. + :type value_type: str, optional + :param ties_mode: Ties mode. Choices: dense, competition, fractional, modified_competition. What rank should be given when there are ties? See https://en.wikipedia.org/wiki/Ranking for explanation of nomenclature. Flourish type hint: string, defaults to None. + :type ties_mode: str, optional + :param sort_mode: Sort mode. Choices: descending, ascending. Flourish type hint: string, defaults to None. + :type sort_mode: str, optional + :param height_mode: Height mode. Choices: auto, aspect_ratio. Flourish type hint: string, defaults to None. + :type height_mode: str, optional + :param aspect_ratio: Aspect ratio. 1 for square, a smaller value means a bigger height. Flourish type hint: number, defaults to None. + :type aspect_ratio: float, optional + :param chart_facet_columns_fixed: Number of columns. Choices: False, True. In Auto mode, the number of columns will change with screen size. Flourish type hint: boolean, defaults to None. + :type chart_facet_columns_fixed: bool, optional + :param chart_facet_min_width: Min chart width. Determines how many columns of charts there should be in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_min_width: float, optional + :param chart_facet_max_width: Max chart width. Determines how many columns of charts there should be in the grid. Ignored if you specify a fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_max_width: float, optional + :param chart_facet_columns: Fixed number of columns. Flourish type hint: number, defaults to None. + :type chart_facet_columns: float, optional + :param chart_facet_gutter_w: Horizontal margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_w: float, optional + :param chart_facet_gutter_h: Vertical margin. Flourish type hint: number, defaults to None. + :type chart_facet_gutter_h: float, optional + :param chart_facet_animation: On data change. Choices: auto, name, reuse. If a chart in the grid is removed, that cell can either be animated out (with another cell moving to take its place) or reused for the new data in that cell. Auto decides for you based on the data. Flourish type hint: string, defaults to None. + :type chart_facet_animation: str, optional + :param chart_facet_titles: Show titles. Flourish type hint: boolean, defaults to None. + :type chart_facet_titles: bool, optional + :param chart_facet_title_align: Alignment. Choices: auto, left, center, right. Flourish type hint: string, defaults to None. + :type chart_facet_title_align: str, optional + :param chart_facet_title_size: Size. Relative to the width of the chart. Flourish type hint: number, defaults to None. + :type chart_facet_title_size: float, optional + :param chart_facet_title_unit: Scale with chart. Choices: rem, facet. Flourish type hint: string, defaults to None. + :type chart_facet_title_unit: str, optional + :param chart_facet_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_color: str, optional + :param chart_facet_title_padding_top: Space above. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_top: float, optional + :param chart_facet_title_padding_bottom: Space below. Flourish type hint: number, defaults to None. + :type chart_facet_title_padding_bottom: float, optional + :param chart_facet_title_bg: Background. Choices: none, full, text. Flourish type hint: string, defaults to None. + :type chart_facet_title_bg: str, optional + :param chart_facet_title_bg_color: Color. Flourish type hint: color, defaults to None. + :type chart_facet_title_bg_color: str, optional + :param chart_facet_title_bg_padding: Padding. Horizontal space between text and background. Flourish type hint: number, defaults to None. + :type chart_facet_title_bg_padding: float, optional + :param axis_first_row_only: Show X axis on first row only. Flourish type hint: boolean, defaults to None. + :type axis_first_row_only: bool, optional + :param matching_y_axis: Matching Y scale across facets. Flourish type hint: boolean, defaults to None. + :type matching_y_axis: bool, optional + :param labels_name_position: Slope name mode. Choices: side, inline, none. Flourish type hint: string, defaults to None. + :type labels_name_position: str, optional + :param labels_position: Slope name position. Choices: start, both, end. Both mode will fallback to Start on narrow windows and devices. Flourish type hint: string, defaults to None. + :type labels_position: str, optional + :param labels_inline_position: Slope name position. Choices: start, middle, end. Flourish type hint: string, defaults to None. + :type labels_inline_position: str, optional + :param labels_inline_position_custom: Custom slope name positions. Change the position of each individual label. One line per label. Syntax Label name :: start/middle/end :: offset in % (optional) Example Luxembourg :: end :: 10 France :: start. Flourish type hint: text, defaults to None. + :type labels_inline_position_custom: Union[list, str], optional + :param only_show_highlights: Only show highlighted labels. Flourish type hint: boolean, defaults to None. + :type only_show_highlights: bool, optional + :param chart_line_labels_max_width: Max label width. The maximum allowed label width. Flourish type hint: number, defaults to None. + :type chart_line_labels_max_width: float, optional + :param chart_line_labels_overlap_mode: Overlaps. Choices: spread, hide, none. What to do with overlaps. Flourish type hint: string, defaults to None. + :type chart_line_labels_overlap_mode: str, optional + :param chart_line_labels_spreading_margin: Space between labels. The space left between labels when spreading them out to avoid overlaps. Flourish type hint: number, defaults to None. + :type chart_line_labels_spreading_margin: float, optional + :param chart_line_labels_data_point_margin: Distance. The space between the data point and the label in rems (a multiple of base font size). Flourish type hint: number, defaults to None. + :type chart_line_labels_data_point_margin: float, optional + :param chart_line_labels_show_only_labels: Show only certain labels. Manually specify which labels youd like to display (one entry per line). Flourish type hint: text, defaults to None. + :type chart_line_labels_show_only_labels: Union[list, str], optional + :param chart_line_labels_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_line_labels_text_color: str, optional + :param chart_line_labels_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_line_labels_text_size: float, optional + :param chart_line_labels_text_bg_color: Outline. Flourish type hint: color, defaults to None. + :type chart_line_labels_text_bg_color: str, optional + :param chart_line_labels_text_bg_size: Outline width. As a % of the font size. Flourish type hint: number, defaults to None. + :type chart_line_labels_text_bg_size: float, optional + :param chart_line_labels_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_line_labels_text_line_height: float, optional + :param chart_line_labels_text_max_lines: Max lines. The max number of lines for each label. Flourish type hint: number, defaults to None. + :type chart_line_labels_text_max_lines: float, optional + :param chart_line_labels_text_weight: Weight. Choices: 400, 700. Flourish type hint: string, defaults to None. + :type chart_line_labels_text_weight: str, optional + :param chart_line_labels_lines: Connector lines. Choices: auto, on, off. Flourish type hint: string, defaults to None. + :type chart_line_labels_lines: str, optional + :param chart_line_labels_line_style: Line style. Choices: straight, step. Flourish type hint: string, defaults to None. + :type chart_line_labels_line_style: str, optional + :param chart_line_labels_line_color: Color. Flourish type hint: color, defaults to None. + :type chart_line_labels_line_color: str, optional + :param chart_line_labels_line_width: Width. In rems (a multiple of base font size). Flourish type hint: number, defaults to None. + :type chart_line_labels_line_width: float, optional + :param chart_line_labels_line_range: Length. The width of the space given over to lines; in rems, a multiple of base font size. Flourish type hint: number, defaults to None. + :type chart_line_labels_line_range: float, optional + :param chart_line_labels_line_padding: Padding. The padding to the left and right of the line; in rems, a multiple of base font size. Flourish type hint: number, defaults to None. + :type chart_line_labels_line_padding: float, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param axis_labels_position: Position. Choices: top, bottom, hidden. Flourish type hint: string, defaults to None. + :type axis_labels_position: str, optional + :param axis_font_size: Font size. Flourish type hint: number, defaults to None. + :type axis_font_size: float, optional + :param axis_text_color: Font color. Flourish type hint: color, defaults to None. + :type axis_text_color: str, optional + :param axis_color: Axis color. Flourish type hint: color, defaults to None. + :type axis_color: str, optional + :param axis_width: Axis width. Flourish type hint: number, defaults to None. + :type axis_width: float, optional + :param axis_dashoffset: Axis dash. eg. 2,2. Flourish type hint: string, defaults to None. + :type axis_dashoffset: str, optional + :param update_y_axis_filter: Update Y axis when filtering. Flourish type hint: boolean, defaults to None. + :type update_y_axis_filter: bool, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param filter_show_all: Include "All". Flourish type hint: boolean, defaults to None. + :type filter_show_all: bool, optional + :param filter_show_all_text: “All” label. Flourish type hint: string, defaults to None. + :type filter_show_all_text: str, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param animation_duration: Animation duration. The duration of the animation (in milliseconds) when changing data or mode for example between slides in a story. Flourish type hint: number, defaults to None. + :type animation_duration: float, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param legend_position: Position. Choices: above, below. Flourish type hint: string, defaults to None. + :type legend_position: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + :param chart_url_settings_enabled: Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to None. + :type chart_url_settings_enabled: bool, optional + :param chart_url_settings_whitelist: Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to None. + :type chart_url_settings_whitelist: Union[list, str], optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "facets": {}, + "line_labels": {}, + "popup": {}, + "controls": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "slider_style": {}, + "legend_categorical": {}, + "legend_container": {}, + "formatting": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + "url_state": {}, + } + } + + self.state["state"]["circle_radius"] = circle_radius + self.state["state"]["slope_width"] = slope_width + self.state["state"]["slope_width_max"] = slope_width_max + self.state["state"]["slope_color"] = slope_color + + list_curve = ["linear", "cardinal", "step"] + [None] + if curve not in list_curve: + raise ValueError(f"`curve` must be one of: ['linear', 'cardinal', 'step']") + elif curve in list_curve and curve is not None: + filtered_dict = { + k: v + for (k, v) in { + "linear": "linear", + "cardinal": "cardinal", + "step": "step", + }.items() + if curve in k + } + if len(filtered_dict) > 0: + self.state["state"]["curve"] = filtered_dict[curve] + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + + if ( + selected_slopes is not None + and len(selected_slopes) > 1 + and isinstance(selected_slopes, list) + ): + self.state["state"]["selected_slopes"] = " \n ".join(selected_slopes) + else: + self.state["state"]["selected_slopes"] = selected_slopes + + list_value_type = ["ranks", "scores", "change"] + [None] + if value_type not in list_value_type: + raise ValueError( + f"`value_type` must be one of: ['ranks', 'scores', 'change']" + ) + elif value_type in list_value_type and value_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "ranks": "ranks", + "scores": "scores", + "change": "change", + }.items() + if value_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["value_type"] = filtered_dict[value_type] + + list_ties_mode = [ + "dense", + "competition", + "fractional", + "modified_competition", + ] + [None] + if ties_mode not in list_ties_mode: + raise ValueError( + f"`ties_mode` must be one of: ['dense', 'competition', 'fractional', 'modified_competition']" + ) + elif ties_mode in list_ties_mode and ties_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "dense": "dense", + "competition": "competition", + "fractional": "fractional", + "modified_competition": "modified_competition", + }.items() + if ties_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["ties_mode"] = filtered_dict[ties_mode] + + list_sort_mode = ["descending", "ascending"] + [None] + if sort_mode not in list_sort_mode: + raise ValueError(f"`sort_mode` must be one of: ['descending', 'ascending']") + elif sort_mode in list_sort_mode and sort_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "descending": "descending", + "ascending": "ascending", + }.items() + if sort_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["sort_mode"] = filtered_dict[sort_mode] + + list_height_mode = ["auto", "aspect_ratio"] + [None] + if height_mode not in list_height_mode: + raise ValueError(f"`height_mode` must be one of: ['auto', 'aspect_ratio']") + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "aspect_ratio": "aspect_ratio"}.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + self.state["state"]["aspect_ratio"] = aspect_ratio + + list_chart_facet_columns_fixed = [False, True] + [None] + if chart_facet_columns_fixed not in list_chart_facet_columns_fixed: + raise ValueError( + f"`chart_facet_columns_fixed` must be one of: [False, True]" + ) + elif ( + chart_facet_columns_fixed in list_chart_facet_columns_fixed + and chart_facet_columns_fixed is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_facet_columns_fixed in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["columns_fixed"] = filtered_dict[ + chart_facet_columns_fixed + ] + self.state["state"]["facets"]["min_width"] = chart_facet_min_width + self.state["state"]["facets"]["max_width"] = chart_facet_max_width + self.state["state"]["facets"]["columns"] = chart_facet_columns + self.state["state"]["facets"]["gutter_w"] = chart_facet_gutter_w + self.state["state"]["facets"]["gutter_h"] = chart_facet_gutter_h + + list_chart_facet_animation = ["auto", "name", "reuse"] + [None] + if chart_facet_animation not in list_chart_facet_animation: + raise ValueError( + f"`chart_facet_animation` must be one of: ['auto', 'name', 'reuse']" + ) + elif ( + chart_facet_animation in list_chart_facet_animation + and chart_facet_animation is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "name": "name", "reuse": "reuse"}.items() + if chart_facet_animation in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["animation"] = filtered_dict[ + chart_facet_animation + ] + self.state["state"]["facets"]["titles"] = chart_facet_titles + + list_chart_facet_title_align = ["auto", "left", "center", "right"] + [None] + if chart_facet_title_align not in list_chart_facet_title_align: + raise ValueError( + f"`chart_facet_title_align` must be one of: ['auto', 'left', 'center', 'right']" + ) + elif ( + chart_facet_title_align in list_chart_facet_title_align + and chart_facet_title_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_facet_title_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_align"] = filtered_dict[ + chart_facet_title_align + ] + self.state["state"]["facets"]["title_size"] = chart_facet_title_size + + list_chart_facet_title_unit = ["rem", "facet"] + [None] + if chart_facet_title_unit not in list_chart_facet_title_unit: + raise ValueError( + f"`chart_facet_title_unit` must be one of: ['rem', 'facet']" + ) + elif ( + chart_facet_title_unit in list_chart_facet_title_unit + and chart_facet_title_unit is not None + ): + filtered_dict = { + k: v + for (k, v) in {"rem": "rem", "facet": "facet"}.items() + if chart_facet_title_unit in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_unit"] = filtered_dict[ + chart_facet_title_unit + ] + self.state["state"]["facets"]["title_color"] = chart_facet_title_color + self.state["state"]["facets"][ + "title_padding_top" + ] = chart_facet_title_padding_top + self.state["state"]["facets"][ + "title_padding_bottom" + ] = chart_facet_title_padding_bottom + + list_chart_facet_title_bg = ["none", "full", "text"] + [None] + if chart_facet_title_bg not in list_chart_facet_title_bg: + raise ValueError( + f"`chart_facet_title_bg` must be one of: ['none', 'full', 'text']" + ) + elif ( + chart_facet_title_bg in list_chart_facet_title_bg + and chart_facet_title_bg is not None + ): + filtered_dict = { + k: v + for (k, v) in {"none": "none", "full": "full", "text": "text"}.items() + if chart_facet_title_bg in k + } + if len(filtered_dict) > 0: + self.state["state"]["facets"]["title_bg"] = filtered_dict[ + chart_facet_title_bg + ] + self.state["state"]["facets"]["title_bg_color"] = chart_facet_title_bg_color + self.state["state"]["facets"]["title_bg_padding"] = chart_facet_title_bg_padding + self.state["state"]["axis_first_row_only"] = axis_first_row_only + self.state["state"]["matching_y_axis"] = matching_y_axis + + list_labels_name_position = ["side", "inline", "none"] + [None] + if labels_name_position not in list_labels_name_position: + raise ValueError( + f"`labels_name_position` must be one of: ['side', 'inline', 'none']" + ) + elif ( + labels_name_position in list_labels_name_position + and labels_name_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "side": "side", + "inline": "inline", + "none": "none", + }.items() + if labels_name_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_name_position"] = filtered_dict[ + labels_name_position + ] + + list_labels_position = ["start", "both", "end"] + [None] + if labels_position not in list_labels_position: + raise ValueError( + f"`labels_position` must be one of: ['start', 'both', 'end']" + ) + elif labels_position in list_labels_position and labels_position is not None: + filtered_dict = { + k: v + for (k, v) in {"start": "start", "both": "both", "end": "end"}.items() + if labels_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_position"] = filtered_dict[labels_position] + + list_labels_inline_position = ["start", "middle", "end"] + [None] + if labels_inline_position not in list_labels_inline_position: + raise ValueError( + f"`labels_inline_position` must be one of: ['start', 'middle', 'end']" + ) + elif ( + labels_inline_position in list_labels_inline_position + and labels_inline_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "middle": "middle", + "end": "end", + }.items() + if labels_inline_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["labels_inline_position"] = filtered_dict[ + labels_inline_position + ] + + if ( + labels_inline_position_custom is not None + and len(labels_inline_position_custom) > 1 + and isinstance(labels_inline_position_custom, list) + ): + self.state["state"]["labels_inline_position_custom"] = " \n ".join( + labels_inline_position_custom + ) + else: + self.state["state"][ + "labels_inline_position_custom" + ] = labels_inline_position_custom + + self.state["state"]["only_show_highlights"] = only_show_highlights + self.state["state"]["line_labels"]["max_width"] = chart_line_labels_max_width + + list_chart_line_labels_overlap_mode = ["spread", "hide", "none"] + [None] + if chart_line_labels_overlap_mode not in list_chart_line_labels_overlap_mode: + raise ValueError( + f"`chart_line_labels_overlap_mode` must be one of: ['spread', 'hide', 'none']" + ) + elif ( + chart_line_labels_overlap_mode in list_chart_line_labels_overlap_mode + and chart_line_labels_overlap_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "spread": "spread", + "hide": "hide", + "none": "none", + }.items() + if chart_line_labels_overlap_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_labels"]["overlap_mode"] = filtered_dict[ + chart_line_labels_overlap_mode + ] + self.state["state"]["line_labels"][ + "spreading_margin" + ] = chart_line_labels_spreading_margin + self.state["state"]["line_labels"][ + "data_point_margin" + ] = chart_line_labels_data_point_margin + + if ( + chart_line_labels_show_only_labels is not None + and len(chart_line_labels_show_only_labels) > 1 + and isinstance(chart_line_labels_show_only_labels, list) + ): + self.state["state"]["line_labels"]["show_only_labels"] = " \n ".join( + chart_line_labels_show_only_labels + ) + else: + self.state["state"]["line_labels"][ + "show_only_labels" + ] = chart_line_labels_show_only_labels + + self.state["state"]["line_labels"]["text_color"] = chart_line_labels_text_color + self.state["state"]["line_labels"]["text_size"] = chart_line_labels_text_size + self.state["state"]["line_labels"][ + "text_bg_color" + ] = chart_line_labels_text_bg_color + self.state["state"]["line_labels"][ + "text_bg_size" + ] = chart_line_labels_text_bg_size + self.state["state"]["line_labels"][ + "text_line_height" + ] = chart_line_labels_text_line_height + self.state["state"]["line_labels"][ + "text_max_lines" + ] = chart_line_labels_text_max_lines + + list_chart_line_labels_text_weight = [400, 700] + [None] + if chart_line_labels_text_weight not in list_chart_line_labels_text_weight: + raise ValueError( + f"`chart_line_labels_text_weight` must be one of: [400, 700]" + ) + elif ( + chart_line_labels_text_weight in list_chart_line_labels_text_weight + and chart_line_labels_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {400: 400, 700: 700}.items() + if chart_line_labels_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_labels"]["text_weight"] = filtered_dict[ + chart_line_labels_text_weight + ] + + list_chart_line_labels_lines = ["auto", "on", "off"] + [None] + if chart_line_labels_lines not in list_chart_line_labels_lines: + raise ValueError( + f"`chart_line_labels_lines` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_line_labels_lines in list_chart_line_labels_lines + and chart_line_labels_lines is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_line_labels_lines in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_labels"]["lines"] = filtered_dict[ + chart_line_labels_lines + ] + + list_chart_line_labels_line_style = ["straight", "step"] + [None] + if chart_line_labels_line_style not in list_chart_line_labels_line_style: + raise ValueError( + f"`chart_line_labels_line_style` must be one of: ['straight', 'step']" + ) + elif ( + chart_line_labels_line_style in list_chart_line_labels_line_style + and chart_line_labels_line_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"straight": "straight", "step": "step"}.items() + if chart_line_labels_line_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_labels"]["line_style"] = filtered_dict[ + chart_line_labels_line_style + ] + self.state["state"]["line_labels"]["line_color"] = chart_line_labels_line_color + self.state["state"]["line_labels"]["line_width"] = chart_line_labels_line_width + self.state["state"]["line_labels"]["line_range"] = chart_line_labels_line_range + self.state["state"]["line_labels"][ + "line_padding" + ] = chart_line_labels_line_padding + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + + list_axis_labels_position = ["top", "bottom", "hidden"] + [None] + if axis_labels_position not in list_axis_labels_position: + raise ValueError( + f"`axis_labels_position` must be one of: ['top', 'bottom', 'hidden']" + ) + elif ( + axis_labels_position in list_axis_labels_position + and axis_labels_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "hidden": "hidden", + }.items() + if axis_labels_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["axis_labels_position"] = filtered_dict[ + axis_labels_position + ] + self.state["state"]["axis_font_size"] = axis_font_size + self.state["state"]["axis_text_color"] = axis_text_color + self.state["state"]["axis_color"] = axis_color + self.state["state"]["axis_width"] = axis_width + self.state["state"]["axis_dashoffset"] = axis_dashoffset + self.state["state"]["update_y_axis_filter"] = update_y_axis_filter + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["controls"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["controls"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["controls"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["dropdown_width_mode"] = filtered_dict[ + chart_filter_controls_dropdown_width_mode + ] + self.state["state"]["controls"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["controls"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["controls"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["controls"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["controls"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["controls"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["filter_show_all"] = filter_show_all + self.state["state"]["filter_show_all_text"] = filter_show_all_text + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["slider_style"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["slider_style"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["slider_style"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["slider_style"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["slider_style"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["slider_style"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["slider_style"][ + "play_button" + ] = chart_slider_control_style_play_button + self.state["state"]["animation_duration"] = animation_duration + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_legend_position = ["above", "below"] + [None] + if legend_position not in list_legend_position: + raise ValueError(f"`legend_position` must be one of: ['above', 'below']") + elif legend_position in list_legend_position and legend_position is not None: + filtered_dict = { + k: v + for (k, v) in {"above": "above", "below": "below"}.items() + if legend_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_position"] = filtered_dict[legend_position] + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + self.state["state"]["formatting"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["formatting"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["formatting"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["formatting"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["formatting"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["formatting"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["formatting"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["formatting"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["formatting"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["formatting"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + self.state["state"]["url_state"]["enabled"] = chart_url_settings_enabled + + if ( + chart_url_settings_whitelist is not None + and len(chart_url_settings_whitelist) > 1 + and isinstance(chart_url_settings_whitelist, list) + ): + self.state["state"]["url_state"]["whitelist"] = " \n ".join( + chart_url_settings_whitelist + ) + else: + self.state["state"]["url_state"]["whitelist"] = chart_url_settings_whitelist + + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_sports_details( + self, + positions_type: str = None, + positions_scale_custom: str = None, + positions_x_min: float = None, + positions_x_max: float = None, + positions_y_min: float = None, + positions_y_max: float = None, + formation_type: str = None, + formation: str = None, + formation_custom: Union[list, str] = None, + pitch_margin_top: float = None, + pitch_margin_bottom: float = None, + pitch_type: str = None, + pitch_type_custom: str = None, + pitch_type_upload: str = None, + pitch_type_svg: Union[list, str] = None, + pitch_line_color: str = None, + pitch_line_opacity: float = None, + pitch_line_width: float = None, + pitch_height: float = None, + pitch_background: str = None, + pitch_opacity: float = None, + pitch_orientation: str = None, + pitch_crop: str = None, + pitch_crop_custom: float = None, + pitch_flip_dots: bool = None, + pitch_flip_pitch: bool = None, + colors_categorical_palette: Union[list, str] = None, + colors_categorical_extend: bool = None, + colors_categorical_custom_palette: Union[list, str] = None, + colors_numeric_type: str = None, + colors_binning: bool = None, + colors_bin_mode: str = None, + colors_bin_count: float = None, + colors_bin_thresholds: str = None, + colors_sequential_palette: str = None, + colors_sequential_reverse: bool = None, + colors_sequential_custom_min: str = None, + colors_sequential_custom_max: str = None, + colors_sequential_color_space: str = None, + colors_sequential_custom_domain: bool = None, + colors_sequential_domain_min: float = None, + colors_sequential_domain_max: float = None, + colors_diverging_palette: str = None, + colors_diverging_reverse: bool = None, + colors_diverging_custom_min: str = None, + colors_diverging_custom_mid: str = None, + colors_diverging_custom_max: str = None, + colors_diverging_color_space: str = None, + colors_diverging_custom_domain: bool = None, + colors_diverging_domain_min: float = None, + colors_diverging_domain_mid: float = None, + colors_diverging_domain_max: float = None, + dot_opacity: float = None, + dot_size: str = None, + dot_size_custom: float = None, + dot_border: str = None, + dot_border_custom: float = None, + dot_border_color: str = None, + label_mode: bool = None, + label_color: str = None, + label_weight: str = None, + label_size: str = None, + label_size_custom: float = None, + show_squad_numbers: bool = None, + squad_number_size: str = None, + squad_number_size_custom: float = None, + squad_number_weight: str = None, + squad_number_color: str = None, + squad_number_vertical_adjust: float = None, + image_contrast: float = None, + image_brightness: float = None, + image_saturation: float = None, + image_blend_mode: str = None, + animation_target: str = None, + animation_duration: float = None, + trail: bool = None, + trail_color: str = None, + trail_opacity: float = None, + trail_size: str = None, + trail_size_custom: float = None, + trail_style: str = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + chart_filter_controls_container_alignment: str = None, + chart_filter_controls_container_controls_spacing: float = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + filter_include_all: bool = None, + filter_all_label: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: sports. + + + :param positions_type: Position points by. Choices: auto, formation, data. Position points automatically based on your data, on a specific formation, or use X and Y coordinates. Flourish type hint: string, defaults to None. + :type positions_type: str, optional + :param positions_scale_custom: Position scale. Choices: auto, custom. "Auto" will set the position scale based on the minimum and maximum values in your data. "Custom" allows you to set a custom minimum and maximum. Flourish type hint: string, defaults to None. + :type positions_scale_custom: str, optional + :param positions_x_min: X min. Flourish type hint: number, defaults to None. + :type positions_x_min: float, optional + :param positions_x_max: X max. Flourish type hint: number, defaults to None. + :type positions_x_max: float, optional + :param positions_y_min: Y min. Flourish type hint: number, defaults to None. + :type positions_y_min: float, optional + :param positions_y_max: Y max. Flourish type hint: number, defaults to None. + :type positions_y_max: float, optional + :param formation_type: Formation type. Choices: preset, custom. Flourish type hint: string, defaults to None. + :type formation_type: str, optional + :param formation: Formation. Choices: 3-5-2, 4-3-3, 4-3-2-1, 4-4-2, 3-4-3, 4-2-3-1. Flourish type hint: string, defaults to None. + :type formation: str, optional + :param formation_custom: Custom formation. Use a "*"" for every player and a "-" for every space on the pitch. Flourish type hint: code, defaults to None. + :type formation_custom: Union[list, str], optional + :param pitch_margin_top: Top. Increases the gap between the top of the pitch and the first dot. Flourish type hint: number, defaults to None. + :type pitch_margin_top: float, optional + :param pitch_margin_bottom: Bottom. Increases the gap between the bottom of the pitch and the last dot. Flourish type hint: number, defaults to None. + :type pitch_margin_bottom: float, optional + :param pitch_type: Sport. Choices: football, basketball, tennis, custom. Flourish type hint: string, defaults to None. + :type pitch_type: str, optional + :param pitch_type_custom: Choices: upload, svg. Flourish type hint: string, defaults to None. + :type pitch_type_custom: str, optional + :param pitch_type_upload: Upload. Flourish type hint: url, defaults to None. + :type pitch_type_upload: str, optional + :param pitch_type_svg: SVG. Flourish type hint: text, defaults to None. + :type pitch_type_svg: Union[list, str], optional + :param pitch_line_color: Color. Flourish type hint: color, defaults to None. + :type pitch_line_color: str, optional + :param pitch_line_opacity: Opacity. Opacity of the pitch marking lines. Flourish type hint: number, defaults to None. + :type pitch_line_opacity: float, optional + :param pitch_line_width: Line width. Line width of the pitch markings in pixels. Flourish type hint: number, defaults to None. + :type pitch_line_width: float, optional + :param pitch_height: Pitch height. As a percentage of the width. Flourish type hint: number, defaults to None. + :type pitch_height: float, optional + :param pitch_background: Background color. Background color of the pitch. To change the color of the background outside of the pitch, instead slect Background color in the layout section. Flourish type hint: color, defaults to None. + :type pitch_background: str, optional + :param pitch_opacity: Background opacity. Opacity of the pitch background. Flourish type hint: number, defaults to None. + :type pitch_opacity: float, optional + :param pitch_orientation: Orientation. Choices: vertical, horizontal. Flourish type hint: string, defaults to None. + :type pitch_orientation: str, optional + :param pitch_crop: Crop pitch. Choices: 1, custom. Show the full pitch, or only show a portion. Flourish type hint: string, defaults to None. + :type pitch_crop: str, optional + :param pitch_crop_custom: Custom. Flourish type hint: number, defaults to None. + :type pitch_crop_custom: float, optional + :param pitch_flip_dots: Flip dots. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type pitch_flip_dots: bool, optional + :param pitch_flip_pitch: Flip pitch. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type pitch_flip_pitch: bool, optional + :param colors_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type colors_categorical_palette: Union[list, str], optional + :param colors_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type colors_categorical_extend: bool, optional + :param colors_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type colors_categorical_custom_palette: Union[list, str], optional + :param colors_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type colors_numeric_type: str, optional + :param colors_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type colors_binning: bool, optional + :param colors_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type colors_bin_mode: str, optional + :param colors_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type colors_bin_count: float, optional + :param colors_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type colors_bin_thresholds: str, optional + :param colors_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type colors_sequential_palette: str, optional + :param colors_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type colors_sequential_reverse: bool, optional + :param colors_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type colors_sequential_custom_min: str, optional + :param colors_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type colors_sequential_custom_max: str, optional + :param colors_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type colors_sequential_color_space: str, optional + :param colors_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type colors_sequential_custom_domain: bool, optional + :param colors_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type colors_sequential_domain_min: float, optional + :param colors_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type colors_sequential_domain_max: float, optional + :param colors_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type colors_diverging_palette: str, optional + :param colors_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type colors_diverging_reverse: bool, optional + :param colors_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type colors_diverging_custom_min: str, optional + :param colors_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type colors_diverging_custom_mid: str, optional + :param colors_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type colors_diverging_custom_max: str, optional + :param colors_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type colors_diverging_color_space: str, optional + :param colors_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type colors_diverging_custom_domain: bool, optional + :param colors_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type colors_diverging_domain_min: float, optional + :param colors_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type colors_diverging_domain_mid: float, optional + :param colors_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type colors_diverging_domain_max: float, optional + :param dot_opacity: Opacity. Opacity of the dots. Flourish type hint: number, defaults to None. + :type dot_opacity: float, optional + :param dot_size: Size. Choices: 1.3, 2.5, 6, custom. Flourish type hint: string, defaults to None. + :type dot_size: str, optional + :param dot_size_custom: Custom. Flourish type hint: number, defaults to None. + :type dot_size_custom: float, optional + :param dot_border: Border size. Choices: 0, 0.2, 0.5, custom. Flourish type hint: string, defaults to None. + :type dot_border: str, optional + :param dot_border_custom: Custom. Flourish type hint: number, defaults to None. + :type dot_border_custom: float, optional + :param dot_border_color: Color. Outline color of the dots. Flourish type hint: color, defaults to None. + :type dot_border_color: str, optional + :param label_mode: Labels. Choices: True, False. Labels will always be hidden if there are more than 200 data points. Flourish type hint: boolean, defaults to None. + :type label_mode: bool, optional + :param label_color: Color. Label color. Defaults to layout font color settings if not set. Flourish type hint: color, defaults to None. + :type label_color: str, optional + :param label_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type label_weight: str, optional + :param label_size: Size. Choices: 0.8, 1, 1.2, custom. Sizing unit is relative to root font size. Flourish type hint: string, defaults to None. + :type label_size: str, optional + :param label_size_custom: Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type label_size_custom: float, optional + :param show_squad_numbers: Show Squad Numbers. Optional squad number to appear within dot. Flourish type hint: boolean, defaults to None. + :type show_squad_numbers: bool, optional + :param squad_number_size: Size Mode. Choices: 1.1, 1.4, 1.7, custom. Resizes the font size as a proportion of the dots radius. Flourish type hint: string, defaults to None. + :type squad_number_size: str, optional + :param squad_number_size_custom: Custom. Specify a custom responsive font size. Best results are betwen 0.8 and 2. Flourish type hint: number, defaults to None. + :type squad_number_size_custom: float, optional + :param squad_number_weight: Weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type squad_number_weight: str, optional + :param squad_number_color: Color. Flourish type hint: color, defaults to None. + :type squad_number_color: str, optional + :param squad_number_vertical_adjust: Adjust vertical spacing. Adjust vertical centering for custom fonts. Flourish type hint: number, defaults to None. + :type squad_number_vertical_adjust: float, optional + :param image_contrast: Contrast. Flourish type hint: number, defaults to None. + :type image_contrast: float, optional + :param image_brightness: Brightness. Flourish type hint: number, defaults to None. + :type image_brightness: float, optional + :param image_saturation: Saturation. Flourish type hint: number, defaults to None. + :type image_saturation: float, optional + :param image_blend_mode: Blend mode. Choices: normal, multiply, screen, overlay, darken, lighten. Flourish type hint: string, defaults to None. + :type image_blend_mode: str, optional + :param animation_target: Animate. Choices: position, opacity, both. Choose whether you want to animate the animate the positions or fade, for example when changing the filter, or drag players positions in the story editor. Flourish type hint: string, defaults to None. + :type animation_target: str, optional + :param animation_duration: Duration. Specified in seconds. Flourish type hint: number, defaults to None. + :type animation_duration: float, optional + :param trail: Trail lines. Choices: False, True. Show trail lines when a point is dragged to a new position. Only visible in the story editor. Flourish type hint: boolean, defaults to None. + :type trail: bool, optional + :param trail_color: Color. Flourish type hint: color, defaults to None. + :type trail_color: str, optional + :param trail_opacity: Opacity. Flourish type hint: number, defaults to None. + :type trail_opacity: float, optional + :param trail_size: Size. Choices: 0.2, 0.5, custom. Flourish type hint: string, defaults to None. + :type trail_size: str, optional + :param trail_size_custom: Custom. Proportional to the smallest point size. Flourish type hint: number, defaults to None. + :type trail_size_custom: float, optional + :param trail_style: Style. Choices: solid, dotted. Flourish type hint: string, defaults to None. + :type trail_style: str, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param chart_filter_controls_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_filter_controls_container_alignment: str, optional + :param chart_filter_controls_container_controls_spacing: Spacing. The space between controls, like dropdowns and adjacent button sets, in em units. Flourish type hint: number, defaults to None. + :type chart_filter_controls_container_controls_spacing: float, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param filter_include_all: Include "all". Include "All" in the filter dropdown. Flourish type hint: boolean, defaults to None. + :type filter_include_all: bool, optional + :param filter_all_label: All label. Flourish type hint: string, defaults to None. + :type filter_all_label: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "pitch": {}, + "colors": {}, + "legend_categorical": {}, + "legend_container": {}, + "popup": {}, + "controls_container": {}, + "filter_control": {}, + "controls_style": {}, + "dropdown_style": {}, + "button_style": {}, + "slider_style": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_positions_type = ["auto", "formation", "data"] + [None] + if positions_type not in list_positions_type: + raise ValueError( + f"`positions_type` must be one of: ['auto', 'formation', 'data']" + ) + elif positions_type in list_positions_type and positions_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "formation": "formation", + "data": "data", + }.items() + if positions_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["positions_type"] = filtered_dict[positions_type] + + list_positions_scale_custom = ["auto", "custom"] + [None] + if positions_scale_custom not in list_positions_scale_custom: + raise ValueError( + f"`positions_scale_custom` must be one of: ['auto', 'custom']" + ) + elif ( + positions_scale_custom in list_positions_scale_custom + and positions_scale_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if positions_scale_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["positions_scale_custom"] = filtered_dict[ + positions_scale_custom + ] + self.state["state"]["positions_x_min"] = positions_x_min + self.state["state"]["positions_x_max"] = positions_x_max + self.state["state"]["positions_y_min"] = positions_y_min + self.state["state"]["positions_y_max"] = positions_y_max + + list_formation_type = ["preset", "custom"] + [None] + if formation_type not in list_formation_type: + raise ValueError(f"`formation_type` must be one of: ['preset', 'custom']") + elif formation_type in list_formation_type and formation_type is not None: + filtered_dict = { + k: v + for (k, v) in {"preset": "preset", "custom": "custom"}.items() + if formation_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["formation_type"] = filtered_dict[formation_type] + + list_formation = ["3-5-2", "4-3-3", "4-3-2-1", "4-4-2", "3-4-3", "4-2-3-1"] + [ + None + ] + if formation not in list_formation: + raise ValueError( + f"`formation` must be one of: ['3-5-2', '4-3-3', '4-3-2-1', '4-4-2', '3-4-3', '4-2-3-1']" + ) + elif formation in list_formation and formation is not None: + filtered_dict = { + k: v + for (k, v) in { + "3-5-2": "--*--\n-----\n-***-\n*---*\n-----\n-*-*-\n--*--\n-----\n-*-*-", + "4-3-3": "--*--\n-----\n-----\n-----\n-----\n****\n-----\n-----\n-----\n-----\n-*--*--*-\n-----\n-----\n-----\n-*-*-\n-----\n-*-", + "4-3-2-1": "--*--\n-*-*-\n*---*\n--*--\n-*-*-\n*---*\n--*--", + "4-4-2": "-*-\n-\n-**-\n*--*\n----\n-**-\n*--*\n-\n-\n-*--*-", + "3-4-3": "-*-\n--\n-*-*-*-\n--\n*-*-*-*\n--\n-*---*-\n-*-\n--", + "4-2-3-1": "-*-\n-\n****\n-\n-*-*-\n-\n-*----*-\n--*--\n-\n-*-\n-", + }.items() + if formation in k + } + if len(filtered_dict) > 0: + self.state["state"]["formation"] = filtered_dict[formation] + + if ( + formation_custom is not None + and len(formation_custom) > 1 + and isinstance(formation_custom, list) + ): + self.state["state"]["formation_custom"] = " \n ".join(formation_custom) + else: + self.state["state"]["formation_custom"] = formation_custom + + self.state["state"]["pitch"]["margin_top"] = pitch_margin_top + self.state["state"]["pitch"]["margin_bottom"] = pitch_margin_bottom + + list_pitch_type = ["football", "basketball", "tennis", "custom"] + [None] + if pitch_type not in list_pitch_type: + raise ValueError( + f"`pitch_type` must be one of: ['football', 'basketball', 'tennis', 'custom']" + ) + elif pitch_type in list_pitch_type and pitch_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "football": "football", + "basketball": "basketball", + "tennis": "tennis", + "custom": "custom", + }.items() + if pitch_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["pitch"]["type"] = filtered_dict[pitch_type] + + list_pitch_type_custom = ["upload", "svg"] + [None] + if pitch_type_custom not in list_pitch_type_custom: + raise ValueError(f"`pitch_type_custom` must be one of: ['upload', 'svg']") + elif ( + pitch_type_custom in list_pitch_type_custom + and pitch_type_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {"upload": "upload", "svg": "svg"}.items() + if pitch_type_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["pitch"]["type_custom"] = filtered_dict[ + pitch_type_custom + ] + self.state["state"]["pitch"]["type_upload"] = pitch_type_upload + + if ( + pitch_type_svg is not None + and len(pitch_type_svg) > 1 + and isinstance(pitch_type_svg, list) + ): + self.state["state"]["pitch"]["type_svg"] = " \n ".join(pitch_type_svg) + else: + self.state["state"]["pitch"]["type_svg"] = pitch_type_svg + + self.state["state"]["pitch"]["line_color"] = pitch_line_color + self.state["state"]["pitch"]["line_opacity"] = pitch_line_opacity + self.state["state"]["pitch"]["line_width"] = pitch_line_width + self.state["state"]["pitch"]["height"] = pitch_height + self.state["state"]["pitch"]["background"] = pitch_background + self.state["state"]["pitch"]["opacity"] = pitch_opacity + + list_pitch_orientation = ["vertical", "horizontal"] + [None] + if pitch_orientation not in list_pitch_orientation: + raise ValueError( + f"`pitch_orientation` must be one of: ['vertical', 'horizontal']" + ) + elif ( + pitch_orientation in list_pitch_orientation + and pitch_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "vertical": "vertical", + "horizontal": "horizontal", + }.items() + if pitch_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["pitch"]["orientation"] = filtered_dict[ + pitch_orientation + ] + + list_pitch_crop = ["1", "custom"] + [None] + if pitch_crop not in list_pitch_crop: + raise ValueError(f"`pitch_crop` must be one of: ['1', 'custom']") + elif pitch_crop in list_pitch_crop and pitch_crop is not None: + filtered_dict = { + k: v + for (k, v) in {"1": "1", "custom": "custom"}.items() + if pitch_crop in k + } + if len(filtered_dict) > 0: + self.state["state"]["pitch"]["crop"] = filtered_dict[pitch_crop] + self.state["state"]["pitch"]["crop_custom"] = pitch_crop_custom + + list_pitch_flip_dots = [True, False] + [None] + if pitch_flip_dots not in list_pitch_flip_dots: + raise ValueError(f"`pitch_flip_dots` must be one of: [True, False]") + elif pitch_flip_dots in list_pitch_flip_dots and pitch_flip_dots is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if pitch_flip_dots in k + } + if len(filtered_dict) > 0: + self.state["state"]["pitch"]["flip_dots"] = filtered_dict[ + pitch_flip_dots + ] + + list_pitch_flip_pitch = [True, False] + [None] + if pitch_flip_pitch not in list_pitch_flip_pitch: + raise ValueError(f"`pitch_flip_pitch` must be one of: [True, False]") + elif pitch_flip_pitch in list_pitch_flip_pitch and pitch_flip_pitch is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if pitch_flip_pitch in k + } + if len(filtered_dict) > 0: + self.state["state"]["pitch"]["flip_pitch"] = filtered_dict[ + pitch_flip_pitch + ] + + if ( + colors_categorical_palette is not None + and len(colors_categorical_palette) > 1 + and isinstance(colors_categorical_palette, list) + ): + self.state["state"]["colors"]["categorical_palette"] = " \n ".join( + colors_categorical_palette + ) + else: + self.state["state"]["colors"][ + "categorical_palette" + ] = colors_categorical_palette + + self.state["state"]["colors"]["categorical_extend"] = colors_categorical_extend + + if ( + colors_categorical_custom_palette is not None + and len(colors_categorical_custom_palette) > 1 + and isinstance(colors_categorical_custom_palette, list) + ): + self.state["state"]["colors"]["categorical_custom_palette"] = " \n ".join( + colors_categorical_custom_palette + ) + else: + self.state["state"]["colors"][ + "categorical_custom_palette" + ] = colors_categorical_custom_palette + + list_colors_numeric_type = ["sequential", "diverging"] + [None] + if colors_numeric_type not in list_colors_numeric_type: + raise ValueError( + f"`colors_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + colors_numeric_type in list_colors_numeric_type + and colors_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if colors_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["colors"]["numeric_type"] = filtered_dict[ + colors_numeric_type + ] + + list_colors_binning = [False, True] + [None] + if colors_binning not in list_colors_binning: + raise ValueError(f"`colors_binning` must be one of: [False, True]") + elif colors_binning in list_colors_binning and colors_binning is not None: + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if colors_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["colors"]["binning"] = filtered_dict[colors_binning] + + list_colors_bin_mode = ["fixed", "quantile", "custom"] + [None] + if colors_bin_mode not in list_colors_bin_mode: + raise ValueError( + f"`colors_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif colors_bin_mode in list_colors_bin_mode and colors_bin_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if colors_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["colors"]["bin_mode"] = filtered_dict[ + colors_bin_mode + ] + self.state["state"]["colors"]["bin_count"] = colors_bin_count + self.state["state"]["colors"]["bin_thresholds"] = colors_bin_thresholds + self.state["state"]["colors"]["sequential_palette"] = colors_sequential_palette + self.state["state"]["colors"]["sequential_reverse"] = colors_sequential_reverse + self.state["state"]["colors"][ + "sequential_custom_min" + ] = colors_sequential_custom_min + self.state["state"]["colors"][ + "sequential_custom_max" + ] = colors_sequential_custom_max + + list_colors_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [None] + if colors_sequential_color_space not in list_colors_sequential_color_space: + raise ValueError( + f"`colors_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + colors_sequential_color_space in list_colors_sequential_color_space + and colors_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if colors_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["colors"]["sequential_color_space"] = filtered_dict[ + colors_sequential_color_space + ] + + list_colors_sequential_custom_domain = [False, True] + [None] + if colors_sequential_custom_domain not in list_colors_sequential_custom_domain: + raise ValueError( + f"`colors_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + colors_sequential_custom_domain in list_colors_sequential_custom_domain + and colors_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if colors_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["colors"][ + "sequential_custom_domain" + ] = filtered_dict[colors_sequential_custom_domain] + self.state["state"]["colors"][ + "sequential_domain_min" + ] = colors_sequential_domain_min + self.state["state"]["colors"][ + "sequential_domain_max" + ] = colors_sequential_domain_max + self.state["state"]["colors"]["diverging_palette"] = colors_diverging_palette + self.state["state"]["colors"]["diverging_reverse"] = colors_diverging_reverse + self.state["state"]["colors"][ + "diverging_custom_min" + ] = colors_diverging_custom_min + self.state["state"]["colors"][ + "diverging_custom_mid" + ] = colors_diverging_custom_mid + self.state["state"]["colors"][ + "diverging_custom_max" + ] = colors_diverging_custom_max + + list_colors_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [None] + if colors_diverging_color_space not in list_colors_diverging_color_space: + raise ValueError( + f"`colors_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + colors_diverging_color_space in list_colors_diverging_color_space + and colors_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if colors_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["colors"]["diverging_color_space"] = filtered_dict[ + colors_diverging_color_space + ] + + list_colors_diverging_custom_domain = [False, True] + [None] + if colors_diverging_custom_domain not in list_colors_diverging_custom_domain: + raise ValueError( + f"`colors_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + colors_diverging_custom_domain in list_colors_diverging_custom_domain + and colors_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if colors_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["colors"][ + "diverging_custom_domain" + ] = filtered_dict[colors_diverging_custom_domain] + self.state["state"]["colors"][ + "diverging_domain_min" + ] = colors_diverging_domain_min + self.state["state"]["colors"][ + "diverging_domain_mid" + ] = colors_diverging_domain_mid + self.state["state"]["colors"][ + "diverging_domain_max" + ] = colors_diverging_domain_max + self.state["state"]["dot_opacity"] = dot_opacity + + list_dot_size = ["1.3", "2.5", "6", "custom"] + [None] + if dot_size not in list_dot_size: + raise ValueError( + f"`dot_size` must be one of: ['1.3', '2.5', '6', 'custom']" + ) + elif dot_size in list_dot_size and dot_size is not None: + filtered_dict = { + k: v + for (k, v) in { + "1.3": "1.3", + "2.5": "2.5", + "6": "6", + "custom": "custom", + }.items() + if dot_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["dot_size"] = filtered_dict[dot_size] + self.state["state"]["dot_size_custom"] = dot_size_custom + + list_dot_border = ["0", "0.2", "0.5", "custom"] + [None] + if dot_border not in list_dot_border: + raise ValueError( + f"`dot_border` must be one of: ['0', '0.2', '0.5', 'custom']" + ) + elif dot_border in list_dot_border and dot_border is not None: + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.2": "0.2", + "0.5": "0.5", + "custom": "custom", + }.items() + if dot_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["dot_border"] = filtered_dict[dot_border] + self.state["state"]["dot_border_custom"] = dot_border_custom + self.state["state"]["dot_border_color"] = dot_border_color + + list_label_mode = [True, False] + [None] + if label_mode not in list_label_mode: + raise ValueError(f"`label_mode` must be one of: [True, False]") + elif label_mode in list_label_mode and label_mode is not None: + filtered_dict = { + k: v for (k, v) in {True: True, False: False}.items() if label_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_mode"] = filtered_dict[label_mode] + self.state["state"]["label_color"] = label_color + + list_label_weight = ["normal", "bold"] + [None] + if label_weight not in list_label_weight: + raise ValueError(f"`label_weight` must be one of: ['normal', 'bold']") + elif label_weight in list_label_weight and label_weight is not None: + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_weight"] = filtered_dict[label_weight] + + list_label_size = ["0.8", "1", "1.2", "custom"] + [None] + if label_size not in list_label_size: + raise ValueError( + f"`label_size` must be one of: ['0.8', '1', '1.2', 'custom']" + ) + elif label_size in list_label_size and label_size is not None: + filtered_dict = { + k: v + for (k, v) in { + "0.8": "0.8", + "1": "1", + "1.2": "1.2", + "custom": "custom", + }.items() + if label_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_size"] = filtered_dict[label_size] + self.state["state"]["label_size_custom"] = label_size_custom + self.state["state"]["show_squad_numbers"] = show_squad_numbers + + list_squad_number_size = ["1.1", "1.4", "1.7", "custom"] + [None] + if squad_number_size not in list_squad_number_size: + raise ValueError( + f"`squad_number_size` must be one of: ['1.1', '1.4', '1.7', 'custom']" + ) + elif ( + squad_number_size in list_squad_number_size + and squad_number_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.1": "1.1", + "1.4": "1.4", + "1.7": "1.7", + "custom": "custom", + }.items() + if squad_number_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["squad_number_size"] = filtered_dict[ + squad_number_size + ] + self.state["state"]["squad_number_size_custom"] = squad_number_size_custom + + list_squad_number_weight = ["normal", "bold"] + [None] + if squad_number_weight not in list_squad_number_weight: + raise ValueError( + f"`squad_number_weight` must be one of: ['normal', 'bold']" + ) + elif ( + squad_number_weight in list_squad_number_weight + and squad_number_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if squad_number_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["squad_number_weight"] = filtered_dict[ + squad_number_weight + ] + self.state["state"]["squad_number_color"] = squad_number_color + self.state["state"][ + "squad_number_vertical_adjust" + ] = squad_number_vertical_adjust + self.state["state"]["image_contrast"] = image_contrast + self.state["state"]["image_brightness"] = image_brightness + self.state["state"]["image_saturation"] = image_saturation + + list_image_blend_mode = [ + "normal", + "multiply", + "screen", + "overlay", + "darken", + "lighten", + ] + [None] + if image_blend_mode not in list_image_blend_mode: + raise ValueError( + f"`image_blend_mode` must be one of: ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten']" + ) + elif image_blend_mode in list_image_blend_mode and image_blend_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "normal": "normal", + "multiply": "multiply", + "screen": "screen", + "overlay": "overlay", + "darken": "darken", + "lighten": "lighten", + }.items() + if image_blend_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_blend_mode"] = filtered_dict[ + image_blend_mode + ] + + list_animation_target = ["position", "opacity", "both"] + [None] + if animation_target not in list_animation_target: + raise ValueError( + f"`animation_target` must be one of: ['position', 'opacity', 'both']" + ) + elif animation_target in list_animation_target and animation_target is not None: + filtered_dict = { + k: v + for (k, v) in { + "position": "position", + "opacity": "opacity", + "both": "both", + }.items() + if animation_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["animation_target"] = filtered_dict[ + animation_target + ] + self.state["state"]["animation_duration"] = animation_duration + + list_trail = [False, True] + [None] + if trail not in list_trail: + raise ValueError(f"`trail` must be one of: [False, True]") + elif trail in list_trail and trail is not None: + filtered_dict = { + k: v for (k, v) in {False: False, True: True}.items() if trail in k + } + if len(filtered_dict) > 0: + self.state["state"]["trail"] = filtered_dict[trail] + self.state["state"]["trail_color"] = trail_color + self.state["state"]["trail_opacity"] = trail_opacity + + list_trail_size = ["0.2", "0.5", "custom"] + [None] + if trail_size not in list_trail_size: + raise ValueError(f"`trail_size` must be one of: ['0.2', '0.5', 'custom']") + elif trail_size in list_trail_size and trail_size is not None: + filtered_dict = { + k: v + for (k, v) in {"0.2": "0.2", "0.5": "0.5", "custom": "custom"}.items() + if trail_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["trail_size"] = filtered_dict[trail_size] + self.state["state"]["trail_size_custom"] = trail_size_custom + + list_trail_style = ["solid", "dotted"] + [None] + if trail_style not in list_trail_style: + raise ValueError(f"`trail_style` must be one of: ['solid', 'dotted']") + elif trail_style in list_trail_style and trail_style is not None: + filtered_dict = { + k: v + for (k, v) in {"solid": "solid", "dotted": "dotted"}.items() + if trail_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["trail_style"] = filtered_dict[trail_style] + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + + list_chart_filter_controls_container_alignment = ["start", "center", "end"] + [ + None + ] + if ( + chart_filter_controls_container_alignment + not in list_chart_filter_controls_container_alignment + ): + raise ValueError( + f"`chart_filter_controls_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_filter_controls_container_alignment + in list_chart_filter_controls_container_alignment + and chart_filter_controls_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_filter_controls_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_container"]["alignment"] = filtered_dict[ + chart_filter_controls_container_alignment + ] + self.state["state"]["controls_container"][ + "controls_spacing" + ] = chart_filter_controls_container_controls_spacing + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["filter_control"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["filter_control"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["filter_control"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"][ + "dropdown_width_mode" + ] = filtered_dict[chart_filter_controls_dropdown_width_mode] + self.state["state"]["filter_control"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["filter_control"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["filter_control"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["filter_control"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["filter_control"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["filter_control"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["filter_control"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["slider_style"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["slider_style"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["slider_style"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["slider_style"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["slider_style"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["slider_style"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["slider_style"][ + "play_button" + ] = chart_slider_control_style_play_button + self.state["state"]["filter_include_all"] = filter_include_all + self.state["state"]["filter_all_label"] = filter_all_label + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_sports_race_details( + self, + preset_svg: str = None, + custom_svg: Union[list, str] = None, + track_path_id: str = None, + track_lane_width: float = None, + track_back_and_forth: bool = None, + participant_icon_mode: str = None, + participant_size: float = None, + participant_stroke_width: float = None, + participant_stroke_opacity: float = None, + participant_fill_opacity: float = None, + preset_participant_image: str = None, + custom_participant_start_image: str = None, + custom_participant_race_image: str = None, + custom_participant_finish_image: str = None, + image_initial_rotation: str = None, + image_initial_flip_x: bool = None, + image_initial_flip_y: bool = None, + image_transform_mode: str = None, + participant_icon_recolor: bool = None, + chart_participant_color_scale_categorical_palette: Union[list, str] = None, + chart_participant_color_scale_categorical_extend: bool = None, + chart_participant_color_scale_categorical_custom_palette: Union[ + list, str + ] = None, + chart_participant_color_scale_numeric_type: str = None, + chart_participant_color_scale_binning: bool = None, + chart_participant_color_scale_bin_mode: str = None, + chart_participant_color_scale_bin_count: float = None, + chart_participant_color_scale_bin_thresholds: str = None, + chart_participant_color_scale_sequential_palette: str = None, + chart_participant_color_scale_sequential_reverse: bool = None, + chart_participant_color_scale_sequential_custom_min: str = None, + chart_participant_color_scale_sequential_custom_max: str = None, + chart_participant_color_scale_sequential_color_space: str = None, + chart_participant_color_scale_sequential_custom_domain: bool = None, + chart_participant_color_scale_sequential_domain_min: float = None, + chart_participant_color_scale_sequential_domain_max: float = None, + chart_participant_color_scale_diverging_palette: str = None, + chart_participant_color_scale_diverging_reverse: bool = None, + chart_participant_color_scale_diverging_custom_min: str = None, + chart_participant_color_scale_diverging_custom_mid: str = None, + chart_participant_color_scale_diverging_custom_max: str = None, + chart_participant_color_scale_diverging_color_space: str = None, + chart_participant_color_scale_diverging_custom_domain: bool = None, + chart_participant_color_scale_diverging_domain_min: float = None, + chart_participant_color_scale_diverging_domain_mid: float = None, + chart_participant_color_scale_diverging_domain_max: float = None, + camera_mode: str = None, + zoom: float = None, + checkpoint_mode: str = None, + checkpoints: Union[list, str] = None, + times_cumulative: bool = None, + participant_label_mode: str = None, + participant_label_custom: Union[list, str] = None, + participant_label_position: str = None, + participant_label_style: bool = None, + participant_label_color: str = None, + participant_label_size: float = None, + participant_label_stroke: str = None, + participant_label_stroke_size: float = None, + participant_label_weight: str = None, + participant_highlight: bool = None, + participant_highlight_color: str = None, + participant_highlight_width: float = None, + label_position_enabled: bool = None, + label_position_time: str = None, + label_position_type: str = None, + label_medal_enabled: bool = None, + label_medal_time: str = None, + label_medal_type: str = None, + label_medal_replace_position: bool = None, + label_finishing_time_enabled: bool = None, + label_finishing_time_time: str = None, + participant_stacking: str = None, + chart_timeline_controls_enabled: bool = None, + chart_timeline_controls_style: str = None, + chart_timeline_controls_graph: bool = None, + chart_timeline_controls_play_on_load: bool = None, + chart_timeline_controls_loop: bool = None, + chart_timeline_controls_duration: float = None, + chart_timeline_controls_duration_tween: float = None, + chart_timeline_controls_duration_wait_at_end: float = None, + chart_timeline_controls_axes_custom_enabled: bool = None, + chart_timeline_controls_color_axes: str = None, + chart_timeline_controls_axis_font_size: float = None, + chart_timeline_controls_date_format_display: str = None, + chart_timeline_controls_axis_nice_x: bool = None, + chart_timeline_controls_axis_nice_y: bool = None, + chart_timeline_controls_scrubber_snap: bool = None, + chart_timeline_controls_scrubber_snap_paused: bool = None, + chart_timeline_controls_layout_settings: bool = None, + chart_timeline_controls_margin_top: float = None, + chart_timeline_controls_margin_left: float = None, + chart_timeline_controls_margin_bottom: float = None, + chart_timeline_controls_margin_right: float = None, + chart_timeline_controls_playback_button_margin_right: float = None, + chart_timeline_controls_scrubber_height: float = None, + chart_timeline_controls_playback_button_margin_right_button: float = None, + chart_timeline_controls_graph_settings: bool = None, + chart_timeline_controls_color_background: str = None, + chart_timeline_controls_graph_height: float = None, + chart_timeline_controls_curve: bool = None, + chart_timeline_controls_playback_styling: bool = None, + chart_timeline_controls_playback_button_button_color: str = None, + chart_timeline_controls_playback_button_button_size: float = None, + chart_timeline_controls_playback_button_icon_color: str = None, + chart_timeline_controls_playback_button_icon_size: float = None, + chart_timeline_controls_playback_button_label_size: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: sports race. + + + :param preset_svg: Choices: athletics, swimming, cycling, custom. Flourish type hint: string, defaults to None. + :type preset_svg: str, optional + :param custom_svg: Custom SVG. Use a custom track using your own SVG Flourish type hint: text, defaults to None. + :type custom_svg: Union[list, str], optional + :param track_path_id: Path ID. The ID of the element in the SVG which defines the center of the track. Flourish type hint: string, defaults to None. + :type track_path_id: str, optional + :param track_lane_width: Lane width. The distance between each participant. Flourish type hint: number, defaults to None. + :type track_lane_width: float, optional + :param track_back_and_forth: Track type. Choices: False, True. Whether the track goes back and forth, like a swimming pool, or back to the start, like a race track. Flourish type hint: boolean, defaults to None. + :type track_back_and_forth: bool, optional + :param participant_icon_mode: Icon type. Choices: circle, image. Flourish type hint: string, defaults to None. + :type participant_icon_mode: str, optional + :param participant_size: Size. Flourish type hint: number, defaults to None. + :type participant_size: float, optional + :param participant_stroke_width: Line width. Flourish type hint: number, defaults to None. + :type participant_stroke_width: float, optional + :param participant_stroke_opacity: Stroke opacity. Flourish type hint: number, defaults to None. + :type participant_stroke_opacity: float, optional + :param participant_fill_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type participant_fill_opacity: float, optional + :param preset_participant_image: Default images. Choices: runner, swimmer, cyclist, custom. The images used if no image is included for the participant in the datasheet. Flourish type hint: string, defaults to None. + :type preset_participant_image: str, optional + :param custom_participant_start_image: Custom start image. The image shown at the start of the race. Flourish type hint: url, defaults to None. + :type custom_participant_start_image: str, optional + :param custom_participant_race_image: Custom racing image. The image shown while the participant is racing. Flourish type hint: url, defaults to None. + :type custom_participant_race_image: str, optional + :param custom_participant_finish_image: Custom finish image. The image shown when the participant has finished the race. Flourish type hint: url, defaults to None. + :type custom_participant_finish_image: str, optional + :param image_initial_rotation: Rotate images. Choices: 0, 90, 180, 270. Flourish type hint: string, defaults to None. + :type image_initial_rotation: str, optional + :param image_initial_flip_x: Flip horizontally. Flourish type hint: boolean, defaults to None. + :type image_initial_flip_x: bool, optional + :param image_initial_flip_y: Flip vertically. Flourish type hint: boolean, defaults to None. + :type image_initial_flip_y: bool, optional + :param image_transform_mode: Direction change. Choices: rotate, flip_x, flip_y, flip_both, static. Change the direction of the image based on which way the participant is traveling. Rotate rotates the image to face the direction of travel. Flip horizontally flips the image horizontally depending on whether the participant is traveling towards the left or right. Flip vertically flips the image vertically depending on whether the participant is traveling towards the top or bottom. Flip horizontally and vertically combines the horizontal and vertical flip settings. Static doesnt change the direction of the image. Flourish type hint: string, defaults to None. + :type image_transform_mode: str, optional + :param participant_icon_recolor: Recolor icons. Apply colors to differentiate the participants. Works best with greyscale images. Flourish type hint: boolean, defaults to None. + :type participant_icon_recolor: bool, optional + :param chart_participant_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_participant_color_scale_categorical_palette: Union[list, str], optional + :param chart_participant_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_participant_color_scale_categorical_extend: bool, optional + :param chart_participant_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_participant_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_participant_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_participant_color_scale_numeric_type: str, optional + :param chart_participant_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_participant_color_scale_binning: bool, optional + :param chart_participant_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_participant_color_scale_bin_mode: str, optional + :param chart_participant_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_participant_color_scale_bin_count: float, optional + :param chart_participant_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_participant_color_scale_bin_thresholds: str, optional + :param chart_participant_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_participant_color_scale_sequential_palette: str, optional + :param chart_participant_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_participant_color_scale_sequential_reverse: bool, optional + :param chart_participant_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_participant_color_scale_sequential_custom_min: str, optional + :param chart_participant_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_participant_color_scale_sequential_custom_max: str, optional + :param chart_participant_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_participant_color_scale_sequential_color_space: str, optional + :param chart_participant_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_participant_color_scale_sequential_custom_domain: bool, optional + :param chart_participant_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_participant_color_scale_sequential_domain_min: float, optional + :param chart_participant_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_participant_color_scale_sequential_domain_max: float, optional + :param chart_participant_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_participant_color_scale_diverging_palette: str, optional + :param chart_participant_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_participant_color_scale_diverging_reverse: bool, optional + :param chart_participant_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_participant_color_scale_diverging_custom_min: str, optional + :param chart_participant_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_participant_color_scale_diverging_custom_mid: str, optional + :param chart_participant_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_participant_color_scale_diverging_custom_max: str, optional + :param chart_participant_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_participant_color_scale_diverging_color_space: str, optional + :param chart_participant_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_participant_color_scale_diverging_custom_domain: bool, optional + :param chart_participant_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_participant_color_scale_diverging_domain_min: float, optional + :param chart_participant_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_participant_color_scale_diverging_domain_mid: float, optional + :param chart_participant_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_participant_color_scale_diverging_domain_max: float, optional + :param camera_mode: Camera mode. Choices: track, leader. Flourish type hint: string, defaults to None. + :type camera_mode: str, optional + :param zoom: Zoom level. How much to zoom in when playing. Flourish type hint: number, defaults to None. + :type zoom: float, optional + :param checkpoint_mode: Checkpoint mode. Choices: laps, splits, custom. Flourish type hint: string, defaults to None. + :type checkpoint_mode: str, optional + :param checkpoints: Checkpoints. Enter the number of laps completed at each recorded checkpoint/column in the data. E.g. "0.5, 1, 1.5, 2" would mean that the times were taken every half a lap. Enter one checkpoint per line. Flourish type hint: text, defaults to None. + :type checkpoints: Union[list, str], optional + :param times_cumulative: Times are cumulative. Switch on if the time columns represent the cumulative time taken at each checkpoint (e.g. 12, 25, 36). Switch off if the times represent how long individual checkpoints took to complete (e.g. 12, 13, 11). Flourish type hint: boolean, defaults to None. + :type times_cumulative: bool, optional + :param participant_label_mode: Label mode. Choices: auto, leader, all, custom. Determines which labels are drawn. Auto draws as many labels as possible whilst avoiding overlaps. Flourish type hint: string, defaults to None. + :type participant_label_mode: str, optional + :param participant_label_custom: Participants to label. Enter the names of the participants to label. These must exactly match the names in your data. Enter one name per line. Flourish type hint: text, defaults to None. + :type participant_label_custom: Union[list, str], optional + :param participant_label_position: Label position. Choices: auto, left, right. Flourish type hint: string, defaults to None. + :type participant_label_position: str, optional + :param participant_label_style: Style. Flourish type hint: boolean, defaults to None. + :type participant_label_style: bool, optional + :param participant_label_color: Color. Flourish type hint: color, defaults to None. + :type participant_label_color: str, optional + :param participant_label_size: Size. Flourish type hint: number, defaults to None. + :type participant_label_size: float, optional + :param participant_label_stroke: Outline. Flourish type hint: color, defaults to None. + :type participant_label_stroke: str, optional + :param participant_label_stroke_size: Outline width. As a % of the font size. Flourish type hint: number, defaults to None. + :type participant_label_stroke_size: float, optional + :param participant_label_weight: Weight. Choices: 400, 600. Flourish type hint: string, defaults to None. + :type participant_label_weight: str, optional + :param participant_highlight: Highlight icons. Highlight the labeled participant(s). Flourish type hint: boolean, defaults to None. + :type participant_highlight: bool, optional + :param participant_highlight_color: Highlight color. Flourish type hint: color, defaults to None. + :type participant_highlight_color: str, optional + :param participant_highlight_width: Highlight width. Flourish type hint: number, defaults to None. + :type participant_highlight_width: float, optional + :param label_position_enabled: Choices: False, True. Whether to show the position of the participant in the label. Flourish type hint: boolean, defaults to None. + :type label_position_enabled: bool, optional + :param label_position_time: Show position. Choices: always, race, finish. Set to At finish, to only show a participants position when theyve completed the race. Set to During race, to only show a participants position while they are still racing. Flourish type hint: string, defaults to None. + :type label_position_time: str, optional + :param label_position_type: Position to show. Choices: current, finish. Whether to show a participants current position in the race, or their finishing position. Flourish type hint: string, defaults to None. + :type label_position_type: str, optional + :param label_medal_enabled: Choices: False, True. Flourish type hint: boolean, defaults to None. + :type label_medal_enabled: bool, optional + :param label_medal_time: Show medals. Choices: always, race, finish. Set to At finish, to only show a participants medal when theyve completed the race. Set to During race, to only show a participants medal while they are still racing. Flourish type hint: string, defaults to None. + :type label_medal_time: str, optional + :param label_medal_type: Medal to show. Choices: current, finish. Whether to show the medal position for a participant at the current point in the race, or the medal they win at the end of the race. Flourish type hint: string, defaults to None. + :type label_medal_type: str, optional + :param label_medal_replace_position: Replace position. Turn on to replace a participants position label with their medal if they are in a medal position. Flourish type hint: boolean, defaults to None. + :type label_medal_replace_position: bool, optional + :param label_finishing_time_enabled: Choices: False, True. Flourish type hint: boolean, defaults to None. + :type label_finishing_time_enabled: bool, optional + :param label_finishing_time_time: Show finishing time. Choices: always, finish. Flourish type hint: string, defaults to None. + :type label_finishing_time_time: str, optional + :param participant_stacking: Choices: sheet_order, rank, y_position. Determines which participants obscure other participants when they overlap. Flourish type hint: string, defaults to None. + :type participant_stacking: str, optional + :param chart_timeline_controls_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_enabled: bool, optional + :param chart_timeline_controls_style: Style. Choices: timeline, button. Flourish type hint: string, defaults to None. + :type chart_timeline_controls_style: str, optional + :param chart_timeline_controls_graph: Show chart. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_graph: bool, optional + :param chart_timeline_controls_play_on_load: Play on load. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_play_on_load: bool, optional + :param chart_timeline_controls_loop: Loop timeline. When turned on, the timeline will return to the beginning once complete. Otherwise, it will stop when it reaches the end. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_loop: bool, optional + :param chart_timeline_controls_duration: Timeline duration. Total duration of the timeline during normal playback in seconds. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_duration: float, optional + :param chart_timeline_controls_duration_tween: Time jump duration. Duration of transitions between different points in time on the timeline. This is the transition you see in the story player when switching between slides with a different time on the timeline (in seconds). Flourish type hint: number, defaults to None. + :type chart_timeline_controls_duration_tween: float, optional + :param chart_timeline_controls_duration_wait_at_end: Pause before loop. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_duration_wait_at_end: float, optional + :param chart_timeline_controls_axes_custom_enabled: Axis settings. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_axes_custom_enabled: bool, optional + :param chart_timeline_controls_color_axes: Axes color. Flourish type hint: color, defaults to None. + :type chart_timeline_controls_color_axes: str, optional + :param chart_timeline_controls_axis_font_size: Font size. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_axis_font_size: float, optional + :param chart_timeline_controls_date_format_display: X axis date format. Choices:, %Y-%m-%dT%H:%M:%S.%LZ, %Y-%m-%d, %m/%d/%Y, %d/%m/%Y, %d-%b-%y, %m/%Y, %b %Y, %b %y, %B %d, %d %b, %Y, %B, %b, %A, %a, %H:%M:%S, %I:%M %p, %H:%M. Flourish type hint: string, defaults to None. + :type chart_timeline_controls_date_format_display: str, optional + :param chart_timeline_controls_axis_nice_x: Clean X axis. Rounds out the X axis so that its start and end values are nice, round dates. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_axis_nice_x: bool, optional + :param chart_timeline_controls_axis_nice_y: Clean Y axis. Rounds out the Y axis so that its start and end values are nice, round numbers. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_axis_nice_y: bool, optional + :param chart_timeline_controls_scrubber_snap: Snap when scrubbing. When turned on, you can only jump to values that are supplied in the dataset and nothing in between. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_scrubber_snap: bool, optional + :param chart_timeline_controls_scrubber_snap_paused: Snap when paused. Activate to snap the timeline to the closest interval when non animating. This is useful for ensuring the data visible in the visualization always reflects the data you have supplied. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_scrubber_snap_paused: bool, optional + :param chart_timeline_controls_layout_settings: Layout settings. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_layout_settings: bool, optional + :param chart_timeline_controls_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_margin_top: float, optional + :param chart_timeline_controls_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_margin_left: float, optional + :param chart_timeline_controls_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_margin_bottom: float, optional + :param chart_timeline_controls_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_margin_right: float, optional + :param chart_timeline_controls_playback_button_margin_right: Space between button and timeline. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_playback_button_margin_right: float, optional + :param chart_timeline_controls_scrubber_height: Scrubber height. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_scrubber_height: float, optional + :param chart_timeline_controls_playback_button_margin_right_button: Space between button and text. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_playback_button_margin_right_button: float, optional + :param chart_timeline_controls_graph_settings: Chart settings. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_graph_settings: bool, optional + :param chart_timeline_controls_color_background: Background. Flourish type hint: color, defaults to None. + :type chart_timeline_controls_color_background: str, optional + :param chart_timeline_controls_graph_height: Height. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_graph_height: float, optional + :param chart_timeline_controls_curve: Curved lines. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_curve: bool, optional + :param chart_timeline_controls_playback_styling: Play button settings. Flourish type hint: boolean, defaults to None. + :type chart_timeline_controls_playback_styling: bool, optional + :param chart_timeline_controls_playback_button_button_color: Button color. Flourish type hint: color, defaults to None. + :type chart_timeline_controls_playback_button_button_color: str, optional + :param chart_timeline_controls_playback_button_button_size: Button size. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_playback_button_button_size: float, optional + :param chart_timeline_controls_playback_button_icon_color: Icon color. Flourish type hint: color, defaults to None. + :type chart_timeline_controls_playback_button_icon_color: str, optional + :param chart_timeline_controls_playback_button_icon_size: Icon size. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_playback_button_icon_size: float, optional + :param chart_timeline_controls_playback_button_label_size: Label size. Flourish type hint: number, defaults to None. + :type chart_timeline_controls_playback_button_label_size: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "participant_color": {}, + "timeline": {"margin": {}, "playback_button": {}}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_preset_svg = ["athletics", "swimming", "cycling", "custom"] + [None] + if preset_svg not in list_preset_svg: + raise ValueError( + f"`preset_svg` must be one of: ['athletics', 'swimming', 'cycling', 'custom']" + ) + elif preset_svg in list_preset_svg and preset_svg is not None: + filtered_dict = { + k: v + for (k, v) in { + "athletics": "athletics", + "swimming": "swimming", + "cycling": "cycling", + "custom": "custom", + }.items() + if preset_svg in k + } + if len(filtered_dict) > 0: + self.state["state"]["preset_svg"] = filtered_dict[preset_svg] + + if ( + custom_svg is not None + and len(custom_svg) > 1 + and isinstance(custom_svg, list) + ): + self.state["state"]["custom_svg"] = " \n ".join(custom_svg) + else: + self.state["state"]["custom_svg"] = custom_svg + + self.state["state"]["track_path_id"] = track_path_id + self.state["state"]["track_lane_width"] = track_lane_width + + list_track_back_and_forth = [False, True] + [None] + if track_back_and_forth not in list_track_back_and_forth: + raise ValueError(f"`track_back_and_forth` must be one of: [False, True]") + elif ( + track_back_and_forth in list_track_back_and_forth + and track_back_and_forth is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if track_back_and_forth in k + } + if len(filtered_dict) > 0: + self.state["state"]["track_back_and_forth"] = filtered_dict[ + track_back_and_forth + ] + + list_participant_icon_mode = ["circle", "image"] + [None] + if participant_icon_mode not in list_participant_icon_mode: + raise ValueError( + f"`participant_icon_mode` must be one of: ['circle', 'image']" + ) + elif ( + participant_icon_mode in list_participant_icon_mode + and participant_icon_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"circle": "circle", "image": "image"}.items() + if participant_icon_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_icon_mode"] = filtered_dict[ + participant_icon_mode + ] + self.state["state"]["participant_size"] = participant_size + self.state["state"]["participant_stroke_width"] = participant_stroke_width + self.state["state"]["participant_stroke_opacity"] = participant_stroke_opacity + self.state["state"]["participant_fill_opacity"] = participant_fill_opacity + + list_preset_participant_image = ["runner", "swimmer", "cyclist", "custom"] + [ + None + ] + if preset_participant_image not in list_preset_participant_image: + raise ValueError( + f"`preset_participant_image` must be one of: ['runner', 'swimmer', 'cyclist', 'custom']" + ) + elif ( + preset_participant_image in list_preset_participant_image + and preset_participant_image is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "runner": "runner", + "swimmer": "swimmer", + "cyclist": "cyclist", + "custom": "custom", + }.items() + if preset_participant_image in k + } + if len(filtered_dict) > 0: + self.state["state"]["preset_participant_image"] = filtered_dict[ + preset_participant_image + ] + self.state["state"][ + "custom_participant_start_image" + ] = custom_participant_start_image + self.state["state"][ + "custom_participant_race_image" + ] = custom_participant_race_image + self.state["state"][ + "custom_participant_finish_image" + ] = custom_participant_finish_image + + list_image_initial_rotation = ["0", "90", "180", "270"] + [None] + if image_initial_rotation not in list_image_initial_rotation: + raise ValueError( + f"`image_initial_rotation` must be one of: ['0', '90', '180', '270']" + ) + elif ( + image_initial_rotation in list_image_initial_rotation + and image_initial_rotation is not None + ): + filtered_dict = { + k: v + for (k, v) in {"0": "0", "90": "90", "180": "180", "270": "270"}.items() + if image_initial_rotation in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_initial_rotation"] = filtered_dict[ + image_initial_rotation + ] + self.state["state"]["image_initial_flip_x"] = image_initial_flip_x + self.state["state"]["image_initial_flip_y"] = image_initial_flip_y + + list_image_transform_mode = [ + "rotate", + "flip_x", + "flip_y", + "flip_both", + "static", + ] + [None] + if image_transform_mode not in list_image_transform_mode: + raise ValueError( + f"`image_transform_mode` must be one of: ['rotate', 'flip_x', 'flip_y', 'flip_both', 'static']" + ) + elif ( + image_transform_mode in list_image_transform_mode + and image_transform_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rotate": "rotate", + "flip_x": "flip_x", + "flip_y": "flip_y", + "flip_both": "flip_both", + "static": "static", + }.items() + if image_transform_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_transform_mode"] = filtered_dict[ + image_transform_mode + ] + self.state["state"]["participant_icon_recolor"] = participant_icon_recolor + + if ( + chart_participant_color_scale_categorical_palette is not None + and len(chart_participant_color_scale_categorical_palette) > 1 + and isinstance(chart_participant_color_scale_categorical_palette, list) + ): + self.state["state"]["participant_color"][ + "categorical_palette" + ] = " \n ".join(chart_participant_color_scale_categorical_palette) + else: + self.state["state"]["participant_color"][ + "categorical_palette" + ] = chart_participant_color_scale_categorical_palette + + self.state["state"]["participant_color"][ + "categorical_extend" + ] = chart_participant_color_scale_categorical_extend + + if ( + chart_participant_color_scale_categorical_custom_palette is not None + and len(chart_participant_color_scale_categorical_custom_palette) > 1 + and isinstance( + chart_participant_color_scale_categorical_custom_palette, list + ) + ): + self.state["state"]["participant_color"][ + "categorical_custom_palette" + ] = " \n ".join(chart_participant_color_scale_categorical_custom_palette) + else: + self.state["state"]["participant_color"][ + "categorical_custom_palette" + ] = chart_participant_color_scale_categorical_custom_palette + + list_chart_participant_color_scale_numeric_type = [ + "sequential", + "diverging", + ] + [None] + if ( + chart_participant_color_scale_numeric_type + not in list_chart_participant_color_scale_numeric_type + ): + raise ValueError( + f"`chart_participant_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_participant_color_scale_numeric_type + in list_chart_participant_color_scale_numeric_type + and chart_participant_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_participant_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_color"][ + "numeric_type" + ] = filtered_dict[chart_participant_color_scale_numeric_type] + + list_chart_participant_color_scale_binning = [False, True] + [None] + if ( + chart_participant_color_scale_binning + not in list_chart_participant_color_scale_binning + ): + raise ValueError( + f"`chart_participant_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_participant_color_scale_binning + in list_chart_participant_color_scale_binning + and chart_participant_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_participant_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_color"]["binning"] = filtered_dict[ + chart_participant_color_scale_binning + ] + + list_chart_participant_color_scale_bin_mode = [ + "fixed", + "quantile", + "custom", + ] + [None] + if ( + chart_participant_color_scale_bin_mode + not in list_chart_participant_color_scale_bin_mode + ): + raise ValueError( + f"`chart_participant_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_participant_color_scale_bin_mode + in list_chart_participant_color_scale_bin_mode + and chart_participant_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_participant_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_color"]["bin_mode"] = filtered_dict[ + chart_participant_color_scale_bin_mode + ] + self.state["state"]["participant_color"][ + "bin_count" + ] = chart_participant_color_scale_bin_count + self.state["state"]["participant_color"][ + "bin_thresholds" + ] = chart_participant_color_scale_bin_thresholds + self.state["state"]["participant_color"][ + "sequential_palette" + ] = chart_participant_color_scale_sequential_palette + self.state["state"]["participant_color"][ + "sequential_reverse" + ] = chart_participant_color_scale_sequential_reverse + self.state["state"]["participant_color"][ + "sequential_custom_min" + ] = chart_participant_color_scale_sequential_custom_min + self.state["state"]["participant_color"][ + "sequential_custom_max" + ] = chart_participant_color_scale_sequential_custom_max + + list_chart_participant_color_scale_sequential_color_space = [ + "rgb", + "lab", + "hcl", + "hsl", + ] + [None] + if ( + chart_participant_color_scale_sequential_color_space + not in list_chart_participant_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_participant_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_participant_color_scale_sequential_color_space + in list_chart_participant_color_scale_sequential_color_space + and chart_participant_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_participant_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_color"][ + "sequential_color_space" + ] = filtered_dict[chart_participant_color_scale_sequential_color_space] + + list_chart_participant_color_scale_sequential_custom_domain = [False, True] + [ + None + ] + if ( + chart_participant_color_scale_sequential_custom_domain + not in list_chart_participant_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_participant_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_participant_color_scale_sequential_custom_domain + in list_chart_participant_color_scale_sequential_custom_domain + and chart_participant_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_participant_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_color"][ + "sequential_custom_domain" + ] = filtered_dict[ + chart_participant_color_scale_sequential_custom_domain + ] + self.state["state"]["participant_color"][ + "sequential_domain_min" + ] = chart_participant_color_scale_sequential_domain_min + self.state["state"]["participant_color"][ + "sequential_domain_max" + ] = chart_participant_color_scale_sequential_domain_max + self.state["state"]["participant_color"][ + "diverging_palette" + ] = chart_participant_color_scale_diverging_palette + self.state["state"]["participant_color"][ + "diverging_reverse" + ] = chart_participant_color_scale_diverging_reverse + self.state["state"]["participant_color"][ + "diverging_custom_min" + ] = chart_participant_color_scale_diverging_custom_min + self.state["state"]["participant_color"][ + "diverging_custom_mid" + ] = chart_participant_color_scale_diverging_custom_mid + self.state["state"]["participant_color"][ + "diverging_custom_max" + ] = chart_participant_color_scale_diverging_custom_max + + list_chart_participant_color_scale_diverging_color_space = [ + "rgb", + "lab", + "hcl", + "hsl", + ] + [None] + if ( + chart_participant_color_scale_diverging_color_space + not in list_chart_participant_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_participant_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_participant_color_scale_diverging_color_space + in list_chart_participant_color_scale_diverging_color_space + and chart_participant_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_participant_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_color"][ + "diverging_color_space" + ] = filtered_dict[chart_participant_color_scale_diverging_color_space] + + list_chart_participant_color_scale_diverging_custom_domain = [False, True] + [ + None + ] + if ( + chart_participant_color_scale_diverging_custom_domain + not in list_chart_participant_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_participant_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_participant_color_scale_diverging_custom_domain + in list_chart_participant_color_scale_diverging_custom_domain + and chart_participant_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_participant_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_color"][ + "diverging_custom_domain" + ] = filtered_dict[chart_participant_color_scale_diverging_custom_domain] + self.state["state"]["participant_color"][ + "diverging_domain_min" + ] = chart_participant_color_scale_diverging_domain_min + self.state["state"]["participant_color"][ + "diverging_domain_mid" + ] = chart_participant_color_scale_diverging_domain_mid + self.state["state"]["participant_color"][ + "diverging_domain_max" + ] = chart_participant_color_scale_diverging_domain_max + + list_camera_mode = ["track", "leader"] + [None] + if camera_mode not in list_camera_mode: + raise ValueError(f"`camera_mode` must be one of: ['track', 'leader']") + elif camera_mode in list_camera_mode and camera_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"track": "track", "leader": "leader"}.items() + if camera_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["camera_mode"] = filtered_dict[camera_mode] + self.state["state"]["zoom"] = zoom + + list_checkpoint_mode = ["laps", "splits", "custom"] + [None] + if checkpoint_mode not in list_checkpoint_mode: + raise ValueError( + f"`checkpoint_mode` must be one of: ['laps', 'splits', 'custom']" + ) + elif checkpoint_mode in list_checkpoint_mode and checkpoint_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "laps": "laps", + "splits": "splits", + "custom": "custom", + }.items() + if checkpoint_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["checkpoint_mode"] = filtered_dict[checkpoint_mode] + + if ( + checkpoints is not None + and len(checkpoints) > 1 + and isinstance(checkpoints, list) + ): + self.state["state"]["checkpoints"] = " \n ".join(checkpoints) + else: + self.state["state"]["checkpoints"] = checkpoints + + self.state["state"]["times_cumulative"] = times_cumulative + + list_participant_label_mode = ["auto", "leader", "all", "custom"] + [None] + if participant_label_mode not in list_participant_label_mode: + raise ValueError( + f"`participant_label_mode` must be one of: ['auto', 'leader', 'all', 'custom']" + ) + elif ( + participant_label_mode in list_participant_label_mode + and participant_label_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "leader": "leader", + "all": "all", + "custom": "custom", + }.items() + if participant_label_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_label_mode"] = filtered_dict[ + participant_label_mode + ] + + if ( + participant_label_custom is not None + and len(participant_label_custom) > 1 + and isinstance(participant_label_custom, list) + ): + self.state["state"]["participant_label_custom"] = " \n ".join( + participant_label_custom + ) + else: + self.state["state"]["participant_label_custom"] = participant_label_custom + + list_participant_label_position = ["auto", "left", "right"] + [None] + if participant_label_position not in list_participant_label_position: + raise ValueError( + f"`participant_label_position` must be one of: ['auto', 'left', 'right']" + ) + elif ( + participant_label_position in list_participant_label_position + and participant_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "left": "left", "right": "right"}.items() + if participant_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_label_position"] = filtered_dict[ + participant_label_position + ] + self.state["state"]["participant_label_style"] = participant_label_style + self.state["state"]["participant_label_color"] = participant_label_color + self.state["state"]["participant_label_size"] = participant_label_size + self.state["state"]["participant_label_stroke"] = participant_label_stroke + self.state["state"][ + "participant_label_stroke_size" + ] = participant_label_stroke_size + + list_participant_label_weight = ["400", "600"] + [None] + if participant_label_weight not in list_participant_label_weight: + raise ValueError( + f"`participant_label_weight` must be one of: ['400', '600']" + ) + elif ( + participant_label_weight in list_participant_label_weight + and participant_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"400": "400", "600": "600"}.items() + if participant_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_label_weight"] = filtered_dict[ + participant_label_weight + ] + self.state["state"]["participant_highlight"] = participant_highlight + self.state["state"]["participant_highlight_color"] = participant_highlight_color + self.state["state"]["participant_highlight_width"] = participant_highlight_width + + list_label_position_enabled = [False, True] + [None] + if label_position_enabled not in list_label_position_enabled: + raise ValueError(f"`label_position_enabled` must be one of: [False, True]") + elif ( + label_position_enabled in list_label_position_enabled + and label_position_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if label_position_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_position_enabled"] = filtered_dict[ + label_position_enabled + ] + + list_label_position_time = ["always", "race", "finish"] + [None] + if label_position_time not in list_label_position_time: + raise ValueError( + f"`label_position_time` must be one of: ['always', 'race', 'finish']" + ) + elif ( + label_position_time in list_label_position_time + and label_position_time is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "always": "always", + "race": "race", + "finish": "finish", + }.items() + if label_position_time in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_position_time"] = filtered_dict[ + label_position_time + ] + + list_label_position_type = ["current", "finish"] + [None] + if label_position_type not in list_label_position_type: + raise ValueError( + f"`label_position_type` must be one of: ['current', 'finish']" + ) + elif ( + label_position_type in list_label_position_type + and label_position_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"current": "current", "finish": "finish"}.items() + if label_position_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_position_type"] = filtered_dict[ + label_position_type + ] + + list_label_medal_enabled = [False, True] + [None] + if label_medal_enabled not in list_label_medal_enabled: + raise ValueError(f"`label_medal_enabled` must be one of: [False, True]") + elif ( + label_medal_enabled in list_label_medal_enabled + and label_medal_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if label_medal_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_medal_enabled"] = filtered_dict[ + label_medal_enabled + ] + + list_label_medal_time = ["always", "race", "finish"] + [None] + if label_medal_time not in list_label_medal_time: + raise ValueError( + f"`label_medal_time` must be one of: ['always', 'race', 'finish']" + ) + elif label_medal_time in list_label_medal_time and label_medal_time is not None: + filtered_dict = { + k: v + for (k, v) in { + "always": "always", + "race": "race", + "finish": "finish", + }.items() + if label_medal_time in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_medal_time"] = filtered_dict[ + label_medal_time + ] + + list_label_medal_type = ["current", "finish"] + [None] + if label_medal_type not in list_label_medal_type: + raise ValueError( + f"`label_medal_type` must be one of: ['current', 'finish']" + ) + elif label_medal_type in list_label_medal_type and label_medal_type is not None: + filtered_dict = { + k: v + for (k, v) in {"current": "current", "finish": "finish"}.items() + if label_medal_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_medal_type"] = filtered_dict[ + label_medal_type + ] + self.state["state"][ + "label_medal_replace_position" + ] = label_medal_replace_position + + list_label_finishing_time_enabled = [False, True] + [None] + if label_finishing_time_enabled not in list_label_finishing_time_enabled: + raise ValueError( + f"`label_finishing_time_enabled` must be one of: [False, True]" + ) + elif ( + label_finishing_time_enabled in list_label_finishing_time_enabled + and label_finishing_time_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if label_finishing_time_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_finishing_time_enabled"] = filtered_dict[ + label_finishing_time_enabled + ] + + list_label_finishing_time_time = ["always", "finish"] + [None] + if label_finishing_time_time not in list_label_finishing_time_time: + raise ValueError( + f"`label_finishing_time_time` must be one of: ['always', 'finish']" + ) + elif ( + label_finishing_time_time in list_label_finishing_time_time + and label_finishing_time_time is not None + ): + filtered_dict = { + k: v + for (k, v) in {"always": "always", "finish": "finish"}.items() + if label_finishing_time_time in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_finishing_time_time"] = filtered_dict[ + label_finishing_time_time + ] + + list_participant_stacking = ["sheet_order", "rank", "y_position"] + [None] + if participant_stacking not in list_participant_stacking: + raise ValueError( + f"`participant_stacking` must be one of: ['sheet_order', 'rank', 'y_position']" + ) + elif ( + participant_stacking in list_participant_stacking + and participant_stacking is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sheet_order": "sheet_order", + "rank": "rank", + "y_position": "y_position", + }.items() + if participant_stacking in k + } + if len(filtered_dict) > 0: + self.state["state"]["participant_stacking"] = filtered_dict[ + participant_stacking + ] + + list_chart_timeline_controls_enabled = [True, False] + [None] + if chart_timeline_controls_enabled not in list_chart_timeline_controls_enabled: + raise ValueError( + f"`chart_timeline_controls_enabled` must be one of: [True, False]" + ) + elif ( + chart_timeline_controls_enabled in list_chart_timeline_controls_enabled + and chart_timeline_controls_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_timeline_controls_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["timeline"]["enabled"] = filtered_dict[ + chart_timeline_controls_enabled + ] + + list_chart_timeline_controls_style = ["timeline", "button"] + [None] + if chart_timeline_controls_style not in list_chart_timeline_controls_style: + raise ValueError( + f"`chart_timeline_controls_style` must be one of: ['timeline', 'button']" + ) + elif ( + chart_timeline_controls_style in list_chart_timeline_controls_style + and chart_timeline_controls_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"timeline": "timeline", "button": "button"}.items() + if chart_timeline_controls_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["timeline"]["style"] = filtered_dict[ + chart_timeline_controls_style + ] + + list_chart_timeline_controls_graph = [True, False] + [None] + if chart_timeline_controls_graph not in list_chart_timeline_controls_graph: + raise ValueError( + f"`chart_timeline_controls_graph` must be one of: [True, False]" + ) + elif ( + chart_timeline_controls_graph in list_chart_timeline_controls_graph + and chart_timeline_controls_graph is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_timeline_controls_graph in k + } + if len(filtered_dict) > 0: + self.state["state"]["timeline"]["graph"] = filtered_dict[ + chart_timeline_controls_graph + ] + self.state["state"]["timeline"][ + "play_on_load" + ] = chart_timeline_controls_play_on_load + self.state["state"]["timeline"]["loop"] = chart_timeline_controls_loop + self.state["state"]["timeline"]["duration"] = chart_timeline_controls_duration + self.state["state"]["timeline"][ + "duration_tween" + ] = chart_timeline_controls_duration_tween + self.state["state"]["timeline"][ + "duration_wait_at_end" + ] = chart_timeline_controls_duration_wait_at_end + self.state["state"]["timeline"][ + "axes_custom_enabled" + ] = chart_timeline_controls_axes_custom_enabled + self.state["state"]["timeline"][ + "color_axes" + ] = chart_timeline_controls_color_axes + self.state["state"]["timeline"][ + "axis_font_size" + ] = chart_timeline_controls_axis_font_size + + list_chart_timeline_controls_date_format_display = [ + "", + "%Y-%m-%dT%H:%M:%S.%LZ", + "%Y-%m-%d", + "%m/%d/%Y", + "%d/%m/%Y", + "%d-%b-%y", + "%m/%Y", + "%b %Y", + "%b %y", + "%B %d", + "%d %b", + "%Y", + "%B", + "%b", + "%A", + "%a", + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + ] + [None] + if ( + chart_timeline_controls_date_format_display + not in list_chart_timeline_controls_date_format_display + ): + raise ValueError( + f"`chart_timeline_controls_date_format_display` must be one of: ['', '%Y-%m-%dT%H:%M:%S.%LZ', '%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%d-%b-%y', '%m/%Y', '%b %Y', '%b %y', '%B %d', '%d %b', '%Y', '%B', '%b', '%A', '%a', '%H:%M:%S', '%I:%M %p', '%H:%M']" + ) + elif ( + chart_timeline_controls_date_format_display + in list_chart_timeline_controls_date_format_display + and chart_timeline_controls_date_format_display is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "": "", + "%Y-%m-%dT%H:%M:%S.%LZ": "%Y-%m-%dT%H:%M:%S.%LZ", + "%Y-%m-%d": "%Y-%m-%d", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%d-%b-%y": "%d-%b-%y", + "%m/%Y": "%m/%Y", + "%b %Y": "%b %Y", + "%b %y": "%b %y", + "%B %d": "%B %d", + "%d %b": "%d %b", + "%Y": "%Y", + "%B": "%B", + "%b": "%b", + "%A": "%A", + "%a": "%a", + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + }.items() + if chart_timeline_controls_date_format_display in k + } + if len(filtered_dict) > 0: + self.state["state"]["timeline"]["date_format_display"] = filtered_dict[ + chart_timeline_controls_date_format_display + ] + self.state["state"]["timeline"][ + "axis_nice_x" + ] = chart_timeline_controls_axis_nice_x + self.state["state"]["timeline"][ + "axis_nice_y" + ] = chart_timeline_controls_axis_nice_y + self.state["state"]["timeline"][ + "scrubber_snap" + ] = chart_timeline_controls_scrubber_snap + self.state["state"]["timeline"][ + "scrubber_snap_paused" + ] = chart_timeline_controls_scrubber_snap_paused + self.state["state"]["timeline"][ + "layout_settings" + ] = chart_timeline_controls_layout_settings + self.state["state"]["timeline"]["margin"][ + "top" + ] = chart_timeline_controls_margin_top + self.state["state"]["timeline"]["margin"][ + "left" + ] = chart_timeline_controls_margin_left + self.state["state"]["timeline"]["margin"][ + "bottom" + ] = chart_timeline_controls_margin_bottom + self.state["state"]["timeline"]["margin"][ + "right" + ] = chart_timeline_controls_margin_right + self.state["state"]["timeline"]["playback_button"][ + "margin_right" + ] = chart_timeline_controls_playback_button_margin_right + self.state["state"]["timeline"][ + "scrubber_height" + ] = chart_timeline_controls_scrubber_height + self.state["state"]["timeline"]["playback_button"][ + "margin_right_button" + ] = chart_timeline_controls_playback_button_margin_right_button + self.state["state"]["timeline"][ + "graph_settings" + ] = chart_timeline_controls_graph_settings + self.state["state"]["timeline"][ + "color_background" + ] = chart_timeline_controls_color_background + self.state["state"]["timeline"][ + "graph_height" + ] = chart_timeline_controls_graph_height + self.state["state"]["timeline"]["curve"] = chart_timeline_controls_curve + self.state["state"]["timeline"][ + "playback_styling" + ] = chart_timeline_controls_playback_styling + self.state["state"]["timeline"]["playback_button"][ + "button_color" + ] = chart_timeline_controls_playback_button_button_color + self.state["state"]["timeline"]["playback_button"][ + "button_size" + ] = chart_timeline_controls_playback_button_button_size + self.state["state"]["timeline"]["playback_button"][ + "icon_color" + ] = chart_timeline_controls_playback_button_icon_color + self.state["state"]["timeline"]["playback_button"][ + "icon_size" + ] = chart_timeline_controls_playback_button_icon_size + self.state["state"]["timeline"]["playback_button"][ + "label_size" + ] = chart_timeline_controls_playback_button_label_size + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_survey_details( + self, + dot_fill: str = None, + dot_opacity: float = None, + dot_opacity_unhighlighted: float = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + dot_shape: str = None, + dot_sides: float = None, + outline_width: float = None, + outline_color: str = None, + dot_label: str = None, + dot_label_color: str = None, + dot_label_bold: bool = None, + dot_label_min: float = None, + dot_label_auto_size: bool = None, + dot_label_fixed: float = None, + dot_label_scale: float = None, + dot_label_size_value: bool = None, + all_group_label: str = None, + include_grouped_questions_on_shade_menu: bool = None, + include_grouped_questions_on_compare_menu: bool = None, + order_groups_by_size: bool = None, + order_groups_by_size_mode: str = None, + group_colors: bool = None, + exclusions: str = None, + exclude_blanks: bool = None, + bundle_small_groups: bool = None, + small_groups_threshold: float = None, + small_groups_other_label: str = None, + label_mode: str = None, + label_tight_fit: bool = None, + label_color: str = None, + label_min_font_size: float = None, + label_max_font_size: float = None, + label_group_padding_lines: float = None, + label_shadow_size: float = None, + label_shadow_color: str = None, + label_group_count: bool = None, + label_group_percent: bool = None, + label_group_percent_decimals: float = None, + always_show_x_label: bool = None, + show_xy_axis_labels_when_comparing: bool = None, + compare_y_axis_width: float = None, + compare_x_axis_height: float = None, + chart_height_mode: str = None, + chart_aspect_ratio_wide: float = None, + chart_aspect_ratio_narrow: float = None, + map_opacity_map_mode: float = None, + map_opacity_non_map_mode: float = None, + map_max_group_size: float = None, + map_dimensions: str = None, + map_aspect_ratio: float = None, + map_region: str = None, + map_region_url: str = None, + map_region_bounds_x1: float = None, + map_region_bounds_x2: float = None, + map_region_bounds_y2: float = None, + map_region_bounds_y1: float = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + panel_background_color: str = None, + panel_background_opacity: float = None, + panel_text_color: str = None, + panel_text_size: float = None, + panel_icon_color: str = None, + panel_width: float = None, + panel_cog_color: str = None, + panel_overlay: bool = None, + panel_hide_cog: bool = None, + select_group_show: bool = None, + select_color_show: bool = None, + select_size_show: bool = None, + select_compare_show: bool = None, + histogram_show: bool = None, + select_group_text: str = None, + select_color_text: str = None, + select_size_text: str = None, + select_compare_text: str = None, + select_filter_text: str = None, + select_map_text: str = None, + chart_filter_controls_control_type: str = None, + chart_filter_controls_control_styles: bool = None, + chart_filter_controls_control_title: str = None, + chart_filter_controls_button_group: bool = None, + chart_filter_controls_button_group_width_mode: str = None, + chart_filter_controls_button_group_width_fixed: float = None, + chart_filter_controls_dropdown_width_mode: str = None, + chart_filter_controls_dropdown_width_fixed: float = None, + chart_filter_controls_slider_width: float = None, + chart_filter_controls_slider_max_label_width: float = None, + chart_filter_controls_slider_step_time: float = None, + chart_filter_controls_slider_loop: bool = None, + chart_filter_controls_slider_restart_pause: float = None, + chart_filter_controls_sort: bool = None, + column_filter_show_all: bool = None, + column_filter_show_all_label: str = None, + chart_controls_style_font_size: float = None, + chart_controls_style_font_weight: str = None, + chart_controls_style_height: float = None, + chart_button_control_style_background: str = None, + chart_button_control_style_background_selected: str = None, + chart_button_control_style_background_hover: str = None, + chart_button_control_style_font_color: str = None, + chart_button_control_style_font_color_selected: str = None, + chart_button_control_style_font_color_hover: str = None, + chart_button_control_style_button_styles_advanced: bool = None, + chart_button_control_style_border_width: float = None, + chart_button_control_style_border_color: str = None, + chart_button_control_style_border_transparency: float = None, + chart_button_control_style_border_radius: float = None, + chart_slider_control_style_track_color: str = None, + chart_slider_control_style_font_color: str = None, + chart_slider_control_style_handle_color: str = None, + chart_slider_control_style_play_color: str = None, + chart_slider_control_style_track_height: float = None, + chart_slider_control_style_handle_height: float = None, + chart_slider_control_style_play_button: bool = None, + chart_dropdown_control_style_background: str = None, + chart_dropdown_control_style_font_color: str = None, + chart_dropdown_control_style_border_styles_advanced: bool = None, + chart_dropdown_control_style_border_style: str = None, + chart_dropdown_control_style_border_width: float = None, + chart_dropdown_control_style_border_color: str = None, + chart_dropdown_control_style_border_transparency: float = None, + chart_dropdown_control_style_border_radius: float = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + legend_position: str = None, + legend_hide_space: bool = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + zoom_on_double_click: bool = None, + zoom_on_mousewheel: bool = None, + transition_duration: float = None, + transition_stagger: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: survey. + + + :param dot_fill: Default color. If left blank, the first color in the color palette will be used. Flourish type hint: color, defaults to None. + :type dot_fill: str, optional + :param dot_opacity: Opacity. Flourish type hint: number, defaults to None. + :type dot_opacity: float, optional + :param dot_opacity_unhighlighted: Opacity (unhighlighted). The opacity of the unhighlighted dots when one of the dots is highlighted. Flourish type hint: number, defaults to None. + :type dot_opacity_unhighlighted: float, optional + :param chart_color_scale_categorical_palette: Color when shading. The colors to use when shading by the answer to a questions. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the name of the category that you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26) Note that overrides from the "Color overrides" sheet take priority over the overrides in this setting. Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param dot_shape: Shape. Choices: circle, square, polygon. Flourish type hint: string, defaults to None. + :type dot_shape: str, optional + :param dot_sides: Sides. Flourish type hint: number, defaults to None. + :type dot_sides: float, optional + :param outline_width: Stroke width. In pixels. The width of the outline stroke. Flourish type hint: number, defaults to None. + :type outline_width: float, optional + :param outline_color: Stroke color. Outline color for your dots/squares/polygons. If not set, the layout background color will be used. Flourish type hint: color, defaults to None. + :type outline_color: str, optional + :param dot_label: Default label or emoji. A label or emoji to show on each dot. Overriden by any label specified using the Label column setting. Flourish type hint: string, defaults to None. + :type dot_label: str, optional + :param dot_label_color: Color. Flourish type hint: color, defaults to None. + :type dot_label_color: str, optional + :param dot_label_bold: Bold. Flourish type hint: boolean, defaults to None. + :type dot_label_bold: bool, optional + :param dot_label_min: Min size to display. The minimum text size in pixels for dot labels. Below this level they will not render. Flourish type hint: number, defaults to None. + :type dot_label_min: float, optional + :param dot_label_auto_size: Sizing mode. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type dot_label_auto_size: bool, optional + :param dot_label_fixed: Size in %. Specifies font size across the graphic as a percentage of dot height. Flourish type hint: number, defaults to None. + :type dot_label_fixed: float, optional + :param dot_label_scale: Scale. Scales the labels up or down from their default size. Flourish type hint: number, defaults to None. + :type dot_label_scale: float, optional + :param dot_label_size_value: Show numerical value when sizing dots. Flourish type hint: boolean, defaults to None. + :type dot_label_size_value: bool, optional + :param all_group_label: Name for "all" group. Flourish type hint: string, defaults to None. + :type all_group_label: str, optional + :param include_grouped_questions_on_shade_menu: Include grouped questions on shading menu. Flourish type hint: boolean, defaults to None. + :type include_grouped_questions_on_shade_menu: bool, optional + :param include_grouped_questions_on_compare_menu: Include grouped questions on compare menu. Flourish type hint: boolean, defaults to None. + :type include_grouped_questions_on_compare_menu: bool, optional + :param order_groups_by_size: Order groups by size. Flourish type hint: boolean, defaults to None. + :type order_groups_by_size: bool, optional + :param order_groups_by_size_mode: Choices: ascending, descending. Flourish type hint: string, defaults to None. + :type order_groups_by_size_mode: str, optional + :param group_colors: Arrange groups by color. If selected, dots of the same color are grouped together; if not the dots are placed in spreadsheet order. Flourish type hint: boolean, defaults to None. + :type group_colors: bool, optional + :param exclusions: Exclude groups with the following names. Case-sensitive comma-separated list. Flourish type hint: string, defaults to None. + :type exclusions: str, optional + :param exclude_blanks: Exclude groups with blank names. Flourish type hint: boolean, defaults to None. + :type exclude_blanks: bool, optional + :param bundle_small_groups: Bundle small groups. Flourish type hint: boolean, defaults to None. + :type bundle_small_groups: bool, optional + :param small_groups_threshold: Min size. Flourish type hint: number, defaults to None. + :type small_groups_threshold: float, optional + :param small_groups_other_label: "Other" group label. Flourish type hint: string, defaults to None. + :type small_groups_other_label: str, optional + :param label_mode: Label position. Choices: atop, around, above. Flourish type hint: string, defaults to None. + :type label_mode: str, optional + :param label_tight_fit: Position close to group. Flourish type hint: boolean, defaults to None. + :type label_tight_fit: bool, optional + :param label_color: Text color. Flourish type hint: color, defaults to None. + :type label_color: str, optional + :param label_min_font_size: Min font size. In pixels; the actual font size in any view is set automatically between the min and max. Flourish type hint: number, defaults to None. + :type label_min_font_size: float, optional + :param label_max_font_size: Max font size. In pixels; the actual font size in any view is set automatically between the min and max. Flourish type hint: number, defaults to None. + :type label_max_font_size: float, optional + :param label_group_padding_lines: Space for labels. The amount of space to leave above the groups, specified in lines of text. Flourish type hint: number, defaults to None. + :type label_group_padding_lines: float, optional + :param label_shadow_size: Size. As percent of font size. Flourish type hint: number, defaults to None. + :type label_shadow_size: float, optional + :param label_shadow_color: Color. Flourish type hint: color, defaults to None. + :type label_shadow_color: str, optional + :param label_group_count: Show number of dots in group. Adds the number in brackets after the main label; ignored in chart, map and compare modes. Flourish type hint: boolean, defaults to None. + :type label_group_count: bool, optional + :param label_group_percent: Show group size as % of visible dots. Adds group size as a percent of visible dots, in brackets after the main label. This setting is ignored in chart, map and compare modes and when showing a grouped question. Flourish type hint: boolean, defaults to None. + :type label_group_percent: bool, optional + :param label_group_percent_decimals: Decimal places on percentage labels. Flourish type hint: number, defaults to None. + :type label_group_percent_decimals: float, optional + :param always_show_x_label: Show X label when not comparing. Show the groups label at the bottom of chart when not comparing two metrics. Flourish type hint: boolean, defaults to None. + :type always_show_x_label: bool, optional + :param show_xy_axis_labels_when_comparing: Show X/Y labels when comparing. Show groups labels on both axes when comparing two metrics. Flourish type hint: boolean, defaults to None. + :type show_xy_axis_labels_when_comparing: bool, optional + :param compare_y_axis_width: Y axis width. Flourish type hint: number, defaults to None. + :type compare_y_axis_width: float, optional + :param compare_x_axis_height: X axis height. Flourish type hint: number, defaults to None. + :type compare_x_axis_height: float, optional + :param chart_height_mode: Height mode. Choices: auto, aspect_ratio. How the graphic height will be set when embedded with the responsive script embed without a specified height. Flourish type hint: string, defaults to None. + :type chart_height_mode: str, optional + :param chart_aspect_ratio_wide: Desktop. The chart aspect ratio on screens 640 pixels wide and higher (1 for square - a smaller value means a bigger height). Flourish type hint: number, defaults to None. + :type chart_aspect_ratio_wide: float, optional + :param chart_aspect_ratio_narrow: Mobile. The chart aspect ratio on screens narrower than 640 pixels (1 for square - a smaller value means a bigger height). Flourish type hint: number, defaults to None. + :type chart_aspect_ratio_narrow: float, optional + :param map_opacity_map_mode: Map opacity (in map mode). Flourish type hint: number, defaults to None. + :type map_opacity_map_mode: float, optional + :param map_opacity_non_map_mode: Map opacity (in other modes). Flourish type hint: number, defaults to None. + :type map_opacity_non_map_mode: float, optional + :param map_max_group_size: Max group size in map view. In relative units. Flourish type hint: number, defaults to None. + :type map_max_group_size: float, optional + :param map_dimensions: Map dimensions. Choices: auto, aspect_ratio. Flourish type hint: string, defaults to None. + :type map_dimensions: str, optional + :param map_aspect_ratio: Map aspect ratio. Aspect ratio of the map. 1 will make the map square. Flourish type hint: number, defaults to None. + :type map_aspect_ratio: float, optional + :param map_region: Region. Choices: world, usa, europe, custom. Flourish type hint: string, defaults to None. + :type map_region: str, optional + :param map_region_url: Url to equirectangular projection of map. Flourish type hint: url, defaults to None. + :type map_region_url: str, optional + :param map_region_bounds_x1: Minimum longitude. Flourish type hint: number, defaults to None. + :type map_region_bounds_x1: float, optional + :param map_region_bounds_x2: Maximum longitude. Flourish type hint: number, defaults to None. + :type map_region_bounds_x2: float, optional + :param map_region_bounds_y2: Minimum latitude. Flourish type hint: number, defaults to None. + :type map_region_bounds_y2: float, optional + :param map_region_bounds_y1: Maximum latitude. Flourish type hint: number, defaults to None. + :type map_region_bounds_y1: float, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param panel_background_color: Background. Flourish type hint: color, defaults to None. + :type panel_background_color: str, optional + :param panel_background_opacity: Opacity. Flourish type hint: number, defaults to None. + :type panel_background_opacity: float, optional + :param panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type panel_text_color: str, optional + :param panel_text_size: Text size. Flourish type hint: number, defaults to None. + :type panel_text_size: float, optional + :param panel_icon_color: Icon color. Choices: light, dark. Flourish type hint: string, defaults to None. + :type panel_icon_color: str, optional + :param panel_width: Panel width. Width of the controls panels on wide screens, ignored on mobile. Flourish type hint: number, defaults to None. + :type panel_width: float, optional + :param panel_cog_color: Cog icon color. Flourish type hint: color, defaults to None. + :type panel_cog_color: str, optional + :param panel_overlay: Overlay panel over graphic. Flourish type hint: boolean, defaults to None. + :type panel_overlay: bool, optional + :param panel_hide_cog: Disable controls toggle in published graphic. When checked, the controls icon for showing/ hiding the controls panel is visible only in the visualization and story editors not in the published visualization or story. When making a story, you can still lock the panel to be visible or hidden by clicking the cog icon in the story editor. Flourish type hint: boolean, defaults to None. + :type panel_hide_cog: bool, optional + :param select_group_show: Group menu. Populated by all category columns. Flourish type hint: boolean, defaults to None. + :type select_group_show: bool, optional + :param select_color_show: Color menu. Populated by all category columns. Flourish type hint: boolean, defaults to None. + :type select_color_show: bool, optional + :param select_size_show: Size menu. Populated by all continuous number columns. Flourish type hint: boolean, defaults to None. + :type select_size_show: bool, optional + :param select_compare_show: Compare menu. Populated by all category columns; appears only when Group by is selected. Flourish type hint: boolean, defaults to None. + :type select_compare_show: bool, optional + :param histogram_show: Bar mode. Flourish type hint: boolean, defaults to None. + :type histogram_show: bool, optional + :param select_group_text: Group by. Flourish type hint: string, defaults to None. + :type select_group_text: str, optional + :param select_color_text: Shade by. Flourish type hint: string, defaults to None. + :type select_color_text: str, optional + :param select_size_text: Size by. Flourish type hint: string, defaults to None. + :type select_size_text: str, optional + :param select_compare_text: Compare. Flourish type hint: string, defaults to None. + :type select_compare_text: str, optional + :param select_filter_text: Filter. Flourish type hint: string, defaults to None. + :type select_filter_text: str, optional + :param select_map_text: Group location. Flourish type hint: string, defaults to None. + :type select_map_text: str, optional + :param chart_filter_controls_control_type: Control type. Choices: dropdown, buttons, slider. Choose between a dropdown, buttons or a time slider Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_type: str, optional + :param chart_filter_controls_control_styles: Adv. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_control_styles: bool, optional + :param chart_filter_controls_control_title: Control title. Flourish type hint: string, defaults to None. + :type chart_filter_controls_control_title: str, optional + :param chart_filter_controls_button_group: Grouped. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_button_group: bool, optional + :param chart_filter_controls_button_group_width_mode: Button group width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_button_group_width_mode: str, optional + :param chart_filter_controls_button_group_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_button_group_width_fixed: float, optional + :param chart_filter_controls_dropdown_width_mode: Dropdown width. Choices: auto, full, fixed. Flourish type hint: string, defaults to None. + :type chart_filter_controls_dropdown_width_mode: str, optional + :param chart_filter_controls_dropdown_width_fixed: Width. Flourish type hint: number, defaults to None. + :type chart_filter_controls_dropdown_width_fixed: float, optional + :param chart_filter_controls_slider_width: Slider width. Width of the slider track in rems Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_width: float, optional + :param chart_filter_controls_slider_max_label_width: Max label width. In rems, multiples of base font size. If larger than the longest label, only the space required to fit labels will be used. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_max_label_width: float, optional + :param chart_filter_controls_slider_step_time: Time between steps. Measured in seconds, positive values move the slider left to right, negative values move the slider right to left. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_step_time: float, optional + :param chart_filter_controls_slider_loop: Loop. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_slider_loop: bool, optional + :param chart_filter_controls_slider_restart_pause: Pause before loop. Measured in seconds and in addition to the regular step time displayed above. Flourish type hint: number, defaults to None. + :type chart_filter_controls_slider_restart_pause: float, optional + :param chart_filter_controls_sort: Sorting. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_filter_controls_sort: bool, optional + :param column_filter_show_all: Include "All" in slider/menu. Flourish type hint: boolean, defaults to None. + :type column_filter_show_all: bool, optional + :param column_filter_show_all_label: Label for All. Flourish type hint: string, defaults to None. + :type column_filter_show_all_label: str, optional + :param chart_controls_style_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_controls_style_font_size: float, optional + :param chart_controls_style_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_controls_style_font_weight: str, optional + :param chart_controls_style_height: Height. Flourish type hint: number, defaults to None. + :type chart_controls_style_height: float, optional + :param chart_button_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background: str, optional + :param chart_button_control_style_background_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_selected: str, optional + :param chart_button_control_style_background_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_background_hover: str, optional + :param chart_button_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color: str, optional + :param chart_button_control_style_font_color_selected: Selected. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_selected: str, optional + :param chart_button_control_style_font_color_hover: Mouse over. Flourish type hint: color, defaults to None. + :type chart_button_control_style_font_color_hover: str, optional + :param chart_button_control_style_button_styles_advanced: Button border styles. Flourish type hint: boolean, defaults to None. + :type chart_button_control_style_button_styles_advanced: bool, optional + :param chart_button_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_width: float, optional + :param chart_button_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_button_control_style_border_color: str, optional + :param chart_button_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_transparency: float, optional + :param chart_button_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_button_control_style_border_radius: float, optional + :param chart_slider_control_style_track_color: Track. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_track_color: str, optional + :param chart_slider_control_style_font_color: Text. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_font_color: str, optional + :param chart_slider_control_style_handle_color: Handle. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_handle_color: str, optional + :param chart_slider_control_style_play_color: Play/pause. Flourish type hint: color, defaults to None. + :type chart_slider_control_style_play_color: str, optional + :param chart_slider_control_style_track_height: Track height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_track_height: float, optional + :param chart_slider_control_style_handle_height: Height. Flourish type hint: number, defaults to None. + :type chart_slider_control_style_handle_height: float, optional + :param chart_slider_control_style_play_button: Play button. Flourish type hint: boolean, defaults to None. + :type chart_slider_control_style_play_button: bool, optional + :param chart_dropdown_control_style_background: Background. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_background: str, optional + :param chart_dropdown_control_style_font_color: Text color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_font_color: str, optional + :param chart_dropdown_control_style_border_styles_advanced: Dropdown border styles. Flourish type hint: boolean, defaults to None. + :type chart_dropdown_control_style_border_styles_advanced: bool, optional + :param chart_dropdown_control_style_border_style: Border style. Choices: all, bottom. Show border on all sides, or only at the bottom. Flourish type hint: string, defaults to None. + :type chart_dropdown_control_style_border_style: str, optional + :param chart_dropdown_control_style_border_width: Border width. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_width: float, optional + :param chart_dropdown_control_style_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_dropdown_control_style_border_color: str, optional + :param chart_dropdown_control_style_border_transparency: Transparency. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_transparency: float, optional + :param chart_dropdown_control_style_border_radius: Radius. Flourish type hint: number, defaults to None. + :type chart_dropdown_control_style_border_radius: float, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param legend_position: Position. Choices: above, below. Flourish type hint: string, defaults to None. + :type legend_position: str, optional + :param legend_hide_space: Remove space when empty. Turn off to avoid the legend taking up space when empty. Leave on to avoid the graphic jumping up and down a little when the legend is revealed or hidden. Flourish type hint: boolean, defaults to None. + :type legend_hide_space: bool, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param zoom_on_double_click: Zoom on double click. Flourish type hint: boolean, defaults to None. + :type zoom_on_double_click: bool, optional + :param zoom_on_mousewheel: Zoom on pinch/mousewheel. Flourish type hint: boolean, defaults to None. + :type zoom_on_mousewheel: bool, optional + :param transition_duration: Duration. Time in milliseconds of each dots animation. Flourish type hint: number, defaults to None. + :type transition_duration: float, optional + :param transition_stagger: Stagger. The spread of time over which the dots start animating. Flourish type hint: number, defaults to None. + :type transition_stagger: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "map_region_bounds": {}, + "popup": {}, + "controls_filter": {}, + "controls_style": {}, + "button_style": {}, + "slider_style": {}, + "dropdown_style": {}, + "legend_categorical": {}, + "legend_container": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + self.state["state"]["dot_fill"] = dot_fill + self.state["state"]["dot_opacity"] = dot_opacity + self.state["state"]["dot_opacity_unhighlighted"] = dot_opacity_unhighlighted + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + + list_dot_shape = ["circle", "square", "polygon"] + [None] + if dot_shape not in list_dot_shape: + raise ValueError( + f"`dot_shape` must be one of: ['circle', 'square', 'polygon']" + ) + elif dot_shape in list_dot_shape and dot_shape is not None: + filtered_dict = { + k: v + for (k, v) in { + "circle": "circle", + "square": "square", + "polygon": "polygon", + }.items() + if dot_shape in k + } + if len(filtered_dict) > 0: + self.state["state"]["dot_shape"] = filtered_dict[dot_shape] + self.state["state"]["dot_sides"] = dot_sides + self.state["state"]["outline_width"] = outline_width + self.state["state"]["outline_color"] = outline_color + self.state["state"]["dot_label"] = dot_label + self.state["state"]["dot_label_color"] = dot_label_color + self.state["state"]["dot_label_bold"] = dot_label_bold + self.state["state"]["dot_label_min"] = dot_label_min + + list_dot_label_auto_size = [True, False] + [None] + if dot_label_auto_size not in list_dot_label_auto_size: + raise ValueError(f"`dot_label_auto_size` must be one of: [True, False]") + elif ( + dot_label_auto_size in list_dot_label_auto_size + and dot_label_auto_size is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if dot_label_auto_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["dot_label_auto_size"] = filtered_dict[ + dot_label_auto_size + ] + self.state["state"]["dot_label_fixed"] = dot_label_fixed + self.state["state"]["dot_label_scale"] = dot_label_scale + self.state["state"]["dot_label_size_value"] = dot_label_size_value + self.state["state"]["all_group_label"] = all_group_label + self.state["state"][ + "include_grouped_questions_on_shade_menu" + ] = include_grouped_questions_on_shade_menu + self.state["state"][ + "include_grouped_questions_on_compare_menu" + ] = include_grouped_questions_on_compare_menu + self.state["state"]["order_groups_by_size"] = order_groups_by_size + + list_order_groups_by_size_mode = ["ascending", "descending"] + [None] + if order_groups_by_size_mode not in list_order_groups_by_size_mode: + raise ValueError( + f"`order_groups_by_size_mode` must be one of: ['ascending', 'descending']" + ) + elif ( + order_groups_by_size_mode in list_order_groups_by_size_mode + and order_groups_by_size_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "ascending": "ascending", + "descending": "descending", + }.items() + if order_groups_by_size_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["order_groups_by_size_mode"] = filtered_dict[ + order_groups_by_size_mode + ] + self.state["state"]["group_colors"] = group_colors + self.state["state"]["exclusions"] = exclusions + self.state["state"]["exclude_blanks"] = exclude_blanks + self.state["state"]["bundle_small_groups"] = bundle_small_groups + self.state["state"]["small_groups_threshold"] = small_groups_threshold + self.state["state"]["small_groups_other_label"] = small_groups_other_label + + list_label_mode = ["atop", "around", "above"] + [None] + if label_mode not in list_label_mode: + raise ValueError( + f"`label_mode` must be one of: ['atop', 'around', 'above']" + ) + elif label_mode in list_label_mode and label_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "atop": "atop", + "around": "around", + "above": "above", + }.items() + if label_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["label_mode"] = filtered_dict[label_mode] + self.state["state"]["label_tight_fit"] = label_tight_fit + self.state["state"]["label_color"] = label_color + self.state["state"]["label_min_font_size"] = label_min_font_size + self.state["state"]["label_max_font_size"] = label_max_font_size + self.state["state"]["label_group_padding_lines"] = label_group_padding_lines + self.state["state"]["label_shadow_size"] = label_shadow_size + self.state["state"]["label_shadow_color"] = label_shadow_color + self.state["state"]["label_group_count"] = label_group_count + self.state["state"]["label_group_percent"] = label_group_percent + self.state["state"][ + "label_group_percent_decimals" + ] = label_group_percent_decimals + self.state["state"]["always_show_x_label"] = always_show_x_label + self.state["state"][ + "show_xy_axis_labels_when_comparing" + ] = show_xy_axis_labels_when_comparing + self.state["state"]["compare_y_axis_width"] = compare_y_axis_width + self.state["state"]["compare_x_axis_height"] = compare_x_axis_height + + list_chart_height_mode = ["auto", "aspect_ratio"] + [None] + if chart_height_mode not in list_chart_height_mode: + raise ValueError( + f"`chart_height_mode` must be one of: ['auto', 'aspect_ratio']" + ) + elif ( + chart_height_mode in list_chart_height_mode + and chart_height_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "aspect_ratio": "aspect_ratio"}.items() + if chart_height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["chart_height_mode"] = filtered_dict[ + chart_height_mode + ] + self.state["state"]["chart_aspect_ratio_wide"] = chart_aspect_ratio_wide + self.state["state"]["chart_aspect_ratio_narrow"] = chart_aspect_ratio_narrow + self.state["state"]["map_opacity_map_mode"] = map_opacity_map_mode + self.state["state"]["map_opacity_non_map_mode"] = map_opacity_non_map_mode + self.state["state"]["map_max_group_size"] = map_max_group_size + + list_map_dimensions = ["auto", "aspect_ratio"] + [None] + if map_dimensions not in list_map_dimensions: + raise ValueError( + f"`map_dimensions` must be one of: ['auto', 'aspect_ratio']" + ) + elif map_dimensions in list_map_dimensions and map_dimensions is not None: + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "aspect_ratio": "aspect_ratio"}.items() + if map_dimensions in k + } + if len(filtered_dict) > 0: + self.state["state"]["map_dimensions"] = filtered_dict[map_dimensions] + self.state["state"]["map_aspect_ratio"] = map_aspect_ratio + + list_map_region = ["world", "usa", "europe", "custom"] + [None] + if map_region not in list_map_region: + raise ValueError( + f"`map_region` must be one of: ['world', 'usa', 'europe', 'custom']" + ) + elif map_region in list_map_region and map_region is not None: + filtered_dict = { + k: v + for (k, v) in { + "world": "world", + "usa": "usa", + "europe": "europe", + "custom": "custom", + }.items() + if map_region in k + } + if len(filtered_dict) > 0: + self.state["state"]["map_region"] = filtered_dict[map_region] + self.state["state"]["map_region_url"] = map_region_url + self.state["state"]["map_region_bounds"]["x1"] = map_region_bounds_x1 + self.state["state"]["map_region_bounds"]["x2"] = map_region_bounds_x2 + self.state["state"]["map_region_bounds"]["y2"] = map_region_bounds_y2 + self.state["state"]["map_region_bounds"]["y1"] = map_region_bounds_y1 + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + self.state["state"]["panel_background_color"] = panel_background_color + self.state["state"]["panel_background_opacity"] = panel_background_opacity + self.state["state"]["panel_text_color"] = panel_text_color + self.state["state"]["panel_text_size"] = panel_text_size + + list_panel_icon_color = ["light", "dark"] + [None] + if panel_icon_color not in list_panel_icon_color: + raise ValueError(f"`panel_icon_color` must be one of: ['light', 'dark']") + elif panel_icon_color in list_panel_icon_color and panel_icon_color is not None: + filtered_dict = { + k: v + for (k, v) in {"light": "light", "dark": "dark"}.items() + if panel_icon_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["panel_icon_color"] = filtered_dict[ + panel_icon_color + ] + self.state["state"]["panel_width"] = panel_width + self.state["state"]["panel_cog_color"] = panel_cog_color + self.state["state"]["panel_overlay"] = panel_overlay + self.state["state"]["panel_hide_cog"] = panel_hide_cog + self.state["state"]["select_group_show"] = select_group_show + self.state["state"]["select_color_show"] = select_color_show + self.state["state"]["select_size_show"] = select_size_show + self.state["state"]["select_compare_show"] = select_compare_show + self.state["state"]["histogram_show"] = histogram_show + self.state["state"]["select_group_text"] = select_group_text + self.state["state"]["select_color_text"] = select_color_text + self.state["state"]["select_size_text"] = select_size_text + self.state["state"]["select_compare_text"] = select_compare_text + self.state["state"]["select_filter_text"] = select_filter_text + self.state["state"]["select_map_text"] = select_map_text + + list_chart_filter_controls_control_type = ["dropdown", "buttons", "slider"] + [ + None + ] + if ( + chart_filter_controls_control_type + not in list_chart_filter_controls_control_type + ): + raise ValueError( + f"`chart_filter_controls_control_type` must be one of: ['dropdown', 'buttons', 'slider']" + ) + elif ( + chart_filter_controls_control_type + in list_chart_filter_controls_control_type + and chart_filter_controls_control_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "dropdown": "dropdown", + "buttons": "buttons", + "slider": "slider", + }.items() + if chart_filter_controls_control_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_filter"]["control_type"] = filtered_dict[ + chart_filter_controls_control_type + ] + self.state["state"]["controls_filter"][ + "control_styles" + ] = chart_filter_controls_control_styles + self.state["state"]["controls_filter"][ + "control_title" + ] = chart_filter_controls_control_title + + list_chart_filter_controls_button_group = [True, False] + [None] + if ( + chart_filter_controls_button_group + not in list_chart_filter_controls_button_group + ): + raise ValueError( + f"`chart_filter_controls_button_group` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_button_group + in list_chart_filter_controls_button_group + and chart_filter_controls_button_group is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_button_group in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_filter"]["button_group"] = filtered_dict[ + chart_filter_controls_button_group + ] + + list_chart_filter_controls_button_group_width_mode = [ + "auto", + "full", + "fixed", + ] + [None] + if ( + chart_filter_controls_button_group_width_mode + not in list_chart_filter_controls_button_group_width_mode + ): + raise ValueError( + f"`chart_filter_controls_button_group_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_button_group_width_mode + in list_chart_filter_controls_button_group_width_mode + and chart_filter_controls_button_group_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_button_group_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_filter"][ + "button_group_width_mode" + ] = filtered_dict[chart_filter_controls_button_group_width_mode] + self.state["state"]["controls_filter"][ + "button_group_width_fixed" + ] = chart_filter_controls_button_group_width_fixed + + list_chart_filter_controls_dropdown_width_mode = ["auto", "full", "fixed"] + [ + None + ] + if ( + chart_filter_controls_dropdown_width_mode + not in list_chart_filter_controls_dropdown_width_mode + ): + raise ValueError( + f"`chart_filter_controls_dropdown_width_mode` must be one of: ['auto', 'full', 'fixed']" + ) + elif ( + chart_filter_controls_dropdown_width_mode + in list_chart_filter_controls_dropdown_width_mode + and chart_filter_controls_dropdown_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "full": "full", "fixed": "fixed"}.items() + if chart_filter_controls_dropdown_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_filter"][ + "dropdown_width_mode" + ] = filtered_dict[chart_filter_controls_dropdown_width_mode] + self.state["state"]["controls_filter"][ + "dropdown_width_fixed" + ] = chart_filter_controls_dropdown_width_fixed + self.state["state"]["controls_filter"][ + "slider_width" + ] = chart_filter_controls_slider_width + self.state["state"]["controls_filter"][ + "slider_max_label_width" + ] = chart_filter_controls_slider_max_label_width + self.state["state"]["controls_filter"][ + "slider_step_time" + ] = chart_filter_controls_slider_step_time + self.state["state"]["controls_filter"][ + "slider_loop" + ] = chart_filter_controls_slider_loop + self.state["state"]["controls_filter"][ + "slider_restart_pause" + ] = chart_filter_controls_slider_restart_pause + + list_chart_filter_controls_sort = [True, False] + [None] + if chart_filter_controls_sort not in list_chart_filter_controls_sort: + raise ValueError( + f"`chart_filter_controls_sort` must be one of: [True, False]" + ) + elif ( + chart_filter_controls_sort in list_chart_filter_controls_sort + and chart_filter_controls_sort is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_filter_controls_sort in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_filter"]["sort"] = filtered_dict[ + chart_filter_controls_sort + ] + self.state["state"]["column_filter_show_all"] = column_filter_show_all + self.state["state"][ + "column_filter_show_all_label" + ] = column_filter_show_all_label + self.state["state"]["controls_style"][ + "font_size" + ] = chart_controls_style_font_size + + list_chart_controls_style_font_weight = ["bold", "normal"] + [None] + if ( + chart_controls_style_font_weight + not in list_chart_controls_style_font_weight + ): + raise ValueError( + f"`chart_controls_style_font_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_controls_style_font_weight in list_chart_controls_style_font_weight + and chart_controls_style_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_controls_style_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["controls_style"]["font_weight"] = filtered_dict[ + chart_controls_style_font_weight + ] + self.state["state"]["controls_style"]["height"] = chart_controls_style_height + self.state["state"]["button_style"][ + "background" + ] = chart_button_control_style_background + self.state["state"]["button_style"][ + "background_selected" + ] = chart_button_control_style_background_selected + self.state["state"]["button_style"][ + "background_hover" + ] = chart_button_control_style_background_hover + self.state["state"]["button_style"][ + "font_color" + ] = chart_button_control_style_font_color + self.state["state"]["button_style"][ + "font_color_selected" + ] = chart_button_control_style_font_color_selected + self.state["state"]["button_style"][ + "font_color_hover" + ] = chart_button_control_style_font_color_hover + self.state["state"]["button_style"][ + "button_styles_advanced" + ] = chart_button_control_style_button_styles_advanced + self.state["state"]["button_style"][ + "border_width" + ] = chart_button_control_style_border_width + self.state["state"]["button_style"][ + "border_color" + ] = chart_button_control_style_border_color + self.state["state"]["button_style"][ + "border_transparency" + ] = chart_button_control_style_border_transparency + self.state["state"]["button_style"][ + "border_radius" + ] = chart_button_control_style_border_radius + self.state["state"]["slider_style"][ + "track_color" + ] = chart_slider_control_style_track_color + self.state["state"]["slider_style"][ + "font_color" + ] = chart_slider_control_style_font_color + self.state["state"]["slider_style"][ + "handle_color" + ] = chart_slider_control_style_handle_color + self.state["state"]["slider_style"][ + "play_color" + ] = chart_slider_control_style_play_color + self.state["state"]["slider_style"][ + "track_height" + ] = chart_slider_control_style_track_height + self.state["state"]["slider_style"][ + "handle_height" + ] = chart_slider_control_style_handle_height + self.state["state"]["slider_style"][ + "play_button" + ] = chart_slider_control_style_play_button + self.state["state"]["dropdown_style"][ + "background" + ] = chart_dropdown_control_style_background + self.state["state"]["dropdown_style"][ + "font_color" + ] = chart_dropdown_control_style_font_color + self.state["state"]["dropdown_style"][ + "border_styles_advanced" + ] = chart_dropdown_control_style_border_styles_advanced + + list_chart_dropdown_control_style_border_style = ["all", "bottom"] + [None] + if ( + chart_dropdown_control_style_border_style + not in list_chart_dropdown_control_style_border_style + ): + raise ValueError( + f"`chart_dropdown_control_style_border_style` must be one of: ['all', 'bottom']" + ) + elif ( + chart_dropdown_control_style_border_style + in list_chart_dropdown_control_style_border_style + and chart_dropdown_control_style_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in {"all": "all", "bottom": "bottom"}.items() + if chart_dropdown_control_style_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["dropdown_style"]["border_style"] = filtered_dict[ + chart_dropdown_control_style_border_style + ] + self.state["state"]["dropdown_style"][ + "border_width" + ] = chart_dropdown_control_style_border_width + self.state["state"]["dropdown_style"][ + "border_color" + ] = chart_dropdown_control_style_border_color + self.state["state"]["dropdown_style"][ + "border_transparency" + ] = chart_dropdown_control_style_border_transparency + self.state["state"]["dropdown_style"][ + "border_radius" + ] = chart_dropdown_control_style_border_radius + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + + list_legend_position = ["above", "below"] + [None] + if legend_position not in list_legend_position: + raise ValueError(f"`legend_position` must be one of: ['above', 'below']") + elif legend_position in list_legend_position and legend_position is not None: + filtered_dict = { + k: v + for (k, v) in {"above": "above", "below": "below"}.items() + if legend_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_position"] = filtered_dict[legend_position] + self.state["state"]["legend_hide_space"] = legend_hide_space + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + self.state["state"]["zoom_on_double_click"] = zoom_on_double_click + self.state["state"]["zoom_on_mousewheel"] = zoom_on_mousewheel + self.state["state"]["transition_duration"] = transition_duration + self.state["state"]["transition_stagger"] = transition_stagger + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_svg_annotator_details( + self, + svg_url: str = None, + svg_width_wide: float = None, + mobile_view: bool = None, + mobile_breakpoint: float = None, + mobile_svg_mode: str = None, + mobile_svg_url: str = None, + mobile_svg_width: float = None, + mobile_content_mode: str = None, + clickable_svg_animation: str = None, + clickable_svg_animation_duration: float = None, + clickable_svg_animation_config: bool = None, + clickable_svg_animation_attr: str = None, + clickable_svg_animation_values: str = None, + clickable_svg_animation_repeat: str = None, + text_panel_enabled: bool = None, + h1_default: Union[list, str] = None, + h1_size: float = None, + h2_default: Union[list, str] = None, + h2_size: float = None, + content_default: Union[list, str] = None, + content_size: float = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + svg_reset_fonts: bool = None, + show_css: bool = None, + stylesheet: Union[list, str] = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: str = None, + chart_layout_footer_note_secondary: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_hide_primary: bool = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + ): + """ + Set chart details for: svg annotator. + + + :param svg_url: SVG file. Flourish type hint: url, defaults to None. + :type svg_url: str, optional + :param svg_width_wide: Image width. The width in % of the image in standard wide-screen view. Flourish type hint: number, defaults to None. + :type svg_width_wide: float, optional + :param mobile_view: Different mobile view. Flourish type hint: boolean, defaults to None. + :type mobile_view: bool, optional + :param mobile_breakpoint: Breakpoint. The size in pixels at which to switch to mobile layout. Flourish type hint: number, defaults to None. + :type mobile_breakpoint: float, optional + :param mobile_svg_mode: Image on mobile. Choices: none, same, different. Whether to show the image at all on mobile. Flourish type hint: string, defaults to None. + :type mobile_svg_mode: str, optional + :param mobile_svg_url: SVG file (mobile). Flourish type hint: url, defaults to None. + :type mobile_svg_url: str, optional + :param mobile_svg_width: Width. The width in % of the image on a mobile view. Flourish type hint: number, defaults to None. + :type mobile_svg_width: float, optional + :param mobile_content_mode: Mobile content mode. Choices: interactive, all, accordion. If turned on all content will display on load in mobile view. Flourish type hint: string, defaults to None. + :type mobile_content_mode: str, optional + :param clickable_svg_animation: Animation clickable elements. Choices: off, animation. Flourish type hint: string, defaults to None. + :type clickable_svg_animation: str, optional + :param clickable_svg_animation_duration: Duration. The duration of the highlight animation on each clickable element. Flourish type hint: number, defaults to None. + :type clickable_svg_animation_duration: float, optional + :param clickable_svg_animation_config: Advanced. Reveal settings to adjust the SVG Animation properties on clickable elements. See https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate for more details. Flourish type hint: boolean, defaults to None. + :type clickable_svg_animation_config: bool, optional + :param clickable_svg_animation_attr: Attribute. Flourish type hint: string, defaults to None. + :type clickable_svg_animation_attr: str, optional + :param clickable_svg_animation_values: Values. Flourish type hint: string, defaults to None. + :type clickable_svg_animation_values: str, optional + :param clickable_svg_animation_repeat: Repeat. Flourish type hint: string, defaults to None. + :type clickable_svg_animation_repeat: str, optional + :param text_panel_enabled: Text panel enabled. Set to disabled to only show text in popups. Flourish type hint: boolean, defaults to None. + :type text_panel_enabled: bool, optional + :param h1_default: Default heading. The text to show on load. Flourish type hint: text, defaults to None. + :type h1_default: Union[list, str], optional + :param h1_size: Size. Flourish type hint: number, defaults to None. + :type h1_size: float, optional + :param h2_default: Default subheading. The text to show on load. Flourish type hint: text, defaults to None. + :type h2_default: Union[list, str], optional + :param h2_size: Size. Flourish type hint: number, defaults to None. + :type h2_size: float, optional + :param content_default: Default subheading. The text to show on load. Flourish type hint: text, defaults to None. + :type content_default: Union[list, str], optional + :param content_size: Size. Flourish type hint: number, defaults to None. + :type content_size: float, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. The text to appear in the panel. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. The text to appear in the panel. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. You can also hide content based on a column name being empty using `{{# if column_name}}Text to display when column_name is not empty{{/if}}`. For example: `{{Country}} {{#if Capital}}(Capital: {{Capital}}){{/if}}` Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing "Click position" is especially useful when your visualisation is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param svg_reset_fonts: Override fonts in SVG. If enabled, font-family styles will be removed in the SVG, allowing the text to be inherited from the current theme or settings. Flourish type hint: boolean, defaults to None. + :type svg_reset_fonts: bool, optional + :param show_css: Edit CSS. Flourish type hint: boolean, defaults to None. + :type show_css: bool, optional + :param stylesheet: Custom styles. Use the class .clickable-element to target all interactive elements. When one is clicked, it is .highlighted and the others are .faded. The text for each clickable element is inside a .text-block, which is also .accordion in accordion mode. Flourish type hint: code, defaults to None. + :type stylesheet: Union[list, str], optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default, but you can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, but you can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Choices: stack-default, stack-2, stack-3, stack-4. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements such as axes. Note that when direction is set to "right to left" any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size. Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualisation container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. Flourish type hint: string, defaults to None. + :type chart_layout_footer_note: str, optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. Flourish type hint: string, defaults to None. + :type chart_layout_footer_note_secondary: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background colour is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders. (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders. Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + """ + details_error(self) + + self.state = { + "state": { + "popup": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + self.state["state"]["svg_url"] = svg_url + self.state["state"]["svg_width_wide"] = svg_width_wide + self.state["state"]["mobile_view"] = mobile_view + self.state["state"]["mobile_breakpoint"] = mobile_breakpoint + + list_mobile_svg_mode = ["none", "same", "different"] + [None] + if mobile_svg_mode not in list_mobile_svg_mode: + raise ValueError( + f"`mobile_svg_mode` must be one of: ['none', 'same', 'different']" + ) + elif mobile_svg_mode in list_mobile_svg_mode and mobile_svg_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "same": "same", + "different": "different", + }.items() + if mobile_svg_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["mobile_svg_mode"] = filtered_dict[mobile_svg_mode] + self.state["state"]["mobile_svg_url"] = mobile_svg_url + self.state["state"]["mobile_svg_width"] = mobile_svg_width + + list_mobile_content_mode = ["interactive", "all", "accordion"] + [None] + if mobile_content_mode not in list_mobile_content_mode: + raise ValueError( + f"`mobile_content_mode` must be one of: ['interactive', 'all', 'accordion']" + ) + elif ( + mobile_content_mode in list_mobile_content_mode + and mobile_content_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "interactive": "interactive", + "all": "all", + "accordion": "accordion", + }.items() + if mobile_content_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["mobile_content_mode"] = filtered_dict[ + mobile_content_mode + ] + + list_clickable_svg_animation = ["off", "animation"] + [None] + if clickable_svg_animation not in list_clickable_svg_animation: + raise ValueError( + f"`clickable_svg_animation` must be one of: ['off', 'animation']" + ) + elif ( + clickable_svg_animation in list_clickable_svg_animation + and clickable_svg_animation is not None + ): + filtered_dict = { + k: v + for (k, v) in {"off": "off", "animation": "animation"}.items() + if clickable_svg_animation in k + } + if len(filtered_dict) > 0: + self.state["state"]["clickable_svg_animation"] = filtered_dict[ + clickable_svg_animation + ] + self.state["state"][ + "clickable_svg_animation_duration" + ] = clickable_svg_animation_duration + self.state["state"][ + "clickable_svg_animation_config" + ] = clickable_svg_animation_config + self.state["state"][ + "clickable_svg_animation_attr" + ] = clickable_svg_animation_attr + self.state["state"][ + "clickable_svg_animation_values" + ] = clickable_svg_animation_values + self.state["state"][ + "clickable_svg_animation_repeat" + ] = clickable_svg_animation_repeat + self.state["state"]["text_panel_enabled"] = text_panel_enabled + + if ( + h1_default is not None + and len(h1_default) > 1 + and isinstance(h1_default, list) + ): + self.state["state"]["h1_default"] = " \n ".join(h1_default) + else: + self.state["state"]["h1_default"] = h1_default + + self.state["state"]["h1_size"] = h1_size + + if ( + h2_default is not None + and len(h2_default) > 1 + and isinstance(h2_default, list) + ): + self.state["state"]["h2_default"] = " \n ".join(h2_default) + else: + self.state["state"]["h2_default"] = h2_default + + self.state["state"]["h2_size"] = h2_size + + if ( + content_default is not None + and len(content_default) > 1 + and isinstance(content_default, list) + ): + self.state["state"]["content_default"] = " \n ".join(content_default) + else: + self.state["state"]["content_default"] = content_default + + self.state["state"]["content_size"] = content_size + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + self.state["state"]["svg_reset_fonts"] = svg_reset_fonts + self.state["state"]["show_css"] = show_css + + if ( + stylesheet is not None + and len(stylesheet) > 1 + and isinstance(stylesheet, list) + ): + self.state["state"]["stylesheet"] = " \n ".join(stylesheet) + else: + self.state["state"]["stylesheet"] = stylesheet + + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + + list_chart_layout_layout_order = [ + "stack-default", + "stack-2", + "stack-3", + "stack-4", + ] + [None] + if chart_layout_layout_order not in list_chart_layout_layout_order: + raise ValueError( + f"`chart_layout_layout_order` must be one of: ['stack-default', 'stack-2', 'stack-3', 'stack-4']" + ) + elif ( + chart_layout_layout_order in list_chart_layout_layout_order + and chart_layout_layout_order is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "stack-default": "stack-default", + "stack-2": "stack-2", + "stack-3": "stack-3", + "stack-4": "stack-4", + }.items() + if chart_layout_layout_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["layout_order"] = filtered_dict[ + chart_layout_layout_order + ] + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_table_details( + self, + table_min_width: float = None, + table_border_width: float = None, + table_border_color: str = None, + sorting_enabled: str = None, + sorting_custom_columns: Union[list, str] = None, + pagination_amount: float = None, + markdown_enabled: bool = None, + cell_height: float = None, + cell_padding_vertical: float = None, + cell_padding_horizontal: float = None, + cell_wrap: bool = None, + cell_horizontal_alignment: str = None, + cell_numeric_horizontal_alignment: str = None, + cell_vertical_alignment: str = None, + cell_fill_1: str = None, + cell_fill_2: str = None, + cell_fill_direction: str = None, + cell_fill_custom_enabled: bool = None, + cell_fill_custom_categorical: Union[list, str] = None, + cell_fill_custom_numeric: Union[list, str] = None, + cell_fill_margin_vertical: float = None, + cell_fill_margin_horizontal: float = None, + cell_border_mode: str = None, + cell_border_color: str = None, + cell_border_width: float = None, + cell_border_style: str = None, + cell_font_color: str = None, + cell_link_color: str = None, + cell_font_size: str = None, + cell_font_size_custom: float = None, + column_width_mode: str = None, + column_widths: str = None, + header_font_weight: str = None, + header_fill: str = None, + header_font_color: str = None, + header_underline_sorting: bool = None, + header_style_default: bool = None, + header_height: float = None, + header_padding: float = None, + header_horizontal_alignment: str = None, + header_font_default: bool = None, + header_font_size: float = None, + header_border_default: bool = None, + header_border_color: str = None, + header_border_width: float = None, + header_border_style: str = None, + cell_image_height: float = None, + cell_image_radius: float = None, + bar_columns_enabled: bool = None, + bar_columns_bar_1_columns: Union[list, str] = None, + bar_columns_bar_1_column_name: str = None, + bar_columns_type: str = None, + bar_columns_bar_1_height: float = None, + bar_columns_bar_1_width: float = None, + bar_columns_bar_1_column_padding: float = None, + bar_columns_bar_1_proportional: bool = None, + bar_columns_bar_1_same_scale: bool = None, + bar_columns_bar_1_zero_line: bool = None, + bar_columns_bar_1_zero_line_color: str = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + bar_columns_bar_1_labels: str = None, + bar_columns_bar_1_label_size: float = None, + chart_legend_show_legend: bool = None, + chart_legend_title_mode: str = None, + chart_legend_title: str = None, + chart_legend_swatch_width: float = None, + chart_legend_swatch_height: float = None, + chart_legend_swatch_radius: float = None, + chart_legend_legend_items_padding: float = None, + chart_legend_swatch_outline: bool = None, + chart_legend_swatch_outline_color: str = None, + chart_legend_order_override: Union[list, str] = None, + chart_legend_icon_height: float = None, + chart_legend_icon_color: str = None, + chart_legend_max_width: float = None, + chart_legend_orientation: str = None, + legend_position: str = None, + chart_legend_container_alignment: str = None, + chart_legend_container_orientation: str = None, + chart_legend_container_title_weight: str = None, + chart_legend_container_text_weight: str = None, + chart_legend_container_text_color: str = None, + chart_legend_container_text_size: float = None, + line_columns_enabled: bool = None, + line_columns_line_1_columns: Union[list, str] = None, + line_columns_line_1_column_name: str = None, + line_columns_line_1_width: float = None, + line_columns_line_1_height: float = None, + line_columns_line_1_color: str = None, + line_columns_line_1_area: bool = None, + line_columns_line_1_min_enabled: bool = None, + line_columns_line_1_min: float = None, + line_columns_line_1_max_enabled: bool = None, + line_columns_line_1_max: float = None, + mobile_view: bool = None, + mobile_breakpoint: float = None, + mobile_cell_font_size: str = None, + mobile_cell_font_size_custom: float = None, + mobile_pagination_amount: float = None, + search_enabled: bool = None, + search_mode: str = None, + search_width: float = None, + search_background_color: str = None, + search_text_color: str = None, + search_placeholder: str = None, + no_results_text: str = None, + search_hide_table: bool = None, + search_hide_published: bool = None, + search_columns: str = None, + search_columns_custom: Union[list, str] = None, + search_resize: bool = None, + search_dropdown: bool = None, + search_dropdown_persistent: bool = None, + search_val: str = None, + chart_popup_show_popups: bool = None, + chart_popup_is_custom: bool = None, + chart_popup_custom_template: Union[list, str] = None, + chart_popup_show_pointer: bool = None, + chart_popup_show_shadow: bool = None, + chart_popup_style_popups: bool = None, + chart_popup_text_color: str = None, + chart_popup_align: str = None, + chart_popup_text_size: float = None, + chart_popup_fill_color: str = None, + chart_popup_opacity: float = None, + chart_popup_padding: float = None, + chart_popup_border_radius: float = None, + chart_popup_max_width: float = None, + formatted_columns: Union[list, str] = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + chart_url_settings_enabled: bool = None, + chart_url_settings_whitelist: Union[list, str] = None, + ): + """ + Set chart details for: table. + + + :param table_min_width: Min width. Flourish type hint: number, defaults to None. + :type table_min_width: float, optional + :param table_border_width: Border. Flourish type hint: number, defaults to None. + :type table_border_width: float, optional + :param table_border_color: Border color. Flourish type hint: color, defaults to None. + :type table_border_color: str, optional + :param sorting_enabled: Sortable columns. Choices: all, none, custom. Determines whether a viewer can sort the table by clicking on the column headers. Custom allows the user only to sort listed columns. Flourish type hint: string, defaults to None. + :type sorting_enabled: str, optional + :param sorting_custom_columns: Columns to make sortable. Write each column name you want to make sortable on a new line. Flourish type hint: text, defaults to None. + :type sorting_custom_columns: Union[list, str], optional + :param pagination_amount: Rows per page. If you dont want pagination, set this number to a value greater than the number of rows in your data. Flourish type hint: number, defaults to None. + :type pagination_amount: float, optional + :param markdown_enabled: Cell text styling. Choices: True, False. Enables Markdown for your cells. For example for _italic_, **bold** text. Flourish type hint: boolean, defaults to None. + :type markdown_enabled: bool, optional + :param cell_height: Min height. Flourish type hint: number, defaults to None. + :type cell_height: float, optional + :param cell_padding_vertical: Padding vertical. Flourish type hint: number, defaults to None. + :type cell_padding_vertical: float, optional + :param cell_padding_horizontal: Padding horizontal. Flourish type hint: number, defaults to None. + :type cell_padding_horizontal: float, optional + :param cell_wrap: Wrap text in cell. Flourish type hint: boolean, defaults to None. + :type cell_wrap: bool, optional + :param cell_horizontal_alignment: Text. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type cell_horizontal_alignment: str, optional + :param cell_numeric_horizontal_alignment: Numbers. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type cell_numeric_horizontal_alignment: str, optional + :param cell_vertical_alignment: Vertical alignment. Choices: top, center, bottom. Flourish type hint: string, defaults to None. + :type cell_vertical_alignment: str, optional + :param cell_fill_1: Main color. Flourish type hint: color, defaults to None. + :type cell_fill_1: str, optional + :param cell_fill_2: Stripe color. Flourish type hint: color, defaults to None. + :type cell_fill_2: str, optional + :param cell_fill_direction: Stripe direction. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type cell_fill_direction: str, optional + :param cell_fill_custom_enabled: Color cells based on content. Flourish type hint: boolean, defaults to None. + :type cell_fill_custom_enabled: bool, optional + :param cell_fill_custom_categorical: Categorical coloring. To color cells based on their content, use the format: cell-color/text-color : cell-text : column name OR row-number To specify a row, write "row-" followed by the row number from the datasheet. Its also possible to leave out the column name or row number if you want to target all the cells in the table For example: red/white : Chelsea Use * in place of cell-text to select an entire column or row. For example: #0000dd/#ffffff : Alabama #ffffff/#dddddd : * : State #0000dd/#ffffff : * : row-2 #ffffff/#dddddd : n/a : Capital Flourish type hint: text, defaults to None. + :type cell_fill_custom_categorical: Union[list, str], optional + :param cell_fill_custom_numeric: Numeric coloring. Color cells numerically based on their content. For sequential coloring, use the format: min_color >> max_color : column_name : domain_min >> domain_max The domain is optional, for example: #ffffff >> #00ff00 : Population #ffffff >> #00ff00 : Population : 0 >> 1000000000 For diverging coloring, use the format: min_color >> midpt_color >> max_color : col_name : domain_min >> domain_mid >> domain_max The domain is optional, for example: #ffffff >> #00ff00 >> #ff00ff : Vote share #ffffff >> #00ff00 >> #ff00ff : Vote share : 0 >> 50 >> 100 Where both numeric and categorical coloring are used on a cell, categorical will override numeric. Flourish type hint: text, defaults to None. + :type cell_fill_custom_numeric: Union[list, str], optional + :param cell_fill_margin_vertical: Vertical margin. Flourish type hint: number, defaults to None. + :type cell_fill_margin_vertical: float, optional + :param cell_fill_margin_horizontal: Horizontal margin. Flourish type hint: number, defaults to None. + :type cell_fill_margin_horizontal: float, optional + :param cell_border_mode: Mode. Choices: none, horizontal, vertical, both. Flourish type hint: string, defaults to None. + :type cell_border_mode: str, optional + :param cell_border_color: Color. Flourish type hint: color, defaults to None. + :type cell_border_color: str, optional + :param cell_border_width: Thickness. Flourish type hint: number, defaults to None. + :type cell_border_width: float, optional + :param cell_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type cell_border_style: str, optional + :param cell_font_color: Color. Flourish type hint: color, defaults to None. + :type cell_font_color: str, optional + :param cell_link_color: Link color. Flourish type hint: color, defaults to None. + :type cell_link_color: str, optional + :param cell_font_size: Size. Choices: 1, 1.25, 1.5, custom. Flourish type hint: string, defaults to None. + :type cell_font_size: str, optional + :param cell_font_size_custom: Custom. Specify a custom responsive font size in rems Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type cell_font_size_custom: float, optional + :param column_width_mode: Choices: auto, equal, fixed. Flourish type hint: string, defaults to None. + :type column_width_mode: str, optional + :param column_widths: Column widths. A comma separated lists of column widths. The first column will be the first number in the list. You can use "px" to set fixed widths or "%" to use percentage of total width. (e.g. 200px,200px,25%). Flourish type hint: string, defaults to None. + :type column_widths: str, optional + :param header_font_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type header_font_weight: str, optional + :param header_fill: Background. Flourish type hint: color, defaults to None. + :type header_fill: str, optional + :param header_font_color: Color. Flourish type hint: color, defaults to None. + :type header_font_color: str, optional + :param header_underline_sorting: Underline sorting header. Flourish type hint: boolean, defaults to None. + :type header_underline_sorting: bool, optional + :param header_style_default: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type header_style_default: bool, optional + :param header_height: Height. Flourish type hint: number, defaults to None. + :type header_height: float, optional + :param header_padding: Padding. Flourish type hint: number, defaults to None. + :type header_padding: float, optional + :param header_horizontal_alignment: Horizontal alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type header_horizontal_alignment: str, optional + :param header_font_default: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type header_font_default: bool, optional + :param header_font_size: Size. Flourish type hint: number, defaults to None. + :type header_font_size: float, optional + :param header_border_default: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type header_border_default: bool, optional + :param header_border_color: Color. Flourish type hint: color, defaults to None. + :type header_border_color: str, optional + :param header_border_width: Thickness. Flourish type hint: number, defaults to None. + :type header_border_width: float, optional + :param header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type header_border_style: str, optional + :param cell_image_height: Height. as a percentage of the cell height. Flourish type hint: number, defaults to None. + :type cell_image_height: float, optional + :param cell_image_radius: Rounded corners. Sets the radius of the corner roundness (in %). A value of 50 means your image will show as a circle. Flourish type hint: number, defaults to None. + :type cell_image_radius: float, optional + :param bar_columns_enabled: Choices: True, False. This setting will convert numerical values in your data to a simple visual bar chart. Flourish type hint: boolean, defaults to None. + :type bar_columns_enabled: bool, optional + :param bar_columns_bar_1_columns: Which columns should be part of the bar chart?. Just write down the column names on a new line. Flourish type hint: text, defaults to None. + :type bar_columns_bar_1_columns: Union[list, str], optional + :param bar_columns_bar_1_column_name: New column name. Flourish type hint: string, defaults to None. + :type bar_columns_bar_1_column_name: str, optional + :param bar_columns_type: Bar type. Choices: bars, columns. Flourish type hint: string, defaults to None. + :type bar_columns_type: str, optional + :param bar_columns_bar_1_height: Max height. Flourish type hint: number, defaults to None. + :type bar_columns_bar_1_height: float, optional + :param bar_columns_bar_1_width: Width. Flourish type hint: number, defaults to None. + :type bar_columns_bar_1_width: float, optional + :param bar_columns_bar_1_column_padding: Padding. Flourish type hint: number, defaults to None. + :type bar_columns_bar_1_column_padding: float, optional + :param bar_columns_bar_1_proportional: Mode. Choices: False, True. Display data in a proportional bar chart or a standard stacked bar chart with a fixed min and max, e.g. for negative numbers. Flourish type hint: boolean, defaults to None. + :type bar_columns_bar_1_proportional: bool, optional + :param bar_columns_bar_1_same_scale: Consistent scale. If enabled, all the bar charts in the table will use the same X scale. Flourish type hint: boolean, defaults to None. + :type bar_columns_bar_1_same_scale: bool, optional + :param bar_columns_bar_1_zero_line: Show zero line. Flourish type hint: boolean, defaults to None. + :type bar_columns_bar_1_zero_line: bool, optional + :param bar_columns_bar_1_zero_line_color: Zero line color. Flourish type hint: color, defaults to None. + :type bar_columns_bar_1_zero_line_color: str, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param bar_columns_bar_1_labels: Labels. Choices: none, popup, inline. Flourish type hint: string, defaults to None. + :type bar_columns_bar_1_labels: str, optional + :param bar_columns_bar_1_label_size: Inline label size. Flourish type hint: number, defaults to None. + :type bar_columns_bar_1_label_size: float, optional + :param chart_legend_show_legend: Legend. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_legend_show_legend: bool, optional + :param chart_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_legend_title_mode: str, optional + :param chart_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_legend_title: str, optional + :param chart_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_legend_swatch_width: float, optional + :param chart_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_legend_swatch_height: float, optional + :param chart_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_legend_swatch_radius: float, optional + :param chart_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_legend_legend_items_padding: float, optional + :param chart_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_legend_swatch_outline: bool, optional + :param chart_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_swatch_outline_color: str, optional + :param chart_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_legend_order_override: Union[list, str], optional + :param chart_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_legend_icon_height: float, optional + :param chart_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_legend_icon_color: str, optional + :param chart_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_legend_max_width: float, optional + :param chart_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_orientation: str, optional + :param legend_position: Legend position. Choices: above, below. Flourish type hint: string, defaults to None. + :type legend_position: str, optional + :param chart_legend_container_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_legend_container_alignment: str, optional + :param chart_legend_container_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_legend_container_orientation: str, optional + :param chart_legend_container_title_weight: Title weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_title_weight: str, optional + :param chart_legend_container_text_weight: Text weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_legend_container_text_weight: str, optional + :param chart_legend_container_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_legend_container_text_color: str, optional + :param chart_legend_container_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_legend_container_text_size: float, optional + :param line_columns_enabled: Choices: True, False. This setting will convert numerical values in your data to a simple visual line chart. Flourish type hint: boolean, defaults to None. + :type line_columns_enabled: bool, optional + :param line_columns_line_1_columns: Which columns should be part of the line chart?. Write down the column names on a new line. Flourish type hint: text, defaults to None. + :type line_columns_line_1_columns: Union[list, str], optional + :param line_columns_line_1_column_name: New column name. Flourish type hint: string, defaults to None. + :type line_columns_line_1_column_name: str, optional + :param line_columns_line_1_width: Width. Flourish type hint: number, defaults to None. + :type line_columns_line_1_width: float, optional + :param line_columns_line_1_height: Max height. Flourish type hint: number, defaults to None. + :type line_columns_line_1_height: float, optional + :param line_columns_line_1_color: Color. Flourish type hint: color, defaults to None. + :type line_columns_line_1_color: str, optional + :param line_columns_line_1_area: Area chart. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type line_columns_line_1_area: bool, optional + :param line_columns_line_1_min_enabled: Min. Choices: True, False. Use a fixed min value. Flourish type hint: boolean, defaults to None. + :type line_columns_line_1_min_enabled: bool, optional + :param line_columns_line_1_min: Min value. Flourish type hint: number, defaults to None. + :type line_columns_line_1_min: float, optional + :param line_columns_line_1_max_enabled: Max. Choices: True, False. Use a fixed max value. Flourish type hint: boolean, defaults to None. + :type line_columns_line_1_max_enabled: bool, optional + :param line_columns_line_1_max: Max value. Flourish type hint: number, defaults to None. + :type line_columns_line_1_max: float, optional + :param mobile_view: Mobile view. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type mobile_view: bool, optional + :param mobile_breakpoint: Mobile breakpoint width. Flourish type hint: number, defaults to None. + :type mobile_breakpoint: float, optional + :param mobile_cell_font_size: Text size. Choices: 1, 1.25, 1.5, custom. Flourish type hint: string, defaults to None. + :type mobile_cell_font_size: str, optional + :param mobile_cell_font_size_custom: Custom. Specify a custom responsive font size in rems Best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type mobile_cell_font_size_custom: float, optional + :param mobile_pagination_amount: Rows per page. If you dont want pagination, set this number to a value greater than the number of rows in your data. Flourish type hint: number, defaults to None. + :type mobile_pagination_amount: float, optional + :param search_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type search_enabled: bool, optional + :param search_mode: Search mode. Choices: anywhere, start, whole. Anywhere : Search for the specified text anywhere in the cell Start : Search for the specified text at the beginning of the cell Whole : Search for the exact specified text in the cell. Flourish type hint: string, defaults to None. + :type search_mode: str, optional + :param search_width: Width. Width of search container. Flourish type hint: number, defaults to None. + :type search_width: float, optional + :param search_background_color: Background. Flourish type hint: color, defaults to None. + :type search_background_color: str, optional + :param search_text_color: Text color. Flourish type hint: color, defaults to None. + :type search_text_color: str, optional + :param search_placeholder: Placeholder text. Flourish type hint: string, defaults to None. + :type search_placeholder: str, optional + :param no_results_text: Text when no results. Flourish type hint: string, defaults to None. + :type no_results_text: str, optional + :param search_hide_table: Hide table before search. Flourish type hint: boolean, defaults to None. + :type search_hide_table: bool, optional + :param search_hide_published: Hide search when published. Keeps the search box visible in the editor (e.g. for filtering in a story) but hides it in the published visualization or storyFlourish type hint: boolean, defaults to None. + :type search_hide_published: bool, optional + :param search_columns: Columns to search. Choices: all, first, custom. Choose which columns you want to search through. You might want to narrow this down with big datasets to speed it up You can select specific columns by writing them down on a new line, like this: Column A Column B. Flourish type hint: string, defaults to None. + :type search_columns: str, optional + :param search_columns_custom: Flourish type hint: text, defaults to None. + :type search_columns_custom: Union[list, str], optional + :param search_resize: Resize table after searching. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type search_resize: bool, optional + :param search_dropdown: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type search_dropdown: bool, optional + :param search_dropdown_persistent: Always show dropdown suggestions. Flourish type hint: boolean, defaults to None. + :type search_dropdown_persistent: bool, optional + :param search_val: Search value. The current string value of the search box. Flourish type hint: hidden, defaults to None. + :type search_val: str, optional + :param chart_popup_show_popups: Popups. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popups: bool, optional + :param chart_popup_is_custom: Popup contents. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_is_custom: bool, optional + :param chart_popup_custom_template: Popup content. The text to appear in the popup. You can use `{{column_name}}` to add a value from your data. It must be in a selected column, but you can add columns to Metadata if you just want to include them for use in the popup. Advanced users can include HTML to apply layouts, formatting, images, etc. Flourish type hint: text, defaults to None. + :type chart_popup_custom_template: Union[list, str], optional + :param chart_popup_show_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_pointer: bool, optional + :param chart_popup_show_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_shadow: bool, optional + :param chart_popup_style_popups: Custom styling. Flourish type hint: boolean, defaults to None. + :type chart_popup_style_popups: bool, optional + :param chart_popup_text_color: Text colour. Flourish type hint: color, defaults to None. + :type chart_popup_text_color: str, optional + :param chart_popup_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_popup_align: str, optional + :param chart_popup_text_size: Font size. Flourish type hint: number, defaults to None. + :type chart_popup_text_size: float, optional + :param chart_popup_fill_color: Fill colour. Flourish type hint: color, defaults to None. + :type chart_popup_fill_color: str, optional + :param chart_popup_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_opacity: float, optional + :param chart_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_padding: float, optional + :param chart_popup_border_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_border_radius: float, optional + :param chart_popup_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_popup_max_width: float, optional + :param formatted_columns: Columns to format. Write down the column names on a new line that you want to apply formatting to. Flourish type hint: text, defaults to None. + :type formatted_columns: Union[list, str], optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after a number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Decimal places. You can also enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + :param chart_url_settings_enabled: Update project from URL. Make it possible to change the visualizations settings/state from the URL hash, for example when embedding in an iframe or popup panel. Flourish type hint: boolean, defaults to None. + :type chart_url_settings_enabled: bool, optional + :param chart_url_settings_whitelist: Allowed state properties. List each state property you want to make changeable with the URL hash See the template page for a full list of state properties. Add one property name per line. Use dot format for nested properties, e.g. `layout.background_color`. Flourish type hint: text, defaults to None. + :type chart_url_settings_whitelist: Union[list, str], optional + """ + details_error(self) + + self.state = { + "state": { + "sorting": {}, + "bar_columns": {}, + "color": {}, + "legend": {}, + "legend_container": {}, + "line_columns": {}, + "mobile": {}, + "popup": {}, + "number_format": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + "url_state": {}, + } + } + + self.state["state"]["table_min_width"] = table_min_width + self.state["state"]["table_border_width"] = table_border_width + self.state["state"]["table_border_color"] = table_border_color + + list_sorting_enabled = ["all", "none", "custom"] + [None] + if sorting_enabled not in list_sorting_enabled: + raise ValueError( + f"`sorting_enabled` must be one of: ['all', 'none', 'custom']" + ) + elif sorting_enabled in list_sorting_enabled and sorting_enabled is not None: + filtered_dict = { + k: v + for (k, v) in {"all": "all", "none": "none", "custom": "custom"}.items() + if sorting_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["sorting"]["enabled"] = filtered_dict[ + sorting_enabled + ] + + if ( + sorting_custom_columns is not None + and len(sorting_custom_columns) > 1 + and isinstance(sorting_custom_columns, list) + ): + self.state["state"]["sorting"]["custom_columns"] = " \n ".join( + sorting_custom_columns + ) + else: + self.state["state"]["sorting"]["custom_columns"] = sorting_custom_columns + + self.state["state"]["pagination_amount"] = pagination_amount + + list_markdown_enabled = [True, False] + [None] + if markdown_enabled not in list_markdown_enabled: + raise ValueError(f"`markdown_enabled` must be one of: [True, False]") + elif markdown_enabled in list_markdown_enabled and markdown_enabled is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if markdown_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["markdown_enabled"] = filtered_dict[ + markdown_enabled + ] + self.state["state"]["cell_height"] = cell_height + self.state["state"]["cell_padding_vertical"] = cell_padding_vertical + self.state["state"]["cell_padding_horizontal"] = cell_padding_horizontal + self.state["state"]["cell_wrap"] = cell_wrap + + list_cell_horizontal_alignment = ["start", "center", "end"] + [None] + if cell_horizontal_alignment not in list_cell_horizontal_alignment: + raise ValueError( + f"`cell_horizontal_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + cell_horizontal_alignment in list_cell_horizontal_alignment + and cell_horizontal_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if cell_horizontal_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["cell_horizontal_alignment"] = filtered_dict[ + cell_horizontal_alignment + ] + + list_cell_numeric_horizontal_alignment = ["start", "center", "end"] + [None] + if ( + cell_numeric_horizontal_alignment + not in list_cell_numeric_horizontal_alignment + ): + raise ValueError( + f"`cell_numeric_horizontal_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + cell_numeric_horizontal_alignment in list_cell_numeric_horizontal_alignment + and cell_numeric_horizontal_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if cell_numeric_horizontal_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"][ + "cell_numeric_horizontal_alignment" + ] = filtered_dict[cell_numeric_horizontal_alignment] + + list_cell_vertical_alignment = ["top", "center", "bottom"] + [None] + if cell_vertical_alignment not in list_cell_vertical_alignment: + raise ValueError( + f"`cell_vertical_alignment` must be one of: ['top', 'center', 'bottom']" + ) + elif ( + cell_vertical_alignment in list_cell_vertical_alignment + and cell_vertical_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "center": "center", + "bottom": "bottom", + }.items() + if cell_vertical_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["cell_vertical_alignment"] = filtered_dict[ + cell_vertical_alignment + ] + self.state["state"]["cell_fill_1"] = cell_fill_1 + self.state["state"]["cell_fill_2"] = cell_fill_2 + + list_cell_fill_direction = ["horizontal", "vertical"] + [None] + if cell_fill_direction not in list_cell_fill_direction: + raise ValueError( + f"`cell_fill_direction` must be one of: ['horizontal', 'vertical']" + ) + elif ( + cell_fill_direction in list_cell_fill_direction + and cell_fill_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if cell_fill_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["cell_fill_direction"] = filtered_dict[ + cell_fill_direction + ] + self.state["state"]["cell_fill_custom_enabled"] = cell_fill_custom_enabled + + if ( + cell_fill_custom_categorical is not None + and len(cell_fill_custom_categorical) > 1 + and isinstance(cell_fill_custom_categorical, list) + ): + self.state["state"]["cell_fill_custom_categorical"] = " \n ".join( + cell_fill_custom_categorical + ) + else: + self.state["state"][ + "cell_fill_custom_categorical" + ] = cell_fill_custom_categorical + + if ( + cell_fill_custom_numeric is not None + and len(cell_fill_custom_numeric) > 1 + and isinstance(cell_fill_custom_numeric, list) + ): + self.state["state"]["cell_fill_custom_numeric"] = " \n ".join( + cell_fill_custom_numeric + ) + else: + self.state["state"]["cell_fill_custom_numeric"] = cell_fill_custom_numeric + + self.state["state"]["cell_fill_margin_vertical"] = cell_fill_margin_vertical + self.state["state"]["cell_fill_margin_horizontal"] = cell_fill_margin_horizontal + + list_cell_border_mode = ["none", "horizontal", "vertical", "both"] + [None] + if cell_border_mode not in list_cell_border_mode: + raise ValueError( + f"`cell_border_mode` must be one of: ['none', 'horizontal', 'vertical', 'both']" + ) + elif cell_border_mode in list_cell_border_mode and cell_border_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "horizontal": "horizontal", + "vertical": "vertical", + "both": "both", + }.items() + if cell_border_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["cell_border_mode"] = filtered_dict[ + cell_border_mode + ] + self.state["state"]["cell_border_color"] = cell_border_color + self.state["state"]["cell_border_width"] = cell_border_width + + list_cell_border_style = ["solid", "dashed", "dotted"] + [None] + if cell_border_style not in list_cell_border_style: + raise ValueError( + f"`cell_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + cell_border_style in list_cell_border_style + and cell_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if cell_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["cell_border_style"] = filtered_dict[ + cell_border_style + ] + self.state["state"]["cell_font_color"] = cell_font_color + self.state["state"]["cell_link_color"] = cell_link_color + + list_cell_font_size = ["1", "1.25", "1.5", "custom"] + [None] + if cell_font_size not in list_cell_font_size: + raise ValueError( + f"`cell_font_size` must be one of: ['1', '1.25', '1.5', 'custom']" + ) + elif cell_font_size in list_cell_font_size and cell_font_size is not None: + filtered_dict = { + k: v + for (k, v) in { + "1": "1", + "1.25": "1.25", + "1.5": "1.5", + "custom": "custom", + }.items() + if cell_font_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["cell_font_size"] = filtered_dict[cell_font_size] + self.state["state"]["cell_font_size_custom"] = cell_font_size_custom + + list_column_width_mode = ["auto", "equal", "fixed"] + [None] + if column_width_mode not in list_column_width_mode: + raise ValueError( + f"`column_width_mode` must be one of: ['auto', 'equal', 'fixed']" + ) + elif ( + column_width_mode in list_column_width_mode + and column_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "equal": "equal", + "fixed": "fixed", + }.items() + if column_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["column_width_mode"] = filtered_dict[ + column_width_mode + ] + self.state["state"]["column_widths"] = column_widths + + list_header_font_weight = ["bold", "normal"] + [None] + if header_font_weight not in list_header_font_weight: + raise ValueError(f"`header_font_weight` must be one of: ['bold', 'normal']") + elif ( + header_font_weight in list_header_font_weight + and header_font_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if header_font_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["header_font_weight"] = filtered_dict[ + header_font_weight + ] + self.state["state"]["header_fill"] = header_fill + self.state["state"]["header_font_color"] = header_font_color + self.state["state"]["header_underline_sorting"] = header_underline_sorting + + list_header_style_default = [True, False] + [None] + if header_style_default not in list_header_style_default: + raise ValueError(f"`header_style_default` must be one of: [True, False]") + elif ( + header_style_default in list_header_style_default + and header_style_default is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if header_style_default in k + } + if len(filtered_dict) > 0: + self.state["state"]["header_style_default"] = filtered_dict[ + header_style_default + ] + self.state["state"]["header_height"] = header_height + self.state["state"]["header_padding"] = header_padding + + list_header_horizontal_alignment = ["start", "center", "end"] + [None] + if header_horizontal_alignment not in list_header_horizontal_alignment: + raise ValueError( + f"`header_horizontal_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + header_horizontal_alignment in list_header_horizontal_alignment + and header_horizontal_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if header_horizontal_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["header_horizontal_alignment"] = filtered_dict[ + header_horizontal_alignment + ] + + list_header_font_default = [True, False] + [None] + if header_font_default not in list_header_font_default: + raise ValueError(f"`header_font_default` must be one of: [True, False]") + elif ( + header_font_default in list_header_font_default + and header_font_default is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if header_font_default in k + } + if len(filtered_dict) > 0: + self.state["state"]["header_font_default"] = filtered_dict[ + header_font_default + ] + self.state["state"]["header_font_size"] = header_font_size + + list_header_border_default = [True, False] + [None] + if header_border_default not in list_header_border_default: + raise ValueError(f"`header_border_default` must be one of: [True, False]") + elif ( + header_border_default in list_header_border_default + and header_border_default is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if header_border_default in k + } + if len(filtered_dict) > 0: + self.state["state"]["header_border_default"] = filtered_dict[ + header_border_default + ] + self.state["state"]["header_border_color"] = header_border_color + self.state["state"]["header_border_width"] = header_border_width + + list_header_border_style = ["solid", "dashed", "dotted"] + [None] + if header_border_style not in list_header_border_style: + raise ValueError( + f"`header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + header_border_style in list_header_border_style + and header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["header_border_style"] = filtered_dict[ + header_border_style + ] + self.state["state"]["cell_image_height"] = cell_image_height + self.state["state"]["cell_image_radius"] = cell_image_radius + + list_bar_columns_enabled = [True, False] + [None] + if bar_columns_enabled not in list_bar_columns_enabled: + raise ValueError(f"`bar_columns_enabled` must be one of: [True, False]") + elif ( + bar_columns_enabled in list_bar_columns_enabled + and bar_columns_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if bar_columns_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["bar_columns"]["enabled"] = filtered_dict[ + bar_columns_enabled + ] + + if ( + bar_columns_bar_1_columns is not None + and len(bar_columns_bar_1_columns) > 1 + and isinstance(bar_columns_bar_1_columns, list) + ): + self.state["state"]["bar_columns"]["bar_1_columns"] = " \n ".join( + bar_columns_bar_1_columns + ) + else: + self.state["state"]["bar_columns"][ + "bar_1_columns" + ] = bar_columns_bar_1_columns + + self.state["state"]["bar_columns"][ + "bar_1_column_name" + ] = bar_columns_bar_1_column_name + + list_bar_columns_type = ["bars", "columns"] + [None] + if bar_columns_type not in list_bar_columns_type: + raise ValueError(f"`bar_columns_type` must be one of: ['bars', 'columns']") + elif bar_columns_type in list_bar_columns_type and bar_columns_type is not None: + filtered_dict = { + k: v + for (k, v) in {"bars": "bars", "columns": "columns"}.items() + if bar_columns_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["bar_columns"]["type"] = filtered_dict[ + bar_columns_type + ] + self.state["state"]["bar_columns"]["bar_1_height"] = bar_columns_bar_1_height + self.state["state"]["bar_columns"]["bar_1_width"] = bar_columns_bar_1_width + self.state["state"]["bar_columns"][ + "bar_1_column_padding" + ] = bar_columns_bar_1_column_padding + + list_bar_columns_bar_1_proportional = [False, True] + [None] + if bar_columns_bar_1_proportional not in list_bar_columns_bar_1_proportional: + raise ValueError( + f"`bar_columns_bar_1_proportional` must be one of: [False, True]" + ) + elif ( + bar_columns_bar_1_proportional in list_bar_columns_bar_1_proportional + and bar_columns_bar_1_proportional is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if bar_columns_bar_1_proportional in k + } + if len(filtered_dict) > 0: + self.state["state"]["bar_columns"][ + "bar_1_proportional" + ] = filtered_dict[bar_columns_bar_1_proportional] + self.state["state"]["bar_columns"][ + "bar_1_same_scale" + ] = bar_columns_bar_1_same_scale + self.state["state"]["bar_columns"][ + "bar_1_zero_line" + ] = bar_columns_bar_1_zero_line + self.state["state"]["bar_columns"][ + "bar_1_zero_line_color" + ] = bar_columns_bar_1_zero_line_color + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + + list_bar_columns_bar_1_labels = ["none", "popup", "inline"] + [None] + if bar_columns_bar_1_labels not in list_bar_columns_bar_1_labels: + raise ValueError( + f"`bar_columns_bar_1_labels` must be one of: ['none', 'popup', 'inline']" + ) + elif ( + bar_columns_bar_1_labels in list_bar_columns_bar_1_labels + and bar_columns_bar_1_labels is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "inline": "inline", + }.items() + if bar_columns_bar_1_labels in k + } + if len(filtered_dict) > 0: + self.state["state"]["bar_columns"]["bar_1_labels"] = filtered_dict[ + bar_columns_bar_1_labels + ] + self.state["state"]["bar_columns"][ + "bar_1_label_size" + ] = bar_columns_bar_1_label_size + + list_chart_legend_show_legend = [True, False] + [None] + if chart_legend_show_legend not in list_chart_legend_show_legend: + raise ValueError( + f"`chart_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_legend_show_legend in list_chart_legend_show_legend + and chart_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend"]["show_legend"] = filtered_dict[ + chart_legend_show_legend + ] + + list_chart_legend_title_mode = ["auto", "custom"] + [None] + if chart_legend_title_mode not in list_chart_legend_title_mode: + raise ValueError( + f"`chart_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_legend_title_mode in list_chart_legend_title_mode + and chart_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend"]["title_mode"] = filtered_dict[ + chart_legend_title_mode + ] + self.state["state"]["legend"]["title"] = chart_legend_title + self.state["state"]["legend"]["swatch_width"] = chart_legend_swatch_width + self.state["state"]["legend"]["swatch_height"] = chart_legend_swatch_height + self.state["state"]["legend"]["swatch_radius"] = chart_legend_swatch_radius + self.state["state"]["legend"][ + "legend_items_padding" + ] = chart_legend_legend_items_padding + self.state["state"]["legend"]["swatch_outline"] = chart_legend_swatch_outline + self.state["state"]["legend"][ + "swatch_outline_color" + ] = chart_legend_swatch_outline_color + + if ( + chart_legend_order_override is not None + and len(chart_legend_order_override) > 1 + and isinstance(chart_legend_order_override, list) + ): + self.state["state"]["legend"]["order_override"] = " \n ".join( + chart_legend_order_override + ) + else: + self.state["state"]["legend"][ + "order_override" + ] = chart_legend_order_override + + self.state["state"]["legend"]["icon_height"] = chart_legend_icon_height + self.state["state"]["legend"]["icon_color"] = chart_legend_icon_color + self.state["state"]["legend"]["max_width"] = chart_legend_max_width + + list_chart_legend_orientation = ["horizontal", "vertical"] + [None] + if chart_legend_orientation not in list_chart_legend_orientation: + raise ValueError( + f"`chart_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_orientation in list_chart_legend_orientation + and chart_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend"]["orientation"] = filtered_dict[ + chart_legend_orientation + ] + + list_legend_position = ["above", "below"] + [None] + if legend_position not in list_legend_position: + raise ValueError(f"`legend_position` must be one of: ['above', 'below']") + elif legend_position in list_legend_position and legend_position is not None: + filtered_dict = { + k: v + for (k, v) in {"above": "above", "below": "below"}.items() + if legend_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_position"] = filtered_dict[legend_position] + + list_chart_legend_container_alignment = ["start", "center", "end"] + [None] + if ( + chart_legend_container_alignment + not in list_chart_legend_container_alignment + ): + raise ValueError( + f"`chart_legend_container_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_legend_container_alignment in list_chart_legend_container_alignment + and chart_legend_container_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_legend_container_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["alignment"] = filtered_dict[ + chart_legend_container_alignment + ] + + list_chart_legend_container_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_legend_container_orientation + not in list_chart_legend_container_orientation + ): + raise ValueError( + f"`chart_legend_container_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_legend_container_orientation + in list_chart_legend_container_orientation + and chart_legend_container_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_legend_container_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["orientation"] = filtered_dict[ + chart_legend_container_orientation + ] + + list_chart_legend_container_title_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_title_weight + not in list_chart_legend_container_title_weight + ): + raise ValueError( + f"`chart_legend_container_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_title_weight + in list_chart_legend_container_title_weight + and chart_legend_container_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["title_weight"] = filtered_dict[ + chart_legend_container_title_weight + ] + + list_chart_legend_container_text_weight = ["bold", "normal"] + [None] + if ( + chart_legend_container_text_weight + not in list_chart_legend_container_text_weight + ): + raise ValueError( + f"`chart_legend_container_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_legend_container_text_weight + in list_chart_legend_container_text_weight + and chart_legend_container_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_legend_container_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_container"]["text_weight"] = filtered_dict[ + chart_legend_container_text_weight + ] + self.state["state"]["legend_container"][ + "text_color" + ] = chart_legend_container_text_color + self.state["state"]["legend_container"][ + "text_size" + ] = chart_legend_container_text_size + + list_line_columns_enabled = [True, False] + [None] + if line_columns_enabled not in list_line_columns_enabled: + raise ValueError(f"`line_columns_enabled` must be one of: [True, False]") + elif ( + line_columns_enabled in list_line_columns_enabled + and line_columns_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if line_columns_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_columns"]["enabled"] = filtered_dict[ + line_columns_enabled + ] + + if ( + line_columns_line_1_columns is not None + and len(line_columns_line_1_columns) > 1 + and isinstance(line_columns_line_1_columns, list) + ): + self.state["state"]["line_columns"]["line_1_columns"] = " \n ".join( + line_columns_line_1_columns + ) + else: + self.state["state"]["line_columns"][ + "line_1_columns" + ] = line_columns_line_1_columns + + self.state["state"]["line_columns"][ + "line_1_column_name" + ] = line_columns_line_1_column_name + self.state["state"]["line_columns"]["line_1_width"] = line_columns_line_1_width + self.state["state"]["line_columns"][ + "line_1_height" + ] = line_columns_line_1_height + self.state["state"]["line_columns"]["line_1_color"] = line_columns_line_1_color + + list_line_columns_line_1_area = [True, False] + [None] + if line_columns_line_1_area not in list_line_columns_line_1_area: + raise ValueError( + f"`line_columns_line_1_area` must be one of: [True, False]" + ) + elif ( + line_columns_line_1_area in list_line_columns_line_1_area + and line_columns_line_1_area is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if line_columns_line_1_area in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_columns"]["line_1_area"] = filtered_dict[ + line_columns_line_1_area + ] + + list_line_columns_line_1_min_enabled = [True, False] + [None] + if line_columns_line_1_min_enabled not in list_line_columns_line_1_min_enabled: + raise ValueError( + f"`line_columns_line_1_min_enabled` must be one of: [True, False]" + ) + elif ( + line_columns_line_1_min_enabled in list_line_columns_line_1_min_enabled + and line_columns_line_1_min_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if line_columns_line_1_min_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_columns"][ + "line_1_min_enabled" + ] = filtered_dict[line_columns_line_1_min_enabled] + self.state["state"]["line_columns"]["line_1_min"] = line_columns_line_1_min + + list_line_columns_line_1_max_enabled = [True, False] + [None] + if line_columns_line_1_max_enabled not in list_line_columns_line_1_max_enabled: + raise ValueError( + f"`line_columns_line_1_max_enabled` must be one of: [True, False]" + ) + elif ( + line_columns_line_1_max_enabled in list_line_columns_line_1_max_enabled + and line_columns_line_1_max_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if line_columns_line_1_max_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_columns"][ + "line_1_max_enabled" + ] = filtered_dict[line_columns_line_1_max_enabled] + self.state["state"]["line_columns"]["line_1_max"] = line_columns_line_1_max + + list_mobile_view = [False, True] + [None] + if mobile_view not in list_mobile_view: + raise ValueError(f"`mobile_view` must be one of: [False, True]") + elif mobile_view in list_mobile_view and mobile_view is not None: + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if mobile_view in k + } + if len(filtered_dict) > 0: + self.state["state"]["mobile"]["view"] = filtered_dict[mobile_view] + self.state["state"]["mobile"]["breakpoint"] = mobile_breakpoint + + list_mobile_cell_font_size = ["1", "1.25", "1.5", "custom"] + [None] + if mobile_cell_font_size not in list_mobile_cell_font_size: + raise ValueError( + f"`mobile_cell_font_size` must be one of: ['1', '1.25', '1.5', 'custom']" + ) + elif ( + mobile_cell_font_size in list_mobile_cell_font_size + and mobile_cell_font_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1": "1", + "1.25": "1.25", + "1.5": "1.5", + "custom": "custom", + }.items() + if mobile_cell_font_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["mobile"]["cell_font_size"] = filtered_dict[ + mobile_cell_font_size + ] + self.state["state"]["mobile"][ + "cell_font_size_custom" + ] = mobile_cell_font_size_custom + self.state["state"]["mobile"]["pagination_amount"] = mobile_pagination_amount + + list_search_enabled = [True, False] + [None] + if search_enabled not in list_search_enabled: + raise ValueError(f"`search_enabled` must be one of: [True, False]") + elif search_enabled in list_search_enabled and search_enabled is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if search_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["search_enabled"] = filtered_dict[search_enabled] + + list_search_mode = ["anywhere", "start", "whole"] + [None] + if search_mode not in list_search_mode: + raise ValueError( + f"`search_mode` must be one of: ['anywhere', 'start', 'whole']" + ) + elif search_mode in list_search_mode and search_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "anywhere": "anywhere", + "start": "start", + "whole": "whole", + }.items() + if search_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["search_mode"] = filtered_dict[search_mode] + self.state["state"]["search_width"] = search_width + self.state["state"]["search_background_color"] = search_background_color + self.state["state"]["search_text_color"] = search_text_color + self.state["state"]["search_placeholder"] = search_placeholder + self.state["state"]["no_results_text"] = no_results_text + self.state["state"]["search_hide_table"] = search_hide_table + self.state["state"]["search_hide_published"] = search_hide_published + + list_search_columns = ["all", "first", "custom"] + [None] + if search_columns not in list_search_columns: + raise ValueError( + f"`search_columns` must be one of: ['all', 'first', 'custom']" + ) + elif search_columns in list_search_columns and search_columns is not None: + filtered_dict = { + k: v + for (k, v) in { + "all": "all", + "first": "first", + "custom": "custom", + }.items() + if search_columns in k + } + if len(filtered_dict) > 0: + self.state["state"]["search_columns"] = filtered_dict[search_columns] + + if ( + search_columns_custom is not None + and len(search_columns_custom) > 1 + and isinstance(search_columns_custom, list) + ): + self.state["state"]["search_columns_custom"] = " \n ".join( + search_columns_custom + ) + else: + self.state["state"]["search_columns_custom"] = search_columns_custom + + list_search_resize = [True, False] + [None] + if search_resize not in list_search_resize: + raise ValueError(f"`search_resize` must be one of: [True, False]") + elif search_resize in list_search_resize and search_resize is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if search_resize in k + } + if len(filtered_dict) > 0: + self.state["state"]["search_resize"] = filtered_dict[search_resize] + + list_search_dropdown = [True, False] + [None] + if search_dropdown not in list_search_dropdown: + raise ValueError(f"`search_dropdown` must be one of: [True, False]") + elif search_dropdown in list_search_dropdown and search_dropdown is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if search_dropdown in k + } + if len(filtered_dict) > 0: + self.state["state"]["search_dropdown"] = filtered_dict[search_dropdown] + self.state["state"]["search_dropdown_persistent"] = search_dropdown_persistent + self.state["state"]["search_val"] = search_val + + list_chart_popup_show_popups = [True, False] + [None] + if chart_popup_show_popups not in list_chart_popup_show_popups: + raise ValueError(f"`chart_popup_show_popups` must be one of: [True, False]") + elif ( + chart_popup_show_popups in list_chart_popup_show_popups + and chart_popup_show_popups is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_popup_show_popups in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["show_popups"] = filtered_dict[ + chart_popup_show_popups + ] + + list_chart_popup_is_custom = [False, True] + [None] + if chart_popup_is_custom not in list_chart_popup_is_custom: + raise ValueError(f"`chart_popup_is_custom` must be one of: [False, True]") + elif ( + chart_popup_is_custom in list_chart_popup_is_custom + and chart_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["is_custom"] = filtered_dict[ + chart_popup_is_custom + ] + + if ( + chart_popup_custom_template is not None + and len(chart_popup_custom_template) > 1 + and isinstance(chart_popup_custom_template, list) + ): + self.state["state"]["popup"]["custom_template"] = " \n ".join( + chart_popup_custom_template + ) + else: + self.state["state"]["popup"][ + "custom_template" + ] = chart_popup_custom_template + + self.state["state"]["popup"]["show_pointer"] = chart_popup_show_pointer + self.state["state"]["popup"]["show_shadow"] = chart_popup_show_shadow + self.state["state"]["popup"]["style_popups"] = chart_popup_style_popups + self.state["state"]["popup"]["text_color"] = chart_popup_text_color + + list_chart_popup_align = ["left", "center", "right"] + [None] + if chart_popup_align not in list_chart_popup_align: + raise ValueError( + f"`chart_popup_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_popup_align in list_chart_popup_align + and chart_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["align"] = filtered_dict[chart_popup_align] + self.state["state"]["popup"]["text_size"] = chart_popup_text_size + self.state["state"]["popup"]["fill_color"] = chart_popup_fill_color + self.state["state"]["popup"]["opacity"] = chart_popup_opacity + self.state["state"]["popup"]["padding"] = chart_popup_padding + self.state["state"]["popup"]["border_radius"] = chart_popup_border_radius + self.state["state"]["popup"]["max_width"] = chart_popup_max_width + + if ( + formatted_columns is not None + and len(formatted_columns) > 1 + and isinstance(formatted_columns, list) + ): + self.state["state"]["formatted_columns"] = " \n ".join(formatted_columns) + else: + self.state["state"]["formatted_columns"] = formatted_columns + + self.state["state"]["number_format"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["number_format"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["number_format"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["number_format"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["number_format"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["number_format"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["number_format"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["number_format"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["number_format"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + self.state["state"]["url_state"]["enabled"] = chart_url_settings_enabled + + if ( + chart_url_settings_whitelist is not None + and len(chart_url_settings_whitelist) > 1 + and isinstance(chart_url_settings_whitelist, list) + ): + self.state["state"]["url_state"]["whitelist"] = " \n ".join( + chart_url_settings_whitelist + ) + else: + self.state["state"]["url_state"]["whitelist"] = chart_url_settings_whitelist + + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_text_annotator_details( + self, + text: Union[list, str] = None, + highlight_color: str = None, + layout_align: str = None, + text_container_width: float = None, + text_font_size: float = None, + text_font_color: str = None, + text_font_color_highlighted: str = None, + text_font_color_highlighted_contrast: str = None, + text_highlight_type: str = None, + text_highlight_handdrawn: str = None, + highlighted_stroke_end: str = None, + highlighted_stroke_amount: float = None, + highlighted_stroke_width: float = None, + note_type: str = None, + note_visibility: str = None, + note_font_size: float = None, + side_panel_width: float = None, + note_font_color: str = None, + note_background_color: str = None, + note_custom_content: Union[list, str] = None, + note_mobile_mode: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: text annotator. + + + :param text: Text. Fill in the text you want to annotate In the datasheet, you can write which parts of the text should be annotated. If you want to annotate a specific part of the text that occurs more than once, you can add identifiers to your text. For example, "Id like to annotate the word beautiful\{beautiful-annotation}." Then, in the datasheet, you can write "beautiful-annotation" in the first column and the text to include in the annotation in the second column. Flourish type hint: html, defaults to None. + :type text: Union[list, str], optional + :param highlight_color: Highlight color. Flourish type hint: color, defaults to None. + :type highlight_color: str, optional + :param layout_align: Align. Choices: center, start. Flourish type hint: string, defaults to None. + :type layout_align: str, optional + :param text_container_width: Width. Max width of text container. Flourish type hint: number, defaults to None. + :type text_container_width: float, optional + :param text_font_size: Font size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type text_font_size: float, optional + :param text_font_color: Text color. Flourish type hint: color, defaults to None. + :type text_font_color: str, optional + :param text_font_color_highlighted: Text color (highlighted). Flourish type hint: color, defaults to None. + :type text_font_color_highlighted: str, optional + :param text_font_color_highlighted_contrast: Text color (highlighted). Flourish type hint: color, defaults to None. + :type text_font_color_highlighted_contrast: str, optional + :param text_highlight_type: Highlight type. Choices: handdrawn, background, text_color, underline. Flourish type hint: string, defaults to None. + :type text_highlight_type: str, optional + :param text_highlight_handdrawn: Handdrawn type. Choices: circle, highlight, box, underline. Flourish type hint: string, defaults to None. + :type text_highlight_handdrawn: str, optional + :param highlighted_stroke_end: Stroke end. Choices: round,Flourish type hint: string, defaults to None. + :type highlighted_stroke_end: str, optional + :param highlighted_stroke_amount: Iterations. Number of lines to draw. Flourish type hint: number, defaults to None. + :type highlighted_stroke_amount: float, optional + :param highlighted_stroke_width: Thickness. Flourish type hint: number, defaults to None. + :type highlighted_stroke_width: float, optional + :param note_type: Mode. Choices: side-panel, inline. Flourish type hint: string, defaults to None. + :type note_type: str, optional + :param note_visibility: Show notes. Choices: always, click. Flourish type hint: string, defaults to None. + :type note_visibility: str, optional + :param note_font_size: Text size. Flourish type hint: number, defaults to None. + :type note_font_size: float, optional + :param side_panel_width: Width. Max width of side panel. Flourish type hint: number, defaults to None. + :type side_panel_width: float, optional + :param note_font_color: Text color. Flourish type hint: color, defaults to None. + :type note_font_color: str, optional + :param note_background_color: Background color. Flourish type hint: color, defaults to None. + :type note_background_color: str, optional + :param note_custom_content: Note content. Use `{{NOTE}}` to show the annotation content. Use this setting to add prefixes, suffixes or additional HTML styling to your annotations. Flourish type hint: html, defaults to None. + :type note_custom_content: Union[list, str], optional + :param note_mobile_mode: Mobile mode. Choices: side-panel, inline, overlay. Choose where to display the notes on smaller screens. Flourish type hint: string, defaults to None. + :type note_mobile_mode: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + if text is not None and len(text) > 1 and isinstance(text, list): + self.state["state"]["text"] = " \n ".join(text) + else: + self.state["state"]["text"] = text + + self.state["state"]["highlight_color"] = highlight_color + + list_layout_align = ["center", "start"] + [None] + if layout_align not in list_layout_align: + raise ValueError(f"`layout_align` must be one of: ['center', 'start']") + elif layout_align in list_layout_align and layout_align is not None: + filtered_dict = { + k: v + for (k, v) in {"center": "center", "start": "start"}.items() + if layout_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout_align"] = filtered_dict[layout_align] + self.state["state"]["text_container_width"] = text_container_width + self.state["state"]["text_font_size"] = text_font_size + self.state["state"]["text_font_color"] = text_font_color + self.state["state"]["text_font_color_highlighted"] = text_font_color_highlighted + self.state["state"][ + "text_font_color_highlighted_contrast" + ] = text_font_color_highlighted_contrast + + list_text_highlight_type = [ + "handdrawn", + "background", + "text_color", + "underline", + ] + [None] + if text_highlight_type not in list_text_highlight_type: + raise ValueError( + f"`text_highlight_type` must be one of: ['handdrawn', 'background', 'text_color', 'underline']" + ) + elif ( + text_highlight_type in list_text_highlight_type + and text_highlight_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "handdrawn": "handdrawn", + "background": "background", + "text_color": "text_color", + "underline": "underline", + }.items() + if text_highlight_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["text_highlight_type"] = filtered_dict[ + text_highlight_type + ] + + list_text_highlight_handdrawn = ["circle", "highlight", "box", "underline"] + [ + None + ] + if text_highlight_handdrawn not in list_text_highlight_handdrawn: + raise ValueError( + f"`text_highlight_handdrawn` must be one of: ['circle', 'highlight', 'box', 'underline']" + ) + elif ( + text_highlight_handdrawn in list_text_highlight_handdrawn + and text_highlight_handdrawn is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "circle": "circle", + "highlight": "highlight", + "box": "box", + "underline": "underline", + }.items() + if text_highlight_handdrawn in k + } + if len(filtered_dict) > 0: + self.state["state"]["text_highlight_handdrawn"] = filtered_dict[ + text_highlight_handdrawn + ] + + list_highlighted_stroke_end = ["round", ""] + [None] + if highlighted_stroke_end not in list_highlighted_stroke_end: + raise ValueError(f"`highlighted_stroke_end` must be one of: ['round', '']") + elif ( + highlighted_stroke_end in list_highlighted_stroke_end + and highlighted_stroke_end is not None + ): + filtered_dict = { + k: v + for (k, v) in {"round": "round", "": ""}.items() + if highlighted_stroke_end in k + } + if len(filtered_dict) > 0: + self.state["state"]["highlighted_stroke_end"] = filtered_dict[ + highlighted_stroke_end + ] + self.state["state"]["highlighted_stroke_amount"] = highlighted_stroke_amount + self.state["state"]["highlighted_stroke_width"] = highlighted_stroke_width + + list_note_type = ["side-panel", "inline"] + [None] + if note_type not in list_note_type: + raise ValueError(f"`note_type` must be one of: ['side-panel', 'inline']") + elif note_type in list_note_type and note_type is not None: + filtered_dict = { + k: v + for (k, v) in {"side-panel": "side-panel", "inline": "inline"}.items() + if note_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["note_type"] = filtered_dict[note_type] + + list_note_visibility = ["always", "click"] + [None] + if note_visibility not in list_note_visibility: + raise ValueError(f"`note_visibility` must be one of: ['always', 'click']") + elif note_visibility in list_note_visibility and note_visibility is not None: + filtered_dict = { + k: v + for (k, v) in {"always": "always", "click": "click"}.items() + if note_visibility in k + } + if len(filtered_dict) > 0: + self.state["state"]["note_visibility"] = filtered_dict[note_visibility] + self.state["state"]["note_font_size"] = note_font_size + self.state["state"]["side_panel_width"] = side_panel_width + self.state["state"]["note_font_color"] = note_font_color + self.state["state"]["note_background_color"] = note_background_color + + if ( + note_custom_content is not None + and len(note_custom_content) > 1 + and isinstance(note_custom_content, list) + ): + self.state["state"]["note_custom_content"] = " \n ".join( + note_custom_content + ) + else: + self.state["state"]["note_custom_content"] = note_custom_content + + list_note_mobile_mode = ["side-panel", "inline", "overlay"] + [None] + if note_mobile_mode not in list_note_mobile_mode: + raise ValueError( + f"`note_mobile_mode` must be one of: ['side-panel', 'inline', 'overlay']" + ) + elif note_mobile_mode in list_note_mobile_mode and note_mobile_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "side-panel": "side-panel", + "inline": "inline", + "overlay": "overlay", + }.items() + if note_mobile_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["note_mobile_mode"] = filtered_dict[ + note_mobile_mode + ] + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_timeline_details( + self, + widescreen_orientation: str = None, + height_mode: str = None, + facet_aspect: str = None, + facet_aspect_custom: float = None, + facet_aspect_breakpoint: float = None, + facet_aspect_mobile: str = None, + facet_aspect_mobile_custom: float = None, + line_color: str = None, + line_width: float = None, + line_cap: str = None, + events_scale_type: str = None, + background_opacity: float = None, + background_sizing: str = None, + background_zoom: float = None, + background_gradient_size: float = None, + background_gradient_opacity: float = None, + background_gradient_blur: float = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + marker_size: float = None, + marker_background_color: str = None, + marker_background_color_custom: str = None, + marker_border_width: float = None, + marker_border_color: str = None, + marker_border_color_custom: str = None, + connector_size: float = None, + connector_space: float = None, + connector_color: str = None, + connector_opacity: float = None, + content_background_color: str = None, + content_padding: float = None, + content_space_between: float = None, + content_consistent_size: bool = None, + content_border_radius: float = None, + individual_borders: bool = None, + content_border_width: float = None, + content_border_opacity: float = None, + content_border_color: str = None, + content_border_color_custom: str = None, + content_border_top_width: float = None, + content_border_top_opacity: float = None, + content_border_top_color: str = None, + content_border_top_color_custom: str = None, + content_border_right_width: float = None, + content_border_right_opacity: float = None, + content_border_right_color: str = None, + content_border_right_color_custom: str = None, + content_border_bottom_width: float = None, + content_border_bottom_opacity: float = None, + content_border_bottom_color: str = None, + content_border_bottom_color_custom: str = None, + content_border_left_width: float = None, + content_border_left_opacity: float = None, + content_border_left_color: str = None, + content_border_left_color_custom: str = None, + content_title_alignment: str = None, + content_title_styling: bool = None, + content_title_line_height: float = None, + content_title_size: str = None, + content_title_size_custom: float = None, + content_title_weight: str = None, + content_title_color: str = None, + content_title_color_custom: str = None, + content_title_space_above: str = None, + content_title_space_above_custom: float = None, + content_subtitle_alignment: str = None, + content_subtitle_styling: bool = None, + content_subtitle_line_height: float = None, + content_subtitle_size: str = None, + content_subtitle_size_custom: float = None, + content_subtitle_weight: str = None, + content_subtitle_color: str = None, + content_subtitle_color_custom: str = None, + content_subtitle_space_above: str = None, + content_subtitle_space_above_custom: float = None, + content_text_alignment: str = None, + content_text_styling: bool = None, + content_text_line_height: float = None, + content_text_size: str = None, + content_text_size_custom: float = None, + content_text_weight: str = None, + content_text_color: str = None, + content_text_color_custom: str = None, + content_text_space_above: str = None, + content_text_space_above_custom: float = None, + link_weight: str = None, + link_color: str = None, + link_underline: bool = None, + image_location: str = None, + image_opacity: float = None, + image_display: str = None, + image_sizing: str = None, + image_zoom: float = None, + image_content_sizing: str = None, + image_content_zoom: float = None, + image_float_position: str = None, + image_inline_position: str = None, + image_alignment: str = None, + content_banner_depth: str = None, + content_banner_depth_custom: float = None, + image_width: float = None, + image_margin: float = None, + image_aspect: float = None, + navigation_step_type: str = None, + navigation_screen_proportion: float = None, + navigation_event_number: float = None, + navigation_icon_type: str = None, + navigation_icon_size: float = None, + navigation_icon_opacity: float = None, + navigation_icon_custom: str = None, + navigation_icon_color: str = None, + navigation_gradient_color: str = None, + navigation_gradient_width: float = None, + navigation_gradient_opacity: float = None, + chart_x_axis_axis_position: str = None, + chart_x_axis_y_axis_position: str = None, + chart_x_axis_numeric_scale_type: str = None, + chart_x_axis_linear_min: float = None, + chart_x_axis_linear_max: float = None, + chart_x_axis_log_min: float = None, + chart_x_axis_log_max: float = None, + chart_x_axis_datetime_min: str = None, + chart_x_axis_datetime_max: str = None, + chart_x_axis_flip: bool = None, + chart_x_axis_show_scale_settings: bool = None, + chart_x_axis_nice: bool = None, + chart_x_axis_zero_axis: str = None, + chart_x_axis_title_mode: str = None, + chart_x_axis_title: str = None, + chart_x_axis_title_styling: bool = None, + chart_x_axis_title_weight: str = None, + chart_x_axis_title_color: str = None, + chart_x_axis_title_size: float = None, + chart_x_axis_title_padding: float = None, + chart_x_axis_tick_label_position: str = None, + chart_x_axis_tick_label_styling: bool = None, + chart_x_axis_tick_label_size: float = None, + chart_x_axis_tick_label_color: str = None, + chart_x_axis_tick_padding: float = None, + chart_x_axis_tick_label_angle: str = None, + chart_x_axis_tick_label_weight: str = None, + chart_x_axis_tick_label_max_lines: float = None, + chart_x_axis_tick_label_line_height: float = None, + chart_x_axis_tick_label_space_mode: str = None, + chart_x_axis_tick_label_space: float = None, + chart_x_axis_tick_mode: str = None, + chart_x_axis_tick_number: float = None, + chart_x_axis_tick_custom: Union[list, str] = None, + chart_x_axis_line_and_tick_color: str = None, + chart_x_axis_line_and_tick_width: float = None, + chart_x_axis_tick_length: float = None, + chart_x_axis_tick_side: str = None, + chart_x_axis_line_visible: bool = None, + chart_x_axis_edge_padding: float = None, + chart_x_axis_gridlines_visible: bool = None, + chart_x_axis_gridlines_styling: bool = None, + chart_x_axis_gridline_color: str = None, + chart_x_axis_gridline_style: str = None, + chart_x_axis_gridline_width: float = None, + chart_x_axis_gridline_category_dividers: bool = None, + chart_x_axis_gridline_category_dividers_extend: bool = None, + chart_y_axis_axis_visible: bool = None, + chart_y_axis_numeric_scale_type: str = None, + chart_y_axis_linear_min: float = None, + chart_y_axis_linear_max: float = None, + chart_y_axis_log_min: float = None, + chart_y_axis_log_max: float = None, + chart_y_axis_datetime_min: str = None, + chart_y_axis_datetime_max: str = None, + chart_y_axis_flip: bool = None, + chart_y_axis_show_scale_settings: bool = None, + chart_y_axis_nice: bool = None, + chart_y_axis_zero_axis: str = None, + chart_y_axis_title_mode: str = None, + chart_y_axis_title: str = None, + chart_y_axis_title_styling: bool = None, + chart_y_axis_title_position: str = None, + chart_y_axis_title_weight: str = None, + chart_y_axis_title_color: str = None, + chart_y_axis_title_size: float = None, + chart_y_axis_title_padding: float = None, + chart_y_axis_tick_label_position: str = None, + chart_y_axis_tick_label_styling: bool = None, + chart_y_axis_tick_label_size: float = None, + chart_y_axis_tick_label_color: str = None, + chart_y_axis_tick_padding: float = None, + chart_y_axis_tick_label_angle: str = None, + chart_y_axis_tick_label_weight: str = None, + chart_y_axis_tick_label_max_lines: float = None, + chart_y_axis_tick_label_line_height: float = None, + chart_y_axis_tick_label_space_mode: str = None, + chart_y_axis_tick_label_space: float = None, + chart_y_axis_tick_mode: str = None, + chart_y_axis_tick_number: float = None, + chart_y_axis_tick_custom: Union[list, str] = None, + chart_y_axis_line_and_tick_color: str = None, + chart_y_axis_line_and_tick_width: float = None, + chart_y_axis_tick_length: float = None, + chart_y_axis_tick_side: str = None, + chart_y_axis_line_visible: bool = None, + chart_y_axis_edge_padding: float = None, + chart_y_axis_gridlines_visible: bool = None, + chart_y_axis_gridlines_styling: bool = None, + chart_y_axis_gridline_color: str = None, + chart_y_axis_gridline_style: str = None, + chart_y_axis_gridline_width: float = None, + chart_y_axis_gridline_category_dividers: bool = None, + chart_y_axis_gridline_category_dividers_extend: bool = None, + chart_categorical_legend_show_legend: bool = None, + chart_categorical_legend_title_mode: str = None, + chart_categorical_legend_title: str = None, + chart_categorical_legend_swatch_width: float = None, + chart_categorical_legend_swatch_height: float = None, + chart_categorical_legend_swatch_radius: float = None, + chart_categorical_legend_legend_items_padding: float = None, + chart_categorical_legend_swatch_outline: bool = None, + chart_categorical_legend_swatch_outline_color: str = None, + chart_categorical_legend_order_override: Union[list, str] = None, + chart_categorical_legend_icon_height: float = None, + chart_categorical_legend_icon_color: str = None, + chart_categorical_legend_max_width: float = None, + chart_categorical_legend_orientation: str = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: timeline. + + + :param widescreen_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type widescreen_orientation: str, optional + :param height_mode: Height mode. Choices: auto, standard, aspect. Auto: sets the height based on the chart type, data and width. Standard: uses the default Flourish responsive sizing. Aspect ratio: sets the aspect of each plot. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to None. + :type height_mode: str, optional + :param facet_aspect: Desktop aspect. Choices: 0.75, 1, 1.5, custom. Aspect ratio of the visualization in desktop mode. Flourish type hint: string, defaults to None. + :type facet_aspect: str, optional + :param facet_aspect_custom: Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type facet_aspect_custom: float, optional + :param facet_aspect_breakpoint: Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to None. + :type facet_aspect_breakpoint: float, optional + :param facet_aspect_mobile: Mobile aspect. Choices: 0.75, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type facet_aspect_mobile: str, optional + :param facet_aspect_mobile_custom: Custom. 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type facet_aspect_mobile_custom: float, optional + :param line_color: Color. Flourish type hint: color, defaults to None. + :type line_color: str, optional + :param line_width: Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type line_width: float, optional + :param line_cap: Cap. Choices: butt, round, square. The shape used to draw the end points. Flourish type hint: string, defaults to None. + :type line_cap: str, optional + :param events_scale_type: Choices: linear, timescale. Flourish type hint: string, defaults to None. + :type events_scale_type: str, optional + :param background_opacity: Opacity. Flourish type hint: number, defaults to None. + :type background_opacity: float, optional + :param background_sizing: Sizing. Choices: contain, cover, zoom. Flourish type hint: string, defaults to None. + :type background_sizing: str, optional + :param background_zoom: Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to None. + :type background_zoom: float, optional + :param background_gradient_size: Size. Flourish type hint: number, defaults to None. + :type background_gradient_size: float, optional + :param background_gradient_opacity: Opacity. Flourish type hint: number, defaults to None. + :type background_gradient_opacity: float, optional + :param background_gradient_blur: Blur. Flourish type hint: number, defaults to None. + :type background_gradient_blur: float, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param marker_size: Size. Flourish type hint: number, defaults to None. + :type marker_size: float, optional + :param marker_background_color: Color. Choices: data, custom. Flourish type hint: string, defaults to None. + :type marker_background_color: str, optional + :param marker_background_color_custom: Flourish type hint: color, defaults to None. + :type marker_background_color_custom: str, optional + :param marker_border_width: Size. Flourish type hint: number, defaults to None. + :type marker_border_width: float, optional + :param marker_border_color: Color. Choices: data, custom. Flourish type hint: string, defaults to None. + :type marker_border_color: str, optional + :param marker_border_color_custom: Flourish type hint: color, defaults to None. + :type marker_border_color_custom: str, optional + :param connector_size: Size. Flourish type hint: number, defaults to None. + :type connector_size: float, optional + :param connector_space: Space. Sets the area around the markers to keep clear of content containers. Flourish type hint: number, defaults to None. + :type connector_space: float, optional + :param connector_color: Color. Flourish type hint: color, defaults to None. + :type connector_color: str, optional + :param connector_opacity: Opacity. Flourish type hint: number, defaults to None. + :type connector_opacity: float, optional + :param content_background_color: Background. Flourish type hint: color, defaults to None. + :type content_background_color: str, optional + :param content_padding: Padding. Flourish type hint: number, defaults to None. + :type content_padding: float, optional + :param content_space_between: Space between. Defines the minimum amount of space between each content container. Flourish type hint: number, defaults to None. + :type content_space_between: float, optional + :param content_consistent_size: Keep sizes consistent. Flourish type hint: boolean, defaults to None. + :type content_consistent_size: bool, optional + :param content_border_radius: Radius. Flourish type hint: number, defaults to None. + :type content_border_radius: float, optional + :param individual_borders: Style borders individually. Flourish type hint: boolean, defaults to None. + :type individual_borders: bool, optional + :param content_border_width: Width. Flourish type hint: number, defaults to None. + :type content_border_width: float, optional + :param content_border_opacity: Opacity. Flourish type hint: number, defaults to None. + :type content_border_opacity: float, optional + :param content_border_color: Color. Choices: data, custom. Flourish type hint: string, defaults to None. + :type content_border_color: str, optional + :param content_border_color_custom: Flourish type hint: color, defaults to None. + :type content_border_color_custom: str, optional + :param content_border_top_width: Width. Flourish type hint: number, defaults to None. + :type content_border_top_width: float, optional + :param content_border_top_opacity: Opacity. Flourish type hint: number, defaults to None. + :type content_border_top_opacity: float, optional + :param content_border_top_color: Color. Choices: data, custom. Flourish type hint: string, defaults to None. + :type content_border_top_color: str, optional + :param content_border_top_color_custom: Flourish type hint: color, defaults to None. + :type content_border_top_color_custom: str, optional + :param content_border_right_width: Width. Flourish type hint: number, defaults to None. + :type content_border_right_width: float, optional + :param content_border_right_opacity: Opacity. Flourish type hint: number, defaults to None. + :type content_border_right_opacity: float, optional + :param content_border_right_color: Color. Choices: data, custom. Flourish type hint: string, defaults to None. + :type content_border_right_color: str, optional + :param content_border_right_color_custom: Flourish type hint: color, defaults to None. + :type content_border_right_color_custom: str, optional + :param content_border_bottom_width: Width. Flourish type hint: number, defaults to None. + :type content_border_bottom_width: float, optional + :param content_border_bottom_opacity: Opacity. Flourish type hint: number, defaults to None. + :type content_border_bottom_opacity: float, optional + :param content_border_bottom_color: Color. Choices: data, custom. Flourish type hint: string, defaults to None. + :type content_border_bottom_color: str, optional + :param content_border_bottom_color_custom: Flourish type hint: color, defaults to None. + :type content_border_bottom_color_custom: str, optional + :param content_border_left_width: Width. Flourish type hint: number, defaults to None. + :type content_border_left_width: float, optional + :param content_border_left_opacity: Opacity. Flourish type hint: number, defaults to None. + :type content_border_left_opacity: float, optional + :param content_border_left_color: Color. Choices: data, custom. Flourish type hint: string, defaults to None. + :type content_border_left_color: str, optional + :param content_border_left_color_custom: Flourish type hint: color, defaults to None. + :type content_border_left_color_custom: str, optional + :param content_title_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type content_title_alignment: str, optional + :param content_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type content_title_styling: bool, optional + :param content_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type content_title_line_height: float, optional + :param content_title_size: Size. Choices: 1.0, 1.2, custom. Flourish type hint: string, defaults to None. + :type content_title_size: str, optional + :param content_title_size_custom: Custom. Specify a custom responsive font size. Best results will be with values between 0.8 and 3. Flourish type hint: number, defaults to None. + :type content_title_size_custom: float, optional + :param content_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type content_title_weight: str, optional + :param content_title_color: Color. Choices: data, custom. Flourish type hint: string, defaults to None. + :type content_title_color: str, optional + :param content_title_color_custom: Flourish type hint: color, defaults to None. + :type content_title_color_custom: str, optional + :param content_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type content_title_space_above: str, optional + :param content_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type content_title_space_above_custom: float, optional + :param content_subtitle_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type content_subtitle_alignment: str, optional + :param content_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type content_subtitle_styling: bool, optional + :param content_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type content_subtitle_line_height: float, optional + :param content_subtitle_size: Size. Choices: 1.0, 1.2, custom. Flourish type hint: string, defaults to None. + :type content_subtitle_size: str, optional + :param content_subtitle_size_custom: Custom. Specify a custom responsive font size. Best results will be with values between 0.8 and 3. Flourish type hint: number, defaults to None. + :type content_subtitle_size_custom: float, optional + :param content_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type content_subtitle_weight: str, optional + :param content_subtitle_color: Color. Choices: data, custom. Flourish type hint: string, defaults to None. + :type content_subtitle_color: str, optional + :param content_subtitle_color_custom: Flourish type hint: color, defaults to None. + :type content_subtitle_color_custom: str, optional + :param content_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type content_subtitle_space_above: str, optional + :param content_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type content_subtitle_space_above_custom: float, optional + :param content_text_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type content_text_alignment: str, optional + :param content_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type content_text_styling: bool, optional + :param content_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type content_text_line_height: float, optional + :param content_text_size: Size. Choices: 1.0, 1.2, custom. Flourish type hint: string, defaults to None. + :type content_text_size: str, optional + :param content_text_size_custom: Custom. Specify a custom responsive font size. Best results will be with values between 0.8 and 3. Flourish type hint: number, defaults to None. + :type content_text_size_custom: float, optional + :param content_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type content_text_weight: str, optional + :param content_text_color: Color. Choices: data, custom. Flourish type hint: string, defaults to None. + :type content_text_color: str, optional + :param content_text_color_custom: Flourish type hint: color, defaults to None. + :type content_text_color_custom: str, optional + :param content_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type content_text_space_above: str, optional + :param content_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type content_text_space_above_custom: float, optional + :param link_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type link_weight: str, optional + :param link_color: Color. Flourish type hint: color, defaults to None. + :type link_color: str, optional + :param link_underline: Underline. Flourish type hint: boolean, defaults to None. + :type link_underline: bool, optional + :param image_location: Location. Choices: none, marker, content. Flourish type hint: string, defaults to None. + :type image_location: str, optional + :param image_opacity: Opacity. Flourish type hint: number, defaults to None. + :type image_opacity: float, optional + :param image_display: Content display. Choices: float, inline, banner, background. Flourish type hint: string, defaults to None. + :type image_display: str, optional + :param image_sizing: Sizing. Choices: contain, cover, zoom. Flourish type hint: string, defaults to None. + :type image_sizing: str, optional + :param image_zoom: Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to None. + :type image_zoom: float, optional + :param image_content_sizing: Sizing. Choices: contain, cover, zoom. Flourish type hint: string, defaults to None. + :type image_content_sizing: str, optional + :param image_content_zoom: Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to None. + :type image_content_zoom: float, optional + :param image_float_position: Position. Choices: 1, 2. Flourish type hint: string, defaults to None. + :type image_float_position: str, optional + :param image_inline_position: Position. Choices: 1, 2, 3. Flourish type hint: string, defaults to None. + :type image_inline_position: str, optional + :param image_alignment: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type image_alignment: str, optional + :param content_banner_depth: Banner depth. Choices: 2, 4, 6, custom. Flourish type hint: string, defaults to None. + :type content_banner_depth: str, optional + :param content_banner_depth_custom: Custom. Flourish type hint: number, defaults to None. + :type content_banner_depth_custom: float, optional + :param image_width: Width. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type image_width: float, optional + :param image_margin: Margin. Flourish type hint: number, defaults to None. + :type image_margin: float, optional + :param image_aspect: Aspect ratio. As a multiplier of the images width. For example: a value of 2, means the image height is 2 times the image width. Flourish type hint: number, defaults to None. + :type image_aspect: float, optional + :param navigation_step_type: Step by. Choices: screen, event. Determines by which measure the timeline is approximately moved each time the navigation buttons are clicked. Flourish type hint: string, defaults to None. + :type navigation_step_type: str, optional + :param navigation_screen_proportion: Proportion. Flourish type hint: number, defaults to None. + :type navigation_screen_proportion: float, optional + :param navigation_event_number: Number. Flourish type hint: number, defaults to None. + :type navigation_event_number: float, optional + :param navigation_icon_type: Icon. Choices: default, custom. Flourish type hint: string, defaults to None. + :type navigation_icon_type: str, optional + :param navigation_icon_size: Size. Flourish type hint: number, defaults to None. + :type navigation_icon_size: float, optional + :param navigation_icon_opacity: Opacity. Flourish type hint: number, defaults to None. + :type navigation_icon_opacity: float, optional + :param navigation_icon_custom: Custom icon. Flourish type hint: url, defaults to None. + :type navigation_icon_custom: str, optional + :param navigation_icon_color: Color. Flourish type hint: color, defaults to None. + :type navigation_icon_color: str, optional + :param navigation_gradient_color: Color. If undefined the color will default to the background of the visualization. Flourish type hint: color, defaults to None. + :type navigation_gradient_color: str, optional + :param navigation_gradient_width: Width. Flourish type hint: number, defaults to None. + :type navigation_gradient_width: float, optional + :param navigation_gradient_opacity: Opacity. Flourish type hint: number, defaults to None. + :type navigation_gradient_opacity: float, optional + :param chart_x_axis_axis_position: Position. Choices: bottom, top, hidden. Flourish type hint: string, defaults to None. + :type chart_x_axis_axis_position: str, optional + :param chart_x_axis_y_axis_position: Y value. Vertical position of the X axis on the Y scale. Flourish type hint: string, defaults to None. + :type chart_x_axis_y_axis_position: str, optional + :param chart_x_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_x_axis_numeric_scale_type: str, optional + :param chart_x_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_min: float, optional + :param chart_x_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_linear_max: float, optional + :param chart_x_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_min: float, optional + :param chart_x_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_x_axis_log_max: float, optional + :param chart_x_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_min: str, optional + :param chart_x_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_x_axis_datetime_max: str, optional + :param chart_x_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_flip: bool, optional + :param chart_x_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_show_scale_settings: bool, optional + :param chart_x_axis_nice: Round min/max. Choices: True, False. Enabling this option rounds the X axis start and end values to tidy numbers, such as 0, 50, 100 or whole years. Specified min and max values will override this feature. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_nice: bool, optional + :param chart_x_axis_zero_axis: Include zero. Choices: auto, on, off. Enable to extend the axis to include zero, even when data is all positive or all negative. This is ignored if you set specific min and max scale values. Flourish type hint: string, defaults to None. + :type chart_x_axis_zero_axis: str, optional + :param chart_x_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_mode: str, optional + :param chart_x_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_x_axis_title: str, optional + :param chart_x_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_title_styling: bool, optional + :param chart_x_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_title_weight: str, optional + :param chart_x_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_title_color: str, optional + :param chart_x_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_size: float, optional + :param chart_x_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_title_padding: float, optional + :param chart_x_axis_tick_label_position: Position. Choices: default, left, right. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_position: str, optional + :param chart_x_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_tick_label_styling: bool, optional + :param chart_x_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_size: float, optional + :param chart_x_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_tick_label_color: str, optional + :param chart_x_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_padding: float, optional + :param chart_x_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_angle: str, optional + :param chart_x_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_weight: str, optional + :param chart_x_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_max_lines: float, optional + :param chart_x_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_line_height: float, optional + :param chart_x_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_label_space_mode: str, optional + :param chart_x_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_label_space: float, optional + :param chart_x_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_mode: str, optional + :param chart_x_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_number: float, optional + :param chart_x_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_x_axis_tick_custom: Union[list, str], optional + :param chart_x_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_x_axis_line_and_tick_color: str, optional + :param chart_x_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_x_axis_line_and_tick_width: float, optional + :param chart_x_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_x_axis_tick_length: float, optional + :param chart_x_axis_tick_side: Tick side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_x_axis_tick_side: str, optional + :param chart_x_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_line_visible: bool, optional + :param chart_x_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_x_axis_edge_padding: float, optional + :param chart_x_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_visible: bool, optional + :param chart_x_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridlines_styling: bool, optional + :param chart_x_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_x_axis_gridline_color: str, optional + :param chart_x_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_x_axis_gridline_style: str, optional + :param chart_x_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_x_axis_gridline_width: float, optional + :param chart_x_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers: bool, optional + :param chart_x_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_x_axis_gridline_category_dividers_extend: bool, optional + :param chart_y_axis_axis_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_axis_visible: bool, optional + :param chart_y_axis_numeric_scale_type: Type. Choices: linear, log. Flourish type hint: string, defaults to None. + :type chart_y_axis_numeric_scale_type: str, optional + :param chart_y_axis_linear_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_min: float, optional + :param chart_y_axis_linear_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_linear_max: float, optional + :param chart_y_axis_log_min: Min. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_min: float, optional + :param chart_y_axis_log_max: Max. Flourish type hint: number, defaults to None. + :type chart_y_axis_log_max: float, optional + :param chart_y_axis_datetime_min: Min (date). Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_min: str, optional + :param chart_y_axis_datetime_max: Max (date). Flourish type hint: string, defaults to None. + :type chart_y_axis_datetime_max: str, optional + :param chart_y_axis_flip: Flip axis. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_flip: bool, optional + :param chart_y_axis_show_scale_settings: Configure default min/max. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_show_scale_settings: bool, optional + :param chart_y_axis_nice: Round min/max. Choices: True, False. When enabled, scales automatically extend to "nice" rounded start/end values, such as hundreds or whole years. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_nice: bool, optional + :param chart_y_axis_zero_axis: Include zero. Choices: auto, on, off. Whether to extend the axis to include zero if the data values are all positive or all negative. Flourish type hint: string, defaults to None. + :type chart_y_axis_zero_axis: str, optional + :param chart_y_axis_title_mode: Type. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_mode: str, optional + :param chart_y_axis_title: Text. Flourish type hint: string, defaults to None. + :type chart_y_axis_title: str, optional + :param chart_y_axis_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_title_styling: bool, optional + :param chart_y_axis_title_position: Position. Choices: side, end. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_position: str, optional + :param chart_y_axis_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_title_weight: str, optional + :param chart_y_axis_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_title_color: str, optional + :param chart_y_axis_title_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_size: float, optional + :param chart_y_axis_title_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_title_padding: float, optional + :param chart_y_axis_tick_label_position: Position. Choices: default, above, below. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_position: str, optional + :param chart_y_axis_tick_label_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_tick_label_styling: bool, optional + :param chart_y_axis_tick_label_size: Size. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_size: float, optional + :param chart_y_axis_tick_label_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_tick_label_color: str, optional + :param chart_y_axis_tick_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_padding: float, optional + :param chart_y_axis_tick_label_angle: Angle. Choices: 0, 30, 45, 60, 90. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_angle: str, optional + :param chart_y_axis_tick_label_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_weight: str, optional + :param chart_y_axis_tick_label_max_lines: Max lines. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_max_lines: float, optional + :param chart_y_axis_tick_label_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_line_height: float, optional + :param chart_y_axis_tick_label_space_mode: Space mode. Choices: auto, max, fixed. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_label_space_mode: str, optional + :param chart_y_axis_tick_label_space: Space. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_label_space: float, optional + :param chart_y_axis_tick_mode: Mode. Choices: auto, number, custom. Sets the method for selecting tick values on the axis: Auto automatically selects the ticks Number allows you to choose the number of ticks to display. Custom lets you select specific ticks to show. Note: If the axis is categorical, Number mode is ignored. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_mode: str, optional + :param chart_y_axis_tick_number: Number. Approximate number of ticks or gridlines. The actual number will depend on the range of values, chart size, etc. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_number: float, optional + :param chart_y_axis_tick_custom: One tick label per line. Specify the ticks to show, one per line. For dates, use the input format as specified in the datasheet. You can also use `{{FIRST}}` and `{{LAST}}` to add ticks at the minimum and maximum of the axis. For example: `{{FIRST}}` 25000 50000 75000 `{{LAST}}`. Flourish type hint: text, defaults to None. + :type chart_y_axis_tick_custom: Union[list, str], optional + :param chart_y_axis_line_and_tick_color: Line color. Flourish type hint: color, defaults to None. + :type chart_y_axis_line_and_tick_color: str, optional + :param chart_y_axis_line_and_tick_width: Line width. Flourish type hint: number, defaults to None. + :type chart_y_axis_line_and_tick_width: float, optional + :param chart_y_axis_tick_length: Tick length. Flourish type hint: number, defaults to None. + :type chart_y_axis_tick_length: float, optional + :param chart_y_axis_tick_side: Side. Choices: out, in. Flourish type hint: string, defaults to None. + :type chart_y_axis_tick_side: str, optional + :param chart_y_axis_line_visible: Axis line. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_line_visible: bool, optional + :param chart_y_axis_edge_padding: Edge padding (%). Space between start/end of axis line and first/last category tick as a percentage of the spacing between ticks. Flourish type hint: number, defaults to None. + :type chart_y_axis_edge_padding: float, optional + :param chart_y_axis_gridlines_visible: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_visible: bool, optional + :param chart_y_axis_gridlines_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridlines_styling: bool, optional + :param chart_y_axis_gridline_color: Color. Flourish type hint: color, defaults to None. + :type chart_y_axis_gridline_color: str, optional + :param chart_y_axis_gridline_style: Style. Choices: solid, dash, dot, dot_dash. Flourish type hint: string, defaults to None. + :type chart_y_axis_gridline_style: str, optional + :param chart_y_axis_gridline_width: Width. Flourish type hint: number, defaults to None. + :type chart_y_axis_gridline_width: float, optional + :param chart_y_axis_gridline_category_dividers: Put lines between categories. On a categorical axis, this option disables the gridline on each tick and instead adds rules between each category to give a table-like design. Ignored for date and numeric axes. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers: bool, optional + :param chart_y_axis_gridline_category_dividers_extend: Extend. Extends the dividers into the axis margins. Flourish type hint: boolean, defaults to None. + :type chart_y_axis_gridline_category_dividers_extend: bool, optional + :param chart_categorical_legend_show_legend: Legend mode. Choices: True, False. A legend will not show with a single entry. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_show_legend: bool, optional + :param chart_categorical_legend_title_mode: Title mode. Choices: auto, custom. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title_mode: str, optional + :param chart_categorical_legend_title: Title. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_title: str, optional + :param chart_categorical_legend_swatch_width: Width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_width: float, optional + :param chart_categorical_legend_swatch_height: Height. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_height: float, optional + :param chart_categorical_legend_swatch_radius: Roundness. The radius of the corners of the swatch (in pixels). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_swatch_radius: float, optional + :param chart_categorical_legend_legend_items_padding: Padding. Padding between legend items ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_legend_items_padding: float, optional + :param chart_categorical_legend_swatch_outline: Outline. An optional outline for the swatch in the legend. Flourish type hint: boolean, defaults to None. + :type chart_categorical_legend_swatch_outline: bool, optional + :param chart_categorical_legend_swatch_outline_color: Color. Flourish type hint: color, defaults to None. + :type chart_categorical_legend_swatch_outline_color: str, optional + :param chart_categorical_legend_order_override: Custom order override. Manually specify the order of legend entries (one entry per line). Flourish type hint: text, defaults to None. + :type chart_categorical_legend_order_override: Union[list, str], optional + :param chart_categorical_legend_icon_height: Height. Height of icon ( in rems ). Flourish type hint: number, defaults to None. + :type chart_categorical_legend_icon_height: float, optional + :param chart_categorical_legend_icon_color: Color. Fallback color (icon color if not determined by template). Flourish type hint: color, defaults to None. + :type chart_categorical_legend_icon_color: str, optional + :param chart_categorical_legend_max_width: Max width. Flourish type hint: number, defaults to None. + :type chart_categorical_legend_max_width: float, optional + :param chart_categorical_legend_orientation: Orientation. Choices: horizontal, vertical. Flourish type hint: string, defaults to None. + :type chart_categorical_legend_orientation: str, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "x": {}, + "y": {}, + "legend_categorical": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_widescreen_orientation = ["horizontal", "vertical"] + [None] + if widescreen_orientation not in list_widescreen_orientation: + raise ValueError( + f"`widescreen_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + widescreen_orientation in list_widescreen_orientation + and widescreen_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if widescreen_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["widescreen_orientation"] = filtered_dict[ + widescreen_orientation + ] + + list_height_mode = ["auto", "standard", "aspect"] + [None] + if height_mode not in list_height_mode: + raise ValueError( + f"`height_mode` must be one of: ['auto', 'standard', 'aspect']" + ) + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "standard": "standard", + "aspect": "aspect", + }.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + + list_facet_aspect = ["0.75", "1", "1.5", "custom"] + [None] + if facet_aspect not in list_facet_aspect: + raise ValueError( + f"`facet_aspect` must be one of: ['0.75', '1', '1.5', 'custom']" + ) + elif facet_aspect in list_facet_aspect and facet_aspect is not None: + filtered_dict = { + k: v + for (k, v) in { + "0.75": "0.75", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if facet_aspect in k + } + if len(filtered_dict) > 0: + self.state["state"]["facet_aspect"] = filtered_dict[facet_aspect] + self.state["state"]["facet_aspect_custom"] = facet_aspect_custom + self.state["state"]["facet_aspect_breakpoint"] = facet_aspect_breakpoint + + list_facet_aspect_mobile = ["0.75", "1", "1.5", "custom"] + [None] + if facet_aspect_mobile not in list_facet_aspect_mobile: + raise ValueError( + f"`facet_aspect_mobile` must be one of: ['0.75', '1', '1.5', 'custom']" + ) + elif ( + facet_aspect_mobile in list_facet_aspect_mobile + and facet_aspect_mobile is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.75": "0.75", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if facet_aspect_mobile in k + } + if len(filtered_dict) > 0: + self.state["state"]["facet_aspect_mobile"] = filtered_dict[ + facet_aspect_mobile + ] + self.state["state"]["facet_aspect_mobile_custom"] = facet_aspect_mobile_custom + self.state["state"]["line_color"] = line_color + self.state["state"]["line_width"] = line_width + + list_line_cap = ["butt", "round", "square"] + [None] + if line_cap not in list_line_cap: + raise ValueError(f"`line_cap` must be one of: ['butt', 'round', 'square']") + elif line_cap in list_line_cap and line_cap is not None: + filtered_dict = { + k: v + for (k, v) in { + "butt": "butt", + "round": "round", + "square": "square", + }.items() + if line_cap in k + } + if len(filtered_dict) > 0: + self.state["state"]["line_cap"] = filtered_dict[line_cap] + + list_events_scale_type = ["linear", "timescale"] + [None] + if events_scale_type not in list_events_scale_type: + raise ValueError( + f"`events_scale_type` must be one of: ['linear', 'timescale']" + ) + elif ( + events_scale_type in list_events_scale_type + and events_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "timescale": "timescale"}.items() + if events_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["events_scale_type"] = filtered_dict[ + events_scale_type + ] + self.state["state"]["background_opacity"] = background_opacity + + list_background_sizing = ["contain", "cover", "zoom"] + [None] + if background_sizing not in list_background_sizing: + raise ValueError( + f"`background_sizing` must be one of: ['contain', 'cover', 'zoom']" + ) + elif ( + background_sizing in list_background_sizing + and background_sizing is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "contain": "contain", + "cover": "cover", + "zoom": "zoom", + }.items() + if background_sizing in k + } + if len(filtered_dict) > 0: + self.state["state"]["background_sizing"] = filtered_dict[ + background_sizing + ] + self.state["state"]["background_zoom"] = background_zoom + self.state["state"]["background_gradient_size"] = background_gradient_size + self.state["state"]["background_gradient_opacity"] = background_gradient_opacity + self.state["state"]["background_gradient_blur"] = background_gradient_blur + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + self.state["state"]["marker_size"] = marker_size + + list_marker_background_color = ["data", "custom"] + [None] + if marker_background_color not in list_marker_background_color: + raise ValueError( + f"`marker_background_color` must be one of: ['data', 'custom']" + ) + elif ( + marker_background_color in list_marker_background_color + and marker_background_color is not None + ): + filtered_dict = { + k: v + for (k, v) in {"data": "data", "custom": "custom"}.items() + if marker_background_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["marker_background_color"] = filtered_dict[ + marker_background_color + ] + self.state["state"][ + "marker_background_color_custom" + ] = marker_background_color_custom + self.state["state"]["marker_border_width"] = marker_border_width + + list_marker_border_color = ["data", "custom"] + [None] + if marker_border_color not in list_marker_border_color: + raise ValueError( + f"`marker_border_color` must be one of: ['data', 'custom']" + ) + elif ( + marker_border_color in list_marker_border_color + and marker_border_color is not None + ): + filtered_dict = { + k: v + for (k, v) in {"data": "data", "custom": "custom"}.items() + if marker_border_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["marker_border_color"] = filtered_dict[ + marker_border_color + ] + self.state["state"]["marker_border_color_custom"] = marker_border_color_custom + self.state["state"]["connector_size"] = connector_size + self.state["state"]["connector_space"] = connector_space + self.state["state"]["connector_color"] = connector_color + self.state["state"]["connector_opacity"] = connector_opacity + self.state["state"]["content_background_color"] = content_background_color + self.state["state"]["content_padding"] = content_padding + self.state["state"]["content_space_between"] = content_space_between + self.state["state"]["content_consistent_size"] = content_consistent_size + self.state["state"]["content_border_radius"] = content_border_radius + self.state["state"]["individual_borders"] = individual_borders + self.state["state"]["content_border_width"] = content_border_width + self.state["state"]["content_border_opacity"] = content_border_opacity + + list_content_border_color = ["data", "custom"] + [None] + if content_border_color not in list_content_border_color: + raise ValueError( + f"`content_border_color` must be one of: ['data', 'custom']" + ) + elif ( + content_border_color in list_content_border_color + and content_border_color is not None + ): + filtered_dict = { + k: v + for (k, v) in {"data": "data", "custom": "custom"}.items() + if content_border_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_border_color"] = filtered_dict[ + content_border_color + ] + self.state["state"]["content_border_color_custom"] = content_border_color_custom + self.state["state"]["content_border_top_width"] = content_border_top_width + self.state["state"]["content_border_top_opacity"] = content_border_top_opacity + + list_content_border_top_color = ["data", "custom"] + [None] + if content_border_top_color not in list_content_border_top_color: + raise ValueError( + f"`content_border_top_color` must be one of: ['data', 'custom']" + ) + elif ( + content_border_top_color in list_content_border_top_color + and content_border_top_color is not None + ): + filtered_dict = { + k: v + for (k, v) in {"data": "data", "custom": "custom"}.items() + if content_border_top_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_border_top_color"] = filtered_dict[ + content_border_top_color + ] + self.state["state"][ + "content_border_top_color_custom" + ] = content_border_top_color_custom + self.state["state"]["content_border_right_width"] = content_border_right_width + self.state["state"][ + "content_border_right_opacity" + ] = content_border_right_opacity + + list_content_border_right_color = ["data", "custom"] + [None] + if content_border_right_color not in list_content_border_right_color: + raise ValueError( + f"`content_border_right_color` must be one of: ['data', 'custom']" + ) + elif ( + content_border_right_color in list_content_border_right_color + and content_border_right_color is not None + ): + filtered_dict = { + k: v + for (k, v) in {"data": "data", "custom": "custom"}.items() + if content_border_right_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_border_right_color"] = filtered_dict[ + content_border_right_color + ] + self.state["state"][ + "content_border_right_color_custom" + ] = content_border_right_color_custom + self.state["state"]["content_border_bottom_width"] = content_border_bottom_width + self.state["state"][ + "content_border_bottom_opacity" + ] = content_border_bottom_opacity + + list_content_border_bottom_color = ["data", "custom"] + [None] + if content_border_bottom_color not in list_content_border_bottom_color: + raise ValueError( + f"`content_border_bottom_color` must be one of: ['data', 'custom']" + ) + elif ( + content_border_bottom_color in list_content_border_bottom_color + and content_border_bottom_color is not None + ): + filtered_dict = { + k: v + for (k, v) in {"data": "data", "custom": "custom"}.items() + if content_border_bottom_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_border_bottom_color"] = filtered_dict[ + content_border_bottom_color + ] + self.state["state"][ + "content_border_bottom_color_custom" + ] = content_border_bottom_color_custom + self.state["state"]["content_border_left_width"] = content_border_left_width + self.state["state"]["content_border_left_opacity"] = content_border_left_opacity + + list_content_border_left_color = ["data", "custom"] + [None] + if content_border_left_color not in list_content_border_left_color: + raise ValueError( + f"`content_border_left_color` must be one of: ['data', 'custom']" + ) + elif ( + content_border_left_color in list_content_border_left_color + and content_border_left_color is not None + ): + filtered_dict = { + k: v + for (k, v) in {"data": "data", "custom": "custom"}.items() + if content_border_left_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_border_left_color"] = filtered_dict[ + content_border_left_color + ] + self.state["state"][ + "content_border_left_color_custom" + ] = content_border_left_color_custom + + list_content_title_alignment = ["start", "center", "end"] + [None] + if content_title_alignment not in list_content_title_alignment: + raise ValueError( + f"`content_title_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + content_title_alignment in list_content_title_alignment + and content_title_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if content_title_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_title_alignment"] = filtered_dict[ + content_title_alignment + ] + self.state["state"]["content_title_styling"] = content_title_styling + self.state["state"]["content_title_line_height"] = content_title_line_height + + list_content_title_size = ["1.0", "1.2", "custom"] + [None] + if content_title_size not in list_content_title_size: + raise ValueError( + f"`content_title_size` must be one of: ['1.0', '1.2', 'custom']" + ) + elif ( + content_title_size in list_content_title_size + and content_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in {"1.0": "1.0", "1.2": "1.2", "custom": "custom"}.items() + if content_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_title_size"] = filtered_dict[ + content_title_size + ] + self.state["state"]["content_title_size_custom"] = content_title_size_custom + + list_content_title_weight = ["bold", "normal"] + [None] + if content_title_weight not in list_content_title_weight: + raise ValueError( + f"`content_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + content_title_weight in list_content_title_weight + and content_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if content_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_title_weight"] = filtered_dict[ + content_title_weight + ] + + list_content_title_color = ["data", "custom"] + [None] + if content_title_color not in list_content_title_color: + raise ValueError( + f"`content_title_color` must be one of: ['data', 'custom']" + ) + elif ( + content_title_color in list_content_title_color + and content_title_color is not None + ): + filtered_dict = { + k: v + for (k, v) in {"data": "data", "custom": "custom"}.items() + if content_title_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_title_color"] = filtered_dict[ + content_title_color + ] + self.state["state"]["content_title_color_custom"] = content_title_color_custom + + list_content_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if content_title_space_above not in list_content_title_space_above: + raise ValueError( + f"`content_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + content_title_space_above in list_content_title_space_above + and content_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if content_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_title_space_above"] = filtered_dict[ + content_title_space_above + ] + self.state["state"][ + "content_title_space_above_custom" + ] = content_title_space_above_custom + + list_content_subtitle_alignment = ["start", "center", "end"] + [None] + if content_subtitle_alignment not in list_content_subtitle_alignment: + raise ValueError( + f"`content_subtitle_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + content_subtitle_alignment in list_content_subtitle_alignment + and content_subtitle_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if content_subtitle_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_subtitle_alignment"] = filtered_dict[ + content_subtitle_alignment + ] + self.state["state"]["content_subtitle_styling"] = content_subtitle_styling + self.state["state"][ + "content_subtitle_line_height" + ] = content_subtitle_line_height + + list_content_subtitle_size = ["1.0", "1.2", "custom"] + [None] + if content_subtitle_size not in list_content_subtitle_size: + raise ValueError( + f"`content_subtitle_size` must be one of: ['1.0', '1.2', 'custom']" + ) + elif ( + content_subtitle_size in list_content_subtitle_size + and content_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in {"1.0": "1.0", "1.2": "1.2", "custom": "custom"}.items() + if content_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_subtitle_size"] = filtered_dict[ + content_subtitle_size + ] + self.state["state"][ + "content_subtitle_size_custom" + ] = content_subtitle_size_custom + + list_content_subtitle_weight = ["bold", "normal"] + [None] + if content_subtitle_weight not in list_content_subtitle_weight: + raise ValueError( + f"`content_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + content_subtitle_weight in list_content_subtitle_weight + and content_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if content_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_subtitle_weight"] = filtered_dict[ + content_subtitle_weight + ] + + list_content_subtitle_color = ["data", "custom"] + [None] + if content_subtitle_color not in list_content_subtitle_color: + raise ValueError( + f"`content_subtitle_color` must be one of: ['data', 'custom']" + ) + elif ( + content_subtitle_color in list_content_subtitle_color + and content_subtitle_color is not None + ): + filtered_dict = { + k: v + for (k, v) in {"data": "data", "custom": "custom"}.items() + if content_subtitle_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_subtitle_color"] = filtered_dict[ + content_subtitle_color + ] + self.state["state"][ + "content_subtitle_color_custom" + ] = content_subtitle_color_custom + + list_content_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if content_subtitle_space_above not in list_content_subtitle_space_above: + raise ValueError( + f"`content_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + content_subtitle_space_above in list_content_subtitle_space_above + and content_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if content_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_subtitle_space_above"] = filtered_dict[ + content_subtitle_space_above + ] + self.state["state"][ + "content_subtitle_space_above_custom" + ] = content_subtitle_space_above_custom + + list_content_text_alignment = ["start", "center", "end"] + [None] + if content_text_alignment not in list_content_text_alignment: + raise ValueError( + f"`content_text_alignment` must be one of: ['start', 'center', 'end']" + ) + elif ( + content_text_alignment in list_content_text_alignment + and content_text_alignment is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if content_text_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_text_alignment"] = filtered_dict[ + content_text_alignment + ] + self.state["state"]["content_text_styling"] = content_text_styling + self.state["state"]["content_text_line_height"] = content_text_line_height + + list_content_text_size = ["1.0", "1.2", "custom"] + [None] + if content_text_size not in list_content_text_size: + raise ValueError( + f"`content_text_size` must be one of: ['1.0', '1.2', 'custom']" + ) + elif ( + content_text_size in list_content_text_size + and content_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in {"1.0": "1.0", "1.2": "1.2", "custom": "custom"}.items() + if content_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_text_size"] = filtered_dict[ + content_text_size + ] + self.state["state"]["content_text_size_custom"] = content_text_size_custom + + list_content_text_weight = ["bold", "normal"] + [None] + if content_text_weight not in list_content_text_weight: + raise ValueError( + f"`content_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + content_text_weight in list_content_text_weight + and content_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if content_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_text_weight"] = filtered_dict[ + content_text_weight + ] + + list_content_text_color = ["data", "custom"] + [None] + if content_text_color not in list_content_text_color: + raise ValueError(f"`content_text_color` must be one of: ['data', 'custom']") + elif ( + content_text_color in list_content_text_color + and content_text_color is not None + ): + filtered_dict = { + k: v + for (k, v) in {"data": "data", "custom": "custom"}.items() + if content_text_color in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_text_color"] = filtered_dict[ + content_text_color + ] + self.state["state"]["content_text_color_custom"] = content_text_color_custom + + list_content_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if content_text_space_above not in list_content_text_space_above: + raise ValueError( + f"`content_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + content_text_space_above in list_content_text_space_above + and content_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if content_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_text_space_above"] = filtered_dict[ + content_text_space_above + ] + self.state["state"][ + "content_text_space_above_custom" + ] = content_text_space_above_custom + + list_link_weight = ["bold", "normal"] + [None] + if link_weight not in list_link_weight: + raise ValueError(f"`link_weight` must be one of: ['bold', 'normal']") + elif link_weight in list_link_weight and link_weight is not None: + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if link_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["link_weight"] = filtered_dict[link_weight] + self.state["state"]["link_color"] = link_color + self.state["state"]["link_underline"] = link_underline + + list_image_location = ["none", "marker", "content"] + [None] + if image_location not in list_image_location: + raise ValueError( + f"`image_location` must be one of: ['none', 'marker', 'content']" + ) + elif image_location in list_image_location and image_location is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "marker": "marker", + "content": "content", + }.items() + if image_location in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_location"] = filtered_dict[image_location] + self.state["state"]["image_opacity"] = image_opacity + + list_image_display = ["float", "inline", "banner", "background"] + [None] + if image_display not in list_image_display: + raise ValueError( + f"`image_display` must be one of: ['float', 'inline', 'banner', 'background']" + ) + elif image_display in list_image_display and image_display is not None: + filtered_dict = { + k: v + for (k, v) in { + "float": "float", + "inline": "inline", + "banner": "banner", + "background": "background", + }.items() + if image_display in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_display"] = filtered_dict[image_display] + + list_image_sizing = ["contain", "cover", "zoom"] + [None] + if image_sizing not in list_image_sizing: + raise ValueError( + f"`image_sizing` must be one of: ['contain', 'cover', 'zoom']" + ) + elif image_sizing in list_image_sizing and image_sizing is not None: + filtered_dict = { + k: v + for (k, v) in { + "contain": "contain", + "cover": "cover", + "zoom": "zoom", + }.items() + if image_sizing in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_sizing"] = filtered_dict[image_sizing] + self.state["state"]["image_zoom"] = image_zoom + + list_image_content_sizing = ["contain", "cover", "zoom"] + [None] + if image_content_sizing not in list_image_content_sizing: + raise ValueError( + f"`image_content_sizing` must be one of: ['contain', 'cover', 'zoom']" + ) + elif ( + image_content_sizing in list_image_content_sizing + and image_content_sizing is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "contain": "contain", + "cover": "cover", + "zoom": "zoom", + }.items() + if image_content_sizing in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_content_sizing"] = filtered_dict[ + image_content_sizing + ] + self.state["state"]["image_content_zoom"] = image_content_zoom + + list_image_float_position = ["1", "2"] + [None] + if image_float_position not in list_image_float_position: + raise ValueError(f"`image_float_position` must be one of: ['1', '2']") + elif ( + image_float_position in list_image_float_position + and image_float_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"1": "1", "2": "2"}.items() + if image_float_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_float_position"] = filtered_dict[ + image_float_position + ] + + list_image_inline_position = ["1", "2", "3"] + [None] + if image_inline_position not in list_image_inline_position: + raise ValueError(f"`image_inline_position` must be one of: ['1', '2', '3']") + elif ( + image_inline_position in list_image_inline_position + and image_inline_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"1": "1", "2": "2", "3": "3"}.items() + if image_inline_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_inline_position"] = filtered_dict[ + image_inline_position + ] + + list_image_alignment = ["start", "center", "end"] + [None] + if image_alignment not in list_image_alignment: + raise ValueError( + f"`image_alignment` must be one of: ['start', 'center', 'end']" + ) + elif image_alignment in list_image_alignment and image_alignment is not None: + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if image_alignment in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_alignment"] = filtered_dict[image_alignment] + + list_content_banner_depth = ["2", "4", "6", "custom"] + [None] + if content_banner_depth not in list_content_banner_depth: + raise ValueError( + f"`content_banner_depth` must be one of: ['2', '4', '6', 'custom']" + ) + elif ( + content_banner_depth in list_content_banner_depth + and content_banner_depth is not None + ): + filtered_dict = { + k: v + for (k, v) in {"2": "2", "4": "4", "6": "6", "custom": "custom"}.items() + if content_banner_depth in k + } + if len(filtered_dict) > 0: + self.state["state"]["content_banner_depth"] = filtered_dict[ + content_banner_depth + ] + self.state["state"]["content_banner_depth_custom"] = content_banner_depth_custom + self.state["state"]["image_width"] = image_width + self.state["state"]["image_margin"] = image_margin + self.state["state"]["image_aspect"] = image_aspect + + list_navigation_step_type = ["screen", "event"] + [None] + if navigation_step_type not in list_navigation_step_type: + raise ValueError( + f"`navigation_step_type` must be one of: ['screen', 'event']" + ) + elif ( + navigation_step_type in list_navigation_step_type + and navigation_step_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"screen": "screen", "event": "event"}.items() + if navigation_step_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["navigation_step_type"] = filtered_dict[ + navigation_step_type + ] + self.state["state"][ + "navigation_screen_proportion" + ] = navigation_screen_proportion + self.state["state"]["navigation_event_number"] = navigation_event_number + + list_navigation_icon_type = ["default", "custom"] + [None] + if navigation_icon_type not in list_navigation_icon_type: + raise ValueError( + f"`navigation_icon_type` must be one of: ['default', 'custom']" + ) + elif ( + navigation_icon_type in list_navigation_icon_type + and navigation_icon_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"default": "default", "custom": "custom"}.items() + if navigation_icon_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["navigation_icon_type"] = filtered_dict[ + navigation_icon_type + ] + self.state["state"]["navigation_icon_size"] = navigation_icon_size + self.state["state"]["navigation_icon_opacity"] = navigation_icon_opacity + self.state["state"]["navigation_icon_custom"] = navigation_icon_custom + self.state["state"]["navigation_icon_color"] = navigation_icon_color + self.state["state"]["navigation_gradient_color"] = navigation_gradient_color + self.state["state"]["navigation_gradient_width"] = navigation_gradient_width + self.state["state"]["navigation_gradient_opacity"] = navigation_gradient_opacity + + list_chart_x_axis_axis_position = ["bottom", "top", "hidden"] + [None] + if chart_x_axis_axis_position not in list_chart_x_axis_axis_position: + raise ValueError( + f"`chart_x_axis_axis_position` must be one of: ['bottom', 'top', 'hidden']" + ) + elif ( + chart_x_axis_axis_position in list_chart_x_axis_axis_position + and chart_x_axis_axis_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "bottom": "bottom", + "top": "top", + "hidden": "hidden", + }.items() + if chart_x_axis_axis_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["axis_position"] = filtered_dict[ + chart_x_axis_axis_position + ] + self.state["state"]["x"]["y_axis_position"] = chart_x_axis_y_axis_position + + list_chart_x_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_x_axis_numeric_scale_type not in list_chart_x_axis_numeric_scale_type: + raise ValueError( + f"`chart_x_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_x_axis_numeric_scale_type in list_chart_x_axis_numeric_scale_type + and chart_x_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_x_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["numeric_scale_type"] = filtered_dict[ + chart_x_axis_numeric_scale_type + ] + self.state["state"]["x"]["linear_min"] = chart_x_axis_linear_min + self.state["state"]["x"]["linear_max"] = chart_x_axis_linear_max + self.state["state"]["x"]["log_min"] = chart_x_axis_log_min + self.state["state"]["x"]["log_max"] = chart_x_axis_log_max + self.state["state"]["x"]["datetime_min"] = chart_x_axis_datetime_min + self.state["state"]["x"]["datetime_max"] = chart_x_axis_datetime_max + self.state["state"]["x"]["flip"] = chart_x_axis_flip + self.state["state"]["x"][ + "show_scale_settings" + ] = chart_x_axis_show_scale_settings + + list_chart_x_axis_nice = [True, False] + [None] + if chart_x_axis_nice not in list_chart_x_axis_nice: + raise ValueError(f"`chart_x_axis_nice` must be one of: [True, False]") + elif ( + chart_x_axis_nice in list_chart_x_axis_nice + and chart_x_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["nice"] = filtered_dict[chart_x_axis_nice] + + list_chart_x_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_x_axis_zero_axis not in list_chart_x_axis_zero_axis: + raise ValueError( + f"`chart_x_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_x_axis_zero_axis in list_chart_x_axis_zero_axis + and chart_x_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_x_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["zero_axis"] = filtered_dict[ + chart_x_axis_zero_axis + ] + + list_chart_x_axis_title_mode = ["auto", "custom"] + [None] + if chart_x_axis_title_mode not in list_chart_x_axis_title_mode: + raise ValueError( + f"`chart_x_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_x_axis_title_mode in list_chart_x_axis_title_mode + and chart_x_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_x_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_mode"] = filtered_dict[ + chart_x_axis_title_mode + ] + self.state["state"]["x"]["title"] = chart_x_axis_title + self.state["state"]["x"]["title_styling"] = chart_x_axis_title_styling + + list_chart_x_axis_title_weight = ["bold", "normal"] + [None] + if chart_x_axis_title_weight not in list_chart_x_axis_title_weight: + raise ValueError( + f"`chart_x_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_title_weight in list_chart_x_axis_title_weight + and chart_x_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["title_weight"] = filtered_dict[ + chart_x_axis_title_weight + ] + self.state["state"]["x"]["title_color"] = chart_x_axis_title_color + self.state["state"]["x"]["title_size"] = chart_x_axis_title_size + self.state["state"]["x"]["title_padding"] = chart_x_axis_title_padding + + list_chart_x_axis_tick_label_position = ["default", "left", "right"] + [None] + if ( + chart_x_axis_tick_label_position + not in list_chart_x_axis_tick_label_position + ): + raise ValueError( + f"`chart_x_axis_tick_label_position` must be one of: ['default', 'left', 'right']" + ) + elif ( + chart_x_axis_tick_label_position in list_chart_x_axis_tick_label_position + and chart_x_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "left": "left", + "right": "right", + }.items() + if chart_x_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_position"] = filtered_dict[ + chart_x_axis_tick_label_position + ] + self.state["state"]["x"]["tick_label_styling"] = chart_x_axis_tick_label_styling + self.state["state"]["x"]["tick_label_size"] = chart_x_axis_tick_label_size + self.state["state"]["x"]["tick_label_color"] = chart_x_axis_tick_label_color + self.state["state"]["x"]["tick_padding"] = chart_x_axis_tick_padding + + list_chart_x_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_x_axis_tick_label_angle not in list_chart_x_axis_tick_label_angle: + raise ValueError( + f"`chart_x_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_x_axis_tick_label_angle in list_chart_x_axis_tick_label_angle + and chart_x_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_x_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_angle"] = filtered_dict[ + chart_x_axis_tick_label_angle + ] + + list_chart_x_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_x_axis_tick_label_weight not in list_chart_x_axis_tick_label_weight: + raise ValueError( + f"`chart_x_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_x_axis_tick_label_weight in list_chart_x_axis_tick_label_weight + and chart_x_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_x_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_weight"] = filtered_dict[ + chart_x_axis_tick_label_weight + ] + self.state["state"]["x"][ + "tick_label_max_lines" + ] = chart_x_axis_tick_label_max_lines + self.state["state"]["x"][ + "tick_label_line_height" + ] = chart_x_axis_tick_label_line_height + + list_chart_x_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_x_axis_tick_label_space_mode + not in list_chart_x_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_x_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_x_axis_tick_label_space_mode + in list_chart_x_axis_tick_label_space_mode + and chart_x_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_x_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_label_space_mode"] = filtered_dict[ + chart_x_axis_tick_label_space_mode + ] + self.state["state"]["x"]["tick_label_space"] = chart_x_axis_tick_label_space + + list_chart_x_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_x_axis_tick_mode not in list_chart_x_axis_tick_mode: + raise ValueError( + f"`chart_x_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_x_axis_tick_mode in list_chart_x_axis_tick_mode + and chart_x_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_x_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_mode"] = filtered_dict[ + chart_x_axis_tick_mode + ] + self.state["state"]["x"]["tick_number"] = chart_x_axis_tick_number + + if ( + chart_x_axis_tick_custom is not None + and len(chart_x_axis_tick_custom) > 1 + and isinstance(chart_x_axis_tick_custom, list) + ): + self.state["state"]["x"]["tick_custom"] = " \n ".join( + chart_x_axis_tick_custom + ) + else: + self.state["state"]["x"]["tick_custom"] = chart_x_axis_tick_custom + + self.state["state"]["x"][ + "line_and_tick_color" + ] = chart_x_axis_line_and_tick_color + self.state["state"]["x"][ + "line_and_tick_width" + ] = chart_x_axis_line_and_tick_width + self.state["state"]["x"]["tick_length"] = chart_x_axis_tick_length + + list_chart_x_axis_tick_side = ["out", "in"] + [None] + if chart_x_axis_tick_side not in list_chart_x_axis_tick_side: + raise ValueError(f"`chart_x_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_x_axis_tick_side in list_chart_x_axis_tick_side + and chart_x_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_x_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["tick_side"] = filtered_dict[ + chart_x_axis_tick_side + ] + self.state["state"]["x"]["line_visible"] = chart_x_axis_line_visible + self.state["state"]["x"]["edge_padding"] = chart_x_axis_edge_padding + + list_chart_x_axis_gridlines_visible = [True, False] + [None] + if chart_x_axis_gridlines_visible not in list_chart_x_axis_gridlines_visible: + raise ValueError( + f"`chart_x_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_x_axis_gridlines_visible in list_chart_x_axis_gridlines_visible + and chart_x_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_x_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridlines_visible"] = filtered_dict[ + chart_x_axis_gridlines_visible + ] + self.state["state"]["x"]["gridlines_styling"] = chart_x_axis_gridlines_styling + self.state["state"]["x"]["gridline_color"] = chart_x_axis_gridline_color + + list_chart_x_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_x_axis_gridline_style not in list_chart_x_axis_gridline_style: + raise ValueError( + f"`chart_x_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_x_axis_gridline_style in list_chart_x_axis_gridline_style + and chart_x_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_x_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["x"]["gridline_style"] = filtered_dict[ + chart_x_axis_gridline_style + ] + self.state["state"]["x"]["gridline_width"] = chart_x_axis_gridline_width + self.state["state"]["x"][ + "gridline_category_dividers" + ] = chart_x_axis_gridline_category_dividers + self.state["state"]["x"][ + "gridline_category_dividers_extend" + ] = chart_x_axis_gridline_category_dividers_extend + + list_chart_y_axis_axis_visible = [True, False] + [None] + if chart_y_axis_axis_visible not in list_chart_y_axis_axis_visible: + raise ValueError( + f"`chart_y_axis_axis_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_axis_visible in list_chart_y_axis_axis_visible + and chart_y_axis_axis_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_axis_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["axis_visible"] = filtered_dict[ + chart_y_axis_axis_visible + ] + + list_chart_y_axis_numeric_scale_type = ["linear", "log"] + [None] + if chart_y_axis_numeric_scale_type not in list_chart_y_axis_numeric_scale_type: + raise ValueError( + f"`chart_y_axis_numeric_scale_type` must be one of: ['linear', 'log']" + ) + elif ( + chart_y_axis_numeric_scale_type in list_chart_y_axis_numeric_scale_type + and chart_y_axis_numeric_scale_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "log": "log"}.items() + if chart_y_axis_numeric_scale_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["numeric_scale_type"] = filtered_dict[ + chart_y_axis_numeric_scale_type + ] + self.state["state"]["y"]["linear_min"] = chart_y_axis_linear_min + self.state["state"]["y"]["linear_max"] = chart_y_axis_linear_max + self.state["state"]["y"]["log_min"] = chart_y_axis_log_min + self.state["state"]["y"]["log_max"] = chart_y_axis_log_max + self.state["state"]["y"]["datetime_min"] = chart_y_axis_datetime_min + self.state["state"]["y"]["datetime_max"] = chart_y_axis_datetime_max + self.state["state"]["y"]["flip"] = chart_y_axis_flip + self.state["state"]["y"][ + "show_scale_settings" + ] = chart_y_axis_show_scale_settings + + list_chart_y_axis_nice = [True, False] + [None] + if chart_y_axis_nice not in list_chart_y_axis_nice: + raise ValueError(f"`chart_y_axis_nice` must be one of: [True, False]") + elif ( + chart_y_axis_nice in list_chart_y_axis_nice + and chart_y_axis_nice is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_nice in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["nice"] = filtered_dict[chart_y_axis_nice] + + list_chart_y_axis_zero_axis = ["auto", "on", "off"] + [None] + if chart_y_axis_zero_axis not in list_chart_y_axis_zero_axis: + raise ValueError( + f"`chart_y_axis_zero_axis` must be one of: ['auto', 'on', 'off']" + ) + elif ( + chart_y_axis_zero_axis in list_chart_y_axis_zero_axis + and chart_y_axis_zero_axis is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "on": "on", "off": "off"}.items() + if chart_y_axis_zero_axis in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["zero_axis"] = filtered_dict[ + chart_y_axis_zero_axis + ] + + list_chart_y_axis_title_mode = ["auto", "custom"] + [None] + if chart_y_axis_title_mode not in list_chart_y_axis_title_mode: + raise ValueError( + f"`chart_y_axis_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_y_axis_title_mode in list_chart_y_axis_title_mode + and chart_y_axis_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_y_axis_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_mode"] = filtered_dict[ + chart_y_axis_title_mode + ] + self.state["state"]["y"]["title"] = chart_y_axis_title + self.state["state"]["y"]["title_styling"] = chart_y_axis_title_styling + + list_chart_y_axis_title_position = ["side", "end"] + [None] + if chart_y_axis_title_position not in list_chart_y_axis_title_position: + raise ValueError( + f"`chart_y_axis_title_position` must be one of: ['side', 'end']" + ) + elif ( + chart_y_axis_title_position in list_chart_y_axis_title_position + and chart_y_axis_title_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"side": "side", "end": "end"}.items() + if chart_y_axis_title_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_position"] = filtered_dict[ + chart_y_axis_title_position + ] + + list_chart_y_axis_title_weight = ["bold", "normal"] + [None] + if chart_y_axis_title_weight not in list_chart_y_axis_title_weight: + raise ValueError( + f"`chart_y_axis_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_title_weight in list_chart_y_axis_title_weight + and chart_y_axis_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["title_weight"] = filtered_dict[ + chart_y_axis_title_weight + ] + self.state["state"]["y"]["title_color"] = chart_y_axis_title_color + self.state["state"]["y"]["title_size"] = chart_y_axis_title_size + self.state["state"]["y"]["title_padding"] = chart_y_axis_title_padding + + list_chart_y_axis_tick_label_position = ["default", "above", "below"] + [None] + if ( + chart_y_axis_tick_label_position + not in list_chart_y_axis_tick_label_position + ): + raise ValueError( + f"`chart_y_axis_tick_label_position` must be one of: ['default', 'above', 'below']" + ) + elif ( + chart_y_axis_tick_label_position in list_chart_y_axis_tick_label_position + and chart_y_axis_tick_label_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "default": "default", + "above": "above", + "below": "below", + }.items() + if chart_y_axis_tick_label_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_position"] = filtered_dict[ + chart_y_axis_tick_label_position + ] + self.state["state"]["y"]["tick_label_styling"] = chart_y_axis_tick_label_styling + self.state["state"]["y"]["tick_label_size"] = chart_y_axis_tick_label_size + self.state["state"]["y"]["tick_label_color"] = chart_y_axis_tick_label_color + self.state["state"]["y"]["tick_padding"] = chart_y_axis_tick_padding + + list_chart_y_axis_tick_label_angle = ["0", "30", "45", "60", "90"] + [None] + if chart_y_axis_tick_label_angle not in list_chart_y_axis_tick_label_angle: + raise ValueError( + f"`chart_y_axis_tick_label_angle` must be one of: ['0', '30', '45', '60', '90']" + ) + elif ( + chart_y_axis_tick_label_angle in list_chart_y_axis_tick_label_angle + and chart_y_axis_tick_label_angle is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "30": "30", + "45": "45", + "60": "60", + "90": "90", + }.items() + if chart_y_axis_tick_label_angle in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_angle"] = filtered_dict[ + chart_y_axis_tick_label_angle + ] + + list_chart_y_axis_tick_label_weight = ["bold", "normal"] + [None] + if chart_y_axis_tick_label_weight not in list_chart_y_axis_tick_label_weight: + raise ValueError( + f"`chart_y_axis_tick_label_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_y_axis_tick_label_weight in list_chart_y_axis_tick_label_weight + and chart_y_axis_tick_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_y_axis_tick_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_weight"] = filtered_dict[ + chart_y_axis_tick_label_weight + ] + self.state["state"]["y"][ + "tick_label_max_lines" + ] = chart_y_axis_tick_label_max_lines + self.state["state"]["y"][ + "tick_label_line_height" + ] = chart_y_axis_tick_label_line_height + + list_chart_y_axis_tick_label_space_mode = ["auto", "max", "fixed"] + [None] + if ( + chart_y_axis_tick_label_space_mode + not in list_chart_y_axis_tick_label_space_mode + ): + raise ValueError( + f"`chart_y_axis_tick_label_space_mode` must be one of: ['auto', 'max', 'fixed']" + ) + elif ( + chart_y_axis_tick_label_space_mode + in list_chart_y_axis_tick_label_space_mode + and chart_y_axis_tick_label_space_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "max": "max", "fixed": "fixed"}.items() + if chart_y_axis_tick_label_space_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_label_space_mode"] = filtered_dict[ + chart_y_axis_tick_label_space_mode + ] + self.state["state"]["y"]["tick_label_space"] = chart_y_axis_tick_label_space + + list_chart_y_axis_tick_mode = ["auto", "number", "custom"] + [None] + if chart_y_axis_tick_mode not in list_chart_y_axis_tick_mode: + raise ValueError( + f"`chart_y_axis_tick_mode` must be one of: ['auto', 'number', 'custom']" + ) + elif ( + chart_y_axis_tick_mode in list_chart_y_axis_tick_mode + and chart_y_axis_tick_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "number": "number", + "custom": "custom", + }.items() + if chart_y_axis_tick_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_mode"] = filtered_dict[ + chart_y_axis_tick_mode + ] + self.state["state"]["y"]["tick_number"] = chart_y_axis_tick_number + + if ( + chart_y_axis_tick_custom is not None + and len(chart_y_axis_tick_custom) > 1 + and isinstance(chart_y_axis_tick_custom, list) + ): + self.state["state"]["y"]["tick_custom"] = " \n ".join( + chart_y_axis_tick_custom + ) + else: + self.state["state"]["y"]["tick_custom"] = chart_y_axis_tick_custom + + self.state["state"]["y"][ + "line_and_tick_color" + ] = chart_y_axis_line_and_tick_color + self.state["state"]["y"][ + "line_and_tick_width" + ] = chart_y_axis_line_and_tick_width + self.state["state"]["y"]["tick_length"] = chart_y_axis_tick_length + + list_chart_y_axis_tick_side = ["out", "in"] + [None] + if chart_y_axis_tick_side not in list_chart_y_axis_tick_side: + raise ValueError(f"`chart_y_axis_tick_side` must be one of: ['out', 'in']") + elif ( + chart_y_axis_tick_side in list_chart_y_axis_tick_side + and chart_y_axis_tick_side is not None + ): + filtered_dict = { + k: v + for (k, v) in {"out": "out", "in": "in"}.items() + if chart_y_axis_tick_side in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["tick_side"] = filtered_dict[ + chart_y_axis_tick_side + ] + self.state["state"]["y"]["line_visible"] = chart_y_axis_line_visible + self.state["state"]["y"]["edge_padding"] = chart_y_axis_edge_padding + + list_chart_y_axis_gridlines_visible = [True, False] + [None] + if chart_y_axis_gridlines_visible not in list_chart_y_axis_gridlines_visible: + raise ValueError( + f"`chart_y_axis_gridlines_visible` must be one of: [True, False]" + ) + elif ( + chart_y_axis_gridlines_visible in list_chart_y_axis_gridlines_visible + and chart_y_axis_gridlines_visible is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_y_axis_gridlines_visible in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridlines_visible"] = filtered_dict[ + chart_y_axis_gridlines_visible + ] + self.state["state"]["y"]["gridlines_styling"] = chart_y_axis_gridlines_styling + self.state["state"]["y"]["gridline_color"] = chart_y_axis_gridline_color + + list_chart_y_axis_gridline_style = ["solid", "dash", "dot", "dot_dash"] + [None] + if chart_y_axis_gridline_style not in list_chart_y_axis_gridline_style: + raise ValueError( + f"`chart_y_axis_gridline_style` must be one of: ['solid', 'dash', 'dot', 'dot_dash']" + ) + elif ( + chart_y_axis_gridline_style in list_chart_y_axis_gridline_style + and chart_y_axis_gridline_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dash": "dash", + "dot": "dot", + "dot_dash": "dot_dash", + }.items() + if chart_y_axis_gridline_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["y"]["gridline_style"] = filtered_dict[ + chart_y_axis_gridline_style + ] + self.state["state"]["y"]["gridline_width"] = chart_y_axis_gridline_width + self.state["state"]["y"][ + "gridline_category_dividers" + ] = chart_y_axis_gridline_category_dividers + self.state["state"]["y"][ + "gridline_category_dividers_extend" + ] = chart_y_axis_gridline_category_dividers_extend + + list_chart_categorical_legend_show_legend = [True, False] + [None] + if ( + chart_categorical_legend_show_legend + not in list_chart_categorical_legend_show_legend + ): + raise ValueError( + f"`chart_categorical_legend_show_legend` must be one of: [True, False]" + ) + elif ( + chart_categorical_legend_show_legend + in list_chart_categorical_legend_show_legend + and chart_categorical_legend_show_legend is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_categorical_legend_show_legend in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "show_legend" + ] = filtered_dict[chart_categorical_legend_show_legend] + + list_chart_categorical_legend_title_mode = ["auto", "custom"] + [None] + if ( + chart_categorical_legend_title_mode + not in list_chart_categorical_legend_title_mode + ): + raise ValueError( + f"`chart_categorical_legend_title_mode` must be one of: ['auto', 'custom']" + ) + elif ( + chart_categorical_legend_title_mode + in list_chart_categorical_legend_title_mode + and chart_categorical_legend_title_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "custom": "custom"}.items() + if chart_categorical_legend_title_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"]["title_mode"] = filtered_dict[ + chart_categorical_legend_title_mode + ] + self.state["state"]["legend_categorical"][ + "title" + ] = chart_categorical_legend_title + self.state["state"]["legend_categorical"][ + "swatch_width" + ] = chart_categorical_legend_swatch_width + self.state["state"]["legend_categorical"][ + "swatch_height" + ] = chart_categorical_legend_swatch_height + self.state["state"]["legend_categorical"][ + "swatch_radius" + ] = chart_categorical_legend_swatch_radius + self.state["state"]["legend_categorical"][ + "legend_items_padding" + ] = chart_categorical_legend_legend_items_padding + self.state["state"]["legend_categorical"][ + "swatch_outline" + ] = chart_categorical_legend_swatch_outline + self.state["state"]["legend_categorical"][ + "swatch_outline_color" + ] = chart_categorical_legend_swatch_outline_color + + if ( + chart_categorical_legend_order_override is not None + and len(chart_categorical_legend_order_override) > 1 + and isinstance(chart_categorical_legend_order_override, list) + ): + self.state["state"]["legend_categorical"]["order_override"] = " \n ".join( + chart_categorical_legend_order_override + ) + else: + self.state["state"]["legend_categorical"][ + "order_override" + ] = chart_categorical_legend_order_override + + self.state["state"]["legend_categorical"][ + "icon_height" + ] = chart_categorical_legend_icon_height + self.state["state"]["legend_categorical"][ + "icon_color" + ] = chart_categorical_legend_icon_color + self.state["state"]["legend_categorical"][ + "max_width" + ] = chart_categorical_legend_max_width + + list_chart_categorical_legend_orientation = ["horizontal", "vertical"] + [None] + if ( + chart_categorical_legend_orientation + not in list_chart_categorical_legend_orientation + ): + raise ValueError( + f"`chart_categorical_legend_orientation` must be one of: ['horizontal', 'vertical']" + ) + elif ( + chart_categorical_legend_orientation + in list_chart_categorical_legend_orientation + and chart_categorical_legend_orientation is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "horizontal": "horizontal", + "vertical": "vertical", + }.items() + if chart_categorical_legend_orientation in k + } + if len(filtered_dict) > 0: + self.state["state"]["legend_categorical"][ + "orientation" + ] = filtered_dict[chart_categorical_legend_orientation] + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_tournament_details( + self, + min_round_width_mode: str = None, + min_round_width_fixed: float = None, + inner_padding_vertical: float = None, + inner_padding_horizontal: float = None, + link_width: float = None, + outer_padding: float = None, + winning_team_color: str = None, + losing_team_color: str = None, + upcoming_fill_color: str = None, + boxes_stroke_color: str = None, + boxes_stroke_width: float = None, + boxes_roundness: float = None, + winning_team_text_color: str = None, + losing_team_text_color: str = None, + font_size: float = None, + text_weight_mode: str = None, + link_thickness: float = None, + link_color: str = None, + link_radius: float = None, + image_size: float = None, + image_scale: str = None, + image_zoom: float = None, + image_shape: str = None, + headings_enabled: bool = None, + headings_size: float = None, + headings_padding: float = None, + headings_color: str = None, + headings_weight: str = None, + headings_position: str = None, + navigation_icon_position: str = None, + navigation_icon_mode: str = None, + navigation_icon_upload: str = None, + navigation_icon_size: float = None, + navigation_icon_color: str = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + popup_header_separator: str = None, + animation_duration: float = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: tournament. + + + :param min_round_width_mode: Width mode. Choices: auto, fixed. Auto mode sets round width to the smallest it can be while still fitting text content. In Fixed mode you can choose a fixed minimum round width (text will be ellipsed if it does not fit). Flourish type hint: string, defaults to None. + :type min_round_width_mode: str, optional + :param min_round_width_fixed: Min stage width. The minimum width given to a specific stage (e.g. Quarterfinals), specified in px. Flourish type hint: number, defaults to None. + :type min_round_width_fixed: float, optional + :param inner_padding_vertical: Box height. Flourish type hint: number, defaults to None. + :type inner_padding_vertical: float, optional + :param inner_padding_horizontal: Box padding. Horizontal space on sides of box. Flourish type hint: number, defaults to None. + :type inner_padding_horizontal: float, optional + :param link_width: Horizontal space. Horizontal space between stages. Flourish type hint: number, defaults to None. + :type link_width: float, optional + :param outer_padding: Vertical space. Vertical space between stages. Flourish type hint: number, defaults to None. + :type outer_padding: float, optional + :param winning_team_color: Winning team. Flourish type hint: color, defaults to None. + :type winning_team_color: str, optional + :param losing_team_color: Losing team. Flourish type hint: color, defaults to None. + :type losing_team_color: str, optional + :param upcoming_fill_color: Upcoming match. Flourish type hint: color, defaults to None. + :type upcoming_fill_color: str, optional + :param boxes_stroke_color: Outline color. Flourish type hint: color, defaults to None. + :type boxes_stroke_color: str, optional + :param boxes_stroke_width: Outline width. Flourish type hint: number, defaults to None. + :type boxes_stroke_width: float, optional + :param boxes_roundness: Roundness. Flourish type hint: number, defaults to None. + :type boxes_roundness: float, optional + :param winning_team_text_color: Winning team. Flourish type hint: color, defaults to None. + :type winning_team_text_color: str, optional + :param losing_team_text_color: Losing team. Flourish type hint: color, defaults to None. + :type losing_team_text_color: str, optional + :param font_size: Size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type font_size: float, optional + :param text_weight_mode: Weight. Choices: winner_bold, regular, bold. Flourish type hint: string, defaults to None. + :type text_weight_mode: str, optional + :param link_thickness: Thickness. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type link_thickness: float, optional + :param link_color: Color. Flourish type hint: color, defaults to None. + :type link_color: str, optional + :param link_radius: Roundness. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type link_radius: float, optional + :param image_size: Size. Specified as a % of the box for that match. Flourish type hint: number, defaults to None. + :type image_size: float, optional + :param image_scale: Scale. Choices: contain, cover, zoom. Fill will not preserve the aspect ratio of images but stretch them to fill the area. Fit and Zoom both preserve the aspect ratio of images, but Fit ensures none of the image is cut off. Flourish type hint: string, defaults to None. + :type image_scale: str, optional + :param image_zoom: Zoom. Sets what size the image should fill the container as a percentage of the container size. Flourish type hint: number, defaults to None. + :type image_zoom: float, optional + :param image_shape: Shape. Choices: circle, square. Flourish type hint: string, defaults to None. + :type image_shape: str, optional + :param headings_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type headings_enabled: bool, optional + :param headings_size: Size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type headings_size: float, optional + :param headings_padding: Padding. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type headings_padding: float, optional + :param headings_color: Color. Flourish type hint: color, defaults to None. + :type headings_color: str, optional + :param headings_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type headings_weight: str, optional + :param headings_position: Position. Choices: middle, start. Flourish type hint: string, defaults to None. + :type headings_position: str, optional + :param navigation_icon_position: Position. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type navigation_icon_position: str, optional + :param navigation_icon_mode: Type. Choices: arrow, custom. Flourish type hint: string, defaults to None. + :type navigation_icon_mode: str, optional + :param navigation_icon_upload: Upload icon. Upload a right-facing icon (your icon will be rotated for the left side). Flourish type hint: url, defaults to None. + :type navigation_icon_upload: str, optional + :param navigation_icon_size: Size. In rems, a multiple of the pages base font size. Flourish type hint: number, defaults to None. + :type navigation_icon_size: float, optional + :param navigation_icon_color: Color. Flourish type hint: color, defaults to None. + :type navigation_icon_color: str, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param popup_header_separator: Header separator. Flourish type hint: string, defaults to None. + :type popup_header_separator: str, optional + :param animation_duration: Duration. The duration, in seconds, of intro animation. Flourish type hint: number, defaults to None. + :type animation_duration: float, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "popup": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_min_round_width_mode = ["auto", "fixed"] + [None] + if min_round_width_mode not in list_min_round_width_mode: + raise ValueError( + f"`min_round_width_mode` must be one of: ['auto', 'fixed']" + ) + elif ( + min_round_width_mode in list_min_round_width_mode + and min_round_width_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"auto": "auto", "fixed": "fixed"}.items() + if min_round_width_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["min_round_width_mode"] = filtered_dict[ + min_round_width_mode + ] + self.state["state"]["min_round_width_fixed"] = min_round_width_fixed + self.state["state"]["inner_padding_vertical"] = inner_padding_vertical + self.state["state"]["inner_padding_horizontal"] = inner_padding_horizontal + self.state["state"]["link_width"] = link_width + self.state["state"]["outer_padding"] = outer_padding + self.state["state"]["winning_team_color"] = winning_team_color + self.state["state"]["losing_team_color"] = losing_team_color + self.state["state"]["upcoming_fill_color"] = upcoming_fill_color + self.state["state"]["boxes_stroke_color"] = boxes_stroke_color + self.state["state"]["boxes_stroke_width"] = boxes_stroke_width + self.state["state"]["boxes_roundness"] = boxes_roundness + self.state["state"]["winning_team_text_color"] = winning_team_text_color + self.state["state"]["losing_team_text_color"] = losing_team_text_color + self.state["state"]["font_size"] = font_size + + list_text_weight_mode = ["winner_bold", "regular", "bold"] + [None] + if text_weight_mode not in list_text_weight_mode: + raise ValueError( + f"`text_weight_mode` must be one of: ['winner_bold', 'regular', 'bold']" + ) + elif text_weight_mode in list_text_weight_mode and text_weight_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "winner_bold": "winner_bold", + "regular": "regular", + "bold": "bold", + }.items() + if text_weight_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["text_weight_mode"] = filtered_dict[ + text_weight_mode + ] + self.state["state"]["link_thickness"] = link_thickness + self.state["state"]["link_color"] = link_color + self.state["state"]["link_radius"] = link_radius + self.state["state"]["image_size"] = image_size + + list_image_scale = ["contain", "cover", "zoom"] + [None] + if image_scale not in list_image_scale: + raise ValueError( + f"`image_scale` must be one of: ['contain', 'cover', 'zoom']" + ) + elif image_scale in list_image_scale and image_scale is not None: + filtered_dict = { + k: v + for (k, v) in { + "contain": "contain", + "cover": "cover", + "zoom": "zoom", + }.items() + if image_scale in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_scale"] = filtered_dict[image_scale] + self.state["state"]["image_zoom"] = image_zoom + + list_image_shape = ["circle", "square"] + [None] + if image_shape not in list_image_shape: + raise ValueError(f"`image_shape` must be one of: ['circle', 'square']") + elif image_shape in list_image_shape and image_shape is not None: + filtered_dict = { + k: v + for (k, v) in {"circle": "circle", "square": "square"}.items() + if image_shape in k + } + if len(filtered_dict) > 0: + self.state["state"]["image_shape"] = filtered_dict[image_shape] + + list_headings_enabled = [True, False] + [None] + if headings_enabled not in list_headings_enabled: + raise ValueError(f"`headings_enabled` must be one of: [True, False]") + elif headings_enabled in list_headings_enabled and headings_enabled is not None: + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if headings_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["headings_enabled"] = filtered_dict[ + headings_enabled + ] + self.state["state"]["headings_size"] = headings_size + self.state["state"]["headings_padding"] = headings_padding + self.state["state"]["headings_color"] = headings_color + + list_headings_weight = ["bold", "normal"] + [None] + if headings_weight not in list_headings_weight: + raise ValueError(f"`headings_weight` must be one of: ['bold', 'normal']") + elif headings_weight in list_headings_weight and headings_weight is not None: + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if headings_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["headings_weight"] = filtered_dict[headings_weight] + + list_headings_position = ["middle", "start"] + [None] + if headings_position not in list_headings_position: + raise ValueError(f"`headings_position` must be one of: ['middle', 'start']") + elif ( + headings_position in list_headings_position + and headings_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"middle": "middle", "start": "start"}.items() + if headings_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["headings_position"] = filtered_dict[ + headings_position + ] + + list_navigation_icon_position = ["start", "center", "end"] + [None] + if navigation_icon_position not in list_navigation_icon_position: + raise ValueError( + f"`navigation_icon_position` must be one of: ['start', 'center', 'end']" + ) + elif ( + navigation_icon_position in list_navigation_icon_position + and navigation_icon_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if navigation_icon_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["navigation_icon_position"] = filtered_dict[ + navigation_icon_position + ] + + list_navigation_icon_mode = ["arrow", "custom"] + [None] + if navigation_icon_mode not in list_navigation_icon_mode: + raise ValueError( + f"`navigation_icon_mode` must be one of: ['arrow', 'custom']" + ) + elif ( + navigation_icon_mode in list_navigation_icon_mode + and navigation_icon_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in {"arrow": "arrow", "custom": "custom"}.items() + if navigation_icon_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["navigation_icon_mode"] = filtered_dict[ + navigation_icon_mode + ] + self.state["state"]["navigation_icon_upload"] = navigation_icon_upload + self.state["state"]["navigation_icon_size"] = navigation_icon_size + self.state["state"]["navigation_icon_color"] = navigation_icon_color + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + self.state["state"]["popup_header_separator"] = popup_header_separator + self.state["state"]["animation_duration"] = animation_duration + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self + + def set_word_cloud_details( + self, + using_tables: bool = None, + word_limit: float = None, + raw_text: Union[list, str] = None, + exclusions: bool = None, + excluded_words: Union[list, str] = None, + strip_trailing_s: bool = None, + convert_to_lowercase: bool = None, + cloud_font: str = None, + text_color: str = None, + word_padding: float = None, + random_seed: float = None, + angle_min: float = None, + angle_max: float = None, + angle_number: float = None, + font_size_min: float = None, + font_size_max: float = None, + size_mode: str = None, + height_mode: str = None, + aspect_ratio: float = None, + aspect_ratio_mobile: float = None, + aspect_ratio_breakpoint: float = None, + chart_color_scale_categorical_palette: Union[list, str] = None, + chart_color_scale_categorical_extend: bool = None, + chart_color_scale_categorical_custom_palette: Union[list, str] = None, + chart_color_scale_numeric_type: str = None, + chart_color_scale_binning: bool = None, + chart_color_scale_bin_mode: str = None, + chart_color_scale_bin_count: float = None, + chart_color_scale_bin_thresholds: str = None, + chart_color_scale_sequential_palette: str = None, + chart_color_scale_sequential_reverse: bool = None, + chart_color_scale_sequential_custom_min: str = None, + chart_color_scale_sequential_custom_max: str = None, + chart_color_scale_sequential_color_space: str = None, + chart_color_scale_sequential_custom_domain: bool = None, + chart_color_scale_sequential_domain_min: float = None, + chart_color_scale_sequential_domain_max: float = None, + chart_color_scale_diverging_palette: str = None, + chart_color_scale_diverging_reverse: bool = None, + chart_color_scale_diverging_custom_min: str = None, + chart_color_scale_diverging_custom_mid: str = None, + chart_color_scale_diverging_custom_max: str = None, + chart_color_scale_diverging_color_space: str = None, + chart_color_scale_diverging_custom_domain: bool = None, + chart_color_scale_diverging_domain_min: float = None, + chart_color_scale_diverging_domain_mid: float = None, + chart_color_scale_diverging_domain_max: float = None, + animation_type: str = None, + duration: float = None, + stagger: float = None, + chart_number_date_format_prefix: str = None, + chart_number_date_format_suffix: str = None, + chart_number_date_format_n_dec: float = None, + chart_number_date_format_advanced: bool = None, + chart_number_date_format_negative_sign: str = None, + chart_number_date_format_strip_zeros: bool = None, + chart_number_date_format_strip_separator: bool = None, + chart_number_date_format_transform_labels: bool = None, + chart_number_date_format_transform: str = None, + chart_number_date_format_multiply_divide_constant: float = None, + chart_number_date_format_exponentiate_constant: float = None, + chart_number_localization_input_decimal_separator: str = None, + chart_number_localization_output_separators: str = None, + chart_popup_mode: str = None, + chart_popup_popup_is_custom: bool = None, + chart_popup_show_popup_styles: bool = None, + chart_popup_popup_custom_header: Union[list, str] = None, + chart_popup_popup_custom_main: Union[list, str] = None, + chart_popup_popup_custom_accessible: Union[list, str] = None, + chart_popup_popup_width: float = None, + chart_popup_popup_font_size: float = None, + chart_popup_popup_text_color: str = None, + chart_popup_popup_align: str = None, + chart_popup_popup_background: str = None, + chart_popup_popup_background_opacity: float = None, + chart_popup_popup_padding: float = None, + chart_popup_popup_radius: float = None, + chart_popup_popup_header_type: str = None, + chart_popup_popup_header_background: str = None, + chart_popup_popup_header_text_color: str = None, + chart_popup_popup_list_type: str = None, + chart_popup_popup_list_label_weight: str = None, + chart_popup_popup_list_separator: str = None, + chart_popup_popup_shadow: bool = None, + chart_popup_popup_pointer: bool = None, + chart_popup_panel_position: str = None, + chart_popup_panel_open_duration: float = None, + chart_popup_panel_side_fixed: bool = None, + chart_popup_panel_side_default_content: Union[list, str] = None, + chart_popup_panel_is_custom: bool = None, + chart_popup_show_panel_styles: bool = None, + chart_popup_panel_custom_header: Union[list, str] = None, + chart_popup_panel_custom_main: Union[list, str] = None, + chart_popup_panel_width_overlay: float = None, + chart_popup_panel_height_overlay: float = None, + chart_popup_panel_width_side: float = None, + chart_popup_panel_height_side: float = None, + chart_popup_panel_max_width: float = None, + chart_popup_panel_max_height: float = None, + chart_popup_panel_vertical_position: str = None, + chart_popup_panel_text_color: str = None, + chart_popup_panel_font_size: float = None, + chart_popup_panel_align: str = None, + chart_popup_panel_background: str = None, + chart_popup_panel_background_opacity: float = None, + chart_popup_panel_padding: float = None, + chart_popup_panel_radius: float = None, + chart_popup_panel_list_type: str = None, + chart_popup_panel_list_label_weight: str = None, + chart_popup_panel_list_separator: str = None, + chart_popup_panel_shadow: bool = None, + chart_layout_body_font: str = None, + chart_layout_font_color: str = None, + chart_layout_background_color_enabled: bool = None, + chart_layout_background_image_enabled: bool = None, + chart_layout_background_color: str = None, + chart_layout_background_image_src: str = None, + chart_layout_background_image_size: str = None, + chart_layout_background_image_position: str = None, + chart_layout_max_width_target: str = None, + chart_layout_max_width: float = None, + chart_layout_max_width_align: str = None, + chart_layout_layout_order: str = None, + chart_layout_space_between_sections: str = None, + chart_layout_space_between_sections_custom: float = None, + chart_layout_margin_top: float = None, + chart_layout_margin_right: float = None, + chart_layout_margin_bottom: float = None, + chart_layout_margin_left: float = None, + chart_layout_border_enabled: bool = None, + chart_layout_border_top_width: float = None, + chart_layout_border_top_style: str = None, + chart_layout_border_top_color: str = None, + chart_layout_border_right_width: float = None, + chart_layout_border_right_style: str = None, + chart_layout_border_right_color: str = None, + chart_layout_border_bottom_width: float = None, + chart_layout_border_bottom_style: str = None, + chart_layout_border_bottom_color: str = None, + chart_layout_border_left_width: float = None, + chart_layout_border_left_style: str = None, + chart_layout_border_left_color: str = None, + chart_layout_read_direction: str = None, + chart_layout_font_size_mobile_small: float = None, + chart_layout_font_size_mobile_big: float = None, + chart_layout_font_size_tablet: float = None, + chart_layout_font_size_desktop: float = None, + chart_layout_font_size_big_screen: float = None, + chart_layout_breakpoint_mobile_small: float = None, + chart_layout_breakpoint_mobile_big: float = None, + chart_layout_breakpoint_tablet: float = None, + chart_layout_breakpoint_desktop: float = None, + chart_layout_breakpoint_big_screen: float = None, + chart_layout_header_align: str = None, + chart_layout_title: Union[list, str] = None, + chart_layout_title_styling: bool = None, + chart_layout_title_font: str = None, + chart_layout_title_size: str = None, + chart_layout_title_size_custom: float = None, + chart_layout_title_weight: str = None, + chart_layout_title_color: str = None, + chart_layout_title_line_height: float = None, + chart_layout_title_space_above: str = None, + chart_layout_title_space_above_custom: float = None, + chart_layout_subtitle: Union[list, str] = None, + chart_layout_subtitle_styling: bool = None, + chart_layout_subtitle_font: str = None, + chart_layout_subtitle_size: str = None, + chart_layout_subtitle_size_custom: float = None, + chart_layout_subtitle_weight: str = None, + chart_layout_subtitle_color: str = None, + chart_layout_subtitle_line_height: float = None, + chart_layout_subtitle_space_above: str = None, + chart_layout_subtitle_space_above_custom: float = None, + chart_layout_header_text: Union[list, str] = None, + chart_layout_header_text_styling: bool = None, + chart_layout_header_text_size: str = None, + chart_layout_header_text_size_custom: float = None, + chart_layout_header_text_weight: str = None, + chart_layout_header_text_color: str = None, + chart_layout_header_text_line_height: float = None, + chart_layout_header_text_space_above: str = None, + chart_layout_header_text_space_above_custom: float = None, + chart_layout_header_border: str = None, + chart_layout_header_border_width: float = None, + chart_layout_header_border_color: str = None, + chart_layout_header_border_style: str = None, + chart_layout_header_border_space: float = None, + chart_layout_header_logo_enabled: bool = None, + chart_layout_header_logo_src: str = None, + chart_layout_header_logo_alt: str = None, + chart_layout_header_logo_link_url: str = None, + chart_layout_header_logo_height: float = None, + chart_layout_header_logo_align: str = None, + chart_layout_header_logo_position_inside: str = None, + chart_layout_header_logo_position_outside: str = None, + chart_layout_header_logo_margin_top: float = None, + chart_layout_header_logo_margin_right: float = None, + chart_layout_header_logo_margin_bottom: float = None, + chart_layout_header_logo_margin_left: float = None, + chart_layout_footer_align: str = None, + chart_layout_footer_text_size: float = None, + chart_layout_footer_text_color: str = None, + chart_layout_footer_styling: bool = None, + chart_layout_footer_font: str = None, + chart_layout_footer_text_weight: str = None, + chart_layout_source_name: str = None, + chart_layout_source_url: str = None, + chart_layout_multiple_sources: bool = None, + chart_layout_source_name_2: str = None, + chart_layout_source_url_2: str = None, + chart_layout_source_name_3: str = None, + chart_layout_source_url_3: str = None, + chart_layout_source_label: str = None, + chart_layout_footer_note: Union[list, str] = None, + chart_layout_footer_note_secondary: Union[list, str] = None, + chart_layout_advanced_note_styling: bool = None, + chart_layout_footer_timestamp_format: str = None, + chart_layout_footer_logo_enabled: bool = None, + chart_layout_footer_logo_src: str = None, + chart_layout_footer_logo_src_light: str = None, + chart_layout_footer_logo_alt: str = None, + chart_layout_footer_logo_link_url: str = None, + chart_layout_footer_logo_height: float = None, + chart_layout_footer_logo_margin: float = None, + chart_layout_footer_logo_order: str = None, + chart_layout_footer_align_vertical: str = None, + chart_layout_footer_border: str = None, + chart_layout_footer_border_width: float = None, + chart_layout_footer_border_color: str = None, + chart_layout_footer_border_style: str = None, + chart_layout_footer_border_space: float = None, + chart_layout_screenreader_text_primary: Union[list, str] = None, + chart_layout_screenreader_label: str = None, + chart_layout_screenreader_hide_primary: bool = None, + ): + """ + Set chart details for: word cloud. + + + :param using_tables: Text input. Choices: False, True. Pasting in raw text is simplest but may be slow for large amounts of text. Flourish type hint: boolean, defaults to None. + :type using_tables: bool, optional + :param word_limit: Word limit. Limits the number of words, in order of frequency. Leave blank to show all words in the data table. Flourish type hint: number, defaults to None. + :type word_limit: float, optional + :param raw_text: Text. Note that the raw text will be available in the HTML of the generated page. This occurs when using both Paste in raw text and Datasheet options. Flourish type hint: text, defaults to None. + :type raw_text: Union[list, str], optional + :param exclusions: Exclude common words. Flourish type hint: boolean, defaults to None. + :type exclusions: bool, optional + :param excluded_words: Exclude words. Flourish type hint: text, defaults to None. + :type excluded_words: Union[list, str], optional + :param strip_trailing_s: Strip all trailing “s” from words. e.g. "mother" and "mothers" are considered one word. This includes both apostrophe and quotation mark forms (s and s). Flourish type hint: boolean, defaults to None. + :type strip_trailing_s: bool, optional + :param convert_to_lowercase: Convert all words to lowercase. e.g. "mother" and "Mother" are considered one word. This will also apply to the words in the Exclude words setting. Flourish type hint: boolean, defaults to None. + :type convert_to_lowercase: bool, optional + :param cloud_font: Font. Flourish type hint: font, defaults to None. + :type cloud_font: str, optional + :param text_color: Text color. Flourish type hint: color, defaults to None. + :type text_color: str, optional + :param word_padding: Spacing. Spacing between the words (in arbitrary units). Flourish type hint: number, defaults to None. + :type word_padding: float, optional + :param random_seed: Layout number. Change the number to try different word layouts. Flourish type hint: number, defaults to None. + :type random_seed: float, optional + :param angle_min: Min angle. Flourish type hint: number, defaults to None. + :type angle_min: float, optional + :param angle_max: Max angle. Flourish type hint: number, defaults to None. + :type angle_max: float, optional + :param angle_number: Number of angles. Flourish type hint: number, defaults to None. + :type angle_number: float, optional + :param font_size_min: Min size. In arbitrary units. Actual display size will depend in screen size and layout. Flourish type hint: number, defaults to None. + :type font_size_min: float, optional + :param font_size_max: Max size. In arbitrary units. Actual display size will depend in screen size and layout. Flourish type hint: number, defaults to None. + :type font_size_max: float, optional + :param size_mode: Scaling. Choices: linear, sqrt, log. This scale will determine the relationship in size between the biggest and the smallest word. Flourish type hint: string, defaults to None. + :type size_mode: str, optional + :param height_mode: Height mode. Choices: fill_space, aspect. In Fill space mode, the graphic will fill the container (which by default will be the standard Flourish responsive chart size). In Aspect ratio mode, you set the aspect ratio of the plot, and the container will be updated to accommodate it. This setting is ignored when embedded in a fixed-height context, such as a simple iframe embedFlourish type hint: string, defaults to None. + :type height_mode: str, optional + :param aspect_ratio: Aspect (desktop). Aspect ratio of each plot in desktop mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type aspect_ratio: float, optional + :param aspect_ratio_mobile: Aspect (mobile). Aspect ratio of each plot in mobile mode, where 1 is square, above 1 is wider, and below 1 is taller. Flourish type hint: number, defaults to None. + :type aspect_ratio_mobile: float, optional + :param aspect_ratio_breakpoint: Breakpoint. The width at which mobile mode ends and desktop begins. Flourish type hint: number, defaults to None. + :type aspect_ratio_breakpoint: float, optional + :param chart_color_scale_categorical_palette: Palette. Flourish type hint: colors, defaults to None. + :type chart_color_scale_categorical_palette: Union[list, str], optional + :param chart_color_scale_categorical_extend: Extend. Automatically generate additional colours when needed to avoid the palette colours being used more than once. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_categorical_extend: bool, optional + :param chart_color_scale_categorical_custom_palette: Custom overrides. Enter the label name for which you wish to set the color, followed by a colon and the desired color value. Colors can be set using Hex, RGB, color names or RGBA, if you want to set the opacity Multiple colors can be set using multiple lines. For example: Party 1: red Party 2: #4455AA Party 3: rgb(30,168,26). Flourish type hint: text, defaults to None. + :type chart_color_scale_categorical_custom_palette: Union[list, str], optional + :param chart_color_scale_numeric_type: Scale type. Choices: sequential, diverging. Flourish type hint: string, defaults to None. + :type chart_color_scale_numeric_type: str, optional + :param chart_color_scale_binning: Choices: False, True. In linear mode, the color scale will run as a smooth gradient between 2 colors. In binned mode, the gradient will be divided in smaller blocks. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_binning: bool, optional + :param chart_color_scale_bin_mode: Binning mode. Choices: fixed, quantile, custom. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_mode: str, optional + :param chart_color_scale_bin_count: Number of bins. Flourish type hint: number, defaults to None. + :type chart_color_scale_bin_count: float, optional + :param chart_color_scale_bin_thresholds: Custom thresholds. Enter your desired thresholds, separating them with a ";". For instance, "5;10;15". Bins form as follows: From the datas minimum value (domain minimum) up to the first threshold. Between consecutive thresholds. From the last threshold to the datas maximum value (domain maximum). For "5;10;15", youll get four bins based on your datas range. Flourish type hint: string, defaults to None. + :type chart_color_scale_bin_thresholds: str, optional + :param chart_color_scale_sequential_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_palette: str, optional + :param chart_color_scale_sequential_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_reverse: bool, optional + :param chart_color_scale_sequential_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_min: str, optional + :param chart_color_scale_sequential_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_sequential_custom_max: str, optional + :param chart_color_scale_sequential_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_sequential_color_space: str, optional + :param chart_color_scale_sequential_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_sequential_custom_domain: bool, optional + :param chart_color_scale_sequential_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_min: float, optional + :param chart_color_scale_sequential_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_sequential_domain_max: float, optional + :param chart_color_scale_diverging_palette: Palette. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_palette: str, optional + :param chart_color_scale_diverging_reverse: Reverse. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_reverse: bool, optional + :param chart_color_scale_diverging_custom_min: Minimum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_min: str, optional + :param chart_color_scale_diverging_custom_mid: Midpoint color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_mid: str, optional + :param chart_color_scale_diverging_custom_max: Maximum color. Flourish type hint: color, defaults to None. + :type chart_color_scale_diverging_custom_max: str, optional + :param chart_color_scale_diverging_color_space: Color space. Choices: rgb, lab, hcl, hsl. Flourish type hint: string, defaults to None. + :type chart_color_scale_diverging_color_space: str, optional + :param chart_color_scale_diverging_custom_domain: Domain. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_color_scale_diverging_custom_domain: bool, optional + :param chart_color_scale_diverging_domain_min: Min. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_min: float, optional + :param chart_color_scale_diverging_domain_mid: Mid. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_mid: float, optional + :param chart_color_scale_diverging_domain_max: Max. Flourish type hint: number, defaults to None. + :type chart_color_scale_diverging_domain_max: float, optional + :param animation_type: Animation style. Choices: auto, fade, grow, none. Controls the animation on load. Auto mode will use Grow if there are fewer than 100 words visible, Fade if there are fewer than 500, and None if there are 500 or more. Flourish type hint: string, defaults to None. + :type animation_type: str, optional + :param duration: Duration. The time in seconds it takes for an individual word to move from the start position to end position. Flourish type hint: number, defaults to None. + :type duration: float, optional + :param stagger: Stagger. The time in seconds between the first and last word animations starting. Flourish type hint: number, defaults to None. + :type stagger: float, optional + :param chart_number_date_format_prefix: Prefix. Text to place in front of number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_prefix: str, optional + :param chart_number_date_format_suffix: Suffix. Text to place after number. Flourish type hint: string, defaults to None. + :type chart_number_date_format_suffix: str, optional + :param chart_number_date_format_n_dec: Decimal places. Enter a negative integer to round to a whole number with that many zeros. For example, -2 will round to the nearest hundred. Flourish type hint: number, defaults to None. + :type chart_number_date_format_n_dec: float, optional + :param chart_number_date_format_advanced: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_advanced: bool, optional + :param chart_number_date_format_negative_sign: Styling of negative numbers. Choices: -$nk, $-nk, ($nk), $(n)k, none. Flourish type hint: string, defaults to None. + :type chart_number_date_format_negative_sign: str, optional + :param chart_number_date_format_strip_zeros: Remove trailing zeros. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_zeros: bool, optional + :param chart_number_date_format_strip_separator: Hide thousands separator below 10,000. Turn off if you want four-digit numbers to include a separator, e.g. 1,234 rather than 1234. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_strip_separator: bool, optional + :param chart_number_date_format_transform_labels: Multiply/divide values. Flourish type hint: boolean, defaults to None. + :type chart_number_date_format_transform_labels: bool, optional + :param chart_number_date_format_transform: Choices: multiply, divide, exponentiate. Flourish type hint: string, defaults to None. + :type chart_number_date_format_transform: str, optional + :param chart_number_date_format_multiply_divide_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_multiply_divide_constant: float, optional + :param chart_number_date_format_exponentiate_constant: Flourish type hint: number, defaults to None. + :type chart_number_date_format_exponentiate_constant: float, optional + :param chart_number_localization_input_decimal_separator: Decimal separator in data sheet. Choices: ., ,. Used for interpreting your data. Only change if data is not displaying on the chart as expected. Flourish type hint: string, defaults to None. + :type chart_number_localization_input_decimal_separator: str, optional + :param chart_number_localization_output_separators: Number format to display. Choices: ,., .,, ., ,, ., ,. How the numbers should appear on chart labels. Flourish type hint: string, defaults to None. + :type chart_number_localization_output_separators: str, optional + :param chart_popup_mode: Choices: none, popup, panel, both. Flourish type hint: string, defaults to None. + :type chart_popup_mode: str, optional + :param chart_popup_popup_is_custom: Popup content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_is_custom: bool, optional + :param chart_popup_show_popup_styles: Show popup styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_popup_styles: bool, optional + :param chart_popup_popup_custom_header: Popup custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML styling or add category colors to popup headers. To hide parts of the popup when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_header: Union[list, str], optional + :param chart_popup_popup_custom_main: Popup custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for popup use. Advanced users can add HTML for designs, styles, and images. To hide parts of the popup when a column is empty use the syntax `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_popup_custom_main: Union[list, str], optional + :param chart_popup_popup_custom_accessible: Popup custom accessible content. A text alternative to visual custom popup content that will be read out by screenreaders. This content is added as an aria-label attribute to data point elements. You can still use `{{column_name}}` to add values from your data, but do not use HTML. For example: `{{Name}}, Population: {{Population}}, GDP: {{GDP}}`. If left empty, accessible content will fallback to the default popup content. Flourish type hint: text, defaults to None. + :type chart_popup_popup_custom_accessible: Union[list, str], optional + :param chart_popup_popup_width: Max width. In rems, multiples of base font size. Leave blank to let the width adjust based on the contents. Flourish type hint: number, defaults to None. + :type chart_popup_popup_width: float, optional + :param chart_popup_popup_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_popup_font_size: float, optional + :param chart_popup_popup_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_text_color: str, optional + :param chart_popup_popup_align: Align. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_popup_align: str, optional + :param chart_popup_popup_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_popup_background: str, optional + :param chart_popup_popup_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_popup_background_opacity: float, optional + :param chart_popup_popup_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_popup_padding: float, optional + :param chart_popup_popup_radius: Radius. Corner radius of popup. Flourish type hint: number, defaults to None. + :type chart_popup_popup_radius: float, optional + :param chart_popup_popup_header_type: Header style. Choices: block, inline. Flourish type hint: string, defaults to None. + :type chart_popup_popup_header_type: str, optional + :param chart_popup_popup_header_background: Background. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_background: str, optional + :param chart_popup_popup_header_text_color: Text. Flourish type hint: color, defaults to None. + :type chart_popup_popup_header_text_color: str, optional + :param chart_popup_popup_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_type: str, optional + :param chart_popup_popup_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_label_weight: str, optional + :param chart_popup_popup_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_popup_list_separator: str, optional + :param chart_popup_popup_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_shadow: bool, optional + :param chart_popup_popup_pointer: Pointer. Flourish type hint: boolean, defaults to None. + :type chart_popup_popup_pointer: bool, optional + :param chart_popup_panel_position: Choices: overlay, left, right, top, bottom. Flourish type hint: string, defaults to None. + :type chart_popup_panel_position: str, optional + :param chart_popup_panel_open_duration: Open duration. Flourish type hint: number, defaults to None. + :type chart_popup_panel_open_duration: float, optional + :param chart_popup_panel_side_fixed: Always show. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_side_fixed: bool, optional + :param chart_popup_panel_side_default_content: Placeholder content. Flourish type hint: text, defaults to None. + :type chart_popup_panel_side_default_content: Union[list, str], optional + :param chart_popup_panel_is_custom: Panel content. Choices: False, True. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_is_custom: bool, optional + :param chart_popup_show_panel_styles: Show panel styles. Flourish type hint: boolean, defaults to None. + :type chart_popup_show_panel_styles: bool, optional + :param chart_popup_panel_custom_header: Panel custom header. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for styling or add category colors to panel headers. To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_header: Union[list, str], optional + :param chart_popup_panel_custom_main: Panel custom main content. Use `{{column_name}}` to add a value from your data Ensure the column is selected, or add it to Info for popups for panel use. Advanced users can add HTML for designs, styles, images, videos and embedded Flourish charts, To hide parts of the panel when a column is empty using `{{#if column_name}}Content for non-empty column_name{{/if}}`. For example: `{{#if Capital name}}Capital:{{/if}} {{Capital name}}`. Here, the word "Capital:" will only show if the corresponding cell in the "Capital name" column is not empty. Flourish type hint: html, defaults to None. + :type chart_popup_panel_custom_main: Union[list, str], optional + :param chart_popup_panel_width_overlay: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_overlay: float, optional + :param chart_popup_panel_height_overlay: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_overlay: float, optional + :param chart_popup_panel_width_side: Width (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_width_side: float, optional + :param chart_popup_panel_height_side: Height (%). Flourish type hint: number, defaults to None. + :type chart_popup_panel_height_side: float, optional + :param chart_popup_panel_max_width: Max width (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_width: float, optional + :param chart_popup_panel_max_height: Max height (px). Flourish type hint: number, defaults to None. + :type chart_popup_panel_max_height: float, optional + :param chart_popup_panel_vertical_position: Vertical position. Choices: click, center. Choosing Click position is especially useful when your visualization is really tall, this will make sure the panel content is always on top of the element youve clicked on. Flourish type hint: string, defaults to None. + :type chart_popup_panel_vertical_position: str, optional + :param chart_popup_panel_text_color: Text color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_text_color: str, optional + :param chart_popup_panel_font_size: Text size. Flourish type hint: number, defaults to None. + :type chart_popup_panel_font_size: float, optional + :param chart_popup_panel_align: Alignment. Choices: start, center, end. Flourish type hint: string, defaults to None. + :type chart_popup_panel_align: str, optional + :param chart_popup_panel_background: Fill color. Flourish type hint: color, defaults to None. + :type chart_popup_panel_background: str, optional + :param chart_popup_panel_background_opacity: Fill opacity. Flourish type hint: number, defaults to None. + :type chart_popup_panel_background_opacity: float, optional + :param chart_popup_panel_padding: Padding. Flourish type hint: number, defaults to None. + :type chart_popup_panel_padding: float, optional + :param chart_popup_panel_radius: Radius. Corner radius of panel. Flourish type hint: number, defaults to None. + :type chart_popup_panel_radius: float, optional + :param chart_popup_panel_list_type: List type. Choices: table, ul. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_type: str, optional + :param chart_popup_panel_list_label_weight: Label weight. Choices: normal, bold. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_label_weight: str, optional + :param chart_popup_panel_list_separator: List separator. Choices: :, , , `
    `. Flourish type hint: string, defaults to None. + :type chart_popup_panel_list_separator: str, optional + :param chart_popup_panel_shadow: Shadow. Flourish type hint: boolean, defaults to None. + :type chart_popup_panel_shadow: bool, optional + :param chart_layout_body_font: Main font. This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels. Flourish type hint: font, defaults to None. + :type chart_layout_body_font: str, optional + :param chart_layout_font_color: Text color. This color will apply to the whole graphic by default, You can optionally change the color for individual text elements, in other settings panels. Flourish type hint: color, defaults to None. + :type chart_layout_font_color: str, optional + :param chart_layout_background_color_enabled: Color. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_color_enabled: bool, optional + :param chart_layout_background_image_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_background_image_enabled: bool, optional + :param chart_layout_background_color: Background color. Flourish type hint: color, defaults to None. + :type chart_layout_background_color: str, optional + :param chart_layout_background_image_src: Image URL. Flourish type hint: url, defaults to None. + :type chart_layout_background_image_src: str, optional + :param chart_layout_background_image_size: Size. Choices: cover, contain, auto, 100% 100%. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_size: str, optional + :param chart_layout_background_image_position: Position. Choices: top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right. Flourish type hint: string, defaults to None. + :type chart_layout_background_image_position: str, optional + :param chart_layout_max_width_target: Maximum width. Choices: none, wrapper, primary. Apply a maximum width to just the main graphic or everything (main graphic plus header, footer, etc). Flourish type hint: string, defaults to None. + :type chart_layout_max_width_target: str, optional + :param chart_layout_max_width: Maximum width. Leave blank to stretch to container width. Flourish type hint: number, defaults to None. + :type chart_layout_max_width: float, optional + :param chart_layout_max_width_align: Align. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_max_width_align: str, optional + :param chart_layout_layout_order: Layout order. Flourish type hint: string, defaults to None. + :type chart_layout_layout_order: str, optional + :param chart_layout_space_between_sections: Space between sections. Choices: 0.5, 1, 1.5, custom. Flourish type hint: string, defaults to None. + :type chart_layout_space_between_sections: str, optional + :param chart_layout_space_between_sections_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_space_between_sections_custom: float, optional + :param chart_layout_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_margin_top: float, optional + :param chart_layout_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_margin_right: float, optional + :param chart_layout_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_margin_bottom: float, optional + :param chart_layout_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_margin_left: float, optional + :param chart_layout_border_enabled: Show borders around visualisation. Flourish type hint: boolean, defaults to None. + :type chart_layout_border_enabled: bool, optional + :param chart_layout_border_top_width: Top. Flourish type hint: number, defaults to None. + :type chart_layout_border_top_width: float, optional + :param chart_layout_border_top_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_top_style: str, optional + :param chart_layout_border_top_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_top_color: str, optional + :param chart_layout_border_right_width: Right. Flourish type hint: number, defaults to None. + :type chart_layout_border_right_width: float, optional + :param chart_layout_border_right_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_right_style: str, optional + :param chart_layout_border_right_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_right_color: str, optional + :param chart_layout_border_bottom_width: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_border_bottom_width: float, optional + :param chart_layout_border_bottom_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_bottom_style: str, optional + :param chart_layout_border_bottom_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_bottom_color: str, optional + :param chart_layout_border_left_width: Left. Flourish type hint: number, defaults to None. + :type chart_layout_border_left_width: float, optional + :param chart_layout_border_left_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_border_left_style: str, optional + :param chart_layout_border_left_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_border_left_color: str, optional + :param chart_layout_read_direction: Read direction. Choices: ltr, rtl. This will change the reading direction of the main text elements on the page. Its not possible to adjust this on all elements, such as axes. Note that when direction is set to right to left any alignment icons will be reversed. Flourish type hint: string, defaults to None. + :type chart_layout_read_direction: str, optional + :param chart_layout_font_size_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_small: float, optional + :param chart_layout_font_size_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_mobile_big: float, optional + :param chart_layout_font_size_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_tablet: float, optional + :param chart_layout_font_size_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_desktop: float, optional + :param chart_layout_font_size_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_font_size_big_screen: float, optional + :param chart_layout_breakpoint_mobile_small: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_small: float, optional + :param chart_layout_breakpoint_mobile_big: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_mobile_big: float, optional + :param chart_layout_breakpoint_tablet: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_tablet: float, optional + :param chart_layout_breakpoint_desktop: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_desktop: float, optional + :param chart_layout_breakpoint_big_screen: Flourish type hint: number, defaults to None. + :type chart_layout_breakpoint_big_screen: float, optional + :param chart_layout_header_align: Alignment. Choices: left, center, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_align: str, optional + :param chart_layout_title: Flourish type hint: html, defaults to None. + :type chart_layout_title: Union[list, str], optional + :param chart_layout_title_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_title_styling: bool, optional + :param chart_layout_title_font: Title Font. Flourish type hint: font, defaults to None. + :type chart_layout_title_font: str, optional + :param chart_layout_title_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_size: str, optional + :param chart_layout_title_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_title_size_custom: float, optional + :param chart_layout_title_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_title_weight: str, optional + :param chart_layout_title_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_title_color: str, optional + :param chart_layout_title_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_title_line_height: float, optional + :param chart_layout_title_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_title_space_above: str, optional + :param chart_layout_title_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_title_space_above_custom: float, optional + :param chart_layout_subtitle: Flourish type hint: html, defaults to None. + :type chart_layout_subtitle: Union[list, str], optional + :param chart_layout_subtitle_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_subtitle_styling: bool, optional + :param chart_layout_subtitle_font: Subtitle Font. Flourish type hint: font, defaults to None. + :type chart_layout_subtitle_font: str, optional + :param chart_layout_subtitle_size: Size. Choices: 1.4, 1.6, 2, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_size: str, optional + :param chart_layout_subtitle_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_size_custom: float, optional + :param chart_layout_subtitle_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_weight: str, optional + :param chart_layout_subtitle_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_subtitle_color: str, optional + :param chart_layout_subtitle_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_line_height: float, optional + :param chart_layout_subtitle_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_subtitle_space_above: str, optional + :param chart_layout_subtitle_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_subtitle_space_above_custom: float, optional + :param chart_layout_header_text: Flourish type hint: html, defaults to None. + :type chart_layout_header_text: Union[list, str], optional + :param chart_layout_header_text_styling: Styling. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_text_styling: bool, optional + :param chart_layout_header_text_size: Size. Choices: 1.2, 1.4, 1.6, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_size: str, optional + :param chart_layout_header_text_size_custom: Custom. Specify a custom responsive font size in rems The best results will be with values between 1.2 and 3. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_size_custom: float, optional + :param chart_layout_header_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_weight: str, optional + :param chart_layout_header_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_text_color: str, optional + :param chart_layout_header_text_line_height: Line height. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_line_height: float, optional + :param chart_layout_header_text_space_above: Space above. Choices: 0, 0.5, 1, custom. Flourish type hint: string, defaults to None. + :type chart_layout_header_text_space_above: str, optional + :param chart_layout_header_text_space_above_custom: Custom. Flourish type hint: number, defaults to None. + :type chart_layout_header_text_space_above_custom: float, optional + :param chart_layout_header_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_header_border: str, optional + :param chart_layout_header_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_width: float, optional + :param chart_layout_header_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_header_border_color: str, optional + :param chart_layout_header_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_header_border_style: str, optional + :param chart_layout_header_border_space: Space. Space between border and header text. Flourish type hint: number, defaults to None. + :type chart_layout_header_border_space: float, optional + :param chart_layout_header_logo_enabled: Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_header_logo_enabled: bool, optional + :param chart_layout_header_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_header_logo_src: str, optional + :param chart_layout_header_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_alt: str, optional + :param chart_layout_header_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_link_url: str, optional + :param chart_layout_header_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_height: float, optional + :param chart_layout_header_logo_align: Align. Choices: inside, outside. Align logo inside either the header or the main visualization container. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_align: str, optional + :param chart_layout_header_logo_position_inside: Position. Choices: top, left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_inside: str, optional + :param chart_layout_header_logo_position_outside: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_header_logo_position_outside: str, optional + :param chart_layout_header_logo_margin_top: Top. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_top: float, optional + :param chart_layout_header_logo_margin_right: Right. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_right: float, optional + :param chart_layout_header_logo_margin_bottom: Bottom. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_bottom: float, optional + :param chart_layout_header_logo_margin_left: Left. Flourish type hint: number, defaults to None. + :type chart_layout_header_logo_margin_left: float, optional + :param chart_layout_footer_align: Alignment. Choices: left, center, right, justify. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align: str, optional + :param chart_layout_footer_text_size: Size. Flourish type hint: number, defaults to None. + :type chart_layout_footer_text_size: float, optional + :param chart_layout_footer_text_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_text_color: str, optional + :param chart_layout_footer_styling: Advanced footer styles. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_styling: bool, optional + :param chart_layout_footer_font: Font. Flourish type hint: font, defaults to None. + :type chart_layout_footer_font: str, optional + :param chart_layout_footer_text_weight: Weight. Choices: bold, normal. Flourish type hint: string, defaults to None. + :type chart_layout_footer_text_weight: str, optional + :param chart_layout_source_name: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name: str, optional + :param chart_layout_source_url: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url: str, optional + :param chart_layout_multiple_sources: Multiple sources. Flourish type hint: boolean, defaults to None. + :type chart_layout_multiple_sources: bool, optional + :param chart_layout_source_name_2: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_2: str, optional + :param chart_layout_source_url_2: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_2: str, optional + :param chart_layout_source_name_3: Source name. Flourish type hint: string, defaults to None. + :type chart_layout_source_name_3: str, optional + :param chart_layout_source_url_3: Source url. Flourish type hint: string, defaults to None. + :type chart_layout_source_url_3: str, optional + :param chart_layout_source_label: Source label. Flourish type hint: string, defaults to None. + :type chart_layout_source_label: str, optional + :param chart_layout_footer_note: Note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note: Union[list, str], optional + :param chart_layout_footer_note_secondary: Note (secondary). The secondary note is placed below the source and primary note. To add the time/date stamp of when the data was last updated add `{{data_last_updated}}`. For example, "Last updated at `{{data_last_updated}}`". To customize the format, use the advanced options below. Flourish type hint: html, defaults to None. + :type chart_layout_footer_note_secondary: Union[list, str], optional + :param chart_layout_advanced_note_styling: Advanced. Flourish type hint: boolean, defaults to None. + :type chart_layout_advanced_note_styling: bool, optional + :param chart_layout_footer_timestamp_format: Time/date stamp formatting. Choices: %H:%M:%S, %I:%M %p, %H:%M, %H:%M %p, %H:%M:%S, %d %b %Y, %H:%M, %d %b %Y, %H:%M, %d/%m/%Y, %H:%M, %m/%d/%Y, %H:%M, %d-%m-%Y, %H:%M, %m-%d-%Y, %d %b %Y, %m/%d/%Y, %d/%m/%Y, %m-%d-%Y, %d-%m-%Y, %Y-%m-%d, %Y-%m-%d %H:%M:%S. Flourish type hint: string, defaults to None. + :type chart_layout_footer_timestamp_format: str, optional + :param chart_layout_footer_logo_enabled: Image. Choices: True, False. Flourish type hint: boolean, defaults to None. + :type chart_layout_footer_logo_enabled: bool, optional + :param chart_layout_footer_logo_src: Image. Flourish type hint: url, defaults to None. + :type chart_layout_footer_logo_src: str, optional + :param chart_layout_footer_logo_src_light: Image (light version). If provided this version will be used whenever the background color is dark. Flourish type hint: hidden, defaults to None. + :type chart_layout_footer_logo_src_light: str, optional + :param chart_layout_footer_logo_alt: Alt text. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_alt: str, optional + :param chart_layout_footer_logo_link_url: Link. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_link_url: str, optional + :param chart_layout_footer_logo_height: Height. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_height: float, optional + :param chart_layout_footer_logo_margin: Margin. Flourish type hint: number, defaults to None. + :type chart_layout_footer_logo_margin: float, optional + :param chart_layout_footer_logo_order: Position. Choices: left, right. Flourish type hint: string, defaults to None. + :type chart_layout_footer_logo_order: str, optional + :param chart_layout_footer_align_vertical: V. align. Choices: flex-start, center, flex-end. Flourish type hint: string, defaults to None. + :type chart_layout_footer_align_vertical: str, optional + :param chart_layout_footer_border: Choices: top, bottom, top_and_bottom, none. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border: str, optional + :param chart_layout_footer_border_width: Width. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_width: float, optional + :param chart_layout_footer_border_color: Color. Flourish type hint: color, defaults to None. + :type chart_layout_footer_border_color: str, optional + :param chart_layout_footer_border_style: Style. Choices: solid, dashed, dotted. Flourish type hint: string, defaults to None. + :type chart_layout_footer_border_style: str, optional + :param chart_layout_footer_border_space: Space. Space between border and footer text. Flourish type hint: number, defaults to None. + :type chart_layout_footer_border_space: float, optional + :param chart_layout_screenreader_text_primary: Screenreader description. A text alternative to the visual content that will only be visible to screenreaders, e.g. The line chart shows China consistently higher than the other countries since 1990. Do not replicate your title, since that will also be read by screenreaders. Flourish type hint: text, defaults to None. + :type chart_layout_screenreader_text_primary: Union[list, str], optional + :param chart_layout_screenreader_label: Screenreader label. A short text label given to the main Flourish embed wrapper to provide an accessible name that is only visible to screenreaders Added in the form of an "aria-label". Flourish type hint: string, defaults to None. + :type chart_layout_screenreader_label: str, optional + :param chart_layout_screenreader_hide_primary: Screenreader mode for main visual container. Choices: True, False. Whether the main visual container is visible to screenreaders (Text in the header and footer are always available to screenreaders.). Flourish type hint: boolean, defaults to None. + :type chart_layout_screenreader_hide_primary: bool, optional + """ + details_error(self) + + self.state = { + "state": { + "color": {}, + "number_format": {}, + "localization": {}, + "popup": {}, + "layout": { + "border": {"top": {}, "right": {}, "bottom": {}, "left": {}} + }, + } + } + + list_using_tables = [False, True] + [None] + if using_tables not in list_using_tables: + raise ValueError(f"`using_tables` must be one of: [False, True]") + elif using_tables in list_using_tables and using_tables is not None: + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if using_tables in k + } + if len(filtered_dict) > 0: + self.state["state"]["using_tables"] = filtered_dict[using_tables] + self.state["state"]["word_limit"] = word_limit + + if raw_text is not None and len(raw_text) > 1 and isinstance(raw_text, list): + self.state["state"]["raw_text"] = " \n ".join(raw_text) + else: + self.state["state"]["raw_text"] = raw_text + + self.state["state"]["exclusions"] = exclusions + + if ( + excluded_words is not None + and len(excluded_words) > 1 + and isinstance(excluded_words, list) + ): + self.state["state"]["excluded_words"] = " \n ".join(excluded_words) + else: + self.state["state"]["excluded_words"] = excluded_words + + self.state["state"]["strip_trailing_s"] = strip_trailing_s + self.state["state"]["convert_to_lowercase"] = convert_to_lowercase + self.state["state"]["cloud_font"] = cloud_font + self.state["state"]["text_color"] = text_color + self.state["state"]["word_padding"] = word_padding + self.state["state"]["random_seed"] = random_seed + self.state["state"]["angle_min"] = angle_min + self.state["state"]["angle_max"] = angle_max + self.state["state"]["angle_number"] = angle_number + self.state["state"]["font_size_min"] = font_size_min + self.state["state"]["font_size_max"] = font_size_max + + list_size_mode = ["linear", "sqrt", "log"] + [None] + if size_mode not in list_size_mode: + raise ValueError(f"`size_mode` must be one of: ['linear', 'sqrt', 'log']") + elif size_mode in list_size_mode and size_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"linear": "linear", "sqrt": "sqrt", "log": "log"}.items() + if size_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["size_mode"] = filtered_dict[size_mode] + + list_height_mode = ["fill_space", "aspect"] + [None] + if height_mode not in list_height_mode: + raise ValueError(f"`height_mode` must be one of: ['fill_space', 'aspect']") + elif height_mode in list_height_mode and height_mode is not None: + filtered_dict = { + k: v + for (k, v) in {"fill_space": "fill_space", "aspect": "aspect"}.items() + if height_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["height_mode"] = filtered_dict[height_mode] + self.state["state"]["aspect_ratio"] = aspect_ratio + self.state["state"]["aspect_ratio_mobile"] = aspect_ratio_mobile + self.state["state"]["aspect_ratio_breakpoint"] = aspect_ratio_breakpoint + + if ( + chart_color_scale_categorical_palette is not None + and len(chart_color_scale_categorical_palette) > 1 + and isinstance(chart_color_scale_categorical_palette, list) + ): + self.state["state"]["color"]["categorical_palette"] = " \n ".join( + chart_color_scale_categorical_palette + ) + else: + self.state["state"]["color"][ + "categorical_palette" + ] = chart_color_scale_categorical_palette + + self.state["state"]["color"][ + "categorical_extend" + ] = chart_color_scale_categorical_extend + + if ( + chart_color_scale_categorical_custom_palette is not None + and len(chart_color_scale_categorical_custom_palette) > 1 + and isinstance(chart_color_scale_categorical_custom_palette, list) + ): + self.state["state"]["color"]["categorical_custom_palette"] = " \n ".join( + chart_color_scale_categorical_custom_palette + ) + else: + self.state["state"]["color"][ + "categorical_custom_palette" + ] = chart_color_scale_categorical_custom_palette + + list_chart_color_scale_numeric_type = ["sequential", "diverging"] + [None] + if chart_color_scale_numeric_type not in list_chart_color_scale_numeric_type: + raise ValueError( + f"`chart_color_scale_numeric_type` must be one of: ['sequential', 'diverging']" + ) + elif ( + chart_color_scale_numeric_type in list_chart_color_scale_numeric_type + and chart_color_scale_numeric_type is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "sequential": "sequential", + "diverging": "diverging", + }.items() + if chart_color_scale_numeric_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["numeric_type"] = filtered_dict[ + chart_color_scale_numeric_type + ] + + list_chart_color_scale_binning = [False, True] + [None] + if chart_color_scale_binning not in list_chart_color_scale_binning: + raise ValueError( + f"`chart_color_scale_binning` must be one of: [False, True]" + ) + elif ( + chart_color_scale_binning in list_chart_color_scale_binning + and chart_color_scale_binning is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_binning in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["binning"] = filtered_dict[ + chart_color_scale_binning + ] + + list_chart_color_scale_bin_mode = ["fixed", "quantile", "custom"] + [None] + if chart_color_scale_bin_mode not in list_chart_color_scale_bin_mode: + raise ValueError( + f"`chart_color_scale_bin_mode` must be one of: ['fixed', 'quantile', 'custom']" + ) + elif ( + chart_color_scale_bin_mode in list_chart_color_scale_bin_mode + and chart_color_scale_bin_mode is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "fixed": "fixed", + "quantile": "quantile", + "custom": "custom", + }.items() + if chart_color_scale_bin_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["bin_mode"] = filtered_dict[ + chart_color_scale_bin_mode + ] + self.state["state"]["color"]["bin_count"] = chart_color_scale_bin_count + self.state["state"]["color"][ + "bin_thresholds" + ] = chart_color_scale_bin_thresholds + self.state["state"]["color"][ + "sequential_palette" + ] = chart_color_scale_sequential_palette + self.state["state"]["color"][ + "sequential_reverse" + ] = chart_color_scale_sequential_reverse + self.state["state"]["color"][ + "sequential_custom_min" + ] = chart_color_scale_sequential_custom_min + self.state["state"]["color"][ + "sequential_custom_max" + ] = chart_color_scale_sequential_custom_max + + list_chart_color_scale_sequential_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_sequential_color_space + not in list_chart_color_scale_sequential_color_space + ): + raise ValueError( + f"`chart_color_scale_sequential_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_sequential_color_space + in list_chart_color_scale_sequential_color_space + and chart_color_scale_sequential_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_sequential_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["sequential_color_space"] = filtered_dict[ + chart_color_scale_sequential_color_space + ] + + list_chart_color_scale_sequential_custom_domain = [False, True] + [None] + if ( + chart_color_scale_sequential_custom_domain + not in list_chart_color_scale_sequential_custom_domain + ): + raise ValueError( + f"`chart_color_scale_sequential_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_sequential_custom_domain + in list_chart_color_scale_sequential_custom_domain + and chart_color_scale_sequential_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_sequential_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"][ + "sequential_custom_domain" + ] = filtered_dict[chart_color_scale_sequential_custom_domain] + self.state["state"]["color"][ + "sequential_domain_min" + ] = chart_color_scale_sequential_domain_min + self.state["state"]["color"][ + "sequential_domain_max" + ] = chart_color_scale_sequential_domain_max + self.state["state"]["color"][ + "diverging_palette" + ] = chart_color_scale_diverging_palette + self.state["state"]["color"][ + "diverging_reverse" + ] = chart_color_scale_diverging_reverse + self.state["state"]["color"][ + "diverging_custom_min" + ] = chart_color_scale_diverging_custom_min + self.state["state"]["color"][ + "diverging_custom_mid" + ] = chart_color_scale_diverging_custom_mid + self.state["state"]["color"][ + "diverging_custom_max" + ] = chart_color_scale_diverging_custom_max + + list_chart_color_scale_diverging_color_space = ["rgb", "lab", "hcl", "hsl"] + [ + None + ] + if ( + chart_color_scale_diverging_color_space + not in list_chart_color_scale_diverging_color_space + ): + raise ValueError( + f"`chart_color_scale_diverging_color_space` must be one of: ['rgb', 'lab', 'hcl', 'hsl']" + ) + elif ( + chart_color_scale_diverging_color_space + in list_chart_color_scale_diverging_color_space + and chart_color_scale_diverging_color_space is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "rgb": "rgb", + "lab": "lab", + "hcl": "hcl", + "hsl": "hsl", + }.items() + if chart_color_scale_diverging_color_space in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_color_space"] = filtered_dict[ + chart_color_scale_diverging_color_space + ] + + list_chart_color_scale_diverging_custom_domain = [False, True] + [None] + if ( + chart_color_scale_diverging_custom_domain + not in list_chart_color_scale_diverging_custom_domain + ): + raise ValueError( + f"`chart_color_scale_diverging_custom_domain` must be one of: [False, True]" + ) + elif ( + chart_color_scale_diverging_custom_domain + in list_chart_color_scale_diverging_custom_domain + and chart_color_scale_diverging_custom_domain is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_color_scale_diverging_custom_domain in k + } + if len(filtered_dict) > 0: + self.state["state"]["color"]["diverging_custom_domain"] = filtered_dict[ + chart_color_scale_diverging_custom_domain + ] + self.state["state"]["color"][ + "diverging_domain_min" + ] = chart_color_scale_diverging_domain_min + self.state["state"]["color"][ + "diverging_domain_mid" + ] = chart_color_scale_diverging_domain_mid + self.state["state"]["color"][ + "diverging_domain_max" + ] = chart_color_scale_diverging_domain_max + + list_animation_type = ["auto", "fade", "grow", "none"] + [None] + if animation_type not in list_animation_type: + raise ValueError( + f"`animation_type` must be one of: ['auto', 'fade', 'grow', 'none']" + ) + elif animation_type in list_animation_type and animation_type is not None: + filtered_dict = { + k: v + for (k, v) in { + "auto": "auto", + "fade": "fade", + "grow": "grow", + "none": "none", + }.items() + if animation_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["animation_type"] = filtered_dict[animation_type] + self.state["state"]["duration"] = duration + self.state["state"]["stagger"] = stagger + self.state["state"]["number_format"]["prefix"] = chart_number_date_format_prefix + self.state["state"]["number_format"]["suffix"] = chart_number_date_format_suffix + self.state["state"]["number_format"]["n_dec"] = chart_number_date_format_n_dec + self.state["state"]["number_format"][ + "advanced" + ] = chart_number_date_format_advanced + + list_chart_number_date_format_negative_sign = [ + "-$nk", + "$-nk", + "($nk)", + "$(n)k", + "none", + ] + [None] + if ( + chart_number_date_format_negative_sign + not in list_chart_number_date_format_negative_sign + ): + raise ValueError( + f"`chart_number_date_format_negative_sign` must be one of: ['-$nk', '$-nk', '($nk)', '$(n)k', 'none']" + ) + elif ( + chart_number_date_format_negative_sign + in list_chart_number_date_format_negative_sign + and chart_number_date_format_negative_sign is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "-$nk": "-$nk", + "$-nk": "$-nk", + "($nk)": "($nk)", + "$(n)k": "$(n)k", + "none": "none", + }.items() + if chart_number_date_format_negative_sign in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format"]["negative_sign"] = filtered_dict[ + chart_number_date_format_negative_sign + ] + self.state["state"]["number_format"][ + "strip_zeros" + ] = chart_number_date_format_strip_zeros + self.state["state"]["number_format"][ + "strip_separator" + ] = chart_number_date_format_strip_separator + self.state["state"]["number_format"][ + "transform_labels" + ] = chart_number_date_format_transform_labels + + list_chart_number_date_format_transform = [ + "multiply", + "divide", + "exponentiate", + ] + [None] + if ( + chart_number_date_format_transform + not in list_chart_number_date_format_transform + ): + raise ValueError( + f"`chart_number_date_format_transform` must be one of: ['multiply', 'divide', 'exponentiate']" + ) + elif ( + chart_number_date_format_transform + in list_chart_number_date_format_transform + and chart_number_date_format_transform is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "multiply": "multiply", + "divide": "divide", + "exponentiate": "exponentiate", + }.items() + if chart_number_date_format_transform in k + } + if len(filtered_dict) > 0: + self.state["state"]["number_format"]["transform"] = filtered_dict[ + chart_number_date_format_transform + ] + self.state["state"]["number_format"][ + "multiply_divide_constant" + ] = chart_number_date_format_multiply_divide_constant + self.state["state"]["number_format"][ + "exponentiate_constant" + ] = chart_number_date_format_exponentiate_constant + + list_chart_number_localization_input_decimal_separator = [".", ","] + [None] + if ( + chart_number_localization_input_decimal_separator + not in list_chart_number_localization_input_decimal_separator + ): + raise ValueError( + f"`chart_number_localization_input_decimal_separator` must be one of: ['.', ',']" + ) + elif ( + chart_number_localization_input_decimal_separator + in list_chart_number_localization_input_decimal_separator + and chart_number_localization_input_decimal_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in {".": ".", ",": ","}.items() + if chart_number_localization_input_decimal_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "input_decimal_separator" + ] = filtered_dict[chart_number_localization_input_decimal_separator] + + list_chart_number_localization_output_separators = [ + ",.", + ".,", + ".", + ",", + " .", + " ,", + ] + [None] + if ( + chart_number_localization_output_separators + not in list_chart_number_localization_output_separators + ): + raise ValueError( + f"`chart_number_localization_output_separators` must be one of: [',.', '.,', '.', ',', ' .', ' ,']" + ) + elif ( + chart_number_localization_output_separators + in list_chart_number_localization_output_separators + and chart_number_localization_output_separators is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ",.": ",.", + ".,": ".,", + ".": ".", + ",": ",", + " .": " .", + " ,": " ,", + }.items() + if chart_number_localization_output_separators in k + } + if len(filtered_dict) > 0: + self.state["state"]["localization"][ + "output_separators" + ] = filtered_dict[chart_number_localization_output_separators] + + list_chart_popup_mode = ["none", "popup", "panel", "both"] + [None] + if chart_popup_mode not in list_chart_popup_mode: + raise ValueError( + f"`chart_popup_mode` must be one of: ['none', 'popup', 'panel', 'both']" + ) + elif chart_popup_mode in list_chart_popup_mode and chart_popup_mode is not None: + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "popup": "popup", + "panel": "panel", + "both": "both", + }.items() + if chart_popup_mode in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["mode"] = filtered_dict[chart_popup_mode] + + list_chart_popup_popup_is_custom = [False, True] + [None] + if chart_popup_popup_is_custom not in list_chart_popup_popup_is_custom: + raise ValueError( + f"`chart_popup_popup_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_popup_is_custom in list_chart_popup_popup_is_custom + and chart_popup_popup_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_popup_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_is_custom"] = filtered_dict[ + chart_popup_popup_is_custom + ] + self.state["state"]["popup"][ + "show_popup_styles" + ] = chart_popup_show_popup_styles + + if ( + chart_popup_popup_custom_header is not None + and len(chart_popup_popup_custom_header) > 1 + and isinstance(chart_popup_popup_custom_header, list) + ): + self.state["state"]["popup"]["popup_custom_header"] = " \n ".join( + chart_popup_popup_custom_header + ) + else: + self.state["state"]["popup"][ + "popup_custom_header" + ] = chart_popup_popup_custom_header + + if ( + chart_popup_popup_custom_main is not None + and len(chart_popup_popup_custom_main) > 1 + and isinstance(chart_popup_popup_custom_main, list) + ): + self.state["state"]["popup"]["popup_custom_main"] = " \n ".join( + chart_popup_popup_custom_main + ) + else: + self.state["state"]["popup"][ + "popup_custom_main" + ] = chart_popup_popup_custom_main + + if ( + chart_popup_popup_custom_accessible is not None + and len(chart_popup_popup_custom_accessible) > 1 + and isinstance(chart_popup_popup_custom_accessible, list) + ): + self.state["state"]["popup"]["popup_custom_accessible"] = " \n ".join( + chart_popup_popup_custom_accessible + ) + else: + self.state["state"]["popup"][ + "popup_custom_accessible" + ] = chart_popup_popup_custom_accessible + + self.state["state"]["popup"]["popup_width"] = chart_popup_popup_width + self.state["state"]["popup"]["popup_font_size"] = chart_popup_popup_font_size + self.state["state"]["popup"]["popup_text_color"] = chart_popup_popup_text_color + + list_chart_popup_popup_align = ["start", "center", "end"] + [None] + if chart_popup_popup_align not in list_chart_popup_popup_align: + raise ValueError( + f"`chart_popup_popup_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_popup_align in list_chart_popup_popup_align + and chart_popup_popup_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_popup_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_align"] = filtered_dict[ + chart_popup_popup_align + ] + self.state["state"]["popup"]["popup_background"] = chart_popup_popup_background + self.state["state"]["popup"][ + "popup_background_opacity" + ] = chart_popup_popup_background_opacity + self.state["state"]["popup"]["popup_padding"] = chart_popup_popup_padding + self.state["state"]["popup"]["popup_radius"] = chart_popup_popup_radius + + list_chart_popup_popup_header_type = ["block", "inline"] + [None] + if chart_popup_popup_header_type not in list_chart_popup_popup_header_type: + raise ValueError( + f"`chart_popup_popup_header_type` must be one of: ['block', 'inline']" + ) + elif ( + chart_popup_popup_header_type in list_chart_popup_popup_header_type + and chart_popup_popup_header_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"block": "block", "inline": "inline"}.items() + if chart_popup_popup_header_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_header_type"] = filtered_dict[ + chart_popup_popup_header_type + ] + self.state["state"]["popup"][ + "popup_header_background" + ] = chart_popup_popup_header_background + self.state["state"]["popup"][ + "popup_header_text_color" + ] = chart_popup_popup_header_text_color + + list_chart_popup_popup_list_type = ["table", "ul"] + [None] + if chart_popup_popup_list_type not in list_chart_popup_popup_list_type: + raise ValueError( + f"`chart_popup_popup_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_popup_list_type in list_chart_popup_popup_list_type + and chart_popup_popup_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_popup_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_type"] = filtered_dict[ + chart_popup_popup_list_type + ] + + list_chart_popup_popup_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_popup_list_label_weight + not in list_chart_popup_popup_list_label_weight + ): + raise ValueError( + f"`chart_popup_popup_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_popup_list_label_weight + in list_chart_popup_popup_list_label_weight + and chart_popup_popup_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_popup_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_label_weight"] = filtered_dict[ + chart_popup_popup_list_label_weight + ] + + list_chart_popup_popup_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_popup_list_separator + not in list_chart_popup_popup_list_separator + ): + raise ValueError( + f"`chart_popup_popup_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_popup_list_separator in list_chart_popup_popup_list_separator + and chart_popup_popup_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_popup_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["popup_list_separator"] = filtered_dict[ + chart_popup_popup_list_separator + ] + self.state["state"]["popup"]["popup_shadow"] = chart_popup_popup_shadow + self.state["state"]["popup"]["popup_pointer"] = chart_popup_popup_pointer + + list_chart_popup_panel_position = [ + "overlay", + "left", + "right", + "top", + "bottom", + ] + [None] + if chart_popup_panel_position not in list_chart_popup_panel_position: + raise ValueError( + f"`chart_popup_panel_position` must be one of: ['overlay', 'left', 'right', 'top', 'bottom']" + ) + elif ( + chart_popup_panel_position in list_chart_popup_panel_position + and chart_popup_panel_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "overlay": "overlay", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + }.items() + if chart_popup_panel_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_position"] = filtered_dict[ + chart_popup_panel_position + ] + self.state["state"]["popup"][ + "panel_open_duration" + ] = chart_popup_panel_open_duration + self.state["state"]["popup"]["panel_side_fixed"] = chart_popup_panel_side_fixed + + if ( + chart_popup_panel_side_default_content is not None + and len(chart_popup_panel_side_default_content) > 1 + and isinstance(chart_popup_panel_side_default_content, list) + ): + self.state["state"]["popup"]["panel_side_default_content"] = " \n ".join( + chart_popup_panel_side_default_content + ) + else: + self.state["state"]["popup"][ + "panel_side_default_content" + ] = chart_popup_panel_side_default_content + + list_chart_popup_panel_is_custom = [False, True] + [None] + if chart_popup_panel_is_custom not in list_chart_popup_panel_is_custom: + raise ValueError( + f"`chart_popup_panel_is_custom` must be one of: [False, True]" + ) + elif ( + chart_popup_panel_is_custom in list_chart_popup_panel_is_custom + and chart_popup_panel_is_custom is not None + ): + filtered_dict = { + k: v + for (k, v) in {False: False, True: True}.items() + if chart_popup_panel_is_custom in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_is_custom"] = filtered_dict[ + chart_popup_panel_is_custom + ] + self.state["state"]["popup"][ + "show_panel_styles" + ] = chart_popup_show_panel_styles + + if ( + chart_popup_panel_custom_header is not None + and len(chart_popup_panel_custom_header) > 1 + and isinstance(chart_popup_panel_custom_header, list) + ): + self.state["state"]["popup"]["panel_custom_header"] = " \n ".join( + chart_popup_panel_custom_header + ) + else: + self.state["state"]["popup"][ + "panel_custom_header" + ] = chart_popup_panel_custom_header + + if ( + chart_popup_panel_custom_main is not None + and len(chart_popup_panel_custom_main) > 1 + and isinstance(chart_popup_panel_custom_main, list) + ): + self.state["state"]["popup"]["panel_custom_main"] = " \n ".join( + chart_popup_panel_custom_main + ) + else: + self.state["state"]["popup"][ + "panel_custom_main" + ] = chart_popup_panel_custom_main + + self.state["state"]["popup"][ + "panel_width_overlay" + ] = chart_popup_panel_width_overlay + self.state["state"]["popup"][ + "panel_height_overlay" + ] = chart_popup_panel_height_overlay + self.state["state"]["popup"]["panel_width_side"] = chart_popup_panel_width_side + self.state["state"]["popup"][ + "panel_height_side" + ] = chart_popup_panel_height_side + self.state["state"]["popup"]["panel_max_width"] = chart_popup_panel_max_width + self.state["state"]["popup"]["panel_max_height"] = chart_popup_panel_max_height + + list_chart_popup_panel_vertical_position = ["click", "center"] + [None] + if ( + chart_popup_panel_vertical_position + not in list_chart_popup_panel_vertical_position + ): + raise ValueError( + f"`chart_popup_panel_vertical_position` must be one of: ['click', 'center']" + ) + elif ( + chart_popup_panel_vertical_position + in list_chart_popup_panel_vertical_position + and chart_popup_panel_vertical_position is not None + ): + filtered_dict = { + k: v + for (k, v) in {"click": "click", "center": "center"}.items() + if chart_popup_panel_vertical_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_vertical_position"] = filtered_dict[ + chart_popup_panel_vertical_position + ] + self.state["state"]["popup"]["panel_text_color"] = chart_popup_panel_text_color + self.state["state"]["popup"]["panel_font_size"] = chart_popup_panel_font_size + + list_chart_popup_panel_align = ["start", "center", "end"] + [None] + if chart_popup_panel_align not in list_chart_popup_panel_align: + raise ValueError( + f"`chart_popup_panel_align` must be one of: ['start', 'center', 'end']" + ) + elif ( + chart_popup_panel_align in list_chart_popup_panel_align + and chart_popup_panel_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "start": "start", + "center": "center", + "end": "end", + }.items() + if chart_popup_panel_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_align"] = filtered_dict[ + chart_popup_panel_align + ] + self.state["state"]["popup"]["panel_background"] = chart_popup_panel_background + self.state["state"]["popup"][ + "panel_background_opacity" + ] = chart_popup_panel_background_opacity + self.state["state"]["popup"]["panel_padding"] = chart_popup_panel_padding + self.state["state"]["popup"]["panel_radius"] = chart_popup_panel_radius + + list_chart_popup_panel_list_type = ["table", "ul"] + [None] + if chart_popup_panel_list_type not in list_chart_popup_panel_list_type: + raise ValueError( + f"`chart_popup_panel_list_type` must be one of: ['table', 'ul']" + ) + elif ( + chart_popup_panel_list_type in list_chart_popup_panel_list_type + and chart_popup_panel_list_type is not None + ): + filtered_dict = { + k: v + for (k, v) in {"table": "table", "ul": "ul"}.items() + if chart_popup_panel_list_type in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_type"] = filtered_dict[ + chart_popup_panel_list_type + ] + + list_chart_popup_panel_list_label_weight = ["normal", "bold"] + [None] + if ( + chart_popup_panel_list_label_weight + not in list_chart_popup_panel_list_label_weight + ): + raise ValueError( + f"`chart_popup_panel_list_label_weight` must be one of: ['normal', 'bold']" + ) + elif ( + chart_popup_panel_list_label_weight + in list_chart_popup_panel_list_label_weight + and chart_popup_panel_list_label_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"normal": "normal", "bold": "bold"}.items() + if chart_popup_panel_list_label_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_label_weight"] = filtered_dict[ + chart_popup_panel_list_label_weight + ] + + list_chart_popup_panel_list_separator = [": ", " ", " ", "
    "] + [None] + if ( + chart_popup_panel_list_separator + not in list_chart_popup_panel_list_separator + ): + raise ValueError( + f"`chart_popup_panel_list_separator` must be one of: [': ', ' ', ' ', '
    ']" + ) + elif ( + chart_popup_panel_list_separator in list_chart_popup_panel_list_separator + and chart_popup_panel_list_separator is not None + ): + filtered_dict = { + k: v + for (k, v) in { + ": ": ": ", + " – ": " – ", + " ": " ", + "
    ": "
    ", + }.items() + if chart_popup_panel_list_separator in k + } + if len(filtered_dict) > 0: + self.state["state"]["popup"]["panel_list_separator"] = filtered_dict[ + chart_popup_panel_list_separator + ] + self.state["state"]["popup"]["panel_shadow"] = chart_popup_panel_shadow + self.state["state"]["layout"]["body_font"] = chart_layout_body_font + self.state["state"]["layout"]["font_color"] = chart_layout_font_color + + list_chart_layout_background_color_enabled = [True, False] + [None] + if ( + chart_layout_background_color_enabled + not in list_chart_layout_background_color_enabled + ): + raise ValueError( + f"`chart_layout_background_color_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_color_enabled + in list_chart_layout_background_color_enabled + and chart_layout_background_color_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_color_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_color_enabled" + ] = filtered_dict[chart_layout_background_color_enabled] + + list_chart_layout_background_image_enabled = [True, False] + [None] + if ( + chart_layout_background_image_enabled + not in list_chart_layout_background_image_enabled + ): + raise ValueError( + f"`chart_layout_background_image_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_background_image_enabled + in list_chart_layout_background_image_enabled + and chart_layout_background_image_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_background_image_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_enabled" + ] = filtered_dict[chart_layout_background_image_enabled] + self.state["state"]["layout"][ + "background_color" + ] = chart_layout_background_color + self.state["state"]["layout"][ + "background_image_src" + ] = chart_layout_background_image_src + + list_chart_layout_background_image_size = [ + "cover", + "contain", + "auto", + "100% 100%", + ] + [None] + if ( + chart_layout_background_image_size + not in list_chart_layout_background_image_size + ): + raise ValueError( + f"`chart_layout_background_image_size` must be one of: ['cover', 'contain', 'auto', '100% 100%']" + ) + elif ( + chart_layout_background_image_size + in list_chart_layout_background_image_size + and chart_layout_background_image_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "cover": "cover", + "contain": "contain", + "auto": "auto", + "100% 100%": "100% 100%", + }.items() + if chart_layout_background_image_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["background_image_size"] = filtered_dict[ + chart_layout_background_image_size + ] + + list_chart_layout_background_image_position = [ + "top left", + "top center", + "top right", + "center left", + "center center", + "center right", + "bottom left", + "bottom center", + "bottom right", + ] + [None] + if ( + chart_layout_background_image_position + not in list_chart_layout_background_image_position + ): + raise ValueError( + f"`chart_layout_background_image_position` must be one of: ['top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right']" + ) + elif ( + chart_layout_background_image_position + in list_chart_layout_background_image_position + and chart_layout_background_image_position is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top left": "top left", + "top center": "top center", + "top right": "top right", + "center left": "center left", + "center center": "center center", + "center right": "center right", + "bottom left": "bottom left", + "bottom center": "bottom center", + "bottom right": "bottom right", + }.items() + if chart_layout_background_image_position in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "background_image_position" + ] = filtered_dict[chart_layout_background_image_position] + + list_chart_layout_max_width_target = ["none", "wrapper", "primary"] + [None] + if chart_layout_max_width_target not in list_chart_layout_max_width_target: + raise ValueError( + f"`chart_layout_max_width_target` must be one of: ['none', 'wrapper', 'primary']" + ) + elif ( + chart_layout_max_width_target in list_chart_layout_max_width_target + and chart_layout_max_width_target is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "none": "none", + "wrapper": "wrapper", + "primary": "primary", + }.items() + if chart_layout_max_width_target in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_target"] = filtered_dict[ + chart_layout_max_width_target + ] + self.state["state"]["layout"]["max_width"] = chart_layout_max_width + + list_chart_layout_max_width_align = ["left", "center", "right"] + [None] + if chart_layout_max_width_align not in list_chart_layout_max_width_align: + raise ValueError( + f"`chart_layout_max_width_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_max_width_align in list_chart_layout_max_width_align + and chart_layout_max_width_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_max_width_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["max_width_align"] = filtered_dict[ + chart_layout_max_width_align + ] + self.state["state"]["layout"]["layout_order"] = chart_layout_layout_order + + list_chart_layout_space_between_sections = ["0.5", "1", "1.5", "custom"] + [ + None + ] + if ( + chart_layout_space_between_sections + not in list_chart_layout_space_between_sections + ): + raise ValueError( + f"`chart_layout_space_between_sections` must be one of: ['0.5', '1', '1.5', 'custom']" + ) + elif ( + chart_layout_space_between_sections + in list_chart_layout_space_between_sections + and chart_layout_space_between_sections is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0.5": "0.5", + "1": "1", + "1.5": "1.5", + "custom": "custom", + }.items() + if chart_layout_space_between_sections in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["space_between_sections"] = filtered_dict[ + chart_layout_space_between_sections + ] + self.state["state"]["layout"][ + "space_between_sections_custom" + ] = chart_layout_space_between_sections_custom + self.state["state"]["layout"]["margin_top"] = chart_layout_margin_top + self.state["state"]["layout"]["margin_right"] = chart_layout_margin_right + self.state["state"]["layout"]["margin_bottom"] = chart_layout_margin_bottom + self.state["state"]["layout"]["margin_left"] = chart_layout_margin_left + self.state["state"]["layout"]["border"]["enabled"] = chart_layout_border_enabled + self.state["state"]["layout"]["border"]["top"][ + "width" + ] = chart_layout_border_top_width + + list_chart_layout_border_top_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_top_style not in list_chart_layout_border_top_style: + raise ValueError( + f"`chart_layout_border_top_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_top_style in list_chart_layout_border_top_style + and chart_layout_border_top_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_top_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["top"]["style"] = filtered_dict[ + chart_layout_border_top_style + ] + self.state["state"]["layout"]["border"]["top"][ + "color" + ] = chart_layout_border_top_color + self.state["state"]["layout"]["border"]["right"][ + "width" + ] = chart_layout_border_right_width + + list_chart_layout_border_right_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_right_style not in list_chart_layout_border_right_style: + raise ValueError( + f"`chart_layout_border_right_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_right_style in list_chart_layout_border_right_style + and chart_layout_border_right_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_right_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["right"][ + "style" + ] = filtered_dict[chart_layout_border_right_style] + self.state["state"]["layout"]["border"]["right"][ + "color" + ] = chart_layout_border_right_color + self.state["state"]["layout"]["border"]["bottom"][ + "width" + ] = chart_layout_border_bottom_width + + list_chart_layout_border_bottom_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_border_bottom_style + not in list_chart_layout_border_bottom_style + ): + raise ValueError( + f"`chart_layout_border_bottom_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_bottom_style in list_chart_layout_border_bottom_style + and chart_layout_border_bottom_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_bottom_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["bottom"][ + "style" + ] = filtered_dict[chart_layout_border_bottom_style] + self.state["state"]["layout"]["border"]["bottom"][ + "color" + ] = chart_layout_border_bottom_color + self.state["state"]["layout"]["border"]["left"][ + "width" + ] = chart_layout_border_left_width + + list_chart_layout_border_left_style = ["solid", "dashed", "dotted"] + [None] + if chart_layout_border_left_style not in list_chart_layout_border_left_style: + raise ValueError( + f"`chart_layout_border_left_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_border_left_style in list_chart_layout_border_left_style + and chart_layout_border_left_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_border_left_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["border"]["left"][ + "style" + ] = filtered_dict[chart_layout_border_left_style] + self.state["state"]["layout"]["border"]["left"][ + "color" + ] = chart_layout_border_left_color + + list_chart_layout_read_direction = ["ltr", "rtl"] + [None] + if chart_layout_read_direction not in list_chart_layout_read_direction: + raise ValueError( + f"`chart_layout_read_direction` must be one of: ['ltr', 'rtl']" + ) + elif ( + chart_layout_read_direction in list_chart_layout_read_direction + and chart_layout_read_direction is not None + ): + filtered_dict = { + k: v + for (k, v) in {"ltr": "ltr", "rtl": "rtl"}.items() + if chart_layout_read_direction in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["read_direction"] = filtered_dict[ + chart_layout_read_direction + ] + self.state["state"]["layout"][ + "font_size_mobile_small" + ] = chart_layout_font_size_mobile_small + self.state["state"]["layout"][ + "font_size_mobile_big" + ] = chart_layout_font_size_mobile_big + self.state["state"]["layout"][ + "font_size_tablet" + ] = chart_layout_font_size_tablet + self.state["state"]["layout"][ + "font_size_desktop" + ] = chart_layout_font_size_desktop + self.state["state"]["layout"][ + "font_size_big_screen" + ] = chart_layout_font_size_big_screen + self.state["state"]["layout"][ + "breakpoint_mobile_small" + ] = chart_layout_breakpoint_mobile_small + self.state["state"]["layout"][ + "breakpoint_mobile_big" + ] = chart_layout_breakpoint_mobile_big + self.state["state"]["layout"][ + "breakpoint_tablet" + ] = chart_layout_breakpoint_tablet + self.state["state"]["layout"][ + "breakpoint_desktop" + ] = chart_layout_breakpoint_desktop + self.state["state"]["layout"][ + "breakpoint_big_screen" + ] = chart_layout_breakpoint_big_screen + + list_chart_layout_header_align = ["left", "center", "right"] + [None] + if chart_layout_header_align not in list_chart_layout_header_align: + raise ValueError( + f"`chart_layout_header_align` must be one of: ['left', 'center', 'right']" + ) + elif ( + chart_layout_header_align in list_chart_layout_header_align + and chart_layout_header_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + }.items() + if chart_layout_header_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_align"] = filtered_dict[ + chart_layout_header_align + ] + + if ( + chart_layout_title is not None + and len(chart_layout_title) > 1 + and isinstance(chart_layout_title, list) + ): + self.state["state"]["layout"]["title"] = " \n ".join(chart_layout_title) + else: + self.state["state"]["layout"]["title"] = chart_layout_title + + self.state["state"]["layout"]["title_styling"] = chart_layout_title_styling + self.state["state"]["layout"]["title_font"] = chart_layout_title_font + + list_chart_layout_title_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_title_size not in list_chart_layout_title_size: + raise ValueError( + f"`chart_layout_title_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_title_size in list_chart_layout_title_size + and chart_layout_title_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_title_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_size"] = filtered_dict[ + chart_layout_title_size + ] + self.state["state"]["layout"][ + "title_size_custom" + ] = chart_layout_title_size_custom + + list_chart_layout_title_weight = ["bold", "normal"] + [None] + if chart_layout_title_weight not in list_chart_layout_title_weight: + raise ValueError( + f"`chart_layout_title_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_title_weight in list_chart_layout_title_weight + and chart_layout_title_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_title_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_weight"] = filtered_dict[ + chart_layout_title_weight + ] + self.state["state"]["layout"]["title_color"] = chart_layout_title_color + self.state["state"]["layout"][ + "title_line_height" + ] = chart_layout_title_line_height + + list_chart_layout_title_space_above = ["0", "0.5", "1", "custom"] + [None] + if chart_layout_title_space_above not in list_chart_layout_title_space_above: + raise ValueError( + f"`chart_layout_title_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_title_space_above in list_chart_layout_title_space_above + and chart_layout_title_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_title_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["title_space_above"] = filtered_dict[ + chart_layout_title_space_above + ] + self.state["state"]["layout"][ + "title_space_above_custom" + ] = chart_layout_title_space_above_custom + + if ( + chart_layout_subtitle is not None + and len(chart_layout_subtitle) > 1 + and isinstance(chart_layout_subtitle, list) + ): + self.state["state"]["layout"]["subtitle"] = " \n ".join( + chart_layout_subtitle + ) + else: + self.state["state"]["layout"]["subtitle"] = chart_layout_subtitle + + self.state["state"]["layout"][ + "subtitle_styling" + ] = chart_layout_subtitle_styling + self.state["state"]["layout"]["subtitle_font"] = chart_layout_subtitle_font + + list_chart_layout_subtitle_size = ["1.4", "1.6", "2", "custom"] + [None] + if chart_layout_subtitle_size not in list_chart_layout_subtitle_size: + raise ValueError( + f"`chart_layout_subtitle_size` must be one of: ['1.4', '1.6', '2', 'custom']" + ) + elif ( + chart_layout_subtitle_size in list_chart_layout_subtitle_size + and chart_layout_subtitle_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.4": "1.4", + "1.6": "1.6", + "2": "2", + "custom": "custom", + }.items() + if chart_layout_subtitle_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_size"] = filtered_dict[ + chart_layout_subtitle_size + ] + self.state["state"]["layout"][ + "subtitle_size_custom" + ] = chart_layout_subtitle_size_custom + + list_chart_layout_subtitle_weight = ["bold", "normal"] + [None] + if chart_layout_subtitle_weight not in list_chart_layout_subtitle_weight: + raise ValueError( + f"`chart_layout_subtitle_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_subtitle_weight in list_chart_layout_subtitle_weight + and chart_layout_subtitle_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_subtitle_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_weight"] = filtered_dict[ + chart_layout_subtitle_weight + ] + self.state["state"]["layout"]["subtitle_color"] = chart_layout_subtitle_color + self.state["state"]["layout"][ + "subtitle_line_height" + ] = chart_layout_subtitle_line_height + + list_chart_layout_subtitle_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_subtitle_space_above + not in list_chart_layout_subtitle_space_above + ): + raise ValueError( + f"`chart_layout_subtitle_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_subtitle_space_above in list_chart_layout_subtitle_space_above + and chart_layout_subtitle_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_subtitle_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["subtitle_space_above"] = filtered_dict[ + chart_layout_subtitle_space_above + ] + self.state["state"]["layout"][ + "subtitle_space_above_custom" + ] = chart_layout_subtitle_space_above_custom + + if ( + chart_layout_header_text is not None + and len(chart_layout_header_text) > 1 + and isinstance(chart_layout_header_text, list) + ): + self.state["state"]["layout"]["header_text"] = " \n ".join( + chart_layout_header_text + ) + else: + self.state["state"]["layout"]["header_text"] = chart_layout_header_text + + self.state["state"]["layout"][ + "header_text_styling" + ] = chart_layout_header_text_styling + + list_chart_layout_header_text_size = ["1.2", "1.4", "1.6", "custom"] + [None] + if chart_layout_header_text_size not in list_chart_layout_header_text_size: + raise ValueError( + f"`chart_layout_header_text_size` must be one of: ['1.2', '1.4', '1.6', 'custom']" + ) + elif ( + chart_layout_header_text_size in list_chart_layout_header_text_size + and chart_layout_header_text_size is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "1.2": "1.2", + "1.4": "1.4", + "1.6": "1.6", + "custom": "custom", + }.items() + if chart_layout_header_text_size in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_size"] = filtered_dict[ + chart_layout_header_text_size + ] + self.state["state"]["layout"][ + "header_text_size_custom" + ] = chart_layout_header_text_size_custom + + list_chart_layout_header_text_weight = ["bold", "normal"] + [None] + if chart_layout_header_text_weight not in list_chart_layout_header_text_weight: + raise ValueError( + f"`chart_layout_header_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_header_text_weight in list_chart_layout_header_text_weight + and chart_layout_header_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_header_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_text_weight"] = filtered_dict[ + chart_layout_header_text_weight + ] + self.state["state"]["layout"][ + "header_text_color" + ] = chart_layout_header_text_color + self.state["state"]["layout"][ + "header_text_line_height" + ] = chart_layout_header_text_line_height + + list_chart_layout_header_text_space_above = ["0", "0.5", "1", "custom"] + [None] + if ( + chart_layout_header_text_space_above + not in list_chart_layout_header_text_space_above + ): + raise ValueError( + f"`chart_layout_header_text_space_above` must be one of: ['0', '0.5', '1', 'custom']" + ) + elif ( + chart_layout_header_text_space_above + in list_chart_layout_header_text_space_above + and chart_layout_header_text_space_above is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "0": "0", + "0.5": "0.5", + "1": "1", + "custom": "custom", + }.items() + if chart_layout_header_text_space_above in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_text_space_above" + ] = filtered_dict[chart_layout_header_text_space_above] + self.state["state"]["layout"][ + "header_text_space_above_custom" + ] = chart_layout_header_text_space_above_custom + + list_chart_layout_header_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_header_border not in list_chart_layout_header_border: + raise ValueError( + f"`chart_layout_header_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_header_border in list_chart_layout_header_border + and chart_layout_header_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_header_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border"] = filtered_dict[ + chart_layout_header_border + ] + self.state["state"]["layout"][ + "header_border_width" + ] = chart_layout_header_border_width + self.state["state"]["layout"][ + "header_border_color" + ] = chart_layout_header_border_color + + list_chart_layout_header_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_header_border_style + not in list_chart_layout_header_border_style + ): + raise ValueError( + f"`chart_layout_header_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_header_border_style in list_chart_layout_header_border_style + and chart_layout_header_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_header_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_border_style"] = filtered_dict[ + chart_layout_header_border_style + ] + self.state["state"]["layout"][ + "header_border_space" + ] = chart_layout_header_border_space + + list_chart_layout_header_logo_enabled = [True, False] + [None] + if ( + chart_layout_header_logo_enabled + not in list_chart_layout_header_logo_enabled + ): + raise ValueError( + f"`chart_layout_header_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_header_logo_enabled in list_chart_layout_header_logo_enabled + and chart_layout_header_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_header_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_enabled"] = filtered_dict[ + chart_layout_header_logo_enabled + ] + self.state["state"]["layout"]["header_logo_src"] = chart_layout_header_logo_src + self.state["state"]["layout"]["header_logo_alt"] = chart_layout_header_logo_alt + self.state["state"]["layout"][ + "header_logo_link_url" + ] = chart_layout_header_logo_link_url + self.state["state"]["layout"][ + "header_logo_height" + ] = chart_layout_header_logo_height + + list_chart_layout_header_logo_align = ["inside", "outside"] + [None] + if chart_layout_header_logo_align not in list_chart_layout_header_logo_align: + raise ValueError( + f"`chart_layout_header_logo_align` must be one of: ['inside', 'outside']" + ) + elif ( + chart_layout_header_logo_align in list_chart_layout_header_logo_align + and chart_layout_header_logo_align is not None + ): + filtered_dict = { + k: v + for (k, v) in {"inside": "inside", "outside": "outside"}.items() + if chart_layout_header_logo_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["header_logo_align"] = filtered_dict[ + chart_layout_header_logo_align + ] + + list_chart_layout_header_logo_position_inside = ["top", "left", "right"] + [ + None + ] + if ( + chart_layout_header_logo_position_inside + not in list_chart_layout_header_logo_position_inside + ): + raise ValueError( + f"`chart_layout_header_logo_position_inside` must be one of: ['top', 'left', 'right']" + ) + elif ( + chart_layout_header_logo_position_inside + in list_chart_layout_header_logo_position_inside + and chart_layout_header_logo_position_inside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"top": "top", "left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_inside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_inside" + ] = filtered_dict[chart_layout_header_logo_position_inside] + + list_chart_layout_header_logo_position_outside = ["left", "right"] + [None] + if ( + chart_layout_header_logo_position_outside + not in list_chart_layout_header_logo_position_outside + ): + raise ValueError( + f"`chart_layout_header_logo_position_outside` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_header_logo_position_outside + in list_chart_layout_header_logo_position_outside + and chart_layout_header_logo_position_outside is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_header_logo_position_outside in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "header_logo_position_outside" + ] = filtered_dict[chart_layout_header_logo_position_outside] + self.state["state"]["layout"][ + "header_logo_margin_top" + ] = chart_layout_header_logo_margin_top + self.state["state"]["layout"][ + "header_logo_margin_right" + ] = chart_layout_header_logo_margin_right + self.state["state"]["layout"][ + "header_logo_margin_bottom" + ] = chart_layout_header_logo_margin_bottom + self.state["state"]["layout"][ + "header_logo_margin_left" + ] = chart_layout_header_logo_margin_left + + list_chart_layout_footer_align = ["left", "center", "right", "justify"] + [None] + if chart_layout_footer_align not in list_chart_layout_footer_align: + raise ValueError( + f"`chart_layout_footer_align` must be one of: ['left', 'center', 'right', 'justify']" + ) + elif ( + chart_layout_footer_align in list_chart_layout_footer_align + and chart_layout_footer_align is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + }.items() + if chart_layout_footer_align in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align"] = filtered_dict[ + chart_layout_footer_align + ] + self.state["state"]["layout"][ + "footer_text_size" + ] = chart_layout_footer_text_size + self.state["state"]["layout"][ + "footer_text_color" + ] = chart_layout_footer_text_color + self.state["state"]["layout"]["footer_styling"] = chart_layout_footer_styling + self.state["state"]["layout"]["footer_font"] = chart_layout_footer_font + + list_chart_layout_footer_text_weight = ["bold", "normal"] + [None] + if chart_layout_footer_text_weight not in list_chart_layout_footer_text_weight: + raise ValueError( + f"`chart_layout_footer_text_weight` must be one of: ['bold', 'normal']" + ) + elif ( + chart_layout_footer_text_weight in list_chart_layout_footer_text_weight + and chart_layout_footer_text_weight is not None + ): + filtered_dict = { + k: v + for (k, v) in {"bold": "bold", "normal": "normal"}.items() + if chart_layout_footer_text_weight in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_text_weight"] = filtered_dict[ + chart_layout_footer_text_weight + ] + self.state["state"]["layout"]["source_name"] = chart_layout_source_name + self.state["state"]["layout"]["source_url"] = chart_layout_source_url + self.state["state"]["layout"][ + "multiple_sources" + ] = chart_layout_multiple_sources + self.state["state"]["layout"]["source_name_2"] = chart_layout_source_name_2 + self.state["state"]["layout"]["source_url_2"] = chart_layout_source_url_2 + self.state["state"]["layout"]["source_name_3"] = chart_layout_source_name_3 + self.state["state"]["layout"]["source_url_3"] = chart_layout_source_url_3 + self.state["state"]["layout"]["source_label"] = chart_layout_source_label + + if ( + chart_layout_footer_note is not None + and len(chart_layout_footer_note) > 1 + and isinstance(chart_layout_footer_note, list) + ): + self.state["state"]["layout"]["footer_note"] = " \n ".join( + chart_layout_footer_note + ) + else: + self.state["state"]["layout"]["footer_note"] = chart_layout_footer_note + + if ( + chart_layout_footer_note_secondary is not None + and len(chart_layout_footer_note_secondary) > 1 + and isinstance(chart_layout_footer_note_secondary, list) + ): + self.state["state"]["layout"]["footer_note_secondary"] = " \n ".join( + chart_layout_footer_note_secondary + ) + else: + self.state["state"]["layout"][ + "footer_note_secondary" + ] = chart_layout_footer_note_secondary + + self.state["state"]["layout"][ + "advanced_note_styling" + ] = chart_layout_advanced_note_styling + + list_chart_layout_footer_timestamp_format = [ + "%H:%M:%S", + "%I:%M %p", + "%H:%M", + "%H:%M %p", + "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y", + "%d %b %Y", + "%m/%d/%Y", + "%d/%m/%Y", + "%m-%d-%Y", + "%d-%m-%Y", + "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S", + ] + [None] + if ( + chart_layout_footer_timestamp_format + not in list_chart_layout_footer_timestamp_format + ): + raise ValueError( + f"`chart_layout_footer_timestamp_format` must be one of: ['%H:%M:%S', '%I:%M %p', '%H:%M', '%H:%M %p', '%H:%M:%S, %d %b %Y', '%H:%M, %d %b %Y', '%H:%M, %d/%m/%Y', '%H:%M, %m/%d/%Y', '%H:%M, %d-%m-%Y', '%H:%M, %m-%d-%Y', '%d %b %Y', '%m/%d/%Y', '%d/%m/%Y', '%m-%d-%Y', '%d-%m-%Y', '%Y-%m-%d', '%Y-%m-%d %H:%M:%S']" + ) + elif ( + chart_layout_footer_timestamp_format + in list_chart_layout_footer_timestamp_format + and chart_layout_footer_timestamp_format is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "%H:%M:%S": "%H:%M:%S", + "%I:%M %p": "%I:%M %p", + "%H:%M": "%H:%M", + "%H:%M %p": "%H:%M %p", + "%H:%M:%S, %d %b %Y": "%H:%M:%S, %d %b %Y", + "%H:%M, %d %b %Y": "%H:%M, %d %b %Y", + "%H:%M, %d/%m/%Y": "%H:%M, %d/%m/%Y", + "%H:%M, %m/%d/%Y": "%H:%M, %m/%d/%Y", + "%H:%M, %d-%m-%Y": "%H:%M, %d-%m-%Y", + "%H:%M, %m-%d-%Y": "%H:%M, %m-%d-%Y", + "%d %b %Y": "%d %b %Y", + "%m/%d/%Y": "%m/%d/%Y", + "%d/%m/%Y": "%d/%m/%Y", + "%m-%d-%Y": "%m-%d-%Y", + "%d-%m-%Y": "%d-%m-%Y", + "%Y-%m-%d": "%Y-%m-%d", + "%Y-%m-%d %H:%M:%S": "%Y-%m-%d %H:%M:%S", + }.items() + if chart_layout_footer_timestamp_format in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "footer_timestamp_format" + ] = filtered_dict[chart_layout_footer_timestamp_format] + + list_chart_layout_footer_logo_enabled = [True, False] + [None] + if ( + chart_layout_footer_logo_enabled + not in list_chart_layout_footer_logo_enabled + ): + raise ValueError( + f"`chart_layout_footer_logo_enabled` must be one of: [True, False]" + ) + elif ( + chart_layout_footer_logo_enabled in list_chart_layout_footer_logo_enabled + and chart_layout_footer_logo_enabled is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_footer_logo_enabled in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_enabled"] = filtered_dict[ + chart_layout_footer_logo_enabled + ] + self.state["state"]["layout"]["footer_logo_src"] = chart_layout_footer_logo_src + self.state["state"]["layout"][ + "footer_logo_src_light" + ] = chart_layout_footer_logo_src_light + self.state["state"]["layout"]["footer_logo_alt"] = chart_layout_footer_logo_alt + self.state["state"]["layout"][ + "footer_logo_link_url" + ] = chart_layout_footer_logo_link_url + self.state["state"]["layout"][ + "footer_logo_height" + ] = chart_layout_footer_logo_height + self.state["state"]["layout"][ + "footer_logo_margin" + ] = chart_layout_footer_logo_margin + + list_chart_layout_footer_logo_order = ["left", "right"] + [None] + if chart_layout_footer_logo_order not in list_chart_layout_footer_logo_order: + raise ValueError( + f"`chart_layout_footer_logo_order` must be one of: ['left', 'right']" + ) + elif ( + chart_layout_footer_logo_order in list_chart_layout_footer_logo_order + and chart_layout_footer_logo_order is not None + ): + filtered_dict = { + k: v + for (k, v) in {"left": "left", "right": "right"}.items() + if chart_layout_footer_logo_order in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_logo_order"] = filtered_dict[ + chart_layout_footer_logo_order + ] + + list_chart_layout_footer_align_vertical = [ + "flex-start", + "center", + "flex-end", + ] + [None] + if ( + chart_layout_footer_align_vertical + not in list_chart_layout_footer_align_vertical + ): + raise ValueError( + f"`chart_layout_footer_align_vertical` must be one of: ['flex-start', 'center', 'flex-end']" + ) + elif ( + chart_layout_footer_align_vertical + in list_chart_layout_footer_align_vertical + and chart_layout_footer_align_vertical is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "flex-start": "flex-start", + "center": "center", + "flex-end": "flex-end", + }.items() + if chart_layout_footer_align_vertical in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_align_vertical"] = filtered_dict[ + chart_layout_footer_align_vertical + ] + + list_chart_layout_footer_border = [ + "top", + "bottom", + "top_and_bottom", + "none", + ] + [None] + if chart_layout_footer_border not in list_chart_layout_footer_border: + raise ValueError( + f"`chart_layout_footer_border` must be one of: ['top', 'bottom', 'top_and_bottom', 'none']" + ) + elif ( + chart_layout_footer_border in list_chart_layout_footer_border + and chart_layout_footer_border is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "top": "top", + "bottom": "bottom", + "top_and_bottom": "top_and_bottom", + "none": "none", + }.items() + if chart_layout_footer_border in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border"] = filtered_dict[ + chart_layout_footer_border + ] + self.state["state"]["layout"][ + "footer_border_width" + ] = chart_layout_footer_border_width + self.state["state"]["layout"][ + "footer_border_color" + ] = chart_layout_footer_border_color + + list_chart_layout_footer_border_style = ["solid", "dashed", "dotted"] + [None] + if ( + chart_layout_footer_border_style + not in list_chart_layout_footer_border_style + ): + raise ValueError( + f"`chart_layout_footer_border_style` must be one of: ['solid', 'dashed', 'dotted']" + ) + elif ( + chart_layout_footer_border_style in list_chart_layout_footer_border_style + and chart_layout_footer_border_style is not None + ): + filtered_dict = { + k: v + for (k, v) in { + "solid": "solid", + "dashed": "dashed", + "dotted": "dotted", + }.items() + if chart_layout_footer_border_style in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"]["footer_border_style"] = filtered_dict[ + chart_layout_footer_border_style + ] + self.state["state"]["layout"][ + "footer_border_space" + ] = chart_layout_footer_border_space + + if ( + chart_layout_screenreader_text_primary is not None + and len(chart_layout_screenreader_text_primary) > 1 + and isinstance(chart_layout_screenreader_text_primary, list) + ): + self.state["state"]["layout"]["screenreader_text_primary"] = " \n ".join( + chart_layout_screenreader_text_primary + ) + else: + self.state["state"]["layout"][ + "screenreader_text_primary" + ] = chart_layout_screenreader_text_primary + + self.state["state"]["layout"][ + "screenreader_label" + ] = chart_layout_screenreader_label + + list_chart_layout_screenreader_hide_primary = [True, False] + [None] + if ( + chart_layout_screenreader_hide_primary + not in list_chart_layout_screenreader_hide_primary + ): + raise ValueError( + f"`chart_layout_screenreader_hide_primary` must be one of: [True, False]" + ) + elif ( + chart_layout_screenreader_hide_primary + in list_chart_layout_screenreader_hide_primary + and chart_layout_screenreader_hide_primary is not None + ): + filtered_dict = { + k: v + for (k, v) in {True: True, False: False}.items() + if chart_layout_screenreader_hide_primary in k + } + if len(filtered_dict) > 0: + self.state["state"]["layout"][ + "screenreader_hide_primary" + ] = filtered_dict[chart_layout_screenreader_hide_primary] + dict_to_merge = self.state + clean_dict = clean_null_terms(dict_to_merge) + self._model_data = deep_merge(self._model_data, clean_dict) + return self diff --git a/python_package/flourishcharts/flourish.py b/python_package/flourishcharts/flourish.py new file mode 100644 index 0000000..a285a99 --- /dev/null +++ b/python_package/flourishcharts/flourish.py @@ -0,0 +1,179 @@ +#!/usr/bin/env python +# coding: utf-8 + +# Copyright (c) Zoe Meers. +# Distributed under the terms of the Modified BSD License. + +""" +Create Flourish object. +""" +import os +import importlib.metadata +import pathlib +import requests +import anywidget +import traitlets + +try: + __version__ = importlib.metadata.version("flourishcharts") +except importlib.metadata.PackageNotFoundError: + __version__ = "unknown" + +from . import bindings, details +from ._utils import load_internal_templates + + +class Flourish( + anywidget.AnyWidget, + details.DetailsMixin, + bindings.DataBindingsMixin, +): + """Create a Flourish graph. + + :param chart_type: A chart type string for a graph in Flourish's library. Preferred usage compared to template_id and template_version. + :type chart_type: str, optional + :param base_visualisation_id: Optional - provide the numerical ID of an existing public Flourish visualisation to reference it's configuration + :type base_visualisation_id: str, optional + :param chart_description: A screen-reader description. A text alternative to the visual content that will only be visible to screen-readers, e.g. “The line chart shows China consistently higher than the other countries since 1990”. Do not replicate your title, since that will also be read by screenreaders., defaults to None + :type chart_description: str, optional + :param template_id: A template ID, as set by Flourish, found at https://app.flourish.studio/@flourish. Use if you cannot use `chart_type` or `base_visualisation_id`, Defaults to None + :type template_id: str, optional + :param template_version_number: A template version number, as set by Flourish, found at https://app.flourish.studio/@flourish. Use if you cannot use `chart_type` or `base_visualisation_id`, Defaults to None + :type template_version_number: str, optional + :param width: Width of the graph, defaults to None + :type width: int, optional + :param height: Height of the graph, defaults to None + :type height: int, optional + :param api_key: Flourish API key, defaults to None + :type api_key: str, optional + """ + + _esm = pathlib.Path(__file__).parent / "static" / "widget.js" + _css = pathlib.Path(__file__).parent / "static" / "widget.css" + _model_data = traitlets.Dict().tag(sync=True) + + def __init__( + self, + chart_type: str = None, + chart_description: str = None, + base_visualisation_id: str = None, + template_id: str = None, + template_version_number: str = None, + width: int = None, + height: int = None, + api_key: str = None, + ): + super().__init__() + self.chart_description = chart_description + self.chart_type = chart_type + self.base_visualisation_id = base_visualisation_id + self.width = width + self.height = height + self.state = {} + + # Check for API key + if api_key is not None: + self.api_key = api_key + elif os.environ.get("FLOURISH_API_KEY") is not None: + self.api_key = os.environ.get("FLOURISH_API_KEY") + else: + raise Exception( + "Flourish API key not found. Please grab a key from Flourish settings " + "https://app.flourish.studio/settings and add them to your .envrc file." + ) + + # match to a template + _internal_templates = load_internal_templates() + if chart_type is not None: + matched_templates = _internal_templates[ + _internal_templates.chart_type == chart_type + ].to_dict(orient="records") + + if not matched_templates and chart_type: + raise Exception( + f"The chart type [{chart_type}] is not an exact match with Flourish's available graphs. " + f"Find available chart types in `flourishcharts.flourish_api_documentation`, or specify a template ID and version number, or the base visualisation ID of an existing published Flourish graph (if available)." + ) + if matched_templates and chart_type: + matched_template = matched_templates[ + 0 + ] # arbitrarily take the first matching template + + self.template_id = matched_template["template_id"] + self.template_version = matched_template["template_version"] + if matched_template["template_id"] == "@flourish/hierarchy": + self.state = {"hierarchy_layout": chart_type} + if matched_template["template_id"] == "@flourish/line-bar-pie": + self.state = {"chart_type": chart_type} + + if base_visualisation_id is not None: + base_viz_object = f"https://public.flourish.studio/visualisation/{base_visualisation_id}/visualisation-object.json" + base_viz_data = requests.get(base_viz_object) + if base_viz_data.status_code == 403: + raise Exception( + f"Access denied accessing base visualisation {base_viz_object} - please ensure it is published for public use" + ) + else: + base_viz_dict = base_viz_data.json() + self.template_id = base_viz_dict["template"] + self.template_version = base_viz_dict["version"] + self.base_bindings = base_viz_dict["bindings"] + self.base_data = base_viz_dict["data"] + self.base_state = base_viz_dict["state"] + if base_viz_dict["metadata"]: + self.base_metadata = base_viz_dict["metadata"] + else: + self.base_metadata = {} + else: + self.base_bindings = {} + self.base_data = {} + self.base_state = {} + self.base_metadata = {} + + if chart_type is None and base_visualisation_id is None and template_id is None: + raise Exception( + "Error: please enter a chart type, template ID and version number, or the base visualisation ID of an existing published Flourish graph, if available." + ) + if chart_type is None and base_visualisation_id is None: + if not template_id and template_version_number is None: + raise Exception("Error: please specify a template version number.") + if template_id is None and not template_version_number: + raise Exception("Error: please specify a template ID.") + if not template_id and not template_version_number: + self.template_id = template_id + self.template_version = template_version_number + + if chart_type is not None and chart_type.startswith(("map", "globe")): + raise Exception( + f"The chart type [{chart_type}] is a map template and is currently not supported in this module." + ) + + if base_visualisation_id is not None: + self._model_data = { + "state": self.base_state, + "data": self.base_data, + "bindings": self.base_bindings, + "metadata": self.base_metadata, + "chart_description": self.chart_description, + "template": self.template_id, + "version": self.template_version, + "api_key": self.api_key, + "width": self.width, + "height": self.height, + "base_visualisation_data_format": "object" + } + if base_visualisation_id is None: + self._model_data = { + "state": self.state, + "base_visualisation_id": self.base_visualisation_id, + "data": {"data": list()}, # set an empty list so the base graph builds + "chart_description": self.chart_description, + "template": self.template_id, + "version": self.template_version, + "api_key": self.api_key, + "width": self.width, + "height": self.height + } + + def __repr__(self): + return f"Flourish(template_id={self.template_id}, template_version={self.template_version}" diff --git a/python_package/flourishcharts/flourish_docs/__init__.py b/python_package/flourishcharts/flourish_docs/__init__.py new file mode 100644 index 0000000..e605228 --- /dev/null +++ b/python_package/flourishcharts/flourish_docs/__init__.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python +# coding: utf-8 + +# Copyright (c) Zoe Meers. +# Distributed under the terms of the MIT License. + +from .reference import reference diff --git a/python_package/flourishcharts/flourish_docs/reference.py b/python_package/flourishcharts/flourish_docs/reference.py new file mode 100644 index 0000000..a33901f --- /dev/null +++ b/python_package/flourishcharts/flourish_docs/reference.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +# coding: utf-8 + +# Copyright (c) Zoe Meers. +# Distributed under the terms of the MIT License. + +import os +import pandas as pd + +location = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) +# read template info +reference = pd.read_csv( + os.path.join(location, "data", "flourish_api_documentation.csv") +) diff --git a/python_package/flourishcharts/internal_data/internal_templates.csv b/python_package/flourishcharts/internal_data/internal_templates.csv new file mode 100644 index 0000000..b4ce07a --- /dev/null +++ b/python_package/flourishcharts/internal_data/internal_templates.csv @@ -0,0 +1,58 @@ +,template_id,template_version,template_name,template_function_name,chart_type,url +0,@flourish/audio,1.6.0,audio,audio,audio,https://app.flourish.studio/@flourish/audio/1.6.0#api +1,@flourish/bar-chart-race,16.1.2,bar chart race,bar_chart_race,bar_race,https://app.flourish.studio/@flourish/bar-chart-race/16.1.2#api +2,@flourish/bubble-chart,3.1.2,bubble chart,bubble_chart,bubble,https://app.flourish.studio/@flourish/bubble-chart/3.1.2#api +3,@flourish/calculator,1.7.1,calculator,calculator,calculator,https://app.flourish.studio/@flourish/calculator/1.7.1#api +4,@flourish/cards,11.1.2,cards,cards,cards,https://app.flourish.studio/@flourish/cards/11.1.2#api +5,@flourish/chord-diagram,8.6.1,chord diagram,chord_diagram,chord_diagram,https://app.flourish.studio/@flourish/chord-diagram/8.6.1#api +6,@flourish/countdown,2.7.1,countdown,countdown,countdown,https://app.flourish.studio/@flourish/countdown/2.7.1#api +7,@flourish/draw-the-line,7.1.2,draw the line chart,draw_the_line,draw_the_line,https://app.flourish.studio/@flourish/draw-the-line/7.1.2#api +8,@flourish/election-results-chart,9.2.2,election results chart,election_results_chart,election_results,https://app.flourish.studio/@flourish/election-results-chart/9.2.2#api +9,@flourish/gantt,9.1.2,gantt chart,gantt,gantt,https://app.flourish.studio/@flourish/gantt/9.1.2#api +10,@flourish/gauge,1.8.1,gauge,gauge,gauge,https://app.flourish.studio/@flourish/gauge/1.8.1#api +11,@flourish/hierarchy,20.1.4,hierarchy,hierarchy,treemap,https://app.flourish.studio/@flourish/hierarchy/20.1.4#api +11,@flourish/hierarchy,20.1.4,hierarchy,hierarchy,circlepacking,https://app.flourish.studio/@flourish/hierarchy/20.1.4#api +11,@flourish/hierarchy,20.1.4,hierarchy,hierarchy,sunburst,https://app.flourish.studio/@flourish/hierarchy/20.1.4#api +11,@flourish/hierarchy,20.1.4,hierarchy,hierarchy,bar,https://app.flourish.studio/@flourish/hierarchy/20.1.4#api +11,@flourish/hierarchy,20.1.4,hierarchy,hierarchy,radialtree,https://app.flourish.studio/@flourish/hierarchy/20.1.4#api +16,@flourish/horserace,16.2.1,line chart race,horserace,horserace,https://app.flourish.studio/@flourish/horserace/16.2.1#api +17,@flourish/interactive-svg,8.3.1,interactive svg,interactive_svg,interactive_svg,https://app.flourish.studio/@flourish/interactive-svg/8.3.1#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,area_stacked,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,area_prop,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,area,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,area_stacked_stream,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,column_grouped,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,column_stacked,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,column_stacked_prop,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,column_waterfall,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,bar_grouped,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,bar_stacked,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,bar_stacked_prop,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,bar_waterfall,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,donut,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,column_grouped_line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,column_stacked_line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,column_stacked_prop_line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,area_stacked_line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +18,@flourish/line-bar-pie,32.3.2,"line, bar and pie charts",line_bar_pie,line_line,https://app.flourish.studio/@flourish/line-bar-pie/32.3.2#api +37,@flourish/marimekko,3.1.4,marimekko,marimekko,marimekko,https://app.flourish.studio/@flourish/marimekko/3.1.4#api +38,@flourish/network-graph,12.1.2,network graph,network_graph,network,https://app.flourish.studio/@flourish/network-graph/12.1.2#api +39,@flourish/number-ticker,1.7.1,number ticker,number_ticker,number_ticker,https://app.flourish.studio/@flourish/number-ticker/1.7.1#api +40,@flourish/parliament-chart,8.2.1,parliament chart,parliament_chart,parliament,https://app.flourish.studio/@flourish/parliament-chart/8.2.1#api +41,@flourish/photo-slider,4.7.1,photo slider,photo_slider,photo_slider,https://app.flourish.studio/@flourish/photo-slider/4.7.1#api +42,@flourish/pictogram,6.1.2,pictogram,pictogram,pictogram,https://app.flourish.studio/@flourish/pictogram/6.1.2#api +43,@flourish/quiz,7.7.1,quiz,quiz,quiz,https://app.flourish.studio/@flourish/quiz/7.7.1#api +44,@flourish/radar,4.1.2,radar chart,radar,radar,https://app.flourish.studio/@flourish/radar/4.1.2#api +45,@flourish/sankey,10.10.2,sankey diagram,sankey,sankey,https://app.flourish.studio/@flourish/sankey/10.10.2#api +46,@flourish/scatter,22.2.3,scatter,scatter,scatter,https://app.flourish.studio/@flourish/scatter/22.2.3#api +47,@flourish/slope-chart,13.2.1,slope chart,slope_chart,slope,https://app.flourish.studio/@flourish/slope-chart/13.2.1#api +48,@flourish/sports,9.1.2,sports,sports,sports,https://app.flourish.studio/@flourish/sports/9.1.2#api +49,@flourish/sports-race,2.6.1,sports race,sports_race,sports_race,https://app.flourish.studio/@flourish/sports-race/2.6.1#api +50,@flourish/survey,14.1.3,survey,survey,survey,https://app.flourish.studio/@flourish/survey/14.1.3#api +51,@flourish/svg-annotator,6.0.2,svg annotator,svg_annotator,svg_annotator,https://app.flourish.studio/@flourish/svg-annotator/6.0.2#api +52,@flourish/table,17.2.1,table,table,table,https://app.flourish.studio/@flourish/table/17.2.1#api +53,@flourish/text-annotator,3.9.1,text annotator,text_annotator,text_annotator,https://app.flourish.studio/@flourish/text-annotator/3.9.1#api +54,@flourish/timeline,2.1.2,timeline,timeline,timeline,https://app.flourish.studio/@flourish/timeline/2.1.2#api +55,@flourish/tournament,1.7.1,tournament,tournament,tournament,https://app.flourish.studio/@flourish/tournament/1.7.1#api +56,@flourish/word-cloud,3.10.1,word cloud,word_cloud,word_cloud,https://app.flourish.studio/@flourish/word-cloud/3.10.1#api diff --git a/python_package/flourishcharts/static/widget.css b/python_package/flourishcharts/static/widget.css new file mode 100644 index 0000000..2d4c529 --- /dev/null +++ b/python_package/flourishcharts/static/widget.css @@ -0,0 +1 @@ +/*# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFtdLAogICJzb3VyY2VzQ29udGVudCI6IFtdLAogICJtYXBwaW5ncyI6ICIiLAogICJuYW1lcyI6IFtdCn0K */ diff --git a/python_package/flourishcharts/static/widget.js b/python_package/flourishcharts/static/widget.js new file mode 100644 index 0000000..579f85b --- /dev/null +++ b/python_package/flourishcharts/static/widget.js @@ -0,0 +1,2 @@ +import d from"https://cdn.jsdelivr.net/npm/@flourish/live-api@5.1.0/+esm";function n({model:e,el:i}){let t=document.createElement("div");t.id="chart",i.appendChild(t);let a=e.get("_model_data");a.base_visualisation_id&&(a.base_visualisation_id=String(a.base_visualisation_id),a.bindings=a.base_bindings,a.data=a.base_data,a.metadata=a.base_metadata,a.state={...a.base_state,...a.state}),a.base_visualisation_id&&a.data!==null&&(a.data=a.data,a.bindings=a.bindings),(a.metadata!==null||typeof a.metadata<"u")&&(a.metadata=a.metadata||a.base_metadata),a.container=t,flourish_visualisation=new d.Live(a),a.base_visualisation_id&&!flourish_visualisation.template_loaded&&(flourish_visualisation.template_loaded=!0)}var r=()=>({render:n});export{r as default}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vanMvd2lkZ2V0LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJpbXBvcnQgdHlwZSB7IFJlbmRlckNvbnRleHQgfSBmcm9tIFwiQGFueXdpZGdldC90eXBlc1wiO1xuaW1wb3J0IFwiLi93aWRnZXQuY3NzXCI7XG5cbmltcG9ydCBmbG91cmlzaGxpdmVBcGkgZnJvbSAnaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L25wbS9AZmxvdXJpc2gvbGl2ZS1hcGlANS4xLjAvK2VzbSdcblxuaW50ZXJmYWNlIFdpZGdldE1vZGVsIHtcblx0X21vZGVsX2RhdGE6IHtcblx0XHRjb250YWluZXI6IEhUTUxFbGVtZW50XG5cdH1cbn1cblxuZnVuY3Rpb24gcmVuZGVyKHsgbW9kZWwsIGVsIH06IFJlbmRlckNvbnRleHQ8V2lkZ2V0TW9kZWw+KSB7XG5cblx0bGV0IGNoYXJ0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTsgXG5cdGNoYXJ0LmlkID0gXCJjaGFydFwiO1xuXHRlbC5hcHBlbmRDaGlsZChjaGFydCk7XG5cdGxldCBvcHRzID0gbW9kZWwuZ2V0KFwiX21vZGVsX2RhdGFcIik7XG5cdGlmIChvcHRzLmJhc2VfdmlzdWFsaXNhdGlvbl9pZCkge1xuXHRcdC8vIGJhc2VfdmlzdWFsaXNhdGlvbl9kYXRhX2Zvcm1hdCBjYW4gbm93IGJlIGFuIGFycmF5IG9mIGFycmF5cyBvciBhcnJheSBvZiBvYmplY3RzIGFzIHY1LjAuMiBvZiB0aGUgQVBJLlxuXHRcdG9wdHMuYmFzZV92aXN1YWxpc2F0aW9uX2lkID0gU3RyaW5nKG9wdHMuYmFzZV92aXN1YWxpc2F0aW9uX2lkKVxuXHRcdG9wdHMuYmluZGluZ3MgPSBvcHRzLmJhc2VfYmluZGluZ3Ncblx0XHRvcHRzLmRhdGEgPSBvcHRzLmJhc2VfZGF0YVxuXHRcdG9wdHMubWV0YWRhdGEgPSBvcHRzLmJhc2VfbWV0YWRhdGFcblx0XHQvLyBtZXJnZSB0aGUgdHdvIHN0YXRlcyB0b2dldGhlci4gSWYgdGhlcmUgaXMgYSByZXBsYWNlbWVudCB2YWx1ZSBmb3IgYSBrZXkgaW4gb3B0cy5iYXNlX3N0YXRlLCByZXBsYWNlIHdpdGggdGhlIHZhbHVlIGluIG9wdHMuc3RhdGUgKHNldCBpbiB0aGUgUi9QeXRob24gY29kZSlcblx0XHRvcHRzLnN0YXRlID0geyAuLi5vcHRzLmJhc2Vfc3RhdGUsIC4uLm9wdHMuc3RhdGUgfVxuXHQgIH1cblx0ICBpZiAob3B0cy5iYXNlX3Zpc3VhbGlzYXRpb25faWQgJiYgb3B0cy5kYXRhICE9PSBudWxsKXtcblx0XHRvcHRzLmRhdGEgPSBvcHRzLmRhdGFcblx0XHRvcHRzLmJpbmRpbmdzID0gb3B0cy5iaW5kaW5nc1xuXHQgIH1cblx0ICBpZihvcHRzLm1ldGFkYXRhICE9PSBudWxsIHx8IHR5cGVvZiBvcHRzLm1ldGFkYXRhICE9PSAndW5kZWZpbmVkJyl7XG5cdFx0b3B0cy5tZXRhZGF0YSA9IG9wdHMubWV0YWRhdGEgfHwgb3B0cy5iYXNlX21ldGFkYXRhXG5cdH07XG5cdG9wdHMuY29udGFpbmVyID0gY2hhcnRcblx0ZmxvdXJpc2hfdmlzdWFsaXNhdGlvbiA9IG5ldyBmbG91cmlzaGxpdmVBcGkuTGl2ZShvcHRzKTtcblx0aWYgKG9wdHMuYmFzZV92aXN1YWxpc2F0aW9uX2lkICYmICFmbG91cmlzaF92aXN1YWxpc2F0aW9uLnRlbXBsYXRlX2xvYWRlZCl7XG5cdCAgZmxvdXJpc2hfdmlzdWFsaXNhdGlvbi50ZW1wbGF0ZV9sb2FkZWQgPSB0cnVlXG5cdH1cbn1cbmV4cG9ydCBkZWZhdWx0ICgpID0+ICh7IHJlbmRlciB9KTtcbiJdLAogICJtYXBwaW5ncyI6ICJBQUdBLE9BQU9BLE1BQXFCLDZEQVE1QixTQUFTQyxFQUFPLENBQUUsTUFBQUMsRUFBTyxHQUFBQyxDQUFHLEVBQStCLENBRTFELElBQUlDLEVBQVEsU0FBUyxjQUFjLEtBQUssRUFDeENBLEVBQU0sR0FBSyxRQUNYRCxFQUFHLFlBQVlDLENBQUssRUFDcEIsSUFBSUMsRUFBT0gsRUFBTSxJQUFJLGFBQWEsRUFDOUJHLEVBQUssd0JBRVJBLEVBQUssc0JBQXdCLE9BQU9BLEVBQUsscUJBQXFCLEVBQzlEQSxFQUFLLFNBQVdBLEVBQUssY0FDckJBLEVBQUssS0FBT0EsRUFBSyxVQUNqQkEsRUFBSyxTQUFXQSxFQUFLLGNBRXJCQSxFQUFLLE1BQVEsQ0FBRSxHQUFHQSxFQUFLLFdBQVksR0FBR0EsRUFBSyxLQUFNLEdBRTVDQSxFQUFLLHVCQUF5QkEsRUFBSyxPQUFTLE9BQ2pEQSxFQUFLLEtBQU9BLEVBQUssS0FDakJBLEVBQUssU0FBV0EsRUFBSyxXQUVqQkEsRUFBSyxXQUFhLE1BQVEsT0FBT0EsRUFBSyxTQUFhLE9BQ3ZEQSxFQUFLLFNBQVdBLEVBQUssVUFBWUEsRUFBSyxlQUV2Q0EsRUFBSyxVQUFZRCxFQUNqQix1QkFBeUIsSUFBSUosRUFBZ0IsS0FBS0ssQ0FBSSxFQUNsREEsRUFBSyx1QkFBeUIsQ0FBQyx1QkFBdUIsa0JBQ3hELHVCQUF1QixnQkFBa0IsR0FFNUMsQ0FDQSxJQUFPQyxFQUFRLEtBQU8sQ0FBRSxPQUFBTCxDQUFPIiwKICAibmFtZXMiOiBbImZsb3VyaXNobGl2ZUFwaSIsICJyZW5kZXIiLCAibW9kZWwiLCAiZWwiLCAiY2hhcnQiLCAib3B0cyIsICJ3aWRnZXRfZGVmYXVsdCJdCn0K diff --git a/python_package/flourishcharts/tests/__init__.py b/python_package/flourishcharts/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python_package/flourishcharts/tests/__pycache__/test_bindings.cpython-39.pyc b/python_package/flourishcharts/tests/__pycache__/test_bindings.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fd4172c17bec736473402de1d9d1951efc736f54 GIT binary patch literal 1481 zcma)6O>Y}F5G8lHtF`K+c927EEsCP(UaY1)6$pZSRqdq;kba@O5bTmGud<>xB;{C! z9Tc#yLH|Gw_R)Wd*PQehdg=^iyKKPYHR8&iY{B zJb>wjU=&fbC4BWuc>;dYrc=h*G~*d1-x8H7c0v@>WRf4Jyr+{%p|Uqr<*IkW_=ciC zkg`|;78#XED1K{nbGYL&s~u+W54MR=mq2~$)hC*+v&EP63A zc)7|TMjkeQ)XqP;z^~{UBqA0tAH#G%gYo2;98pgv31YscN68^MO+7oKe|$!X&nEe# zcbFVfm5!-mDtpZ+`2|>D@EoU5Ve_n)sXLTp77OJ+GDKCZ>)PzmxoVNa%Y@BxC=ELYUGxLqL zGiww4^Y#Yf!M}y;_W|>~_zI-2#L^pALS4AZ~Cl z(>v3_%b9&XkVdu(-&Af;Nwe1+47!Eiof*-|>bV^2%UutIy8&8psq0R+2&)~dYi+fu zKyA^OJ=r!2DilD(d}@S^B?*m%Y(N$c^&v@4H{m(Bw=U&Q4DkMN|1JG92yrR>DM){| zF8rt0gir8dzf<-n|B^i$1=co3+Z^z12Bu7H57$_k#mX!;oxO<$IbWG=ScR|OQC$V% z>gsP&MLjo_2i>pHhCo-e^^vyW|Izk-z@xGk3L%V~Y9T^ji0MqtTU>7n@nSC9i#NsG zG;r6Q4TP? zjE7W?_((|x{@N8qv45lRa>Ku}-MUfW>a2d{HhZaSE6e!RFw=`X}5Q3%joYUEkC8zKqS$cVp zbSkp;alCfQD|9M(&d&jzN`Rk8{g59?nZ3O+ko@`?Pu~cD-|TElLe3FsI3TcKg$F&X zLW>VzrB&Bpm4h?6R$5u{879dc-Gy1sxGj>LBhv7Kz=0MPw6wy?YoM2kU-s#V3-P^) zCMPzJqR3)BCJj@92xsC({(viSDXiFs8%4H^$)#8eLb( zxnsx}(NZ_2b=OZf-oG4iZY~_&^LQe`1j2{_#8~W#)$5b{&i-ed8BYbVG)srrj}e!Z zZ9Ut&i07^G!%4G4nKo5#LCSkPcIFY-NX5pVBswL=kxOcLvcuqy4YiA}ZN=a^8V=N_ QZ->k)hvRnzIx?B=*>Swc`A!ZJ4i6v?P0S)jr(lT-#L zONu$uT*imYxQZp3$Sgg1d1v4W{5yh9fH3 z2X+)p$!TnRXY}J=l-OjvGVV_U8OiuVK*?+92!rQ1q@=!dmzY8k6uTD3weE(?v5 zamn_gQyR;1e{6xf$BQ<;DEG_SUB#|)49$0h=4}awG3J^uMrr%6D2+1i!XvMhP5o5s zMr)t~achhA%^h7f%5swnYnA4UnPCM+RfP*=;d%uhY0>U}Ci)s2|1li=4-w4Zuu&V6 z!TUzP9f(>~2e!=3AQ$ysc{pef>~2%@R^)HRNS#|PjLr-Y&jW3=2kyQ%XjLe!>Kur| z%Q}Z#RsL%mFSrte*=dzJT}8o&yYPc&nQ-u zd&-5T+{fVp@$PE8Exw6q;DT1V6=d1AhN@GlSMVp!dk#MLbx<$C^0^awjcT-{tNJFq zT-=IU3Zw6MWljW7IM3k)uW>w21n>v@pi>0&u@uS2#BeV8XWsV*SdYPM6PnN~;h+7V D%$G pd.DataFrame: + data = {"col1": [1, 2], "col2": [3, 4], "col3": ["five", "six"]} + return pd.DataFrame(data) diff --git a/python_package/flourishcharts/tests/test_data.py b/python_package/flourishcharts/tests/test_data.py new file mode 100644 index 0000000..0430b1c --- /dev/null +++ b/python_package/flourishcharts/tests/test_data.py @@ -0,0 +1,10 @@ +import unittest + +import flourishcharts + + +class TestData(unittest.TestCase): + def test_internal_templates_have_unique_chart_type(self): + templates = flourishcharts._utils.load_internal_templates() + unique_py_chart_types = templates["chart_type"].unique() + assert len(templates) == len(unique_py_chart_types) diff --git a/python_package/flourishcharts/tests/test_details.py b/python_package/flourishcharts/tests/test_details.py new file mode 100644 index 0000000..fac4853 --- /dev/null +++ b/python_package/flourishcharts/tests/test_details.py @@ -0,0 +1,20 @@ +import unittest +import pandas as pd +from flourishcharts import details, bindings, flourish + + +class TestDetails(unittest.TestCase): + @unittest.expectedFailure + def test_referencing_incorrect_details_function_raises_error(self): + df = prepare_df() + f_graph = flourish.Flourish("line") + f_graph = bindings.DataBindingsMixin.bind_line_bar_pie_data( + f_graph, data=df, label="col3", value=["col2"] + ) + with self.assertRaises(AssertionError): + details.DetailsMixin.set_scatter_details(f_graph, default_color="#00000") + + +def prepare_df() -> pd.DataFrame: + data = {"col1": [1, 2], "col2": [3, 4], "col3": ["five", "six"]} + return pd.DataFrame(data) diff --git a/python_package/js/widget.css b/python_package/js/widget.css new file mode 100644 index 0000000..e69de29 diff --git a/python_package/js/widget.ts b/python_package/js/widget.ts new file mode 100644 index 0000000..b22bf5a --- /dev/null +++ b/python_package/js/widget.ts @@ -0,0 +1,40 @@ +import type { RenderContext } from "@anywidget/types"; +import "./widget.css"; + +import flourishliveApi from 'https://cdn.jsdelivr.net/npm/@flourish/live-api@5.1.0/+esm' + +interface WidgetModel { + _model_data: { + container: HTMLElement + } +} + +function render({ model, el }: RenderContext) { + + let chart = document.createElement("div"); + chart.id = "chart"; + el.appendChild(chart); + let opts = model.get("_model_data"); + if (opts.base_visualisation_id) { + // base_visualisation_data_format can now be an array of arrays or array of objects as v5.0.2 of the API. + opts.base_visualisation_id = String(opts.base_visualisation_id) + opts.bindings = opts.base_bindings + opts.data = opts.base_data + opts.metadata = opts.base_metadata + // merge the two states together. If there is a replacement value for a key in opts.base_state, replace with the value in opts.state (set in the R/Python code) + opts.state = { ...opts.base_state, ...opts.state } + } + if (opts.base_visualisation_id && opts.data !== null){ + opts.data = opts.data + opts.bindings = opts.bindings + } + if(opts.metadata !== null || typeof opts.metadata !== 'undefined'){ + opts.metadata = opts.metadata || opts.base_metadata + }; + opts.container = chart + flourish_visualisation = new flourishliveApi.Live(opts); + if (opts.base_visualisation_id && !flourish_visualisation.template_loaded){ + flourish_visualisation.template_loaded = true + } +} +export default { render } diff --git a/python_package/lib/extension.d.ts b/python_package/lib/extension.d.ts new file mode 100644 index 0000000..ea465c2 --- /dev/null +++ b/python_package/lib/extension.d.ts @@ -0,0 +1 @@ +export * from './index'; diff --git a/python_package/lib/extension.js b/python_package/lib/extension.js new file mode 100644 index 0000000..071a789 --- /dev/null +++ b/python_package/lib/extension.js @@ -0,0 +1,27 @@ +"use strict"; +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +// Entry point for the notebook bundle containing custom model definitions. +// +// Setup notebook base URL +// +// Some static assets may be required by the custom widget javascript. The base +// url for the notebook is not known at build time and is therefore computed +// dynamically. +// eslint-disable-next-line @typescript-eslint/no-non-null-assertion +window.__webpack_public_path__ = + document.querySelector('body').getAttribute('data-base-url') + + 'nbextensions/flourishcharts'; +__exportStar(require("./index"), exports); +//# sourceMappingURL=extension.js.map \ No newline at end of file diff --git a/python_package/lib/extension.js.map b/python_package/lib/extension.js.map new file mode 100644 index 0000000..d2c1cd1 --- /dev/null +++ b/python_package/lib/extension.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":";AAAA,0CAA0C;AAC1C,2DAA2D;;;;;;;;;;;;AAE3D,2EAA2E;AAC3E,EAAE;AACF,0BAA0B;AAC1B,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,eAAe;AACf,oEAAoE;AACnE,MAAc,CAAC,uBAAuB;IACrC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAE,CAAC,YAAY,CAAC,eAAe,CAAC;QAC7D,qBAAqB,CAAC;AAExB,0CAAwB"} \ No newline at end of file diff --git a/python_package/lib/flourish.d.ts b/python_package/lib/flourish.d.ts new file mode 100644 index 0000000..3167c3d --- /dev/null +++ b/python_package/lib/flourish.d.ts @@ -0,0 +1,14 @@ +import { DOMWidgetModel, DOMWidgetView, ISerializers } from '@jupyter-widgets/base'; +export declare class FlourishModel extends DOMWidgetModel { + defaults(): any; + static serializers: ISerializers; + static model_name: string; + static model_module: any; + static model_module_version: any; + static view_name: string; + static view_module: any; + static view_module_version: any; +} +export declare class FlourishView extends DOMWidgetView { + render(): void; +} diff --git a/python_package/lib/flourish.js b/python_package/lib/flourish.js new file mode 100644 index 0000000..86811bc --- /dev/null +++ b/python_package/lib/flourish.js @@ -0,0 +1,51 @@ +"use strict"; +// Copyright (c) Zoe Meers +// Distributed under the terms of the Modified BSD License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FlourishView = exports.FlourishModel = void 0; +const base_1 = require("@jupyter-widgets/base"); +const flourish = require('@flourish/live-api').default; +const version_1 = require("./version"); +class FlourishModel extends base_1.DOMWidgetModel { + defaults() { + return Object.assign(Object.assign({}, super.defaults()), { _model_name: FlourishModel.model_name, _model_module: FlourishModel.model_module, _model_module_version: FlourishModel.model_module_version, _view_name: FlourishModel.view_name, _view_module: FlourishModel.view_module, _view_module_version: FlourishModel.view_module_version }); + } +} +exports.FlourishModel = FlourishModel; +FlourishModel.serializers = Object.assign({}, base_1.DOMWidgetModel.serializers); +FlourishModel.model_name = 'FlourishModel'; +FlourishModel.model_module = version_1.MODULE_NAME; +FlourishModel.model_module_version = version_1.MODULE_VERSION; +FlourishModel.view_name = 'FlourishView'; // Set to null if no view +FlourishModel.view_module = version_1.MODULE_NAME; // Set to null if no view +FlourishModel.view_module_version = version_1.MODULE_VERSION; +const generateUUID = () => { + // from https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid + let d = new Date().getTime(), d2 = (performance && performance.now && (performance.now() * 1000)) || 0; + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => { + let r = Math.random() * 16; + if (d > 0) { + r = (d + r) % 16 | 0; + d = Math.floor(d / 16); + } + else { + r = (d2 + r) % 16 | 0; + d2 = Math.floor(d2 / 16); + } + return (c == 'x' ? r : (r & 0x7 | 0x8)).toString(16); + }); +}; +class FlourishView extends base_1.DOMWidgetView { + render() { + // Generate a random ID for the element + const widget = 'chart-'; + const id = widget.concat(generateUUID()); + this.el.id = id; + this.displayed.then(() => { + const new_opts = this.model.get('_model_data'); + new flourish.Live(Object.assign({ container: `#${id}` }, new_opts)); + }); + } +} +exports.FlourishView = FlourishView; +//# sourceMappingURL=flourish.js.map \ No newline at end of file diff --git a/python_package/lib/flourish.js.map b/python_package/lib/flourish.js.map new file mode 100644 index 0000000..74f7d00 --- /dev/null +++ b/python_package/lib/flourish.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flourish.js","sourceRoot":"","sources":["../src/flourish.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,2DAA2D;;;AAE3D,gDAI+B;AAE/B,MAAM,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAEvD,uCAAwD;AAExD,MAAa,aAAc,SAAQ,qBAAc;IAC/C,QAAQ;QACN,uCACK,KAAK,CAAC,QAAQ,EAAE,KACnB,WAAW,EAAE,aAAa,CAAC,UAAU,EACrC,aAAa,EAAE,aAAa,CAAC,YAAY,EACzC,qBAAqB,EAAE,aAAa,CAAC,oBAAoB,EACzD,UAAU,EAAE,aAAa,CAAC,SAAS,EACnC,YAAY,EAAE,aAAa,CAAC,WAAW,EACvC,oBAAoB,EAAE,aAAa,CAAC,mBAAmB,IACvD;IACJ,CAAC;;AAXH,sCAyBC;AAXQ,yBAAW,qBACb,qBAAc,CAAC,WAAW,EAE7B;AAEK,wBAAU,GAAG,eAAe,CAAC;AAC7B,0BAAY,GAAI,qBAAW,CAAC;AAC5B,kCAAoB,GAAG,wBAAc,CAAC;AACtC,uBAAS,GAAG,cAAc,CAAC,CAAC,yBAAyB;AACrD,yBAAW,GAAG,qBAAW,CAAC,CAAC,yBAAyB;AACpD,iCAAmB,GAAG,wBAAc,CAAC;AAI9C,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,4EAA4E;IAC5E,IACE,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,EACxB,EAAE,GAAG,CAAC,WAAW,IAAI,WAAW,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;IAC3E,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE;QACjE,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;QAC3B,IAAI,CAAC,GAAG,CAAC,EAAE;YACT,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACrB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;SACxB;aAAM;YACL,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACtB,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;SAC1B;QACD,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAGF,MAAa,YAAa,SAAQ,oBAAa;IAC7C,MAAM;QACJ,uCAAuC;QACvC,MAAM,MAAM,GAAG,QAAQ,CAAC;QACxB,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE;YACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YAC/C,IAAI,QAAQ,CAAC,IAAI,iBACf,SAAS,EAAE,IAAI,EAAE,EAAE,IAChB,QAAQ,EACX,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAdD,oCAcC"} \ No newline at end of file diff --git a/python_package/lib/index.d.ts b/python_package/lib/index.d.ts new file mode 100644 index 0000000..da4ee47 --- /dev/null +++ b/python_package/lib/index.d.ts @@ -0,0 +1,2 @@ +export * from './version'; +export * from './flourish'; diff --git a/python_package/lib/index.js b/python_package/lib/index.js new file mode 100644 index 0000000..90ee4e2 --- /dev/null +++ b/python_package/lib/index.js @@ -0,0 +1,17 @@ +"use strict"; +// Copyright (c) Zoe Meers +// Distributed under the terms of the Modified BSD License. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./version"), exports); +__exportStar(require("./flourish"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/python_package/lib/index.js.map b/python_package/lib/index.js.map new file mode 100644 index 0000000..ccf018f --- /dev/null +++ b/python_package/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,2DAA2D;;;;;;;;;;;;AAE3D,4CAA0B;AAC1B,6CAA2B"} \ No newline at end of file diff --git a/python_package/lib/plugin.d.ts b/python_package/lib/plugin.d.ts new file mode 100644 index 0000000..a2207d6 --- /dev/null +++ b/python_package/lib/plugin.d.ts @@ -0,0 +1,7 @@ +import { Application, IPlugin } from '@phosphor/application'; +import { Widget } from '@phosphor/widgets'; +/** + * The example plugin. + */ +declare const examplePlugin: IPlugin, void>; +export default examplePlugin; diff --git a/python_package/lib/plugin.js b/python_package/lib/plugin.js new file mode 100644 index 0000000..fe6b1a8 --- /dev/null +++ b/python_package/lib/plugin.js @@ -0,0 +1,50 @@ +"use strict"; +// Copyright (c) Zoe Meers +// Distributed under the terms of the Modified BSD License. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = require("@jupyter-widgets/base"); +const widgetExports = __importStar(require("./flourish")); +const version_1 = require("./version"); +const EXTENSION_ID = 'canviz:plugin'; +/** + * The example plugin. + */ +const examplePlugin = { + id: EXTENSION_ID, + requires: [base_1.IJupyterWidgetRegistry], + activate: activateWidgetExtension, + autoStart: true, +}; +// the "as unknown as ..." typecast above is solely to support JupyterLab 1 +// and 2 in the same codebase and should be removed when we migrate to Lumino. +exports.default = examplePlugin; +/** + * Activate the widget extension. + */ +function activateWidgetExtension(app, registry) { + registry.registerWidget({ + name: version_1.MODULE_NAME, + version: version_1.MODULE_VERSION, + exports: widgetExports, + }); +} +//# sourceMappingURL=plugin.js.map \ No newline at end of file diff --git a/python_package/lib/plugin.js.map b/python_package/lib/plugin.js.map new file mode 100644 index 0000000..00fccfe --- /dev/null +++ b/python_package/lib/plugin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,2DAA2D;;;;;;;;;;;;;;;;;;;;;AAM3D,gDAA+D;AAE/D,0DAA4C;AAE5C,uCAAwD;AAExD,MAAM,YAAY,GAAG,eAAe,CAAC;AAErC;;GAEG;AACH,MAAM,aAAa,GAAuC;IACxD,EAAE,EAAE,YAAY;IAChB,QAAQ,EAAE,CAAC,6BAAsB,CAAC;IAClC,QAAQ,EAAE,uBAAuB;IACjC,SAAS,EAAE,IAAI;CACiC,CAAC;AACnD,2EAA2E;AAC3E,8EAA8E;AAE9E,kBAAe,aAAa,CAAC;AAE7B;;GAEG;AACH,SAAS,uBAAuB,CAC9B,GAAwB,EACxB,QAAgC;IAEhC,QAAQ,CAAC,cAAc,CAAC;QACtB,IAAI,EAAE,qBAAW;QACjB,OAAO,EAAE,wBAAc;QACvB,OAAO,EAAE,aAAa;KACvB,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/python_package/lib/version.d.ts b/python_package/lib/version.d.ts new file mode 100644 index 0000000..883a175 --- /dev/null +++ b/python_package/lib/version.d.ts @@ -0,0 +1,8 @@ +/** + * The _model_module_version/_view_module_version this package implements. + * + * The html widget manager assumes that this is the same as the npm package + * version number. + */ +export declare const MODULE_VERSION: any; +export declare const MODULE_NAME: any; diff --git a/python_package/lib/version.js b/python_package/lib/version.js new file mode 100644 index 0000000..fdaa030 --- /dev/null +++ b/python_package/lib/version.js @@ -0,0 +1,21 @@ +"use strict"; +// Copyright (c) Zoe Meers +// Distributed under the terms of the Modified BSD License. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MODULE_NAME = exports.MODULE_VERSION = void 0; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +// eslint-disable-next-line @typescript-eslint/no-var-requires +const data = require('../package.json'); +/** + * The _model_module_version/_view_module_version this package implements. + * + * The html widget manager assumes that this is the same as the npm package + * version number. + */ +exports.MODULE_VERSION = data.version; +/* + * The current package name. + */ +exports.MODULE_NAME = data.name; +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/python_package/lib/version.js.map b/python_package/lib/version.js.map new file mode 100644 index 0000000..24d3923 --- /dev/null +++ b/python_package/lib/version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,2DAA2D;;;AAE3D,6DAA6D;AAC7D,aAAa;AACb,8DAA8D;AAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAExC;;;;;GAKG;AACU,QAAA,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC;AAE3C;;GAEG;AACU,QAAA,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC"} \ No newline at end of file diff --git a/python_package/package-lock.json b/python_package/package-lock.json new file mode 100644 index 0000000..7d9cb16 --- /dev/null +++ b/python_package/package-lock.json @@ -0,0 +1,422 @@ +{ + "name": "python_package", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "@anywidget/types": "^0.1.4", + "esbuild": "^0.19.5", + "typescript": "^5.2.2" + } + }, + "node_modules/@anywidget/types": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@anywidget/types/-/types-0.1.4.tgz", + "integrity": "sha512-EBkIWOfSPX2nYsZK5PjmuyFLv0pJu/zyqDMmNB7ed+wePE7dwubgHiPiLY20BPJ4ihtXEH7hqYgDkmGUKEMVjw==", + "dev": true + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.6.tgz", + "integrity": "sha512-muPzBqXJKCbMYoNbb1JpZh/ynl0xS6/+pLjrofcR3Nad82SbsCogYzUE6Aq9QT3cLP0jR/IVK/NHC9b90mSHtg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.6.tgz", + "integrity": "sha512-KQ/hbe9SJvIJ4sR+2PcZ41IBV+LPJyYp6V1K1P1xcMRup9iYsBoQn4MzE3mhMLOld27Au2eDcLlIREeKGUXpHQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.6.tgz", + "integrity": "sha512-VVJVZQ7p5BBOKoNxd0Ly3xUM78Y4DyOoFKdkdAe2m11jbh0LEU4bPles4e/72EMl4tapko8o915UalN/5zhspg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.6.tgz", + "integrity": "sha512-91LoRp/uZAKx6ESNspL3I46ypwzdqyDLXZH7x2QYCLgtnaU08+AXEbabY2yExIz03/am0DivsTtbdxzGejfXpA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.6.tgz", + "integrity": "sha512-QCGHw770ubjBU1J3ZkFJh671MFajGTYMZumPs9E/rqU52md6lIil97BR0CbPq6U+vTh3xnTNDHKRdR8ggHnmxQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.6.tgz", + "integrity": "sha512-J53d0jGsDcLzWk9d9SPmlyF+wzVxjXpOH7jVW5ae7PvrDst4kiAz6sX+E8btz0GB6oH12zC+aHRD945jdjF2Vg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.6.tgz", + "integrity": "sha512-hn9qvkjHSIB5Z9JgCCjED6YYVGCNpqB7dEGavBdG6EjBD8S/UcNUIlGcB35NCkMETkdYwfZSvD9VoDJX6VeUVA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.6.tgz", + "integrity": "sha512-G8IR5zFgpXad/Zp7gr7ZyTKyqZuThU6z1JjmRyN1vSF8j0bOlGzUwFSMTbctLAdd7QHpeyu0cRiuKrqK1ZTwvQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.6.tgz", + "integrity": "sha512-HQCOrk9XlH3KngASLaBfHpcoYEGUt829A9MyxaI8RMkfRA8SakG6YQEITAuwmtzFdEu5GU4eyhKcpv27dFaOBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.6.tgz", + "integrity": "sha512-22eOR08zL/OXkmEhxOfshfOGo8P69k8oKHkwkDrUlcB12S/sw/+COM4PhAPT0cAYW/gpqY2uXp3TpjQVJitz7w==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.6.tgz", + "integrity": "sha512-82RvaYAh/SUJyjWA8jDpyZCHQjmEggL//sC7F3VKYcBMumQjUL3C5WDl/tJpEiKtt7XrWmgjaLkrk205zfvwTA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.6.tgz", + "integrity": "sha512-8tvnwyYJpR618vboIv2l8tK2SuK/RqUIGMfMENkeDGo3hsEIrpGldMGYFcWxWeEILe5Fi72zoXLmhZ7PR23oQA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.6.tgz", + "integrity": "sha512-Qt+D7xiPajxVNk5tQiEJwhmarNnLPdjXAoA5uWMpbfStZB0+YU6a3CtbWYSy+sgAsnyx4IGZjWsTzBzrvg/fMA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.6.tgz", + "integrity": "sha512-lxRdk0iJ9CWYDH1Wpnnnc640ajF4RmQ+w6oHFZmAIYu577meE9Ka/DCtpOrwr9McMY11ocbp4jirgGgCi7Ls/g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.6.tgz", + "integrity": "sha512-MopyYV39vnfuykHanRWHGRcRC3AwU7b0QY4TI8ISLfAGfK+tMkXyFuyT1epw/lM0pflQlS53JoD22yN83DHZgA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.6.tgz", + "integrity": "sha512-UWcieaBzsN8WYbzFF5Jq7QULETPcQvlX7KL4xWGIB54OknXJjBO37sPqk7N82WU13JGWvmDzFBi1weVBajPovg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.6.tgz", + "integrity": "sha512-EpWiLX0fzvZn1wxtLxZrEW+oQED9Pwpnh+w4Ffv8ZLuMhUoqR9q9rL4+qHW8F4Mg5oQEKxAoT0G+8JYNqCiR6g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.6.tgz", + "integrity": "sha512-fFqTVEktM1PGs2sLKH4M5mhAVEzGpeZJuasAMRnvDZNCV0Cjvm1Hu35moL2vC0DOrAQjNTvj4zWrol/lwQ8Deg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.6.tgz", + "integrity": "sha512-M+XIAnBpaNvaVAhbe3uBXtgWyWynSdlww/JNZws0FlMPSBy+EpatPXNIlKAdtbFVII9OpX91ZfMb17TU3JKTBA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.6.tgz", + "integrity": "sha512-2DchFXn7vp/B6Tc2eKdTsLzE0ygqKkNUhUBCNtMx2Llk4POIVMUq5rUYjdcedFlGLeRe1uLCpVvCmE+G8XYybA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.6.tgz", + "integrity": "sha512-PBo/HPDQllyWdjwAVX+Gl2hH0dfBydL97BAH/grHKC8fubqp02aL4S63otZ25q3sBdINtOBbz1qTZQfXbP4VBg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.6.tgz", + "integrity": "sha512-OE7yIdbDif2kKfrGa+V0vx/B3FJv2L4KnIiLlvtibPyO9UkgO3rzYE0HhpREo2vmJ1Ixq1zwm9/0er+3VOSZJA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.6.tgz", + "integrity": "sha512-Xl7dntjA2OEIvpr9j0DVxxnog2fyTGnyVoQXAMQI6eR3mf9zCQds7VIKUDCotDgE/p4ncTgeRqgX8t5d6oP4Gw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.19.6", + "@esbuild/android-arm64": "0.19.6", + "@esbuild/android-x64": "0.19.6", + "@esbuild/darwin-arm64": "0.19.6", + "@esbuild/darwin-x64": "0.19.6", + "@esbuild/freebsd-arm64": "0.19.6", + "@esbuild/freebsd-x64": "0.19.6", + "@esbuild/linux-arm": "0.19.6", + "@esbuild/linux-arm64": "0.19.6", + "@esbuild/linux-ia32": "0.19.6", + "@esbuild/linux-loong64": "0.19.6", + "@esbuild/linux-mips64el": "0.19.6", + "@esbuild/linux-ppc64": "0.19.6", + "@esbuild/linux-riscv64": "0.19.6", + "@esbuild/linux-s390x": "0.19.6", + "@esbuild/linux-x64": "0.19.6", + "@esbuild/netbsd-x64": "0.19.6", + "@esbuild/openbsd-x64": "0.19.6", + "@esbuild/sunos-x64": "0.19.6", + "@esbuild/win32-arm64": "0.19.6", + "@esbuild/win32-ia32": "0.19.6", + "@esbuild/win32-x64": "0.19.6" + } + }, + "node_modules/typescript": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + } + } +} diff --git a/python_package/package.json b/python_package/package.json new file mode 100644 index 0000000..0e66d80 --- /dev/null +++ b/python_package/package.json @@ -0,0 +1,13 @@ +{ + "scripts": { + "dev": "npm run build -- --sourcemap=inline --watch", + "build": "esbuild js/widget.ts --minify --format=esm --bundle --outdir=flourishcharts/static", + "typecheck": "tsc --noEmit" + }, + "dependencies": {}, + "devDependencies": { + "@anywidget/types": "^0.1.4", + "typescript": "^5.2.2", + "esbuild": "^0.19.5" + } +} \ No newline at end of file diff --git a/python_package/pyproject.toml b/python_package/pyproject.toml new file mode 100644 index 0000000..ec5eec0 --- /dev/null +++ b/python_package/pyproject.toml @@ -0,0 +1,53 @@ +[build-system] +requires = [ "hatchling",] +build-backend = "hatchling.build" + +[project] +name = "flourishcharts" +version = "1.0.0.0" +dependencies = [ "anywidget",] +readme = "README.md" +[[project.authors]] +name = "Zoe Meers" +email = "zoe.m@canva.com" + +[[project.authors]] +name = "Alex Sadleir" +email = "alexs@canva.com" + +[[project.authors]] +name = "Vincey Au" +email = "vincey@canva.com" + +[[project.authors]] +name = "Luisa Bider" +email = "luisa@canva.com" + +[project.license] +text = "MIT" + +[project.optional-dependencies] +dev = [ "watchfiles", "jupyterlab",] + +[tool.setuptools.package-data] +flourishcharts = [ "*.txt", "*.rst", "*.csv",] + +[tool.hatch.build] +only-packages = true +artifacts = [ "flourishcharts/static/*", "flourishcharts/data/*", "flourishcharts/internal_data/*",] + +[tool.setuptools.packages.find] +where = [ "flourishcharts",] + +[tool.hatch.envs.default] +features = [ "dev",] + +[tool.hatch.build.hooks.jupyter-builder] +build-function = "hatch_jupyter_builder.npm_builder" +ensured-targets = [ "flourishcharts/static/widget.js",] +skip-if-exists = [ "flourishcharts/static/widget.js",] +dependencies = [ "hatch-jupyter-builder>=0.9.1",] + +[tool.hatch.build.hooks.jupyter-builder.build-kwargs] +npm = "npm" +build_cmd = "build" diff --git a/python_package/pytest.ini b/python_package/pytest.ini new file mode 100644 index 0000000..d0a0357 --- /dev/null +++ b/python_package/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +testpaths = flourishcharts/tests examples +norecursedirs = node_modules .ipynb_checkpoints +addopts = --nbval --current-env diff --git a/python_package/setup.cfg b/python_package/setup.cfg new file mode 100644 index 0000000..a74a312 --- /dev/null +++ b/python_package/setup.cfg @@ -0,0 +1,7 @@ +[bdist_wheel] +universal=1 + +[metadata] +long_description = file: README.md +long_description_content_type = text/markdown +license_file = LICENSE.txt diff --git a/python_package/setup.py b/python_package/setup.py new file mode 100644 index 0000000..a306f34 --- /dev/null +++ b/python_package/setup.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python +# coding: utf-8 + +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. + +from __future__ import print_function +from glob import glob +import os +from os.path import join as pjoin +from setuptools import setup, find_packages +from setuptools.config.expand import cmdclass + +HERE = os.path.dirname(os.path.abspath(__file__)) +version = get_version(pjoin(name, "_version.py")) + +# The name of the project +name = "flourishcharts" + + +setup_args = dict( + name=name, + description="Visualizing Flourish in Python.", + version=version, + scripts=glob(pjoin("scripts", "*")), + cmdclass=cmdclass, + packages=find_packages(), + package_data={"flourishcharts": ["internal_data/*", "data/*"]}, + author="Zoe Meers", + author_email="zoe.m@canva.com", + url="https://github.com/canva-public/flourish-charts/python_package/flourishcharts", + license="MIT", + platforms="Linux, Mac OS X, Windows", + keywords=["Jupyter", "Widgets", "IPython"], + classifiers=[ + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 4.0", + "Framework :: Jupyter", + ], + include_package_data=True, + python_requires=">=3.6", + install_requires=[ + "anywidget==0.7.1", + "requests==2.32.2", + "jupyterlab<=4.0.11", + ], + extras_require={ + "test": [ + "pytest>=4.6", + "pytest-cov", + "nbval", + ], + "examples": [ + # Any requirements for the examples to run + ], + "docs": ["jupyter_sphinx", "nbsphinx", "nbsphinx-link"], + }, + entry_points={}, +) + +if __name__ == "__main__": + setup(**setup_args) diff --git a/python_package/tsconfig.json b/python_package/tsconfig.json new file mode 100644 index 0000000..8b4afe7 --- /dev/null +++ b/python_package/tsconfig.json @@ -0,0 +1,25 @@ +{ + "include": [ + "js" + ], + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "lib": [ + "ES2020", + "DOM", + "DOM.Iterable" + ], + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + } +} \ No newline at end of file diff --git a/utils/img/alluvial.png b/utils/img/alluvial.png new file mode 100644 index 0000000000000000000000000000000000000000..91277a52920ffac63b1e9589b9d120dde53600c1 GIT binary patch literal 339454 zcmeFZWmr{R*FTDcfG8;;NF$vhAl==mWj7bahs3tqeu6UdszHLG6f`)JFC)ysxS<-uYVJBO0-8hiN`> zH~GGSD+BSsyQ2>wC&!`oy#m5Zn@IEf`;XIZ7h;*1;~3H- ziX`7EH8hx`5$dqOo)IJA=y>e&;v9=F9y+2xKK#RxGq}Wrbw3@K<{ROvWA;_b`sw^5 zHch^@c4Cc6W?8Ky>wb2-YA0IBuO-ACjp>IuFGDIRt|@->Zc|DzXb+c21PWSq^qRLP z-O>+9KATNN3kj#d#95Y-WIQ{(YmA0!QX@8)+lHuw*x`xIcK-)z7n2RQJZ&d~PnydE zTyFVp!v(n?zGh8ia!$C~a#s`Dh!M}oGw{tG(TFSfO_r&|-ACcLXOexHbc&YQmy^!y zI+_|TK};7qkNf?pAN>=Rw0HO~WW>IIIL`Dq^FQe1Hb>`GmGe%eV4_rrA}@&Vis`~y zeO-wzQP3euDtaCFwY7E+MYQ#8ttkvq)uiFss(%dyyAlUMc8HVdhvS-B3Lf<@iQ-!y z4T*{$hSK4;pyUpAadx0^puc_kGu_(OJ&cOX`#}h@H8wJl$Q>)bIOHLefWz~q=q$zMi@3>rO1kU&i_15f(LS zqz#lzwmiEQEBCA8m8tLj(k!gyM8VO6a_BME)M`8TcXN4bN>^IDUBOyHeu5FZlIy`w|jK)YGA+w1Om9KWl#G`n;uIiyJu$LJ-EbWHQ}$s2ag z{8z274Uup8Q-9~ZXI{fsUw4b*qKV$X(9UFe{+>kjGC$8Q7J|1j=H0swulfU1kd2z@ zX0N52oT?N~*Hus!+HgLpKg(ILp9(~n$K9~cUPr<+x@EoSt>=fjck31fQGox;NQ7rC z$V5H_daJnXDBlpAMA7MydRr_@$gB}{Ta`*sA0iwr5Iw!u@7J4pZx-QXVPhSUO@!PX zRfrl*Oe_bDbVynOhpFS1gJfI?Ic}H)m4nQk_d(C8s3hKg6Ir1&`+DcOU>QoT)G@Vm zi;t<;j1pB!NvA4&2$V`iUvqzgmmEfrb};m4O{d}xEPOmI zd#HEqUImhm-?1rzTBkDy=QkWv6KiH-`Oe4e=-e1gojs+D1q4rm6LWX7o*CynXJzExb`J0h9p>Ie+yxwGoYjf8=X_hRkyN4;EK@^(HASs`jjU0**A5_Lg@)+xN@Rm ze(Kmz(Xc^Y^jP7j_6FW)=xFa4R-U2i?ihuYmQ@K?4RQGs#wQUkXNT7&K3mnjl(Jf} zU>%>$^iVC=4gG9Zh+oh-kx*O-*$mU5BhAnqoN^}fA@d=*Vs4aA%(2Pn8|oit9hu93 z<-xKuGMBQVKXXE|#a3&Sf?2by3VVn8#`N>NL{74HvW>sAYqcY{6Wq%ub#20;U+{8&-Yh0t;ha5j1d?Y4gZ?Fm= zo+9adpvW_AIchR$XKnJ(l9}7U-1|$-gv10*3(d^)m~QlFGPSzgl-xn*n048a)w`s( zL!)}NdSAXcjDHXx7%$sb6<3+y!(Gjx{Dh5r-s-yLwMlEm*AgwWq31*97M8rzjzMPO z%lb@Z_#=$Hmf>R_`6uJtrC>F(6o=ASM-G@mNM2G=|bsu*_q}E=9#N3S=^jKwQ(M;p$qtHTr-<-6Vi5A zyNJ6;bI`M==RZ!j_SebGIOW(aXL6JboeYb13Fa|{gA5bqUo>MvIiW?+n42YpPz2wW z<5%X){2JU=Jey{zPN_6|_6uHBJYKXH>evMLiPecmi3{+Ph#G`WjYB+SUdSlQ80L7b z9S*7)2b6@AEE`up{qm43J7I)y=YbGs1Fskhm5_-~$CAv2jO_EJm(I?oYcUzS(%O=5 z(l;_hpU`=l9r_a`#&vT@o4zUKD8(;TUef#iq9gfTc9(M4JpK(UCA+ajTcgB`goTOP zd(YvT&l{glx<$L0-t&J6BjR-WwtV0JzOkG*BLf$MiPc-`zi$r(k31M4MCUd8*2oYbqc0HBBwmQ)9W| z5B_Rg*>AI|6v|VoUQU;%N2bqbEsc1LB)*92i{oD!QW*cnQXZ+jUY_tm_uD7odMl;1 zq+}-sC#RKbgDt&=^waHzA0FWc;j07j^JnsFY+R2jaAms-QG_tKSvm;s5LU4g*S>_M z+htx3%bWF^Et?q<91s|uk1bDBHe)h(YYo?pny!B_>o7|<o)GA%w*k!6Nr}vzYoRSpT z-ksE{?{-(4%2G}YOtiB@hdt9Y(}y(0)KuDUj@Zb~^xu5BEcC2zJucfebPI8H-U^$U z(%aV7Z|r?JF-%+`r883QHM>(KDC$LQNorNSH3rkI!rF@7@oEybx#>f~K~2DXj5SVH z#;5KP=UY>OnVYCFp_u}iABr3v^rg9!QOi(XTFg+Ac6-Rlui>D#dOD2v0q;QhZW1%! z6jaVT@5Fg!y+7-X;z@rPuTvv$Rqc^=#}vk@Sbs9_03US!^=_akVIvz^ZAXJTbZW^_ zKh&#taUKR0p4}MIaqB#g6HnCCHND6=#?!ni{?tU^yglpEf7Hv9Zd)<0(BN?~UZYD| zeO6t+`(w_-rFw5?)yruIZzoo0&|T$vaLss(+!eaDy|?!Cntn~Scj>h2gwG?H?b8q8 zvth0qh9iqJ&Jpu5SP`ttQ_OSv(>tHJBeBcxPIlcX2~dru3LlTP;#bW&=U)z88s9e% zyEmSOUni23G z!MB>JqnVkl(@Q&NbE9TGa01<4M%xJif#4DRb4&Ia%^rCEq=mYcvzDR)pQ)V4pSvK{uMvFU7=D_KisIK0XDdM}EkzXyaXUvd z3T{?*R(2|(I}{WY0*=pL@I8}|`p@m)e}Ys%9oqA;vAMaqvAS`x+BurDaq#l;vavsA zd;FLMj9_u{uyr;h?AM4xSb7nsk6`@g8k>_e_s60jRI`&wf|!;{@UnY zXTeSj-4S5>O*NrAXir$H0U;k+NGPj=Z@^~oKSaO)2=sq_gJVREOP-d1P6PxI1X&4D zb@y9a$*8F`lF2t1+`G83Nt{$vQc4mMO7CweV^Y7(S-?4z;6=Gh&*(|t_9ikI zI+05M0ej25ca9M<(rfw1Z)MDhTCTAt#da>5eZ^kqeTgS8%nh2?m0M?uPA?!nmU9Y? zyXu<7oZtPaMGz3NUm+kGd<>^%2-|J;_pXL<{5^fiJQgeA*Q>Azp5Q2$B% zU$zz8pM!EMAWugDDfz!&7RmX}^}lHGpO>m&AfiDk<8Jfa`mek9N~P24&-DH|t5gDH z>^w`3d(MdemDGTc6aOazz#sMh1tAMa5%V>RU8$+5TPN!_i#D?q6RTYBD!25oRL_35 zZ9LMbo_dj3OX@Z|)R)ZfhN$rp@z3g1co21*uGf{Jj-doBj=DCLF*6p~$+RvoZ62XR zR7C8xa6kjQ%a`~3bZ{okQ+#GCCk#l=owrK6>O$F?+*7Y~YaKH$R-xDCZc}ElwZUYb z^k)WkjYqS*t4T{reCwY-NF)E*5+h5T)0z3}l?dJyqLY!7>ruh|uhh8*Gq&}G7yGfz zTgNkY&41m{B7sh!uK3~MHie2fVl;z#p-yEFseQ|>odm0*TpFkDN3k^%4J%wRX3xd` zP-HZ*#qfGRwq(5iVyB*ozs{)jbxCMbS)>A-*OvhQa$#zz2a3SZ6|z*0qEjwA1P|f| z6hf+|UXYwzt_sh?ybtJW@azX4%B#Y{>X@5uK2>$F0|QeqJA!h?=pZ+fO0E! zIQGM4L3u>|PTi*1lp+u8$MyWp1#|}sdMaMSwO5{UWo;=AU%dzq;EuX92~so#9Qa}y zcYSu9%s+X&pvWvQbry>0U<~B48n?FyY9jK7hC1xQ((Ku#{+Vye$7)K2=)ddE`)*|f;K9dGwr!q2m>_dfRqd=|6?5- zXj*9-_{Hvl7j1-1DpQDQdAJzy*sofi0)-NeL;#^waYKZNjh!@|2%c=)LHVt_=4|V? zXDNdpe#aC%RH5U@RXYV6L5|ro%HlKK)_Bm*A8a>Za8fscKRsvPes3o|l+|&<5bAUO zQPI^Ur>@G6si67#d5)d(z3~J9M=dEbPn|=d|)IUTMCraRG(RUizU! zK%$_RYe7QMwAgjGvhU-}0pS~Ow+Vf>T08G0k{!b4Q^~b?;j0nhTCm$s#ys{~QQMz7 zudNRF9&_?ojWbsRy4NFN2@E!_NwUcuh5Qy#zbx#UtK%6MmhT?YNxtC~`89OHXWfhF13EmG zjrev*qr`)sRL|qO1imyb-m{b0Hu*f`VqO5zRcJ{2b&&=?Y^Ow!uNgNzwI4#WBx0u@M$Yf^PY@H>9g#Uin2e^~rVFV{R4?7cNmu`S+(bXy)GaRx?R>08>q`3wbgiQ{nD&84xpt&za#`|2 zS6aWe1!7>>e4xMB5B7*Sm4viL7`kV=#u|98hn$mKs5YJ3-Ii{U`M81S_gf>iE44t^ zc^!Q) z*6$YKzL>XgQL_{g3aJH>s22Gu@wHD@FIXEr@>cNi;ra*$`J@9SPO&fQ$k&wX!|d0O zZsHcBd`@81gZ+TvnVdxNU*LUq;f7uc@a>9}QFFo_hZITPJjhAkjYX_j1G)TXqHPbji>3w`@Gj zlN_YJ53;3MQh`Y`)US*slr}WgFTBPuffRvR-lqXt0fjD{Rov(a;<31HTUY=I)C(3O zJn1db_I^HHUn`{He5{x??i}!|9{q{=-LRLz!x`^{_`X*Mzk5lE9rzjW6(0kE6>Rt0$g!>TJUY6?5b-K2-W_i_fo}1y`fY^7AEPFql45BB5SJV{V7oJTyLxp|)~crxqs1A21;mDVUW5OmyaJPAsEF%(?n zo9Nz(^~Zv#NO*@vbK+Ks9Z0D#L>Lb_n^=B9P?x>P+MmV>lFP%nW3ecznK1cb6 z_gwe{YiZRN$bV~Z_5kF|*od8p=IhFf>yzf)%N_UZ%1^J!EHf&T?(yBfa!R?-`?@a{ zb6^t7qV&`D)A__^-AIu~^|WQaeMw#O72A;?8rX?WbOk}1a58ZO#0;F0c~*-HCkXw# z&}zy!VcuExN~T@&<&2J|L%nH!A}QoJ(v|Hq#D#6EqwIRyHrsK&5Nh@9ytGOx^n#9Z zdZmN%Z%3+S5O>c+-JLxG+Or=5Wi(t)P+rxDX`h}|9s4y2?XDQ}w@;9>gl^ehC7wHd zMWcvBo5ZpaJSt|?^Eny|MCpD9ES!p>xk@Cs>rH8MnKONr#X&i*8z_(1m>()x zoVNhjw<$kE|yA6gOhT6Uj;F zDVLt7RG~5wu5dwH0k%vfkK?i9tV35O%3Hw&$Fu!qYG5;E&FE6R9d&ih*7o`?cAJ|E z3rNy7e0IGI%ZgzN*J1hG{5MC2H!&MBIp_UuP0<^ZC?9&H@baANjqbxL_~n(;8Bj@& zea9f0G3By=5B?S}np8Hr?U5L^`mM6Ir^>=thZVjXk~w@!VVv(tp&Dyn6S%DI_^Nj$&X&exShJF-s&gailnc}!pB;UM%qJrACbu6zQqD)S-;)-$H=Q)@q6nWOjuq8< zYP(Hyv57$vq^Piohyh=SbH?07Mx>@b7U#bsb}j2m&E~y`A$>?>oXmoMfPb^&)~wq? znxW5K9ZI-N?!DJa4LowC?RuO%^|NoB1I&~2*5!S#eUh2D?B*KOY16je zG8M@j z#l;cQEMI25_Y+B_SC>8Y04}AW7X74TyR`86klgd>ql%+(-FMSU+{e>a#W;c-UxI7{ z87p&fqpas?$b7b~49i!T#h?6`wa!I==QwR;c9TLeO|Bmch*m2!Y>gNSFrq{&D z&j-KWLVc)0Khb|cREM9Z4y~YL-+Xz8v>CfyVj>w05=Ehjc9#x>YKuvlQe!HJ%UCwa zlJ=*I!Pzrc6`_{%J|`>>RSW{T|!J%R7)Zme?=0 zJy(l*Q^4PAHTPN+7nsElbR`i|3-ba%@w8y$?U_HWC9$n(-3BgEKe;7uQ536g6>|j) zc*cNsHmjEpAWN3Q8q54UHSOzNp+>FOw29V_HKNgDFQgyyH`_b<=GV_S_Oc`!vMWv! z-2086C_k4+7bW`SKlL(}}e)w$l-G{ZwhWX9@ zh<=6u1Y}DufbQR&}n{_P}zsH7Z(SX^G$4+Q^P4k70rAk4G^3h5tl`mI?J5c_Cf zsf=x%nIHb+-0#CwZg?=viSPW6$nS3*a|`WBB8VuzzN*D1zTKJU!8;KKPH& z>(AvuYao$*pP*7$f6o1FfByfz*i<%T--DL#O_QB3x%^!6%DdtID!V(PU<2jRp!42R z2Q@Oqpp?;WIFEHNH4@OsEfOFiQw$)sp-|yOl)hSvt=t$|oUvWM-dhl_+`voz2VK^% z{El8I09B-3TsfbKx;2v0Y69YnHGV+CCh9M@kk6F?AKZlf{IgjUDvID#0!A%(Q3w1* zVI+kVDopV7M*=1v((nBxmIT98NBWE?2i?F$AL%e8w8IoY!J7w5xBg={z~IybaEgo2 zkrKi04Gu73L_9j8sTy!L;39Rt{d?S#w_sRCR${AI>Mpo=9zlePy(SE1dCmC+=?@o* zaDh{ntUrL`her*}3x{pRYmq{D#>cNLEMffK9+4LCh_WXkKr;S)81lb+_AhJv zD^CAvjlbRCf0g6E2IXJ7`LBEMpQQf3?!mwA!N2ao|F!Oc$W=fd%PcvW-eVc$)7O8} z8gVorzKTXBtHvgJ29Ct}O7G@tgD5V6Yd(zNcceA?1_YwXFZ`QCj5gp&*Ix&KTcZUDSQn7<)-b=I(!uTB_TS|b?PAXbdlY$)?yeG&A_W>gK{vV)* zf1d=>Gym?>zx?zs7yRF$RSXTAK>-9aIZ?>R(}w?SE#n>ERRJi^EM`}c+8A|V=Mg_$ zzw2=dQhN91lO9w3PQn4~3V@*qs#%Q}IGoIR73v+e=~&%g`W+$HrhzMogrbZ&W4Roz&aU+dY$Kerh1 z^m|B89rR*meinMY3az`jn!j;j(kPH|p&5J#sy#bn#lDp@X0iIue5<2O-wBTEL$8i( z#wN7QNvlEHzgF;gvR!b;;hhtkN4Na!^DRqa#hmlmRiRa(axg&$a(%0yf~MbM2c2&gr%Z>1h1Gx( z(!3xTLTLv|E-vKPd%>_IUZ-ctq7tBFSdqVVc`$&*pQpsTe4ozPrVLSR?0FRV44c^4 zWLVBEziD7T^RDg>iTUXb%PizdqcGXRQU2n4Ye)o>K z@P&4nS0}z^fbQ8dsbCpU_wI>df?Z$i?mF`?Xg2NRSC1(1S887ZXx8Ro#z7H49FbKo zf7InW(lpoYOW?{c^!=t)WgQR4q|LHH&*a_O@A1@ZSI-M2y>S7hwcwe%(s+4f-g}}a z0QAR)=GsLL^?ssRvmxs}q30BS0k~;tr)CK=n+|Pb@2vTvzS#+YFb-yCYn?ETOidb0 z-?snGwOq zNGnc)E&&U$4PYdlyZ&Y_#2E+b)4g}934{Q8P^tQ!+`~{&)CML)QFB9|>w^?G66+FC zW+lyJ=uyH%!xuOVhEkciLqZg_26~u5?!x9d6v~)#p54Ceve&SsJD*m1BTY5-z&uHH zGMu2-8RpPM3VRf*_v~q`Rl4aqjk;`{XRq!Yu5I#%d4MBu%cqvcgK< zWF$t@V4X&y6Wh&cef`zVq4LdrSJm7(IG>e7E7WH`sRB&G!i}!EJAO2_oa2AwuJW_eOG`XemX!3Ug`!a3-lTgc2HA%I#^-Or~V(uhJ$RbuRCX%qL z$K^YGEBYfoV*i&aVmLL}iZM7mv;sqR5int$Zi$f}9I-jGqG8ep$JxC`I|Ma(wrzq0 zVd!;Ez5jCsux>AD(fSmC_<0v_s&(Uxn^#f4uGxGJ!B(%>TsOR4Hk@TL`1$sAH(Y(~ zkj$S-J$>Hj&6GU7QPt2Tu)?u}VR$N*216m#!*+eLe%vzPy}~KW{5Iw=Kz#eoNHi+` z7ix8%vtC0?W%}8d8R4&Ga`ZL1Wd@^jXtVep3cZ!UBkcuB=RWqMiuL36HM(O-Q+3j0 z9;r1fKxRwB?T;+Zi+y1qEylC0?WceYlWv=V7@>53lJA0?<@m~@nq z^(hscmI9(a6GV9u+*2dAOxwhu2!6%bC$|tin9WX>wqeHR6<-e^b^a~K08-aHTxDxM z>dp`Iv>0YA0=sj-haUPq6W@&X$tG2cOcXEGKCn{_FUgE z-I+!K-0Z{fP>k&Hms9DskG58q%{LdqaO5Wknm#~QmX3^o=BW#Ca&NQ^jtk5nt13bo zG(2r140-{(1HrukXw$*L6)VGwgc;*t(t;U>&U!fiG2V&c>(H+sx?Uu|PO~u|tKpMe zb^v;qn2?oGJoOV`ybWHq!#lqX`V&961!%rLDuw~f=zUD&2_?GZnCIdG@(e4ovqRd7 zcb008l&ibftHc5;9X99TNH4e}VIMS-m1w)c+OXHQC(*Q!dN=@ZmC2aCHvpIVy{Pec z+BvdLB3;+6aSR~%U{dt0Qv8*pwiT(_hq9w1+YVp}Jag`**a0+m(K+NDn-jD$?Wkk7H%5SwP!U-n_ z*Z8+i{~psu&H;gub#~`KTP(E+?PqnJ1?0iGT|y6CCyf^cvL^@J$F_suEC)-M3{7%1 z6I_>7c2st6!<)rRIqk4lX$Z(FQ_1unH$2MItOXeH$05c;8e>Nf2Hb;2S~tPWn=fFy zv!z{RB%g}1ozlMG(LN@a+NDvKyx|kjzlw@H0RS|v7s1)YO;_7?$`({sv7nGSz5Ip? zP2mn$foyAp+8;i;rEH`X$cQe>C*qS|SY?^GYIymb@E7#0X96?deKVmW9u9!X-BL?A z|KPPBosu-nkxr@$OjobzV*%shnS;;YA3(@27f@lXsN_l39U-=vUI72I`Q$cff-M&9 z1mz+ssdMCrhcewK_jIp5D+9Hs_w}o>+Vp^ka-6YeD@BNt}M$KIxt zF_&Uk>wfhMFH>@m#nafmUXV>xRP+7q>(u)P`9-Ga5X*xgo`%+6P}tWAu1uY&`eI$A zZhAEkRa53*I5c_3rPxb9Q6CFHiIvZ4bm80*8uq?;*|URi15aR;7c30ABs)%6dd_ccTxWKTwaMN z8BGQ-CU-h_;7A8>etaUa9pt&GJHG+&E7kT9BXA708}K`VW>(aT%2VMeXGyg|8{=aN zM|5Gn54yog@?o`?`@OKU)s&PC;bjJ82SR;kRk?Tg>r#KYg%u<6^}ZDsbhnR=!Z`cU zs?TLbm{0{h_FiMK=G@P#P*eCG{Uu#|DZj0oE+whobweZPeKG)~H!8hO>EGZ3&OGBl zF0LlJ@h`{9`|$Bcdi8Y+|Ljkmmd5nBj3+R+dG_i+#FRlyF2QBh`e7O^-2WHry(i!H z0hxgWAc~{ydo{hw446lDJ_Fzp18w^efM(rWC9*(Oxywi44Ty4=|Go2q``wW&MU3j` z?S_MX4y$igJix$1Mq20jM)lf4`#(NA1q}{A;Km+1)(8&V3aq&v(pIe_RZ;GTquh(-0bLGa0(AaH=laa^lP^3?9I*HFGlo|i znlNBG@i3iYQ#17;jbY0G`(5P)AXnSKw6##FHO`E@!M7x^=j#{FYuz%}H5ehoEZ5GE8ypK#G7+$3IbS2I-$rT%d zl5FZSZIR6jyYp0MP;IB5ZJl)Vb^g;3=V< z9jp$xp^~|$!ac*}PtG~II4(*bF)?q3-ueD;rmu4)Aaxm4O)I=Uo1SP|=?5-%(2|%h8yzOa0xqC9Nu{))dPICe7wvyM1wg64_3T%4pk*`DWJ_v*huQW3f~#br1wuK0`!xT~F1|}Wlde^vliIx> zPf1%y+ru7kw#6&pN;u0ex{Ftf#hkM(%2cz-X}wtl{<_<*I0`fq;FrHv$>7YPF_Fyy z=x5L26kF0!BI{FtAbt3S#zC$=8FWD4eIm%=OoW5(>~&{>1?pl^?+(U{pHRanu3brR zzR27^k`N;`G8BqyiY)~IL_@S{oQ*JM6v0Jh{?(7n+PMAnc*5b-w_$Y*i#wn{L>hb8 zL};Q?9=Igi`yIr{w1I%spN+a0elPUZD?0W9v6y5%!EUAM&wYtJY_p6!(|EhqBqXue z=`*(oS@nqeeWy)AS!O{XZ4)E=Mm}sriBfQpZI1XQf0_5$zCA{&D**(haw6UUxa0D5 zip6&N_WB$C@Cy3&(%ru8cqgGlN?2-4ISC?R)bdeFy%C2WKLRcjL% z>v6tkcg2kMkT+=61wF2V7ISGw#qA%+Xr{nwVEQ>P8=o}H5(_Jhz6#g zyXfyha$>jcZ+71X2&6bqWT`BJ*x-z=SL6{M54-5&_DhY%QU)`wvCg@g66=IE?w?Eu zBzKlOhs5@jS9R_ibydH!DR-^)S&~0%_D!wae9rvdpT7Ce+>w=B-%Uleg0uv%rVo^o6M1Lb=~LD6d7nZRY+ zxxuxw$o1}pLyGUyA7<;=SRO*#n}O#Zb>u!9<12=-%$rpkA{&(I_mDZ2{^5Mx{U|~j zm{-T5F+LvlQd2{IEsvmv<|SmJd%v~Anpi#@K^`oN~gQ*;?2GKnk&l^*bq(c9M} zchH}S#_24P{j|xp%$bS(03y<(7>Q=eh26NHCtl-FEGABrTWHQSD$;3|t+>q@JsTXJ z`K5^Aa~?sBv;7Gk*~w}8`seXGflSb39@9GAdEr)xRsN2Yqx&iGnK)IV(nRZQ0Q6|{o!tWff?h<&0V=1@e(Or#ktUmBzNE9fiVugoP9|Gv1`dh_VXDNrZJI$|ph33oOZD$p^QQ5ev zOXBJQD4GEr6($#Xj1BS>e0Lx&x&?Q=6T$}XduwJM;M?d;2IUu*=wLnpT7a4Z zCASt8ghVj?(ld8IwdB#uus~@-p5bO4mVXU>#t`sM*=HesK-GsL(YeNDfN;~4eVox( zWCf-Br6k|SZV_II_T|esvh@8rAK5o5_=eB*C_&=}fG0Nc>gEgjjzYg~nkPWzruY`c zy$TZynZ7vB-4NeY+&@yjqN%{k0lK?WPH(T%YRf|*wpd)d=&0m|Em;*mwr#oCs8Xde zO`Ojj!?mxCPuZOI?$i(I+djUi^=UR!w&Qt)$+n!|0+`-tUUy+=FKz@fZ-1rwPc3Nt zw%bhCn-1IB8S9i@|1H1jk8cSgBRXvC#$!V=zoCm?tD znK4lqqBO1LNifa@hF7=fT{BX4wsfTX!hp!cAN1!?4q^e3xk|OPHn49+0bc$^Qn!U9 z56oGux{J&!Acgv!z%Ya08he6@3p}j_;{UNUe$WX~#t$5o+px+Xc8>${mV0CC*?iXJ zclLWh3qH(6bECIFyL?uOfBU}sL(jD|hUSObAVYTXov@i`dfscdF;}a;4R}u}6b;+W zH`ff!6Ec5okf)iz;_=jZb!7?W`g?4A!XDR0TbuY|!OmJTv6uG)=?hyRl+Cw=ALlr? z%A4^`4p?>_dFMtcyH=9(M7MMmY=BQOm?-z`Q>LAxuYYCG7_e} zCaPp^HrrhsX7NH7y*?W|r|AC-D+zHi(C=G0mTMSM##r!XXCdXKF5zp3lc@pUahr-EDcew%DtdR_2KUnFkTl)h z3N>k$>UrM_v1DI5kkcK_J{S-d-pb)y{-8GdBGG1iw<*lhg?NVPY4j0)v0 zfCxU9|7cXLo#jncx~p>Ix}u#Upha|_Z78|dRw>*&wzQhpC=Cq*$`#`yGZvrBhVOkj z6Dd8^EN4CJl?UxAWL;VLUrfb=osG4bnVa<6aHivvD#ZG&0vtE#-z8oSPG^V5aGbAN zRh@NT#ps9k+6u9on$F#Yg5N9p=w3N?UJe^4`Q}RUEy30j=P#|7E3%+^GvzQN&NRDy zEj{7YKwr6L+$^5Qj9|fjuEL1wb9vfu=n<2xR_U0S=d1%IlFu^u+PBT9yI$24cb;(` zv7Mf%Wy{%_@b_;4aGVWr2GunDvRs{nl$vM?g79R>r*eAr#vhN^9I{hkh z(JM#w(RNks>G@g)ED?lq>dH9i-qUZ60nJJyo59c^T?DiCAkO}$?W7JJINVlZKf#u| zmcA$OJzGn7kGXWn77M&lhgM<(=@-k1jRiUf^OUeMD}udNWot6@3#)xT41D$rBrZ>DpYHn?yl^eGz$2NB&q|`>9~T;9A>X;KEcWS3_Bo!)z2f}z zGpuA&P7LH;^WmxO-bjO5N3)!A;9UmIAn{BZ`H#M!iu%jWD+E|6+idly2jvZ)z2#!n zYag2^UoS}Rw!r%&wVwG?(~M`$tSUEGIB)Q?@ZCE{We)LkDEi;B@;7v=84OC8gnPa+ zqofUFbGEYe#=xdH$6Xw{#xynu?of?q9lW58miQ&dsm;jOA9p|02@+D2NyYsQmfBymq1yl=IlsV_(A&3Jk_o-O`DYW;rC_MP=vyHf;p(HFTJxzOZ`-9&;d zjn8Vq3HYUk&&G{^Y~|#&GY_JoDTD!sy`#njmIso)U*LU)b?{=>j*XpHqSwz*!`T;x z{N5l7rQ>#WG!d*jyfTnN-Y>_uk(0qU_p#dZXv0Vou^Yr)t2AK(@VZm*Lr0k!SV^>s z%a9}?yi5OUvV9x6?GunwOa@7aJMfgw7>jmUhfP^G?M~@Cp8_usWe{Ov+L43|5bbK! zO{s#8#H*gGA9TX#)iV|o?_EXK5!^|!*)(9tg4!y2PhJFqW>wB4HVt3mbXRp*=LFvJ zD=d@bw!yh;3-h8+&~w zn+n$Bpt5EAtY#T|4ql<15!txz#yr1!q{FQ`J9JzOz)5;f4vCx}r3#I!s7#z-b)Dhn z+7@$_aog9u|EX>M-nc=S=5%=AwGLy-I=O4AzNW4XJJamroKpgWj=zk$h#m4rp|WY& zNICv2Zvih1Zo3Z8nd&sE!s+#qR%rz*HKXuT;w9{=*H^Q)htUNL?LkGuSzS%!QxSQf zNzvD&v~p(99oF<&;(zF1(`t|+e(LO%YKvE~2-?=1ZjSA4R%rMbWGIGMEbo+?54aK< zxTnnknFW-Gg6Z3&&W zVtvdHXVU-W6Fwdnvz_eWA|t7jU1i$1#3k6Dx-<9VGrj{R^At;Vp%c0C(S9?Mw~mGy z`!Z#5eH8TdAtE!nJUKHUpsTbX+`O~VI-)%31`%cu_AhbryRO3PA z8JwW~8aVYTq6qCGr?GhOd&N=1zVzC%?alM`f48 zv-eErI$ZIQ_?|~=ld_huhlN*SS@=R$Tgp$v%8a~1Hi)Ylox*25Wl0BwEFDTdiDj3I z_qb_!dvesb{21V!ECVBBpnG${A1jEI3)FAX_}wd(7=qxc-1+8u_lC?>Z2i>^9Y~le zRY$=<8r^MaHV~mWeAG^UZU1#*N)xx>(`g4?knSY-iK^M*e)2bbxEVr+ zX;^_U>D&p<;$UTiZ*@E^~^=L<~5jmlTG%hGW2}JKE(4$s=gZh(6r2cY)WJLR#vM2;c|W~aP{RvV@iY$ zkwPb)et~7`Yd1aHh28U zZ0nRpA199%UBH&IgaCvLg(xA(3P3*Axt}Ime1-|2KC~B^apg_-e#K8=K^A5DL0qq z*`!8g4j=(qXD+y@J?INNRXH~iZm1xiqq;FN5h znR-y{9OuiH79j?K5im9GC9CKbs@TwHo5l~YG0TYav3mQ+;<`U?$#O#SaMi+*POM`T z#%lE~nbCPVv#-)O%649g`9oNzulP~DWb3zy+? zixN;TVqD)(44*3awxK>IazlHyrg5&uE#g?de;IZ;JTzx#5+tC)G=)80rOzBj+7@Jujt@~A}9VE_>UmO z5hD`_ln8{V;pRB&8d83kBg;Ve(3p76qhMAc)a@;xoP9Z)P>ScsIP7_$IPOj3Bk+TE zdIoZ;?CT`|MY)8n{)_Tsn~lngZj#B5Hoo6i-E0kg(=&d2u8jiWc6UVHN)y3@vr&*0 z9b4rEl(t_ zWyHNz{YG^l-24Kh?rtFp20@Km!xHJvSL%0Llk-Y}u!ziPm80tBE0(17N2NP0NLbF& z795F=+vI4nJ z-3B!hYf22C?SnEGmRYhCohOF;> z`E(I3_~fVnrj=jFmgVaV(~w3PdR3TmxyrKiDm{&o5gzZML4Hbp!ADek2ZSYMl^Ilf z+?-WB?}8eaeGP24puFF)_alo_U8V9W86+@E&rQD3&gCS9@0qO|KXC-TyDqr6$E_~nL3ZkGRtxwm|a>JQhx z6-5LDq(oXmI#jw5m5>&Oh5?b5ZiE@>?vzgHl&+yWq`MiAh9L(AxEH_J$KLzc$MftL z_lx^4fMcy$*E+BB{Cv-KUAy)pdL?m`_$>5xx%9r7lWOOW4Xpc*PwozNs(Tq$Qp@KB z4X)mw2bx}Tt~U5!TR-Jl7e8e(_HHd(Qhq9VLs?nU-sot00cT@0 zAYRq+^SPC>=Trk_VEX4zS(bm|!Sfg#tDp2MsC?EUDhB&9^+~X($TF1oevja5+cnN< z&Y9RBWjA5+a@R_u8&Wv#!4geYSJWwAPUQ=T*{5TvjeJtCpxQP2o%02d$`GVRkw#h4 z=3G$oJXT<__Cxyz@UwDDfu(G|WG<0;+S(=<$cCI#$Fj=6xkg;-Zc7BrXxU|sTh->I zeK3_zzBa1ZGkf&k zoY_goLV)ff9aY(J5LyBVmgd835ernPwR_ebm;kfUuXDoLV)o!|yeo(joNsK*+6LB9 z%co_ccU3P7AF4w`cdB_)+PSGR3dZ)lCY=OCN6H=OR5ii%Ift8Kx2{hktZG*to!>D_ z0ibFHkdDd68LpaLOONvAn}CUn)9m-Y*XK)1GRvPLo;m}iQ90Uz;bJ!zhwnR-OmCEL z9UeDtvr;(xe(MR#f3weIq8ds*vrJ}sz1Nh3ZY@n>=bo?DQ7*a2^V0H91n#7l?pV6g z(uFKU^({o6{Db`L?4U)GXUHN)%tN6Rl(Eo2=E9-#yWTJTVa%_t$%`9b2qW)nX0U2* zw<#192IMady@a$=?GSg1SjUl+G@26o7FzPAuDR6edvX9(L+P?;f)B5a_Yx49F_34M zb62~#X>s>r$hobh&`J7gTC>})Dir+-O9>ZmfYt(l=(t9t|-E zsIY~JlDQZEHOg=xuiu<7-yKUIR+$b}%F+GmAN8=x`6eUFLgBka)BdvZjKk& z>s5c=HIH~b&e9b%%3u*~-Pb*Ei@#e?HB3ne>#vn+y0!$VGFbN81OardP30)F3E{ZX z<_l!PO(8~&5};jwrx;4R9-6oOmq2X}wN-hr5uj)L2=Fjvu%sv*Rr!|}CnqeU>UG}$ z3H%CtH!V_F4&8rkFSxDwJ&$?j%Z7L~jy}BBJN;aE~2sh#kr{lYA|# z_$IAROZ!TOSuc8bd~82pf5>2lUk0FZl&ZPZ1bGMc^4tnc~{cgwJG9>)A6}7oa8d=hJ}u|NV=v<*$?k!1F~B|EiS%>K=ZoVVVS4? zwty1Uc@zG*W|>Kms4Hc&(?ESfeer4RuPpOQ83t;!r_VV7&+&+W+~nHIr{Io(x$9fA z8_QM1t112PcDwm%-+tI*-@bipxxgoG>3ZLJf7&n{M}!3%O0XWDu$rY3Puie?0Q9T2Q(Y*1Eo}-TH|+b0PFU# zC>FXXO{Tew=&;n&jNMm?qRq6;(2pY`n*kd+*$k&vt z9S%srm;F^#=eM0=Pey~dF<&6_D*sLsFrA{S(sP-_u>EuZ4^9;3z3{vGE1$&#s9~Vy zCiZS$^2~K$8oVTLm@(&95NkGguE-sudj<1mv1b*_3g@DR{z)U%7uX9nR?r6YMc{i@ zXrVrb-XOf!>k*mqWA5MV!0*#dTage26iH_7E6(H?5qXtT_jP7 zPADpi-e&sT=gpJGtA-8F|H86Y_GXRTa-K$PoQqCT7_@wBzv#-M&sC)&c=^0|u`H&> zLxvQCS4Q3Gzh)6aKmJJOeY%Qo+BMn-j9^@UFWKopnp7UpBI(^uS{5y(*rdWl{k3GS z@8qHILgrbJdSlyGpwk(uu&}gQFhKt39^&XRs8FpK3nNIj%ypG8?RhF&-h)=d+MCOr z_8CnA!>=#~!Dk||N^&RT?@zTAl~jLQy40U4OH2kbrfN)YWh0pK2GhirJT`@vjw}Mp zW|c)qUYr%#9MQPex)$ox;wm}fv-NZE``2$@ZR>dG*A-_2p)f8LtLhl^k-E>|BjGRyN# z)t!Esvx|*LcDk&wwm6&WLc!_p3oV;WU#^(@%Wu}YK32!40xEA_diqo8?O8QC=ih2> z-0YU3uP}ehVhPi>X5$T^E3PR$Y|buR3|qYlFR_#eag5@t)Fg(ybM{_{OIvyDzN3PeHid@1HokfM=#y zDJMnX(slAzDjc|+jbB#pni}uWJ8$Vq29^Ip}IV4w)rS)j{DMF%#5Y+OLAGParn)pJiUvSfXtFR~si42xcU{oxFB=45

    r!3>0)(-r_S?+}J zW?y>GBlINxT~Q=hXc}kG!?o;ya8mINB^~A7`c3i6rL@ea6V3bKH(9~^W18XK9>^ni zZU5}eNx`$JsVyZdfjq5`CRTSJwH~8>SYjh`jpp4GVM&9wLYBN!d$mZNnh8mY zAuD_W{}$DkWuGU=oYzG9y~IyVIF*XE_QI)tb2j4;Zw(3MeKjO3Ei?Rx4QX$PD_wFs zN4)k>_>p|l9EY&C(7iC5865aoBQuxbm4bEKYrV*+A~t<)w!`>?_f$g9Xtwg}F^~<} zUm*w!85svd$AOsFNtNfks;4LSj`9*6HUQWZClxdG2_ObbwmMGYGEw;R!-^#O`zdl5 zD!R8ZvY(R+++Kt8iM#e#1)%oJ#-)}_#}yvyJJ(YJ04O#M^LJjdT9L*IEFa7_k9!dn z-$+0I%o$*Ue04tpJxl8rz>$NM2s;tW;eGL0AW~|xDy0hp`20IKr`|}RW})*zkK?2G z)aKmua+!x?NaZ7U=1>(y`k3c;Ad%2%#$3SrpMdpApN#X&Sy?7x4q%nrIo|9oS2XnW zImL76l3CR?-a%!6UIH^g`czU0oV?8ZXJ)a0S^bPnQ%~c9A%h;bzOiiVBPZMAW30RE zso<~dsd94A_Tql9jER$6D3CpA$LvX_F^E;3nHd^|+#nMzA$HIaNMjg~J(W#Q>b--? z9pm0N!hhU zlD+i|w^)D83p7=hIhfC61{jR}C7MncVk6@8$yeCG#n-*yDc0`4^zt~!eRtbd8)32V^+m-QRBWj zm>PFbi4X#WD-X1Zw3--*q|+H5S|NmfuI}gCY{Wp00M`sODW6)ZLR9;vl@)4oL_+%7 zTKKhQ^#Tp$V!XSn8}t*~Ow}Vxh-mHqZYwNwDNM{K9+0x{3#XYRpX3%QSRJqfQc5?V zD071K?d-esM-PF^0XRi(4$Uf9RRl^uZn93++Tf^zhkyQZVlZK&p~oG+CA)MjSWBL(kb9&)Iv2YsWbYaA+u@-q#?BfJOh0UeZT69prhHhEL-AK{1=8 z*2uZ~-jSYOE6&$m%_B2x@m){TI?4_hU$M_YaRwtkS_M2ZBHM=9Dv}3iRK7 z5Ns-S4c_xoLquo>_F@T5hVCi;$t@LggC0lapTxlUr)_N>%S(8?YlFQtLD`G05(Q_4 zKLYQZy?iMF@&<=I@#wodeT-1)x%Wb8xP5%?8LJ`tx?i!*T6soN<+F}vJxK43)#E)m z1ugtSan|)e*~wu@B+o?u-c@DMPyN1kdNk}}eN3lxw|z6~e&)Oj+u;3t{i)5^u?(#d z@I)AkqZH&5(;O))CHaPvs>q2@_8K*9C&Y)$sG&gO+B5M&%5PEw@y z(^~{QI1A#+F}&Kkp(sqL?s3wRshqVl#Qj1-h4v62VXopuSFIX_2y?BD8uGAcP_&83 zC&8o;!}bH$3EYB(KLc{cTIudhTeLqv{!9e*t3c-scpA zV?f{ER}R@JNrtB44@9KnKUm$cJe4uW9i>2KnhBTSe=`AQ&3%$|Cx1mPJH{18>ey!m zybjVB9IaLraSt;Gd}!iPJ?X;-`h1n_bAwur6CB6IP&nf`$!&-9*6zXMmt#xJ#eQoi zYvg`M2}hStSiim;%h3B6+OJqva0Keo@R06i;VG3sx^WTOA*@*&hctN)tmyKFMCM zRzZ#ne4Y~TOmU-wYBG|;jNmAJ#(gEry|RxmWIlD>{i^T-ypf+J#7>5`c~mI+!ko*x z*8Ix$0^vpeX*-Ctl>SYkOTi0S5+@C#y3X?j(>d_5n&p&+Q9=B_G9SS5(ZaPK7oh`e zgT;MXh8M49{$n-?i~=T*onV|<%FY@K?o`BnWftS)08U4C32%Z!zg55D5hwi;V4R9D zW4|i*_jS{3IJ-#-Qyo`)pfJ(sTOpP<^su?-rED$(5Wi&vI^<2Qjt17$5M!7QJaa{& zt>qfkbZWP&K%Ti52`_f2`)TnMFZ|}MA+-3=@S1W^wW>eG1TfZ4jTP~{CQ7si?Hj)G zObw=VvU{Gc%N5_Rai+v0J5YF!h$u^%%KFsQ^R1bm+00_)JACW zirwIo)ax&gLTb_*dK4#*24Jq6iN9SWoKJbDDzqw8;EYiNrAAh^yDuBoo}mD<lb$4!H;}JA)&3fW>rDZZhBVV%ew2@7m83V=A{dzN?OX@E83mh z@q!B7LWOsfjijk%goENtL==PyQMGFZyZM$z4XT1c3q|vG5kF#v=DU)2 z6E}EDXMC4Tf7+bx#VBOxcgI%(s7&XhpODxEjc;cmj=E2as#D2Jk}Zhu+gZNxoI~xo z^PwyQ8*aj0TFvzFkOm!MlS1uLpo3DRkO%ODu5y-@lFh0sv2Utp|DqH|ZU!ta*}+<& zbr1*Tp@RtAECjrGgt*&8R%>mD(y@%(oM_j0dUQ^Gx3C0Vi1-HQ08u-4W&MO?H}1N_ z!D7AmDBoZ*JOrxnb}eusH0h`0-4iNQka+p=%X~ZV0Soiz#*weNQ}6J{JHMVJQLES2 z*GNq*IlY!?w-a%{`BvH5~LU1R-}}Vj>MLlG_HGrWuz;4`kX>jp5v&ia88$= z5NcnL8Mwn8GEAD4PCuuh1cP)zDm&GeuD?D*POMSLn}NjFgTWxZGDPMC2c%}g&3@X9 z_{f$Lf>t;wyj^lT_sQ9tB-aYzpXI-VdmD~q$An2w>%hysRTVHE|oi zM}InnIa3wpA$)Gx2zQbXqnN>0J)4>iose$=jOEaYbs>u_*{HO6ae?BXE@Om7g%Ayg z8mTJ=f34qM%erihhH%Yr%&+gR7y!A?{?wF-t`(q^2?TPGOZz{wIaS0eoGJ_-akN5*f&T%-a>drCX6?p5&GR zXWIHPcCAoYd|m80YX*l-rg1GegfTtz^KV(eD>*@%h-e(r;7)`RP<;i;0*t?`DCuV0-K`Inw;ww87FXO-6s#v*g zKX9S-$g=r}&o6D7a)*&8f4B5BTK&~^=vsaS`CzADuVRSmG;=s7B-P}YOl%3eDzj?$ zS|o=SrY4yoCi<-)cSd<4QTsChc3T6yx!anQ1@K{!e{kGKqRLt{b4sy8>e;piWF=bA zD<@me6igz9T>11e1-beEtv37qKWVcgywJF`qR*W!S#=yJsq>ZX9l#4TwKh*U+MxFU zffrlDs|w9qA;5#D(G$NgO$+Q@Rg>-O4(QE|3%EI z#iW_iz%DC^Q&o#*Eor7-*Xd?+HH<(YgV!%*b*E(?#=egJO)H6ABx)n#A*^(4J z+w~)uIUS_KtE;;CWHFYe^bSWZTnlpi>}T_qZW6W7(C^Vo3&qm4pQR09bB^Rt3;k&` zo?%OVyb%`0AtS7(8nq|*&h2}$*SH1#^B#C21bR2h>Cy{RoFO=8BuwxtFcHrH+ZXjT zHk4Z2=!CUPbN;}zQe?^ENOTik)nz2P^3`)ozZr6xnDy|>C1Gt}0GSlCdxRxM8I z`_1;Iz*?Fiaju5WtMP&Nf1^ShI}yrw7{E@xk{~5HVuJ>(uCxDD@%8+r`1COU7m6=< zX#I@Iyudy}#swQjOfP#kd_9^oj-8j=6kJD#v9r>oXg(7X< zl&XA0Ru~gZzv>O;F4BCmB$0VxQqL6&y#Ya}y*?GQKU!kVYdI^pH7Sm%PF~DMciahk znn&sho3CPPXc|7qL`W$km%%NT5-K}Y;$qtl4juH1E=DwH_58hfMsK@yJOSkV6JT>$4rsoPDFV4&wgBTLxS_{D`Zgwv;$?y5Ni&>QH;< z;==G8+upaJ*$dUm`S2o8B5eNS$J|L@ClKUwf8z(aON&C7rn6;zu^75oIjsD{uKWlL zPPt%i)&4^bQWI;1Kkwr4zEC=RXZ@*0#b?K}b-*{?4#QBZ6wHYKrP!(NN+j`Fkf_q! zgt&jp^acDX^6LrktgyUdEb_X+7Mt>wyE%E4Tk~RpD+E)^7_=3*eR=DN#w%J zmSu7nM4~eNfFY3!}==f4X%4s$v;&|8rXM7 zanRn&iR)Kjjw|OC%zZXmw$F~u!+|@n9V3x;d<}k;_|=lc5_S(N$Z_5$)ssOpYS+8t z{EdG?UTK_>-&Qb>_oLpQPb!w>Ls_7S7=t=m*Ep!jMM70hR_-; zfcrb4m_j{i;p+upmWp?}5P}^w*bz!2x6_msd{se_K~5uI;3$ThNN0=bNyYxIKi90| zN7uiphgK%VIkonx*@cR++@()aTG-Ev4{OeiHWiCqzR35dA$hQW_&T_(Tz);qHtKs< zqL?(wv3F_SrO;nmz77Sil910RP^V2Em>4z0%^k&%TfcRVOgkZ8V(55I4gAgU-wSWj zB!ohxNY@U@8GQ|`o-z4CTabJaTRPcmcAsLjSnPd8F_)HEH(4G2Upd{`osnA|`|Yxy=CZex za`(|WkiWPsp0NcxR~mMcT*vw5DNiCP_uQsp;iN~EV^YuyWEg9T#6QxoG03?i>6G!9 zS~45$3hPf>shO_ZLdc}pQs$uINm9*g2=Q@}yPo}GIf-X@Y02CJ z>V|7KtMI+eIuR!g&MWPS1V${+s<-;^0;z>lf?U+F*SD%~1sB*6dhyNlSd>SguS*OP z;Ln~VygrrXUwq=_^!pmSHe#KMo1O#G3j2B@z6Mj%z`ZWl?rOR+d5MNn65g+!b^Mx3 zRC}~<_#g4Ofy&C7R@cRLVnM}U8E#|PzZC1O%qKyxjFrEefN%PRH7Yf7v( zEYV>Z*7byH1v#Bg*T-ibvzNWQU1T@r+x~yqdp~6YfOp|c`0Hn=Br397neP?QUZP8F zgBl$w-8v`OKqYXsF6#o+_x0JOI;!9s9W8qocx-|Jhn?Ex!ZIJjO~;O zHDo>-0yDmB=)8&F3*E@ou#UztW@t6vkvI7v`JM(i^W)5+wPjUnDf2Ynp)gHv;|OHA z#Np*goSjbM0&r3Ct`%#?AFHB%$IAV1qA7io!uAN3GL%P_wxB8$yxtsI(+Fc=3>C80 zo&g)G!^>S$DWgQijCZuw_w4_Yj|-Cwe0mjy#;p)NofDO_q}+CLwSB&!^eETI*BnUF zv65Lb@)0#|Fq7;}ar<~19uwln<=+@&U*k}KgnrQ7;QUM|=}e>a;cjs17InZ4cE72N z8YF8$FK<`*md)N4_~z^Ovixn;A=_VE1U{lQfXV}6lKEf8{P17K+(4&Sv0AYdCH|hBm7iOVXoG@YEsO|s+qoW2)R*N5ie5+$`@IxO%cJwF?ycCjgKNfKTb)3XNuhi6(!T?;#Yetp zHV7>ooFAk)NI?_{jKU;_^eJH zD=R-F*2`&G6IVZp!xi0oA7C7QdV(ustaHx$t;Lq9GhYjC^HA}{1zQCVQ=@36pEDnk zf91EH`HP+$!Shzlm{^VXDZhFY!p{Su!n9iJ#WNfps;fxJ>0 zmxsu38w0=8sr*QyseYgLC@pB|`H>BKIH$*c0eA6kL($^(E^$s8=P$IpmfKj^{P{WJ z;RI*4veCPe%IYIeR<~i81j$tX5P_e7fAi~46?`8bW@{0#!`5CT+rF#j(?N^z#s`

    _%)U|p! z5i;bseolQFh_cHuR~&nE2T|YR>nJ*K*|vOEuiN zo)jLT$#z5P8Rzlx^2zIpu1G&JG)VU?I$7IAsUuNzfl&QJ;#GJ{#wq02%Jdp$&~8BlGpYK)ybPy27aub z;CSBiFuahn<7Ma=cR96I;Xi!dcLE_y9U)Ye>IXme7mj;e?%E9ZP$v^lJ;4fdYoYp1 z73D}GFyJV<`u3D!l3atmX2&bcReyA(E9A?yC;1Pg9P$s6nCIA`F2sfoBUM{$8ZF`a z;^N6n&6#Z9Ox`NCCDkxiatYReX9b*Y> z(@PjjUL@6($Nv6SB;;W$eiOuEH~4we@m%o!3w)ofi{h_(t~bIgMxm{;#2E7@+&(cP zUIU=TOq04UOIL}o$K8{T#AqeX<|&M{XKOMCcIo^%wig?r!J}nSFft~b!t-YLri;NW zE^SZm%`^@u=O8n89^`ma3Vzu+C$5&F&WLNb+=hugD3p5dbFv{%0Gd9=Z5}>>FzF{a z=d2oTw;E>!&nU`+wk6`%8%+!harcA=gva;z2DVFt17|OUmcuR|g$+GOmG*aiW1LXx zvQa;u5lz?{*N_N3qMY)4v+J_Dslv?a8ox8f>>{vBLYnOK?Oe7`W7;CoBx{?87&1D9 z)#!6~X=RyKeG-UW7XE$y3B{zQJrSnxvcTrqgaQh3@NN;lG!?VZy`%?(TqmO3TDJX? ziF@0UH+}KKa^Kz2CN>|D7%ca{J{*Q;6WXlg{g?#?!G+F_onMH}m^20}q>tgOAaWXR zuoW^X&j!-PvdZVv�l1Vh<-MThzrsvNk6;I_cED#Z5SM|ItmymG;^yMJ&Mm2?9HM z$UHX$Jz%G}HZ^R6y7k*KWG{Fs?qE5~6Olb(ve-xwX)j7g>~gVQ$DJ!033ZOgI}nZo zAsu5v(ZHsTD+x*9i8H5`Q&6Tz5Ag>CpAr*2t*aN`*Dz<=g2?!LW5rKlc=tNe6)c^z>iLeX z?nhP8w$VDq`GC*B_f=1nbweg6NlYlvzeT!9RUQYLW)%ca{Mx`=TofCnD9#eKCeS|G zjbiQi7ZGj_AbhcRnl^zjp4w#3mBNQ&dOa7k2rnsJOyh zFn69ddrBw!n;M(|Pt%Lz@A1T@V;f9%bAD#87oVxs?dy#SzUTiN^OAcUHEU|_LX;b9 z;!DlSv4vqb)l+~-*AS&xF8gsj23JE)?U0wwjhrn9+A%0H@n>L}w4`kkhn2-IcM!*F z2S=h*1!CwjUYAZR6}~t^8a9_D&t=_BRZ(R}E6&ckLoOxHnLNPH#J!sZnGtn}1g%gLBV*h7$wAaP*)nhaWNZ zM38DT>!}D4kCAh>qqtHESZT52=ylJ4(`BD(oG$>bmd5yq9m`-!S`J;V2fM;;NUrq|zI{Gi{NGUTNfhUU30zaf}u zDn9brsT!Fh_d;W(z|*I%U~K-Au0YzD`90ZtRh2IW^Xr=A{MS@Y zv$H&FU#x-0&fY<()(Jaq!BU7?Db@$rKb^R1A3p$x@fy?b;ORW4wOx;X{FC@cQLL^= zuNa;478(;p^b)bjbaNH>(~u-c$HzXEnBU{>*E;4rWZd-&P4{lLt`1_I*-giH@^e;{ zs60#Mqnak|_5+5i7752wB38TBoX{#nC9#v}Lga%8qjSnbre@dp&~Lt+U2l`=w7!&- zZc=U>xbM_9xG)>8c+4m&ZPlALb!<4kkgu@{<>2%o>@yJQz`LXXC2I&$@hd$9o_%fn zE=2iuv2#%CCf{UU11er?lXR0)i~nu{G2_~3Q$=BEcZlxwS*d z2f^g&klDed`o)@rNFZ;9Z8tz2Rg%<>nOO@~EJRTg{^4=Z3#fA(G$#CF#bL*_JveMU zfTn~xO~q*{g!#>fx$t78+F%9m+Rt&{*D)9S62)*Av_cANS9vR?yt;(k+RQ1`P4TMQ zC+Y$Rr`{&&)EMF&Te{HAPq2K{$$O1aQy0MCD*o#K70vpFFIE3v#p*|XA^QI3%!q1m;148RY|$#6tv&$Z_T@({_sb8=d`(ZJ@?xBYFY zF-N`-8ACjA`VjAS>43`AdmDVSR#HA{q?&WT2~VVf_DZw5KW5k5jGWp4}JN-OU z8-LR}E3)oyuT_peA>Clb*Y%jeKYL%+IEQMNgA~ll{tS7ER|r$TFKmDtW-n~L7a#LW z*)fc>tL{Vvd^c-Pb8R^E)$}!iL9ors>TkI|lt{U=QXU?H^Xmfn<;p6QPJTbYpaoYz zT1((WG&gN6_{liM7j@m2-WWj)c(C>td)U09v`LB9;}_zB%Y({r*4g&;#|{*=JA$fV z3@;jJS>rFfR+U@~^MysOZr=dSoyc_f4k=v5LAc^!kDnvu-31d zFTobvu-z8@+4US zFdI?|#(1Jrh@YziZ#0&#Y7S5)=5C4^|M?-4(Xi`slnI|;gyRoY}DP6>9C|PTk?d=Ih-FCX{-txsUZLU0TckkqF!BHy?pRQA=f@wRA^Vv91 z9lqKx<5-Ch&+OUhAsO%8YV1D!#5yT66wHse@%KP!D>)89LtHRNr+o4Epgv{g|YiSZEWQ&&uI+N|WXqWx~O^bnG{=x$Y81QrJQ* z3aLO{Y}Ulz9tR6OQcclU4*a^=z4?(rcIx|YE}bYL0xQfyPX7K}4PV$=agpvCTd}wM zsGoO6lb-dIOWT$GbEzJwGQy-%Z*JBdwQ3O;ZrvlgaRz7+hWPqOZzZqjR~!6CF%;k7 zuVcvdN;%E0j)gjCGA9*&9y{=-kGUfs}k~{;#K<0 zHB7y5np-UJ3ER}B{AXr`NWV99?;mVO0RQbwmFRH0S?v+gCXdzbd4IgiY6POrWd+Bh z9!tK^8sc4O3P1%+cx=^uBiuLsq&ksj6{BcN$w_oLIy{p~beHK{4s?`HAa@pe=o zLYUGD7{qF=-7`>FY*hPr1yrlN?w3}GGwpGQIXJ@OVAwAE= zD=ng85t71P>v)5vwSwL&4n~q5)E=qcUi>*^O?ITx1;yU#HwkTD#d7LY-Hm0(ovsgB z)52d_ZEiiY0G$I~>ogX&t`c&)6pN{zD)(&xRm) zgdXqlBRi4@z9Em!HBQ5@y|}U+%@=VLQ(*86}}3Y<|#qalqdH>y(~y8x$Mafjr;G-7dKg{>U|v6YMJ}p1A5a zbEVcvHsSmOuV)+6m!ud)gE)t}41X~)L~phWEBE{ktqn-pu{8BQ)uQQg_dk3uI1o(} zDGKKjhQ;b;exO=;l)PH=TB%wv7E@+hpul;#tLOsP|Ic&(nNpoY$+4Ff+?wr}p^RhT zSkeaxvrJL9o5HbOBZRJQN9Eih`(h#*`=Z~f=i{O0seM-?9{Aoz1#sm1*a_F>A*=zc zMi+GBtnE$EA`&Fri(yhD-TK<=$*lt=e-a;cQgaHC+lL4(i;4JJT_-+$nN zi%^&C_P!UGhoYagO{Y2vK}AR70g8k^bGa|nvuE<~xRDjw@4XVE4z#`tA#%y_HeYwQ zx;?PMyGftYM7`ep?Se=@b$i(f+GQ0E!RG6VniUx9TOS$U3va4EAQ2)=z~e=4CQ>}M!E>GoJY)_st?dD z_RYf6CP6w!WV3W{*C<5{c*0~SDQmxUXW0Ms8UUUl$_?4tGO5}^5Ru2f>YO4ynlj`k zK1Umo80ubkR#b{QG+m&S-WaD@aH$2SR1iv&XM<6(c{mA|?VpS1*m*?$t1nivlD54?2pk}+_T__$4pts2kkfVfo?cKZ zO>fA~qA?ynZVo@FkRogu^I_VDjV{80!+pQi2q(N5n+HoKo3hy=HlrjM>!pPRbwwOx zoGa>V*Y&L9SnBL8v4?pWraw5dn5j?2?-{AOhc4kWln6q(Wz7U=G8amKCFw20hdQLb%YaoWPaBb0brNowvxqpg=E zUHr-Q>6*(7)O0S93@synI(4>}-@dKIu=;H(64M=rS2v_C@_zH!V3Y4VrGHi?$JQIb ztX}R>7iVPja;-x8lfDu@i(+0YI+J+{%|eDq4>pER(HRD zc-kLSu9V{XMLC7oNNyT`&X{}SU(UdUS#zTC{$>*zuo^6uey_XXQubu$EvO&-xO?mb zLKV%FQ&C;@OpgSmDLR4EZL_zm61*RVtxh4zX2OXFUEAh6LHsR_?hWX#W)5C4HIRID zf6vRaly~Im(2|tZr(Wsbi~on;X38;7#|m}nD5cL;dPuAz8*KCrfAFIR>(Be)tAT`T zU2gS)4>f#$c`vaxl34kY(7&m1i)A*{7OZ2Awp5*y^`Rb#JsRxL46*T;Z{)`?AM(&71yn?~BN($Zc&GHrB54 zdZN?{1#qh<5+mI|uQsvN<$HqqcwdWooi2&Pz=P<&4VbtEl$P^rF1%ESpxpG2gaua8 zx}!YrX?fSS7`fAK=;ib99OL|AxbsA#9!(74cQjBaMEbxV7ttGyLhD?@iJPm^1y4-p0yO-3x-C zs~c+T1kbV#)gEC{Z3Y)Z`>M?YT+=?Gh4;{T)>CPfGSvds_jdefqze%xQc(8?oM{T( zD^f0*|LbvC-q&pYkA0-NouMwYqjVB6b?X*e74vYFqxa4D_%q`uor7%0#enH>#-@JH z)!#Uc;|*?NILGWOu9d5~g~#qIk7f{|j#E3u!}f33_)5V8eiJ03&N zUlY13Pu*<{hhGK^gje_v3(0lPAiW(GxVWzd)W1HMPak&+@Nm|hugGfl%sT$=Z|m=f z>Hm=6LrMSLvhdZF57~Z=Jyp5^t7dlWgkcw?$I!XwU!-Lp`8-nP%|7&r=?P!Y`WDGC zjK4Rd7LSAa{J(R|Zzf|xxxS=lQ%kr&)<0pvrL5Q34TdrzeY z`3XuoKIsuhZFldicS(0u@&gY76QpAmCv)`q))b}ZU}IbE#kFonPLJ%jS*aXDHB3SAS^kenSshK@cGv|I6PB4C}GS)5}Kx zqKnlq(j%8Q8~#vsMU7q+wF8gS`UfdPTYQKSQFn|9#hbk_&WOnjY|+FJJG-Vn!jE6J z$Z+vjbROshP2Qk$fLqEI6@Hhvi+raGV6=UY;n=4UeoX(SGvA7d5Kv+w%8uN3GHjFK z9~t&vULjMb&*TyO;;hcEaTk|q<&G9~jw>7cy%gci!G7bRqcN9lr>q6o0lHkxT-#y? zVu#_oGuqsvRC$tZU`hTo-8JNSx zk6JzNKL~GMKLjNsZkR*azEx~1>9hsDO9=$;WC_PH^gp9ZY+sbRuTZPxvC~A}kC$z5 z>VdTI%r$d&xe640d%Bhe`7~OhkXNYdZ)CCXDocm?>MD{u$3WSz_Puz1`5&yB!|eFY z&u9C%3tE9TI+RS_p|FT{|l9UEfZzFsbmwmJo67RsO4=gxmXkf z5t#}s3Yq}DYH9Wk<)khYXQ0K%a~{tbSi#>)BXI?;w29mQe5LdB26G7MMASI{0^QmmK8g<;$$P)5pBu8E7Rk|G%ysa0#2W!|^O zlHZRkUfFb2zlpHFI8H;*+>@Gr!Myi~VtY1|1OKP6gadJsDf#D=fUVHu)p% z+ZRPAEuoJA_t8n2wRx?r=puv!H>3RtKNU-K*6PXWkfc=yu5BCBaggpzO!xf7C8qok zD}NtvS+{w?4D!vpP*y7N#k`T3S`+hK+?iCvkux`mD_VE^6?p`t$m@(a1-ZkG3pD)! z$5~utGz;i7tgUvyJY`Zu@iT)6QbUySjwB3N@uE`L41@kJX)A_how)GzEkb2eNhHh} zj+sA9nL&fzlRKPd!No$Zf=9)Mw|^CemY@In%%yui24WoRbt9m<(E!jFb0X7{$IJg?aR1YHH%ujXwdiOPNWeU- zTWL7@tm7BRv^)=fJrz$g#7jQuypKG04D6DeSY;D}GeP)8EspIfiENuzV9O&q8cvQ;0Umd3i zK5+9mb@OKY&dOU%GIcdOf!%)&$1J4oAyfk+5mjBt(?E=2G2NT}G;7Y=E3h@^ITe)# zt+YG0mPj8Rq)s7LCK~5426+eLz2nHVOlGSU<+c-&@b$Op#|Ow1nV4ceD}w3AGHlpJ z@b9o*^`$8Sf|&^<;WG-CC+j7)Ogo|HAM(AuAFkZ_*zKtea?pF10xy3v{bvA()UBOtGKE zW!5-W+O9Z@ZvOuO0iR9kcXU#CzBR2?d5DyHd^yLdzY|c9?A}K{By6@?KYG{suThdR z>lF(ndt@>NyzV0H{k7>mI`Ur*6L%7buf22umanT71b}grGR)r$QGvZ^2oMLbh{_e!{JV#Q3c) zYmerJer-}7y{@_V*3%I+mD7rJt7-jzRU-+E$Ip^&6e(inQ0i)b~-_MCYRO5oMw9{ZUIvf9eX1AP>$PlKdOMAOH zhnAJ;(&3ffwS#Fxjqk6K?IFY>usy9W-S_R766iJeGbDIcJdx`CX1`fNJyNXG(arse zq#=M~NXYc5bK^j%C`9)6U!T2%`!zu|R$O3~~h_fX7>cY>Uf_?DK^leI6?ykCVTQ>~` zFjd;)U!b-QjbSJJuy=3G6ImNZ^y>`$cG-p%^Yd(U(Z|zVk$Cqhon-)7zI(&ReEBjm7?GX-ij{k(obEQj8GJ4=b{M`; zpa>vcVU-((DCzpfrxgx`p{J``1Y*lQ*V%)Kc7G^jOcJD~Lm%0l$<>AiZ~k(5NrX}Y zF_xVsHI_{qwdXl0_I{Z(^~8Gdd6DDkOot!-nW88l!uv6`5QyW?+jsXV_HNNw^^k<8 z;-7^mTYurs3kNPy4|<-sMYqxL3BguEGiIsh19|FZwT{Xgcw~RB>nTAamg#>0y~T>h&i9oBB1NBw@5h4SOQ%R z&x4fw2^;4z&DD@VZn_S;wKuqQu`1M8Yk`<9&NDl5pLlL;@P?G9N}Y4l7pcd*$^&HU z()Ol|6J=#SOUG*$-)$X@8*J27fa;Uz;#CRW5IP11I-a)r!vWNxn1@9x>k{ueqaOW( zyPLP&zC3zSL6GOttdXm&)7K#yas2YubMk2v# z^6IQ&-)CpH%3K=A#zFcm37s=3LXEW)e4c>e8%@*@taF8o_aN?AbzMjFrj?z#^g~!? z%&Gc-3GRFKh42zx=x06Wp4T>Y?|=br{ef#M4nyxpH~flk4a5P;-)v;f1-DGgjpP`D zAXuN$dq`YjxYT&))%U$`c(2J1=*KSn4Kg){TgSx41$AQnX5Yj5Y_}Bjj1`6ULK5T) zu#tM{)4o0C+1@^_-Fe%0o@|($!8VP+DU7g_8PpXRy4#24f5bnN)9ANn>ng)W^DMmT z_4>mv-tkSnk$iVzI10v^kRCs&5EGq0#~Bj_i#xI$RK7}Wr) zSGzvra~?iqIkq%hE<-e-_^@U=%;k5tS<=f`v1~1iJ)8tqZHwD{=RQ0KwxsyNk1Xp; z{VAE(#_3u%PcJuHe5P@8C82DwzhB$hs>mpT@lciqM-N__Knz9f{6mo^c|{N|KOLX>N-lrIiuGFDAHW}w z%D&^crlT$xKE!uD@2tyB$sOifzfIf=GhcaBNhb!b^fFOOIQ~6r)*4Lc6Fju?%*$}A z)KevrR*N51qy11kx$sk-!0}L%M~awww(#q@yR`S8-nMFdZTv7AIby}}`#OlnDp=l` zS?|qTy@AhBGTS>H|L_n=P*>M*1doAMK3?NEC@7N z6gxWGk78FFV!oT zH~KBu8BRK1BDoo`{kPfLbJBjI&&EtmVW%xdsJ#(Zzu4(8M#*@*>0j%NFj(IrjZCU! z>>5OYUSRU=lVe#+Pp|kAdrdwtXY1jb_faT4g9II`T+ba0y%PNug7hIBV*>Jc2$TLM z;D9O@X~Jw1u|pX5$=ap^w~@}g#6!Xk4T_=%D~ETXgS!!$^mN9D^e^g+*<4L3l)8?L z_U4Tjujk9x;SxTpA0fQ!X}oQRg`XtqJv^jcRp3JvxAdK+=2)I3ZhxCz|Haj+AI8UI z)jj0AMMiVI^x4JMcRw^+)9VERm!4BzAYDF@1`e|d}MAuvey?+VFV`L%ner^k7s zDZUB4EKHlku&p9D(CNtbP_+!$bfR3?6wimj`$HfPq=3{~N5`A_Eqs@++dS^WB2zaE zhTDQ*CvkX~bFQv$m0o<3Da5EXG1COiDb|E((au!n)MLhh|NfieaSZ5J!Chp58-DD! zq-V&WBse1>PqK6CHiWW#WjG~1UDC_S&y3V>kU@I;8N`D%5qHV_BN4Y(=hnj5-WBR+ zP>^~`TM`~sx^`?9WUS^0BLKK^jZk~_`+F^}ZDKg=d};SV7J&{ZjV07O6C}2n&6WdQ z*u=bgDbt$EbE*DoG@Kq?)z4QBfE!P4z>N>l6eSnJd+ONLX*Lx3MO9mwL z^w$g9tZobI_Z_@8Ue1K4-N=`u{~0{CPy~UDGIc5*zfbSy23Mpv{dza_NQtk$XGhFd zj}(f+z-Xonl6`*<(K5o|M5p3hqANnzL2*kW${yTm%Bb1Z1d5dXF22^BOWobv;od6u z9h?0I?QG16MP+iECsq#>3 z-i2ZHc8QCr`6V$qixmSm>dO$#nr-oip}GQ*<5slK#dpgX-`rJ6h;PobVrZVoef4MJ zFj!pS(rA!zp|eb)GC5I0dX(vs-t!k9di=t&S3Hf&u<}lgE@dJN?sRD$DFmHN(`g3& zb+7(^oKz)qW!=4%LyJ__Ba6GnC-IfnRFc{DAIh8yianNV0}L7)SlB^Gs{n1_#?}V&FL}t?32ClSg&vjg*1Hkmj|Hn z{S#m=93_RKTb4^4wLoyhb2b94Dchnm`&(nL5+L`Intr`AFt=x1&80^KlsB z6|vmJF)akawdCHhZiW2B{ZLK$3WJ^IT~l@pwzp1{ZAl~CW7&!y%LF`&kpUmFLgT6w z;~EBy07Jf>SG}KXWwxmR@r+mWd?xgk5B;i;}DT0p&vA!Dkefzet2_Dvw zRE??nW2H68a&Btl`=1;FU%1+Z)sCBqybkKI_!6FUh!OA(Pj=l2Od|KI{fpDA9o+_I zAoi|j=U};P7H!?Svj~P(Ovxx)B9^Y9Etc+t@?Y%PcM9PgCQ zV0Wm>-+fr;9g%Pn_rziW5*dqbfsK~6%hFbUmO%gS#1ZR`hF6WttQ_>Uz78KaE^Ltr z8;pTPA$U;SuwvE}8sCPs5iLw{>-oAhM0yMo8Icm`pUv-NlvN-2dwoSg2Ake1_(Q>) z&qzI#Non1S9<1B$^?Y?S#zqoD8!YMWEd>4E_@Fho=S!>kBGdM=bugqYZR{?M)xMi~ z9CSV3eQmxu63=$Q3p%#j3mD;#-)00HKHEMeuR+S_}PlHH-D z1wI-mc2sfQvW%6KgcU>=XTwkjC?Gt8y3MPtpPfQcx=To2;g?&avhq0Gag~K=YI@c* znC8doX;#X62sjK7M6RwSn=*hP^12a3NhzM>fG|D(N0^pM5{ljZ`yk>2v(%c?s4mWm z#{3E<{1IvFWG>5RmejVYs2Ctvg8nX?Km{dEQ|$IGLkj!%%n9YW&sUToRS0C8EHl)X ze?*UyflOqLjUFK|9XLU+ZR`QoCyTp2lJ9pwu@$0}#FUHfV8?SA1BVeff1Wv_Ci`2~ z2sHJbS-tzu76`%bQ$)xUMY1qTywGR{Dli9!nqEG{?9CPBjT%xkcr@xH6Wt&Y+hh?V zmFLK#PFx^;|5-`c7;%}|Ti>3MG9hUF=O2?g2srfXhR);EJQz@n3=FavPTiuZMsXqz zWadtFjGH3eOvwATOAk-5v>8UlmaQ{t9iCLM(fq9QDt)RnuqwIKqo&&x@#Uq%LFddC zKFYfV+r~hGRbAQdlK%0hoh31_>8_U63t&WJFKw=JJwTzYFL-rq{+ZOHbFMf8AB`r( zo_9+Q`W|?+VZ9*~v$`&5|liw6;b1j*(H#0vp>Vg^sh;287$`{3cCP zxR){V&KkGzW>tR{ z@Fq-S>QsD@b zJbC(iMWsY?7#PrGx(0@08fnN z;_}MWJLvK6?%LjQme)E6eyUU@aZy3$->D$o$sbIU5HWJd{A`9MA`+I$ziwt~0F6}< z5$C2`{#1Av{AcWZ-@!W}TVa=VH8kr~k?28c#|Lx9`8S`idpM)JPz5tt>KeFH1Z^{Y zhasRLYEw93)Xozxa15KF2ZW4tSnpz=^cdE4aVmVDA*Ub`s#n&ZvEcpPNZOmw>?F^%FD#&8-Z2HK~r zz$|31s?mweotBMSqBQ%7aaqd@avcPyMM1X9d3XO(~jJ_>ji0qR&L|Q$J;< z8$<x9^kaq@KdDKu3J+s(G!sH zMr%mUgyBuY*Z5D&R?ZKlW_nzqq)_1pJp5sRCe>_$eqYU*u5)g>>?E%~_;SDt^Q=1; zCDt`k+oQR)>9qlU?vP6i95}ogA!%J@?FTnITVLtiyL75q?SBSvUoszl8}IGawNB!W zE_mRw*zf%bn7!G;`*G{)>%e%mU#u7~WIo-cdp}&ioB433@D`<>g*>TqHwgT~lrbXA z0~}hv_T+P4w8;}yKjzK5-5-hYx!p~YX5FX}ofOVJ&quj2d=Do)rhN&%hUE5-@Z^8Z5w$RbJ`1!jKaZWh5dHDpO`x5 z+ogM?P;J+;;@`UQw{?R!2J89M{>gG~`;JZn)bKbjv9vlwT4$vy5 zd*eHR+}8v1PrpFov42uMvltfXuV_@kx}=}WpN*Vc7!K$ zid2xPb~1JA8#1de7ssN<-*_7ZB5|~L+m30sayU@ttN+Mn*cx1fC{5GwnqUn{a8~QDT_RCTztYbh#UMveF zatgv7FEpQ4jOj_Zj(pInOXhEJOB#o638ZU{=Xf(g-&YXk%k4bc-8obne>O69tY#=8rA^$UTnv}B zBhl-r1ofo%EvdgY=B7}i+jRklyS;%Xg5-ylRf^*P@BN%J;E&x~#XA=6)zZW;Vm`Scbl( zS$r`Y!o^px6m945xw;L>uD(Ceyn35^u);RyOTE|{h7^OSoHY7({D4c=l*vR#M$io5 z0?lGG*9hm?Xfgky;T5VHG5O1qao*?L;%uOgk?;C+lO#nF(#*eq1k>U~*^`$Ms@WRI z-dfa6_5+FIE+J<;ySi+3*i2InqsewzR^~>f8Y7Vd*)D6lvUtOJ zC7T@9Sf_+UVqLUKtKBhmnLblT%ogd!TcfS$b)X46=KC=h)AoW}T-!hC=m3Kub#bGs z#6Ey$Wl``3$KC8>Y7Q5uhZUa742#f8KM4gCQ#Et6N&U_rTWCLOcnYK45R8->6!hB zmbdRq>g?VJP0S(I`F|^$6A+a+4xFg93?BH{s$9yYYe}A+#{Sm3sHqt3CoENeXR3D& z>pAaHAK6->EQpTk371&hyH!p2=pE!FWVI&JdQZ>Z-NL!v;S#0i2BOg{Z;c6Z%kTiv zcy8KdscUD#55@I>CF0@+mIz+eNa3Tq9Q+Se!2X8IoA&P$>X!mPNYk+4T-jWglBm=YU&&*ZXPAE4zc z;_1C#EL6lG;paf?++u-6oaln7O*hV(SDB-Wuu4l-GtJ+}+-a#ol84d5_Zzz3I~> zSOT(fFm6ayS8L&aR-#H{$fCB<6MOw@v=5jlsOUOw>iwCHNrRP2?-! z(1=aBBb?^@_tXfr3nEt$VL z^!bsj`aEihuu`- z0kG7z8|PIVJGw^}ff&@WdKnBoJ#D@bNV{n9vKf5I1Iv~c2{BKsieA;%W6*WS=GESW zO-2o!431c)zXXzw)Q_OAo8lHdG#bpPuLao(r;gQ!3lxSK z(iMGaco3?JSyt!_d~=hq%+u9U{=?bxg?2sTlM-x})~g24&`BG51J%;z>Ds_KQlclK z0fmSk#{w&~y!aYE#vDyQWk9G;ZNq{*DpJ0OnQs=I5u8AwIjyQbENZI%nxRL~(Tw1i zFkjj0MR`8wc zg=7CCxmF&NbZzx4k;(_VS(;1sU*oba-%|V>a7Ibt?I=*dHU(E;j z4#?p#FWncq%knon9KT`5JxT7*f&WZ=BC;PW7QgjnyNG!rR3RG0I7F?OUWHAgFcl}KJX6XJ1Q9LEmu{^<(y{!3H~k9Xix zA?A?ODFq?{QJ``9=)!hdWUw>MjZ!*|{z0}~Y7+!``DD6m`_&;U34E_QXcI*_-GP#7 zeJGCK5JFsY;BJ1HZkj@aAxuWFT%C27X+Wc0m*m?pn(Mm+$wAc6dX+CFDdX+#1YMf% zVQ&o~@5Aal0hMcCg#S2MYGbUb$?9o5r|8hva!1ll;K4_3JH3<|VyCvNhVAbeq7j9K zaeaFXi`B6w%0VjE-p~iu_~$T%AO*PsyG^Z_=VW-puTb z<*m_Csf+wP0&`X0PlfoJjr{2Gx%bOlyqEc3)6I>J30%K-AuI(BpZ|$yW946~)vN_! zJyuX+?PKZ7gtEO7TZtQPQA#Sa8BO5RfgIeAwbnjUe*9M)pq{OCRl8hxg~PRPJDR}R ziXoIoxZoq&{aa~o0#7)|B%%gi?Hn0^7J(KKLIJuB^y2X?y)P`*{?e48j_cU3Zs>%d zb3@CUG=Nys3T4XjirXu;p5sT%WRi#r&-$!5av^>!{Vj1rk3Fa@OKy_e&yqxT7DWi= znnc4@`0bWVT+bzc4rub#e%cIObYsnOaJBv3Em1#*zQ?pm>PHb+29&S;nPrXWlDKi4 z-2!Muj%RG1cCSZA+30_xfv>90_HDafllgz8Q8H|UlWdcVbqZ`_TG5N477p~TSX4Ig zz+1@@KI?ObOZDE$>A-D!&wt$_D@&#ophB!)Yg{JyN;kHs7nzn4s^l~1XO>HA@w{g4 ze15cAzc}{zwQ&Y?$$#eHtB-_;&!n~|e`idcY*aAn858*DVaW%1xVlZqE+aS~ml z?#}oLpxWr0|4?o9PN^{1DvQfE2ZVbxoB#2SCnnRa7;KM`s`#|JKKlI<3MUFpCueLI zC3C`E2ysGJ-2hFE;;UfNo0~H_zwxfR+|>4ncOQ{%z1ag}9g;&Zc;Eesc52IGfBT;J zh8H~w2d*oJv%2n$aJwBBE|&h3XQqC@3F_#tIES#)*bC4^f4VYTZIpzu087#?xq&ac zj}?GFkfY-}?DFuvh_?8$zE65{m?=oz4jqq?@LsZXl^@qMiT?#0?~FU6A5+Z1o>>a= z$X}6_ZaOZbo|9zB%5j8ib$U0ABcph{S^(%ZOw{Qcq<##XV@nM^(YsU3`jI5`ZZ zDS3?dPVplT{!BQFs*qI%lzzTa#!0tRCpxTWPFx;^ZA2{m#=PA+;=D@n?EJi)b%R@P z{WiC)Zm#oj=j*8YD5ZnaE~f>(9?87Dm%Cq`oO0VQS}ggvsjxsG z1dobVhh1P7;>R<>X{X^=v?LkghWZ?;R@MqtI*mc5L+=#X0h60!~O;9?jY&LAqjoh&ttq(ECtm&_VaZZ4m8CqcQyqo9KZHP=K_M*XC>5iKXv#F z>w!a}fCu7O;70uf5-47!XG5gju2&A%m(N^B0xEEfoH87TgRpECb)?^M9f?LoS~s>2 zzpsDR%ca7$^DeH+dA+n=K)oFgniHJi40Fa>^L&oVsVLSKELxwAtCB3zuoapt|(qAcWsIF7Ig7>n|`y{VnXYAKk zoNxloI|MSibcSxl9pr=rlCDmDtvS;d)EnW@C_;M?f7(5-BX$=0)pqN_x+*&J7TTp= zT$@t3ms!uFi{?3DH&GA%8!O0TaPuu-1sVLYf|A^^05;C}pV8dfs6rRpUu@hXq1LJJ zS9@p-GqDw{S{54PHuw)@PtYEZa6XmseS|Ne!~BcHZnO=6#c?mzl1)2a1hpXz*U8ks z*vSVIf#o{$!3w5(7;}W|8Q6$5&6fP;VL12OTtl!K(kU*?5-PtQZK9y(yn3!nb^lMc zITocnN`E$U3udYbRQSB4T=F81LTN5YRIv|67oy@dB-<{QEy&+UIfrd>Gc0)Fwu6Q! z&`%`2BDX4s&uevgO_Di3v>7hzb0skt3ddKqI@yKhd5ZEvxvg!Y@{it5ZAiPInERPdKy~P}yw~><0b(@Sm}fXpb;Y>Gn6@S=#ggA)(D&q;jhbwD_-EZe zT>wO!zGWmtB?;c%1h)Q1ryZz#68|Rj5B0YA*bC{&nCDuh2`$%#@ZD~?OpA)GQtueP z(=uF!zMhNL-+@!TG$JsV)go2S=`=BnS<3OVRWhVRxUzT$ri96=RbOTlJwKdEN>fX2!=In3yHhups2RiYq9Dk=p2^vh4&jnLf2owI+ z2U*SCrWuKR_u7dEI;2pw5~tWC=;$02e?-gsD3|Viwx>HJ-i-A0PeK|yH*Z7r9=X3z z&S|gWhiD@p2$O%Gq`=h)N~?XEf*`yj`Z$Pm zV&1gX`I>GKV4`ifMJOX8aXZJYW4>mWl1aHn5%R?KGr@z2K6v$)UVNg%FJTXsHnq{t zwf*SNyZ^Rj$tC1%T|?b+s?&xqm^()R6E8!X(7_<=`mBIt8Hkj<&wCY zjJkT@WyMWPgMSs?^eXm+U3`CEbz&Or<68kAT>{=6Q?^7?PQNgBUxhGUX+LHob>1TMZt z5#TRs{nOhfW-YjC5Lj`OU^}qFofFv^dYM6EfZ!zD1Rc0^ecjP+km8sEeAOYC{z-@C zi}|8%H4#US41P-whJB4UIr`rt_V&drrIoU>JW|_UNVnBGd<3o8#fNMHndoVhiysek z;?4HV57fj4KOlp;)wjvw|C9?suiLY$h7MB~sVZ>xShtBBnVNxYv<*G_-(>WpD3FZy zZebi$MDH&6*Di|{ziBriE@_l?IKDGPrU@M`&$7HPm=`(b9Og^bC1}&g9L@?e_P}lt zZ_u}#D+hCi@8zMtNIfpy-$Pk~Uqs@1#YN_kJQ-p&KDIx+qlna-X0C_&18pVXy_S#9 zN&R{k#dDm58Y`P^`beG`QzlEoxwnw-`5cw}*ziV%}!TwI!D^Ru}ldcrDPV zJ};U%CO)|A;Ui5?Tq*d)Q{$IurpI|oP2H*iCT-7r%fLuM=Knu8hzG_qM~`RwnZi1j z8Z4|V**Q(*clz>yf6tz0xAY!{a6gixDIY9@61#MoWG!d&T=6t_Q-_|-B>;5y2Di@i7uFO0li2xPsyY?9SKqaLpYAQTYY)XE z5iUN5o$q)lk{#6gK!y`2)Vdf26t)W%=`D-5eI1odPn!eG^-u zIk6>vjnTb>ZQC;!J!0qGgmFt6Q{$Eb#%J^-#h~}8ynR}jFH$i@)j1}gTG3LTfaJpf z38L$Z9nD9xkY1|RZBBGN4V_|D7g@|Jxd)D=<{S_%Z;T96Bnp7vE#(hP|-YP4;sP1m)xyv`p!7))x&Sv_o za0KD9!{0CDPzTk2Ib*3LA*3kUx5_(YyJ{pdJBAo;E12&b1bl5HVM4($gTU1r;5SCE z?%osb&&B_UPdhQQ*{_6N4sihW_LAzJ*wySTtHFO3cCN*XM<`DH9d~Yc1sQl-Kc1xI zvs`e4?C9NhF`#z{Xs3YnOu#{EHzKD!$tf{P6IqT(psW&MOA!r&<;jZI{i|v5$wOe|&>`G35^)Lq$GKH;`Vyw2Tp>t|J2|M<=_bKY}nbel`8v|wN47d$wB_+(4`Ol5QSHIWZseYPulxVUp0M_)t=7|jF6O;vH7wg#*qTArkGqv zT1@xS_5%3HUpz-ye}M|ge}wT$W$HCA@sRjmD=(fZExVoR`JH(Wsa92m4?8lZ<}z+l z*}@vpG-p@EZD;33gc4gG6RS|iYfX^$wewyr`}Y~bdr2Xo(;Ky#Z?Qi6KuJquyF;K) zw3@e~jFBt>6CcrWPTjr~)aj5KXcjZvVVuDWOE4nvg(cE^FD%UoN??{xu*Fo<{-Ue%5kCOsSbMX zwfBm0rJ>=naM!NA@njnU=ZDMHatqmUf>6W4umnAf3vaD5Lity`IYTM%M8N1Sg0?ca zaj)#a(=1H2<2G)Wf^oLnR9&~)0Ne)Zw@F)_-G9Kp>sy09Rc|we9SkU5zAaijUw!wAIFH|n;5^~+%t3>h_Q`2`Bv-ER`4#Q?UR>KiK*5K`>(Qg)uNly zyI>ZzaDzaE$-nf0YcM_6jTHQ0zEoO0xUOJUzLHP+udibt_m{6ztL2fy6xV-l?m)K&ygZiim398{L`P(HRfM=h!NU_T4MQBU64_Kjphfhi`W92Y z?D6(;MG%?_I?S4Nh!dU3Qoz8N;m%>_p}x}-W+W&BJ%}Q) zc*b!lpHM%%39F0~B9T?06mLIgxg)ry5!bqbQ1ZD~CQFpmI-0Vb>Q5()9@p=r(A7Ig zOnMCWrW+3zotSKhCv!bU;re-RwJ9fTML9xsQWJbT60{_f_j1n>bN-};=OTs5r;Uxl zhJGL#%ogBSsXf>5r7UsZml48EBxK@a%=*~np7d{!tLGiIWS|Z zz&C_X9Km`Qw*c}wzE7fg%YD>zgFCwOcfsC(_axsh@6>;?nPkN=)O%9&9yitaU) zmD2{6_P)PDTfQHZ7P8K&)wh@TJRwTz zA#si2a_Ii!?NGI@egdD_u9>=oaCjjVe#ad)(KuAhjD}54MOQ2z9QtU_=K!_3WM|(f z&Z>@@fSUozS(5(YyU-tGyFV>i6@m9EVkvB3l$d?A9Tr7y_2TPaeG-2-r+x7)&(P$J z=@i4*l=kWwLfYj!#j6UFce^)rSD6EVxu`qo*vQ4Atc?m1^;#l$-%Z_rNx`C&W-C z|B!#xzyhSVFI+KJciN*Fr3Y;jZbQb~4oLr6{wd=KvvOGN{^Wil_`Kt_g@@RnH}>EU zk7<$SQN*9h4WK;szazKU^}3^bzAt?<}V^9NA~_vl;knb3PcD<4a~eWfoi zXdqOU!HGlcJd0g8LOoypL83$q5Sv@Qy~wnGrc_U^bwHZD#VL#2R8Ug*r*q)tiELg3 z=x`(EXPhs#wiS|bT5PmbK0K^~A1Pb$h=TP9XdZaz?<)IdlW~P=G=P8m*YURw3a5*M znzOq=?UO~b*g+}UXx>nPK5r4I9Q81D!~FW;XY1pl{V}voG)Ka8xju{k#hK0#Et7z$ zw0Mae#`#x{e16DF(AEmgV@wS77R-}0!7&A*Tdbt8B#WP&AAhUNRxup@w9xyIO0NM_7Zt&F^#T%EWc3hGR+IsC5xizw#LXIpT-bY*j z#=&@4+l(No*SC2g(a&G^m+z=zcBTUuhzF$aR9p2hCE6#SeiA7B4iUZ?-q z@F@7@Nz(ligE~OHnr?eM^uRM>b0 zaqig~%P{Dnx!~0b@!L|@WR{pQ;=Of_;b=7;q~`49a2(ea&-xxN9RQd;?)Vj*cTQP( ztlQnOacxg^QB|=LGvB_TmB&qN2Lw`qi?jaE>NagED|17^2>2bXvBfK|rhY!wXS22Md8T!wP@8wXawO+ECk1 zLi*m4?>(Ti4DhKhIVaATqLGfPJox~u7#-!Jzt~fEOd+zhsrJAy6Zz;1IOmiF^21G` z`N#8E;U*XswQB_!oil-n8{0Tqe&Lk>+`4^V4+GK@=wvOvIi8e`t#-=V75;U#VI^&npEf}2&k#MadxQUsf!9IfJuJ8sgxc?UdX+BS7u1bYjH(tM?A>LgBR-Fp zoLVSy>c9?Rw!@aQa0sT0H0rb~iBx>b0;*UQi@hHM+1gJuyp*cl@uM0{7>`k9s9Dsn z8^xZN8n?MAX1_#HjV1H113gM11_wb9qTKy^-V9uJpFZi(&CgCB6N|`(3ETccC|?bJ zf^766)NNdT*KgvZ1SD-W#1q?oqy$mlsneHlCgL(6C?I++j_DA{Iusb^ZT%9g$C>?u zdr@jGcTX+u0oSboe3pBIh%M$1Y0#v$^`J7m-vz7GitExCXFX>K1Jsjmh&|s%x?JhI zUlq<|h%TptqJ}Q^7LBj^{4aM4)t)nd{@MFzMUiF~{5){>Hx$*7ZB))UM zpkkz(CVKzUZq?}9XtoL5bZjMpx;xj@Q+_NZ#e}3Y|B8Wz{npXfO`F5rLqUWtFnN2i zN0Xe&TP}37W$HrvI$jO^yu@08jGZG#t&Iy0Q?>%;!b4qqC|^UJjyS5DRCWDj_am zzi#ELkH?I?bF4)|X0ba{ZnGZZq{Hd5h!KfpwK3Fwb4tYn1VUowf)jb{dNxm~+x~EO z!^Wn!HFY=qhhh@z{fN~=pNw-uX>2D0hLxcSNs%~!QdZ8Dg4Dk#i#12#%gkvEIEiR9 zoi2M1oHGZkD?M~x$f~M8Bo)t1+AbWoR*K4Z31O;W*&B|k@W7w`kqlptz%dkG%OT0u zuJH;FLUoVDK9co6Tkb?{ta1+-#iB0?+0cU7Ej7LuP2l8{HV^Z&Eg$$*)TCtn#pb&I z)xlBfyGW5 zMPBuIUMP|%Bs3D*KW%(uZ0&dbYhREqHoxYv=~m?DM=CI2W6T4m3swAA0L_WDB+%i z4dpZR!%dsjzh#rV_1ASf5KL9}fSc~N_|uu-SFM_>te#W!{9!A#zi&~Bmk&Dd$eTwO zipKhFmwxTO>B&)g*&T%OqpNQ-u2-@cb2l@^H%ym4y*CuG)~n@V ziv22_qE~>V^3;pS-)OJeddLMBzX30c_n|v+1u=XBBo0VNtLW@ji(l_p_$riG|745k zXT1cWlgBKHr^AyaA1%tl5f`-nJgLe9+0(}0=~5^m)1!5&J@8Q1qCeGxV4%t)YHTSE zZ+d;5_snBO>nxm+uRveYDrLM#rfX|%sj0R3GA-r8MCUY>kyiWqqU-u-ic=afYY|PP z&pT8*uF0cwmnz3}fk}dnvK$oo^M?b6)Ip0UGOH%rIVNG zH94IV?Rf6X^v%XCJpVX!?jd!rkg0b5ez%Cx-)#t|G9UVYHiXifHiX7e#4yl?p#NWO z2-g3$A&i2N2Jy|Z`#P?HIfn6HOd~(oTt<6pOL$>$#Bp!M3?Ipzo{^Vh?fz zLy*mi61W~I{>IWmuIAk4&;UivFgF9ELiqJVQ)Q>{J>OL{!c)BSrzW&#siPWtiOpP9 z4D=uI~Nw*&85ggtZKQK;Og#6xI0VUZtVpQSRUYma4vqaX1CGa2ia4o4a`riZb3 zgRJLx_b+0K!x&#oXS3wI2wrnM>L@=*ByJ#k)yKH9>gM^hn=oVD+U?lMeomxJMMaJFVBixgq|4{Q&*CvF9YKqZ zd5iSGex@)2y1w2%n>%H3J-e}pGECdPzG}%+s|?6kXQHo^%3wSb$*GRKYJ>Ok^Yyn! ztP8mjyNZSR{O`(XI~7uIzS$A*q=><~Oa8K$)d60B=PWTKPpf<*?@7xLzzD<75RlOi z=%*}wUFZS)706w_<7PgO_Gs)SjQR}bztj`7c*w8?SC#%YMVQY@viE8YW^eC{76T{- z%@~<_L4NhBl{Vdr4b1^;SYw3(K*ix0uSCK)w0dC-hqq}D5EshBIAXobVK?kHdg#pW z{ML=cH9wm;qN8$tRT?an;uYC8n8)qiHcs_yF_ksv_v40X_Rpz)I1c>+VXa6S*0qX& zh#{}~>@1BLLYWQRhqPVCk@PDP$7m~6eDcGutIynFW883(DJ>MOpFxvQQGv3Xd~0k8 z+F0&^((ESFB#vy3!O@=YRh94K{YIgRR`eHc3kZ6DY46gYEo^IP*SBE(mTrD2HOGr` zy3=}z5z!c+)78QiL^G3In6z3_;Q1^7EzH~!g9EZUi5d#C_6eGTjdb!zi)Z6Hl=D%O z!V?{f-h65fLjg6W=sUH2rGw0BasNx3XnrY58T=c#Sqo@|_nCopYX$k1*|=d{t75h% z9=EU)8*Qn8r0-qQkf~hq!nli4F0bKl?Fy4}&7+3xkP-QNDj5mB-^qOT14)B7I z#)vs$vM4L?Ex=eU!5lumWnCn>Ll;v*=Ai_9++5Pxy=UUPGO^z z9~Qnm|4p6X2&mXU2t#b%4S*oI(6y#d=*ZM#VqUB9_0PQ zeh=R@c!6Sz04FGVSWm8LvFmNaX=U;;b?o6|+Sk5p7FWyyS-CaNfhK*&XVh)NuMVnA zUw%IM!f+Zvv3L_G(%Tw#b}0*yYNqS^N9;_{-@}i{o_CATtO8X z(6{ip&+zZQg=PKLU0DX`q0wP_cNlQRXXaS_xfQX<#BH|+m(p5t5gpTyy z5_(MtC4m4NJ?H#(uWMiIzQ{k2`OZD_DKiroVo9u+YdEH-%-pTG5g6|kmA-R_ruqw9q`S6)<)bF2m-eTF$Epfr$%ez4>9=iP~rD1_CJklZZ zL2&$6)X#u|82jG>pX=g3ztVfedUZ{$bmVBNQ*9wl`*N2A!#nLFLy-&eyQ!9n4R1@S z6&H`2ub;-wv$&hIA7sdU>bfGA67+*E;v+*>)17WNi^X}B<@qch1G8TAIcaUY=bTKV zwQ}^kC|)m$5SiA0J?|gc57AY9UU@X&#pYBxz;`~8_yra#*SO&~jyy4!qpJ3prZBE& za`}8Fah@-KtDiDh*nj#u2~Zw^`U2Mwv$Y@4=(T^7Ymc6F&QH8Pm~l$WJ%p)? z?K}9=b=*NYom%(9pDRHx0b#P$@b$hqnKDDBYTw2_a8aec%lO_=YSAWS#zB4R;A*cd zpg3Y)d--88R68nfATmO5Cp5SWm;yg`*Lr+0vsl>oi%K#=+v+ZovTvC7&nXLYV6*G1 zsQG1+ALLX}k!t|22r(q!LTTkHx1$={_##zrhQAJ#SORQ+5a`c4fSc>$W%Ux4vrp?7 zkqvmWv7!*ra_I+O$s+in`7tt9mh(B9ES|dCG3^!{T|sIetwX zazvYI%$*F4z869a)__@mvS58$40!OIy|hr2A(xc-L?!m>)R@(mRL`VV<%VUJL<{Zs zB0^=SvYdq@K3uCCz_ejxVINntA=6i*wOP z|GyjKVE;ch#{JJ(SCi{v2)WmO?bV}TahuuSX|?#syI0kPuhEAPi8D(AC=ktV=e+pl zx0YhkPgAj`v9bv+70v<>nv}>d79cU)p+8m(6LmT@*_2^;2A4trrvmkts8mF+s6cB1 zWBj7TDXna`e?vHvUqKgT$wlQFZvs|J9u6r}Ivba%^879_(KVixm;0 zB&zSkg8@mr^2I0V|LRPMj#8uO=--ROM>IHUtN$V0x5v{@v4+&k#rrx509Gk?W84K3u zNNcT5>eBI46!g`lH*aFP-x=TE>Sa>dDRAODJ#On@ZT~sm3Rqjl4dwGLT`Dx_u{JKf z7%8xK{9F|7#61%b+lza~TP~3!9IKD1ZC?(uCs!(dI}1IW`_c3ES{G-<(;26O&hIXIoAL;?`SH}@lv9Cd_gdWQ>cWwcTnYx-b!=e_C*RYuUo^_uP9!Z)< zYL10RQaXuxF;*UdY?Xzpua<|lY?Qh`tYqPNY=shmhRGFr0Zmzqgeco?+xh+1c3@at z42e|(eW@`q;p*1u?mtqKP7YHa=iEEg4RhoY_a@H7mw%c1JId9|4jz?JPwR~aK_6GW zle42s2Isw0vg(S%mJAabk`zR|Vmh$`Ei=i1Oyb#|dxd@0fl-+VV_ZQw#MU?zDu&8jrvn2V? zt*h>fH*`i*p3g)r`-BG@Sr%hV-rbwTqY>?9^=u(BII0(;y#;*p9sAJgsve>S|3kfW z7|JEVV7sz1(&}R`2S6~~ba(L@f%_iEB4RHWqwh#$34a7T<&%4cIXqh<4%vUk%`D#2 zP8%JS(K|~dQq}t`DYbFiOMUE8KNCy?K62i>NM(h&dd}U}Q=3op`vCVWAM|n)?Ap9$ zYWCXfsYxoS5}?+kXOkLtPVA3Zp3}Fd$YWsMxdsl$x@dLpM>fx(uG}g`d+35wOZJx# zErf)To|oZHr8U}&H?g{PfU!+Do^x@WrX5=8cXC66`E+OyPX;!7kJ@C6%^73*n$*vu zAq|b{LjX-1?bYR{SWwT0Wc(r2TZ528x~Jj?VLv|=P7;|8{W7CmxPNy#xr&ioCspS4 zVI-oUibEuaSJRU9vdXHg-JGT;lkV4b!V+&jb0Hy9ECSJSNii zz-wWv7k~j;KeQ>lMUn*3H`)$N91440Y?g(+Ls=+*{x`LwgW=-Sqn8Xzw!eVvLHAti za=kT^r2y)^FWx-lni=7rixu&mas&Dy7K~#qLl#y*a3)t)Hw86?{%|eh+J?NjIFD78 zzDZ+nyMy3>*xCU>AxM9eAW@2wE6nIgV?ZTH(L4w}WFFVpl?}ELK~bIde`@gIby@0T z@=rIR;tcf^7wJd}9g+CHe!b<`!66LMF5+t&cgOSW{a5L>M=!GaELp#aoQ<2z3E^?EAn-B+dE8#c$^`0NFS5_ZL|LF5Z_j zVM$q)I1_FHXnSw6J!(TI6GtO?YXpT)6h#hhHUh9k=MO%_)#t&c3j+0{=H03o>!KJv z11=FeORT4(Z;?EnHzsGG6fa+s6U3GN5Zi4pzN40jM}ra| zl#8d?j+eF+OSwz(DTg+wKHi@1{ju+;5vSd1I`iGEWh=oa5EccA?s43(^y0L4b;5Gq z4)a}nsR_Pa*P?w9VkHd2LQLzQ*i2tpXi?bQT^+w%No~k=kLR*Fze;FrS4?OgE5VdQ4g)Kvcl4yxUb=HIMLlJFOC3wxS&N|uIf1oC6M;W z^umNnJsZJmw^?oX8x6c$=M{gCElERxxOclh)OF!#S`uoZM$Ino!{l#|5jZTa?pIIh zmJ%CQDT?Sm_d0|=WWwsyv7|m!C$P30)-f<}36wa_eHe6VfVrf>QZ!k*J(Vd^J^!?H z5KyldvWqsw^!3Ml0}xBMlM9((7d+Q}xSbkTl=Ce&!~q!-ItEP^{K&hV(`9lFtgOafs zGINY#ef46dfa6@=KX@p6z_i3(3(KMGJw4WFcHvg}ZUjP) zuDg5oo7XKJjA7M{lZ)|wFZM-F$6lA@A{C@|Kjtq=JU%Y6KeOHSl1w@?+|dRA&mFxr zw*n(BW&~Cd76;j!mf=`WQu6~o&A!8S*VY3AjB=^1zg!HHKgjbu)wecpccu>Ir~qPpzp188_FRgI;8zu5Dt zM)K3&IvLN!z2)QQ>cp73)$q-}?P+xn*-t$dTl6s-DUSdgjE$6Qf&;OBi0tGtE}ll_ z+^#5+`tB>iW6j{dCGY#LBqY@_<+VH4DXY!L!60W5?|Lm#ROyBgMP*9^Y1+AulWocU zn@rOa6VyI(uVl|685=VIdvb-mj=TaUiB*1KSV@Vog8WD1IIU4zHVw++s}J!`Au(?` zhqR_52YxfFnEoqr@Ged3HXmHJDKCR)0k-=5!^53d@RjFHYwhI-(}|A}XY%!;4{U;e zz#%5!v~K>sA3~zMg5-EQ23bKCRhf=AbOYjb5gRAk!8O2IlH>-%Z;%hLf#Xgv#N&~0 zVDj(5(|VtZLH$VgK7HD1cV_`h6gGa35uj+et1rX?I@#y8I)Ls>ZXM%tMf&O& z9un=~|E+>k&Q(HQ+{9{ghv|aj>YQ@fxnkd(vQW*z*2zxmrpg*$D`CPv75gOG z`pAN*?e2D}fOppJ6i}7Plj(C40Ab3Cy=06)mc$4xzvOD+kKdw-^wece`J{QfXfbDxJT zhZB|fYya4_!NAtFG#sn)mcz>>)7saFO*-}d!E)L}X zJ{4KIVG@h;)d<};-P~Mmcf-#&uUu9sD8XqydFAJ`-+*s!V1MTLDNRqui_6Mn!|xr~ z?L+k)|D(JC+23_`LPi`9l)Fv%KKblFv3lGWyk?PfHbq+svK#$sJ_k0p5H0h)+$LOC zc6%aL9Nay-=l*teyr0ZP5qQEdGGO$S04diNp&#%_a(U>Z zc{#!czH=A3T8S|@XUt*r688D%jO5`poZBhrR%kr1ru)TM=l&<#REif?8qF6jN`Vq7 zYY>#JNL|KU5-n3MzP%29S3NW(x^a1GLG~28t%Z!#u-j1Nz;_0ltcfB@fg{AnP*DmT zRT)i&%TmsyS^Y~Pxd2YFowD#P0Y(Ol@)4pC+swW+Q;-SB3_5yyLshARruAU|=b5w9 znKHFGvefkf%|=fv+kK0fGP~*gTB0GTaITp(D6WKue90C3@12|A-}o;w(a}9ovrs#T zj||0Yz*c_eV9AaK5Q+hb!9)4LUQgbPX+|Q;ACD+^tKB$`W`(R-%2Q?sSrxWq!_!X=859{AC+!3_U|S3#~9%F{LhuFj!o61_}$!^8k->h ze+{O;$K`pwyKS+EQFWIk?>U7jVT7;8q%LTw1(gM#pBQIIh|Bk!Lif)4Z7_AcGnh9*jINCa#YQWnx4M~5}07wo&OB5UU~Za z)oDSDNC!c^bB-H>#LIhP%(?7_lLG!-ED$+;J-z(k5YfM;jmbYK*gaL$Z$x$IA$qW#@FYuq9{udwO1_Y~J~n-+=HZ z-kqx~tC$FJnHgfA{LNg&0%wYd{{+3LV~1bN?Ti-~qsx08EebPKrj1>C7`Y|}VNxn^ zuYYM~Q~ohg!yBV761=R2FS;$f#b-Yr#l*Mw1!<+D)7YJ*H*^D7jpKTU@_tPzb{8K- zy0s|$C-dqnL?0q7&KJo$MXOrE4Kk-3%HQlTOs5uxLz^AtM<;x5Wj?dGPy>hiZ>gKql!6A8T4|-`6&tKCe#D_-1Ff zH{gN48GZlpO9jtMd%nA8u;yFXqrAODj&v}vd3qJX32-W{E#8`8&g2Q-R4nDOoHC<) z1C<*McZOxgUu%u+cTbb|3MTtbBgeyAIAAv+A;Z(8g;fEp49khS*w@U?a3c*(u5sE2hv$FMiv1AOV z*>6Z4XSWRg=5}L~=(HtI^ln7e1mpHb_C^TKmn7-IKXW8n$2O>H3mIO8s9Akto;YzG z7jcZ(s9avO56QSVnCGNWDd~x-^i19q;9$oB69u@uzAWC-p>A?#V0Et_w6`W0)Xkv8 zXO??1-WN$^Y(;HJNSr-CJe#I%pLb9Q`&w1UK5z2XTNAZ4Av=$9B`jWnP9N z<_neiFwA;W$phtG*Rzex3u-F*D=U++#?yayNJ>_w*6~xNcd>-EE1paPX zFWt^<8gCJfwEXjABF9NnpJ%0R75~XMa7D}dv;M{jR{;u?$iP0Rvo3JfeHq1W{*C$jf%&X07fiq7#!dD7<8u*})YYX96bfBd(5vW7>v6kV%P@BMTq) zvQp))$_{9m>x>DXPv%cy{dC?7F7lKkzrZW5X85bXQrU}R3We(52>DxCx6Al^o&h0*cIWC8P@sN_fmVDzlKB4tWDP&0W)@kt6 zn;&w$RIg%gdPff(w83xHz(%YEIpBd?OK@lhK@7zclevv8&2(>kiOcS|aIcbgslu9v zvaV!xxyyIYm#C-lQNI#*k!{ix<@gpk-c&qb9;gdY{raJkWn3G<7JBegbK?lJ&u1e; z6z#Yjz~1P8#UE96>7S$@PZVFwjWHyWPV9xy4>vWT;b!CFFP>?9_v!qy@@RBv(oUrpl5s_j?9(6I@+Z&#=1)6>a;~lPc9ibPl)sA))}sPu0O) zFr%kQhMq3_H!Xe$9lHsZ@>)!K+3z+CoJF67@Y$d0cR$(^I-t-h8d7AvTJr_jCzPfo zkV$t&lu`;e|8|?@h8D0rzqSvBzfAjYuhm{E>dGc|wDh_5mffI|F<=cdnFc+t$k+O~ zDBzv@3hQ#?P!rCXqHUTd0^$=U6&h|yFUk+qtu0glK!T;RFIwHBt)aeU=wxtU-N^=v zxWeT}!orc8E=dx%fsORpw1sTbm*7wJ$w_F;KM`M?<`*T|7@qV8vJEyTmKBXHK7S?U zs?(pwWVsn9un)(_ip=Y_`y3Vl-7DeC~JsbXhkf9%<(U)bzpHPhW4* z-Ko+jl-rw}_nnu*y_TjhF7>m4-fq@(a}WP8E*ld!q<5FvQZ6ejWlucwk(X$w;7FI| zwF;c1M<7OQ`dKer{?ZZEG>FVg7O4L+vroeO>t!Di%*|(duH#lyxjXf zWoPr$7_IrdmBB}gU$1&GaE!{;ucP2RcQfp%ln=UKK24SL>t=+{4nq&Ou^x}` z|EgZZ5-Z0+Y?NY9*n}kOge8|vQ15P0Mo%R}?iTZ6E{=}!du^yd^f}cnFsz4&b#;&n{vD~FTI%y z`A}_J!BVI&qw8Gu$YV^ezEhV?yYS%np0{cRBfBb!0-#nP8=I#koBz}8}RuDWt=jt=Sm)I=ky(tI# zpH^t9KLx$rl?$yBBK#9+rRn$RWU#U8^kCE9-SM_PPrN2>%_Sr)1iCMMpA4?Njf<^5eQCm1%E@}wgeKAL zp&Q3SD8;;^ZmpTXkUb{*Q4P%8{~#Xcd5>$x`xyI%r^2Dq-JqXD*$b8mcqtzFCED(Kr!i#(u$UJrnMHp9fUx`unp z{MEj2bHOg{eXfQ?wMFTYCzt0dW}e}^U{KTJOLiZN3Ij9LiCGoVPevGrIryLiilDvxvJsSnOr>3{|7G z2N?QhCai1ov`LjyX0JOq`wHLUJ1{mL&a^`RK1yXojHKWoatK}VfADYN8MR%!J@ zcf!MCk93x2ABdW}4!`}Fg`DN4I?#n&C$9=KR z{_Uyrz92S~_W1$PsWIi~e7}7>bqV~6@~nchV`SrtskOiSp|07!O|4X#FLeGz6@mKP z61TIfoNFa3mgCw&p34b{R1fW~=Va(I-R~2wUi?KW>x-ytQgeDS5dKZDg9`!FrXc9< z(Hk(O*Q}+B^umtsTEze$C;osa+5R*)ivw?SKCo|F9Xc>FTRFsbp&Zlo zPjt-4!_NvT=|MKcc%)e0(#~-bo#JM4C?8#`xbe>ms~kI@0{2IYmfH#Y0z%z>R8x7o zoSWM+!iko_l!a1j1cH_2^EDaHKM>Go@xKtTtljb=H*ehf6|W^G8zzAp z?m50S=Ef1`)6MX(Qpf7R=Cn2tU%S@z^)EKuQ?POn_~WmkW74ON8%c~_Avt;k$aQ3ngE*fy#K@>HG`Z9`BpxY2 z4hYvTMm9bbZh)2pBgmY(K^)ox_6^Sv*vy*oq|n;De@c_Kp+!v=;VR$$w6Zrwr-Q2) z1^>?@tWElcx&L(fQ8J%{5p8iyPItpyc9t8-Iqk7o*`JY%oYBWGpZkbQ3#&KfRYpJ- zOf<0{CVBIPU!j(6-d{LwF;KbN-|n^3T_FyWQ+(b^UAF{oeb^8;)-JH3)*+02^O$K; z{&r}2O0dR&CU8X)_kH7Sq!26N^YadEZMb5-zmh-TI;%S3U7D*EVzxD5sQgYl`t+Th z*x^QNSwHW9054H*3;5IY(qOAQdBw<-g77oflxE3St`&CGc}J^m5w3#GTVBO>CQ7xZ zviYI~?4-}`bA=N2n{+hTGdquq5EZ(^r}D71NrHF0!klgt#MGU*A~|m6O`cqhO&()* z$F=GtC0Gf%ST06acYFI?f|!Iv>z``b+Sy_Zh~f*>3-fHo1M9K3JU&-}Xks>Ehew*& zZtJuSDCRLkR7d6kErl}+5Ug4`I-D@(_5Iy>r$)D<+gYpx_M%#6QLXQ&2*=XOs5v=% zA;&U!%a^WV>Dd z-q862HG%VQ{uIcm?cc7_P)zMp`X|4qio;O`iB>EBIk#jK z@mthy`7_rnSg%^&8}-)N6%gFc6`UhP)};XbLwqEc`hmjF#V=yV+&-Sn%})a^S1iU_ zV5XHyn3ku0Q#HzFb8S#%D+&cD+Lbc#%D3rjsO+--EQ0KfP|Gj8E3K;~I^O=aTe8`O zqxynE=(F>51yqP$Y8=(x$Uy-RG83O#Y@a}_j!~)aBy|m29Y7CR7hVk5V z%aqXsdvk17YaWa<2H#wQ*UNGASWVZ2UC|dV#$If}2soo&ww8TTW4o-0RK4uIM!}u8 z*r~#Uxu%~$K)j=)mcUxCMekPXSvvU*NauT@_3TmnCV?M3dho9(@qMS6Ow;+{Ku?~1 za6EQc=pA%f{dl9+{{1*g0UCs@=g->+TVl&v*LOXjQ7zwwaf+vm1?W^kS`g_K9LE@_hvu*i> z33+@hKjLhV`R7iKaY-R-zlp!B4{; ziiMOM=`P1G8(2rH4Kmg4irktDZ*0%i!Tq3`kmgI)SBuHrC4N!~7%?+~9*E9M=I3rm z1b^i`l1mQPo^=gi$FM3F5DV>nvwxa4>i@#snrrbCxSg&-$f4swQKXRey;G61 z%cHnW$!#u`Wi6ZJ&wRk-yppk~!0n9K#c9&L2UiGHQhdO^x;W%bS^y?fvwPM5$nB~Z z6#kU<1=Z~@(BHL4++f{Q>?ml@mr!%fNL@JE6=K)!6fuMPJQJh6$i`^s3VPEXsZHn~ zOgX7>02RVF;h}7|5F!xm2Ri$F!9!-weVb`7w@GeuK4mx41s*rH<4eocl$09)8)^D* zPctc%FIwo8cTr4Ehm)7jub?f@Q{`zw^-n2PIhnC>(3=~|^tai*%b^lW5y5KyCxRi# zg6q9+m-4bN+?h878m_ddC_hv6vq*SLqZ7lGrg<>PJP&e07}Y0cSxL0!K~+ULUcXKj z&(j)IX(B3>15g!NxbQ~nf+!m~g&F>L5t^@gR6258E$hS6FEMU494pOO_`FXG^iiF% zvZtSsaRo+;Sj1V|1vJ@NOBfTS5f69|6@;UHU|D(jI}bBOD81O;&-oaW2XEh#q{69p zhhv1?dzcwW0hFZ9o{8-~K3VO$Z1H=a`Br@8jXToLvzaFgNHfy!LVsOrLttE4CMOIaDXegRLD$tsdF)wPiu6(KN_%)l>Pv;kT& zr$Vr=JlWrvoud-485#C+kaOJX@>yv^A_pPf{w*8W;65aOH_ zVe(t|#kDtV$Jv%+#j!8txPTJLRIzCX-T@@jdsaQnwAxOBVnz8P#+V0rO(x{ zXc4}BjWQIt9Ze6gcgJ38OtA0y?Wuomx-%f4A6J=&)`lxx(v8KqTC;iJnR&=R*@(5Uxk zwezPN1-=t+CZ)>E7gnvqz4A6zgLZy(Rxv*L4?^}nFL{1C!jQ?a+BO!LriO378zElf zd%Nf2Z`UE&DNTw9dP!|Y{e+K=rNHO%YsFNS`C`qPX6Foh1twSzAVBjx1tuzYJYI^*l)a#ue z^YKy@LY`G#yT;Tf7@I2 z`D2jt`wz1p*o<08SZ0Qv6hAdcC2SkZ@znnZN z{q9YB?UoQHs;hgxgFz#9j8npSKhobpBi247TWzm--F;Rp9rDlV#_>-<#Nm0QM(;Ut zcUSiOg0_8qtKl~`BjfjMpp0>bd`rr3`NXO91&EhUU(qc?KQnLci9f+Fw)n$p6)n#+ zQCO|4|64=VLO%ROy&S2aw2OtVbj-Q77*^_+1gOqBDX#@xtT>kEp{>bUma z2~$c@(!S)@^T-8j2sg{00taAX0$Sqz0ltr$jh=ps8`9;kq6Q2SP9d13MIixOq$@XLTDb&W;r6?)RpjtFT zINGM56x5~-{w{J5gy~j)t-0l&*Ts9dWGR{?aloM)zm>h= z+dWa*_&yHroiaTkwvY$o=EVQ3kN%DvQ1^+=KL^qg!%^_FV}YQN-S)06U00{YyYzI6 zo8%u`Z|W*+xu@hLTBw>%Cu={5&_(*I-DQyc$Fm}*bYWmIS|{n($||(9k|X^BEh27T z|EX?oqmOLwYsEP6Rz?Q&C17Ip6nQP>~SBqcM)NXUpp%GnSFM4mZ)9j6|q6z;J;gUh$AH|YtPij{5fD6S_cUY zpq@0=fd=ZZxD*)YeEOm4key`$@fByBr*+GEJOXx-T8f-LE~fq?+>r(U7IDG;As(zn zxZnRUc7C`zTm4^%?U&ouV8N`ckgxl_BhO%+%Ro77kRHF#P22%~ZpJ|IhTjqnpl3w`HTfW_}8K}O8_!>-8}Ine_*%>S#m ziq=@-@&!(^>Jk{?$2r7!?V;CfMNF8^<1!Udx=yE++-(ZlruLrWxSaaAs6~ciDSAYdjN)jz$721}g-SbSiAz;H}Rg7^$%NvUIye7O%-qY9-o`c2v3pUQEKEEq|_y}Eae zCwNE;UUz4vtU{v<#LJ`d(^H%Y;$m7AMp=S`?qZ;f-CZF1c+c9L?fmk2bSmI!WSe_> zAqkGhCx1I~7iA1e-tV(bSx&l1-{wrIFHdX8B6nXyBUpAz!tdXGf_oHETVt59H@)Zui`W<2&@q zl@xUisM&VTQ3S9OV5GSQ>be&te#GQ5j!2lENq5#KH~cmiR>@w7F

    +9h%*4 zzq{90SBzY^5gp)UV=@N*0*;}9r|JX4SvdQquyUI)6Qb@k$JAc!j**~W(-SL?SD()pvGQ}&!;%?beSoa6e z`gO#$i=*!(2KCN<9|h1g=BOsobg+}+_cbhy-e*x}kuLqLf8QG>^IY^3D=}jgJ)|;o zC6r}`S7KmGt`Hr1VE7~zwOz3;Cn%5tOlLUg-y9$Pk)<>!fjB5*0rF}lQ?$*mg3bW= zcsqaz?%FHCpGAG4e`PD&2kifsjd7LKGV@!687I!sf2u6in8a(W;He(NO6P@Fg8 zsCr!L43{8u!Ro=z0@f2vmBuh%hQ|D!WU|N8+EWy}REi#a=mpB>QbprLf zQ{>Ng3xbKCjkM(Lu6FQ-ct-BF8Jj?susoYJpysaN-~D~HP9OF_BKLS<-IjB<_M#&&%kPr0${>w3)|cXheeG7V&;6&&P^H7TOgXw!21JHN@t@1xrsy>W9S!4 zll!9Ai7 z=(PH%GRNxl_@16ngb$Vco<5%vSx7_uuVB#Wi|T{s<>j#$%lBDZ+Nd|!t=t5s2K~*G z`~gq14dl-8%4PdRZxjbK!{vsb&cM;VkT#8f%iLWwmGfaq85KTWf1+GW&0GD4D$&(C zvEJD={OjWN*XMQxd7Yt3PEVAz`k%6;T8U85^s>D6;6$SRvdndsT#yvCP+#cs z_#(RsuJ6`TCQ$%UdBk-24MdfpbH5zOkCeUEjAZH_hljR!088xAa5~PjRG+_UF9N7E z*UiW<5|oAi9d`U94t7;QE4rA?=A)?{$qYTVm?EM18Bo2b)hn?)kO%c^rK2Mx}zJb&erKZ*PtxbTBTq+vR@W5Uu(ns>Ougn2(V>TNVh94 z?zK{{)f~r7_we3|0KTTtUZt;*nM>5jy0tvegjVMWg2sp;l$#Y=UJ2sDmhexY7w(37 z^$iG-kA<;rq%Q#Q+dKZBlZku5X0Ngb0S7K7W!~-3ww`{!2`iPJ7*@mG0~W!r(ojO3 zUNF4vryX*yM}8tbBI#SLM34V;X3NUR`1t$b7}QxrsmY~$!zJGQ()U4)A$36VbUsQM zDU(4g5K}HDdPNsgOc_u?Ujr+e8M!B zaDwmGD&YKI6_I*p>UKEt=_Z%NOYs3;3= z_bTl13MRaGmz#}gO+J2^Gp{v=`&56yQe}A%*jI@Sr{5dirSMd%fDG3o>RP7n`27np zvKp1+VZn|c;N2u@L9Dp9PG>_z*o~5ctMlBf`z^vJ_fcA?rjEv?fjQn0jN^qzm}w3G zseQWTHU&oC_`cpA!Kf>Fb_e+_tMQ$2Z)_mgPvc`RPenJ5Kpin_O^n|=|B5m_ z=I&^5nxGdN_vqzR4K zxmM#s zI}EFmB5+7aI&bysNd5fYDt?drQ5(a|<#GR8hpGV;YuHN~COFUD?N))(5}C%3aD8UL z;;f}a)%z@!QkijYyJto|Hiu_7js;Q%heJL7^kJTq${g01Pb^J2KJqW>`jhh7t$$nY zjpRb4qwT!p5+1NADWSTLrJdxJEMNK-r*y%=%9kp#ChMl(10r+i!XWq_=LtgpQm07W zBnyfe9z1&EFdf9_ZubgQZB5Be-=BQmEZxn*8lMB|Y}~dART6tmZUsQuOR|&@ZDC*g zot8Yp{^-cY(Rrx2x3^9(J;%S=0_WO7VDQ~ffj@z#?@4c(Elj#bdh8lIGeDr*f(GKr z6Yd5PdK)9&;*r+eQ9WG#BjCAZlb7E&={xx}a*eKue~)-Tgq;ia@Q0za)~Is-w{) z?@(|^_30#wr%4XK4(2Ia6YIYcpu1Oq)u(mJ`G{bgAo%HL;fozsfODH#DSZ~XQfu+H zm6590b;9uSmcm?DRA0q!tyUwq~@a)r!@|M<3F#bMxeXW0)jEi z7wRqzA2c(F`UtVgSOS|>%8`rjl~@s2rXm!@2G=8++xp!U(M zv+_q)-jDRt`eLuSwPimUS08wZf1|oSC-;_ySfit-)oq&Gu?yCP#v1EcfbUcNM`s?m zG=I~gaOP7DLfT@;J*(?Zo(r>?3c{0y{UfmPeYAQaN=XaYezV~vv(4= z9UOsqGrG}trv5eD*8sWe?WTvI4gyz0@x-A$S~yX2CCw6WX@(f$^lh|#6N~$m5@GOc zJe)2i^7*ad1U@!dSa}Zt&$uhQ7gf4nZn7Uq_kgS`5XHf=UFcB%$G05Rk;dl=d#|4P^0Wz;kmi=U=JJy#D3d1kOPqdBSLX>^)D>67TGZzLHYMWY|A`lnwxzUb^=Au8gn3cF^c`YzE6wRr1Mkwy^N zz~?Z>zRNK;+7~0Uy&ztM%_Io=G^quPO9|0T-*1B>7FF>w$mW3=^l{THh#Ig^q17B~ zMCQz=1{JX~th}?%BBB?#J?V2oU{2KsYCDKy@(mHD<_FZV$OTi6;H}xIrI^OxikVgV zQ6I#@pjNQK{f_!KPW7PE&tXQcu`UDp%swGe8ehxQ{G)60Er4B+@MG=s6N%14=oDod z3%L3`;RPk^e_55;c&|fB*vtNeozk)||By3)n7-)YQgA|c_S}`V)KR{>gD>STRFH`NZ=?fkna#(iyX%l%W-OleVd2Zde~gmgEf4L4dhDm zdYjMIwmW`>_g53Q;b=zKZ)D7-h50;As`~jBDAxLYbDA$Sw*I~)$~h?_V*uCLvkL8H z(*}^PTZG*@0y>m>6~@FAM~>b~?$hR*?HB1wpcB2~g>_weSa9!P7)3>`+2bst!5c9k zv`4V|U@e@e@(gB&R@JNCs)r@p70`sXr8$?!$LQl(E^=FLC}^$LMje^VYE{={XNJ;q z)qfdIN(@XBn%`&{Fv}J>ggL&tDEA25=6xm9pG0Sud4{Gq_d*Rv!urGyr`}XWhqQib ziye@j-N>mBOKlW9#Kt+&nkLIiwkD`vWT>{n2aa`cc=Zh#Yk>E5$F#EBG8c3y&LIti z_`hr?aYzRCMo0NRkN3vxQb2sI>Qi1Dr6*?gUOf6N7*WB62aP=dIVZCXJ+h5`39vC+ zu|K~=9L|w8Kob(l`q2rk zt~G}13eU4Hto|4a?1ww1w`$$v>AQtb=6luJC%%~VAD!Eti7u&4aA9z=Sp!sn!1rz? zn6atb>|MSJ3RzrcT8XW#JW{>f50(97R4Wd%&y<7<80{INXozWZffJRbE@#ihNP5>D zS@(fhOhQiF912yHMeeE{_ChGJcM5yd{SzPwyj%wJqhmpKT z>e(227+=&@S>ZP0S}=GH^(h_oGOq$7T7F+KApwfVvTymG#Uh=lO3pM1C{FNxK21l#F9hkk$}iTqJW{JVHum^h(53{q z?Nd8)^(OdgT?FPP$9 z-ELjJu!Fz|J=q_2{P^KJDU*9UJBCs}kaqU{TGhgo|KiH~f*RaK-W^y2AeNlJoh)Vd z*n0X8h5G+C2By!M9+Yenj7TwYo^mEH>5CL5?@7!(>U0@HeCP{}$oEahdrR4J1@kvm zR!%1gjD<|-j-7m%0>yl&Hd^Pwwp=GMgMrxTlM;&79`Jl7c5ca48^m_@7MQ6dL|sit^bM zMVk$5EdM0zjDRl~lzv_V9@cYghBBi>BGuC+uD3`w!2iUtUNCD+IKQ#U&#D{(FfOMf(W<`o932 z$7H~j=`Iz7sdYig@9g*va0jjadp59j`R*9$^|%1*)FDn~CRO6Xaj-0>^tA)ZK+&Ih zvH_^xdA_}4+D4^ik6&>0)G_tNYZ|38w9Y&r-4ueU&nY?IH{v zTnvL`eh0C(XeQ3@MXoE_4+jPNMqd}Ezk1Q!zToG>y62k3rS&qW`y0Np_U{p@uSQ%d zaO10MvZ08`s{g?61bu_^jm_oh#uJJADmNIdxH_O3jo#ZhOuibY@hRa=WKxk(DV|e8 zh`O^a+Dt@yt+r9)ma!Vp&%ITkjNi9^imFXfJ7#H7)E==)jZ&lb z3R<%^MWXiJF{-pSZK++9sJ-`U&6=@Skq{(;JMH`Zxj)|@zV~0i<8kG6y{_Xtp2u-M zaGGIWpPa!0wcFd$GiMGJ5iBP!-R1xlOJi!~7cPopIEQVBnmJH0KxIWNB$~mTP3u3E* z-Nixq@Ue%kI=JA|LL%SA#GsSO?9X+jeJjlB_hGx9PSg3T5p1KsVXu9i@4xhl*T2`Z z5d1do$S(bRuwZqg=kybB3yyiM^ z5(C_N(oQ@ZsBU>KJ22ja&c=O=k%gzdx}}pxUMJJWOU3#qpAflxk9YMXfEYGUGU+l9 zJp_)ZLP?jk+>uU?N{`{LemjjOdzUuce3Fg$Fj#GShpur681$Q6cq zfHeW>hwTq|ztv>=W1+7o{jW+(a*kgQMykt@%Xmjq@GomlnxttThS~RGu6j#dxPKGBbDWU>35cU zo<1x5p5%WSg|cZ}fI9F5h$^Ek?}Y`vVz~H>NgjAV4jg3MlLD z(DU^+bWQ)(-tYj`?ZpV*iw~a4&oA)ak@1L8HCgg{O=STNzWG=h<8rt74e<;=B0Lwu z%c_TYtO*Q*cpk$CJuCWQLnP@4#Mnc3J$bY!@{Z~LjqW1HZ7pgeZOyd8Q>tE4qU!n|1??!$SS_rAr*8S{yqR_^WEhdP%c15!NGTNc{bCCn9f6Xn;v0kgmhTFC;v_OtXhUqo-oQ$? zUGQ(-U|DT{=?ym3KX2rcJ7Q)D$K%R5>XIrU@_kAi+<4Fus7uW!c){KIwJ=sM=b&@6 zRe%=>ZcQl8pXzIz9nCNOu&g)7$f0X~$F}Eu)#PHUZAGC57fY=FURwQQprS?&gH@#(U>t`S+=@qOJ&JiAzeVDOZiOAuQh zC34d~jVQtIn*>?TY4=xh4WyBY9?x|N?&T61w6iWo?XO1z5O=@Wl{`;6PmfA2?m5zA z{VShM+H%aU=W3Znuf9@Hiw^bb9xOt4I#C#1S;Bf;Hja^PNh}Z|2p={q zw(9Jgn%~XX z^>m*s>y)s6&C$4{N@2!6mVb}SMnhLx9i%jH5Va}o!XNUqR58M)KDay$EA_o;#& z6l}r{vQoH+WWg<0PLG+RD^j)xQ1TKB#C(6gaS8L;J3Iocrv5CU5DFZz+{-;Q$?KE4 zgFO5y4AbwU*`kq`O?_d3Hq;==ir3e>~_`ghd za}e*s(A|@+7cJ2B3|7j%xC1~__JeL6`+k~HyQ0c^U%|jF`QAtSoFH%o_>RVZtmgYw zl!K=yKsU}P@SF*Y*I4>58o#c)WN8i5pzYjbmG+qN;}T#TK3VzyW_3d^*JzFky2kk! zk8dQ1yPWs!ZV_9%lh;Ufl@f0>D0g7`A5iu*+l<(3Xm#sX*RFo~0T$j2w+!g(#XRP4 zE6#aUoQF(?y;wrkI08R7xxLY7C9eUeaop1Q))xWrR`ET}o-2@T_VaB@+~@&{dByPl zNr}=^=m+@Q;jdBVhdI5a_y8NPQZ#M5in)OS6@y$;&kwtL@MlH?SYrwkT9)hM^2?Z- zFnpknY4omGPwDE1knV58aa^ZXxrrv&XUTXDUW7Wx$!v$p=f}5mx}}PKKAw2KvE4m< z&;y#irw(|&Ho!qJ<8_PbRn>A(o_nBAP*VgB{KrY~z9qwQH9WUOTJMRZD07fyP}5@n zWyv8fLNz$=gQ_Rw^Ypu}TI)Sv$D+5qqw{A&>UFtZ;){22g4#jm*a+WEl)^slHbrG_ z^8P!a-G5^hSI58I@^A|G%l{}`abYq)oWlLZTbnb`-}kJF@pTuA5q!jG0Y_~QMb3fm zatI{;^_0Emba0;X^9s4Z3mt4)>$cembMPuI4tvnQ)GI*4z0w#&oUwTyO=>ZvEM6Ya zSe7U)BU-6G#pj0k(eY{(g1(qW(ygqWGiDoBUl5tRVU*JG4kK!{hDNy`H?@ts{#?X3 z{I2}q{c|_VI*L!fz zPd?ZdL3`#rn1%)nIhO)f<(dMWWtxM1n}Sib+!88|h1TNT&|_JcxQ*~x8EAKOjJx5a z>m)Md&ymUY5@BbE_x9yxcE}0)Cy-Uqm&Oy^c4(bHvDn``RP)_W#`o26`c~q3ek~`( z_2n`1lRo{Pf9jTTnLp3rcdza1PJtY3^XG$#%L;o-nLa$v952(LC#k$My4bF76@P3- zToNOsH#x~4B`<)FaG7Cu93v6HmcdTuz$d==@HNYZqg39jh`q2@o~z#P3?PO}%dUq` z*>dYdczxADA+?KWv6tu*3fFh=I>VMu_FMwlaC`Oh+dH=Gf-K>t)`Acmt*vwA2m3p; zV)=VY1B#JuW4LEq{P)>@Z!LZela%J1;icWk=`&}i-C#{-k^!oSWjhJD1AYO2lS?re zI~UXX=A#`6yRyk5yu0wD$D!7&JVKL{WcVD<@_tMVmSVv2$@HMxUkJF{dymLiHl0z% zjxu?x13P0s-X)zjF{C~}5E9+Pmk<1Ug3GVxVAKS?i}6`M)-PiH}(Pd|it-wEck0t@xNsmg;3ZE#ljP9Ob7~ z$my*0+yft3qNtMux#G1^tQx&JL~9Uzu?6eOL4~71jGoF!A)Tz?38B zV)P3ECplrMw$9N!|8Ak59FI@t~JZ{ujPq*7s#K3Q*Vg>>}O!c=&PAS%g{4qApQ-x4;eR>J%+N zncI5&=L0yq@#3M-^g9bKhoxW~%J_V_KimJcYLJb`1;r%v3+$yh(>amtnmV+_7hXY@ zeD5fDk<|(p0p?jN&dv5OQdLY~S8Avsk>1quXyeKC*PE9s1$~Y%>$2NvqE5Qd;M>&-u3$m1C9Y|-djoU9y z-eC=#!=zfw6m~NppZCrC1_(Xe)O*Zaye=N>;kRszUkA3-yIx24kH@XzG%GJgczCz< z*JdJa+u7-vH;QJZcx!YbE+V3*oQ7X~Ep2Iy9)P&IraG_Lg?K<9$e$VAkm8?uj2@0^>%6#Hu3F> zjMKe-`HBjfv=A039Ix8xQzDyaG0A+zyJ%NVl50yne%%192mnllz=TJVv2R;!TP0p~ zX2lFJ3s3XQY2;U%nQ}~>i;uU*QIw50A=bL1Ghqk*JD0QoN+Ro2B0RfWPwN7ds(z^2 zY)K%aa@wY)U@zu7l>?xB=;k~xblfFA%u^=Rx~#6a%}n^4pe3LbP}}pC35s6YvND`K zc%OQRc_7?%KHsED;AUWU(YfFT?3`6o$39G^rdVIWcDGyS?8eg64}AFL!b+_McLnr?0>I{r^8u!g<8CBwX?7K{F3Gzl8|* zyWRTDJ0oFKN#bEQ`k}HxzINIzXD<4H`o;VjC&%eq&r$y#-|7f#PBw12NMO?wewiv_ zq+Ql1LISetgyu;(Zzv#OzkKar^3w&u$iGhUV`jY+$w z*u_Cde!ss2zi~`B?t5~#Va(##LDB_y>#1vWX4rASDNWgMU$TK@%+HZ^o2Lsqq3Q>q=4|v-`g;O@|a=sjx=a9Q1 z0gVkS%pS>Si0%>3Ugzo@8qi2E?t-mK|Ks^D4psJd$fUNpkb{dussESsnD%VxHl!VFR9M_UIWUIomzcT+?yhHCcD}|Bqbds9tBtjti1`Hy=rbZBi1& zrVQIhTSVX@#A9AeH*Em~0bUz(AGDS)Jp&EsCgPHE71cSzU9l#8g;@G?I);?$VyF`R%2_J4Zf?K%g=2ki zump&mqz2cc&up?8MX+67VY!9U1jW4?Wk5wNO$)%tHZb(AhG;88LC1y~?|{jL3*}ml z;~t9+v;5fXJs!Id>MH4u>-kaQ;n|yukS8Rc)@bw@@8st@D#xi{n)A;&RqXd7iNilq zFg@rX9q-a==?Ie+r}lM=C3|%Ok(wnWdAwu$vo<8(pzFMc1wU}#zjfmt&Be*I{xfPtA5fY$q;(I|3Dk-JO~%8; zRhMcIM81L*kCJ2g)=ZUY)hr^6D*32Cj`a6*7)d4Y?dg5cYFUcYQ@8&VJoC@*O-u-y z$;4?tcT2OXl$G0rZ}`(qQ^Ps%+~~S~Mwm1Ufy6cN`zI&=h zQY@}ovaKdz_Ts+K<>lkh*bphvy@yA!0{^jR;~ap-;K@d8?&>Ka6phn+%%G3U3c56A zR*nz(0!|B9x+S%u3*Gp&!h6$w7sC{Ly^5OKZx~sOVAHyipcZVK*VNn^mIDdU5rv1Y zek%NWj&>faNR(4$7jKGmOm>OK{#qplH%=_HQ9bSaJgQmP-f-yLY z{x0Jjjr!I)>d&}ALMe0|b3Pjsu}9ky5idPi0l>4%rw3V&JF~T37@S-%Kr@@$+na%y z^8S=t>Qw|%9v6W(Q^X-a3mw3*{h#L{ciPPeYEDQ$d^2TP`xPjsd+$Z6-zufC7n^bY z(f5|tV*aYHmH%9sq<^`8FA}LxT%M)ve*`MwV*y|N4M}BpGD&N+%_rU#{ft&x`?&#d zcSf9tb{5+sfePSbUxiSUmW9Y4-AC(>b>hZ(k-c?WxqVdBdlKUkhgDv2j4i&zP;TZC zs&3!e$CS1S;HPy%79!xe>A`-GZROd9F!&uQ^rE$6-;9)kSif~S>Gtmt{P&hSMp|Yx zBNGRK>m`Y~#NDr#ZaMq;(TSLYP7W@5`@8Pi{Y9T`Tv_DTiet8_4J2qURsk&d05T$)8y6HtAoW6tULBbqjTwUj+EEaj(Mkbj|2EF%S>0#$s=BJz2s$ zR7>#G@0+$CUv>>7Q#wP~K`H~%b9_pXpS(m`jDWU|R%@Shj!F4$+#kxFeEd$52Ulf9 zp!bl9e94}T;?+wh6lHQDP3z7scU~#cnkfn;v*i0*5|4WTakO9S=Ca2TXUk*gCo=gT z`zsvxaC6;(%un3+l3%wlgRDhNXM7m|0%mvw1IM;wZOlvG|775pKA0)ePu(c*ymIC5 zchU2IkJOn+>ZbCRy59d~ni=cj+(xW@m|cRjQ=E0?`EX5s*-li3yre6CRp}=GSzpVV ztqrbu3aAk0Zd!u|dmY=Hj(6(l0{B^*tVLX`enP?*7JHrCGgg|!+@^fh1l1`)I47k{9)OTaaa4LTA#4}h@RZna=KT~29$s<~12+Eghb z5Cy%VWTAi=yw9T$+R<PU?hb3l7NVbrLG5-JO2B0^=Ma6~6k}O_38lOT6(l-=fDO zP8d-k+%=>Hk9pQ*>UnD(%^ghc?;Sz4KbcR7&*C+$CTwT^7D(H!R8fV6tD9ofgQ}Jk zdy9S9=d29zo!l}0-xT~kKeaK3$;zlwjf@<^Da)EeeEcC^nA*hyj*IE5q2lsk;v4U1 z|Cewt6&4Nbj$>dve~U5uzzp%nEl2m4D`xj}k&pl?61D%Yq3G8r*3cUaz!$=92G~hGTQ4R8VBOFBsO!v!lSOzXt`Ls1{T~-@@;2tU{x;0=@ zt+nHML)0g*7`e++I+(*9fEANjhub1UmKUY~P~rjd70RCP;bv55KqbQTVJP};PlbBFYA5)(Q&MnOjw%5+iy~01GsYd(`;O{_`5*B*{g^rt2+g5 z@7%~kv7rxM3>Nm*L^ol8NwDIa$625hyq=S@-Vk)V5U%31kQ@Pdc9|$_kAX6{M;>jr z_wK6m^W9;KjbQH`wk6;3{5o2wdAlGwPU^zZa#W0BUj3JJ!5QYv>yyb=MwJT_H*L%J z++!&b*2j29mZRh8Z%aO2p}_#eZiLG)6DaK(p08*r)XFN&HsE}5DPgA)b5(4uP)|`- za$(%=dYe0>n(n=@>o$(p%j;pFAa9A=pFD?*uhVMX8>&j*$&d!)+<8z-SsT+$PKlcE zX(vvHMk!obAaOp->%SITqxl$xYk5cW*N$(v387T`)h4op82X+za1&!Rg3&oXAiFG| zZoVe9tJoItgTNc>PBy!+O|Dn9O3laLm@vyQZ~La?{LC!QwjLhjecl{YMD68cN&JEk z4002>K@>cp7=-8w82Z`>cx9CUaVar?`}R9m|Dl#~=#y1GBl+g!r&G_}k;?aqy0uW* z!TNdM^Vz`~OT^t!3_3FJ5Z8gF1j%#VkpB-9{cKH?wOi_vz*8NB5CaZSWRmIOL@sW6 zthknt0~<#;vExQn^9-E>7&GN)T;);jWh4pv<~i&kA2X#ZaC7G}Jc>ZpV@*F$bwq!P z08^Imm~ec6!5d?|vii)Pn0WU?$ojZ+MMFRvL#JIN{CFor+n&=v8%<|{^W3~ax zUu%CWV!BD9$K4gbQ~d%lbwPV}3RN295tPsqS0uhqysw z;jMn0C|Y@09Pe+KL|a!eU8;+2@p88b^7O6^1jmz{Jp@oF-Ei9NKlgvhVjkxMI$|+v zD?|~pm^Y~eX^il69f1taro2cvc6Lzdfhudo&?4-O+hf)kaoN`c(H^#saDa;QUT`FeY&8yVxp;o z0}ba=y^o#s^JJoENH9MowBM8WT03I7+|P*>Zf*M_?|A$6Seg4hJgzK+rd~-&CXSV4 z#=M3b&qGC6O(n>vf5&Ix$FTN=rJGaw!@ZRLxwno$*psRj)3%H1YX$;8Y@bpis!uaq zQf^jh=0e5tQWtyoC&|^50kWcQ%?RV~gU0 zLCYxNq3?iLHn*RwbM?j2%Svbi=UyyPFP`tM(*oCGn%{d8)3caQZ&BmQy&uV9Rw8{yQQ6Sx`_kX( ziqY|Kxem7}cYB=S4DFNOKPBI5y3@pI?1nr2ajlOauV1#lDq`CUB1@cC4a{$SUZK8h z>7>njup|ydPGa}6h<|~@M3Bmd_i8yAW_XgBf8kQel|s0}ts3oP3D5kXCc$yVUb)g5 z<){U`=6au%ZcnoGC@rqDpW0JhQMp<3PNi`RW(GP@9cNfk4%in7OT0G-l(%~z(`bh^ zQO;U8-1n5m;mfZJWWXSi;$?-3;Jf|{vCY(wB4GflxMlygRlXm?bY-AnT#r>Gm)5Pp z?!2u@MxB82<>+4bM!`FY-M7XtJ@W;!7Y@?GI_$#MR|_|f)@-ioA1e+JDak-AJzk2< zg{5bOJHj|$!Bo4}^9Ktv@ovT9M@2Dng+Te#`vbeI)_g~)O$wpc8`F|QW_hs@HNOJy zzWOgPB@M}yLbU+m;wCdMZu+1hwk)_e{nmHp^`2>=A4L~+7EwbQwQ#vwzT>P5%-bLH1(}Ki4v(8p;JCX{oMz*io z8rSP>p=S}YTgn~g)p>6YHgxzG>-Ri=;00uz&%3`>rxz}*{O2P{{*5NKCh@y7;_eTx zf8pb-6@657m9<5%|2hWQoQ?2V@ALk(;)hMo(Nu_b$~Lbp^gWsvbG2*jh@KHkER4b8 z1xbuWevflKu^o^VJ|pp$wdrx#n=JplnuWr3g-%B*KI9FSu}iJw#Wo$s!TzDtZ@p~A z*v?~J!tBYWO>ORXP6-qH!~fIVr3rx~Hk2)|% z=SEs~JpB1!8{%+%VKO5<*DtIctkG|_f2u?myiEo|u48d^ypxMa)^Bo_CI1|_W*9Di7bu{%3#sFxtRr6fF6F6f^L}9YL!As z%rW6;UG{mV$93HeLB|HdDMz9j$4l-oj*@e?o$Atf$?0_cU=OK2o|^D{p`1ssR^zGR zx;6dQ3M1`J&?m5av1ucHVJ}VLk-Y9e!I!&BjQ3T2Z4<(Uof78!(bhZZ8QosuK-KKj zsGw*OjOe!(oIM2jC((EVvD6wfVL=QY;Wg(<*=if=?SZ%=)5euYZ z9#^-W{mnw+a1ymx2(;!lt+GswJRW?oWh zEm>xC7DJfgEhcYJ*AE?>S1A;oTJBk)%M}Fl&f*k!$s?x-#|;59wnN|wp`O9;L&9YDE+Ww5FVK%}cX?vIzH z>Mj_*zmveX&j<{=IX!5`u~#?km8=wgUD|*qJd*v{r>kC!H+wA-A}kNRIy7GzWQUlY z1(!uz!9JyZiBCt@dkXYV!p0^M1}6px@%nZqFk})BUh)r%Q%Ecz>r7Igb72*hcSSCNg(>s{4LK5m1Ejv_v;YINpTg>luLJ z=z!N%4A!wG|5Ns?+ps;CRV!DjpgTI@^SNA$mYzsD6?9I&ea~N2a-Z=;EV^+|T-tGwY0-pO{V?LJyF` zV4rSYw(K^JgC4!3kJ;d!qq9fBlMyWm{7EFmj}}Y6H1|GEET7W}guqGygGWGMI;mC+ z*=@kf_BFEJb*lC*w#PTZJoiW`y_EwN^+Q9&Ky_zw?{4v8TYaon?eS>=-hKOUiJs_Q zZdvfQe06?l$=A5_+qgFFQ}ton{quDR!oF_FI04Tx?Ud~4PXJ1~_H6rMoErbrt(o$l z46miRq+{^3{tsN^#C%Xh~M#DB)h!EcU_+*bm&{Xu_* zKb&|k!OBJ})E7qr8i3>H_P(?p+Vv*10gM}6MkHUOwf*;r(TgO(FKG(Q$E$CM6d_~1 z&$}rZ2x*%vYB)WHGA3<2gw>%GWtsadclZfDkJr+deUUmTP$@5+wc1RCI!vaGtFEmV z=shUmVw+27FEa@sxYdyd^Ijiz8koh87C|x{@+1dgLSOsu_1v-+tx6h-=f*$pp;56? zZ*&^jKK=c9^Pc3_D(hxJSAEC#d`a^b_-PD5xpXQJp8PbAHN zYReskAC2b$*C@x~R_L`syh?C-5(APBk21cWGZ04J!a7&rhpDHG}n=>I7(xYpNhhAYD?^=JBf>Y*<#lQcV z#zO&%Sj>Ajy`>9E|3|0}7nz6WbEuGzt0Qjo(G9$L^YF+^?yFTPAivwNKrLi_fn_)s zs%WWmlwXC0PgFc+^^V>|_}^1j<=rcm@p{Gvg-`)6_qhVeHMr^WaEiPJc$@L+1g!w| zI4XUe3HPi2cYyzq0CgC*W!wQS`tJc|dzu>D!=cb+WpZ;CQMbvC=zd<2Z?Ik*)c~Pq zF$qp=u3by*vXtId?pZEP0=M`j? z$efF5MyhDUcK&5?&^XSYHvyB>u&7!Kq^N2H4XHqFyQm%*h5n@Si+V!vv?hv+S|Is} zr`(PsizaT8jhkRoB?=Sm$_0%pE@+gUbb&o>&E`UfrAeE*DI##4Gm}Cwsw;ciZ50vc zIDH;^Vc@eXiX(@uLGJ5ThDQFuBB$|e_Oi9#1eYO-1Afe-BEd9%)1i77ofh7!R4~@V zpNw8lgOB$Wg>h9s>NRQoaz`rBL(}Gp6fd$yJbMtwSJ=h?yU5e`p1@ExFKK~wJ=R%X z&@0glgYLTd7(tk`^;JYofemft#f_tX@91JpiKBgEFoB27!#_#z)_78d4 zBEEz}T!b_v$iU6}G$>EJ2Wmd?EnP;4qWjE0PJYUs&D+cyCmi&VjG*?)snT7cBf-<6`lL>W4JbwsItKk@8Gydh_$ zT=1w>hZ4kka=0z_wr!K z8^x0d4lmYEuQ&7;dFjaQEr0GE8h1r51?l?Xi)&o}>Ke zTOW1_O4WYM+-Azd4c)%1he}PAoO`78X2OZ`+zzU+OsP`tIzbox?I2t|12X~xX=wQw zE06d~&nE>8*frlYH#caakhP3c+ts~3m@Cv~gkmtv@>0ioIdAnRvC!mB?kr>oP@M!z zpZp>y&qmQXDn8ESj*LXf_u6+QmV3v~`wJ+`*$FQz(DetV6a zMn06R_)R5QbBJiK^1+No_qf2R4UlQCUQ$Wy7n70tJikLr$)?M3IZQ>a}Le>kDFXvB49ON*K!K_uCjh7v7GA@3r-%t2`)ek{#`!j=Qm!E(*)s; zQX0|F)$y*92k5)*iyeg}Qftm+p{ESM{=pMDgchSjPEYUt{E5^2ryS~K;+PMP9RH=A zS#DO{FWf-RHV(^Niw2R+AK2s^+-VrR&*NE4)7#Z9G3VXu z`&9Qi*VBVZ+fe9DTZ6n$=4~4Jx$3fj*Nqp8JNG&`h z_wCi|Q!tVsZ{5;4lNmW-Es>}=+qKWhEpEZz4~VT31uj?>`5zC;r4p}? zPFSRU$j{W|+PmVCmz;oEb5XgL?gy&R{sK={4$~TDZm_dQs}?LOao6@!8APersGG9a zLJYy&;s(8n#OfEHFjR=r0!cUh+y9K=DpUvfCNJfcdEGHcWQ?3}E$qqG2ZgBFYDJ$cCUx=+O{S-; z&~knGA16PwZ#IJOZC>Nt=V45NNrB1gJNg}BqY^B|} zdcA5z^#aIQf|c(o<^B!FPtJNTUBd4#gxu`Np@&v8rR!@W1b`5fr>-QhwyRn)ulDCS zDlT>of5T7E%%5~aoppZac$G_?8UWCShwcsgbWd`}3A-1Vc(AA**x{#Wi2aDo8>QoH zZp)%wc#!vN^NqmmTalc|W87kx)2wzZgE`Ykf^}~=UjJ9)-TgrEyxymQ?UWTTva1kxv9D#fk!3CV*;IVKKc&YTFASWFAzFo@Zu6u7j+DIIL@kA zqJa}d7>RZ=ZxOo6HVz#|hdzO{`TN3;arijMBt!qGI6)nVs|;R?NR|6~(eyrbq9UYe zuzjzwo-f39f_dJHB{ruTAdv-bh;$w6&(hsO$$s?T9az`UH>us>uG-|zEiPX^Ro2c+ zNt7CN1kdG{%62of>$aM#GMN;x8_KVT`~3ig)UDK0yrh6OCJjY3CF0eK5oOA*pAq)J6I^nCweU0~_Er3cO`sZz#p z!=cJDCM4YL(wv>L1i%yALo!L+N9k2|ztw)Qy=57^AH0O$839f{T~4e7h$^zfD~!U- z4G-CZim8P0yvsLw=n&!hYwsceD|0bMw+EYbN|UxbjPvc8Xx}3fBC35FzNsl7tv9Bp zV%`k47kQk5Z>Bz1eztvnUBph{C~|ku?a6H`?O|ei9qQd{`>-dH$W+Truh#*m6>Fwk zYGw!byX8VqiZKxq=%o>0YG#38YxqYW>dnRUYm~B~B|C`EUlpn`!wjfy|Kghn)G*l6 zAJuY=Qdb8UU(Q2nmJ8^ma@CsvM%MsE(ubrIqLzaRnX_Ae97gdK3kNGNWT+?uOaK*w z28KAC#6vPe(K3f7c-M!s+ zCNWyp>m;@twr=sWZcX_epXWygq_~whM9F|``A%U*AYOHTT1e!hw`#0VxltG6c7ZX& zl@)!X!yJV@`W<>{Dsz9G|DI7h!x-Nb{~jf5^*W zo}PeXTANV-BsTty2pTWQJv{)L87BE9N_3TZ&RU`0xKG1kCauZC~@rCVzF z(C;E{M{ST7(tL<3(&ch20(_A?AWHV(ir~RA+;UgC|vJV9t zH!c>BQCT<1Erwj_V6TULM{H-@J;<|>)7_i7r-~JKLfacBw1PXf!Bub~o-W?hxWbRz z49jR~hfuP2q7S{E=a0q;Bw>rx*(qR)TSIw;aygHh6!kY}ThCi>wcaYJR8lOJbt7sH zsqVOCXhTC)hLI~9de#6s-iuac7zsF;7$fpcvj_Y5M#UIO!vcKeThCwNA2zXbM=c;{ zi4@V-h~wQQ^@H}zk}5r;N|SWuhf);kRMBuf$}gTuz8975tU=8kNroaB6fFLxn$~`n zht7|!?6@96dEVw7JXK7yqB*Qe0gyOAjn9&1Re?X*1oAl2Lq3Hmm&YVt){Sxx1|RpD znPTI8c#kT;Vy9}%x~7`B*bXgPDJB-gKm@Ib?xvNQoK%H12q0t``A9;Wqmg8Oz6`L* zgv&jTP}IqMmOj0ePj2cL)}ehJS-kxTn0)zX<$9$%9h>=EBNk6h8=!XQcbBNw@mjEI zM9B+Ax6xU{*gOouwP<`OZ$jA%GLB(-b_(T!WPmd1hkaADOtd_Z%D09X6PV;?URdm6_@pM7oB3~;YYe1)bs>%hi zN01aS7~dKt7CdLFn3@W!|4e|^%EH~3eVMx<8p<}UDsd$Kr9Rmyzg*X3qsS2SPqevo zd&&5iK1rY6lc}?lTe{o!M2!`Xx{>h1AQ|J@=TJw@!=qCEa}9PB=_zSW)vc?7y*H@+ z<OME1Qw^^w)#5Cf0+rrjYgHjc*Dvz89N6J&$`;CCbQB4vHGfT&U*h@qMCB zA;hb>$kBrL%^xM##3$xY&w+bENO~|*{T6x`B zcXs-)P7kMp;4l2X@I2zS4{EjVT2IB^q zohD{iWDUN#E{3mD`9;gI519~A)sqIxear01;3HIx$klLl8;Y(xP+fGVkCL8FYwMZZ zmx=eVEu3|Tf2R(XL_a?`ozhw}@ruksk_Uar|D1xX&U#s5j0fDg+X?_HSBrf}bVNLQ zwo7U?Y5PX7RrMJ{9y&mlpZ~rjbyipyk@8woK_%d>y*!%?ZNBj!)!t$nc>tBmGSLT5 z?ZkYKfIGbX5}A?tYbfda9dpo+Jp@cKhUSdJ6F<(>zM_XaBY$!hFA9b%^A$OE)yxJ@ zrz_0oQhu>fSS@azZeMiFkiGmK$g~3?QJWqriR+rARr5&dNF(0I*FOzTF=}~}cW90v zqGDxHuq`rUoy@$w^-~CF4#%IyG@|1^zubO+Q&FjrK1BCV;_o!^X{O3>#z1 z$h&VM6zC!NjH5{mYFt>Ly;uJUUZBH!M|tHa34>$EhLib`jfA3lEHT7N=PKtyHO~4; z|F-0dkJ%o`L}^dzD{@essMYfAM>?(fT5m(tjTVi9CjJVQp}#`K;9gDhIjP{2ze0sn z*YNXZZk2GQY2~tg_2*%?n@qcN%i>HTp{;Zld)y^zF|Q7`W@N}KN7~U-RcvUMH*N^u z$%|@eKevOSN|xX=`KXm`_CW(9zY;dhxHD*SbgRk@Uq551M_cNbctd*7?hbE2dBD7$ zYQ0^j&L_39#XT`?>d7x_9DmgE5s&*qTehfgXBy;z?r_dT#^9w7=PD9_{_POZPxd<=3SNnmM|4S<3 zRQozgQ>`+uB{uUGhhEy%YJwNh`*i`%W21L^`5GQ{|CFgWK{AML?m~FDla8`jY2Vy+0-0A5nqT3+3X^^YdAdF<;_FFysw{%TA}yE3`ej!0 zvp3=OFMnQC-b7k|31dfY2gNPh4bE=Y)i(+r6$RMNy^G+NWc2poK;@;}?G2(*_+~P% zjbJ>Akn*5{f?(De&!5`|mm|AQhuK#c$Nq4Wp8nY$82Bxn_qIGAcemDe93}w3!i&gEQG7Wte{sOk3hHpQPh=7T%&rU=c^_{hSY6!U;zsMfv_I8%|y7ovQd9hUKTe z3T=h<(2Evbd8++hc3;Nt@g@~1tu{q3J?Fi zb}!(!l%yWo*XvBx+3G}D9kWCt<8;E?Wc!WY8bm&W?5Ht8^P5CHyseBd-h^kBg!vcs`U><*gb-RB;`Fnm{5)1X_dHFaQu9C-P~{ok;z^)O9|-D9~-6O3(&R_!amJrVga$K+UzaSFv_q9?+~@uYiY9;fgO>{pydrACmR z7zTCoM{HQ}(RJEWQ<^zr)SfD=R`zygV(mrS+a|TzF0i2?zABWZ8!4}4t|Szrjp{ZZ zeuQzz`0U8PB&?#R^+S@823g(l&y8h3P>7}Nd(WTd)SNz7Si!no^3WGN?0)@YKx=fY zx(M(fgCoa`<}p_ds+y{34Wkj*p`{f_0VROu5^HJ!a4ow6Kv{kn8*w?R8G`z?FDDO- zDzF-N0PE)>2U?(2FGY1>wnr2u8xQ$g#FzGUWw9IzpGpSCV!@-^D&REVxrMZI{Xx!Y z_@2U`1UdE3sUTBXSw+|2H$kT9|A(*hexy2%|2-ku)gk*386i9K*t3L0wsR7a$V?pL zNcLVK^T^0{ke$7^?38)zeVk(*4(`!+{P4Zsd;f-W-tX7v`FK8`uXlc7cAk$hO@#g$ z)u)5jhf95<{RTSAuFc~hMoSly#m!SyiW0Qw%=p*n<*5}$7to$K!sJO><4EA_g5K(h z_P#fX7m1D;{s(sdL;mp!>`zkA$^kT3#eXqxe9bjS}AfZK4OgpRlk`O^R=ci<=CU zKLdZikLmO$_QKL!+}g)Hg&7RR>2YNaXtoGJXl4_6%07+`C`@;-O4WRLo=wJ1qap5F zJo08;MaXOR=KDrNYI@X)I(VdmN>FP=IS(9K9UVQ1jY1CfC6g552~&`mdgtSV1868n z$5SptstW>^lPnn^q?^}xJab#V_JLcfCS)fruWyUv9!v+ovGVL4vB~3P4<>}9vNcB* z%R;YZO?QcEcY=Y<4M#PaKnWYQCO0ii_8(*(^XHTG(4G!$lpQ<8YoERSLk`(z7&{D# zWr=-RI0D{#KfZ@h4Zc2iR_nUPPZ|2jkfTsQfpHjp+wJ%yptNY0_IzHc0ke5 z-}G4I!R0$}ciL$H30|-U<4#F@+35C!{nlg&WT;_MvO6%{0!HKz0-q?vex3n#zCwPN8>XZ>MLzG=54k1bPcfX z`@RT8M5`S?{{Gc5Yuj7kFDLkSYVoA7GQO0)u|a8?q-q{i9o^5t$+# zp~MN5S;X;_l+h^sjK54Z=r~Xblf{1->B91LpDn%Gy38O-Npg6#qM%S7`g>AU&6|aB z^PRtss@rc!Ba(V!b zHo$dw8j&#m7I>{zB~Q$TYok=0!qQCEmiVnZE6DP2wrEo??6lN+;$6?oe~{Pv{C|hM zFJam5?z}tHU-{&2CvK7wZM_h7^Olx1}?Sr-0`@P_o81Ko644%U5U*ec>nY`Y@~Hm z0A}+?bK;aUdO-c|@iRWFWtR_U49NpuEeKeuu?H>qblmH4Ql0cT&n`gA%fS*fFD1*5 z76^L|X5`!P3^QTrXv^vy)6t)hC%PBmI}b`*`W)|lPk&P&eZWz1n~}l)o!>~Yr_Al9 z>NjA0j0?hNy`UCt?o-~KUof?z$jjuJQp?435;u@o-7K%fL40G6e=Ru$g<-{O0ca8o;Ew+dEN6-6*&!; zwy&lM2+S0g0vJ4ND*bo(cO8DTb_;sK9r2^p_ELuWX6I?{{p_~EzbOPtt2$gf3l_593s=z7e z6eM<+x_&6G&#CcKoFwm!Q!s2l9h| zAJ{V$Jp}#A$r7aL=%$}u3EC8*(jwI|75qw}65)$6go|MBV`_+U*On#UXY3is#T1O6SA`w_fo!t84^oHjf{u6bn)Y&O31vewb*Tt zjH52|#?h63qt)!;RWF*Ami$dQPqmK<`)=T6uBa3uR0 zHJKPxxE+$?I$OV0IDPhRak3T?3}kKJTP=5s*7Ugg;=J~#iqroP*$H*P)<$$ zsrWxooVXVuzjMv{UtUwF!v5(DJnPT7_HG_~Wxo@7dbDiQmWXgLtrOO!$H;tgib>Y zfguL6=VxGk7V~dIo!+li87upRC?$kE@QIs|<x912)eZLif4-zXnKh3R|L7gzTC+Y}MqLTGXKBjUluZ!!lB&tPco z9&(;r6A^$P^46F_RJN9D7yR&0JVo~f$?b#4z304ODV5ifUy&1ZJ(t(+5K8P2A_5N;zDS0>9c+O0!|M2J%Tla=I+zmjjd1F z8KLC)q;rwy1)n|y*v4ApZ3-!WP(Yvu`Ee;sS?5Q}aKH&23*aswgB~(S=G*A?Q{^~P z>Yme0C+p<^vDp(3gO~76f``}C_}@{c?b#)s;U7SMS_Lno$5Fv}U3f;||&`6D-~Q-0QggQgO5UQ#*4n))px|9dIixzxvsO z3O#NO#{mD`l=xsC(87$3*KAH?rB1+^9+ZiCNKZ_xFZwx8;!Y2gW_83qjo#Q z=%ors&lq1=1(tc#qk|M%4PbcVRZk;=e+_!TvmEs$Nn>N%=kT)pocI6=Kl5Go8sg;j z`E*!X>d*%;a8;~sg~&*XX~$cw`^dK|uEp@2BZY zq=jc3G}N!r5mVOd)r6UWE*jVrAFABtpm~Y;NDZ9eu`NDIT}M!N^E7WkwkYeX3PHqe zG)Y;CM0%I{K=}8wrS(uDq9dXrRZ6c&5Ty}GdR)kYLLM+PZcT%4jp&B9)jRn;l1#1I z+MA#!)s5c%dwbK*Cb;)97ZKb#-j$}TiIrz$l6EwZF0JwXBv2tqfJEz5OM^^_UvR!{ zVhSd?4orH;bgN0)%i~7M&gW^~yatx2HL}<2rL3GfYm?hc!-YICoNAE1Y_?Us^=*@= zQ+N{O=~4;RIpC%3ZuklIm>lPPO`{ad-^;ooT4M~af7`Q-ww!l!j1&+=ID$as9*M+* z`Ag)k4OiNmt{@k#0iXNZvI;)vKY*T~5Am!VXQ>(#5?-IR4A&|Sgds5=ydf`6J=pi9 z7Z&80s6WDcjb~~Z+xSn#SXCuQ3 z{VL)lfhZ52h7i;4(GsY*qNYJ}s{&4*Kf9c4b$uJ;K)Pv8_l|xoD_u0 z_4tFu=svrH5Z0ZPEYSwORK5e^BJP(*;l4QH>7IS zeYnx)jdrE>3ZN+A9zT@X$f3W|!A>LNcsQEnCf(MVU4Ez=3egluKJ(`7tP%{aB z^ZR}GLu0D_UhJSV;l3usd*38mR0PQfZj2LQD_uryRv5L{Ui7`ra&RLqtIV(G4-twq z1O63`^u&u{R+^k+XLc@9{VA)G19IwfNLj(qC}yUi`XQ-dS_gK{hJ^SRi|Q25+ljf8 z(cCr~9@n6rlrh=w2Wc|Aj0X+-VV+!aZD#J(_+^j8p^@^O>z&_Di1(X)1W|WCvY78a z8M&E0nqQF9=;M_G6?-%?q9gC*G`^pz&pW#9rYWT%;#>hMyK?FND%Ip5C zg5|j+`h0%SrW|Ogm%qL~3dC2ycr;kLN)*FBMjC+pr-`9JN~`~=iI?RyIiM`h4`oED zC4az2j2Ld;esrTa6y6Q6xr@bJqMdg;lJUm-7(|~$P_jRahByV%Y5gd%qk`?*MIlP zjKmA$@xw2Ic}D9zy?VZnbK*$>C7!)P!iS?ev5@-Dd%KKqs(&tS{r_}v@j98t(4SSh zs^Mp?!tCFLX>fP!1=}IT-#W#qoh=fC!z~{!r@nD{(h)k$+oc^+ZFP=IPth&seNF1` zEByFp7>oeU~9g@fcXMj&8>1M0`!|c7xptS(dchdw?o-!%hNic?BAT)-c zmH{4eS01t4``>C=ht&$q&2&0j?z$h(@}f!9d=^Y+!3sACBl50Rmsh`y>q(#(PjJ)d z=#a#Z?f#E-94~adSNCp0Qkx%;+R4WdPg%-+BTuGDMZVG^C-<#dJ2N69*1QRD>38UK za3`ln@&|rZ%?zj4acA*j7TRFfT_vopp~b(l$%A=P@DQvebk(rZ$nHS}X z3m>Mbx&i7%cNB*am1d~;79Q!wJ)rLd8XFdIrZ87lq3IkPMCud`ZO>ft__yt$w|d~Q z{c_!ZQl(bDu!W6$N{YeGeE$31xGx4xHx%we<-9G1mBBxB{AX#%j#lF@*#nZ$ThC-D ziwUaJY0CSR^q2RMEI?)MolKoR1v^~BN(M2vaNF|3Di?A@gHp6a+Yh0TN~x;$1VhiQ zt<6i-TX}~+&`10ajtc`GGtV@po^ON6Vg^^LDhlh^VN&G(v zepmhVi{dFvzt7zEHtNj^mncy^p)bx*jf+;H#JG| zkr*9zF{-v6M1I!P>8eg|rT{$i4$Y^SE0XK87ni;sgkfrb3 z>L;nfgg3{l=}IpV%E`o@sP*{=!CvaZW7`v6grMC;x@5lzoiKy@jF!L9eTcIO1ZCZF zqa;_@r9#vxHeIeZfGn%IAP=A9QwXaP!FgeeJOv<@oF`Hdd`*$BKWkD}=9D_w6xeQ% zBgT}Y)!~5*U33IxP6HX%UPRov=dMv~f4|Xz`{gUfIir~s+X8|w=b3ej;q)!9*(_wwIeCVALy@AbomFGE@Jz;kjrtD^%I?Z)?uJeYFT%RjHe613-+AjGDpv? zhH0N={?`~gC&e)RQT>|jaPjQ>Z1&nf8~Lu0A8hMO4|+AasSg`f^WLqj5}Xp>{#?Ty zyEBgby~T~oXxQQhTiRO>O)neQv3MAqxcrB* zc1=k`^d!sU_iFUk3ohfrL~A>dCiYk9GkB*7S+*5$J<;|5P4vo7b4}M)q7dT7PxN6p z8`$^YRHO&euas14LeZb_o0VCP{+N%oPX!DLjqfN>0cvg%PK+u^XE6!oR*3XIa-vm@ zArS-gjMX_Fx+$9((+8r*b^!SmVIjDBLIK?R$?9sOt8umac4f&zl!ni^yk5sd*fjrn zeCU>KFJ5d*X3AKqe(_5(Vy5sZbyNbzFA&n^hYLj&`;d5_-GnSK%wX7ur=yO!-NybDF|~DCc{-c zP!Z%J{hH78{r;6*^Y7SYd45sA2+Yk>RN!31xBKC=#%@(;+F^l^7gMEqMUiwd6Bzux zJ5!C7|0)B1RlBqSqMjV^c^qN-orbD+gvnZBRO!9zf#eS>AF$y0MJ~0Mcbw*hsBX68 z*cXj8H$M@3R^gcR`9QdcVe5ySdqCUN9#YW=r8*uCXecGcg#Xg-)pnX8G$(eTz*V#Q z?Be@bieKHSBAG=c0k99LVcp9W6Bv$D{7_dZIeRtpNM7&dxV@Z`$L4^2N1hNW`Qq1> z6b{!Lc;tqE!mH*+0W)lhFjLUJif=&z_Q&UkM8yeS1q!K>tUL)l7C{h|L20M4##h4P}AUdZp*r%%yUdK9H);ic%)6 z-)dWb`F&EuWJidr>u&L|jN+ z)S^k9R3=L;{p}%t+(1w;p-ZU;>1mn_^rZ{V*D&T_Qn5bd4{me4Y7w9s+I=;F{qEz_ zo2lB)0A+TI-z}S}3r$9PbJN!jQx#9IZs#x$0SuDZjC1_iYXQB3)SKZgYkGT<7a%$c zLY~Nk#t7R)IJ>iw{!KNBWOAW~2LV^ZBbQLAhB~n_E0tn`PBHMuuTEiL^;b3Oik$h( z56;j1gMY^Vhv>!yEFwd7F?=BT&jFEf)ZPg{Zh2vaIwsnrf04F@3SBgiXYLeQovy!u zN|k=SeKqD`boyWty{D$fF0u#`!-Twz+WQo?!#mO=A|Cjv)$ra8kdpgVlP+E6c1HO& ze1T!Axw$Cy3n^Xc4h#>3N`5|IX+el2NMqdl`#i&@ck2Zc+zYlSK3jFt8?VV3HqG7l z?gq(S+f?HuQ{n?83bL+#8g%DQ9Be3OAI6gcx~==pEAudoJD^S}Fhet!t*; zYm6;2sr&<1^VUPs79{O*#jj+LpzqINo)SS&=S`hwk4}k2Y2J}Ps?6IHn&f)4HmPp9fjNY5Zmg?r?8ceEHih9nAZRbmXqBFEb*C^syZ`U zt1bcpb&$s9#Q#V=Ga%Bi(snx@3m0r1ZRFtST~aaFl@a48uI%tAzXSGkRmSKawMANu@H8ml~JK$1va^~lnZ#RB+8(b4KnwK-ffAML8 z@>n{l*yQMahXHl?l{HSWn`V{mEZ2|4YLcygT+g`NabcFZ29ksTH`dASSjY=(Lj?|9 z%0H8o61XqHwX&G~jW>JRjc(S6-}Dm~%zF9mXmNzXhOP~6+69LS0MXj0XPUmbc~bNp zK^Qu+oA#!b;~m&qYfBa$I`0hsLPBZUEXPwelGx(43KH4(0V5{fHm!L2iw9kh)T z>*i!j-5KeqpqD*++sUJ9&d#8UknB7JMLxi!PMd=~T_P4O3_ZzYGpk$`f&t*SVyH#HI44`C41QDZSK?!DBJh#duUa!C7ytA+vdR!!mI&Z>L9x> zx3Mei7-(3DC#PaZ4rY)Mg%oM-QfX3aKACEvJWt+Bxyxv#|0B;1+CJ!`*AhPWed&_g z0XG)3yec7cfipJ$IGpf-()e_uWr)*adZj2OHGApcY}@Axq7Hw}SyjuZS^d{8fIbxp z%gW#6G127o>S2h!01RQ&hF*+Yh*n3nLW@L+pIhGdPi)XgHfocP;x2sbMQAUW+Q+)- zw$+O$jgDhkc$LP|KbIdCr+K{4xZ+{v7dt{3REM__HgY z>i27fRR8=Zl10mKWG*?DC&5FKCM3kw`Dl>~*P-=(4&qJcs}#{Z86mJGMUw>`Zi~g* zCrgrdTV2vUBgQ*(Zk_sddG^quUe3DC7Kdlb{4%E$Rvj_PB~CCw2r161<1Vi}rGw)W z*(kBr2_-Tp-wi+&s!LSk4U;D1*C#q@ySi`m(t=;^Us*JAl`^~p>AT=>(Ay$5JyodW z8`v+2jRWLX9DjU#gR`fj9IRv4EVdR=dKq#VeT^YYjiBeXuFJE|o58pz3O($3vzgqo zhR(ALTEWnO9cCBqJ>$bih`*-3@zSi_Puw4y%#n!v$@<*Nv#yk@+c+`2T6%D@a5`=2 zbP@fF1C0D4B@cNiW<{8LDqIIo3&>u)#R*}E(s)!v2T~Z>m@Hx2PwE*uGs_ab*AhO0 zarYV^D!G+|>4QEm^fLO9>^b%mzQ6{ing01Kse55P&vz&}WyzaxKj&=RzN7!b{Y6|$ zxYKHOHP*kbUhkMPk8RG#{lnK21c;$#;k2?mcYEhBjjdVKyfGhpXXEC{Q}o1o@4nE_ z+k30@YpSB-37$4d1x}Y&Y|wf240O($Xmd{zY0@4_^`jt_*S*kCcZhh_F=W8Skfoinv$nj|=73^+EwbY*dCDZ;yBFBtUM=8?9Fxbf&#;A>c? z<$XBQz2j!2?z>Z~oNvr5j|(6s4^;$@ijIQ%ktQ$DJeIwuF~oW)!0y@1Y#jb0F)zBm9B zz=33HZ(l!Ejljp6>Q#oAUnI0ZpZa>N7Ak=(gLq0&ldW}8nG%rv%=Sd)r_Uw)zb1ow z@@$}9PpJz~PGrfX+&@+w+-PddR5(k4>P9HB$`Y|8ZG#{0eXjr%cd{lBiwdbsnwK$8*-(Z$s%RiPG zyiV=o{qyp-?qHcK5F48$6cwD2L27)b6lvvI%fKe`Y3VF^%Lo>2N#keVU3+$M6P{~2 zA2)6!eskF6mbl6kV2Ewv`>6>vEmQ?fM*UNAk2(g7HQXK;Nqa3$Wf|X=#FG8U3Gv4l zycQ;9SfD)H?V?qz>w1Yh^*5CE6#cw*CML+UMaUwV#M%u;iaLde#E{>=7nhH$r#a*E z3$jge$Tw>@qKlLwU>6+4DapraG=5ToQ~rMw-?9Z~Jy%uI0)Lhl6pn+uKKR0Q&6dK7 zLtH;i3OcJ;QkV)_r{n?|Eaf8I1uyCr-&4nTexg!cBV-Z1Fj&O%2dg<+Tdx(p6lUO) z@^E_N4lXa$MzFfl`pF0l-u`EtYMG}LqTc%S@&=Y5f|-jpyGz!rSRpv_1EG}=ksPlW zm1KV?{Vg@+!T0z-x>mY##-SEt6w(XW&Hh?>1QaTBcVajbWXDTtDC^eDw6T-^@j=SX z_sx#3O^3yjcsEEq9Wr{}DOs7x1Nf+LD7f_Vc{1xxY+CSc#=`4z_yIF}#W(7oOW-A|X}N28|^s5sgNI)B>4&#pT|* zR!<2<+Wk7sXI8d*98;n2wN!hR5O1%;*T0473I0emjGnfaq*Kj7mSpJcsY zNq*gXUsQKF&NGj&in>%FS~&|-rho{2S@c!{fr+8NTQz2!oQrP4*x zum{}@$Y-Ox13uvQM{{yM;07@nMh%KDQGRD;3NY5Fjca*No1Pzz@E7#`(MMFgdSRn< zUyyM}BfAx7 z4G%>`B0|nJFF6&w^pXp@v?*LgXSRErk#tcbG;*9?@(*tYKgVYU2e${rtR<_zQ*?(1b?`k#ISfRB5JmziCK)@dFSTrG)HrSu07-cgGUR~}k;iBaV--)T=aL^(a#dNao z)*HXLo#TR4Q2}pB!nxK;_w+B{6v`G8wa2x@CH8PqghK1n&!i9XJqbhPnV>4~))eSS zsk0@43C6*JZyFj|&CEAAO~0M+UW+8SLMcRBT2{-Jf61&O)JN>R#r;O z0}C(iimus(u84IpCqG=;c!-W0B+@lm`bF+1_vom~0?3WxbsC$C5>K_g~3g7(x4InR~ti+ck!8>o0wnpj4ZjjC+#=u@rYJ3*59C z4IXpK1xzN!KC<;FOi0&zY~-P6tYlsA==S#`7e7_fSsUu*kX3bgUE&i&_P6Ha z_34l(L|F(a>C@i(Sb+RMb%JIe0`*HpHDaWJ;1-kt*z9iqd%=^J!}*WsP(6=U$Lh(# zl!BoM$tOWsaTm`y>-M9gA6I@au+^ZRSd#V`GTlBP=7z|lKOq7ff5?#BNsKVEJ1zpS zUZ#5rVKqLSS_woX|3c?*fUKG8b@Q3`e{DYRUKa}H;(3bD4TmMA)34k3PkJZX+D6fF zc*MsaVu;R7WHGnwiduCLH+im$H|c7>e(wDIcdBK}$Z*)8V~2={ZYBL%~ANTED%K9;K(XG|7a74BETA0LlFpfkpi2X}QM>q4*NO z&+0No|u}h?%#3)aC`Z|JS^piw9R&CH+C>L+P~#x;F+Z#8M9kla`|- z2g3jz(v7NyjeWJ~ap+d0c)(pFUm)b%VBYS;mNQh>-S@&Izr8(fbW*WXtNs}_C}62K zflud(W7<-@<1w<0sI=S9c61uYaDkDXD#?EjcBDXGv zM+VDo9YZGzj8n}Eky0$y>~{;0>>?}MDU4sGSjG5TRX==Lw|e_H6oncZ3Axag&aG4j z!4yn=NBSTyns7foPN!e?@t*nkjUe5dM}1~v(RqA*D^AG4G=zQ)=*NnAvL4LzlL3S; z-eL4bGmr-ZEEe30MbP3i9`T1Y^np3A7sJJV<6XZQxtX8;7~yr9Hlrah0}m1M5v|#* z21gzSk57p2wbqBFPa{s>Ww9CWnpYrhl4m*+Rt4lOib(G`zICZ7UsLZ8*>DfYNqIiu z`S6E?eB+-&-k7tF=$nyjks02uuE^I^TruD!)LJGNnkNQe+Pn^@1)ZMwGgA_a(qfOBdhn zXr^yA!RXisyC5BDEHf)3RV4R(DF zD>rdkz*rZ8L!^^mcMD2mz@<#ciXkR<9rMbmQVHi;19)sA$JTVbTJC{WLT#+;GYX$$ zyy=5W7n-!aQD+37W}~_6&8Jk>2Eb*+XIu1xVbIC@(}bIfQ*Uq+U%9s4$6BrE!u;2z z)+}W33H6CYP@;w#tL=fpqn7x#6y_tIqTyMteZU^wY1?(h09HQs5edHDHIjWes%IaF zL(A!ckgDIIfpC>f14l1Q8zD*X1R3%ah@CB_47eql7T z(BR6+;=}0X9&%k1R_gWPfdu_iei%CY5aXJ3%NWHTd7gu~mGEuSNc3)@WbbORukI4U zlN-q+i@8_7f^hl4{U!+~6=BsIG>vvv`|_>x?_Zo3ewV;`x+F57xmBe9Q6J+5y)cV? z=JOsp*Qi4=Pu#J=4|L+Q#Rc&j6!5cJsN(T<+64g8(SalO+5u^rp`U9c@B?iIP2R4$ zyn@-)VV(B7jW%O5a<&`3-cKN4FuLv1F@AWHTc>A*Ub+W*h@S4ato|wCYg{FL0fkzg zO|i{?sODyP@jCt#+q&tACDlvy9J4fD6`Gzz2C5AH#of(JHIy)3b2m@b#>;#6)&G|F z)7wb9XRCK=cK$1sZq_yF0JrzW*S_lA&I+z+--my#pkm0$9-VP0xxktdUGwnTQ1Uz5 zXWdo#rp5I2roY2|>TuS-lREhDspG|`l7}hJBp+17*9Lj^lJz?`i%O>VP=F2z+FNg4 zPISVrw7dy_F_?`9E8JPNX)e&Zk>a=8S5R9NE;Yv(Yy zRZWKpNEymPa^wDrj6)KI?w?-c^zP!NlyIwq*-=mP?e%+(WfZ_a+|e6Kw@W)M7L0-5 ztC@c1DtB=l_PAqdv<&$5E)!r`(V#}8=A5%Ci^8$JGB;?LNlNE2I+rLW)at})d%Ayk zW-DP(CYjh&u1PB}st9dS$VGo0!Pp4702E0M>;04=@2f)?nUcu_{x3FVzePw(GN2O0eY zg{EGM!Is$3KjjDc(@kCzB7UqH#%oGRwB<6t?kZox;DeGRGQk(yr($G1Wl!8@{qqI zNvp};_Zw+U)h(w=B0jlTDjFh#cWK}V0OcGrY$<{&VH7Sa(}TDHK0B+l{U!&{E_yhF zj;d;lp(^c(yL>>Z9hror1?Q#2bE=$ishZoWwC=sp*Q0GJ{$Y*@&UL361=)fu^W24D z5rDEmBQS^WZab>D1(NK?+;P?oO|4~Pqingb_CDS1p$Qgh(Fz%n9%YXwJjC-4vIwP> zcL4$?dPyDb@jNAB$byVfhMqP4JL=3fh{G1n=#lSRkHFTN^Pi=R>lJ3b&;5**vk}O( za|0p%LDS?{x!vPsUP@kRoAlJd4}PIh;u@er81R!Xn!ekWl`bW`4py+BB!DY@QPYO=iyhm?lPK))~GT8&5Dffza zTAfZ1eGd6I*NM4UK;s)drwZF7JyyP}K)mn{m0t=?MUqgS1+SI#;#nPR{iyl+I9L5U z&ZVzT@asuFkqi7$dWk>lZu+mLL_O`KxOc6zPun#8$*B3=1#vIUx`q%TPqH|JQSe}pQF1HeD+Kc!Z)qx9yb|^jOFZ=}dE9M*(^Q?eDMmfJP z;LCB}7Z24{GGBj61pz58)k=@t%=Vc5=8fNtKqD{U@uY8qS}&e@Z5dgQkWh<$ROwf_ zbL2Ct#Tu?!kG#WdeZTqa8_uQ$u_|;v8tq9XY`vTVj~eAlu?uI}lsH~_iQTnmk_9Cp zaE~)nYfu>ri5{mHOQj+R(*DkeY(?w+G7C6qKGOOWgKjtI+TR>OrfAIbkNPVq8I|*z zfP?QC8}9H>sWlN1g)86G#+^$w0($_=QDz&zJZP(AfzbC7A7%d6nxC1h6gwivS^pDK zp4m_N+E=qmwTgq_zm;M0JMwJ!Ks4h_o8q9)1IgOk4sRA|YKraOo0;m;RUyCMP>5lX)|D zcjNPq<6$hX$c#C@b0LU7z<{7G;*Ck3z8{E`~BztcBT zP=S8M`8#5rfi6u)?7>aHEm^CdWCo^|=ksb~A3K`Us}mC*UVl)FV!JYz18cEzCNd0r zjVHSO0L4y10`jUe_I}GQ!P_A}LKNnz^8JQ$)&`RLN1Uv+dVY-hgeOPG=1Y1=fq^i^ z)p@#wLF}ooh!Bmf0~!SlGZ`?LUS2y_U^d+E-%p$+s0x-*h1$g8Tl}G!c!@JT$w-M; z)c*5-8x(dL&sKkD#JY9d1*c!O{aq8VKx{i|UoB4qJ3Y;}@*yIEUoSW$N$ZQi8UqBSI|CR-vGHABB%PPVl_KChPl z0;eRk*XU@P2BKTHUa5g$RC4rVGbV@|M^$Mox8)cJG%i$VQ!62`EHYvKyZ+e z-_7_Glh&_-+dfU@p)QhGnR~f@oXh~BS#elqq*f2Leq5-T7GNlO-y62mb(te)Ik|S% zO_Q+;^xm{Df2CNTW@gTfYjEFozqF5VvKuuoBxJK4*5m1s2sD0AQ`_t-kk{j00kV!A zTk+K+ArP)L{KyPF^x9Usw>Q8s%|`2z+Ohm)2S5$|{?`ceJ>y=*QyPLtQz6f4(3}U# z*twCbk(IQ+2- z(dIC0BzPyX^#TANO;h;ls^xkUeGIM7|+L@EOs4g1Vs@aeO}_bP7Ef2NfzZqFelfn$+dg1V7Ye;zrrCV`~Wgv-;38!%@Cvaa&Z!buNe%T?*MZE z6Uh(Wv*<-b6Yrf}JLx?xgqpx!ebsrM*Dm(_lJw90?@Zhpiwt-YT7Ktp8?t$xKkw!7 zxG{5bk){@i{Eb^@jK^XWQSR{P-u0Wxh_{rP`P@(f;DAM*6Mv5hF3P=O-8zcCku6@#g$es8m&d zz|#z;X8)t!xTM32BH8`3+srtzlL{D#RrQA@^#tFKsbu z(1+aAf0I0sM)0m6W(YRe?@1#l2Lv`@3%~B3u+=5}b*>UOhg~5AbjWuOH_}eAms1Ur zuqT61n1e&%3gr;tT8Bjz44cT(K_kjgGy2MzXk4Q%jgl=^ysO{y#r#ni0oanK|01R_!Y7%IJE z2WJiXgTTq0C4Uyv-M(p}Cc^KKNoOjrInTG;wDq8olsNgjU0L(`dP+dX!W6!4x2DgX z^PPaE?@olTj5IL3fvG(JsMF-p(%7_7dd1<>4;(YuqVIvXTzHnrjM>QQ&6S#UZE7X`R{yniVo~_lZ|!=8f1QRMIP^j!}w~R7C;^~_mv=mlmOz` z6Q7vk{w1(F^VmBT5K2sesqm!J`PjCO>$rPFd>?7N9~XUx2P0~6G9(9Oc^Le3*yU04 zhv+h|ani?7WzqQu@Fh$9Sf+&FBW7 z!lI|K#+wp!41Gg$M0Jl#B089Hj*4*S+i-kob#Iy9A0Z!4Up|oVev0xJ7i{W^unT?&wSk%{?LnL@@xvs+b+-#I zjRP{8a+VfW%C{uZ`#+pMJ~hr|)!vTBtKdaD{64;aUU=ld^6GTa%+V|V(r8$aZtK7Y zVqMssUjb|Lf3H9+C7@grKlaSX8@Ej8Oy&lEvqW+eUEKU2f4^)Hd7~aBecMHQsJZvO z?*#loSdYyn&&6L5dR+wjF3(^TWsFSvj;7Ncv?@x38bHYo+dH&6B3iI&6S9rlWL|A= z)oH&6fp3}|H46`rwsUZ;v?gXAE2@bk#q-g85`KgImfn)iWVs%Tu(7 zre-nENBm>l`(pS1_ssgWKKe@fa#MGvXKXxTRjYR0yj%P~#c(Q18Q`=(fZ51QBqV`y z#V++6(GMZ>aWl&-{}aPXumJ+^5HIfCbQLExsZ{K_$%X3tH1^eJmCa5OG1T;HJ%i1r zLs21mKNFSUM+>LqKUqcGfVuig2??=eI?z>MZC+I-7_MZIrn`=*`YwGvN}-Kb%N#Nj z7I_L=iBUFgj2%*$co?y@xbr89;*3rK`s8dXarM@LKDGSm;SvhLHqQpTdLq-Un2OIkd6%}nBzyY29d{u6NIrm1U#tF61G5&XiuLcfKSRWc6MP??IXik zQS+Az4Kbmj^u1L@Hesr_gaY3p9S~0K3A%V^1j}H#Nql0x z`Sv$#pJpO17`}dkaC~ilHNyby$hRViCwEyf>e;a$z)w~{w!PS_J_U{W5e(;?2ohaW zxaPl|cy$$`9V%A+Af|15yzeLl?i3wBpkG-eMuUCi7n8C(F*GzS_F?}A7e2s-YdHCT zh$7si0tEhKBnW2`zuFwS`3Hw-F!y-ifBVBvQHjq!euR!gNpm>1#f+}^?kw2;FnmR9 zFO4SH+v)wl_dcWFzoj%OI1(~)$ENR0=n_=_X_sk9wM9qVmv}}uB1JQII&rp|LDBKA z>2|Ujw74han@a_Acq>OOFw1@~kZVV*CNSdbZXf^tLK~B-CkI>gTQ(P}IP_!fF2I|# z7%Nx#36W^ih0Ef}rDQa95#(}f%=ywsG!Ub!aEklODqS9*Um`yX{CKjmdWD8Ny}FQ5 zOX78KmQHc83K)h#FS$ z(TKmr_<%~&F5&FABr0&@2PTsm#cD`{vdz4_-}Ymrv-elXlLYZbA(9GgkH@Le<Iwq08Zkhp_lG1femcvZI=wE;LQ1v~@|R`~|;S zj2T<_d7h_8E1cdXRtlNKE(Rr3Y5Y&Iy9(UQxdzVTFRy`f8Eo#S(X0FakOqDX554y% zv3Gp3hNh=5tLSN%T5-PLtQ=ZsLZ(kmvuf{oBDjxfeRrOxK^&i?nZv(lP%!tU65Sn~ zXIeOJO{%FmlA8T&|LLh4k?AMS%kbtlY(E^zQ0SxmMxVOa(8&o(yUYJtPrLWkiF1RH z4%3L(zCh}k=r3Xf_p53Bov=ym1gt@?p83cGZ={F&`>+swzYCA;4tu9d)IOXKAT_tK zcYKLTQ&?`@YD3M*LC0uH@$2VIsyjDtF6?Q{(yu<1&*166i`?*$cM*|bX7WtdA0?r? z$uQZS_rAN-ALoufh4{Qa2nZvvR5V51c?E4%Nh@kwCaBF4sLeu-s3R!LISo)Nwljk310$Sg1Y-4FDz6M(^7t;sxv$cGGci;v)jxyisRzzC) znmgqcE;A246N7d&U(Azk`mvPTd0KS2EbBT^Y5hE1zWLrfc^k(nA;k8bmd9O!yGsXmXj}uqAq4jT!7ahv-QAtw4#C}myAz;s zch_w)Gh17=GrOPp(#5~-d-r$Fedm%(>2eZR`Cq0}>ZhvA6PZ)2Ie3jqU|`)n zeYpQ&97nr;+acnZAC53q-h*pu*uc>3Wxw$WYBg8PG60)e^&G42Td&pbpVstYxwKJ+ z{jz=2paI>bgz$=#*gQ8s1NRBIRl7j5M!g0|{pPsj<;Le&JoA>%fJ?udvfe`Ng?uy_ zWG|92gaQlnBTt;wguHOhn5d!CJj8$ZYK)@GKKal!w_Y*DL{I1a@FyYO8(H3*MTkPDYu{t~}-A=a}$Tuj_h5E)hM54a8fX}sroy$Rnt zo~Yf;?h1;~vn?RT6Fv0*cqt|?iN=Y}bC0^u{(@6s2zG?0?t7%kFDF?Y|E~Cx!wjQ( zZMuvKJo}WgQg_gz?;72Jzbs_gq3Dt~IT@F&=Pfwa;$b9>?8p>udu4v+@02Bkg#fAh zlqv5P!Y_R>i3~t*Z}yA1%MZQR;=ozDS%+ymBC>X_3~wuMUygp3HaJNhlk7I{3->Qo z!jICO68yET)|7gwG`sosoDiE`kO-DouQsJ_-8g!ML$$kmgcsCRBPH2b*~MV0O>TZr z==b&CH$6{FJa{ybVJvMt5U{;{Pt7g+Z&P!ZMdySsO%7e8=0*!s7fTCQujq^(t#0p0BD}e{5h+wJU z}GcKyJ+8=RfF0x_*A&;&mq9sSU}_C!+z-Y!ZrTDz|g+n2Ls)lA0&@ zF&#W}H_Q}>FT(`~Q?GsF1Q5;b*Pqg5q0x%Gm|w2uU++`f24%8p-Sl6-8O#-+xNe;g z8H2mubyARjt$YL6;nkCWp9gm}$Kcih0wZl>&#Bg;4T9V9qkR4Z-!Rmlt#{iC363NYF4~9P%-geY*z%{|bI78Wda)47Z@i{` z&Y%Q8-qhL&d;%Q~+M*ok|BX2Ci<}XuGK?IfO^A)nR$Rq;3Isr&h>@&s1N^ zqASG}35VXM0afTD=nGuk^wB?>@ufU|v~9>dDDkLQ?u{JLA}%Z_nzVkv*zLPC?r?l= zvdc&fOiS-Hh!b3(IU17C5sRo~fT&KEtS^pNU*++YxhP3zP?v)e{%7m{zv-1l@hGF> zMw3flAFVE#ug{Iw2EQf(O(@Mzbd+hRo5AT0$*f12ht4wS$?~b!)75$IMV$;`A|y0a zkp!h*hIA%|d^pGq-`q%p$IfUQ_xiW8-x{J>kPz2-xET7!IK7}@bRUFiU6*=xD-S0X zZlAI=^k0(D<1S@Y&$th3K$5k9`0^2CS!76r# z$=(3(cDbwqx3!hzMrT)pn{;78{PSe!{M-z1UV^6Ztjf91LC`ACW~n_gQ+%DJ!>K(OFiVx89ZBS~lDG{>S^s=-}SDLArLnGucKxqVe_hKTGCNIky8q=Fex>vr@S!b{(C9Z|51C zh(?5?-Ld*1KZ$YaCvt9_57mSzik9RSeE*N<)g%jZGihy=r!j(5QT^%NL`(M@D0lC( zoyq^#Y-csXKZOxowY!yFP(Ys8GRN{E$keVuNmh3SP(;A9d`4R(fbl`N<2T2u_m-~! z2_+GucJT~x=r<*6)Q?8Az8t8=o}2yH`&Rk+9O~^sjS$sk`Ml-=2*YHdatgiZwO~ZQ zsJ7U7lHaoTqx8$EMie%-`b-HaYfKG5LrK+`mcJk@AN{^uHT-$A<8~eiy~yr!ptEvj zgOlx37h3u0k$d?x?8v_fZdKiouX6=^b9l`yZ9`}yr}In?NGE3}wV)noC4sM{=pSnZ zDX|c|e@ZEms_rYE1IYzYP1(l+gByQ}90{~}sR~7Q25|_1hFpuiV@7gDTkk{R|M{_p z0;}k28!Q#0`J3TDE%b@4-Ltj$P8f^qyR?wL@d;9MY4WZ~9^c$p+N7qeAQVlEC6+58 zubVoMo%pL6?B<_mQ0B_vUKI-7X_50GMhrW6;cVl0a$D-;pmmPX5Mi<-_P0)!$rYG^ z8(!Qh+Qg%8bv0Iz+3H=4Y_|TyR8ik;Z!iS5m8qhs`n85s{w0RFH9l`kPigV~zw^SH z{OR5EhLeL$D;saB&StJ9yJQ+m`aav(5Oh@-k`S+LI72@MbmK6CA&mt@J|k zRxj)KwyO4xqecvrnXmZMDE6{LlO0gR|M5%Bg6uv6@*H(1yW8i{p-Zu`;NpL_Cj7*s zlibn7UGABgRgDjC0nIC5rWK^H`x)fcEveI zn*F+S@c$H|@^^*E1hUn=s*Ccg0ULVhc@({E$5(zM_FsZ?TJ3-4dcbXKW|umtmjOqp z3NAQ7;j+W;yJ@aA`v+vS*LicVYlns)A`rH?*Oj_F zRx}obcRpU?uM^iWtAlc{My~SpIOq94`tapin9|5?7udY!86P|)X-O{u&F2!Dn~?GJ zco>y`bx6G)EFav~t5{GMY;?@VbbljxoQHz1LbP(B`}!!UH6>Tjfl&1q=azk??0jbN=E+#M z6k^E>cJ3l-#{U5!`_X;*1`QjbBDNFsx7EXR(Hmqr{lpm?+FIdp)nkXDFJC}uf^Tmi zLW=dE?RFlv+gAzn%|K5Z_H-Pbm|@%OtCAf;Jtv;vdUd_L&R42T!2+mG93Ci4t9z*d z^*)Rh^f_vJWK5cU3?uNY4^yxIxf4{4dY&-?j=*iQ{2w|R)pw?>l0JJP)ovDgt6jxs z^Gts;+i~~vM_)4~um3)B3~9ZhHKNl_FK?G?s17s@ zwOtuN?F@D!Vn%UDujEIbzxWqr+Bk~-;`lXB>QC&@4=zTb^V4)rJDOhA+*Ye@h8oMU zsMe!1P;ogfoQM`{-v^Gzz+8FbgbRH<^(S3`vXUZV|0KKW0<_kP>L?3 zfMy_|{M`1fi$0qfVuYbKQPYjsYX9Yzda1@CGJp*Wo#XRm_hCDz`{+%O<`+ChU`5hT zIJbO!VcUHP|L1MtUAn`hD)N3m52UWkK(X{RF7$;tG=jzRSm2dQ6Qa|Q|_SSz$WKZHKbZnn6) zzsQP0=lX{N&AAH<*G?rp0zZWR8Eozt5VZvjFw zOIN8pXWvbimVZk+=BnJmri;Y8=~4>*V>45=!5Gt!&g(ZrhFgt=G-BpHbp$pp2E$=c zuE*delMtK5rgi6~UDMO}Ur0qQRR%{s1OKmO6h}cp5HG%ws606-!Q79{BCQC9QN9-| z9=<=xjtFdf$cPv}Y?g$}UK-E!KV7Q-o|Hg!YB&sndN)l+`H>evF)PHWR`SG6dd(dI zZBOA1puNtPzB?t879k-`*wfXOg(}!rN9^mTlFW4mDu<=C}D8=71lNGZ~@IBuldI$!f;jDj3sg3&&V4J zBCgryR1XJx=S9~m@mzav$WL8Adu!XGEpEcq!}h2ZfpXii`(2xcw5~Gvn{gT=eERLA zUR{NrPM~{i@K&dbyJ&c0Yr@X7CAK5fw~a)5X7~rdRbjB3B=J>7*Pe&JKHRnxlo^(n z#lA2Y7hg!<-4hqJf3#Q{mstd+#q$56MJ(oPLoMccEkw`{jtpUA(4}+Gj!+m_L1ZYf179Ogy28` zgyt`)MCT3)1Evbzkg$LOH>RR~EU3tD_A{tO&x%2^`m4lho$X)5=6qF!#qrF^qYPxe zB4;ox=&xm@+68|)`kVn@35)AHx-i{LbvF;1o6G78bXCGU3@Cf$b zCrRwLhn^OWet9Ocfa4{O5al<9kGEfA+%{VVB0c>c-4Jdu0X6&9sv1oCQYpE&9|{-u z`ikx%fTNJYw7W#ViCMtlXur3om{2$7fBA?d6>bdwCe+fi#rME|64j#2x|Y5d*DvyMjyg>xG)~N$|Mmk`WFL zTRDuse(|13%&t?0c0Q&uW-h0iw|M$sA@iUFu7B?vA4}}KsPOW1Y`UI{#Dt-mOwAPB zDL@os{VtfHGUM~r$|`fgpN?4Ju}q0?5@c1z4f-}J{u_I^+;wO7O~lGF+1==ULSVY4X=5a zKa$slqFKaqMeG_v91w53PG4O`=#4#IIJK4)?LyD{`Aei`tIznWxd?ijakV1~KcYXE zdGUC?{e(~BCT3WASmcP>J7TSo5Hj~`MoWv~|7xGa9|>O#mT648(ue9{4RyJq`Gdm+xCQp%L z(=mi81-9jUQgcEL^$c-jd!9GyasiT^{rh|yJDi~8fV}q3L zk+!@Mh8hd7^ds56>{ELX{NnS)8@Guu?^TSX*OK(kaMae9zs#jE)b_X7^2Ya9qH%$W zBNElN+9Rn*k;pEL5E1#WB);ToA%wnLB))pGU+4Hs!*G1b$~!(-3tKg-@r7~z8H~(X zu!>Xp5RJ?>X+uWyrLe>9Zw`K9#Rm zARg0gN;+e3CL9%R(}0P`RKkQ<)GVyNU9d9~sw^o`H%}Ta20<3Bm}-h5U$6sTuew?| z!<|h*erTv97WO4ji6+_<#_5D)F93%Wb+se>v?lJr)^X^<^>^r+=c#G$Y!|Sig}u86 zS#lovx>{lL5!>v0Sym+}0{4oE=gD_rxn4}wVpukKJC`Z+ZqN>KAgWZ5ZD{0ZwwSOd z8;nGGI9cQct2Rb3p^eU_;%V?w;}jvxRew%aK}#`B2ODwBRiQ7pMPy=9 zyX9U#bw4Z=14?(-GZruw5Qr-fzzfKx!mRo$Fn~cA`^^%GS;e*4!B>^@>!61-kLPJ7 z$|*6taJWsa^H!h*^g5psKks)_2S6(llmO0^6W>Bka!l*?~5q-12r#FxYYO5ASFN+AhCHC8R_qeD1Bimj`t}Lei;dN7KfCBt&+$i^Z!(-9!sUCq z=%9ef;GPK9m{l*F4?C>s$Qn?eyc6resr6qOkVVP6EtG?OnyAp7C`a9OSY#1IC4Nq6Q&CIS z19N&oj>}hmmCj$A9lxe?L2*Ipe#)UOZ9&pkt;E=mM7aK*C&R+E`(a6uD||s9mu>Xd zm&?#`uSI$iRibSU)XtybGP8DW5&DZ4FXg-2f)Rgs(G4eD1!~OLkF`3fh;@GYEI~oL z(&_P?ek|eV2u4jptWC43??YqDd+<}#O%>e0gnkN*u>C=xfB^l37gTtsQfpD0z0*we zI7AMOHmxGyVG*XN$b=A{j8>g|v(*>gC76yjN#*O1jFVX_*3DOQm;ytho4Ztu%cE_Rgm}nez4c#cx=2I6*Qc9%rtBv z)1oJZtX97G#Le91%jOKeX{bD#oEM$HmUOJ=BzU0^6C%o<>f${D;M)Cjy>p^TkMdPi z5;B%W@bXx6_2N}DeH84z9YwKq^dd=@wLbw|IiD0?zT;~@ekLTS(%188`JjTQ=AyIK z_d7sdYkb~M2-&Q{Apk1Mi>xhWQ;N;QpPl#+614;O0Jk#&@bYUP7P$?Vm}9{wxf>E- zRGi+dzc#T=q}5E;3zQBFpJ{*yd?U^M<(-9#u|G%}8&d!Ib4GpSa3}|9jX)fg(+bpDxAIL1X|jsg7a*yOOziPs2q@#8N8Bi2yCRrt|F`r`zCGD#ii| zpLgoc{y<;SGS>|_;lm97d%fZh8&3NyEM~3LfXTX4eOU7_Z`00h( zBc_;?2i^~2SJig;iL)P18Ww9J9m_iN9l9U0Q2BfJYsJ?{Fbg8F?e2p+Q+}LUbfU<* zvFXumf>RV9Q%OU8Y!qDVqkW27jsq~!%0)`OJ;)h5&PG{*d_6-Ys6gIN(xp2^+d~YH zW!V4~7&PLvZ7j8H*L?=VqYX(-MNScI!6Y9Uqk+c@sM;(E@qz+vOo0>o&q=Vz0>5=O zQ$#@{fS3l(O^rRqXM?F8^w$o=oJXAV|H=Z8B#fq!L?OCC@q$Q#V2p}^%Q~RpgP|^& zU-gRh$o`AM>eJZ!cugT9$u%7`!SzJ(El1@Ua+~_$3|ltfAh(9qZTaQv42kK-KBvFe zjYiarO?LuSe-DGreqS!V(Y78c=6AvjxWVzMYr(|;nvC^G@;F8jO!pR&Y_iU_-ctHoKp2&D8LAKt{G$6Jk^?}pn6f%ta!+G1F z3E^jN&_-^Foms+br2J5q>&w*erT&M*SQAZJpMdNR1YG`o6@F%={%{6DAZ<(^JMqzO zOBYo}dAj*lSFl-AH~PUYNHjqYP?N={`JB@mkwX1nc z4=kBRE=?vWhh_~mc|uu?Hyzr<>xCg#pc4X)`(SYfDKRJC{;RH>AxCUs#f@=9Cp zRZj?gvqD6wXi6(VBeV8Ws<$(CuT%J5n#<=}UW;z+UxLkx42hB?c_F`K|heI_)QW1i;FFdi4EFlNL;Ta~>qxBEx$$ zeosAI4}NvVCGhRdj=)VOz;kdX8um2o~VcPsWDlnJye@^FCad^c`8F}@e5qQ14?2FT2c}cde_e|rCJ3!`#gPDB#6Mt z)KlOUrgSF+OmSP5WGL~nPL}txWJN;H=X@>c7Ou~Av|6WFb{(uI0uftsPP(=uK+3OF zHph`yOvHPv6qjwWe?49U=6z{%c$Y%w!(6s+xBO~vAR2fVFD}gIe_}FS%mIrqhTSNB z&(J?-r+dR<(wY7N2!iXRxnK3ayY#j4kN~BmZH`tQFG3>&mcqf!zt&4G?tbX7-<#+> z`&j4ZS96kA(rjW{f1DqT_*^W44E|+KstB*8TJ=T|xWt2YuWZTtLm+7xwG#yR`D2FF zA4I>bAU0aXoLoCci5LcpXh$fjOS2EA5E902Aaq%{YIB59%>9t+>5!rf!}TY;R*iZB ziz>LjS13*+thU~DpTD}laWJ`%0xA%6&$h5;Kp$wz&RsUJUGDK@J2tDczRLHnB3+ZT z-4lEe1e9n7qzUJy#R#b$$s)QWeFH%9^e}xlO0z!#5{iN%(Hf6tep>fll8}Sg#g4? z6p+RF>2jI8b3Q|OFpZPSHr5zzwir+@eGb=*tAU$)cE+%8=qyUb!>kTimeJ0>O4f`T z$I|{*v?FY$utqMM;Z#o~U*_F4wmE`A>dZYoEi^^C@XCSVX&DoZR6}tw1}+*Xv|E=o z_TFVfsH+@se`ZKA`vqJzcGUllG|DiXe8~-<)ccWk6IJ?6^qfUwu=h-#a_da9Fkiyo zV->+|jFuPH(4#*P-|T^=0!qH#k*)G7hR1@JiHM3Mc$w{nv-%IB`*^Mt}5b>K8UZa0xX2K zvMwe^D-5++Mh-bdTVtiOGwccwqT;gfI!QTR!qGlImxJ=`*`&X5R8DOj`aGG(Lt2(AmyxH-?#XmAx-i6ld2PsjxB6fa5mv+_4GB3(x6$prxJl^F?UI zynWf1UHx7clvdI4(R`cR1z8B6eSBwFrzS>uhhK&DGT=&VSKwG?YaMG^9y#SdaTQ(Q zFSYtR+aj4GnX>|hPt`_@@<%Qx!4JM`a$iAF^bEHu)>%{dPAYT{5~jjdiBYAfm#IPP z&7Wv2fPw=o$M;@p;H7|)+Zn;tdxErD+y%p`{20BUs7m0Uq0&&;t!7uNYLp}#lYE+x zHJwdyFBeFfqWwPX({!;sB%4s)dxk*6m2+2oMmQbyjOWCo2{grK1OKD)F)UsvmHPSD z>-4i6iUNW`iy9czs$?r4X@y0x=;^>CprNB#LOrZVav8-oVpP<<9vL!`1LN%rrohDt z_SX>UIgTrZ^|U+_-~bow?8hz&>8sv9NiIv(MCa^x*j?A5#A|hO3SVltrU&n`pHwk! zW(LS;3v-F)#P8=z1WnzXBzM;8US>e94S$$@X{DFJL zkE}yv)pH`C5DM_gloW3>Y9ur;zgf3(3ImK7zorY$Wa&EyDw|yC9TEBx`r1%|`?J52 z)rSiR*CH@(Ov*UxkEWdy#lOi`pZ#rxChM6u&mG%FLyllO1M*?)NAw4fKJ5G?>adE82uzvFn zm?-)clOpC97N?@~RsZ8+u2|wNk~M$iA9e4Li65nK{q?Y_#F$OSe-A*9;Veq!TA6<^ z?yu5c+2rJ=uH5Z?m8h8DAH0m~J;|y;^ERh=f~!W3F<5FUhHGyyjc+ur(wOBU$2|U@QNS4 zOwYn&NAVx}(S8Ab2!ZzXmaOxU55fGZ$uk#GwY*iv9XwRXU&!Ah;6d&g@k#N%<)lBey2dIEnGNoXg)Oe}52)Tfd#^!q=rB2R4949{Z&}kPj9%P>F9dOcoCnpd&dsv_D9Biz+7Na73xF> zwk>VhjznbFimkiiBFAsVzk39G+*L+ebS->gAR69-&-MF5cTQn(U%|@fL8bPe{N*ZB_&OWv!&HL`WK%ovZR@we1!>u?{kMRw70|W>+a6eGW zf52bR^o!|b9PO2qwNk@IS}w&txVIdRaE&hPG1lzh13V!41YwJz@edik(?{@xb1!-} z3EV9U&d5007S_qh{Y9vs7oXrR>j|gf0u>i1tqIr21V(f)y*}M=nD9Op*Dj&!Wgx0G!v0Ve1-G zl#feykZ9HQJ;-BnSbHtkRQfx&f>_ki8vCj123R(=Nm~!3x3F>Y-mEUfL*7^77W~qx z)NX8~`rq@UalO(yiP5Bx6CMF^c@$V5|K2km%P}qD4cN0J;toWzUTa+3HW->M9O4Rg z8%BTTpjTQE`02B3Y4Bmaf6pX(yRj(L#{N#LXL%=bh*lxyir2b?mOZ6KodU($ch1pK zZBTya9Fup>8G%r{A@tSzKRM@_PSX0tkSE&$rIXRxMbqKDckU>WPmUjTrJ8dX@q;V_ zb02=EzXvCo36i@P=}-sFkG4!Tl$~PeUgW1Q|8_Qy1BNA~DR7dMzwv4aM3( zS^`oCV-q7>fYIr&0 ztSK5ezgx=H1L{;M7>i8VFN~447A=mEw;XDbiptN?(~WA3UMAH%*1OkDMUxbtyoL_% zLJ^AX4L$cPkHOd@Q-{y?jfWxK=RjqQ-*uMSpx~j@ZtMao2b2>zjTdywoXcNAT9(j* zh4Vt;-o>FHyXni-u(Diy<;!}aWQu^6E>vX%+{qPAata;_mI=u^PJnzDq zO`f_VSXiTe7uI@0OW|!vX7tOk3m$Ix<-LNR3}^1Q&UTuKCuKLCEkWbk?R+G%*gkz`L_ zZk)D*RGim|exLBi^z?YfRa-0pV}hA_m0Zi%uLLNO0wbvuLV81Qa}Y&KjI|PIaor|# zTWJOE*q2Mdp&$x~zj!!+SSU$f6dQre0+k8wt-H zth}M_<k!rRJ z&taHN{g;fI7RUB{Bd>Z_O)wBagtUI`?59a=;WB! zWohAH!k6hW8xFCE5I2QrdRx0AjR}-YhFfO~%K3 zA}*+o6lM+Y0h;I`CHg6CjQg`OeMEit>+e5gb~)}8)L>lL+e2*t01rL#*@V6z<+>L? z%^oCMRP08C?o}fxl&SNbr+JL*8!UwmHXdS*86Wk1Q!jIm?G{bTlVN(8F^(Vqgit%BG(e`d^m=k_UY^lt0DiDPro zUDr96l_3!}iI?C&hBY=fkoR%u6(V$XegnejaHUJtg);vyQp>IZgfATV?Ya$BK$)5* zGN~w{5;bq#1rN)4EY&OPfg=}7m?%B)F?hJ&|C*UEOel-!MrX#!xnqTj9 zg@W(&34fR1;(VKuj)OVQE1(2bIBaa3mr8x@23&hHV)!yKRf@7Q z6=X{iHPy2_o;vJ$#jiga=&%(az2Q^1{^9(*liUlZ{X1)4xf>-I2i6&mct80*hlSr% zx9OH`4_WEuxCFt&@hB36tlcqy45+jnt@C8F)~uhT&i|2`RRJ**o$jyG0#7U4fXsA9>a55=fSp9o_2v z?PG@9R^m3veVU7(0WWi}M5K*Ap;;F5W~(v|B5}mbu^EXuEZ`P9GcQd;KH6XMf>Xf^ z)mE75`b>zXZss`qih7ytX($Udys%`&9OpHjde-ycGe33h*%qp^&e^e@d~T#?_9CXp zmyj*B!l+li4LDwo=oVfyJt&CGlR5_s_;A_lg6`9R9^HpWuUKC&Ma>Ipm`)0j zE<=ke%%IqPKDPD+nwW%gU;#3S$sU{E#4y(vQ>lis97cdt0#D{)8&JV!SG}LX$!|8{ zJfFO&Y?}B|eR5cQ0DOn>?FlJr{^NRIt-C@!&5WD)Pz;gN@KI*`^MA0+bpdaBu;@?} zw@4S;*-@;8|1NG8e>rw0;+GcHM%i!r=7Vo`Z%=r#mG@evartGAgt2!l?l$ySeI@5> zB=~=?d3{w&!5f8D;^tnlrFN{jk%otu3?#YXv>T64Q1YjIEW89pD0^UAU05YHxS@q*cv`BnYZd4qu1c|K3PRg%hZoh=K+f z1@xuNtKStZO`{7#owO>vCo%-I58sP}te_tj z;#@X7mc&jo?(whLavx1RIai+1YNntyVP$N&?&1M4o+-=n6lC*7eZT76rnlN2fi8GE zb)x!z�^o|DdOK799*d|LN)=ii2I9ek4FXBi+v7ey_cSK%2AveILo) zB+b!NKQzh=R6ns*N^#TqXZ)_1o=rA^VfeoogWTVw^=OMX;t^|vNwQv>!tdAU>$H!I z$b8}Ngo)SO@1$IKsgJm)1XMy#I#^RoWQ}I8IorWOrSL}#)B{kr&Nlp5V2$%2L+697lyi7!KQwTglB+YYGkI` zn{?Urh>wiWjQKVlq(9oG%8r{6Q0tt?e$4Cu-Oie{A?m`3&uko#C)uV+@6Z(dM0o++lSOvLhJkB> zq~x<&26&(Y|9zkX{M-r~>oqrc-GA0j7%$Mf_IAZZc?REP6+r~U7q>-2;==-_eTaHa z6KXONKbXFl5He!4cEvZnGxf@yNd>TloK|!}v4Rdzl(<&a#ReKW2@2GWmrQ&$ ztf=(1c^se|eeV5V-4T)*rut6Oz_VE{g=+3-RhZvo%V16!e*^5gG>^#ncYAw>BzV#j z_9cWSo|zy=2F7g@-t>KmaXYOJ*O%VaIcA*(W9IMwRv}wk! zoUDr0A?{i^v%)MCSopt^juGM+c=l{0E;?B2Z$??GyBB940jtHQ>{UN3XIH1;L~#(MquwsrVx9xaH-TIonb$_ywlSFjvSzSMujw#!wfd5+ z|4B9q4uSSms(qb9XxJg^aO&<$y008xhC^?qm-Nqye;gHa|2wnZzmFqMN2w0gB+>hs zHOJ+V%6D4)L->3fKyXo;Z3p0q1SJ=uvV?~{zsjc-qRlAuzG13Ws2=UJ31-JY$w!}O z7MrlNW1Jf`uHld_w@U^2fPTheLE4*&dLXJ}f8dL&nd+J7S%n>U768@S&6g(b8dOA! z!l20!qj>)uX}zurr`C#Fvics1N_a$m5lD~4De{>;ryxOKe~6Fs>+D#I{PVO;nfGK` zO3H5d0=n|1g~zurfuCE(z2hwQA|9;3yguO~cmvY>YgWWG=gZ@&X0Rf{Mcx9A~z%WXIeM79UMb*XxYU0*2ZyznpY+w$vd zCSUe_dkc-$lCjYrFi%n~=sOVM5GrBw%Fl?m+p?)I1J-t!0L$f@BC1XsBI>3p5&56Y z;l`$=^}z)58_h!Z9Wt%oA#(*m?S;^n^dDr}5{8c>>W3H^Tnbxx5&vGfp@F1wz!d|Z1 zA;)^SryL0pC*l1#)@fNy!4ZI#n#4|FOiyh(^M_H2A)BYR{zJj++Y(zJRxN7Ai!{=U}Z5E%@GUtW1fT#A?OB!FO zI$<+E^aG}dSinx6{^5X*S)9q)5Jn}kR*nJS4mf2|9!;8C;9l}87@ZZWfFP#zN$l;_ z#BhJA&e$u|)NJgPU-1&Q+w8d;E+Avcn=7S0ee3&oPwFt2I(`n&y_Y5b`(%JXjmZ@u z6*a`ig-RL;|woYL)$ILq0hkKCkis;(d3+20Q4pGrd> zf|Dn?;qt%Tnos8}c3`*0hVsOj?G4TO@4m?T^c-|Xh}L&5n!=bAtriPbA0AGqk_UAm zhnW*lmNmb_hDqMg=HWe|Stu^0VqmF&TVdO%(rR8AA+{^D4L|(`s~7eM9m>wP7C<0Q zI9_P`qw6f?`5sR@m7JXXk5v=g%hU!Ok~`f zmT&wXLIw%7LoG%Pd>mUh3&uZihZ8OUP!b;4HC6e-z4i^m_g-)6ep3S-pV_S6`>|gC z;dQ8*kLhuDwPZmOQM|S$Vzos!Z|8DZftge694~+ zGmGbLDSO_72hOhf^@sbybV;GM>gag+43}Dog!#A#dS)u2prZo`)|)BqQxs>RmN9Gm z>h2$~PiXWHxS9C&y}3|~R34Apl2~ZivK^C|_FngoMFF3vno^pR@-ciH|302p+xjst z4|1O0$yVTxaXG4tg@*c(-F#Ir>rrZ!n^1$GC4H$eX7F!%D3#r;_<=!bneZrPN-4MP z68up!kOywF07rql8=Y{ew0SN zU62O0jvHW**-wD+f~bamc0 zRrn(leuK~`f`=coM&}NwqKz$_pYShGBCYyGvT*wf&F^F)Bg7A1n6LO!$2T}=rHj=% zb9;gz>xRkDE{B$siCU`EYcKN+msHRUa0H{u9l}AQb$q6rMptFpJ~TlMXj5CpWb2YH zOsLC>Ti>p7F(&+y>{gpbV=scaPun2f;x`nhwq?{5O?U8Mk3=h^$~KJgu3}9y5j_!` zKK%OGn`d2wgtG0C3Y%FzeLn;-5K9p83f$lYO%uHa-33bvT;lC3ungPvSCxpN9Sbm_ z9Ot^1d^QkR-Xf$YAJT{KyZVfqhnQ z!}Y4WQOkRO@C=*L2#6~2A)6vTrbP2AL**_fBZz9uCq%vY&I86TtVllGg^9MPdRMdM ztME!dsnwe0e}DdOYQG)d5zIY{Kfx5h2R-)q^}iSz+mpTIyD3ZGnZ5u~0|zf3El3Yj zJUE0L2L(aDn4-_eVMkf2Z~Z5Z3h(eNPN~QpKg^#h7d<2#tK0mk74*Gm*0K z=}_|=fLjN^MTGJ_09NC;8$Yj?HSBAePB&geeaW*(P|zePm{D`+*QRI8@e+$fO?W&x zVOjD})3`k6>xYig2ngzHmh&(ZUXixJhE@^Q5$0MFoaW#WWQuF{Oxi}wFZi1lX_&^W zJTWFC@N}1r3D;O**{5o&{bESI7fR&3o6E8P!lmQLf;v0IQAd@za(BV4Q>TK`<|wc$ z3hyp7g^i_cjPR`SjX1#w&7sRg`p`MwJU(WG`g7zyt@{*#1+W#23KuWCQeT{J^GG0i zY$)ae%1%LNFe4Kj;2E&Q`OnsK2(t(dc)n@Hhs<88t&%wa%1O)6QoYuEq@v^)gG~u6 znskp%bKkA}^%>-kynzy`OzkAT6KjsPO@>%BOb$lm97#^tqw}brR?U6XTnR|H^}go( zLaN13$#C+(Nsh#VkZA8CAl^r3@t&WN$nkQ*@r_=4JFpw9bZ4B7z$prDmJcO~KmX-A zkm*%oS}Uyp4CVeh%XdXN{aHJC5o9u;h3Z5AT#CJss3+`uUBdjHBvN;?o**I~hlI$G zQBT;P@4G9b26!GN9SYIB=Osz9(#1;>a8P*ca6!3=#*y(NO55_eaN+0dx_$vac{vvS z+FeKf%Os5SE?r9|8eRp%I+CONCXyLR{Q8f6O2L~{H`IZESjCzk9)zq+lf-FDLAFz+xFkM z7f|_TlEf%un*blh&>#j==$R$JYXPo`>?Hx^aB<>C3`V(^TbPUk$;9Jlr+`!M&FzFN zzaI1nErnAAkB1I<(8!%o3|t9Or~r+~U;ExzC&D%X$`V8d@h`4RlLS}icDO9~Xu=LJ z4QK`2dxX9d0@sD-ktdDVPs)uLTq2`IPn$;G7DP(sIoYqN#0y#6u(9zkOmr^1hnqcJ zk~zCL{U{j8FwuMA4slq^LRYFI0Il-yqkWfwoBOq~FW%pvqTzE}G8^)@e{c2jcli<1gnd8oMbj^>G1>PH$kR^q4`iFKejNC+gOlGj;#(kNu z&WjgnWa-b+`P3c_Sc3%rIqOBO<0Ks3d2fixH!24eWV~7z+9)&V%Egm5K=jns4pgXP zP?KH#+{^DcAvyIW+xP`Mm{R}4qU_yxZ+$o3oiECk!NxnrJIU$#OUzjtJwu~*{x81X zGAimndKZ-r$pNH$0Hr~Jp=+c=M7l#-x*N%%JER1prCXXIMY@}zyF2gjyXV~hi+k32 zGmAIFn)QvnpZ&!CoSsMyS=s1+_Tu&KA5}hnLot!m7A9+BN&LVoLbE%SD&&O0v#X5J z;Oohs2%P>f)>~aRP?H)~<15$i!P=-j7#GnIg)2<)6hVd3{pCKBdSaH}9)cYgVe0gK zPiB3U&40yhiDyfpY#T3tL-g$OBtNvhcjdS?Ux@gbHg z*SGZH`w|QE9XSWH9v)d^oAb{hgK}9k`c$q{qggoZfczL}V&r()s+$h7Qp(8j+TP9a z!_|Am5tkr<8q2_-G)WMFfS)(zhiymbie1>JTQJc-(aq3YK2soHFw*JR_uEp!dHwuU zy%f2SrFhK1+@io2aCwS9v?wAE_9OIS)SWqApP)d4za6hS?sHs&$=6Fi$3=f07C9Ff z9~Kb=weNW5GME3DFM1)%xnIcgudhlyqr^DCKZyy{aF+$9U+3&vQm4t7}#VM?F^X8h|ZT za^zW!m&9rS=#xILXBYS96LR}6Vs}$WtM*O;zxAqEy{~zcN29fe7!g+%eRXawB(rC} zttdd=N-DgksrkYfl#!uGUn4VOQC785Cw%}~fj+47kFng!boW0g$cIm$9X*;;OaN()5^NkR9YFB%mfFkq1$hbxU7F zkiEkUb34FLb&j_RSNbwQtf9;6c7I)gjU#DcsU`i9AlwOrm8=}>Co z!0wGf9r<>1ln>y%u_nCXo%@hQ-wQCZ6HyM~8+n07SJ*}17s-kEKQH%p4K=vr#PD)U zSl*A_`>w`cCxcTMI=vmOlQF7bD33;|RCS4dk46>8Y`SBYlb?$c6_*XO)V4kH7cM>i*VTMl=>$P7x{(D4QWypj zN{|T44}{`EVo|aJbs>dyZiG!qZ)0&1cT=C8Yzn#7;h3Ob2;rzgWuKKQrk+1!g;^ef zgpW+-QP&QO5Y@{0df%;S=i$!?6x$vUn^GUM;`dM<+NuMk>`_8vr2$+XR?d z>a3yA4AlAcvuiQ6n(#}7cu(&6g^y@Eiw2wZy_pUf`SGrL=Ve;(F3~_*u?|n2c)ncu zJmQ6LxQhPoWj^a;otzrQ!tYq_jaL^5m@1FD?+zi}8emU2r0zgnKlyw0h}I?8?uhhF zcuif>Ka6m)w#HB({zoNu4dsm!6anu8;Ax6Di?|$gO;Ph@KLlN<)=%F3SeSa)ERJtF zpEXp&ET}nhx>8=E@2U@2=v^%T1MiFI#6(iw#Ey`?EBs7TfeXZ8bt*n`%l&tk!S%~u z8s_UnL|f7he}p#aftL7qDcI-FHthQ{@1c{wa#Y!nB*VqWJI1JDWUH*DohhD>0>&g$Mj&-wtl!MnRIXX!t_JTN8dZsYcjgZ z@n<27%X`mhzJdG*%h(8-lGC9>1r;YcPOF}!KM=(zNbY@BPObpr$RIBLmcmwz`M?8; zrt2ejQCu~JMV(!Mxb#-9BVwLyd0U;f-5bw`kzmn+I6*_WQQRE&{#hI~Kl7S58ilz@ zDD5)rxJPkP+EP_Zc|$Da)QvKPu$Y$H&A*Y%`d9^xIN)(qz$_^fYX*G@G9QRtM%j9H z9jGUiYI=%QC3DUm7L&P=P4ZL)5;;kW{h6rLw#v$QU7xDi}Bs^ zUc&pbcieE_j$%#bFLRmE=cGY>Q&aU7zh_z{?QbpHhGK}X->(q}bBlgmlN9>lv?e)f zk}IV`#}<7VT>Ld1dJ+F^?n6IuN{e9a2P_*sj@&EKfZ6+B(%xX`pY%r;z}GeC2ZW!& z`L7p`0Lo21)OOIrgLaQCt8ES^%Ap(NjD@jVo-h)$uc`1oN!>j2Q3a_Q@rI8I-&4VS zb0%Vs_O4p#7BS;O6{xGgJUEswA9$-zz~0@#VYu}gPW{VS|Ejlo5oID?2u|Ym5M}PH@JH{ zDtu+Nc&VTG7J>U@edJHpAx5F^(?FEp0v>Yo?{y}!i2iv`jGtDg;S4xwB;1YHCLD$;CpB8$o7HD zy^q;3%5$=(XCuHLFMXx(4BkU`bR`92)tYcS1fZ>@Mv7e5nNDBxu zk{jHBN~aYJ=V`PLm)?uR=$i>a*?8|LAO;N zkAiqK8@zA>tnEp5=>HC05LNvAKa!G+CDGSdU+$SCkQs@igDI8Uq;-3gzGL!oeNN0F z$6PmN>f)ZqZrcHQ9BAZbtux_SF;K`_shouaG%TFxA^@7?$z`uKGM#)iTa5jmE<@vb zCizGH3flU)%?j6RtQ9*X1>vtT$8Cp0f7eFD$<#5jW`wPQgx1`Je{u`4)Xj(a+KY-9 zjsTFyS?(17&{3;3(LOOYPcvW2YpWB3J4h$)FJ!hx5k3XN5K5q$I@ zL6K#9<(9ZhK|bBj?0x3$WYni&tf2cQQM$43s%rxCA1kIr2Kgar2XCI>aJe`@;Ej2< z2c@NXHX85$1$i@;cpAMa!F{>x$yAulS?<(LWDUSI*Tqzzh~1a95HNuvZ$GNX(cc?7 zA#w^?=O9kU>olVsnA&fUjIzGN_+H{urRk=a<{v8>)*L^1J#vh)g#3s7C2DjX92*xX zte=10Oc8)zoTsLA2QVoWQ3`;Ppj**N(bcT? z%8tA^dC)a!=;Rq2aNR4BLQlr-Hc$Gg;4M<*=XregbNDd{HQ|9PxqTod$v3D2Ie|Ps zlXk0|1D}-y5;!jDznML{50s0Fe|@UK5&7$oQj3x7Exiq4leZA>i0T+12hK3G2hgf*W-;NsL8k*4TN?T!|E@tdF{ zS4m8wQyjmPm(#2Ot7mX{$4xkr(G1bGbV^l4n4rLtJ35;n&XWyPnY>d8^4p>Ws)M9x zCcxTqxX9UPlEx)4-6;7QgY~`-!dh_8Q1wxktp%lOX7HZR_rqelTf)(HY-*1GeH16I zm>F{v!x&=}{Cx(-*QZ!d|5wUe=w_pHc=uC0F-G>a==}LM7`qUaRxH$Bn09$KNM&tc zG^H!9JC z>>F8#wr_G=AkaqzqSNjETFWDsSlIzkiLTdtu?$Up^J=Fj7XdI5wr@$~=vnr}B#1x0 z=;pcDS9{JGtx8nn*vh4ZKSLJPI4$d9(oVAg=h~4~_Pea|_z21`-oKc9EJ>LtfGp78+|;D}|6V zjFCk4-wo&5>B_k6vl0^M`Qk)fG=YZDYEFzO|3CZ^u=eTBN$bTj|#|TiN^oJvhkLxU()TQDc`djrwe` zqX0hKXbCzFogkY5qCIYBUUu8>{=MX%R4KSR&c-5l_$!y7PH@pkLtK`7i~6U+?+3eb z;U#yq=q9PA_}XOq_QhzsIgbOUQWRK0=B*=A`IS3c+H;UGfn}~7-<(P_0r}u*Mv|}KjF31c=0N5^rI&uk2uKS_g*5#d5P z>dKO*TEjM3#NX|uk22W;C-(2jA}?qSg-tLYJKW)52Y*~?;k<~NP(0}S$*P?N&>Xa< zlPAzr&wI8=RJOURu-{kmq|ZCrsKl+6KFDoNGzw?6JW=Oe$52R{eYd&Tt6JBZb;-EO z_&6C6RSiD};xf_mKS(|0pNct?pA{T+p_pL}cY{DW9e^~>@8^iK9D2XPAlB^vep6T* zA1}+wY33)Wt2*bak$r+;-wL^ZJiDF6d3%3pVVDVPc!ggri6>BSnan?;J*3!IPYbEL6P8`tTe@0N- zJ?okmo~rbPr_z9x{^dbz#eW%QqCAT9Gu-h(&TvKNcx|X}=ZS zu;u7dNEp~A#yoT7kkUr*I)OfERB3E*Z2f}{-t1C7xDc!WEb8&EA=y$suR=h6eu?YP-_VVW!GwzsrG{ks$kFqx-!N$RZ6^t2yK+GiofBJJv)Xuv zfEkMf%X$K@uPt$=;M{Is4W=TjiQ7R|X+Fk!i&v|Cfc2jg)X8tb*r9_qxl0zt8M!ak zmq~{8H;PF%9Xwdm><1rijn2}f9dtQgH3xqoDE~wJe9txVf5;I~YJ7V*$;`;updLYT z-}YcTfAMkh*cG%r_Y4i3SOo7hSFVnCpZD@W`Nr8|~T*M)8 zj9IGxxS%x$giQTf$<#ZJf%iO*(%AQQzicZ9DPKzS|Dwj%?Fk*5XuDJ&OVthVvYL*< z7t5&fT#r)GufGYAP&HnEYRrD3q!1=7&{!rYK3syVrmFR}tInQ$8 z8`nD1u=kD$j9X#a7*Gt|fV~7G_czN9FH(DICn8G{$s(Z8{;j)nMx8} z$;RQ~0JG4gpl9Rgb^4!wPw*qw)p1|K0ed(TlTu6nQGNg0I>TH}p1L~z(_HVo6|M(u z-D4K5SKxyjU#bH=@t{ex^N8?uP)f@N18mW01pCY{Q2#_$;mH`&rkPS*Zhw#Z@bR3>+Q%_CKI}>*oOJp_#fN zterGW0`XvARwVMYx}3Zsm+2l~Na!f>5_W5DkV(QMW*y0{|9rD;hjlI7!XFu>80zq6 z;%{iH-7(ppls#uk*$j(Zo+Iu6%U_1~YdejsMcFghR(E}4E{?y4YbU~7b5SF>{A*3; zRQT54ja)P7!nc_Wu%mSxSSVgSVw6e=qb-cv`Cwm-zqRx!$s|bw*`ipC^6mU)YzkUn zUuG2l5oujpDmeRs!E-q%AHP*2p{zB)_v^aO6b$5`8-zMlU&3Q(Yb7O7FR>?fdd_14 zHPNSaQ7YRuEh^y~81)nEWDma7QJvQ3ao>PiOkJ$Zv5oOOpBSir}XC{crP{m zuwdeI5=gxPUd?nH7iQL$l9K8QCe|m(I!i1JN@+d#3KvnRA9tj+u8*3J3-~Cas;|0& zUqexdb@6<6LVe!~J?<*=^_TC#3mdbyT9cGNz5VK98LVS&;S3x2?OkQ(YG!aR#L~nt zPXg;8K^xwm)gbibf6*f|u~XDVPNa|C*2f+E?_B^wf>d6rLRwQ+Qtc-3 z_~lHoKd+S-5NIGd^UQR75@o3VByY;rMPU)0a;ggIuoaF|`y22^cH+Wwn#Cudy^%o~ zpkl_io8o9zwy_O)*E#ZNy)CcHmIi{65Aj%7jYqc!j1Y_>K0O`Gg7KUSGw# zvi&@`i4yJ)=^$Ha03mx0Qukp)f2mXWiVynpQ0a3s3Vb0*;)phTK;-jzZUxk3QeDI2 z(>9g+o;tnwW8@Adc1C>E92Kh7=@lA!vQAy!NT{p4y}R=k+x`(?iGLoXIN%m3u5!)G zO0a;~8EH7!JpG=raH{a2GO@F6nfR9$?4b&G-`MI+n!S*@8u+Q#kP_Ecv+Xf&3n3$063!eHKGeN9?n`!R=HN^TSG9tV^0mu zT8pvY1cB0g@k2Wxl*{CX7KRr1%WD1R(@}%(enSXf>#m}ayF2Kw_%+AV8i#vEoYsfR zVg1Vz4Ts#)ogeSD2-KW#wA705E#SNlf{^o;(jK%oiX}-^``v-$MmwQ{HN7yYfo4so z<)1ue7{Txt15NvV4HZ=d^|06N#%M24TWM3qycx2F`f@v*S6QlAh-3?8O@ z=Q}EDefr}BX;$X&^9zlT-oS74+}#n+aj^;IH}y{=7*!ZyZ>1!mN$ zKPwL1ceVg#kmcL*&byOm)8xH}zpmue1+tz zRW5Ugv3gX6_a+Oh(C@AgI;CMi`E*zD?5Qr$r;YCB_xSSn%?6WbTAF^d>$lX@RCGbt zgZ>-Q6C_bQ-=}Rqk+ZhDsfv*7yW;Hd5Am8a`d)00q8%o%L4zmm6*jZXW8drMTj%7l zP}Ldm6bxLpH;Mj1+HmD#I&{ZUMtuMWYA0hFns8%jGW9Ml>EI+UP{G)m9>t=jb62#H zCUVi$c1IMP@-f?Rb94?jXlcefIP~3E&5kh*1p*%(2W%E-PA&n-+A*SDP-dz?MZ0gR zM^2vdc|1JDT3RRNm@;N6>`7qsb8G_VtBc^sBcF^35f~eq&sgyELvZ$zwE;$!k`#h# zj>2EvE!{VJM&4f#l=R9nXB0_vo|xo7{KgrGgZr|)luUCv-L&EUt;@jcn1aer)P1jc z9@lrw{JS@DPtSi)0_Z#5IYg;H$<3_Jz?#$9VWC$2VTov~0I(>U|^PQ|XO;^SKDw45M@C3m!JxPAfYp#+}q*H(wj55t9g zy{$cL2dSG0?GU)5w|uUzV_5G|jC@Ht1m2jIzog$^y1 zUq3&tJP*a#PZ6k5N+!Exp+lHKk*c4m??yvsua6&wkFnglouDDu2!;8!O`C6g7oCom zTNnM7J+_0dTegK4d(o6sA16c~2__l`F=KGy$d^=M#dE(5Atp`xHZA)$?Sx+Rj9!XL zU5`L5l&HSs3;ifB;yt?uXJpyj`kf2Y_o&E)YeRFSc()JCL$zGFLKm5I{}tbfA2;6@ zSEIigZCp9MAJS)%8kwbV)w}LN<e%*}qY8rqAk5(YA=N7tQRg zZmt}MuzLK$^UfN@%C1a*s3Lve>;N{r`OKJ$Jp3RVpPzLJHyr8MmB>GW?_pTixWU=Y z7s0ZJ$X2xCmpwQA*#glX1zY@u*<@L#L4$(PW_|Sza+*;g_i>H6erUJ~5TRFaV`MJL zx-_=3lXOH@!dn7rMx8a{Mkl2pP|H6_#4`*gXfUWET0t4jN+g%J6UR}ciil{fk?40| z8{Z6}GO^60m2FcF(G4oR&O}p9=S!&bs`s%~Z>*891B2w%~1ZQJ`e#rEQkK z43|HOx(29#SSO%)CXrLf0T(+pOq$x~gV6Ks2rjXKw?hZLfsBl^fC`U@$nXFwu(RG~ zu1gk2$k=_!Wu{8xNMP@ay~p+Q)A6&T@j*@~6=sabKa(yZ4PE@K+kfUEb3%6we$P+# zP;9=S3ctsFSo+F?ndTp7OU?Ey_RslT8GcWXANqLZDd={DB_l-Z5QvP`i?nq7baadp<8xs0{^8}5_4)*g>!hG0d^zcloWmi5 z$gZz&t=RaT}Nd#g&rvY?Ne-a$`on{)K#byy$!fCF(Cg9caTVgS?&L8 zzoIGZy8*xV4SZA=>~^@z-6f5*kol6m2v4(b7X0}iKeS~oW}#86vxFl8Mwq$KI%!nE z>KC<5Wd2fmu%D6rrt~{|Z_2v3o({u(& zZ}2r2?Nb9}8ZRjAN+q?L9KX)inB$86;gz`-Sf#twXgf<|)!Y3NSSX_n7szO0gOQKN9nNUh~MC%Uz)Q=V2y0slO~>#4AQW3>EK_Ibv3kk9>9 z73jbKm9?trKFW_0DcR(5V>_uJxZK#qDLfk79&r;tqqF$;cS z@bs&9)b}d4c8u>hUs)BJ-|4bsgM%i!amP0EkK8jx*?qR9G2dsP<84DgHZ#ldsHb06 zQ#lyEL4_V}9xoU;&?C@@-RYSW$l+W1q@QkH(;OK%?e@TOFU{R}l0&J<)>YMUZ78sD zg*nM$``26~i+Ibfd?G^J5xJC^5rS(wC`7GfI3WCG7EE$nw!h9UkzA*bWBc2@+iTem zHar=I4-Rg@stPv6OJR8MN&3dxR*KfjbRBQLyHWl5zZA*jN9TmrB4DGGr>;}!0B(YE zw3lGXz*Cs1j;>mSU&Vjf6gigS{}HH~z(h(b5Azj|WK3MKzpa=>ZvsX8nT%pTb@uEZ z0@OfJ=Pd1KEU@;c{q`HeNo#}qdHb=C#10Zjh2Nj{DxSiX(P6dNoFO4Q&%G|20ccd{ zjXRXGj6%_21R&5@?YD*cliLx$ESK0%CDAMP$Ad?Q298=o}sc@;AQ# zM;a1z+tKpbv=7;NtbuH3IY`(EJ+gx%L zz!iJb=+4m{!`61V6M@d+?}-=o8iNwfsvID}-9fe-cGaxJd}86&nWWL2TD~^1>>8q? z7u2yEjgV_O;VNgl*{5&MDvb$riMfbz-NeE1yd)`&#_C@D6PzuLos6ipz{PxDS#mks z8Gzl*Gv^HzYx62)9b>hrj1%;|HGFSkM%x$}=wO2XxVMgRn&xQ3_kwE#r;z>N(A13A zOnUM071iy1!M_CgPe$(K)0tG|?R(rzOFjg$C2Y9S!9$6a^DU4)#XQ)mua5%W3FkpX z9{&Nj??iI=(yQ(bT&);N^%qAwO^1^YNGVqW;~i`Sx)NS8wr+4c0M6q9<7J-{or?37=+6x~ScTk>aMcdY_WzIjWmgH_z>24k*;+jn1%kZA z&$fFwd>!2PRI|yR4o03Lk7=w@imE4gWt1M_CBjFZ4ikctk=$kCBV)0;k;DNy3yn>w1{i=!zcq6)Kg3&rh9;eJ(V3$3ANMpu zkKsMtj(-eUujZM_?~IAu3+ypi`?+2F= zhz5Mn!qgxt$4^y7EE;)9T)#;>a_Scfob`oX zd>sa66{=bgXQj0zNsg&nMN)Av8Z?jNC*Mx^!d}JoxaTKpm{C&@Ua$O8bp<$ZBUhV% z4U=NV)zd5@AWH1;fE#5VYs)c9?ogN7-4XD*4p?EV2>G4p29MUsMVmvafTT!qnu~Jo z90J!mT}|@Jk$sX8;>bd0*N|T6Ckf3)L!i+0JB`py`7;(oxk%ex%fBixx+}KC%C&AH zhRUnso(1IBrUgsh{ofgKj2}V5$&B#*YT;fMOd|)30zTsL!ti9>$7kOUyDrrxKG>d? ziM1kAN)+Z44Tv9h$eq;_bh{X8zbCt=BU^HpkCh)8X6Iw-))4p@Ey@&A=A|Eq1>AhI zuhURR=$7Lj6M1(JU)o!5`#-srzYHbz$76Pn({`t_?|=^Wh`q!>q7xZn08qw4i@W4q zT2ME^k*k&5B*_+E+bOn4k}9KG>{}?Mx(pr+JMi$xsLRAH`{|-k2cXuNu)6>UH2nM_ zePj03#jH1R0R(cPIFxGypBUE()HW?k0eO^B;Nh63otU#sHIQ0J^Dpl-#oWCYGUlet zOGD3vC_CfqZn|E6fTQ`K`ozue+U;N4r6?HFK(4ix%EMm#zH&m*nI}Oo)(%9x*KrNzB%FXJYZv*wV+JY7L9%(uHf4 zLEgsMY&sbS@)^^0UR4p~ayNceBxyTVp!HmJ^0cS3dCa;V9FA=Gxj{%_=EvY@Pw=ZM zoq#L0IvyBBf9E05cZbZcqF5_xlmtxhJ9J;RWjCRh)3uxNRB;*)2WYwnac1?8Cur_m z#~E?^*4`0oM3BuA6VLj4V*H~1)ikxDCB9I&@AEN*rU>z)nG!;F3cyb+eFn_J| zdtdGcobEmRmpkAtfV2Deum()gz&z4fep7mC`~NO$Y^Ao+Xyj^RCfa>FWx;gy=G5(K z0_#V9LK~dAT>Mk?KQRAeE+z(ghQuHE1P)zTzN#nD1-hPW@d>eqO81{=>K1~DsQ4v6 zBgO2_wSL4`An$0onzv57Tih0ru9z-Z&?#OW6Vo;I9biZa@_Xp>Gu59!I}+|c4^iKbTIX;gy@tYAt|jANr0d<3>W98{5tDmOCAs zl$qRR$@x!OwUhih3;v{?uREm@5N2F-nMAu^;KZ!MYRLeO$zj%AX>7Q@>qn)B3k}jl zvwakaPLV)h@6p#&P5O9uS3V*!`|8&*Y5IPTm-y%QWIQS^AeB-99z>^zj@i9dqvv%h zJcjv3LqPyvY6~qs_or%6>KxmHDB{hg+|2B009TCfpiN{_0w3*!hgX!-(z8Gt%_2 z8|MU{gm8`$Wjy%jWb4oH3$8pvMt>EO-$uW9Jgw`jDUyuhFQW8DTU4anI*C0FSMxlU z#iNK9bNwjFcgPx@(ROq5y*$oz&wwlqFo1IDHd8j;|f&PIgTuPdAOaf2$-)GMRh1WO=sf$qs+K$jrenGP9zYDHWw~ zO!_5wN+|0=;DRiGo&wI&F$2`XIH)`%0e{JVI}D zro_MpHVY65P6Z84WncV)9|F<5e97L1^m>3D_>^w-ulw!Y!k&>ThGg}!zz!l@QxDKKXGMy8BfQnMM!XFW= zZp+%&94(yktVwOqt9S-^<1@SunCxt!B7k7fW^gw>X1un$GwwkD93e1s`KFf-HRE&5 z_r~vTms1+#ETwQX%mE*8d%Nd5F$4|l!-tq?9UO6(c5oWtz6F?6`Q8-zKVigs4$rrd znSbPo27{7pY)p})=w?@Em6&W}6SLFU9kdD5@kUgI!zFJXz21bzE$p#`y{4CjUJz$CYF+ZDb(=moo&u$j%>K?uSN$q1pN}7-UL~vk;K0lm8Uj`t@@pb+Y z4;)d{(C&mxZ_AV-2}dNmWaut=#s$}H!9dpldCMGbOgRkO{_UuEJQf6RF=DEGl@RC1 zpP4|-b=->ak#TX3u_QLA>*KyV0gU?jlsXhHpPAb?roSF2feNbx2hkj5-VJ0w44hP_ zw6a1)C=l(Oy9c;{8TQ{X>V&Q4Fpjb9+$B56smfOIg@vBbB3)6459zhSzBl#hycv{6 za+v?eG-#hf6dxU`12?eP(`#H>A>(i$dX>+TFs6*@2(P35vs*-07gm*b?2>gJPq+zGVi;hc(uQPTv?AZ-_c^^6-rK6=B)iRoB*0x2fy0E=VBN^V zACzeIB4dBo6cD9e1`yNpW zZ*k_QmN7}y_{Mn|2+Li=Z2(uAxoA$RE18-uPCZs4H5wLz!Is!PSoKe-;xp9{Lg)}* z|H6!D6w?0EbL+(AVVj1~s#Y`;EM6k;5qbSktP=93zR$=TAWbPREePK=`Cj6S;(M## z3C->Bg9JRvU0(E)qzn9_EUk3j6T-d0dE zV!I4lZ7VewIZtC_s;K|A&}-KMg|G^tS`=pc@4r48?P}*%32yiYtLjuMRX<&L-8!sr z2!8D8LgFvb%2_eW0Fy$;!#ISz-CeQyU1hGQJ)23&`DW}Lq?!-w7) zASwII^OV8kR5V2T)%+h$`;3e(@0;%v9w5uFC@~3ZRpU@LI3Q?@EA`|-3?&XIhCwQ~ z_nLRiY&;1_!jA$!4Wcp~>ZV2md2Pzh-Y=`5EZX?xfjT6{{`HNvnum0T&Y&NYcpteB z_d&bEm#k!^a1fz9Zks`&;r2-zLNjz|Sv&G{;SN}%7djTkzZ5>DcjM5e>8rD>8~|`a z6TaQXj30x|?LRn<7K;r70S)W!t*PZj-EyvI*KC-DJ_qlLt#Qg=C_Y@4b%+CSy0+|R zg67~f)<1+|K^6F%A=|PUW5rJ47fw7S|Aq}~r1i?m^TN)^P0I6=mzAS7frg3mJmzyR zG>g)6M6J!=^tPL;@$whO&s2MfSsC{7`e+b-WrxPALt6!#p6&$9-IeSx3!HzZ*>LjT zU$%7Np&u9~3#Uaa7B7N2=YuoXUTa6L%tg3z;>{{b&96ydU16r)O2Db&akApF7pnN^ zg)06APoUq&P1!vqSL~c59xv^O@ zJayn?^nu+><6->*;&c$vVob0!DZceXd$>Cx{s4>ajV%h(<(8*g@@_7iXQPgKK^46C zshXag2d!&VJnD?mHqd->ig}pfN<6QCWuNLcsXqD%^X>_EcHaoWwL%@F((5*;e?SbPtJRc-4f~yVKJ*qd5;Z^Aonm9DA+Q%|b7JbuIxewBQXMWZ@a>42=;Qs{atUN+e)(DiY@A?Gt_$bRF68BN| zw+!635$LQu9mj0&Ah3LP{j)p&mCs&MO7QuxK;CLr%f?RUJ0;C;K4Ab2+^C86s*|@2 zmCmF+m)%&@s9K|tiMWEMyx^}ZI@w`zujco{B)KW?sw5un6j`JW3hiri5N> z69+K~u^fiuHYe29*^f$}<3cdlu|21GR`xw}t=cO51)ku@;w8Oll~B}`Db+}i8Dj%e zX@i&d^Ic}@J2+_zq&?{;i+|TROAetlIN2dxeiJGUwO8SbCv98h;sF}P{_HGfXtto_ z25|)wfEoia^53ZhC+IdxT3zlyD0* zP)zpM(tsT}i^W=FUyW&Zbp91?&+snhcYo?8RZ1<>tfC8FV=q?rUL(j@6<-@+a*U1b zddH``77bd*7bgThET3mx2NlAt12EjDRot7yNYqBl2}WNeSa&!0sz7p|!&;EY?4h7L z*@aK!f&k_KSVzc)za0rPWTF>6WxZ3-pL zH?@I&cxJ9=$$rCK6a|D@^M3OFSA z^zTZ1koZT@t*ld$8~r?*HfNVBySq^Bk3jvq9EGB+ndCj*&9rA7 zf9@)#)BPMBL>N!)4#ai?!V+-+Qi>4f9i8gevTs|aa2*#K>~P_J1J&6o6EvnyPSj@d z*8(+)UtmKnVYpBIG#FR4g~DvB&ND9!&p&7aPW@`P)l$s5f55xufPHsmdC{?)}X1`8|0wIq&T-J}QaMcjRM zsL9WIJxhes!EZ#*u7f$YV;*+jCbMZ#WH}usbmgMZ3-grgJDTyeejQcP%kfQoI-Hxk z*!fw`^hkF{@Wpa&cZHJEJB>y0kEvp^UH1T-{dfq>k#MSn-dKgUQ;*^Bkh~D6J14$C zhU5a?u`GIBJcm4KBV(+#m@?{Z1DS5sBwGF@e&NARk<9C@l8}_ zr^Wa#U2{^;XJ97xMf}YGNk-&dFJBu>?G|~eRR5CMS5ki(h7Qy@;S~c~#b$_$ORSfa zmanO5%U}&%eC%7;v`^!U7XvK?e^=~D$bK+Y`n4Jp!~uU^#J5eT?@2_dAREM(@%EtG z%L2Yu$nj>E@F({Ne5Q`r*ygL}nrns*SE8wTpQBhoGaL+AbmaI~_~LkvD7V=~C*XWS zc@-7=H)EgWYk#q_$&Wd{sl!7fEc~qEK$ZP|la=Q0GvQbCSO}g(znJ6p?!&%LsfOFJ zPl#8-qL zBc~QUoDHgemc;sc-r;o=y3$e>FQ6b@VcSVC$BDWy7-}gFegjA~aGm=a8SvM7s-G04 z%QBaNp~MiWrJ`wz?0UrSY2w>rV;ucCP2ZxpZkFr3<&6M^R5$iR8!81MC1v z$)9#hNVXO|w!SJ|)(}6FH5S`YVlHJ(hnS)PYXz6v?#CNqF3-UD(_KD~LCl%zLm5iT z&wJ8YH|Bhe;dK3tJ2HC$E6H>6L7{s;%O?|--=<7W(&joh*~qxgU%AK~bYFMFRf34K zNt~L1W}_`5aDhJfD=94|KP!}xo5xgQt=T##c)SHa&g(Af&>h*Fdt+D&|R(ixxBx zAT@e0TNRiWWW``cZAVF>k>|zv1a@SL+9r5BiEuIU>0e1=(i@G*PzwtyQ5SOzsFhfA z`zKGISF-!PR^rPSH#ffh?l8&-vS)a=X1u1F?T|WG|Fg%Ta`O5;hWDm~_g1TM7qtrR15JolVYn44FAMw9~>k&CO zX-+fRGqvU-UZBYsALW};a*!E8(*S{t5PhGR*0fUD#uSIuR|Aw9$Br)xN-m{Q zEF80!hv%+i2KkwCEjWAw`aMncc!rai2@xU(Mf8xL@%KBYXG@y5)#T4H={44lM}_4_ z_LC-w3pNL{_uTdanfVirZtN~j*A(OpZ^qw1n-Uj&mg5_HDw6=6I%y<`U;pY5JL(5? z{GkRK2I1+sZK$Es-5pXr32x^c@H)dvw=o&)IxrJVb3{)dmwi6$&ZcXUT~F1yHnnsi1ME zRc3}QVTfa(ea6G`|G=(|NAmO5Q%$|Bx18YMpSbuuDYBk|TUr^IXj#LdL~z;CLAyDr zSh^#uq_}TZiW9kj0)f7yfWnx(1CN9_pz4Zt=6+|$_P0~4^KDcZ%L(oSBawdDFY-0b zlkYM;=`gy9<4vs+>5DwS)8xB%*tIHcB`)P3+%4kL@2UMF_C=3GNNK#y%t(H@*Fl}f zSSHHLh$CnH4~op%7+qqS?3w2gD{RHFuEGs7!l>Crvk$!UJoEKa?Y8KwIao&CDp)L9 zsQ4^0_z4Zw*%<()%=V`;X!$(XD9aZ^jxmV-82wdEyc5(N%w!VaQ}V5gZsL-j)*VXP z+;0L~)VXYNCFUHwr>nd+nir4>B9hj}52*9%3tPCy`&ib;A@(JigS%k@o#i$pAz)do zPUb=@(QamJ0(OhDb=a6`CHBeBdz!H>GRbcL!`g9q3f#bwt{LL8*EscfxBTzea4moI zEO)bLJfr>Y!(?e6eTmqpuJ>t=kz3f^53F3wcWNgZ75)}4Fl}d_8MhH%?Q*o_p!s$y z-Gd1W2OkM$@pTWMGuLX5s~#UK;N8m&co#a0%8ASv)Y1Q)im~)>K3BeMiyjZ1oPnMU zLkr1m7%EXLg*N1S?fW~J3ztd+SmXQ%rTp@U=U~%N6VaDR)t+c7T2Sw>dMs{(j_&(JdPUU06B#j^WvJV9Kh)q})XZNCPZ3c!3sq{r&SuOjccLZyZ z;O0&(t2xqCZn4|CE=62a47hMi?wj!y(l5^hlH{f`Ud$fO@vmLs8P(0qj2Ap;G)ryr zD{4e<^RV5`<}&ib7huiG^+J3fUp1YYO!&pbr-3CD&601IJtVJ=x2e4u)@y#->X;Wz zM@_M7gQxh~Zxx3bBAOuta}Gc5ItgPX!^|WEV!inZb1^;q{jQr=PHnMctuDj2*wxAD zOZIZq=FGur42-I5T)9>y_`J^{9Uo{6!BZdnZ6rw$3BZOHx3)9wwmPG|*5NIX!H*XA z*TltiRox-5j|1)aIfs``*%Z~(mgrS5gMLk%_tV4@1s?mIo27gFm%KB6U3wpW2uvcV zn485~mex;tNW8Nv6v-2+J0Fw@p@-mf6j&tCaEogpMo}7iLNe!_4mW?%DJlbZYbCIy zEg^@If?X(wnm-H4RDQ7bUx#N}m2Q21cFW!Wf2jJ(fGV44Yf=tf(sk&P5Jb8U-QAs% zf`Bv}O1eQn8tLwCkWi#UK)O4n;d{<|@BQ)pdpJLIX3v_n*N&O#da!l;ebCnNF^-IO zN@L=T&x`n*$D2<|--?~HKG{Cx#_K{%p}%PG%I(!U!Z2DJDnJMp0~&yt71eYKAeL&K z_>B;=Vf%9|r1@vc|Qxii({g7aMznhPQY)SGJ$*;E|FlgLXE;A^sqME|+b zhNSa8z7?*?^8K#@SG%$L=) zOZwyv!6ose$o%CW!!;`}9(P4ofd+&zKcJ~)x6*zSS8KRBx-xF~X=!?TGnQ`y^qV%? zw|ld&rgzpwL=j6!-#L0Xe%z_Cf{Hx1JLJh)W= zE8~oVPxDgLr!Pvmr6hhRfHI=Bq5l4HquW0IGP<= zo0f)-5AfGg1n%@^(jLYf1{#_Z-Ep5TUpn9OF1&GkA2XTS{nFxEOn#Jjfl*bR)bv>S z*~!hCLd%#YTRy*rjQnk|Jr3q+-66JWl5AmM zMNJ`AsvB&bA(;K!AnI<}DGdNm*TlA;c6~DnT7!2%=0Zg-Zr(hrjE%)|IvnE8xl=?5 z!mz|^65qgKXM=^}B(x2Ah%ewA)p$|j8@$#SH8BYz_gO9980;-3L_MwQN8q3RsE|5P zc?a%|H>BdvR1-UbLizS#O6Lf9?h9lr58Ta#@$hmD<`aW=!63EO}|cMQJw z&O$C6m9!?o8p9$U2H;4KNH~$Ki4l@{I&UoHt3#9K|0#d;*cOP-5pUmC^@kAgN6NBxBl>i3(0f(JO;>x;xu5+**EU6) zF8f_JDF$cQG|p)1qcV=}7C)OW?YIsLQCjY@d8!(GCM%4X^XuEfTQ*AG#OukMtA(V- z>%Y#D;>xsLu(e7{Y(lvh-R)J!D|ha8NceFHXLFM{-I(+3q`>p-=HL0Qe>|Uo4o^i=HDq&SHDz?dHy=fT z{?T;L_1;A6c=J`DJ_EGJBx4Pi0fOi%xBKI|1cNf=!@|%7Pk1t{LmO+-OyMiLy9uzm ze=oNGu(|gBM9Re~=(4==x@VVH z#iCiX-MQE_sFq~PsVLCUyWj@7D4?7bDG~Cg+~moQlB~7&V?4nLetxD{>hVhFQr71c zuanksKlV+ymvC@@#MR!zu#8CGcgjcFQB+IZ{C1q)S3)B9lW|3omrx^l{guzFeu`*) zyMg_fh+Hva-)5{}wYbz*p;8Ot_4b^dKA z2gwE<_iA1Jr-&SJx3>*|Y8>W;ZE zZ`7c<{ddCfCFHD@&XU2pC#k~NfFfcAdJ!TsHU`{|rzSmsZF@0`p4RUC(zBqUZcrUXGQ ztkPz|8pWKAUUZErK?3Z8vwj6T34kL!8_t6BG5lX|rkE_0Zj>m7tK1sfz~Ph6h=TFP z%2g5Xwo>|9FqUkl9b|S_^u_B-H>1!xDwdkjT~Nr`IIy4#lxoWRgb?~Nv4!>QLcdZf zoR|gwyT$pg_XL-XvDkG-Y|dT^MFIKzW$f)oTnvpLRchvZdxga|o`9Za{w*=dUSWiF zkOan)7nj}3^HYUJ6vkMbT5=PvmQ-s}Q*4+tATYzao|jyg#N?U2Af^H#r%PjWWke;QeQBzg~NHTKCBQy7Rp}XeR%kH{KjW8%6I@* z-d6Fw+VynKb8-Rn;!}^Vd<|F~WofczyHXoMaA9clX^e+_Hkr|G4ILR*I()59Tbj=G z^ytWvKR+N|6wP3tlL|+Ab`;*x@z_IFP{)Me z={ck?M(K+lpC#{0E?xbpFI@L`fzmj2BFa7e;{Ck$(0LWa3p#~ITdEuL3hehw;TN73 zb#}gPwQ6x;T~?b0tC3v8O!oc16pw?v42qAH@0}aPvzn*7>^$1=s{57dbX=;&I7at= zk4UY4##yOs-)*((=GQ=BhZq?*{f((y?6dE^=tq<~bX>%kawAbVwz$B_?ZJ$l8%@;1 zYedFFPcZr<@a=Z1zX_{MuvE$YTlF_y)_ZsLG8>+Es; zf!#zl@s5LCi*8oCqEko_Lb)|zIk;fASDr7WNqvEg%g*HJ=-A|PZ(c%Z_$A7~F@pdOWx%Nk)Q6QhJ0iqFhd`(KwUJ~KGjAi9J&TF8zX z#g$AsM(UXOH3}Y9)N@{!Z3D&M;P(BZZ(JdGOsHlI%J!e@&pU>m?hcrd(g`jcIGxoqhB`yI+WPiA37=hux+c^dsUH zn&eXci?>YYVE9}Co4PN8SrpdY zPmT66cn54g{$sE6$U$ttg&1yx zxQ2c+C*qiW_Ty<}WP=)!`Q0E*n}D?2&&>NNtJHO}-Sg?s70nU{1Z*+{AdD?RgmjmS z5ys2ZcR~dEB4<$Svr?bMSMZ@in#08*!<0%Bm{Tmml}>dLEYa29N%3NW8^lS-$t@Ak zCzZl6B)_`|=N|;2v#)8~cU@OH&kChu`KM@#&k)EGyv{TSo`I8Hh-FJ^L~CL)H!#dD zk+`^w;^=Bg)e9v@T}r@K0NlOF%l-V{2*&J^jWV7KZR#>~T&2&;;!9Ke?U)YQmHLBs zwOFYo@~8H*&`*6Fe)|eoOVVmJo!B>L907Oe&2Mvf?B~uRLc^2$wSP*p0#U>wMe{Ww z9-tD@ybK)GkR?nj{K6BHoZT#rgZ;Je)@iHX(M^4(X`2{k)TZM%cEdydU~{z@r8b96 zHY!6P%C?l+zVo2NB{%CcB^oLlxO!$SMU>u@^9qE*p@N#vNqSRmwlQ9fUVoExWO3TpP+k+t z`IFI0$D}0Swx7z?a(Qo$DQD&j-61$i)#8vcv4QH1S|Kr*g@yj-#it=5a6fZ^Y(_RA z?2&yvwH<94>BjpdnyA=7z%6(8H+9i~IqPh54h26Xb=WXh z!y^O}@;b$`>{+cii#5>E--$lG!G8WUK$I>k`kI`c)ycK<@MP=o7FRfm3`g#O)6PpJ z0_VrjzP7ZX0yrN@#R#kgyB~r(WB9!6$N{E$_9V`K&uahDB5jBj;!dl$_4{hG!q*U zEhZEo&?N`aVQ$)7w3#!7dGC-CY zXP-ygoJF`U^o3b&EM$Zqhp)ao-`s5p-j>K{cJA<0ySxAzec659XjfVAxWR4sS7Wy7 z%{q3#LKbkCYxxE!j-|+DpU(xdc`TTx#g$0ZeI9cOm1T6W5Q@)-5H#^?DVb&+#)iniR$Ld=X^QmlpU)093x~a+Y&3f)zBA_0Olqu1o)Tf^WvPI zEmCv|%hhq?AOQ&4TR`a=oLn!z!e?prs2@Uv!|sKER(;1L4qbZ8SC^ukz3^v2EwBCO z&pXw)is>ON0ndJ=ttGxSG5kEpbYCbgr!w@_NdDAY)eSADzQTJ=HKHN(>P_m1=-XV!&`!Smv) zk4qBk+czHVJAxn3CHeP3q#kA)g*jeGJ70pWak|VT%HnOMgINqiK|W^|PTcde0NqN#toAX;n&=;v5P z#jcdTB*)4}OKLeNEBDNH_B%A7Xo_0LHo)zM9j@h{qb++^P1ux6UF%gD#KaDH_@1B> zj@R!AjtC5v#@+VY8}ataNAs5D>o)6uCE@~$)<(X~IjV$|^l7(``|fZHVdbY^AbS;x zJp37_bc4)x`8{|ZZf*=lNjlX(5~EE2$mHa8a34q=l4b^ocQmWXosbkpyna58F36I( zFCmpqx8cJ34}z5w_zI504))sv$xCchba?Z?)TFEeJBWm1nVL!tBxZ2tNon>kYg1;O@jn>*H|DBn5Oz(lsN&#f_=UL76X=8t_x zaGM8O<8>P(Uby*J9wfCXzebvPPeBMAF99X#rBWC47L*RL&UWQ z_Tn%ro98Pa*N3qZTf$XYYlMqy8gAS#?3ip0(JEN}U|^F6B-6_#n&%01IFUvxX&aC~ z7LXmD6sMfC`j&izH)jF~opVtFp~~a9+^O;-T~9AI@BYi^=bIMS!}!zW^H)ng%OI(4 z&eg(x);#=0%Ra<}9&Dxo99+dNiU%#R_jac?fzU=BJL(efSA^h(l3*s4;|5-R2yi<> z6LWT;HTOzO&F{scP3xg)0;vyn<(<9R?5QiBVc+V@Jwuedo+)*VeTdjZ<2WKb*b9=L zwTr=j8mUb|uR%~6T&)&1aFLj7A@U^GLKrd^3tP4KZ29t`@lBhi=B0pA8)m*dzU}aModx>|t@@|DUNc?poz*Q6|t1X^;d0!+F@7-9pf#d{5;;g+mRa0P4 z%fJY2YI(gTbZ1^PN{po8sBeilO4{ieWYt#}<=4C9U+Uc%j z=22Bve$j%z58>bQpJ=m7B9L_dV5+X#UUFVbVG~y+PE4v5WXoPS(tp1Qkt#G^5uqSj zH2YH_i>HRe{Yz)5t4b+1AwmGdy#ZK0!M)2+D)rrj_xt)`Q~{k)FK%u20pMpu!CmWr z@AtjfEq+oZZvMJEV=Lb( zB$dr;75z?ro$in?KSJ|sy`uiND-cS!TMJx=voLLhNX9#X+v8u8N34juL7DCVSG67X zte*e^6Ro`^`zTf>1j(PDTcJER z=uhxr!3x=d>WfTFAZH0B9A@Uw{^Q)#8_5LC%kb}ZlyXPIL1`pdnKbRSskrkhcV(7v zu45D>-2F9h{g7JYJY@wd!A1?%^WP&0fAbAgT(Zcb(q%h39{qKUUAj>Q@jaeB-Z={VPN8H6^M4g#@o)sa<3o_5 zE&C`aPUHKqw7Rpb0w!qym!Vi9G_~xH_$=}o3#S0$Aj`~$;v)5f>y4WTP`Q{G-2V)A z@Rymi1Q#`c@%Dkzx$9R$*N8|KI|nbwJG}e>F^{}JL;k0$X)iLGrYAF2bGCf6d)R#< z&Xb6(q02h@VryVKOggnL#gLL9%qAIgbZ~yZYE7rhY?+qgJCVB)73)MyuL>NVR7NoL zI7P>J1a`2Tu!ZL+9Z)6wOxZhk5?CJ2h2L>^Osn5jMf9kbD*+E?Gjz zBp3~4OS+L4Qg94bNDdQZIEA|~+|;|uwB->DLUGJ_frkgeXN-^fqAlT%M7W6l zC-&+>OQ5?PU)nvMkpwR9au_;CvdK=((26dnm_2I5=DBy5@@j2>PA|8|e!7e(VX+f8 zX4xu63(dxtwyOA(V*Asiw3^lJPbkb^;6wBAwFW!vn^+`Gtzp^TUmYCpStZv3aX9l2 z0@t{#Bu%BM1HT`D%gJ|RFEk2xee-0_%2bdYwm6hk<(Sp z1)t6!sh_b+V|5tXpR1mnDn86ibAZWbx))`lm?F5<9ZN4m)Muia^a4sL8u~950_gcf!IR!?LPLuqoId>z6$BfK`AL{LBqiNCAF_JDTjmF-Jt3-CU@9w-FQHAKom$X#oVmUlP!{dC^K6iBFDceh|M|$kDwA?Q z65Wd)d5F(fqIB`^Sb-w3n5b#3LDu2Up5ot)l#cx2Y5HNtiFYzu#e0DKgJ?}5TD{IS zY~wg-(y*N-UE|0kX<7!Xfn8ZVPj^_)6*XtLua=DZleV2nX+4<%+8R=f9^{HHiJCpYPR1vY1*(EXty|WN}AfiW?=V` zr#h?$c&^-u()}r}Yu=1Cmy=U{JA$c5AsH1c4?g2jb*69yT<{;E#nM-5OrzbFN2NI= z)OwY61t*7#yVAAvZySRxR>MdVN6_-362rREHU z<#a>WGVCQyGjNIZ8~ZUSI*p|1Uy1F-%OZ0+Cnm);;_FRJ5}{`1X5*+kq}|iPzvU(e z6FlAx)*0S^5qRZ^ZW@xesLhKJ4nL*-N4v72%Bh%CFMvhL=tFVa><Yg;wppXV>U1D)Km_y_BEHQn9bv6ho z2@gdV{n{piY5coqko=QG$_LU!6hu&|*vgWU0i1z!D}^Xl$U=nnIZN&ChslGf^~vLH z^?AD_(xvSqE2%oTTU2_IuU2}R?z(ZZHDwO=I&=PmH`yoh1xky0zuL-&TJfDeTOqIl zhsE1`B3K;_4Su;Vm0`e3=CT9hn++Wjz=W4vgM+anTo0F)q-hb1G!;9!-*ZT=t>F+K zlIOAo-n4KzR^#c@bFnS|8=GVwm6?4Hfnb8lz6Z9fGrV@$#ssTm#0M{!7Y%*0=e4tn zmHzg{Xw`7Uj~+sJ?NuLNFuEj@A0UZAHEOA8g)M$F=`#MQ-<+P2V;9KFIUeFY(h8#h_tx z!LX z-$@UswOTO=!d>YiY(UVanZ&EqRUD)m2V&m{orgM|?=FKKImjJ~hbvVZWRPnsJ=Awm z3rmVq)n&ZwP?%|o`XC?GCK=$r#6}pCnhknXu?+EXGKvaO8rdjh<_ueqdB{8; zF;}%V!-F!U+_<(6FoT*=K!>|^$F@4&A48k|W64*N09anNuQwS=nxes4ozQxD<^f`% z1{T1L+HsQ@VLGa3Eu+%O@((-dJ5~5!?a{xMHVrRz`_?q2HO-17aG|->K4&al5>!Nq z+}#>lC&!v!4@3miJ~p_&bC+?VmymlUo9xwd;8^iPWynNpUZHTrPKfkOwQ_5lOEi5q zFRt8wD&gz%hQoYYwIBh(Wm`m3fca0Vi@Xn$C?(xXDJS{1Wwk-hJ~QqHj(`p!fT>yd z2vh((YhYl!2Vf{Sx1=cpY`ltXWbcV2O)qemnqym_Nhj_WSx*v2@8a4f?|g*C={Gsq z@YAUNO#O&X&Uu9|0S&*1%+8g+&qP>|DTZU9eK>4DyVAv!h_HdY zLd_dMr1zN7ex{8{PDD+}QvS8H|Ckmh`8ocb5SzTk~wJlg+&qpTshS_zvA16f#j7U1CltPE4lueH@P)EpLPf ze?$#=M`nm(O9PJHs~txYa`fHbN`g4%**DbRaav0{Yik*kfL%a+Q5!u$j#YuP)I%V4 znB_@HNJeY!Jq1zM*T)l#`F|4|d~ONV0^V7I&mIw5mxo&qVGmEk2s&-M12okubJl?A z@x=hBpaxp9z;YebFn@%jSY!$M{Em>gs>wyGl_Ey8fjGSE1(EMu5C&|H)f$R9D%7J3j<9qV$6+J#2Y zJ8}%wNmMbr_aJ37Yxq)ig+2^T$ptW78G@dt+^{)56|xQ8g=ql>ofrmSFgyHtb~aUtSw?V}z(k2O%jx1jCMnPNz%GmbiKt zl6>XEYb^TqjADZk181)o-T~f$O7rsjZ|9Mu1pLsMdc%63It3uE{i$fCX^%`SOe~}qJ?A(sHB*wWv^57OSk`_v>-Ew zYHnDjJ?V)nTd>^5iP({+x%^N_X0--d7?QCl7nX#>b_7SGd^+vRS*yKi$sT$M1;MKn;JocgkRHGho8oGT2bITSnBe#(1)YHs zg2WAuf(hyJiDvNxN#c)XH6FbTT$7t*_B8ueoZ>$))uK2RJb6N1lj+nF3H~d<(o3Nu zaKz&jXK?cDoROvg+>lmM5=+!<>`)}t<+D4`WEia6WdD6ix>$)Oqs%HqC#!Ggl|WW| zQhq5Qm`5W4iA9V6(^db70nyT938O(v>JR=H(0knSn3yQ@yOmRu=m zw}WHVThp81*gfbM(bBlyPM{%2BczC3GigX&R8ZootT~sB`h97^Ywyvtg{c3*^uTC? zdI%tM9=19OwwSG^lW5gi(5KEfM|peG^QcbTjlNm8dAy6{xe`-_me{qpUUgPAc%tBY znjM2LO4JrRezY3JBq@qitg^!#J_BIV*^nOsF#d*v@i!biw>!Y!|2g~)*7uB(Ydtu7 z!cPpmHUEAOFij}x4;G~hj2%P&Qc&rbHj~Homte|Q)dbK^T;Jr^DBs^)aTwroq=-nz0 zwujF%2uVv_$gKaDlBs9-C)Hfl}F9u(XPM1YgzzGZwmxKqL z>1F~kqlOyk3AT6#;L$-51Zv?ok2WN>_9zeywkqT3_d$mRe6_ zJjWj0IP3SR;pC9({udyqfYIqq7YYHikmDh|P{F~yym)Fd-2dO5vqznula1!JP&!t9 zG~N{$SD25azWL+&+0bGr!d_yH_AW3)tOQDzj0_Dit|QD6HJzl!Awi`!&)#arisY3G6WaV?o+`lRxw-}6yIsNffrxpR$w;&it0cQfVwpgN`sJ}1~e z?VMqCZwD>V;|2>%4f*TKa6)2;`LyT+g*UbOI_!r0R+Kl8{Ep^7Tas10^s!MpqQuA( zQGA(-m2^$P9ctk*UO_wCu&N#X0dTY_h!a63o6?z;&i^67$Wbc}7%nkFC9Nt~ewlmC zuPGc`9RL+}^Q;!`BnV@;Y0KWpa%K0UdEx)4ACiedzqE`^%C04DhNZ7?&E>+02$^x3 z!sBT^(>c(|o4SR6F%1ek{)?@d?ABMhFpe*ps3H})#KdE2dkvatv#XVP%|pLv$j`?? zfGn9ca>zq_2&?t z!CMd=-=GqhK?95|*m^CcVLk@|z(pfmB5?fS7*^~&_7ANPkpxSbI*iwIx?U3Hsa46~ zLz!@`nZU zG!ko~=g{AeoUmY2Q*PI6F|P9mc|-iZ@1E5mj$T@j1`_PeX?h$=wm0|^nLPPg7sqYY z2yEFXI|nM|csAx7H^3i%&!^CuxxJUV<&8Z;;A@T9J^Jz=*XaQk9;Gp_1OE6$2qdFv!^5Y)k2C?{9|grqi>tJkWppFRdMNUL zl<5eLe3$Ec5lcQ8eGA5;*Ud z>{Y%JPwm)ZbWbAJM{PsV>6d!>oq)JZV#w9GJ5Q z;K2=3O(cOMiy&}RGXtKubzeMf*+bKldc1qB=TuiB zT9XP__!n7jCLU{~4XPZAFY-sXV8(dQwIY7Dkru;zd-T<}E);UqB_kuryn7@Z$)(unsFy1_yHX}3`(MUh z&KG@wCt{gTz0lxJH5`%R@U&wPb>K0o=9v$HpsWXH7;q_CSa=#R_woj&Pg8r+zfn&p z!{myxPQTq-qzjPZktbzX!uPTpY^fyK_!h!T=Ggm5=A#j1HX5D-Erk#a;4y2ST6GLt zgm2BJJFf^zu=V7mB_cgDBs#z4iY+X}ZA=9|o(0r#M_4}Yk}9cODfXR}z15Q9=DIS| z-5O4C)ShGRCjDB~n&mB9?f(9TBkrbWF5szcrn3M0)Q_*ZZX@uLcoM*p(7V-E%*0BXUS$lKZrxXdx+Tl! zvqULTX$+Iw&gHqT7Q<1@{T#NL=;m&s9X?jWy~2)-&7TlpkE1QALrSU+j$qu-h2w z`11HF>-blfJ>IC#Io$P1vLRhd-W(>T_qKCIHFs^T78#I#_z5#Gm!`EXfT8LC&O*Tb zX`rro4NLwo8`788PUG0FNs4C4@N^}4lydebLd8mG)ekDJBo>f1O&JA>!afpT9q5$( zlNe{}$__=_ut;k~eND1PbcviD9?TyUK}K2c^61Ve9)kWW#Uda$DnxDKl#%&gY@X8LS zs+JCaU=YU#HfRQ_zBLT{8ZbGcxwnu>T?2uQJHn8OwcY}!#P|v?TjrX+q)K$GBSPdx zfkQ9=K_eI<|Eq;5xB&863Ew&JC29;IjTv{EN4XmA-@}J&`l0Ux_?lffiX~QblX}(M zc$_gDF4rkNwFLN_i=xy*DdRbiEB#laa&^C%=gP%ugnwxKxvt#kxXxJt6?*fR{nB`()jS;=&nSCDpFjMGpUlXqn)rDN=m)_fO$#CPz zzh@KXwO8Lv@hITAHZ)2)v9H|$_9{&`~LDUUk(GxWiZhK4mr3#67A?;T>O!1d5aY|vK(vGw zq-MZ>?AT5E!POnP3!x?UP&T4O44fb$!|9U8C*EmqNbqx`r%rjQZNV^{RZGJ#M)Z$H z=wfk(IVltw0Z}9X!+_kcEA&*U72U+)i z9O*hE?eibLc2v^w)0lVf-yy-Aza0!Eq*UK{fOugJV3jiW3Yh;ifDL;|!6MWhgwV)? zcw4qgWM+PdyQMRQ@*M6mlDiH(6Ujxj`9Sj$%^IcmGE?mnZ4Cb%v4*zj6+SbR4%ez! zEj4Y*+Z>>CNtMX{tV^B9{-Jr0gem4tT>ouk+4t9{WIX zXXs{odG;=eUhG{9!A#JEXydYX;hJd;1w1(Q;Gh3(mc5rF1B?xLOxU@*3=0cx7}8;; z&mb|jb_6xRc)fAksy1H$2^v8$&Ml{9!k=lD84q^xRqB|Q`TUIZ9D0;VZ6@7;#*Gqd z>N4#mAp`H>!O{j-D2;3aZ-~9^{q;=AKl_yvispc-Y_clnh?>?$j60!Kk~a@KuIz_L z?^dkcGlCugii+$gaGph{E-LPzJDn52>LuV;zxR=yuXF@Y6l(57P0&-QX-z=qcwHw$ z)lXix$j*3Vo}L0!`Bk6h0ABh3yndLN0*qzw6s;{m4ZN^9++5clq;en>%nP9v%m?V* z;htFZ(HnVD5B4*>%}KnmDSLH%@w_sQ`&K09TZ!TUYhcMovqUC{P+m|3#c4F+Tsvy9 zO*c~>jtw)lR1w}PN!u;buiHpDVq^Z^NnhgBf#5Hpb-y74v+q0(sDal-(U>kdN(1#3M3A80Ae4cYlR%;D(b z0po9^V^1Pzjm9at!R+5-r3^aHdJu+xeY$7%Bl4EW+A<#0V=U#odp?maWR`>{a1h@- zO|ma3baC3N1IH>W68<%c7+3b-+qWUqF%EPwbl}#d`J`o2;W$WCEF{ncZcg_5Wx0%5 zUGWJ+zN`=huG;UMkC&bwI&627H_ERQI`N!qSBv8QqW`s-ccuS__;%5ad{hvtNR_Xz z%*B)Uo$*S>?{v%mwkkTz)(EoJ=D=TUFt4h>nVvvBu>$*fWqzp4z!)@9?q9$wgw!~T z=wt@{Xl9IDN`4@DiJ_o+&U9EjpqdbHlo6+sspGpx(6h3Bty-p&OBaR;g$Nd;?YS`j z$L3{HlF_sfO$JkF_R}ziL1X)?-MMJg?vOgqamP-54#qVqxx$)#{2Q^G{cE$fX_*uj z%_>g}Qz^c+6(dSpjLOg-&xZmO)CS!!fdy-Ov_{QrB>{*A3;1@8PwT_c^@iE}sw!Qp z0|{3w^$VzMvizJnhlG$067qpL)jgs?1Nj&sFAL=yI7;ayxNi%&$+NDUkmcU%6R}vzqfG2%4oe?|3QIIBYR!@BiWzfjj5PB*u zh1j=Gn?Q0VG1~t6&S%;-{(AhrlzGuCD7$v{0xdVSfBK4rYD@!p$}Pit z2+n1^u0GGxeD~4I&+_y(?oBO0pClq`cWmLr4Isxjl!0MUb+Gvw3ao;G!d=M4yv2L20R&h^<4$~8MsM}w!HO9wr1-{Q`{v} z6dPhKnmod?I!x_E3f>#3j;?;b-e`uKVhz*;k4wW3F3v(xFV%*}?xgmo_#_Oiy07DY zZQgDQCvi6DV`*dO4Fp-1O3eLqZ>bv~c^}F_?S&W+Ct3#RBswT0Gly#?n~Gr!0PlY zKL#7ZdJ_Lrj_$1$3-p0-2^wycT7KL7zBMuuue^x19UJ04pK;>$nus zce?8mPSJsff{RN~UQF*H(b0mzj9~&#ZiHzhtE<*(m=mRx&yfi#0;8I36S8|a{1RP= zJ)V^$pT1R(sF2;UH*)t!uE}%STRR+tD(t@6!~cUUIkg$mF4mNUc5XYx@>K+-@S2f? zgN7Jc_2|sFWZj8HXum6>xb(kS*kS^R(eEFrfVo_6U=|sawDp`wimYE3N`5XBN6k)7_{-1zKjTVC5t`otwHC`!lL!$JLtzEg(n359{i5-~5G{Rp8(K*x3E##m zdGKP=(puZwl8uwH{ct9%aZyeSbzM{kMlG>oTg}!ZW~NGhT8-FTnmmyP!h?ruR@b*# z{|%QLhHMf^Yb=;|MFIwy0cT++Y03;!zv^xJ+V+ApoF20Uvg*RatFlD4#6_n0uJv`w zg@Qhj9&iy>bE3o9yJr2l*#4;8n|Lx_UZhVmZ}#iGX+}wF%q=N28QS~5ePU<%43Wjn z6URumH%y6R70lP%>Zr{k>~o>Rc(CW3YCnglVE(R*z}7A%q0$qsiJSYWA7Lt3N)wJ2 zX65_0+IOTLl(R^Ud|Sc2oy5_NgfaZ<>WtZC zEYQpxMh`JXTGx~600%XEz7XmS zDJpD7=C{Rz@Hbvw{fwt!*&1Xnefrc0+oWzr&wOI5AJcXoaBn&=9m4L>eS%kD*$cow z;R3ea0p+&Bm>xKr&w?F_i2*H)f^p-`qTV(U7WDjQHnjHeyyvP5*97wG%NA;3^4_^} zdX~t2q_GfHT54|0=8#v^lZ7b77w-YlZVTx*wE15M#7{^JQ2%Z|=~7C?ORF_zr}3lx z84x=P&sE1Rwo#+yLtqX0JXZ>YOl!Rdo2ne;IWsh(JR;Xq!*-Veos=w+<(gK0@Ce&% z91>oKQLcU;zGT{C3iWn%of1qC^E|%Bheg(=CopI98G|hdmKV;Grl64 zOs%m6&AiVJsV%31j!=vbk@;{2c*d(liFa)ZxBx&s^`-GkvC67WQwK{oWU9O!2g7`M#N1%Po^a+j0?1 z8Hp^CkGTbEh|(@HvuC4nc!t;N9P_vwC~~Q6FRL%;g?2i@~qMyd1o!)2$o9; zzpeQhh_+H340#Oxuao7pfpH6W2q7#>N)DS#<^MOAHPE}ZGGGhPDyoa8W1Y?w4ah^H z&yrPH?Fuy&;@#h6nbb@tTv2yja7r*C`PFDd@k#t2-?In`ZVZOo6m$T`3PigT=W^gr;XEgGhyNSN!`OQYw`S{ASuVcp=XM#3LJZRzK)m+F-KzgDg;pE zBoQKbE&9lkW9HvqxWG;xz#nlU?cl@kgRc~21#){2jN1L*b@MC-EP&N#Aeu_8H3cae zwo(14_J3V=XkslPT@wEXS1`MK9X?gjjLB3P%bOuAbMII+bqBGe?~wnEyn3~=jC*~V zEFlob*%NJC$5u%9MTVpAibK@nLnd9($ED2#n{=>U=q^=T2HZ8}zJI==Levb3a1zq> zJ4V8{WzQOF^f9GycwBfQo>_DQC7+W$?|pl2z`b8Q7~%jPZD28gwPJSX z!0Q0)+fgu}R)GNOf3DFi;t?W27Z8rvl+SMj&;BDiVN?gq})o`ZDU~dOx@83H`Bakv8 zn&{)fnCo|<4R(0aIy1I=`l#M<&Y{;iof-slD#2p&CqsD+cJZfp)Y9916X}{fLf;~* z>i^f&WH3{csYTg<++fu$_mjrv6b@RLsildgQ@NZ$(VP65ZiHF|HZ(*@o=K1CDr1x@ z!7C3V-~lU=W6hj|zhTtP8lZ?029Jntb>7#6$Bo8iVat-}*AeWj_Ieulrox^j-s8Gd zVeuguj1gg>NGzzFDHeM}PzptiyudbFyL! z87Mbz?55|IIeC}L#h$@&yn?JT_4d7sp$)q57=#anqp_z(a(kB*kfuW;ekgbOE>6Z@ z=qDn%SE#aT&MdxK*rAj#zUjN;$A{n5gZ0hl@vgia`0AM3sOPBF;I`0u>ZMZZA>g$a z8~ljVuthoFH%N!1MsFho%k63oO3O`Wb*i=S4~r#p?SrsYIj*B?>5a4nc+oyZcH^QF!goEX^ig2KwfX_rEv` zua_MW>Z+e6Yr!jXskjK&DZ5)d-9P*P2(<}yJa*vAdUqk~6qf z{N~sbcv|ozn3CG*HpF*iB(`geGTDiDkNYyC2dcxxe(EQZZ)h?2!pq; zgIK0MNpklV>Yfrt7qMs8>m-b8ts> zV32|R_5k@G9=gegd?6vKBl{%k=HK(19N!Ig=FPfNdHo0RJ$3KdOL$;^K>1`>FijTBiuzzxk0 z#`^Fdd;hTkrx65ll^QN%=MD&s=fM|A>TPY1+IXF!c~*)S)F@_;X&YumR$T8r7h2!W zLSMprH7bG((q%o0WJ(^9e$TBlK)I+tcICpi7ORgO=ofY-cUxM_OQK{aq2q^6_Ky~m z3uNB@JDZF=evJPFd_`osP`loISfP*>?n(twMJoLE;`&X_(l{C6i29xQ-N(;1^opAC zJQ6{>p`)h?G!X79c?JS`VOJ|@%dxC*7~keDHf|V5^OfMr^#1ks#uVU>jAFWJDNNJ~ z+!tFJIQ-jH;6r{BO_8lke@A7?l)BB1VQGevj$hSxPk&40M$BWp3ZhQxA`MXe1G&9= zKr*oSOd58{=mZz(@E!wamV7+~E|3&M=;8e@O2gjvozod!hH>EFW^?ej8+T1wVkSyrR? zZ*atB1kUzGvbx0J%u_gW1|F@0dkZhIuMyRk7!-}PwPZ4;(T{?^cI^;{SSWjb*kbwQ zhFn&VhOQhzSdC!I?WCra&=k^FdGrO2tWr^gbYk+aME5@Mwa=mLn+DK%izFATnsTd$ zE>@&IPWcunX;4R79pyF6M(A{+8^82b6mTq`x+|DaH(zvcX)1?c>$S<{@UceE%F zyMF`79&vCk5~r|rLJ6Dzl2Q3Y``%B}e-F2U2jSam8H9vT!L;mVz2)RtaLI<88h3rh z%y0G0FzGudprDU8d=rPkwxQ!k+gPq4t!}%** zT1Vu4!;;7?b@vBDCqobdI9pkSV^!<*nHrV3Nr-fXY00W=3SMePLcy?3xo}4v6SlK= zm6AV66SToDTrv66t8)HLyO?i!>>|o%H?67mQYjSM1%Tem-VqLTVyyaq3D3YgC-7<# zxI&P@nF%?WIhkqW5FpQw)5tv<9}WmQ6N;Xa&J;eH?mAP8eb4xUh5@-egr8g zJcjt>=8gG8%@5VQwB<>Ft2nY^Et8t4CvI6R&}6=kdv@}RL|@LmjFo2RrZiue;cM{) zl{`MQ&hs3{fz&qMci8H7 zS0p;5IyH%jzCEQ$pr7Bi{d{xkKWt;5Z#9s!GjM#_t1*SYgstrM+){r^uFg$z$vXww zcp_>i^dB{PIl&dNg8KIy|9E4#geK7r@UE!fa$}3D_Yl)^Dq_wqL8{%P((V3&!Y_F5Hr87WHWfwMsAcSl3|L#V)A&5e^$vrZL) z!$B`H@;1Vqv`87J%lU4?E=X&E5P0PNP6znOAKuV%p0|P+adIlt`Y+GkrKD}KVgD6{ zAHY%gp_Dm+qV@!QM=l$g>g7|^-oq0M>VfDiK#!Mz8X_CFS!-3ZRx-c16FP<*$Ph#5`Kjv zqc@0!m|7h!6%4>5Yj~qzM6x7){^p)J7``taj4e$OH%9{s^&**ubUYcquBYRli+wU~ zhKwvHrLOet^Fj>2Azoxe(5CQ3fY@W=Wsa=Ykk%3fSL_vOT)fwSuZdXgC4sI=G`NwvTf+}|D-iWVgFUI{?ToEErx38h`r~m; zywXrL$4+M3fFIP8Pyp2td^EK&8>>vwD-{`wUo4JD#U1f%#`T~`qHJj;E?InO`WDZp zS2JM_N>9sRJNbN@B z$t}a{)w!e*_EaE9ieY%rr$r~Pk}w8s3g6>?&m7`g``C||R>RqTRSt2`b>gHWxP|@J zH3!En0g@7!tl&Hc#fLf!MhV;nZ?i`aZB}&oaRYZ1)SI@Ys?alVF!aU! z`L-Bo0c`kUR5j*}+qTF_Ukj7j+_Z}qU6Wbg?2yR?x}y-@=f$5a zk#;n-MWAH34i#6_I+Gf!LFF7C+1pTjl))C9R^iH)-o{ zTg_a$|0x0zzyY2B(d-)5!vUVBSok`9`J59BK8bDJJIsXL*D7mi>j7`dj_lP%4Oq&l zRB-`zXMBWmxXsqULH$-8Q)%m1!I*?1uFQM+j<2C+a?Xvi5i%blbjP_Jwn`vc;lEXK z-02iXm}jR4Su@@YE@3Kd4ICGHN?Hy;r*;|Ahv0hIAn`^>U#JNt#}|UC1iKO2lI@(& z>;|Eeyf;GhQ1K%E@-K3=5PFzxa!adIFF&_kKlY;v=~(*cFTNhs#gcnQqKo}#*N17tLyRKoy2BF3+u>cAs{r35Yf1NVKrsHmte0BR)!h=|8N zL@|q7%){f(x1`RK6WnAFK>k!1KXj8`uF_yxY7M1^>RN1RYYurEsr?cD+u}f`(6(-+ zY`O>t?TiLADg&|p5Ohk4fCk;5+(?3b8QlUs$L}HGux1i7MdB!(8C32a!nXS;o!u8y zu{}<+nIo$7Vml!TL!b%!PRwF>Is@%Yx>Rc>O_*2S0%}|gT@4TE)FYcD>v*b(3;pkr z_6KB!1A!JL$qQng)ZaiiBgTsxy1C>neiEWs%ZeM}m=1+dKcjD`c_ymDR|;(BzZX58 zt;LD827Iki{-#;90yPiSl2zVk6b*zb*)NC2s~wR9)=VqQhqo-w2igrq$k0-b&eC*dM>`sn&QJ+;6PoO4gvSU4cW&%WB%`O0s+}VqhhAU?MmzNjE zhuyTka*YaYkH^OB1hMe-f7YcPfVh5MUjHc52q0Tc(l$dY4CZxmxW&sW5Q6M%Ge@+@gOvI2_ zr>`v;TF6%lyq|-Cj~3<>mgf8xA=Lhk)H-^pLrzVHjpq&CMk=3T_44mVM)_0rVvIV~ zkPf4-Mih`Ggq2Gt2VFe9Lmo}n3N8CzW7&^YswkHw>RwD5+1zc6l2RIsdjNg;mz z*yJjfd4MI*Xu@X|=P|b==L>TIYi_;TszvD7dh40!H<=q=&}f=&viG!9)x^GlmIPtXy)7yVJ} z+YV{{W#_Oz+!dhtMZ6`P`JMZatvU^o@P84a6cw1U9$cO-l5z3GS4|1-$Cf7!{B%g{ zdM5}Yw5BZ9>KisWUQV76vp*t%_nL2@gLBeu{S@z@WBMCIZotQ(Lks`=tCy)X^LF-k zB`q}O+v`}?$x7RwiI1AfL`FE6-40w28r61}vQoHAwH;nQ_&=>*8s?(gYLUA$wm+Ik73F!D&eI;NUJt&b z*1<@ZlqO51>WxZVRMv+CrMb^IE;m<4qe@sDi|Jdz5_FK!#_7klkN#x#LADD7&g*{` zlAO?~VEzbmaYfTm(@cfU8_4Jl#^>%V6bLtwP(Uc9lpRgOJn$Pw5AH$Ok$6<__X>dZbhx zfgA+y;WPt>b)^r#l$oPm8r-RmNBTK$XLVxABtO2WkbMXnjX+%3k0_pBt0?G3^3Z#r z6*#5-z`iVRm=jj*l=v$j3_qPSSb z-hoPswl%@=Uy%eR!?pF`^~?}Kj=}?NcHWA+r*p;|<&EqfNsdlYw-lu zj=vb9irb**)>vw?#as2-&+#Q)P!A>Mb$mzae{b^YvDJ^T)apXlt$P>q_daH7J|#ei zx;n;=%z(EZMdu@m4qIAoU{%Q6dZDuPdv1Kci zOQ`iPqf|Lu8Qf7X4yu7;EJ|3uq!I}IL@BwDrGi>27fDW28Pek%g8Tcdd}D&ief*Je zEs@6E*MuNFIDoNV!Es_R`bDjsJXCdvk)Oi*$C_%W?VWF8uo^t?)u3z_Q@xth_c;3e z7DKnJ@~(L8$|16_w*1$Q_)n5rRi_3}LKb(;#Mf%8Ep=mVFjdW}La=)dbn1{5Q3CY` zfJ_W6Wrd;3an#o0q*w2#D;1@F;{GkhC2*)5~lbIyl{EiM(Z)t&!tLqoxvIi%2z zT`uTUGH}p#+w!wAK7#G5?!lIr!f{7nFH0}DUOTAciAu0BVHnu6?gFez60Y0oOasVH z=3P)@c9P0inI0CL0*a=Vg*L9P$$n?;=fd}Z$Bf3o@$oggH5)hg??hxQ zoX!uIChJAK1XZVKTLIsDw&&jt&#=mOx3^b-i279ECD>6F+32ash^SpjpnCE6V#1>f zE7x-i;in&{!f1S7-EYvtH~fyPa74l+xHv@gGi2l{-R0fwM|zDdEnT704b7yKlr!r< zSyN%kd#tzufr9iJF+O?oOUBR+qG&_reoRVJndg-5Umv4t6rpg{80~2G3P{~jge%ZE z9um|~$WH1nO}krjRg1%agcFZnm&XkLVRXz#igc_ZI}ROL#;L8gLP-pF7XE~p15X2T zsnfPAvnIHJ8a1g;rQTxtY$q1=WX0h+Smb}V>HN0z1fT_J~#I2jykOop7 zS_3DN;Xj{9BNRBP_i5A;0#$tAzw(WL;)!AX<;NF6YyO@25eb;_OXqI$yZXO z1j@SJp1R5GTQ*^ZpQ0ul9>W~&VPloeu@ZP$yY4A{*B1Rqo`>R|;qBJiaL5!0FUB}0 zF9>ubjr}I?e9@i{;$E#k&9XlCvi1N@AOU?`i~3L^PYohS0I8oVH%@Jjxcknh8;%T6 zq~Y5)dLA&M{+_iU-QH&1=}IoRyIyMoMJ(b^{Q5lkmfd~n2&gu!Vg=6I6lqaJ5*JB- zUj_#XWX_X?q(%jNra?P}N-t+gM0VlglU#A2N-ic|DMnB+3}sX&6b^;I+C#XjNiry{ zBX%F15-HSv)nDp+>N8f5ys7!izBD~T(subQOkISR`ktY?D7zhfvp=sOZ1hVf{iVL; z33gzua0ZgIzS1WiBG~o~I#Qi(5+Q;7=Vu0d0uuSp!jy&m%P-i<&r=E3fEfSxVbt1q zMcgQkOsnm91ryVkz45G#TpuGSGYL0dpAJMQ*7*yg`IxerUpt=M9zT+~aoSmb8$=Vu zUItmfnCvFO89{(Ho4)9_rhut3Ibpzi%5fj~(izs%3!dlnnzVnX!pac;j*h|OdN!w@ znJ9)GJkiz$TF^u4ds)tVA(-m^Be{n$bs+R<%g$#eW0N|LZQ` z&K)q3Q!FKr)dhI>prDcp!gqu8x?vg_<@NOSrWs>*o>H4TLWdjfy5C+L|9ojKJ5GKn zQ!80=@bpYS_1~iN4?o{`sO*+@wrSzM-Q#J6euN7KO$-PfEy?E9u&qq z;AZ=^Qe?BQ7DhY>sxSxow&e#$`LgnJNheDbPbiJZvk|djg)PjvmVFnBVH3#x{OWS@ zl`Px$;al2!G5-``6yYT_EO=-zdPMNZ#_Ys-E16ua(?EC@a4PiN_Vc$*6PaMfSr1_k ziMFI=!mIetT=|PXoQt`Mn1w#Isuex`fm!+N>j4y_4Xgj&4>eGDr}UVBceY~?!0Xw2 zx9;q&Q5ZE5{P+m;EaqjdQ@ovBT5|^qWy*d>YQxEiVh%ok{(Loj&ty}goVUlBf6#NS z3@Dc>c;YOBt+G(3GIVad$w(BGV%&8)0ZkqRuN08qMj+fqiT_c_2H@A7BN85E*T~I( z0XVKc4>s5{y={`cQal5-7*}`Hedph&&QR{UD?mgUc?y-mMp7x^TtmxXpdLd5Irzm| z4O*^PjP}Qffw&5LR!b(hWFef9d2L=qgM|#&*`~f=k zJ-8m2MG{!Fn67ZXiE)#vc~w+W>RoQIO2Vd7&V{CQ`axM90Z%DjS}OE((xA8>b@CTf z?ePl`33bnH+t2k8HL7E*k8$%@b%N^vQr9&DO?gCrAs1eg$YYVn7Ky6U1f{@C%(riB zfzp3@Wl!6?j@uJSETz@inQn_>(CJeqHf{av_p#6Nd(Snl`-6~cwN2q7@KiE;M!y%O z7NZeUP$x}K8q?<5%k0Pu1-8){?o9?&^RQ%O6@5J^Ua5ZIb>2b1Bz1W(>(i~moW}Z$e^29~KO1W5lUjVan$86-H$=VP9d06>L69KJ0Yektcoxeuc zX`PpxQ&iPN;bdxpROZ5X$ zDvjr%-9c~;fIZTS?enn_fl;a4>cDoheba1lcoM2@b#Q@CBFN!)!F}BioVsi z!dm?S5FgCWIonzcDBI_Y{@p%^a!J!$2@vR(y&%c4M)4E#7dGm_kC7yn`01sxrEni6 zMx6)>dO8f~d9}x5-eHN;j2k8MOq7^WU=C$ITNn^V;+(;qHYWD{@nN`PFhM)(z=T9O zjf_;~IV(w;&R&Cd2%CNSoL`y^?~pORP}TI~xXZF{-tq2ddww&=OLMOO!zJD3GSsAt z$!BbjrU&6EK_wZ}?|33wA^i#)kM$0?|*OvvwqwUI$3KL2l+q4I9z(v+#md zo}DwgX2cGWBdUrAyK;B^wE2IKU7#v*M+4s`{{^^c9oqu;Ve5|z%~$1H!J}EsNvND9 z65}N+s$4j#Qci$JdN;}K=^r?<*NbqI{fV6MPrEnZe?)n^Kzn-!u6j4e9sFJF{TV_r zG}H<>pZNZ$a`~L>%{HhLVmKpuD5fNQXGo#-y-zQ_7(u2{`Htovxb(gr%Rr7jp5-2{ zM%*+UB{)D~h%JvQP+zohbhtDkB5x@#?c;5mp6Q**bQ-$2 z2@9xb5xPC0<>*(^s@Lj(PrPpi_4tQw%|CLlg>Be1S`M99_G`WX7TNN{2f^O<^54G) z2NENGAa^lwPa|E2Rcm_&VJ_qC+GFl-o&MRFSX@=znO@+htjqPhAn@GFpvw=_cm7fj z!L^#LTTD9XRzuo~Xal9U;*Fx24TR(Wpgo8nufaq8>zD(MsFIqu>0@U}O%Mo#QyuFr zG5w$f)cRZ55e$^|uRyy-vVN7?+%x&II*GIQ2uMky1_uW#$WF6R+W^+EZxA=Sn}F^& zDsXcIXtfX>Z~O`tt=a9|COQ9_!l?DQbgih4fh!>)A?)ui3cZ2$GKJ>FMKY%ZS2Y_O z1^5p7yePo^EVB6#!EEH?Rdo&n4qY>GPwFuk;Vb3$+aEAsJdHlFLX=M4zyDS)qcavA zL4fjIX%6m4%qr_?(4T+eQQmOoQ}$F)&cRjv$v~>Z->mI# z`Y9b8_?`Si0ayC^UBbdK?MhvuBgdFtBq-uS{PKR4Rv4!XHq0|~OAXqL8!{mC4G!5R`w0x5y=1ERaF z2H+>mVZI0dMs@@Rzly;hUn~v6W*vv{G9G}6)gY4}^?fe7#q5YpePpgXqF_~`3oTRl zXcUTV**r3*G6#0(NUeLp<2l4L(SUJ$P|H+8==Id4C%V}Bx9w6WI#-dQ!qQ?l`QD`onb;Iw)JuAzfZ2SyYI8W;oMlp7%39s>SY z#q=}uj=2H_B-q<)Gs{z}9adUVca*ejA)I&O!$K&nb)xDJUsf5%h>H)OzEy>Z&s~dK59Z~(MH06 zY@}?)E!CFFI&V0&9k$XRF_2w`8T$*8A( zuzYZ!A_|!zV3z>&c9W7wj2e%TE7of0zUp`riRUJp?;&FxjR|i%^`5srmucT!IC6t` z+uJIP2^5*k*u&WriIcsF@GAM?$W2vTXi+<-2J-Ia&;^TOU=V&Urw zfiVG`$i3M5vXnsQ&M$o9?cXuaHd{dTc$=Mtp}{A+CuIWc+j|azljW>P*rf!1po+JC zI3P7s3mOo(DDsI9L60K!b&{jLjAI_)p6_qlNc)Y2_5+=ApS;5DB5thI(85N2JS;(E zL_D3Mb8C!5Vv}|%VQgM``(tlN`lY+zREQJV?rv>J5)yXS?sITnW~3Ibl~HMCtML7x zzYWPZpaPi_zrlf)o$M%-_~X;Q!*w_(VxX*5Ms&99&!gYG*=Ec=I87&VN5kvC^}XBh zhY*W9?&r&c zV6?u17dQ!vM&wjE$GhXRKt(*}vCWId?W5KA%U*7%gTcJ1U9eQaL(cz2=#c^%T^kH~ zPGI{N_!+zy(~TGt#VB1oRv^Z3YVv!!<;yAi&R%jHMb#1xSSO!8nbdANy z$&jL+#}!-*?oxE*;}Iyb@iH)2q0sofc+X%Eez86fu$#2Wmz|a=*gLxQ&?|z;zB3hMFf~no zV3nn{{jm#O`9?>lDtLWAC6EwWU!(8(VE<(2k$%0!5Htyd|GTZLPxy_DD;OI3JZFv0 zAsT3BZAat83thzyNUNbWk6(NEvdU+U77dZCP_95{D{M~<}Y)0`36kQ!0q)#djyY|@|6bm^a6&MN6BBiz?j z;ui2zy$Sl=d1FEJ&T1mqo+}_JP^84|zU#3Dv{mgowbX(#UDkfF10HqnQT@DD?;(PaN} zGO?Oiiu82-3+Vre1$;k*1>=4C{g$-bwfGm!cA?5(3DT0lZ%3abl1auir*}=ekqT+o z#a?iQMr@!JAj^4tmW*pnzc#guL-pfL@@^k*^lB=9yR*N=9}pGYr%mR9uBHd04SG zD-${}P@}4|#*m!C%);|->b_x()wZ%t*voAxio=Pd)B)=FPFI%J3SB`>cvVb&XP~uO z9|OF*B=3C!lnG?y-a*oP!Kqk%Lm}1=Ar}#n-qU=~D(7F86swciVlcz^b{{WA zlkYiW8(bEP9gk0&?_1poiA9`|yKXXAt$*pacG-9j%=>Ke3tHKh{k*>a60)xh01qZx z4K0oaWe)hk7{0(=@I5-ZE4RXr9EcPL{EqiZs0{H#{7gZl66x69$ju^0n;ZOW z0s+{4I_1q^0Zi?CdPRY;1A?5P$`cXq5Gn)DFtoUn4{3ifibY`sriY4rZ>Uc^(J8d& z7<1A12}3<89LU{+zSLqFXu1m`|1RP!*gZ~y3>Gno|BDfd(L&ys)JvH`(jk1izZ>6K zEkFAdByOn6XDV}AQhTjtPi}!z#bf)?d5Gv~cO?3RI!aez|9p>#v4H(j?&}JR6YG7e zJq(7HxUOoq*Y1f?p8rmTa^LLa*_}>{ZU=dP`v4E5)*znTO||YNl@A#OVIy$~gvXi> zp51yIpR;}3=Dx_~XWoxiUYl?CKV2=V4vvF;x^IOKj?W$9#PRYGDa%c_$|II^zc%8| z0GS6DygkB&*G961cO?hfWw#BfW}5%tbyX^qdo!FU3M0PpbGl={k%V8a(2E$4LRoJX zapNYg`h-V|>@SZi#hBzF_hi7DX^p(BE*pa|mq z?%ja4S}&YIaXr=B=JvBS-~zFzGJuq)4#j=kd^sTr6XxN#Fhina%X>POE+{8$O*|v+ z*XKj_npvyUpl`5I4UZHvnPD$Y9YIeYO9-2yo$zq{ef0e-YkpOoyq6NFZZm$$WI^Hk zBEruNOZGIkZ{mp^fHxyP-Rv2j{BCGAV;Fbc#?~Fp|%(LRg5*QBNYN}@iaAIlXJ$_`KWzXw)Zut5=)CtX%%2F zdCLV*L%D6%1Zn^uCmwL!>9T0eEPzFbqQiO~B4;}|8PGos8aqBG?{ghMczJI@#4N>o zQ!-qLWj(30DnP^Z2dpI5ie}8sVn~>)Q57P=agC`tB&*nOXuFx@+FdDm{OyRVB?<9k`Hw{!^K^U3@cPkM#$~rABqM_Ca-oKE za>3{OBsnuGSHkww6i*U=_|v4rE}Se3|J&4L|w zD2Wt;;>G2ri@y!QRRk@__AC#Cbh+hyz4(6VQ1-ffOcFor?pP7B4S{*=?)}7NEFmx`dX>R5Yv1370V1Z- zs$0C|)44k+S=>FHHSKBJ`UhlBdEU6WzBf)x5@+3x?Wr3$&Fk=K26g-5X)PyLXva#G z>2s7MBUIIN;?eH4U9@ZZC7kW2AJVgR658ELJdQl+n8wI)D>Mj&o=TIis1D~mFkK%B zPD&75!yZ-gtQ+d9|6pLOr=0wVrE55JyFCl_n)O`o?h-QuReV7@i~i8&%6$5BCSc8R z>z@7oIT%geU50p|n9bX{06!O6amEaZzu7RV$gw^Yz0Fsou2OhQx%O`e_0$=X0%T0g zw=Mf}1rn0x+6C68X|^*(3hQ-_8Jz+ zgj7I_;{PiS5d8043NW|v1E-H3h#{ol+{1Z#aZq; z(L3yK#|P#~2P9`qnLuSvJ$#=$qUxp;P{f6-_zn8JrYfdj4*svJ*|@tv&>BpMvP?5{ zhmI7~;d^+v>Vk;gmjF4}s}@U9(;mVIWuB>qMf6lV_Nw&c749<%p|dW4)#ot*yO%-fQ})gwzl6RtWTsk;h=Os-}y?{iMTu+O|G~Q^we| z@mG6YLFVOv2;+Uu|llIxd%Q<7S`13$~dyL(M9RsR`gJo1f4cv;m+N?2t{r zsWGuNsM%IUh!?%Sc^_@_SutMo^B|bbQ#2zXdPujfseoX+;(ttb-aN~oHAXXCV|@@J zYk$sVw_zA{@s6#Xl5qlE-$A|q{xLHH>%&Jca3L!Wrgu#Zdb#XMxo?p@e=s~z=BKHQ z00aA|qm|5KsQi6(xUg^WMRHXr6#-8QVJN0mG#wG-0jF$3&e{N1z8sxz;pv}x3u*6d z_y+vjzAlLzm$)no613Lg8iCpg2%FZ9rnvnk@84AhJg`?=NogT?UyefiTy`+>U(0EV z@f!EB=-_a;xUOvxaoJA#-&0j6ZyCQ!tZ6+XY&mMHn72@Ua)AoIIE?d$9M<)KY+Wq4AzCSa%;I?yk>xf=C=pe_*i?7uH=31HwmE}H(W=)se}f*WD3ZDKOnH>e z>GqWJ-yyi!;> zybCHkt(Krwa&SO9FV}6gxpeYI?%q9rc!6sYHKa?68TFnQstIJ4)dYGfY>1U6sT#^7 zmMW%SI7zxTMP0ygM1v=8(J?K%Kzy+RXT<#1)|T;@9C{_DwC(ft;;+ksmq+N&eqhd0 z{ur8w^wa*?O@g3z;`r+Ldv;3bbRTkMrmR6VTYu3B6^KKaXeiv>n0+_>WGxP*yu|?( z30!v85xMk-zGaeX^KwbtoD2=A0c!ivL=qj|!;75pSgx|Lg&b_^Bk|SM~!&FraCwKQIGjQ77b?h6j*3!Jk$dxDg5FX7M~uk4N3?W-W! zjp@00UaUC+c6d^V4fdUNUZa;b>+hn{M58TLM1VS0QBGA&yS8~IX<95$XI_H(5T074 zW)&oyrOYg-RBkMBgB9-Rr!s+I9s3mtiBg1H;br=3FGSatR!KwYku8_rpF76M?spXv zLX&PBnP;yBFtDypE6iDj7=SE1jrR2JhOFk{Gd_AoJg<_Nlk+W23mzJ?QMZX7M?-wC zmhhVt?^W-nBME!PSz`y0Z9(u{6#?XFkSNNV=S1=eWsseqOuSTg`e{9Hg_#(5NFrw3 zlpiK410d!!WDMQ)Zk#3Z*CNWzWpIKN(IQ^?8fVQPeGO#=>CrjJ@(QTG;@lTRW&M^2 z>?@LZ#P5mNwtKYBO)I%dQ@`RQW1XmI_+{4Cp?=v0ACwj{Y6M57Q{f?WSey`GtrQpjoyQYzp3B50@|&C| z>{^&woao|CMEhC;w1)I=x6AU&Ubju3Am5)jXN`poRc)W!HK613x3QOCuo1G8r`lY> z4Nir9Q6!85U0f&h+g;hDG3kR}aa)TV@ky@(MaLyKH4$(oqu3Dqvi{DM?6b3e6(~npz*e3BI(&*HggCSYe<+e>NV%~fb zqLBCd7VcF!akz){((XU*oN~lhwlvUeMtlTAE6CZ7FydpQtX{AF@J|I00HE$Gk!@Uy(jK)y=i&lN_c98NU64O*|$9ppSN9P z(zZvkgJ;r$E>B{INTuk-bXM3emFboL$k|x79jmu9QCAW`-8_Z&+HBlfxcb=ke+ae! zN0o9?>O2|w_;oEqNEq`8&bFiYVmQk~WwXc`S(#Dt+iHAS9y%4_`!0)F85dBoVO4Qu zCCRW2h2a(Fcvg+pm+Q+d5_LkM%e%wunzZ+{o1r33a^8s=zhx&3{N$IvtY);NL@{rZ}fNY!+q@sXnS%B4vY zfsJN3o!8~kv4nNENQ7uE{89n5BM(vU^vTcP@YS^J_4zZ?C$kIkx!Zm^8QgcL%i+(b zGVbH+%YwkVbt4FjVucC)n+Pmbg2A_yiOl?SrNg0g!r+nU2kN->>3X2Bs%Z__2`3}$ zOA>l48bjO3hBWkBw)g`Pl~LvM;*24w&SiypM(`5~C>0y(uX= zI?P2K_+Q;kFif}t^ES)&wczKIFOfZ;j)T3|ym0U9jq!|{rTqjx&|dW1JocWyPS@kL zos$Tl94iNC-o<0gR1zgN})^#6k-HXW-ZTy{6erFfekoWr?Uv`S;Y^ZgOm#Sqzcv9Z2R3fcC zrCODOHs6*FWF*rgcdw_=Rx!r4(_AL1e93ibs+pe8-e+xgXYuJ&8p;g>LffY&#_YP6Xpxg*Pu2?)%VBmGJL$A_T>$ zfLtP=`s3l%$+@gZ!nzYPqWIkTHQ2XfNkkiWE<6lq_9*KQaKw8VL!?CLcxWh?Af{9eP32&$u(iSRK^&a;ETuX8_7BO0~@B_DF9`*DXB1N z0@NJAjdaGQ#X^{<9wqqL++{SL`BX$&+%(UHHy+Wd&yp&A96^%kP&j{0cU0zf0vE%# zdC!79OmjhK^}1@T$RAJeDF=1^rcfJn#AT}_NT;FW4zJtrZH6fK#B`hzNmR>4p~y(# zjt2eW%>tAgTh)axu54(`A#!egxH`Pxh{kprjfX1E+Lop0J8nJJ2ijjed|XnR;&IpxZ8ujYl~=j zf1UC4>nw2ey9%PaRoUv(=P#xjo;D)GNjLv+tQy|<%zo9{Xnr>M>G2v_r-Ngo6xJh1 z<+#)OtRp3pTkPvi|%(BDtZ8F9b2hD(zNNoO%RvhPi(hwqb%5O2Pmsg8kF zE{~`C){wip+m=Q%7ZD^9nAU?7Tp`5;jf(^RJg)@GadBd~5*encjOk1gs zTz8X?pOJ4$(AIf#d@mM6yY65o*oM~gprAXUUF(%)>dh1LFzrw4!Tf^0aJu}rVb>MsZI~K3p;@RQWo}Vq z4&__2KJFAfnR1jv=VosiEgta9y*&bKiuX)MKN1cXGX;n3-1`$fKmDBgF)3hRz;C3V zR*^PC4Lase-S?e7PKLN1AX|zoG`jx;> z>4ZLG@l+W7x)&k7V@yC$MVZXHkM8PQ&brxATzz^woN*2sM29r2y68&g)1Z5oW6if0 z*9B$gSMuSYPZ{pX2X76emRF!*{VBZt0WW_{cy~zTLw3kA16Iq~jj{W};H}C{cJy#3 z=j*ojCaXgZk0AFnpN-V<=00Y;PD~^DzP@CRFP?>)K*38_3p<#K=GEkU0AESE#9Hwi zDMbdOq|hkdJQuW;IZwxtS({yV*Nm|BIy2DRCppQ0u;+iKzc|odc}wmj1&!Ou&1>-I zZfEx5hDy1XU;qt?;n%oF7bZ)q-M%Y@-8#B9I&|y_QE!Vg7TH>yS%+BMS)43gG87-q z+R0%IQ-D@q%$hnaPn3AK`=f_QN)F86B2CeNYkg+@+R1Tp8}-^r1RHaRx1rA9?av~H zE<8IsAmO-(0Uvp5zExM4Xcjs6BVSTYdFlD_)dIx8TH<98eRIX$5uqY?DoH80wLmys zfJRzpHR`p@wzG?N7R#%)PV4(BEr4+1ov4~X<6i$t{H~(t!_K+h5F>*Od_jDAS%8{| z7V3)PX$ge5VZAbG{#?kDG2KyR_Fl2ha9%Ux?ckb#ZB2+CYa0nS=nHNVZa^+s4b^9j zJ_9WcURQTaR8;kXpCPRkF?3{Mxd>~4)S@$AXrNQR_Le>(F@>b+i`1n(F-o{@zIAU1BE-4c-IMsN z?_DD48{R0#Hs%bp-h@=FsiPoX^p>Uh>m-VjypTGpB^~FHLC(pz{{zTo=WDp+$X-Uu z*jJM<)YH>%3;`a?|I}E(g5@sIQ>!R}?xO!`G*X_P_k~rD=tfbG53yWbOV|Rb&?eXg zhvEFVY5I09L6+d;aK1}O6e!lrSqFkypt`*GE z(q270?{q6=r9R+J_j3)>%#Wx@ayN#5}ZXy2;@ zSnNrsERh4@1B>7$o+vloM>_7fOCGtW&A+`$Vl%2Yd#xo__ z1x(^ZVg@@KW+5Nm+B7N7X4~*wJDqd^wcF7gpkk!rEt7mVz|43Ij0K!#-ZMw+nr1sJ zKg+ccd@RRF!8vLoe~B#6C9jU}vAJugUdVf8sKocvsqLXN@V=NAScdBNX1)AcgDFJN zo~qvj>BG%9mGoEkFD-8?h!$nuxx0?cLl2}VdRR6o&NH`zBW5Iv@YA3T%D(+rgL#m% zZ#U*$g33zl#{I#sYv1nKFT{Hnu!zlEnNLI`hk6NXWYl;v)OUBJRJg<0gUj+UFm4fM z(QXHFS^d+W^~tL8G&R)muuNdC*K-7ir+E@-61D2I&G(rdrye^bCl{(f9-0ootGtT` z%Vim}fWaGhH)D(F)>z;X%E(!%siA}jooV;#?g7@%r;sDz3sbthjs}i$0=$R(;}@^5 z!bks)u(#lfGwQZ<@xmo|a0sq}Ai*VAa4Fo~-Q6KLA-KCk0l~F^5ZqmYI|O&@BIi5f z_8p^7_o#ocYQJ;O^(@(Yr`*a?mt^t4ge$Q8j7TgCAnbR$%EN)loc@#4KU*pF%XROh zPjElu0Vx1oUp@Yv)&Ad-j{(Gbv0OOGu-`?P_ymX|vLWR1FpQ%*fyU1B^B<)~=W9E` zD67XI8KV+$qMUxQMbCNM4u%N6YCTcPiYzS%j)Sn2h;LGn|=^N zG0C#~PFro<%4_<^Q#OU0Pe_i0ch#pOsBE2fc-M;!V=EF`^`=&aRGIQG5DQY6TyM%nTv_hE!@5D67(wx)$;&C=Z6uHCAA^vpk|Kd-J zud5FAVruSJq37*0@8z>FonIvP&N3M(tM$59)m-{armQ0e| zCT|AyW)>VBomb~rcTVdy-&1>1qbie?U3W?%1mKH(%6asSZyPg(Y2JU=d=-{)&vwIj zCVcbt#iD}Vc-h38BKOP8q?nY{hOhfo{Bf+2z*@M|p7QL|Uczg2OBX3m&8xur^sFVn8&AM692l$ECYhy0~o`Wo%fmwXa+y-(SI#fLE1%N5uC?7_aTK|900Hu4@xo&@0#=Nl9A8d42BTACq}O zH`_iqim)2pO)Fr!ZV_rrYYjR3uI^#XSM46_>Fi;;MgNn~R|ha3e)+ImQ`b7yKDNI2 zjcQqG_M7_Z9E6^{E!ks6t;UKU@iALJ$wi4S9F?Ex2i=I90Tcn8fz>^PL1F_0F9wV5MDFLcD4oI;Ch|HJxNrs zGu@-hv<7+DhwQ8FpiiKHHtzlw&ulfWgU{oMV#Sqw+d}6ghr{_K0GqG+y+0Np;h4AM zV8}!seo3YZok*|i2EZzVJprtsF)6=x#}8VXc59?Yer;XmbfohoI$ zblG>Zl`Tj8q(sKlB}-$hL(#LzDWj?kJ`U>o;{Lk&i*U5RLncnQT-`HmbeRz7VF)34 zkX?Ekq!V2~lsPWH6Q?BupsxfVN3K@tGE=%X57-_$kRV9B}x&cR(rRvQhj( zCq+OZyTaslF1eYD>&v9D^EM6i%hQ$1BOao@i$Zk2%vu0QS*S0+JRP%hOoFnY#Jr+K ztmdN@Kk;yM?&tDYd!Y6iW>(JbI5LYU6akRR)z39m@9)=JR3%xPNz_{}53i(r|D-5e z%@}Nb3(xab?%arGF@8ensWaQrC&sFK_#%;rNxN`lOL-ogEfIX=23|z-7XSQfoS9Vs zxnhiL?=fuCvSOpd0moeh*!HN(Y1-v07wWEw<>~tQox1MMF>(;zC0WDf0=boJS! z7_5{;UNmK*@_A@JU+IZ8H^B>=a{eSC_ z{OG{_e9!meTglN47k>@>n1gRf0ar?RYuS+t-eUXoU>ZNekk^Ilrwsh3?F+{9U)N5n zf4lJi5SkZP4OfMuiG3IaWqL0w?bzeIt9}o-#cMyfqrR0_X1sciBQ3S$xl&) z{=NZu|MAsedh_BJx#you=eK5`g|d)5O+Q~Ix}UaMLvV3FZkDsfP3Fk>|?y}I{?XD=QZ@NIC~Gd zh?)~!pEiHnam&PN|2rHVpC`t&Wv#y@^+YV;^+)DS1$J`wNH>^<4SG@)G0#aKYLK7< z3&t@(!e4M=zB%x0KHNF6o4#Y=ept_nPn6Dc#~l65E??U*rofum_D*LzDN!k##O z;%`3Lm=T%UnI$ePIK{84XZB{ImCYw&!o9Z?$?2^mA-sY{y zPNlPeM>B9OgKorP16m1bu%1sbV+M$E5SHj>Sgsz< zr*)i^9*!K@Rd7M*;#(UJ3^2+Pk%|2+2M;BIaK|spMNy<5nz`;LGFdq)6rL^A1jqMI ze3+g;{Jl5}hE4Yt%2Mz$&qYcV?){CVjK65f&ZYR~tDnV`Y%CB*%OzL*KAEmXnph)!La^&@$ZMZRF$Pd(R(_hh1aoJ zfiY5Q)M)k-Jr#Z2)fzOH@HaNVT=T9V9#-29LWxIiYSVb(n#W0N|EH+LG+)o@*}KE_ zv1m8HJ~Urb!DTB9lA&0>>g4IbV@Z9UDDor+^BGN^n@y-!0p74e99=w$-JK@>WJ2JJ zcx<(gN*aw;t@C`jC2?BZQEsVtod$x@hdg})k^&i^_vs-IŷS zb}cMuY|PnOS64?F<<*N=GId5(0gi*u?lupt>AEFG{5y3F{8>{F0e@lnw+;AzTk?7m z@Fw7kBtXqgc^8Cu*20t#t|?fp|Tv!r(;(GzI_8+16zbfh>&9^bKH3O53m|I5>uAR+q8+(6yz+&`CzFzP6o#Lq42ZFP#Q^o?1zkD4OYT}D@lRm$mWDNJEq_R3cr43w&tnAt&b%|tz zarK1xGIh8nSsr$Zed`_|pgqXwt|NsrTsd0J%BW(*UWi=y%hlva`E%p=1OD*)tc#=6 z2N=x~4p&PZWowerGnu`t-!7i@m(w$O(^~2biC=*Gu1ThQr?9tcD2;_=@E+TTk+|*3 zrzi26jddrbkt|hj`>_q=-!dWEyOBjq3ylA`n8Qj8tBv4NAH?Fe5W&Vnz>ULv$o(5V z2M7^z)?@pgskE)vygwXd!HyH3;o}rSoP^~bdh#jxFN@CkE^4726F zh(0z#1p)pff=~nUOL<;4q}v7mvCK6hel&Owp{nH_QhA2qV|f;MM510aV62I<=W9d- zLnh%Uwz>fJp276D8V8@w_b$OLN9FS}S6ZTGzj2rLYABZ^9A`NC@a2x(5A%;8FDw1B zLbe8A^oo~cU)>4;i%zzak2anTPZ(IN6xym-dgtL-wQpbRZ%KudNoH3)6#k@*YVx&B zSrq|c;Njj$5jfBg*pz2>_ZLSSC!O>d9QU+<90_TOYtc;EVi!VnUqBys>qW>AuV|%U zLcV;DSF?0Cb4E|x^Y^25xjpgLPX|5jcG#uP`^x9clspQ$<_I*cK|No$omjIxuc`sE z^9@Kp?{|9NIQj;#7v0rfWm72pMu+R{Cz12JDKlKFNG-YZ4ma%4T!-E)Ec7Zjn9gOg z!T-R5%CZPFY?6v~fvT127`=E@uU}+Q%6I@~H-*M@edbf;%2p+H5BTM8N?^j(bp|2r zKX$$dUV{`7+Kd)bhusR@fIS9Oj(4ZU?`MDxodrX43f1+1Iso2LAaSWyC4j^KMwrMW zcNGR`DS>;F)o6G$rp4X<2P44Lcq9j*u3!@$KCGOQkVudCyy5-Ar0r(~$qlHU!=UZ_ z8-@;X3=;y#CF)F#j(QV%EKsGEepK|0k`Gu()*cgn;Ex;ohY!`@x;(Q4Us z+iE}d1h^&k?4xW^~JG26FD*@O4pW+~r3 zEflJOMJxQw@B6bJieR{=5Zsb>MGmaZ6qSUS-Z_7K7jQyMOEZ>4?TT6L16bXC3`$++FpT^@pZ^ zr+n+}lt|cXyRpXkL>`e1XOd(>CdyDmT(scFtCF0_xw#5BpsLOfH^ zYS3FKYzb_c6U*$D66k(|rxUT-t7Ff%EiY+EYUOGUM9}5IeA&$Xl>rKHWj9ly$LcDO zZipt)8=w~E58kt@b2@TrO%>6S@icRW-lr9%uDj0y6GxY&PqTplAu-Wk=y7I^$g!QY zp=CDsM1@|SrXb>a>|wxMA6seu=`uq{U60lB;tyR+9dDmah1%c~DyRAiJRJqSv*1Hj zp#gHMWeT5|N83*gCu)(Z_EZ|EKak3|Y9!nm>jW3$&`ze#K}OkFS>t2B_o5lJf3%E| z4v=b80-SQKYDq_)7GZ7I1Km(mL!--Gg3ZRho+G#`cg2WXEoMsqh$W0yfYiT&74);{ z;!_TgSK&TYr62|K|7o5M{AxwKAVts`Qw@jRgKqFeeb62NS+x;^<^_*S(#?Lptld^@WQTB1QRStprt>S%u2 zt|ib3ef_6Riq!W!1LBXw$MG-ypatw>7BCatHU9QH78d?k#HKHx*He_idi4r?vOB9; zc~n(T4;?Ot9%_f#rwe~S1EJkDjh4x15^|;^q#$z8pkJwqA^ISvJb~pwJ`}G`&X-cz`nLlw_#$5$XKGT&WxMG! zuZNxwcpy`(f7U=hPJ4F#2;t6(@eK^EHqn>YG8%REVB&XhH1>SfR z?k6y)WFW-2{GN%k>uMfEw2$N#82_|;V7w5b=?`bEa*X0v9YnMYZ^-LzBUxyk;E?p1 zOTVzV?SXF@emCC_4{Oq1p4DdiT)^#+hm zG_4@wef=ihq7t*>u3|(CQRsL!SvKjzVa0cpIku(G6ul@BcQ&-uUUvb)t94y-VMrIQ zk+dCs2GA6O(;%H9jt*G^VIBMvmSyXoY~(EBf*ds?ITvZsl>TX~6PhxI_gHdCqfl9GE?Zt;oJI6dPH2vE1nUm1GcW*;m>s-DW21&mRf+4rw|dyAq@b-kLBA z{hjGugGGu4qh8%KQy^(eoc$diI4NS5{yt19b7-t zD50I-g@QM0tlHM|K$!-%sA6P>8bV8Sa^0e(KJleRyF4!K<&wFFo@S34I@oTd3t^X4 zUcZL=ohs&X78^j_-wEH}mtC#Z_Pfodmst4^UBR`r!H&7B9=sn0-U#1x=L^Kc0;Ajv z@!|y>4g@Cb0?R)YMBWBBDipR(8-D&a(R#+Gx(YQPVhKC!mk=Dhwoh17`Kmq*}w<8pq*K~ zO|@R?;6tt^M++IuG;Q0HK-z4Np;h67qs>5Ub2xE*lWEwBRUdmYZAYtKJ9n3(q7Iv!U}Y2CwP}UA z7=aS`@2iu}{k>5VyM~_-$-?v@TY)Yp3_`ncUwT51O+P<9(Q7*gA~b}1^i>n6iSSd& zuAeBCzOTkk#XPupw(i|Z=N<8!(LOSi_m0;Peiq4 z=<8~5^!1pX&-T;k0{sgxR>Eug1;I_DX%QF#4c6ZDyCE{3awTWOz5pl{yA?VFc7MnS z84GikNE&tiA57s+botny)Il@uKV?fEN-`ofBp#^d8QW0W6_E-b2tsE9tKTO-yEOdy zLK^%*VbZ5NH#lpiE@4l=SCsZ@y#SpL@x2r(`K`|irc6|hA#pyb&s4cM?OnIIOW+z? zsfc>A`)a>7Pn6a2nT2fTGGiaC``YtsOK*7W{&6x#xryt3`}D)lS(uUSt4x16hjbRx zlxqrDbKXjG=6-;K#YN>&PS(wlbEEylC@N~(;vc`UV$tA8 z0=BQ7f?9exl%=t+CLv(`k2WKwd?B48LJLyF*#K7)b?|*GgEra!a8DKy0w>4j?N@AI z=SdpuJf8c3?seM)e@KZ2Vk7Z!2+F^@uoc*SR@|3p6VAQ>ER-tYqmz?zAxrE_CjDt% zTM~&gfQsTz)Y7gQViQG>W(5-iw%&s%BD$kW!p4(=D(2UOq05(7#yHi>>vXEV zU__G;xZkc^ra6$$h!}hx2okZaAVLu}WQszJ6UNm;>#IS`Z#1bOmn6W<70vzn>&}#0 zpt+x9*{O=J^Iq$(c5GbsG_3{`M8Ch&n+^+jv3Tmha8O`mNcNBmk^OOsmYKL{`2uQ= z(nlfgs|dP^%UwN-pcWB4r=-ysH2LE`JmL*xB?821}vwXK9J47b+q3B=&N`k|~I7vmVF? z`~T4GH`6^!Vq3_>D+L02NzrMhZbtd+UlTpT*bkX!d6DPZo!!SYAzd`kD)vBKN|2JH zAbMbxg4Fkrfcnhd0>PX=^@7g7f2gC3Zpsz$x~cXrZnN8xv%6igM(!ZgXd%73D*5aB zcpEnfb!e*U$Xyf1rYz8+96D({ilZz;n`7yb+P_Euy{A6 zfN!ix>I<2MRDz~bsUZS|fiATD8SW#)gAY*7hZ z&j@aVM%W{+)ZZ~##c0H?gu6NZzoDB+Not)w`oV+{1NNFhzmWoYS?G1*gmyT3;mD3S zZ3C%hRl=S{=-HGQi|WS$YUX5~+ov&HHVI6eP}`2UR<^5GJ?fXa+I!)4TgCVtwg*1m zp2zu$;?>1Us|5;Tsft$w(Urq$)sePn7fB%ue1b2(W4}ScuD*R*+;k2zm7L*t?)`hf zsJG4%ZKL*Qw}KQ|!qEU3OmBoDLZ76xHOpNS7*0Pfbhp#3jm8l-Rq|v?5W*|GhJ>b- zo=kPsaNJXah<-g>5hQk1PEKu*p!Q7qN!KQP$++3Zg{fP0Y3BRxSmMRO2~x%rk0Dl^eD1~t~O7BBTb^5 zT}I@>POElplE&@%mn~Jr4`7V82%xkV1n)LmDhgN%t{R!_be8U7u;dDIDtB+#{Jwh#6mf z4OnhEb<`qhJhMpE@aNZJ`UFO?VTpiI+dn({*uzNQ%9_c4U{>P5owTJ6d+tTvbU=As zmdE*bWx&nd;dj-LlCGoh;jtsK?BJ?$0LnO0tw=HPkD?uF=oze!cAD$C!6%e#3sg(S zsiPDjaPJowu8p@3icfF`uaa{Ss<&Oiem~JQ^|X;F3uj zY^9F_m`I3*RTjIc9d;hzG)-uoxozmltM61Qi%-@!Qc zfR~wEg~SS~ZmFP17adRMvzoizsN3%8XEErq`XAKdoY@L9%Bm6RTaIY!L&2Xv2FK*Q zM(B59d|}51ZHUr?ZlKA|&!O-Uqprxu4aycf5^yj0GjOl3ZYIUz_^OYSz|e&{d7!K% zJt*QQBzxcjAdRlDWGQEAwVmV;$=)5cqO$y+jWdA+tXC;^lg)A~@e;sRWXPxLk@N@e zF<2qK%ZfL zw6;wp*Dvu{?S{3zXjbE$9>$`A-E6gRU(_oIg?6OB$eUj#NnE6;2!Nf~y0L3c&^vEi z)U9>1FXN`-U4z9CxHG*ynSls6w*ZKcV#QCMu=A#w9@$T24cL_Rzs z09FPbTj6t( z*b}_cuN>t}*a(l3$NRh_jgDbj+?W0D!FtMRB_dF%;d#U@SdF{iQn(?4vwS?`u~y3D$;*|&F*a8-Q8;zki@VV?)&*(=H0*k|;_9$GjlqlG{=mp0h(+V{s2()f)r%RfIC5^Ewtg2@ zEE3>X&_m=5A}y^C04!5=Ty)3^OevU&yVZYa#3t6#3Qa?EOGO}8PF4K2vVh*0@-X~j zGt0syaji|nc`R)Ji`_ONpKHCCv_ubbD)f2}Mmq-C)mI?Gz9ai4WSY9;n)|AIGlKgf zb;86GEwIrt%Rz#&7hP^)<;>wt?roq%IuKYc-onaZj`1@bu*9qggnSXzFZkhw01ObGMB1?b2#&Apj& zu$>aDpe1n9R;wXK|D=~hwc>FePnvzEfmB#xR!sk?4)W{`gRbOH!CnSf>CXn#(a=IM zO!Tc8R@r*=Avk^r!XejkWc9w!BQPzET6^C6W98uMXmwG^+uF;Dz(kJNU^Sd&B|%goNCgDjIc^Lj8#18O+-d?Tf@Up1z%Oru|~j_#(+0V4*ZFdhlGaScriaktOb( z;{5z=brX87cMBbKSApuy$9QaJm5hBq)7wM%gxf2kK-I?ZC{40VM7;R_qT#@wmklHi zDYFYLQ=;cY>Z^nAf+i8zMcQ+_6@mG%aIX01t?(B=gt}`#hr%LW29MDh1p>Xc{Hy^2 zK}Z*}42M=7JxZzyUf(t@8q}2n4)MnFds3YTNh1W5yv{+q<2P;$-)vVt54=9)5z z4*AlJ?5;&IZG}8ZL~9Aue3Vx z>W`-{*FN>?H^BAQU8yFLYQ+2CFQ1v=jBUQRG85|Qnv`iOi z*$DJ^l|sByILFfG;)2Vt^AK=~LzfXE%jOY* z>Gds0s0zx=?Z(h#6&7ptiiBZyvL{%dM<;RyjrG0<@1c!D*Ok+R&#Cy=AlURF^Fc-7 zEJ#AL^OE=1AW|+f;N+`b!k2)MBA5+$T`bB%CQCkj)A9RLhQH6icYlt+hu_dEJRrNB zWRRrO!@W8E;^k)eMU)0&)VZ^9_G zN8=KUSYh3;omgTdwonpNQS*w4J0!f?cl)(}Hi`eaoK3a#j^@Lw`p!QK+tV|_3y%@aVAA5_R=R)tqo2=oZ-|> zfMn6x19dCtA@itY9Vk?UV~~ZPtqx=UfIvq8+0si2RRyiZ0A;@a@-ywlFpRJ_2nS9a z9u=pqlF5NH)E(hkeK=YL?IIVv&dD(q5CIvKEoCQIX6D*r6kra~fr- z*X9Yn+CT1Dr{*`<&WeKn`)()mxsy&loRC1@2FYUr`2hVTzujUeTHZs zJ^4UzbL=GcPmTdoJpkmOBAU;kz8@!(3`7^8QCCrEp3GQh0@hL>Pe8cN^WC?NRps~k zu`I%ldKet9Q_v6*32l?E-G=aaoq^1FLhZ@)O#N0Z4Uiq`NFU?n#A{%doI(u@3x;RB zy;q6<7H`6{ko4=tD~$KdtRrj|xR3tG5hE?vpTWz)@Rrvk#Trp`!v$2+ouhDWs&zVK za3Wht8$`TIn><4-a8qWTAs8tPVQT|3$7)6BQfiWn<}cuprUWULf)rB>lk%s<+^`ud zH%?jY%9xT9mo(>Kk=xlL)BylrTQ8NDCD2{HMch4_j*a{$!TQ2QVbfg6ibj(B(v{QK zN71ka5=;2UfRb0Rd}9h4%dn-%?`mr-RfZufVjk}m`MO_ zb4;EXmr+$*Fv1v-ca|hNRA_f%i#RdPIHyP0Spz8jT%uf?ay^}iO%ysycxCqMckj#X!4SNro7E6;(|we|a6VR?mPUov*guCc{Ja$X{@^-Fpp&{TnEXi3~1L zK@=q^%*6o|nB66{ua}P5zmdwEE&iV4z^ENa(XUk_d(5j2kUaSoYGgv-FwZ_NMeF9e zilw_t?)nR54v8}|0Hf$~(*bm56p>>f7*CXSjc;WnWiXzyz7tTi6l74N_g=h>D)_4l zQCMTEzz>0jj29N77XE{AgPQ=4?jYq`f2AO00G*U+Ai6gTgJJ7&nfdp+{K^Th-P6wRKs`mr9^#6B8m6|kDd+rO{t1A0DsZUV-sOmk-Y3CwfuYnqV9YCE!Iq2>Kt-C-$m43?8 zM|53}FQq2Q37?)GLQ^x|KEL_uJp?>#sV;Z09sqT{1%cN4DV*u zO(M8JcCDRmA&7sELerrn2tnG^)d4HK!MwupQvnBad@m)`x-1FQxIM06)RgrZEe=Zne4Otm@s{|Il)mszLM~)X^PyW?g zlQ_y-tqW)X$g7iwFjy8Jq4V6i?GJw{hoKXLUdhYzeN}-EB49l0G6jELw-k9Sc=^h z{z_`NLL^K8pLDDp!@UQ(j7a|jg?V3_F;r8P(Mi_lyok(hL;^+T`{oL(#-^MH>xHr> zra-uJRR-T*9;d%aIPoc7ae1-%bG>GK{deuY7r(RgKMLUtsXaV zo*?%VUB~_FE z@bS6&fZ|*O`?&N0uHic53iq%!Go>g19tL0R}2+0x5~ z{HdA2dpz(g>c@evzy$TwAmxv4U2k!rm1fjdAbCYdpBNLkl{FcJvC0%SRr3=yVW#=^ z_pmXef}>u`p9ptxGh>cvzDv}Q){#lYCU>4t*@aAj)UI!vhi@ufy{mPPxX^A}8pM8( zxVpB7MN`c~oPe8GHjFZWgeN}S3Z&Ma3>9dR%JfK|flpIRS^i4vL~XLDq3W2L>R zZHQ=RE%VnwMEm4Tv=>OnA0VRrk2Eltt1|cIs)tA|b{jor*o8#xhNIQ3NBK0|s|Y53 zeJYH{*bb?K#UBH+-@_~uYL z@eoVZ)+4>H3bS%k9iHBSbNE1Q_9ghaHcO90;!mNVecV^8G==LvNOKn9h;=BU3eQ3n zEW;Qv1wLE0$ucFWDwfm}}B$Tk*K!_8@k$Z2j=H zpp2@Rv9)+?+!6Dz6u!8$|H!9~y${~+VIm@%7HkavD|GkwoP9LS_^bHDWSSb^KyBZ&&GO!^z?LDB?1UimD)=?G4&hhInE$qSdMEG zUmym*OKK|4+9yY75X;SfWm-S|C2_^%EAuXblE5@ONO@SZvHCAsAS1GoZBdt8Z-?DU zF1&h*%41QI@5W4}iIl*{112`thci?KW6Nx|4*puh>|b7$GFh)Z4kjJ!47(hkv$?e9 zqd7)bH6cASU2INNZ&)YcAJ*YztA}8n;5V!TiT_kgx+mi=q7~_9F1)g5a7jRabH&%l zlo*!{sBs(9R#mNOFI%c=m^*{AK#tg`Z{&gl8~BeB>iRnp^T&=UH7#>!Qx$S8F3A8N z;lqJcqLN&k;v8$M1>T<}YUpQ;!ZR398OWGSVS@Yd!V!IhQvsqFHffnIKR2*o)Cge| zVCy-m^h;-JqSPqq^pAeeFU&s4zf2Oh$ z#d#WX%HLZa24;p+#5%}8O~(POigDSi9WXjb)@J3W;5c{nOW}KtX{1i1PV5ly21jFi zkJ-F}fnO6}WKTA+CIA~011V7B_H*mlvvUZGPJn`Tdgf2@p`r5#SU6#g$Y!TFQm;p0eG4pOys@En=n#t;{XG9&&Cd}6-Y z8`1V;Pe>*^@*lf?fS`EmN>XoVZOgyFBN-Kj(evFBt4-3a84L1Sn(@L?oe27)VK>d7 zg<>!za}bBsN5&$Q?=jx<>DF{?;$V7YMO(6#o{1K{4N`&vVVt3b4OqKl#Ewo$lpx1C zwo=LYuy7GMNV6N9-mzoJwe*!C5ZH|w)#C(f3Ym_&ov!fB1j6$fbS_PE2<@pUVai}m zFv6RyUtAsdwZN@%(B(`*#|g*0AH&@Sw2@2Wj8RlX1_5VZRCo_}VB&We2D}RPI$^jT za!I{H^&t%&UvLk^!;;!5>1vS2wi^20UjS#*Jwv57cGSjhG-if5CTGgn8?GN>t) zj>~RJmfOR^q_0W~x_@vtiM>Zu1;T@vK%4f;et)|77JbeG~0>s#poZQeL z&=P6b+*WWm(@+Xv;@n$ZO8PYBnI+VLcVSz4YyyxjI60%^j=H(0y0Z0mh;%!`gH@lK+Sw}27utoym4nYAyU>_r6FQS%eGFZoa>*BRJvK*)+ z&6BhIc4Ev#ji4Cj1=C^mdFK87@dq%i`0*k5$oGy~n02s4q}8S)hrPTqLMy-IRRL`x zOZf^@#GWAK9^O@TMz9{rH9_I0{7sFsv#%IKEZrAF%sz(?Em$L&Wtsh;dlj5se_j?* z;kGOMd3YA%oLrf*-lF54QQ}ZX)dK+Zhu=k!)vfx?|Aebim6XDI<(?Xv?t9ZW_5!Xd zLpzkOzwlg~z0piZW`+k2kl$y25kC^&yW+YXWB zejdC)ML?+}*%10c&6@!KnMRt8)ZPM5W5(PIUxmt=9*q~RreOFcQTWGXWxn8tfZgwq zuOnVy0_jb&~a>I*v%~-vS zGa}^TeM1O~4teMx`frgPOauvE~B$6=uS@7MIPjEh3L)a1;+d}TR4TH z>v@=T8t-_%4_=JO{2YTaZYd*$RcU4*rwsgt0=VbjGw;#@tBhA7*lN53$U`i-d{@A z_bm&^hJxx6-%s(0BnND!kGt}NGzm~KbQNL*7C=Aml=gzm>ow;?soimkn9ZEm(h^X( zi32>p8(*R_xW=)EJ0cqyp7EQ08RU=en76^_`$Sh1>C}LTVWVMMgOmT)8PTSS#O6n62W-`Ms+2-`KQWNru}l3n^T#_}IQ6hP9@9LSH8yn(VF+ z7$tueIKB_lWvCb&%M$-rS3HnjC&*90T&{|=+giHiXB(hD_NyDt@zaX>sj0I7IyNa; zGally)z&4&AY*TOpcu(J2R39bNwPf)fqZYIW95TiH7En(Yhn%bwfiFC??3mXrJHDJd^sB@d5pwYZ^A z;&oZ7!Blc5;D_uE^-G_C=DTK5C>a<{s^-^d7NHz3tD!7kpB`PFFEu;gvwVN#Qy&dQ z)1;>FGcuv{6oRnATrD#xW%hep6aPrXeh(%K++*MyDK}6WsyV{P9VE;>uPz~0>t+a;?_vuxM^?Z0K$m3x)Y z>axyO6w?$f^C>=sdY74bJ96Vj9u%dMXr58#NNu>EV#bS;pS_Ep>c*w>epu~Wr$L+- zMOEBFF_^93IoH2hssD^6>(T(Dug7%Ebb!>cQhr{ZSz_deswjgiiyqLSqSTMeUK4^E~sbnPmz?qunWaYd5q)L}e*B?&exUnRzit<>irJ;JZSzL^62 z(Gy!ob|9;wnNj{F;wPeU-| zZMb`esN%FsaSS`wsA9yWR)8-*f*6X8b!V(hB$w>D*gF$+$<@-o#4gYuPD2`*iW#mI zFie%va)f@@yuiP=9Hq#xa*!g<%d!ca*GK37NO-;Fi2_Z7ChIA9O|&0jQ|`~%p(S-o zMSnb)j)b!qTy;~lrHx3uc5d7Yf^7jCwJ?|lPfmZ3HJN^Ka`OaYcCl+T`0;Qc>kh={ z3*l4{4v^WN2L4g0ueKM0FX^Xdn{`%W$N#wVa=#r4AM$j|fI8%klM?QWk4dpj9uOJ; zv{&7lghEBy7jwgz4*{>rAqF`1TM0u`m8qne?5FE;|t*g z50d`n2gY9ZNCdt}7jQ{E-J-ln$#;=%XHV~5le36c4hBDS*ZXDh3G#2s%MBcP=ac(a zf5N!RPIdHEkeecdFUgK&6-l|@E9yO>shsFxuWQ&zNvY=KfeF!w)hU23#QknBR~5?N z!nL)_#oa6bXmhYgqGg>`pJw9 zk`=uD49ed6VP#GxnOMEo-~F3kpeSIlk&5CQ#<2%|9$){dC;emb zHZ~&jB}M~Q`CaM~mrv;Mt*khDE8=MF*87NjB+?SDAf-ktX2{I50dybWV-PcW?-ed+ zQo9Rms4>&)1S?_SU?F|Q@{`PHBsOR@`nSjoU9wuu*J;P%Ezz3wJE*Vm8qnS|dc~Lo zGjvqu^3zBD)BlUEuMCT-jn<|c2BbtBf%59!dLjP8@91uS16za{BG{`E&vi$ub!g^|Q zKi5#yHuI+5gvWK%Kf}tB0YIvw(R@$UdFQ?U%Ou)%!Dr(kICvx|ge+*J4y~2XWy&Jr zgY8v_to0s#%tWJu3r{t!NJ$^8umf_#aa zNc>uIbivSx#o+~FRPY+nzYi;A&fs;TuI><3lC4E6vJ4% zWCit&Fby36E4Sn;;Sh3JhR~UTHWdon$umQ5MD%HC3~DG%H_I5s zGXqi;8f@1u!NLN9Em;|=r2Y3i!!sW+*!IO)&>$zw4JivQZ(7FLL~gWtfF;!OlZ?xa zI`+`Qo}Ax49bhCEPUV31nMph$_3!6QH^X(00kvO>*$EI5mS_^Hn@3==QU=Y%7lR+X z@l+y3-dIw0!sf)asVGuzK*CCqN;*t;#j*~1EPKt=!|&rmjozIb9>`=E9Bq`}8{(ho z+*o~1o?BCqn6m4uieEpia@SDpmD9!XZlzQBe}K8k1kD_SomYbmu`V3yE!omnefU7b z5!OB(zf5*8Mu@ELW|P%WiTftt-JAg)TXt!8vQm{meQd1K**BV$dW5=mzk$#5xhfsm z1?ir#67HJ%=oQhQoV5(HEfbNHis1W5Q4bh|ZQ|2xwK4gIhgk&AD{rO8S}TH2iUA&) z+<$@T-Y0+s6#>ua&y@2>&$gfAWI1FPRInNP_&UUpwAV#0rFqVB6X=4kJp`k>VA&FA zNT=cyIb@Sn+gP+du>Qpv{=z26EY_zD;Cw;Fd@R~}k5D7+bM+KIUwLVdkmze7wb zE#;@E7CM~w(p_`H$6D4=LR4I^GQ2!_H1KAKY@d%^JXtx8L%jS7LYh4^?grd%5{oYd z_+GRs#_gO>Qb=GAUXswbAyy$c2E(=B%?AGp8;pj~Q7EPCa!X6WDPLNV#8sU;Dm~5H zX^~s0Jdc&s*GF?K#JwK48b7oUmATSSnE+~vUQayUMCII@Z86E2mw{S9i@_U2$~j%f zT8~*bV}V>}D=Y<0Y?`zpTAj%+DSH}u$9JB~Wv}C}h$40FIL>QClHuz+5z`qq>y}f; zuyzmo#^l=$1EM7|8%I1L!4SunBOnqPw#OG^hJLxTVgRm(rEV&jDA9^bDU zz9m=YdFfv$zkRd?L4xky$l#DQ*>+&c$h@tb#%t*mar5(2xlE7^B#S|>4}J18z;^Xj zGlOZ^l8`?P+wrzZMDX48{-nf1kxH^CB#P^@#cxL1~idMU>w8+ap zL|Yxn&#I2AhwBSdgouCNF~{l1^L^{S=Zw|BgOF1XBA*IMe*x9J~W1s#0`=EMxk*S8zySP|bk`D-sXWtBx7i4@gi>C3t3e$m8VY4}AP z=JvQ9o8AehxJCVu3XQb=yf|B5wtD6xON6=;93?|M4LbGTz;^c-HhN7mhVhto2pqeK zizf@-!+SRd&f3_h-|2y!oGFXW=15pLAwJjQu-56!1mZMVvAyRF$vnI6nA}M2NdxA=OGz9Ww+{E*nqgBf3XWUm{zOz z{spI^viF|sE#KW2LroZo-|$M@K$LWXusti}mb}KjS=CFDQ&WURzoy&Z30mF*LXnrRkR#+ZZr|< zp)jqnWJTZR&u=-r56?R-BhuXcHvCnF+{Cb^x88+q$~k^PCgD*iK*kn0WAUH-OrD{i zRQ4F=Cc+X<;jT>I)u{h;n0|ad#1nXZDHE2<3CXo9D94m$sL(x+;=a6n#$v33IbIH9jvb1? zbxEghy#BjK)W6?!h^o0P^_-L95Sf3feoz*xv;g)SGjS+jH`10Nef=wwbRqoda&6#% z4JhZ*Uuo3_^BrM6qbo;AvifK6{v8-q4?>#e3?G^90w1Yw>veViA)T7GYL>shzv3C8 z{0Lx10b?&2Jqow?UR^Ly2d?-&2^-WY#SLm38_|;h(zZ<2hx+wfK#;M%i!`p(y&i2{ zT8gE{b$iIaqivuaLNW!!{d+&5g8Ag32hEl7&im_NkNv%Zx$!k#E>WL1QQ4(5SaME! zEas0_ZJpWg_?}#01zqod?^B3r$_ugt;!4S+bnbUqDu3H&7^g_v>z?{RUBJ|X_DAld&-tx}-*}P6 zLEg}aiALLI5>PXRU#+vG`R%d683%g0skmB|qdn*)(h4(kQ zzZeqYQ34nW%)Dsh8POi(JM}0&PuRkvVBA<`Xna@6#rdFMhVvdT=mYKe534d< zfuhydLL4LX&C0C}wNb|TcH-Wyi*Hw6(E=!Yb*1cUetX>5En7wQNqveLjERARZ#OLS zP)e83e~CQ6i>{Z^5ddRYXyh!A)+V)Yxb-7?*vz}ycb>smRTje%yK(pA(8tR2HkbE;Q>rP(0 z7Ji|Qse7-;z+wB+0-50SJJr@0*4iKKbG^|=@u#l_>pO=eN$5GdslPX28vdENg0 z{}k~pTRq+`s2jjGk@^rg87g=@+YmTe%D4D_^8Q|3p=Y+2rCWPsWuIm-TTbOUueMA( z2(b|AHuf^(NNHM(c;23gBsMB(V3B3%ulso>s0wN%=_$?>W)!9jQ(R2Rg-wr6jr6K`kDM5`|Lj3z4EZ0iC{C=39A&emHqi_<`v$$Mnzvak)yL@3vINs)}bA zW(m?Ag}RRQq#b`~#XAZ~qCy^BQB$hpT&a`Q?KSzpZSQgn)SBa;pK$U1@b)spib^D#wK8U_4_Ltz zW53l0Ks?+xjoq(s+K}YhRwa1B$IKa6LYWcwn_!x!J4;6lYKYWk_4 zu0!%OgvY4AtCi`Vs#!HJhey0uHm64}_|DO|l1|osUo(f)H#Ry>@9*%qxLy?c80s&e z?2sZLE=0zXfAcqbsDjQa&^|V?h@We~-jp}XbPz5hu?z5_%r-#`-z9(=ZvA*i%-Wgj zNtbndm-8yQLdONVaRS<;P;&#I(Ek0awv{Qnx*7^@b}s%Kr$=z@2N4i2{RM92FxYHc zA?_os36C>YWsG4)w-gJDxwr56550%X)-PeuMUEW@-b1efd_7qqhT;Kp^oI}Qgk1qU zc5hatsFDu+R^FHKQot24VDX1KD37QDJVO`wj^UcD1Dq7)on&o8usCe}5%jkg%q7wPUn9O~;r3UhZLPN(HLH8!!iK01h|BJTsY%QYeusJp9veuzS=q2B$eG zg?eh8m7Pn=@sgOjwNox~L^?Ba1$H;DzN>8c^Efg&pCl~ZqdU1V*1Zz`uNZ2oQZ4MM zL43!9hx{)ERfuEqz6K~A9khcfDI&Ym`L~Tq`8rPV$h$29l~J>=U@!GH(3^wcAi@=4wnIc5mP6l9 z-cydWxPL`&mlxtd0|MSClI~xOen%r%SFBk2K=+1%xhAlKfLqC$K))jPq_+`EgJ+HP zi<@?#W|*)(ZU>n@=3 z9fO@e(!q65H?7O0u_ary)5=CdRj?+=GgJn=`-tPFQ zQu$PS#Z;ur%c=5v*?nw+Wks6976{%0YR_8|o$^~(u4n%wi))$`;=dPfx_^^tU8>zZQsm1x=FGp$k#Fryo6o-=|W3$Z- zM~Gm_jEuJ`JEWecm_wz{(4+dEdH9<;-B#!fUT8hPpy0_jI5>DEUBKfOzjdoG@-rDQ zw;uF#0v2a>k1nv77G6J6Eq9OS^SrHCYV&ILIMQA_v~Go{x#j63Pu$4AT**HoPxGyw zW4ZK^y0E`Vd#FZMYk@ut^B#FaGU01qhZDj=_afr1^7(=11bQBpK}*;b{0bhJu4`mn zm~CKQ5G6t2jzpinALDpCM_0by@%o*?ZeAU_C}o-yo8BuIU znc4BUX@3Y-} zg7LsH?`Vvr+(ai1JM4So!+LS!_GjL^bXko#d!)Oy0vo}i0D~1l_Z!yw(<$oZjbO1e z6*YNRCR_X^3`*03%@U%TgUIh1D(DPj%{&Uv4+aX4o`{WRkOs~BJV7Jb4I5_*EIGuC z9W};(kEPG&v2O()z~3$gJ~?qJ_jx*60X(k*CIOHAfO`tuLv`;R_2qi+qk8*ZWyUp? z4WBJ8@2;mCpBF9=+wG`J+tda}r`FDm_vy_t==liLME*2EZlx*Dm`nt#3>5t%7KSt@Q}@~(jIcNM}?0?oob$Gjj~OSVC0f1Fm4F{KVDpjato zOgr7FhR@mR-1;KjOXti}e~8ighJ)i|h1q!un2LqBH&<4`r7E&EFSJx|X={o_n(K?l z#FNOEC&L^HwNO+KUVRRKQ$=vfJyjg0BCduVyxw&b;z;zk$N?Tr1a)I#VIo#G&ft?J zsYH5jCh?t52mHk%cGuu}6zEthsT&WFP>*F*fGJ59PUuft5!}zm`ID{wU~fCv z%)*s&C0u}5+;&}C-bj9*MShVZ`G9HT>K|MNv@8)E^sQZw-#D6SV0pqXcSVeSoFIQv z?2=(PE+O-Iv~!tJRgdp(JJLP1FObi0wsD_Iy?ri~_qm?}KR=xA%^_zzEbk?-RoM2; z61JTo-rSA(tP0$&`&*wZ)`AD=%N?10?uPDayJGxM&Y?@dS;<`iq`ceCr>iH{E$0$9 zgX(RQkSU?fTtr~Q>n}a~2+VM<9*#|ghVC~$uea@awDswFL1t(zf|{3KzgRoy6adiY zf92Mt~03|~jV zl5yVHMrzejG-p>9=|v+U(j}I#F+5uuP@jv2-6e~=@#Pgnr#FBy;8dszMytfS`CTOj z5mxS4TSKafa>XjY-|X)@_eO%}cb%1pIR+Ek&N4l&=p9W_y0J69D#J$q!PCd@4}pYm zquR2j&hE_n>eTFO7~djf{X>Ag@CywaZK!WDh#v`jUCFvd^aZP=de*nw}@ zd~kuK9ZpZyL)CLl(WZaxrs8;<{J>qjf~?e#K+Vx{v`nEf9S%?w)}Gdyx7a**o%(qN;x8{Oo&J2S;+c|%i4+e1+~xQnoHp5 zp3uu3cxv1b|`{(__YGh<&8rJU1*6d#%KrchO z4YBCu!YL%nC4r^P2oM4wD&DYX8{$tuA7&CNymVHiCDuT@q~wqsF}8r)9+0 zv66Y(jXB>2$2eErP;UHQBw>=1`f&MaaaNy%sq+J$RiW5p0p769B!NM&Is#GntaK($ z^P!MriF{g?`ipJw*C=$S>Ka(+z8snyzB-3fD?AvsBw~E>y@S6c%`baQTpYmg8mvEb zU%6g#U8}J%+B6+VtuNxO1F64-mos#ToVSI3(`_+Ubsh;|mc9aEqbsf9Fm)dsd zf_b~3x6hTA)ZUxax89{QCF*<#McCW!OG~S}a_Rg7Kt_ay&5I*w4F`9TKUaA4eopTo z99pyO!u%r=1heqkm^MdxZc~AGQ*E42-Nro7M7YpZyoTyM(IW{7J3&`@%uXm#;gOLJ z6xblw2IC=u=bbJ!&$mm7OKE$rJYWmY2-TtJD=AJlQb_mc&vatijFga5T-x6$m@bDR zjj<%67q?+RMf47u&87^xa>na32K>;BTtMggx;_L41BsefKWn%Lh+#;KeK$BO#yExPfi>xY zBQ|r##5z(QDC#;!DwuF+hABZ%Q9+_jsyRG%%c5=--eRJi=4v~;v)dx@8w>Q@#+7LuIMI;`I$KdY#)uuf2q)M&_w_yx^^>|<4p&qk%Do{aq;Q5l zXUIP7B79r5!uadO>LeWxt!odh;G%+bd+6VNcC0~9&Ob(+5?@s&O`fpZ8!kcr*{{*G z&CXr9+MDWbeGRtqv;Y`|wiNP)JPk`cVpwl`8L1;(N3tbD=Wx5s=)(`=S6@Au>AD1F zZ!~WMJc+XU@~-V9kDQZ0U#!=;tQcR=)?*e73HExQEOecF~wd}ccf&QjBu$I1%<+l_7ZH6h6UisZ^2uJcbH4b7w{g>4VYAU9o{ zM$eJ^AZnav3IOSm3x=Jq`Pe0AgOlU8`#ie60(w7n};=@|u z{<~nGTjZMppZkKmp;bl&rzu&k#+$aA)*`7OpSwh#gPkjFP;<#HMYg`yJn6S&SuF!PDSyVBJ8Q5);kd?GZPX_SjO6qH%XddC~ z!0KQR>H)FIT2dd#pZv8+40CmSFm8!()^Sc=awA${6gR#YSG<9Yc>$L$vXDL4j_MM< zQ7qGe~MT0|* zuA59(?{r`<_Cg@-jX#vHLe><~lt`U$3rrkIn)J354O=xn#p%n7?up1}T;L*JDvLw@ znwD*;Kb(c=%a@n3jV<qO{d!%D1H z$43BpZxDKScrDd?rGkRd90>~DM=bQZ+DbM9SA1S>d``WuO?_sc`Xe8|;(zOP%6i4M z=+pv$#>;=*8Wh*=-L*90K)>a`c9w;a(ah&Xy2$4(u0DVKPZ$(n>~8i;T59gCb?;~< z?1fPPS>oaZ-LRke($7V$(M+uh(tMntT0y;YQ^)ZScC~QQ{8v(Zs$6tnQ>pvHvsfq9 zK}vV}#YnXIMQ1uhRhhm=e0R-s)bjm$rhNYojQD3Xh&e2yOV(}#xU7~}TKbv#cg;7T z=knCeIhL#Tzu#T-q&w1V8mKnRNdKgzIk~*7H7^tC@Jn9{x3p>vq5M*5X&3DvBr#t)6Q9;6~rP{yP%ZthoA*|00D=F3XT>Do*v>TB zgA$)x{0>}dxi8ZZ%+iwB1$voigf;p;PY^^wcmpa+tGdULwMWb~9z=H|&5cC3R9cs1 zyI_w#zSWIy&_0oZpjSur8QKmmKdr1ik%H9jUPl!nAGVraso$Bv*!19Kw|^i^dS!k= z(imPAyz5nCRoIN0K$XwX&`FlWUo~C9Xpuln>Vul#`)eES8%5`IC@H_tFlgFYgeF({ zTd#%lSL%f!XEe<+nDp_@Y9hWY1tJAuH<;zjFEXCv z(b}qHzx;Jbri+QrVua_W8Q2=PBUjbpIF0?B9Gumm$jkdS*k|4gQlbwT+Ibzr-Pzkm zX7(nwUFC@qV1t3h@tF9Rl)_G@tv9?z^cyqv62_L6VfvvZgoT~Prwv!F#q;GD)=PC| z*u$Ly&NPKv*Qu*lpX$AujhMD#t}pk-95`p_?xO+pv;c#aO=OT}rLgJ@eS}0Tyz1_6 zoxay9J5Su0CQuBBr4cZ_nEErj1>yxEbOl#GC(INm{56T$Vb2oyV(mKY`pNhEx|%OPk4 z4NDm;J(iK8M~I#*9tmO%c|mgR3tbgl-%Hg~Kpk}P)&@Y?!E>wc;*rT*eSJpC z^)e4%ryk43{Stp^P(moVgVb-%(DdmMLGMwXDu@yX>y@Cj6yL^paUOaH@ja-Zq04H8 z|KvfZh1r2B+&{-VzW?6%juei7#x4A%*e;9~5l_R1d%a&tzf@Ntu3rX16IPs{Yf?WS zFa}Lo^n>)VY^VU-8*5P1?}m=qn#EZvHuZt$s9^~N5Kf!=h{T;C+XX?t1u~^mL(%>Y z<4R{k89Fh@AWfFAR_*$PRSJa(8v59#5c&Nr^-4!yx&f|Ri}@kT%Gx>qVE#K2 zte3-PSF2Hh+Edh0QL?CkSUEpdfFSIaYbyb2|%T)xiFaJJnjJcv1g-b?t+%hjMA zVsrr_Gjafl&jmkXVZ=DSx8w>5BIRH;igxH{bPZ8W*s(Q9lortd<~J2ps#VU!OpS{WP`GR6g3qDIsGY!CWg&mFd-PMlode_ z9cOeO;Vjl+8ER`W33$QOn$=%!4hpE322Ee~W@2z^6mr0A57xoM@9BM@7q|aLnJDaD z;M5K9qLsF>slJP$t}1jr{{sx2F5zU%q|l@Xv&?;+V&7Gd^%;GtLm7A{&7;iUcsB#?h#K-H<@3xk5&6)3pvqhwi9 zgYBcTT9upXS0av>gW_93_6l;;4)5?|wuVY*^f0$U1hZ_r#E|EBp}3)nN$@-^5SKVu z=&SlZ>5Aas^|JF+wPqn=kxY;Mv}F3?DcS9Q-xcmo>yDo z+bpW>XD#5z({FC+EuatM+xW8`L&vUuF@Ll{cjDF$;Gx#S<%TOVZWqT%fyd~sE0vOnclMg`+ zDtd?Gf?IZzF04Kxl~ZiRpQx!<==JZUT(0&N^>l7`gb=L$wq9!m-JC4#MTu|-3XZaP ze*<(dK33^{?$LYcIx}|SGWUEOJm$~#Z*nrd z{!LD;fw(Ha*NhT(Qd+AR`t?fD-$!n=Gd>}yFVX%Hh4*4D_0#m15^)ho8t_}G)GbOw z`YcV=he6PpP|9<*4V~6`2#Q^BoOOHq^R7jy?sWW;BSb5XTb=a@0elzBwD|nA zxN&l25!9&T4j7*F&_eEmpIp&{=Gn@K>xj!tu? ze;rn9&5T%hz1&zSoCX{{gQ<#{gqhNOa_agV=o^QS@$1iQ__Iq}_@P%{m%}*L=j!<| zx-eMK=8ZJyO4^&-wayNJ=M8(-4urS1#^SM1YCC;s8+)Z!I4cY>y^T~i5)oZaS4W7H zxt49kfTsi08ICqS4@)Zx)ut={0KtYr=%ix)K5gxewElHiVBB`a(FS^20_}v3XFMI7 zURwMnh!W)_(0dVMftuJ}k?QGYb8!SIU+;}0DX-%%=GeZ#LpA%%LH_6?wO18*nLEQ2 z)E}DlAMTvQO}WwKYUkAu1kStK!Qk-IA-qwV$10sA@3Qwjmoq{oyKu+LaZf^~0l=fU z!*am)Ip@MM`->+G#NxQ>n3KEISWA}KCDkSPAleQbv!FY6AGqRbJklboT=@Nw{;4N} zcK@`TmE74Lzgy|Yv||BBwo(^+(s+`bC`i%MB_oK%|5*5ND3B2mG)DFziOKG%m#|^z zZxh>whSu3<@`qeLOA)q|Bo?2_bQ<9vGaiL|k&#bd<+xm6bp@z4!*4XQA&F94F zd(L_eP6lITp#eedDMi$0cL$%2N4006$@&+2 zc&9zAij8_iWWuvk6PFI)x4Ok+kULG6N6~)2!#I7?;~Hony>367`&{#?v4L^8^aReh zC`C!U-#V@ybB+GpQiUPBsU_s*#)0DapdiB;g@jTgP=8HZMgsr1v*dUGswnp1>mW#7 z*C}2s^B^mj%)T#@e2;m2fId_mg6>`99=5@l~p>giXayoVQcG8$B#u znA>QE3*`9)ciy!Dkb#Rz7|QEz)$7HMxkqc3qfb0J+Aj8&b*8JMaLmR*aW|6wy~o30 z%{M|q$DPB!pO#fWHT zB63a`VPpQM7%|c#PAf;3NdX-J{Br%bl7AEX;I{y2*%-zC;PpiL%cd^=0ZVAA(j`q% zmpHK!??F6_6EFtFMaYG!b+djUe6^--JRW!rX{R0Z<&}V?LCB6U9|0CQR9pL{E?2|iH+dC z_OQD5d@1xYMd>jx_*b`i*&+Rs1j}fnR@8`&ky8P2;ne5l;SOIMq2SEIn+By~#ceMQ z4CNZ&k;~sEds3KPuimsJer}FB_$ZXSdAnMo4!WNKJC%Frc5diksl@BV;K;s;G*TQ@ zJ`ItXK`-L}T8u_lwdIze8y~501;)P$=U2eyJ!`St(10|EwpF{JxbbV4G*z3u56bX< zZ&N1}JU%Lr9K4EQOg4<0L!JY)ERT%mb*j_s&!i0r8V&f`QGU~?)N@0TWUa1=X_P!2 z-HFOdVFNiP-aHlK9XlWG+gfoyMZQ9^6}ob;rZ3&D2JJ~7=r+pZ_!(IW415}MTc~fA zCF%n{yuZA@_P>UG7Rl_PaIy>_76A93>ss0v6?BM(jzI}f(HTsF*)=$f^skX$ zOKhmC*^>=>Yi`Yq2yr>dnBf%Pk|O7_bJxbeEAbz1Z*?YDgWFynZMei;+$xqVy??If z%z>T8JUh}*`!0ZzSY-AYZAV};-B9uIUv4Nzq*=%YH5qhZt_DA{V;W-~zdiYw&sEOh z&F~=W26LLj{*k=v_P|(WyiDG1k>UlS;hbTEQb`l8^}C1gD%?k(y#QZR-L}XdV6wR- zdDvn?t6hxZ5%q}fv_>yfe%m0noZe9d7CLv?QyRqFD8?Qau>pjsAB;zo2=Cz;E*Zvr z_*OsG>Rdb7OU!)K2+=gY7FPc^!*svDT<7b7e`S)BiG^;Q?3p>iRd$!i9M0}g&}Gv7 zALt@i$hKo42^TXwSIQAa8Nd;BqTV()pSbc?7~n+rnY^yq1WVZ`9XoN#q}D$#M2ghp>IGF`;{@rheqpI~g( zcw3e0{KZPbxucKjA70)m4|2*KDvI>hJ!r(M(5$xW5{Go|2|+aLU(TuB5{~askj#+c z8PSVbBcEZ;#l(Nyl2w#9jIIKkXfATibisv@Qf}yQ2!Q$m9H$6m;+RN~TK#!=sxVD`>J;n zivF|73aoiXuCS_(Ya7)U-i#`;Ulb?5T$}P1Fo{%G*b?3TEWjr&LIIFdktxN|7@5XD zZyep4qIj&?3j53xciuqtr?b$v zCrGe%$l!2R$vE*F4C?)lBn22vcyl_&PRJ_~st7{WXoJcbxoRC8Kl>?Og^H#gs0v_8 zh)6GUmaV8{@OpNy+;jj4$?4Nh1;&~tPP|6T2v`QRxqDHOP- zurk1_G?73t53GQ-(H0D1VV!N1IV7ROZyJLk1KHM)2M+4)Ak7S;oo*Ok{uFV#wBe%= z{kwE94h=W#ZVq)0xeaB2`}RB{X!^i*v@qloAJ@MHJ+GKUEAD~K;ab?^pYG}onvqZF zZcC}aSpk(8PUN8_U{;)GV?FxG8g_Ex(wM)G9XMtaKvG{A0DctwZ8%hh7*H`c_>WU- zh)_R%AN7u4-|zaZiE_5LKcPv%Pb1n~6sME(6jCYO3Jb@}9ZMSXp)kJ|Yk)*@dGTTJ z^V$j++nD)VGz{#rkW4v9;0B-B!M`i<6Y)-HM(diu-M*k6pz57v+85wQPAx-Xl5%nw zW6vn6ZVc+He8eM@o6mn8=7df;WB(k9yRMI`%QcoO6U@vL%17bpn(C2_1n{PVp1-%$ z8K)Q_d2w-IfSi}GkqiGqKbERT_djBm^}YjSlqHsdQ!$jaFBs4em+U-~fwJP0*}IPKKziI@TyLSL02n#(DHCIB6s|M;emXJCxWFJ1UVIHEeHtM(rh z`)I^FvxcZ)Ny2wf9~q4%1v2vH_slSO#?Wc)HL!ualyi9hW{U zaER&ZxJEyl;vZhSNw148a=V78S+rClMifAfh$~SLwZVLPu-Qk{H0l!4@lIwAfk-_s z9guN#a?}xlfbI2Jz{8?XWTRIGf9D^PhVi=)ea(b}D55acT-S8@6vEhQ!?_9*1uMI! z689go%X)Bt^;H@pDbjIYJhnWnDdv;AK1ru}PYubUHOq;J@yLWn7uDwnG25Ex%Hd+` zrqGZVKG_JFBWQ+bD9!&TvfExF{^WKzyqO5nJ(Rh=+)dA3ukK?TJN6sZ73 zvA+c6)Ik$!?`G&*MQo~VErStbD0u3WjW%#E^7^)v9vX6-_=bJnbDgEWcGDH&d=gxg zXCIIiYFsoZLNNM)G|BOK&n+2xcYNQ$KRA4 z*ekk^$Y^-R2XMO#ey0=tCL4m+e2ug|^!+I^eB0 zw;j)q0w0e->KeJj7%9(3;iw^NVx0b&+SN||x-T&&)~8%nP69lFh=~l}cwC)l1;X3$ zo;D^gS2Ml(TehBWbtVt%U(-H8h!t5hN#XOe+u?PL9z}eTaBjdS ziuZ7SD|1Yo!j i0*Jv7CGSbn$xpFcrRt7g0vRpdJKXRSjHU@IR!lB`16At$Nkf z?=1*)ncl1xx$JVebP28r>f7|sJfv}~{lf%YF1Kc_?DSRRFkiLFYQ=l(AwL3~QRhxLxg=O_K zKiCGkX=4SzC6xL_A3j?b$N5u~F4{>DJ_A?ln}GlrI^p7rMH%k6Rm^X|-UxnJU(5CK zaOCE~-QIEQ(y^zPs!$BB9+pV4jz%Jo+lOYFxjHz*W}APmd$9`LnBc{_ zOrbGGWuHjq2=<&B%5r|2SwK)d8;JQiTA=*p=W{)KnrJ#rmocq}xZYy--@?ea>RE3= zz0=ujbyZ<}1;n5nU%%pw!U8W<;Csc)d0|!g(Bk(v=EDWRwLc?b{`wkspB|Hb2x3DL z5)H%MkPcmP<|{xL zF%ov#ypt!p;b}tUuR0W2tT16TJcTY-oyamAB#bVM+O@IMM2+wbShcS9~c1goA-nEKGl31!a9*&?LB%QPft)n z2>-CgN3@y|$m*)#JI^$W(88#KQ> z0?N>X$9wqJdx>^ma+4BqYefW4?Mn@x8RIFQZm6PJTFO9cYu-(r3119X>`TWYfkspK zjw%bnTHJ0%r{I}+cu-UQ)BmCSBd8Y{#9f7b%gsW2v5Nfm64={{cnu#pl&!nXwMMzU zqQMq%bDns)p>Nx$a{;#7<#}8Y^hOywaac{lli0(v*xNOv%ej1q@-|f))b1E>hv}NK zH7FB~Txbc@lac~LTvo-j7qaPGgO5uB#Q!}1F;!R@CK9hsR}1?2@;p>FJ-cYWdb{p* z`t!~x0f&8mVwF*95pe_!zIYx$P{w^az;0oPVz{E=&VfduaZhC_UTd?0!*uqX7I%1t zi2nS7@Kjbpo04>bvhOvWGR#cl<1c0KN-0dTf!{W&Eqnr#QG^o=^DSl^X-<2cG!YUT$}4YEa}GJscrj zHDDlz^B@63BRPD_v(gVWzYLGlfygSX%)+M5fSiYK}Plb=M|3LDZ>?fBfwy82NZIrK1#+l|zPMP`hA;2ocEMSxO*ZY?{|f}c&O$Vdd%ctyX@rs@ndmsxJcWG ztYZyPbOAC}#ugyL*Wb+rXDKDR>xz6_vA0R)%%5c((hZT9ZdRK zk@us8z?ng$jI2b%phzW@r{Ugy4+2EORZvbe&h7L!Se0tj3Mu6^G{>qy=xevNG)SQA ztBeu=ZmpZ->0iq7YiUKj2t0Iq$$lVsWKT|QJ2d{Z`;vnsy!mb3#lZ<4!OcyfrY%C= z;g6Q#`V@PcoH0xwJq&(n4tvq-CC)^{kb}N`{!`N0C2-Wfb-wyM2wEOJV8!zV4)2Dl-?Hoo^f_JHLLAHqlC|%w7srZp@g5f= zJcRBH2AStPR1GT7U=(0gk~8oe?1Ts^a{a_rD?j~tzQN9b`$f+GT!iZV?B9~wpdDqg z7cVVz_w93FU~e?Jg$m)@0+T~LUVnKpnS5^Ziw|-m4@*B!GMvYEeNH)eE2Az>NnSjD zStM~Yi@w{**)e3gy-7|b^%}%;zD$*!N>q8kyb{cZS-z{&45e)^s*@vF1^chDPp`Es zWQqSBL4Mep`OzGO>8r$@eQcv}`jj;PX%h3sq+$MHz4qo1hZv1O(O2<15q_imH{lCg zB=>^X*9uzibP(}WFx5p)%F*zEa6L%Hn*^$z-;S9*Z+mPfw?`yZFM|x8L^^E_MS^UC zGF&o$%8jr-w_o$1ri`o))HkFkS94EV%UQ9L7fpxJu>_$l55Z1v+y@(Z%bfj=EwrA+ z_$~V}`TbK6VE$zn7Y0CXOFiJ$KIm=BS%Ufk8})sZfDZ7IROA&GCVL(b!K)So7TNE15&RyrOb^ikvu;%;T_uc#1&-3j4 z9@Y?rl~wL7gt6M(3+CUkla|sbIdMn7LU5<)rRI57a;F(2(h7yX*G_|j|C3-lu)D`R zzf$%&4ZSENk`#VYfj;zep{9ALIB#El-Lf;$Tb7FXs1^fO`xC5#RC`?4L!gd+eO6=L z$j4MokW`NF(uSxa0(Y6#-`yCU9j>d~HiL(&h~%Deruz%@14G{ zvMaK1zd+mgc7rG$_L6!_vSa0$uz#|t<8OZh3^xB-Ne=#x7<5FRJ8-s|9Ia*icP%6= zYT-iy7@MZ=m&G1et>2;ghMxWhTiUVya(}7V7^7}t2AT%PfAr1|R|e?3^H#rOrut3? z@}DO-R2;y@ zJ&ecM?eBNp-~ac*&L=2C?GLVn0%)9wE`2*P>h^Ns%RhO7(cp6cd5C2w<~)L494524Bo+LMXIn8M&W zFHT#7_zcQceaMn-E1tk*viU|_%Prl-*XUok4SfjyO6dUg`duv<_v}2bz9bK=++g#L z_XA>ZFya7x?}*#-OokvQ=B*7kQoSHIX$G(1KL|j}5I_Jt#WzD!XdFcy0A7uAi+mf% zzqO+u(XYVfwigNL% zL%wIyDwD0s1oL)z=(@{GjZ4=C_M}$f%Wz()t0~hkTYZ)%NXtLs_SKEH=Yy^u>Bd!y z%g>7eyIk1$YR)@`&Q+*iftcq@EQRon;6J9nH79Ff1u>0VyfIysJd6r|yKqHC%%DZH zSCe-bZ64rX4l(%Ojd<-!0_=Qx0_-{mZ(OP%Omk?ov_wZDx87reL<%&A%o6Qv;rmzR zpUb<>`j=bC7S7FNq-yb3jfh~!h84}ey=-y87w2CrF9Y@Uq8YohNxG}V^L^5?P_uKt zmra>G(;4z@$ZV>Q!zZ20=KlQirgr;hbI*mtq*8&khj6odKq17p@9OQ*XQteYny(|4 z4&RVwq)wt=Yptzqzi^tU+bKucvvCDEm%@mR$7Hu^dkA+03{4aG#ZKx;hkc z+cIgfIk^4J@Bg;Avi7L>tb1O%(|!5yl*Tst<>XSV&f(cyT_L?zfBv32t-XTs!+;DD zF2V_hEKt%S+pZ^eqIlV~QkHM#m-I^s< zfkO7cd9&0O>9W(ICvSs&U@yB_F;&;X7dW3(AO4&z^a8Txyu?KrOOIZeCxf5 zJxw5&izj&BlT=q63QH*znLL*$7L#lEI?b}MSkB?U`^!>nZ7MQSQinEx{%LFI1+A=M z&v@MASFgM8EHP8cMd~1gb$dpsSHj#{oe2I5;dC5Sk6UV)J;eaD3wntnJnR}Qq>|_g zYx#UxdcSMtq5M7ZJ>l19go{0SY3Mwk)IeRDSZ&F78m`A_+je)jP$&$cn0!8P*eHM} zRF8`uvv^^T{c7)Ka=Z|SqY%WXiuj(c(B0wshUk1Ytz?_h2BY#c!h$l|BFRuhSLHdN z1K_C3o}=v#PjTxU?mpNJdh29rA)!#;02ZO>b+t8_ht)E0+&16BAhd5$l=4%z37sk6U=tYwWI;bP^W(rbU_nTd%!QSyB;!f>Ud0 zA$X*6kKm9?EtoulW!Wkj*oD;Jai+f0z^lr7`pAn7eAZ=)tC;;meyTDT|Mf~>%-1rD zHDVXkBI&5tJVZL2KmR2ZeisgCnw_}74VUB_lk#>uI7m!^_xOvg+q2=Zxuj^m=6b0CjOSy6{WO;dlc>&GAB4MLXX+zIsJ(BRswVI}xz(1E<_HuL2o;DT zsq7;i2!19|n#zagsw2P%6c@EhRStUVmzSz5M=&|&tr^i)`uH=uUe0F}f0fieB#;ke zDa~Ky3=q@At;%Npz)A3sYGt`zDMROAfVJVIM>k2}MsdFlTAl3-~^r}DI0OT4jLslmb4fEvW(9~}sNskx+K9E_Sz zAw|pnPNh()Wt)4ywuukcMNG|^i6%c!{(ZGcn==Um9ww05D;vN>t#ANn3qi*AFfd{4 zHl%l#U&q!n!P+PvJ5dYwWw>-|5eI&!o&A%_z(Y|gP6=mcHD(TXXC{H$5c`0nE3`2^ zGIIjNm9PGfwYS1UW@SZWx}ZmUhMS;3ie{pAIO<^fMyT$*c|10FM7cR!o5Dqmm+0s% z^FUBoFT1nQrGYyPgfJUeB}x&&@8+@=df>r>pYX`(s}Y9Kw>Qnu^*TX^i9f#d_&D zeBRlLrcPG=prNU|_*yTeBNs2i&+JkV4@Q{J2q*QrkVtglHnc=_pI?M$$X9ODj@H2% z_z#VhF@1aHHU+zZYw-KpUYzeg@Q&Br0*7Y&n}R;J9KuBaYXnOkamT>!@B(WTF0P!P z2mD-y8f}PB+YH{BSeq1j)vdSMmWGiMIgsspSUss@#^_HZM5rh5o};USKc8d>dw8UN zecV14eG|r&m_4COrY*j0nDp+3nkvfL0ir2r2+mtL8k6l*_xgDaaX#egPCRogJ!Vcq z^B-~pl5o~evbX(5uGo=;XL7jOR0KCgBpt)Q&>Ub* z5R7TK)$)>S#%9%Kab#*f^kXJA18Ld%Ch-XAV@U^o3pYdT%DjV=@9Ys&H?j)XI3H(f8$*r+}q>T8lF1g&{ch(T~uCb=&N=kq8#Ph6b0PZ5avy$Hj)C zjq3Laqh1$3WO>6bDKD%k_9hH&690rXMHgRVH{R)ZW>pt>=c_X=MrHr|CSALxVG zb~XSMO}n5EB&nES4KWG*+z*M^P%QyQx>5yh?MrO2Mo?xdsY33`+Kl|WS>R@&f#rza zc#ltPwl4|aJk?`j=^X#CmWStwM6B6J86_Sx*cVvvVzR^U6%tL@tuB7nXY&DxQp6=o zScvCl)JLPumfN22RyizHyUOFY=CkJ$zz8Gw%ZCCc9EybGo!=J5*+*vX*%vT z^7;dUS^glTep7?K5R><@k`X!-)NRnT_@#n=XmuvO*IL%8#4M@?wkd;RR=NgLk=9ZiDf{B2oQr1z zhNQs-=I1uTl^*KxG+r|fhh=VR4TXZo8Ca6@V^F6Lyh{W^zARCyT#N4he(RQIyGb&>mnw)c^68 zl=%szAJ-=tZ?T3gL`fF5i7To9t@kmrZD0_lnI~@-NDih&G%BKb1zW~ssDaXFT_Kj* z<4>xir(?b{ah7qM!L^-ni!d*6tJ5HC(&mV*GtLxYJWirCgM947u`uZC;`~GrsPMyp$(^n8p&mP?kVv}ww@kTvvI^*g}))xs*P)0_< z!YNo80^>YDonJtS5$|iS7h2hA}m&t%R5@iWqT zS{c~k9jbwS^L&V6G2!sl-%>t{RkVoRs3$dNEh%Mbs@l?=PN*Oqn`oLEQ~FqHRtL|( z+IWUD^71~3VoM=Zv+O;h1oxMrr{=L*lRH&qqj+WLy-$oqg6SN2rhM<;+?132`q6uk zC%8KsLe)#I74#iVsoUX5y0?_=13^iS{QOA4HJ1w$^rl+13ucXF?4qOogkM&)VqEn) z=uv3l(#S(>EoTpfyMRu{mR|hzISYKEH`+b{4~s}B zeqi-z$w9{^U;7YbKtrTj&I)~mm(!sVP=qVSN}M2$IGh^`yR6+aLvP1NDy*zx>d+@} zSsFoEwD@iK>^;7GJj0vxUh`6od(2HhQ2`B7PBVL@U6CG~)7mfSbl4_kRICjeFJtnD z2J{ee(CYqar(h1!y;kDh=-f?zQI!gxa>#OEIT^PwD5x?^^tre>Hm0F30x~3i;ioD+ z2t06}`V$2T8dZ0>Rk)cicT<3Ds6T7iC!M(Zy6>ZGhHK=xmOM5)`vPba`?oRgy`OA4 zq4~arYNJnNkYsxK?bYe-ai`pE{6w*l8Ugve9B$pbp#%=KjVFViWc^b=$X5ehhidigeM{*s18gAvnpC@~@~6x8 zU|aQX_ij197Zyg{^V(qhx&P~G1L#oZT%{8*moUXi1*Fz^dr}ho8XCw0S5QQref7V+ zkT;lRbsq1P=;1s|kTl1x3x^{lZ9A`mEu*FI1sHS%z4hDv93IQV= zFRp+Uc#)s(4D~&$TOfT&cn)TDyxOfE-8T8>rC)7tq($I(Fka#(+Vu~}SHS8LJfINo zx~3s+ z^Cp68>q9W1;lTV+#uyqRM z_kp1M$rVfI%LM9yJ`mLa9i9MWI@4dw5;VS9*XKyJ>TNz#hNprUY9B1t_M>YbjNK6l z_)0Ti9PIP$M4H~CuxoD(wZYi##gm-=ULcWbwUTSf0$}o{zK=!#DnLGV8<<@5=(RZ$ zIj#cz5FV@*xCqeQ0L~KMU7L5!K@c+|Jhd;Q8dB=h_cMmREL^{JV#gZ_x?0p$W`0`d zzDqf@5Mf_KNsq={hh2f|}g(>1;p zQztyS=SWLm;CCaD!p(PgS^k|9G%P{{DPX~%)6!Y5#Xtf)rR3z~;j_knzL@Xd-D0^3 zF)VzbL5f?}lBS}u0NRSH&i?o18fNpfS zJcoeaTj;@V>){Rc>aKcRb##!lJ*$aUTy?Q8;}fAvGJll@J;*aS7W(t#ljT8QSVJD- zp@Y^aag6qVmnouJAasTlwisMQX%qO3qZYeWllTTX2ygoyjHt2EhQOm4JM+kl0dEpk zgZJ|o*d))I$Y=LKeb*JvYpQ{I0cM2gJx&6Q)+x}t7Bm0%gZTM)vkWWUuf=EQ(GEWB zTpr?59(y^!yo%6k;^);!v0BkzH@gn`0BCG?g90f z%0PIzSe|9x0g+C(1&`B}qZPafJVCg?z!`^Zv@(t%u25^YM=4Yh2ifA+w7fBGQ<6)= z`|@~$;5VL(uTX@O(7jpm*U>bZLqz!sKatu8m+$YTARUEWX|47F|1_Q!7)sWW1$}7< zav!3hwK+`H_WND$dDLb`0&}f-EV$$$$biH{N76)XHp+W}FmXYliK)hmDy-Z8Ww88OX7jlw zG_6^m$lk`WA* z6d}025ojKWRAZS26|rh0;qrxEw)dLW;tAn0<9jK*c0l#io`8o;zspj$x`;c>^QBk? z_zexV_qND9e)>@msX?O(lKZXO)*lo~M_JTs3n~ zN(%?WT0|dbfFK70O^SbZ`UbGX44%pb3rcXG0^d- zFJyI^AUq*I6x1PO__Ke#mX&tAeyP7Z`pNv{L#KlyGp&P=mN}6h#D}L3yJorxJZC@I z{SY0#MOe&CH8>=~Fd@Q|Q5Ar{_3aBCFkZD7lCgPh zK$8s4MvIuW7_4+jk@Icls|f9-%>e%e5p$)^MmU0Ag^RCo_L1*doj?6sHDjMB@w|8* zXfvh=i!#l0U2FmqRgs1VpQ|}G@Fsz_7b&rWWQeZi8QY?9l!AKi;-s~1k-U`l<*2!1 zW-MYkKwX%*4$Kp1z z-G8gIV`cRXnU*r1r01ZlCAQv~{5RKA*MmM>+A>961laLo^i#!jJBJ_sG8-~YSa?t^ zGB)$JXiy1y%WPR>27j^{7zGq^sNw?VVynf;8=9mLn(>E4Y zLn|F^a3%V3>3?PcNWZ4z7+9c9N;-@N!#j1t_Lu1lv|MjM$P}e1ce4n)!27Pm+v-wd z`3bv}-k3Dp9KAQEZ5gOn2vb{tbQ2Ym+}4E$cB5e30T?(B4RY4h9OU<>?=$;BGRVu( zS)VQH0RhJGJ_?ugAUYJ$3m_YUh)}$tVFTwy0;ibk_o|L1xF3-jT?S2(h z>tmvaR9||aoa$K4W~R@UK}X3-^XFsbvZv$CwjlT++aG!j5~ZNz38{sP0o07CJYp!` zVbPw5@HCj^8a5Fl*|(YZ#s2UM>7}v!IErJG3>yhmp%0viFu(Fs64X!s310uZlln8y zRp*F1Q7Yi)=zV94eu_e#;e=Bm@@hgA&DksrXBTC1==(*14X%}Dvz}Z>@gY7*`xrLF z_VZwuJ8IG-dX3p!!%0i|)5D~4!lR2fXZHrlqj7m1-X?!lT6f5AJGe4>-EI68g22M9OA6`5rC7?BpQoBZGcDxz&}|fE~3Tfxl&ZZoghNEdUAMdoe>^- zCcbXu)iMN_jHC4RAuL-YZn%2c#U49UXnev`mZR{ICza{%K}k*68hqB7qaqUS zL$&Aup0aX_B!w>TJr}6kC-G%Co7iNY`WLMSL}jJ(K&q=NGQ7e;4B>C%9?Pfm(ACd3 z%QPv%l;oC*?jD9}GNhy`}Z`cT?B3_wp9;dj;lr!9;uz?b35mW3<4f<8BdS9Ia z7=`=M!{w-pyKL^XI7fAOaRg^Fef|D|hQ67+)6MFm9LN)X{faIN0$+rds8x4GFjnYG zz*+mkgZ6P5%Y7xQchnf)&v`GicvG?TH$!eM?PzJY5h7_GNgl%v>h4z`BFC#(OYlgp z`pqd{EY&OX*9lZK6je`1HStz$uYs{7bK`4{qt@|&qBaHm zPwNLPpWh~n*@96msUV)Z0WP#iFL?;%6njvqbXh$K1>wUJoP2tKLa|HEJpRI?MS>Nb zKNt-?LE}&<20q8dn3j!v5hYz_WwR0w%3Xms%~J-I`2*w$9i3#GU?e9&{k1b*&j(({ zqF>A1fjmvZO&JPAf%A8Am{T+*o;soen~0-BAEmPr_LlDZ?t4>;6Q?MY(r@uLw^P2< zJXi2<0|(oDRr3wxsc7yF3TKB{5pIhNbP-f^3zxc{k4iR|VKtpEr-eN4}{C;pDOK0}*;C;@-v0SQ_HFO);K`BI5Nz`eH&5X)156jjRS zPCu!3If*D*p}L;Xd6jqkeIO`wvp+-|;JHJlRE@%Ug!X_%S>|^<2w$B3KsD{9761=G zIQ15up1M1Uw-&er$cFES)M$lEg#z+g0&zjiDHvro1ssb&f3_>e<0j=?+xTJqQV zHEu|gV2J>{NrjrD+A$VjNRl^Rh_Vkq>^{;}-X=#ue)Uc-@t$}1E~HCbhlql*EQ>;S z2VgFC+Ul34Ez({QSo-E@K7qv^KCJ@C z)6otu+^IlLE7YAZ=NACYpY)R#dt&=CH-TO=jNzQb-cOrJ0Vg^oAMU1F1%WTW32Fw| z@;(t$#F}n7W(I47^5xBLe!O`l*c{mp+4OKZEC~;W*a)UlP~Q{yICQspj``g6B>dY4 z3G-5gVBQC(km4+ZD%<#n8(}xC#w4QL=(`x_Y0dxQ+sp0N;0I`@izpw8b^n!V+Dfe} zGg6c+#rIKi&Fr@3N5nCPu^F^FY^TC@3PT}vjsz{vB}PKFwuS=AS3Y9O{Q08C5}$>g z&Rzs@Br_O2b7$`sxY?>9}~EnOUr*=J20PXNRMLrS_Jgo)>GW1Ve<|^|zPX z07&;r2zdN2L@D4&+mqHGulqxE?}w#b66cZm9u$2ysD5@YP?z_>2c{`U+JWicUti!w zAC3=sV-c4PM5mt{Q=2;1Bzd7L796pdD7D}=?xsy;pv!RhXhMXyVV#3KS@)8y3R6yG z{XvNxKjo7veXZgu+g7&WrE;$Y(@fLYOc-_PSkO}%zQPA#jurf>|Vk3qF3yk zvus)thDR@pkb!>^WPuR^U0!iuR|RG>PPQfqQ=*B8lXRcM?vZ;hl~N6zBR+<`S5r&j zi~p@3AWbfNj*|9XY6(3C7?f0y5x~}=TU=hh!c*hQVGwysv50UGt_HbM91+V;g0F-; zioh>b$mOm}KL-ESG`So}4H5uZ2VDB za~x`%tlC6eZ*MYInp4zJL~_FkH@p~yiR017s=Vg8u<cRe8 z0cq0yY9gV-lI~4a$N{>~$_ci%*4o*PgQKN8Q2cFumsPTx$$2^B70+bKsX01g?z-=} zAJXAXX1S(&>zn83lmE6}DHwy2f1Y2IZ~77e3Ogo5Of4S+rLG0Y>w3~4wY$r7&HV$_ zUSO_38`h#c3hy4x0G3iEg;IMMbz5!_2Tc?ZUV$*Elj+I z@+V##juyc=O*I80usRZ@%RyJHBNnMZQ!&6Qt^KNY0BI1ql9yHibDYbbDH!yz2p5CO zK{MBQ=nt?1$6VYo7b4nMj&mUvY1cY?JRcl^F@PrF5^b+|?*7I&Mw5>+0w zk^2VgODQ+Vr_zH&YG7s0l}!2~Pt!ZNH6R-<7+F)O0?}TOBcsyn!*psrLP=?0vLk361OKt#*$m%hvSCh7Z%U+eZKZX%4Og-{i##9wCmWqHw1mD z9q{INtb*i~3m6t6N(EcGzBs~_*r;ac^$yUi*B$a5&Uz{nR7mb20L6SLM4e*gj7)$! z)hzEdA?48jeT|CKW0}VsKZ0=1=gFAtSLPPMlkhvHA04f$tt{ zsU@_;n1{0cmwxpR1mm%iAX>I=AlPg;;W-*Q`nWrX7~zQw|5Ah=Nk(~v$ckpV5i~c zDmqv@3R)mFr+xu-(a#18T6NMKvKp??BJ%X_I%=KT*Ia(*64h(O6Rl(xdpQd zuX*sO_QWM~xP9EqvoNumbcC>7bZ4G`7*o`Nf`*RPB>;wbM7Kkx0E~v~F2D?ty6_qw zrA?|_KTPjCE3%X+T(m0Pt36+idI!+$%O42NVCtAA6|8ga!T4AiR{3RxzBzkaumyI% zz(o^wg>Fs>*9Ggxtn1D_CRGa@GY2XK!_I3ieDo*RfW-GIZL9qBo8SuRa8#Rr6lRLS1sMX;RK=d2wbN+#y=GmR}Zibjt4W2M#Vfr z1K1MQ=|W93&%5uzAS`=xj6JDP?4^XvU8`mkb(gfz*94{?stKS%3Lg~76H6kRRj1%L z;M8WWye`2rRrD1MvUcyQ!W_T7rp24lbj|f%y+=g}hDZU33?GJmF};2gsbitqIbIUn z40o9!8k;EV>e}qKonXe$tbQ+T0k>L{JAPIeYxTmUeMeJkc`9t~hG0Kk$c&Cr99E(P z=Oci8)aZ;{pID2P z8|o!+6YgiTHkwx0J({`PDs~IjV(p$#-&EcrjdQ-?3vhmA2x0jgy=WMqQ|~-F-TDID z)w7Sjqq3&oCG?QWXE4>Jh{pzD@htY^gWa6#0x9$rJmxv#e!&;q4)Mz3#gfEVqD7$X zN0Y4N@-@FVmbYY*?W$|+xrzn+li0@Dp=i}r-=TM8|D!*pR^doEZUd=OoXzhTJ0jfJ z+%WZ&r_=rvI6Eraz*N&=liNc&g+*7qza2zD#B>7GycqMCC(kr+nKG3(g)lI3th64d zM2y{#Nz`3TeOmp#OskA3kIO7wHMVo|5*f{bTV9KCK3D2;)sp9v(K&*t?J4&{dY88{ zsfmkfy2OM|n2s~Pqn&38YbAbtD-MM`X5!)Pe2K_wWF#0Yy~(T4J=3k$JzM_UW;#ae zV!e-SDnq~2Ql`^DlIXH6Qcvj1C@JgS#jyP86^Ru_>8sPciW$y*PV?yj^aWgN9FSZa z&)Wr8-yG*XT$#9S7xatIxL)Nv`~52Y(swD8?vzUq9-!OjL_Z0m)DZC>Nz8zka+CD} zVm|}F$*=SQi4_vBWvXw;(yz2J#W-@nu-FY?v__irDxlVu?R0L)I+?{5qpZ#LON#9i zu$p;-ZH0g?4Hpj3v|@4@=R&?h1V%=*6A_@^rZyIH8$A{3jSvlOi|4ao`9v!a*&W`j z!gfF2CoUS7A5IUPO{Wy2YvAEzxRz@zKh|kboX)C4S6~x4m1)J^2O%o*cpFWZN!7##M3 zCM6t1baeE8+#f)t&hqnUK#GVHeYL4(a!L8sd#~0nes*Q-V1AjllMxq=9hUf!j;;?E z{sdI{raPgFXc^u5d{=^ldGou2FRzjNl!bH2LWf2mpzV%~>zVM=A^@o$^3RLSXZKqKPV82Jib$#0uI!7*&Is;+n=O9{;p zAEyi|Y&|T<&!ujPd>(HS#gJYz;pcgF`)KQ#G!I#ZKvQVl%GoBxm}ya|vV^38DMA>n zioz9NQadZS;v!c8&OxO)x9E>T6TJ*g(F)?D$uNs>GI!sE*zf#Sv5bWV_lG$GpfBOw zO7B2*zsnyNLP-n)Bk(Zxzb@WhHWA1U6+UbT#MsSL4P$FLV_;l|A_RdQ{iy!=Q9Fz3 zt*Ptw_v#T#*&_x?=T*W6tTF;fpbtj!=pO+BTo&*O!!rJca1QNE{fK(4Dj9Ykz{!Ys z`;QuGH1r>_UV-eCD#U*!SJ{NDG;eFJcyj)CZF*rO;PlV@Q!)+ZP3~D(Oc_X$<=k@~O|{h`Ti4+kA1c_vo_)bsK~2n&yIYA*uybP#Rh&sJ5SF z?S53)Wlzd`qCxYi4f^7N79>@!E!PY1qG(D`6QjDSwScGnZrqS&e6yw3YaryYXLt!r zXBN8e&<2yIF{HjDMQm>g(my#lIrQn<2A-JrtLLB3t^-fjyCRN(D@N$B28)UJ^PcMw zy=ih&h{Bh{-~L@&PXF?i0w~3g3?f$Tku=A^$o4OwrAt*_y<+O#0sJuoac7RDSEOWqh8gL^ceqUh+xy=5XvjxrfWEtAJ zx{BB!T&-5~j8=8%PY0tz4#4O1{w%v!Ap@AXlu{LZg=FVLNg2h$uhy5_qc)vly_t+0 zn<4QR*$#?|xJKT)m2f>hW$cU~3kjy;Q@~PySk^P~+RVjUoHCd$GY_kG@$;Xo`d?;| zH*;O)4UPouezdBN%E}~mJ2xHCjNFOcU9+ixM`YhslC*GZSsjXr^l)%}i)jLYvzDl7 zK}9Bjw@Ks!4|gr#wG%(Dn-e-1vu`%Yte+H5@ea=n!&!+7d178A$AyJRv3Y_u4VxR& z)4Zgp2BHcVPI(kd`Q8zEXB+*-9q$4h`ApvvbPXZ~=AYYHGAUJ|buF>jnit(*p3x`r z)3{o;SOFra`-VvWa=-T7qFGsPLNp~;!_Vv2@4hbpiK&T8C?1CJ(PZ&EUjhSMWHMGH z9RW};8bNhS%3wX46&S=Lea@}v8QH|z^i5Y&2Jz<*@abd#rW(y58{?z9fg(=T9oxlq z0?y}?z#o%dE|L3l`5urSrTF7s{Hm%-0p|GbcW1tq$KCIErJhMBgjb4hq7vX?^6zr; z-R<>7g2w{Zw;9s@9pXJ61N zs2Qk!c%A~#FHu$kL`p<)Xy@Q<@W$WKc>yb{zw!|KLSyCr7j@yk0GK~F(rk(&tUyD@ z_3JX46C1ca*tx>TvHsV=^T&DO!)vJ~0)xEAq&7+vr>XU;93ip-OQm8US>!ewxaalv z@87TgnQH`mBmq5A?;FKQ@8So?0Q#vI7ROP&O?AwVUUwL~80KaR}mR4Ywo* zw$BhiK}BZM#{UJdF&xh;nP4(g86QDBw{|hkYo6B9yM${On0L0+D!V19KK4I?tM9W+ zbK*)r)qjD?QoC_*$DVrgW?!vOJCeJu?;gX{g~}_+nZk5j?sES~nwv?O8>?Rya#I&= zTqIDW=~vg`LsLXWa`tX_KwBO-%S#wAeXo?HF4})fj2UO*@)gZZ_=Bq;ftknlSO)QA zN$u4H&mY8iboDyUI(6OwQ3TxS0hG-bzyZnuY!uPA3;(YCLlTz=((s`epD4_K41mdh zNeD0+ayPD6pD36FYy~z3L7Sm{@)f|zUO!$F^nbN%3f@b1?%{SO|Bb7LUby}v4hZhy zxTY)lSjqbsaGh!`Yc>E^O5`35$^qifADkLU;k^Jp%gwb*NiB$t5K=I6KL|qHMoFke zoW_Q|F90j2LZ!XtwvCkqeK*w#Fc{Sga91e3QK>D?u~YN<@L==(Hga4(Kow3o_5>Uj z8-OQP0x($+CE{!|;fqWN0Mk*yAGW~aZlQme@d5?G8&dzRGHS)J*_`46V3xMghs&U`d4~zvN zODAxwTsAMaOY#MMmWUrYfOwHXY|WBncbg>v56EQ-aq-5sHYu$9U>(uRCM0R;eC zc%Bg!5yGJGl7gI_0o&gx5g)Eh7s~5Hr(;K&hBGD1T?n+2r}gf6($_??so#73?(L7; zN}uutww-Skak6j!wbWDNFObwg%TFIR)C7(YlR?^zMyC??aynQ|_{4X=9;ufe&-UGO zt~r~a;HmHAddNoUVOxHO{s*oKIk_!%^V!2%{D{Q|;NT-asA@UtgX0q(UF#o`Zwm(HD!1 z+w&R^6v>`vz;l%VSb%eBhC)NIwodngV+;Fq)7k(BQVi_gJOT~eTp?;AxZ2L2hb5C| zmih%WzP|+Kh4Bs^tVfG!{16$C2sT}#)s)yh2o?0n4B)MKCpjl%`H`rwqpA98>3Y5r-+Ui$;>lNk?P1-fnJrms#p!IPi_jc{udeD|P z^7s_`VCqEhs_F3*EmDDD$n4KjdBg`kx7Gv; z&4Q`7CAsh>GIC$(&WB$ROsGc-M)LeSe7MK??(j~Ti}5>K+L!wv3VRH>+>K>HrK|v1zz+ z$nRI-oDem1YQv62b150%DqwqwV4A4;@P9El@}M4j`AT~{Z&4LRK6LN`h*8ghGa=uA zs}b<<;Qfm|r8bF=@|Ke&;zA)}-lse9>n%LQgYEjuM3)%=R>MGw63J z0zm#(^#-xh)6EG`TH{gyMil@YWC}hGts3+kaM{Raxv`2}!pehcFNCf3f)28W0bjmP zSp9|1~iaM-Q z@u+EU4EK0C<Aal+tBzHFz8kxU`c+t*m^O9dQm<>!N%;ZJsjDY&Z6om~ zWKFePTwYe6X@g22*5KhGQ`nZ@t-gi9_ER8aUjhX!%`h-C(%|wqUyfM?(#x`*fv*J# zI0htCyc1t=IO@*AISTp`SwQ^_WJ9$Dax&${tuE&+uDOpRHPi<<8o~&KHu)O>{Vv`V(FYJ4A~ z4!qSsGLB)v7AY>Ciar8Xp!Xjx|KoLNk^D%!aSWKWk+Zn3qaoX+R2mY2AZBl@AXuZ` zqE4Yjjv5N{4ljXJ%kHq4vKQ^fkugcYG`*)sAMDZ2-d)N-a)C7@^_2P;h)@(w)J}yI z;>1oR%e1DU9XxrDfKImxMoBt^X*f28WjRi(1MkBNfr<>yPjy%^iEMk*`PhZ!*dV1s zXC|x4_{zF{gE!7f^A1iSr__0?stS^;89Z9YQrXmj`&foQZR(n?TSm5n}5WaF#4%h30PAbDTLy((4 zkg6_!P$=y1;qBi7nTcC|@<#aDo4{|GR!V^NJ=>Y=IxQj6ZOS6`q7_1m2sc?<7I}Kt zv7>z;GW9IwAGSS$Gvj?0ytRS6?8hQm7#=E&{xu;FnF^kG$9n}s{Wf!pf>b zKw-Y@NdaYJ&;BSKT0yD?z8s=}gg2M>aJ1cA0sxm+e)x_a@C})FJFoFl`Hk_yVM;X~ zr$$RTNpVm>!ayXsQ|(`S!}m*}l#RV%UvJ1{$w>b{t-MXEFInrv6-5gd4=odL;azST z{Z62hG1!uRRB}S8uD;ZcTsNL6N$5Yi;iI^G`Vxi%e@2-u;DY$li zw;RtlDP@vDRfzGK`i(!fzhMY)1{&GL(*M?K=@zN$t7W#dn_#{CLtBZ9pv_VghR45a zd;@{SG1&gV+xDO<2G%esJ2C-RmaE^Lm%AIm7z6uSj?$l-)!BB7FoZ*~r9IR7{V?5a zM+Fmy?pFt(UrpA19O-Rg=PHB~q;ztyJ4G}u9}stDneVJvcYI_hjxzlEbR4iscHRR| z8!39Eu@+_dd|C@iT-jQ{#laakCu$xA6N9Ple468E^9;H&k_Jn(By0oS8sgveD|sYD z$&bQpP;#-iu;eHfeB#H*k=hX0#t^Z<2T+7S^C5QPaxzi}4EwoSa>v4ct~C7+w=0{h ztim)GVk4GrNJOXo03_YF5ZlW^^YmC<9&yL+gT_-DdJIsMe!!%k>H?v;28YOFPMtLgc*C*2MxqqI!*0$iM7+00+Qul@mL^YOogMZSD}x$ zZ8GS}(4VM@D8=lz!%lvb_&5u?rN;5{kwXQ@~cO1Z~wkEO+Ji-qZomPT#JDJ+@=KC zhMUB9dJ9N`t$cFr1(&M*_dKP6n(`;TT%HvKj`!E%J%ybyJ8$$F6`3B(gv2>fgbKtz zqW&wmSzP4eMIid^v6n#R_gzk+ocpRhVZlu~QID6T;R!7UKnCAbEHyE_C3?mD;zmk``t z26uONcXxO9JM(_$oO|wC_uu?st)idqUA1>r?*{F9lC~`rTl5kZKAac_Q2qbce$~-V zEP}rA2h{VE?~E;UgH)qVH_wEoZkH@ZB{T6P@f&EA0YOt=pDAmMq$KGaTLpW@=1@n) zj|?pAg>;*9g8J47SP+LrZK+1YL|3}+G8_UR+%hYOO3t-p`7HC(_F0v*uKmw6=S03J za?4v)%kLbHF)#X}(A(d>APNORldQ&=nYR2>vOZ5rC8-hH--8cg?++&Fx1A)+p%$r? z_B}3d@hA(|d~%1ey#nSep7>>6oO@g*jV}oULwYiBfQC~IFP=Jm|NKPL1{mwRpCBav zQvudH?HGEB?HTtRxGk(v3!ULo+oHVgu~MoE8Re2j#n6Xj$I$Q|GYqI}Fr-q+=zp8>dr^ z554t-S3zM5^Yc;jNqH_&=`KohPSD0%!yvPtJUu+>P5XQadHBDh}#PK$1=(jfgkx;@xGaj__=~DoZ z2nPbwInv(g0?@pZf`T7Ve5Cjn^6Ef@iQHt!$JYg(j!3P9ppGnXGmH@_Pfa%el);hQ zfO4vzBnhIlH;0;sp~v#q%djk_W6ILn1^UM2-~Cs8wAr2xg%PGr5zo;iFUS(lZ%}6> z1?Mt^cwz@^lRCVa`|#==p6%Us9C-Diz0I-&Oa}>?)mJ^EIYxZadkP?yiaS72<6v z$o*2iHZA{L=!{m7N%9HHT|ogQVnNi***4;bps<}|uek`i%LcYx7N}j{t&7r$h>mn_ z8IHqL01b~ixQgy-F`mW^oGd8lLAx;G0E1^m5q@6L)gN6mBx*2d`(}^WAqWb_RhOVl05o& zF8qcE0UO>Z8vb;r zT;ivRct#LqEBjQmyqp+xQ$N!X{TF$EZv*DZtg4hZb&19oNnI8^8pi`Fj03>NuWALD;8gPO6K$QEkI(E`35`^9C8g!x{G`A3Q9}#?(-AYD|s3~nNY4t7~PE~F9X_HrMSy8OxSTHOW8KPO3wp=o; zcLvd5-OVsjmV;R5??_Ppyqsr8>Tnp|{mdArBjJ7qfzih$n=ePxZ!|zK1fn(>FSVrD zRo?E7GE>4y@f*loA?!cLx`=Y9&xk6KaZ0F@PA)ECmRT2!TuKwTp!zt|y9oLv=n378V~}o0@IjDyf)Ua-ne-M9d2hAasF(toa|iD^iLRzz z8RlPy+x{%Q$lG|lRof0y_QiC_UQT%N?~*)z{0JCrQy49KWV=G`cK>t^wCkg2trx#6rCYb(Hf|dDfMl9wf;`kj~HdQ8Q>>GC-D6jBzlV9KVAr?4iU?DV)`TG0Z66JRF- z$Z^3U5SAf(%b*G-QNXtmtm}Do6T1E))p^`(E|kQk&I1K40yImeRrm$^;IvgJGey8E;M}w_uA9a=vO4 z0y_g0e0NNhiR7Mm2_2sTEU`Zp8gspw*D7sm{835Pne`7N@TJ3sQA`l+6OMC&h`BCApK#P|Zw|+ox6M0OajN&`TYFzy{C30EwoMKT@CcBmY)b^vp66R>87bn;-L}v&yMTk@EepSrRM!LK_eQ1& z`n0F1xIP~hDtmdg^)~vS5c>PZ$?lp916t9R2SzAt2h6osrOIAasrPQ?J{67UjhBm& zWmTUb8Yv`aV1(0ZHds^h|L~$6p06y~;HMv(+&02aDNOj^w4KAQjPjRsuLx8r==(5| z5o5l~a(UC)fsdP;cY->oDlNr`*ML*sl=PBQ+brWu9`bjgvMDvIO>8izpa1Mf#SA zTBcwkr%-nlzTClPbx)1$#0*sY2^xlHi;74X4Ohipm3W(7a;_Bu>Xhq+?R10;+ZM25 z%+Tpw^gEozhW@O|p`A$aZ7$cV03&`q_zP*bh2NQ<%$Mb^*tA4$?z@66tZ=W{fkuQJ zhCwnqk$7d}bRN=eA($s)O@l-eaL!VNO3hPNfejObe4o{yVDw4;Gnpi;*Vd&J3pjN`9a^7xfnm2lVyr1=(U9F!0EnSn z7?jpPhu1y=wA!JF&m%2T<`c=4DLX1v&g)lJb0*3j1BjoB$2ZeFh$nD%;3uv+Q*|qg z4;Wd?OE{r_v!&uGt^Fw8#dv{f1K;>}1KY~9#w{EGp+18LA3od4JB$5O0R8%BH{(16 z>_o>d($fDKPq4Iy_A1MA3d`6UCaMp=9*Nx{EFlno2*U|MNh@`OCb_&m~UQtXRNMLYn!%t zD_`uv&)CG!Wa7bw(W2ZpX}QgrtlyH^>E-5~8v%DqVWhSjGo(zLbizloi~>^^dZ=mb zytqGX!7%j-hN*XtEH;p}UKlvkVYy=-$~y3`yZe)ERX;zPPV}tzbE#p%u$EW6S-V|h z{ykd*ktnN@*=KyvT@4wU5fd08L-kJ$EH43t{WrfU;f(hZ*+ajny2c+|44|;40%>Z> zrrGx{w#?G-ASxY*^7TInH8r>Qo0sd0qOhqesH>)2YYJGz{@asvh;NN^->6jZ&U)Y~ z7GuhS%x^QTcuMbhTSlf?i9nrw2T+Avq8ZV z`%5+6N*Zq(b{h*`We}bvr+c07csPb38W*-xs-Fg;z11Fdg6}VWA(15nLBoWqgTfs} z!4};2iDS;6*bU;JfKmceXe|F}fkO5mZUy9e5Hrn3ipv2lqm=!E(>PE_2DEEggh7J~ zMNk;9)$mFxK4?1ct-YHNPdX?qul&ODPd9OR|5i?Yek<&cn_tt{F!}qA)+jP};;QPJ zUgVZjou4_5AEjf*dDSMY^!}2(a_o%vocWd<d8VgL`d4Q{bu6!+KGwJfyf%aI7vT zPTQc1?I4Iy_#a-Jfh6NMvLSqO4G-}(WY`y@@wIN^^mIv5`lq;`r~fdQnfrb=Pfu_! z)DWN4BUWxUb!F&zVy!52z07f=9o3#3AA1%cL6A8}2}ScI3%7E68eJioa{sLIhxRlU z%@6Fvfsy5s1ErqQf7FS^SLld2&8h`MnAS^vjVde>c-^z;wZQ&4r9yLXE>GGMz9JB+DzOPcM90@S z@y05Sp#|*mZzv$a>B>>0*N8q?$V{ecPsD{$kC(>KPIU(4#@4cHEVxp%A$=@_7hhI> zlQFD|0->@LDU1vY&Y`U`fE8swBHEJTWn0k5!GjS~wPl5P+^3&r5rIt=DQGn4UgZs##OOhwIwyMcr z7LF@iRTDzyw(8gML(&xR$;ttbG)~$6l~cf`#siwrJyvqr#cF&NlMhKP)r!1tR@SD2Rr(fX{HTbEfO!2^oWT3@K1#>d z8!O?!C815S_VQqi1&*^is`W(kN|61Ekl!S{O?M zJ*WExYXYzxo_gF^BUUT1zi5LLbtJ?S>B4&lJ|OQNZO}8gF(CzZh5XiF!egkKWd@2( zwN^X#vob7PIp}=(S>`i7G1tIMaRGq#hxRESt4XJemp0<6OP|% z^U6ztxJoP`ES*D{!Xf^jBz9ZPDTM~C37(w=08Gy5RT~$4w=X*Wv}$r>8tPlZTlAwb zu@9Yb9ty35zCgh7P9FYP&r>roYwK9!-437_B^v;e(X2{QbVO#5%?IO(ek9u0A-PJ zZgpujZ-Fuhw-kNJTj8?$eezbQdWuDMd(Nf-s44BK%?X^3M1Q<8*LCIgtd6iLG8Fi} zU?2Cg$s?$6ZF$zG=)S2bc#IKp8dinG0+4;HNojFc*^&SJB~V^U|0Th3hU#*sy#qD` z0*&0Ng7@d~_))8>-!{0)ygCaVm%zrY1qBVqkn93VV+By7p9@xXC6@yF$7C)=I)yQ3 zYilF5zPQSa*5OP6hi%d&li`m+Gy|nFZ9s>x81Z|*S}*`>x6nxmUhY11gO8SuPG4D^ z2K5qk;zwrM5Pe{tWRUN7PQR#OO()~~q1nF5;o0Ss!Dk)Ih!Oo&W~6I z@Spscn|*O=CysM^s2Y->-UMioD3<@Jc;8q_32Ke)AYcDIz>V73Ys#v?Rc!){&Dw9- z49i=S!~=d!&Tf5DwKH%|Grd9Ahm@Lu*__Hl!T5j z)*8G_E8}a8EMU!(a;`$AWt$@}I0XG+bf^b|I#v> zfmR(wi}eiTo5=+`?3!PE?j0rF2Ltnk4wBlCIfm|};15;pprqwzn=P^GEaM+P{R;|R zRQl;d2#dPf9})K`@qBv#Hj~b)7*%;WrHJh3%Mtw?E!ip6D|BCfj99_42ldIa$>$}Q zOB30Kl?8+Y)@|Yqnc`X=CUvg#<}W-#j_-rYy$=@zS^`q!R6>p|3mY)Pl1{Lv(mT6e0 z7iQ(6o_Z5hhM+ZV&7ccDJ#PIHcYwg`vi8Ta!g9`Vh~XLE_&ghNFPlRy8BeIe-*tgP zp9O_!LXsx0uJF0#xlVl|KGtCQi%<~m@Ve$NY~4&ej;eI04gwo}D_$LdV z_Mqhhpf)gGj|nIw367bfL6)iv2`e8QvxByi64=}d6f;*_Z5=K16jqVGrksh#BNnG5 z*&~F2neL=ylJoy-e}Gc|;a=6LT4#vj8V5KI*1X~PITrD2AuP@s?j|WFEW2u)fA+9^2AVsJKvVS& znE{M0LxEz)<6WSG(<7qnZ2A$46j#Q7MS>zYg%vf3Q-M-g94KNbix#J9ppYRLcjv{V z{{ykR0(#YofN#++gBOny{yZlRP9gG7CvqpjA5(5PtdFlYbZQuUV&CZLXAFrsI%0>0hL9?S*Mc0zZ8>c5mYDbVX6{|im7uV{J z21Ijbx_!r&&-}`CxqpcMj{LRNU6dP>)_%(dc{+jMRssySwVFJts#$|zxZNeln*qUX z4j68W@~l<-LJL7kft1cWJrgtX?JpHFM%4j!6eWIq-pn=+r1&?FX1rx8E?C_cnSen7 zNUQk0qBrvvnuc0?_5!X=7G?Mvl`En2THEyYw3I@Ufd?URmvsmkMoa1Zs<$sC3Dd^q z0mqABK%imGhRUBKWDO$jwq%|{7qMqEu&gch0~B3;l{}BMY8Dn46p&i-KogwL;8Z3E zWe)oAkk}F~lx9c+`NM?v_Qg40_+>{Hc}%MMU-2T#m^!?8OfFF5N7=ZjfE_iJ*N;(q z0;^HHPVz^_5_RDY;yB{ySEtW3v&n+t%g0|}VhuB3AyuOtv`Kqug_rideu>3f^P4q0 zaywoA+s)@sbZ}MQ;4b@znz?++IS0PJMvVc+)xn=f?5cj4;3giTRjiyM_92*ez0u^| z0Xut@vutGXRINq^yL}P;<)1xgz8f-gYiw!YYwbNo=C%Ud=)p;G$sXY_Cy7|7&8R-*_>W{uil6Zs z5qOuNw?w~CmX+Xt2k{8j2{lFHknUE(h+}g_6H}C|zQ~lsItMF`pi(t#5K;UFezhca zi8j56R^b*5U(XEFh(M?}@V@nltPP@N{)<(#nvvZ+X97p=R_?7~RNk73S~a4tuIl}j z0kFCdYbB-JH^xTOmOpIwMFD4v3qld~@Nwo-WdyrpQo%_QWmVpBIW=nHsHY9Fvs0Sv z+7o^^jc=%nX*SL!)kS}41$vfF2YGUVclayC* zWZ1JVHZ=-(k^2RX=vDocz>7?C8aobJWO48!Bjn8iJ7JU{%Dt7(X$y_1d`0Ai93Jyr zEO>#AP-SkfiLuLx`3`?nir4o34&fR=EA;h|GC0(IQ57D^^5>D~qEAo}p5xkZawZl} z_f=s3GJu zB!~`9>F_0+dE`wc>b|m)XzJl;tJZ0i(9&#Dx)|Pf1C;$POc*?h6UbBx-YVmIoG0qg z;12G)EG>|~McZ4wNVLJ~MAB&$c_oM}2#L2T!iMR9LKABj=HXY(3Irc8k<@%;)&EP1 zVy*&Z+r<3iNW2lm?&y06INdt{&tst4u^f4!IR(~WY1tQ7!R^kwM<$?^%Eu*OK4%yT zHzw)6@HBsX1~o{w|E8R`$M;xrcCL;hNenk2EZl7!LNzp`k63LS`wQt3q3UI*x33Cf zlsGof@K1azd=5xpbI?XV8aR9NRJV>o&72Zl%jV1>_zBi*6av9pwOe+IrWooQXzUS) zxyF@VPrC`)wZrN^E>!(Oi-n%f*=02~`@@k1hmpCeDCvDwh-Sjb&!zH; z6n$~?O&#CZU|>(HhLGVqVM!PR5Yw93gcZ>0dYEu(QJAv!peVLuwB_(CL7@n}j?Z8Z ze_$jM=pw-1zvW;vY4?-Od5$K~8UI)nn_3MV`N{ZUtBT(=xL`awOCHz2KFkI^-T|yR zXpcj!wZ34Pn4(Wo6R>3uCYfK{577Ad@hNYuHtcfrKB{<>SuA zVyS(B55gA-gnWV0z%SzkOY;2Ax5NTNKi8j9%bYGd2&It(CD6GVS=@si0tL;dN3-yX z88elIZ}fOFY4=tCj164bEd2dcwx$k}pZP)!bX@@Jt$}oayR%4!xD#U`V?Slh6^xWB zTcUU};&|C4e<85$aRe%56AFe;M4S)ZDYpV-XLVGChQ{n!%mj>I>5p7QYD%Pe?ORIGg5=r7k@`whk3{f4U$QkSMGds&iN?yxA_VeKN#dH68B7&D?6D|hcAz-U@Xne$L@@UUlEUy)v+ z|Gw^PT9e8NO@6x`0QuAQ_d5i|PYDDHiuWxv3OE+qpSb``@)$V8Ts${o!B0KVR%WdR ztKn-lD`&@JZ7R;{stbC_@yS)AOWqF|7yUSjfANwv74aTK_Sz0s9mn|(TrY5<9G_p> zE0tu7G0Qx+8y%}&3sQShKh}O2ZVeh^6}Q_vFz`Lm^78}-*qj$|m7=O9FZl8hoEYxC zigoAWpy~(^*>HQ&*Ya3bDKxd`b?!1OH~wLA?-ehpf#xFXA#m6b7r?avjHG@o`Gf=o z>*p^doJFdDzSx2gCo;Fbwt~5YMaB#W0+Jw6F_PpG3GD|Er$X^uJnVaVLBa*$?KECxY^^`Gs3ruZ#(9gVYB{)KYNCo5O0tX0IHhH89VDXoYkjSp~I)RCvhY=dEy^0 z+uXbr6ZU0l0XAWv5pX?^Z5Q=F^fSC#({bjzpL1UilW41xllNOU2VNRp+g$(jwak!P zXpBFsue0LJk8U+G2|(y|PJO+IJe#^2w#4aa_}IO&dtX|h!(b(Zl7Pi&CU)*NzI!%q z(k2$bU%$28z|(TP^)5s-i*B#R&*1+@j2LO7%{Rw&+k9(t^SZnjUwP46WjB+2U@SHM zkBx#oE~EnFfr(Yjc6CEW8v9!8DTUMGh}eZZnE@T$_&Dd?hgo~Okx*}G^-{GHL`Yn0spQvWaun z2Xg2l$Y^CBuW{}~0gsl0g{K_+gFMGaB);zBeP8FxWamK=g8S|{XmLiX&$J1gnY zP*Xrv(NB6y44TaP6>r;0NOj((y^{Sh&LN0BFlDoQXi)fQC)kiVV^^r=O<;F7pn6ZG zU0I%0_gwaq>m^z35HrqwT*Qn6M?#tNyG_NXK}RDq-9q8&SGou?!neh8nKRtPPo6T91_MzpyQbn^g^wBn;D63k z{4wn#h1`n^BlBiQ_NJ|;6b z@9GQnsU7cg0fu`u;)7m{fzR{uR5}vl2GgBKVjCMiwDj#et(}`?2K3(It13Q|2VKGs zW|X&6!zRhE-at7j;m@2L5{?tUk5iHg zLp=owvs+d?ucEu-p-|EwP;hma9HP`-WilVjaDI1>ayHs2v{@ugSt|WK-m05y$({*@ zPZ;09`LMWLDfP5*jd_o{^h@mXGfEjJp~Q?LUeI|T#!2W|PFzDi>=VGTQOWdJf;cZS z1Q-%rM?Tpsen3<8biduBvS8XQp>CtKw3pCPwRkOX0^I6v3NEEypsT&Dg^?B* zo;a=EB~F^`7ET3&)Qox?$0jV#T!pNI#y`n4FB)_i3r}G(k+_5lC}QV{xks)T-O#K-N2x7 ziMFR}>_*22M(jJ_!>2tBesu15C$%Q_xE1a;?2I8 ze8!Cvd&~_00X2kd08lLY^=QYqa)3_K&=2aUH9kzm_Ha@K%0eSM;O<&vw^N)SkD3wP z*o$69s@GiL%P&&fo4;sJ*`AvrZgElG;^@~RW@$yGv5l1{+&t~quAG5)RA>lYCHK;- z>+Jv?l~#ZmIpJfMvf({yb4?_{YGKCKpm}G?4L^g+q5N$0r@DdPC-^t=uIm_bPU|=e z&d$V&p;ugjfUnnLVczjIcXxINr->2M;}tD(Oltc2y7@*TFJv!rte8yqR17iW!W~2% zzKik}G~QJuZV285d8c|Bd`=;HT7sM!>$mno38;-EOt{s=yHiZn#6tsKL#HB)7n)XG z6-NQ>!)}I&Bsgthye7?{eEmOY&=Ms?qjJWxYtrT4c~8!49t3>n1=b7hpA3DaqIb4- zYXALHQqO!*CJ14VIUQ4Sq%wwP0EX>KoKZ)EG67TJ5%L3AYf_oVfl8tlgFt@lt@Vuz z4e9!g{r6%^v)UGU)i>d-0GGEc(eDS+-nN%7B4RgE5@4bE5T^VBRB99HXz4E6YJSn}^7ftj$3(tQ?ZxUL z@CiaxV!gYCne$r0xN3<>u?sZq&mW^t06 zT(fAFttG^p}hd_dCXz}^6OMeZX75xouOZ3H~ zC;42P0ySx0Z=Ca?zxO(eCHvLJ4VwSh)#zk}vTQBOZQ1f9mk;ghm*3&;I9fZ=1fObhx3-N4t||l3;vfkl=nshLK)Kpb0;|TPLaQiP%%4H#-F! zSGf~>*4Gq5AXDSq(7|J8*VQ8elsARe*$&fdKQOt~OF)$7QxRt)+=VuFIR(6WC0bTZ zM&ZeFk!MG10~=7l={p@-+u5;pK$tax-K0nhUx)p61w6n(_7Ps-_QrV2wXD#{jCFT zeAKk6au(Uzn`y4SJf#Mjrm0nbw_cpPjC~#WD>9Zlfl6r zY|}rWD>2i?JQTLd-tJP9>p*6~KXEIUtuvh6zN2AzWZm$S)QWnXl@D5-)AeFQ6~c-R zBdLk_=dnyG!U3xt*0$*5zjl>RN)hTgfB1I_c-iCa_qO{c+q+%ks)(!+8SDrJyW)|s ztN-o>-AyWCW>QJA4B(wGOzNtZX}ZIp!&M6$lz4Tt49S=7%YORz;DCE@GIzZu@)d3Q z4g==`V(h@Pz@+6>gdU#f#5MI|Z9)fw^#Qzv;kD~LHv_RDVlE|nrWzSB%aa!LK3rq4 zU=?{1DX13$rZ#gYCTMO>-X93AJ*?XuukftKL~rv!?=Y+=q=Aa)|MCT&9dFUwttU$4N@Uvs#LrL}h9b3enbUK=tdPM9Zc(EI#3&q?u$(94jEG@O!&gI`|0&_r9)UM8i{am%AG;K1-l z7#k1?`1YDr93A=vI_-)-9h2){Pjf-ytFPd4^oaabC4a4xL7aBJ@>c{voA>vOb)3g^ zl{V*T%#InpXc*hjksG`T3+>nP8p9)xaY{4cfRo_8CRb4&S;4HX5$z< z&vGXN{0zzjduNq5y8Co}f6Jf9-UXB+in|)o;VL?%z?l>H!TZQF_0zclM7)jgj*P9- z*-F^>Ezd{<){v1IuZ4!b%yBQMQujC9%!dJJ3g6@AYGSj60Vr9%7z#9AIXPcb@A?lH z=I2M%5A^(Fa-=p^Z1X$Jd$NrV{Uk*Oh2jmG_DAt3BHK_#ERGgiJv! zp%OvNL53GsWR;*VYjqh(!f#hLP2<<2cT2^SglA4-kntQycRBB^BCxsZoQgwW7^R=l zE~VlmiY(u%aL^Sw+2%^VzjB%ULVXS*yA$3J#23TNAJ4lDkm^1TwBb(l89U8g^kg$|56x@FA6q@r> z+}Brg*&Or(u=cEoGl$7epq!^YwGK zxXxZS8!dai&*QxN4sX_5XkGT`-o*M{YlNZK>n!V>lbRja?T$D$GP3$es!Ncx#-OUI z(geKRBa_&D{++v|;Qam?MeE7Z%UNfh%`KOiwCfZlES&;C&Y-aIdW z3pL?*eF^cb;l`u5GULlvhZmV#(k(O{#)C6A?kzNWg~?L-35aB)pO#xt=lM^KXdz*9 zZp&t%G?NY*#vn!{(4W!2H)?71p7YU_UG&eKepY|TZt7qV12%c6z2=?uQ|?R!(N>D5 z!N_ZMKMTLkt(R>DMUr51hYkSx_Vbr`pbsPu;oNcN2oB|Fohcbx^4~PMeFU61mji7- zp2jEimu*qlr}l?^AIXU^4fxLqzjtV~aqyO`$V3!zcG`5O!tfcCQePQ#9eak2?2n-{ zxvaL@*USn36)wXgvd28cJLi#9AWBAjAE z{ZlJC?#M;be}fownxYXd>d$=a{PB`DahoM-Vl04(XpAaK{_o$NP>VoEfXHWTX@eZX zJ_;LhvL6wH8ZiheN20>S4x#;nxzNN9qZO7dV-1(sa$Iqn9G+&~P{L6BFOf^kH?I+w zc+razSssm_zpsm5Kv=M>vnyjL3@PpeJ~v+H9+O8|$GgJ++{W{@z4%2}>U006@@n;0 zul58(>$V=UVn%Kv?A4gfNdgCrQk~6pkce3bJn5iTe1CUnG~mopU?!m42#avsnFRD8 zw9h0FG;H99l+i#giA9Bown0NJFILMf(S3GTwyrk9-vIat2%9etMc1G-YQs?_KuJLMq_zy7XOMdm_@!s^g>I;>krW)DW2mfCm+ILUH7CUUP2< zgX-hpZqWghu{(D?q=o00+t7@R-e-;<{*WesN0ZvG$B#)30>kQ$i||%_rJYgz5pF_H z>#az-&te^Q6O6&mBE?e^d3r*^!@@}rnbYAD5Bc6Edq7>!>e z;L?V&y}6SxTgE4p*B<`NoCQ;$*DEi4U6~)-OY#~R#W_lR%fP&CL)la(phDb#)$u-? z-m7eHmU8fhd%@v9sevZxZGRej?0p;~j7l6#76jx(->|eqlR)Z(4J_;sEd-?Y51xs0 zf2t<-Ha;c0GC{_d8L2v^&Q9JjW+Fcv!v?JKg>wc1?;aB(7S<9p@DbgIE=sigYHVa zWK?8OX@=ZDMwFkEz442K9)@kXZcdgZJQF2C_{+a#l36pn&=O%^>@3*$(GD3sSLX8H5ZpHBf^tc4|F>!pcu{p0?wpke>%ej7+i{ZT zj#W9i=$+vHffKEr$GuKUEmo5rbw+~>&Su7`n#&hVD@7yzQWGyZBlnuudn5SnW%3aP zSFh^4OhHk$&C&e~xD1`w^%}!1uLCy`t!X%_tLy{QKSKjSSwe6yHn^kS` zNGNBra@+Q7qxZ7+!MHb(HBMA>fL751@Blv zqxAW+n&lWd2W|LCgo`q>rg?zzGc?3A=&#dvm=iT;iD?bA^r*Jgh6f2Rjc9iLw~Zy1 zJJ)U6>+g*&hL$lzqw?CI1V2;1^KIR~bDT^8NtHL)x=IIqk>kHF@nfrZ&j_pIBW!R( zWy(R|u#H<#FNcK-1AnA^guWNmY~h3mrEnaw|;C_{|i6WyC>)rORN6QgHR=HM1r=rxjFl=_R^mR=-A2O&99O&4TYVX1AZ z6P>A{e@yc@-Xi5|HXsS{O-#~f%sD5F&#$S3bw}4K%Bj=d+hp10T)5R4p zd=fz&6bE9zSPP?Y05yQbv zIs%1;-snE>lJ0{Cc z>T9{#EM!KT+45ey;#tn^jAZ{rQ5`e|fqWzRy(ld9uY}R*iSY$|#|z%S|2EP_129-6 z&Fr~SVhS{gIZ*45yi_WJlUp8%r0--OnPD(;_B?sCKKY^nav@Fm9ylDV!t@Y{qw0JZ zojh(4awqG3m;P}@^rdV6Z0hG)_569BXYr^0-~84j*Gt}sg6xUA{rjDuH;e*@r=fYE zvo7hAGf8wVLqVh4%kb4fIQKQeX2iRO9|WuyHYd{h`~Y6is_)#%^8Ax(uo7W2(zt7N z#dRp!8=0rh02j--(6D=!E=k2pBcw5jOIn(q`r8Ynu`-|YJEY{?0LvwnOq~JA_1jAj zUP6T>Zy(Ob;MMX3G*>K?@;Gt92$AaI?KBQZ)7|+BI!QZUHExliKKpj&VFQPGfxuvq z4zmZJs`YlJabrnLcrEpI2)cC4_G8ZsUuIqHMj>E?Xx|~<6>eON6^@UB2%ISP!0lM( zQL{+!v+f!}fyxK1XHucSmJ|>9wP|!+_v%cI9v|c4PGX^8D{=Ekz{XX8Ne(8;&+8SM z)40~{wTp?$yXWmCnDW=^+q({J)V6;&4yX1qO$)Ed6E(=IWP3|xEAu^H*CaU{$=CY! zm+O0f-2dsjNC@wVT+hDrd?^gtzoGjwDJe9>mUcl==r6M|>mKX9bdjl=Y1ZT|(Q)3) z*$I($+oVG;y6FhfCVF^^+16hD_2ZYqK5X|E@o`x6ld1PJGVMp2Bs(65jvG-`Pc6sh zdP*iT@+|_X*=X*@|I1C_^t;IuAEM@agUxSO@X;caF4i1Q*SfHgQM*_&s4mRXTbIJF zE3MsELNm47{WsVzrL&RXOThiF&PH&F)rj!r&A$`o|CCrDQd0l_AthWrQR#Jq6XWau zA5!uPCM66Cw>$iC7etgV0dMN$G7u-kHa>V zhU;{u%99IfDL?5hzt_Ptv>kQSteTC13L0ZGIBT2kjYCuE^TpZgX|Up$p=CpP)agH$Y!uPU94pHtgMwj%P%zPlqy1 ztwaui1gZStz%Ady!>#G2N6VlGs$Q-y`u`PyD3bEdm+7X(Ij1K+N4JXm13th5#;Nb5^&5o zEogzC)6s-Ap9LC5eNH5PeiNDrh`Al{&P011%tY4Ny}o1C-`Z)WYUzeA8$rl=20+}f z8#dBLg`Qhk1SplTT=0tMgolYzurm^x_A2i3ZZkP5m$UZ5XkWghK@V8kO{t3%SD;i>2K z{{0t7mU@f|BSDpmr3!a=H;1jVWdBkdS)?P#WjD(v__48Jo-@J=+!m$@`2Q7Cyv5_a zDt^GRa(F#&OBcca$xkCE{1&B$I_=?^&PUcL9ay}sqNmiU!RC~+88`HvA7q|1P*%9-k8 z)nz9l|2L)B#Tg`!TtVZ<#@)eEnmKjJcFkhz#jjt-?j4!*QP3-AWaG0ZWahIK(+H1} zF=dn+ntf361xX8^a)9lF|8>N>I3&j*=3WKAL_IVCW1L{|ID`vpA{7n_H=i>&cQtvO zx98}*2YZp+$~bjQitVLU7m#Y1h9<5J`co=eUpjGd+Te%OCvZ9w~_+0`6V=pjJVKnqLoPiK8y+S|eU+eS`>Qt-&wKyh$9AONzvDY|BlO0)Tu(U+PJ)+Wc zf28gD&TtRUDe19ya|(i=zo%eiav&Yovic)Ja6uqQZUy+a-45!QWw@$IKx`AZD*Qc8 zC%|q@Gw#FK|1lx|pEi3D_geob4vFM#_XSdU!+Y1xOt3xkw-O9bnOj)c(1=MV7aI}5 z5r_MA(Z;Fv6V7EV%FW8Cu*!3-d(c_yGU12u0rZyV!x*O8oc@|^)t4QA@n!NUeTy`N zhKbkDZ`B*z*G6{2NX~7m~;Gq$dghea^>v|#}t-kVk7w+1+YqcYc zgj6SUB;1ER^Cmm?1|Gy)0&W|EF1`!R!&-CQ-2K~0ogrS(0&u0=X@|}<1)CHWFa-fm zA+W2#gDR}x@d1;=uwTLk4(K2qe{P`XO8OQd48&ccI&kF((tQ-i%{?87l5NFp==9Ux z%;VoAR<;U_(^g2p2YE8;vgYP9o4B-s#b>k&u3O7J$(TZ;0PF4Awi~V<3uM&Xryv0$s0`xbNN2u0G~Pm>e>8d zp2O=f0l%x~^Y6atyUzG4x%o z8BN>ty{A30(ClP)3hCsY>UVPA{4!qPi$>A9Biwj&J^R2T58Yxzq)uAo@pyGV0(J50 zf%2Se6`xu!l0?Ip6ZYp(Z&m+<3|Xz^NZR@G>1)qMCwY?LNr&7rlg#zq&WaXO{~Qx# z5N#4f@9J8B100~zkIu#_iZY9FlJwAmhDpRxC4lD4|JZLb4F9#?gqG#3MU&@K{B>Us zBPnb=dt4;iFngtVO^)JC$^xf?5c{(iI?T^bgyOa(l%c5Dx)Bo#nLZ9OBQ~c8U1t=@ z&yCuw-4Xt{K^m>%uhhHL+(2WecfiGuK3eO=s`}C(2GIy5Mj6L(yB@6Z)^D;{Q}zH>X+D0 znwqoN%Bi&PoT;o7uUcVVc~$T2-21%~gYywYWrmR%*?g3^L?v-BB?OpM!>REi0?aVF zsN`+-NI)QKwWI1+oWINQaoDF))5ys}(1tiCbAJ0}FWe5G*3Xg$(V4%b8cg~)P`auha&Vof0^Fh?1!os)c ztGj`EXpy9TqhV34jV03d)vCR>6uG|{-;u&RDbc!0bTtYx1?`^$r_Y<=IUb3Qt5x^g>Dt&iX`gF@ zoUT|!Ro|~K7&OIgY1s(6B}YcJmVHr1H+tpX51tmG1gYY$BPFlxvM-yvW{WigUIITF zuBK43*YsSanLx&bFJ+_e|4mSb`g>p_EEBDpiT6v~HDUl|tZcZ)q)!>-En~bpCGz}< zN;fVH`98)f&9IGG;7?d3CBm-!eJPBl$ISzGAm?lMrGHI@R_Ql^;^D4~C)(H$ueQ@V zU?;qfBwNFrl6iDVd0`Z9L!@n2i+=RN_hr!i7g3&7lu|fVccf!NOmjt-i*HFSLX~tA z!Sp%9A-d7EXny8z|J_p4)=MLBlbb$1GJ{n~apgQDLj@Ua#vd3USHSF6xSBG{(qB#A z)6nw7DgUNIzkC1l&DBg-f5C4$LcApE@cfY;O&@Zl^FtuDoUsysQGk6`ZRR+UW z3{}Fr`{54`{SQ|AkfCyxRUcbpmS_t7NeMBD_3xmG3B?M?X2vocGY8V~k-u1Gzq2wU zTmJ}hd9tB$+_XQkEcZ^|H>BqN#L6tOm_r`m^m60Aft5skrT*e#y2G;XZHY#4ERq}{ zf=-7oR&uv?Bqg@vsUF}`E0P_Y^aadr`0Do$I)uGI5wTLG8G~3zqw@hC^V`T^L51)c zq%%JHTTIQDS}85+PD(U=hYMpz@Uz(UUbn0`8G@We-8V6JAiutd(@xL`ogCw}V(9^0 zkF8DD#l^>m2+ET?dB>x=D?Y}|_jo9Wr`hWr>@=?x|DNQ{bfOx8I`HG@gJ&R@z{3+M z3Rtu50&^s4!E%A<|C^K;_1wsM;4{aqFbAT>;P}+?@sS$;2KoGvE+tmJC;Vr6ypaAXg!60%oER2VnKoFW43e<$ANyhs6^MEWb7~^VGwp0Jx^2v`z23DVVe6 ze&xLnbDuc~@}aH4=mhgm(c_Xe52i54;(1Dm8y_=Ql&LWgcnW5V&n5)p-+fYHb2l#! zm~O4(i)&vqwQaRF9!=2!--TX~Ka0>fcuCz&Y1A13|B3s&7p@i0`7WsQZZn3kXMO&2 zaxBPHE^&DGYY@O`Aau??V?g{6dvB$>H+LCRO~1Rn!>kVmPGN57DL+^}p5|m~t?bAxdX_-dvgw-qo&f_KXg-L$r#_{KN0-dn6Y%7h5f= zw(nS9bTIWiNBYb#RCa1mYdG;|td@#DO|6_wSQvH8y;R12?2*JI@&}=|5!H z;&-qRHT+p4KM0i5)Ya7y>i)!0wYyt*MOy*PCc8KFT$k=~m*x4S>I$6LG# z`@R(#7Dno@OM$|dN8w5L?C(@x~R*;o}wFRk5YfB;1>2$D_YNRz7b?(&UEH~kN zjV%tLDTnb&9P^wrgEj4A)42{xDUrvQ4&hCp8?SKWD4jqpPU#&B@O8(vNDVZZ)HLOT zVFWKN+fVr|C#+KQZ{-kg`yk+_%*I7UCf78JA}b@^yTt!kZel6ykC~XPLT%EgEtnm4 z*k1M79vH~!*~TAe%CJWD8`7yYxJY;%3Ize&7$#U#g+25w-)I7`EKFnsc3g{!uox94 z*24J@M)NbCLQ}9%*RxgtIUQ|o?&nB}_u8&XO=lLP%uP5Bm8 z$i2~f7ZaS2l{OgUP6@v7x;6iGV;Gi-`P05vLzbiL@j6IT%-AnH*ydpnp$^nnGnOy? z`C^mZybt_XN7?!TempszXZcNY25MTE#$>G{Cp|i0_ zcEmR|*&1uuXQ;<%Tn_!rFFoA0p*!?KcTl#tjhWPE&n;T|}B5W8OzAwpONG-n9U#t-2Wzr_odp)%Yr=jfO#>f7B zKY=8s-UdRu`+{tjdgz7n;+;E<8MlL()(){eoUtd_=NDy<6!ukLF&2Q}`~(RccFf!E z{13d$n3ykM?noHrlQBdalYRbqymfW)J>XKG7n8uIrg}>&~Q>} zTjckQ)vTG>Id29oQaaUN1H%V{n@uk$tJaV*F#OpG4=jS5F^q(m+agHxY?w;|PoRb^ z35(tqL9A!eOb?DCUFxbcni7wy%~`-PawBI)Bl7dUVCaaim^OF6DRD(QZEp3jhE8-& z%n{-%)cW-1$5)SNfyrp#hkOI}9NDW<=kYBp2chgBDA(QUeGOXz;6@^&-mV16*io!* zrzMBN)!q(NlI6_HiP#VRZLERn<*@$EGfmn z_9dt>3H_GOPKJdE(Rv|*9lxIPXC}AkPG7l)QV6f!)t@Zj)0#S5NwtsZxBOgmo`!-f zsQoEuE`F~2xEso)6fOTC7qfn(euK0S#f=I^*X%dlTW{M>ALr!J?sBQjbplPC=P`{m zfRg3rz~z^fSRB=36Z9Pq;NGSv^wW;Ymd5;Z3(a0ST1#JZ3g2kU5~a2&PWHe#*jmQ3 ztFm!HPrYBB4ZE(xbAdAo&V*BG5F^ay2&bQE*?UswO>b=!-yR)Ne_HCE0QLJG++ufw z$eYPgqadU;c08T~wXl@~GCx7r+~c<=t#P01STcC9ERMf-Ol|>Kr~}RKepsYDnI)T% zN|HRgTpnJt_^ft5EduXfks@}0RQ7VpImcA?Z}3veL@7MX8hw~2cTZ=bkxa7i9~?k| z?!UkRuu7zBtTZO}U(%TWa|*Kr#N;evn>bb*!&_9n{-4?y4H-{_mi?neX&G@ne@g?S zs~N3ipPaDW(vO8LR~G>pRo6K36@;?8M_o)u&$2cZ!!E7R^a=x6K-t3&76>JH1dbZ; z2NgTx6WB)_KAr84Y;+aL(2#L4lw8Sz!0~oyi|8_hM58E(FMAzX4JnxIEo@_jwlamsX}e`g!>it(CI&yq6wot6U1+eBhN7$IAiaR{i5{l90z6p0a+0 zZ4_o{I_?!5^8Bm;I}|IGfS+nO>;xe{AcscjvF_JOQ9d0x*F4GzE;{F`(nA%Q0^S5M z=4EnXy7Hk9?`Zg~CA{`WM{%p=l$&Sbs$q zxRis1!4jwMzO=YFSLcd>IWK=oNh>3oIXToJNo49RO761b`WQ-mpNuAkKjTrave4)~ zFV~KhOthOFFFIl|JF6ZXyr992o1c*UF=TR4z5U>ff&Vo%r*0&Dk?8rmD%+E-7em%f z6b?2~{I^hZ<;od$mjLn_?7wazBX_==zQlOH_WLuz9-Z~5>X8IBOzK&AWMrj$TUEdB z;`Q_e#_35>1yv3y5YsY&P8lJ&>;m2ms2i};`uLH1h_k#hI4u>x^SG=?*5(*4N13bm z?qJJ3SEj-tEbdrAErbt*OS5<1Z_*3x?5>y_uO< z)SLW-&S$LKly!DB8|UFP*r_Tv=%Wo3)gx@Otf4BsFit-o?PpnWymh zn&HiVgE9XzZe_KdkMaGu%>5c-ZIr9$(Y6}#Oxtna1Pk>x{0m=p`3GOlU*vVbc_D{` zi=|Z7JuOqZi}+G7Z{IMW_LLkjd-hONwEJS4ge5c?TC7%dI{9!>wAfzc&{e zMD$pyH_z>GDb`nGqL%TYm>1uR^C(Mnqk&-Eh`O7{>z zqMX`(-sgqF_S|Hv@y|<6SqDdRcFVI~+rfVi-Xq)TukJ~98Z57dj>Jaj4<8Q> z3J1dni#(Hus$UIcgIicP%5EiGYW4E!pc;_t;r5|E+uv~hj$Z)86vOI3F+XcSyt#KsCSFhBkX}M_rXudn{U?z zaPd-r#$l{^7aJ3g)6(4g00j3c^(UPGO3aH7;`bcX^|4x_YLi)RVe|ZhQXT&pOm377M8b@ zRzkAP=9TA_9&OsO_M#7AB-9#Y#uOy4>!J5p_Rq4n;^)ZHx)bSQ^%MKnIDRsDde#Ba zc9!>4zm&{cGn6wtG@a~%Gh>d&^f4*+x!a&c^?{VV{vz*Zm*HXN?u7= zdvP($84s)i`AU^>#JOOQJm#FXnW2H7HC1*YNZR(vF<9x)$1TkU_q} zr7B6T$a+D^Z+dri2h={HFSHiL_0d{duFhG%_aL8Q8 zbiF%pe@@gS*FkS?rz@jRiQWa6k~axUs&F8e&852(9j)n zp|@foSM!bgW{z;>znkAnJ987Kueu&D_`E#|AV6ORBjrB5llh z80ouwa?S0-P{xt^10?}LP{Mvbhw*LzjzziJDv0-EUC-#D=Y{k)kuPDdpl(k|KM zd%_&BU))%ex1r)gy=uVVmDODq-oXv=%}h4i`)a=P{AutC3WKWZ!~DM}U4j6ZBLKAo z^{ZFTayANgp6^!v0zISWDH<2Ve1y!YwcJv-Gq|BNLp% zqKU3$Z>QYTD9;+Rd>Zec%BC)qa)I6`Jd&w(*b7eBw?FIo;Mna+C2}4e9hM519z>q2 zplw>7_a36GT0aVfG?w=&C;5Qb4EEV5f*n&FSEQ18!9V@MhL*F?9cYmwdtcio z?YGgKo-GPpeMA;O=544Rz1M3C+%Jbi>>_s^J;9A0V5xabl^LU+`klUTRJY(2JHv25 zi}kuLTnnmxY|p?GM|9Dc58@e~kndE+kpT0>Y$0(E$?KWV{DFdmIFWm0mE)HsLKc$; ziaA_oQ{%7n)STsU#D$S2Eaatvl46pK>y&Ka{EiJe!laFgLLom$7au>uYF*gwQ3`x? zc5cHci38qIx=idpU2NW-3x&^R{a+w(K>EKyV7$y*5ZIn`r(@I2U~P(?$BkFtUU(3z zoJ4#~Y`Zl`Fy0y@7&~(TRLMBE)~%CMCV8br`-<&Vv=WDeW;Nz^)fR>U(Gz$FU zZ*qIBgsqkX))Enm3t6+&^t4hwwj*DW)QH~Y#?1fCr%lTGA=owA^%k?h9~KNXf%Eo+ z4ArolE96|B-TG9XCv}4qL^|+D@N*5mN4y=k@F%KQHQ5 z)&EvToqzbMIH`|}Z9CNzr96dj^MMEj9bn~9FRwoN?C8AQc}=&@>oM^n@+7BWf~1B` zj?MV2yaea`#o_0XrPzvS*d3SJAI!xQ4q=rP!DOu=u*SX1-sC5_?U707Vdx|Ia@+CT zNgG#KYq@;kaI?^Wjl;4N)Ay#x`c)6BfIg?)s*bvnIh&oWK3@nUro{ z^lx6d?>{>J5f5L~Y`HR1%26qZ^K$~+z7W4ka|-(rV_7x5Dd)Bq z5iVpwbfM0Lp+eY0ri%YB4_U%?zc}^F!f-H*C5Lt)Q#cE+cV;mv+wylO61e*{GZ`P}IU>>$gs4cbOo~tXgk(JWX4ag9YjbSCEJF za#x(bv1eq}EdP%t7 z8^l5~kVP#|ME^+KLD$1HrU{DgmAfgc->P;R;^;m3^$R<{P#0-}qfMrmifDX(vb|i@ z11mYL{XFCB=BS@{z+&!M^aBunVMNTB2zq>epRyET?ytCOi0R48=J%5>`Ti*r@U`th z^wXOfgqm4u#gZ7-*1obO^*8tz{mzf zv~7W3ce%0C1cGZnkZNgm;^B*hpP$PbU}Z}ddEJnzpJsM__RAv6Bc9Aaz&DyCCX4}HY=!R{OX(${tPeQybSSF`Jkb;& z*#1NIOar32y5HeD^j6FJd8c@zfTg$Idc!&r4r2$!*MS!LKcvszLcmmazwO(kBioK_ zqt~$m_*WBoK_Nk;!DkGQ|NJ`T(d=bJbuYe}h$82!Ddag~iA(NX{E_ajuISM!J0|@` z&@zd}jn6*v=%^)W6BS+J`Rey=|nyYRyJ^m)Y3I?JoZ z$=7u;LEjioG)*^hL7>9xdA=&ZMLBzwj$>%~zp4HWP=ye5R+(PuBjHsY1KXGEP5(!tQnI)VdyLg~KZV?CyIE^;^{A4iZlCHO zu-cz4#d;qKjc+M5XXjDz?dO-mC{b$liay5op-v8Vg`%7)0&V!3;f5}A+ft`p<6U=* z3)q4ceB2~}N8n3&tuA`~WO&#Ej89MH^_U3l8!->WbSa|X=GX{&HI^c16_O_35SYPy z_9)|ZYqtqyP&0T-7BPa~(Dhg2-U0c0u*;6p28uSc_l50-kg}85*wfHj!o$QgMi`UB zM!P0znYg=F@d=5nNnn%aSI98mlZA6HB|@BaCg065(eHXQN20@+L^SoI6HehWoL+vm zIsM`d_vgpNOV3(0DGy&|9gEwWb3Y{l26plYICs6-ueGKw7`(=rTc>0t79%6Gs-6k+ zHD6?)@p+*p@9Ho2AbJ%`B-WQbe&fdR7;Mnii0{!LC||*58`04_YqkLs#6at!?^S#mSBSy4%b%N>S7tTT+O@g zo?B-(h9qVdkxX<%h~1lUVa68XoGH1p!Gq-@Rp`Ufc$W{~HQgL@Ej&tVo##D-!^1DVT|ns89% zz#mtMe3Hb{72Ys$`dL7Nn8nuCQo6<6dtL;_k(%(c*UmQB zBoY0Dl$cq!kAB^{EZJx^aC2Wlx*QX*qVY^nc{*|p5xu`w@Tt#ZZR#NH2aKgws6a|a zkvzIP6Zma`MIBkE+VEgRSBSvVtd+eY(Njz@3WP4-P_~{pc_?3gs~FiHN`jK%&Hhuk z@`c@4Vb2uxt+lWz?>AUw)uGydV}!!kAsh*C`Mr5w$F-~ae^07)&aW+4S*IY zgLozdej}xDL!o!Lra_N$$i(>O=*kM$cQ8+S{~ZeU%I$)duG`KF7f>yt8VocReuM96A@~ldo(A9B)Q9gM!wu7m7z4r{gH;?#omBI|CtRz1c)Jq>MXN6swBO za>7@kmZ`(&>Q}4(RufI z)JlQWeITT>ta4@L=m|USi`qraBdls&Dy2XedpZ14$)+p$rBb!QNWg=0D+@K)D=q=C zF&)d=>7vj+PG2Jf>MVgBK`+7#jM{#mF<-(409`8IC5oxvy;Ez9&C=M$;}M%pFKVtR zwh3ykEDP=KF8ezvBWQN!dpWjtFnEKJf6Yvy`-?j^>R|l_(N0!#jCW#d&zR*E#d_i+ zZVEcAWzmF@5vh9%1$qb8#{2=}oxE7UyrB#+kw5n{Ob$KNL{7n{bj!Za8c(|s`NQgP z9`Ai_N$BSV9!C+u+8Xr-l0%m&lzE?T*Ro|@^gC`&*y2eEyjl}qE=BbJaA7Je8lf}F zgoy2aVPkt*jzp&|9M&HMLqLzx{>nPrb(q=CpAbkPoU)Jd$8OZ4vnt6nn+K66t5@eiam|gFKAE>uG}nK9BBo_;pX^+oLiYfw;!)0oaX**j6qD#OO zN7^0JgY)wMA|*}x!QwcfmO&23y@DjTq#VXjLtCzrrjPTPl`rtp)P0= z-z9P4F~)uG>fo#|!+^e8$#jbNyxH%$fUv>)*dvwnt;XWeui+aNZC|q@@~wIfy*GTm z@T!HotkexhaW$AI-J0;{jZ4bj+?u__ZpC|pehe;z{$KoWS$dRo$pN4&7OF#LhJL@@ z7W4L8O2q417iy9}NJyil1d!348K>(l{vaW%l9Kb6wOF6SgJ<%!BlOEGMnnv|_GK!d z{DZS+A!ysN29`V?-o1J!&2uT2-yJ450!R1rHUhc(9sS`pF z`e~}b3x94RWimYrbQ~TKBIBy&3Flp4VX&Xe>f-r$oRDM)`_a#|N}h#J5*pob8awo) z4+yfXrv@#x^*u+@;_Xk{w;U(*z$0$1g!hg@8p24`55elLB(33giyv>8vutP069P;y zL64|uFIy;99ZS6Ct)Tn7U_oXeJj2!*5(Pw9#g8|olq3!Z5oq@Q3}m`yXNQy~vt=d*Rl<5u3zdy2Dttzdg;~hePUr6@o-Jx%SVoWS zDTct?vxqfau<9u%N9F8`{LFqI@OlxvEw5p}(1f;bvH+>`GIk5)aULt+9Oa0Rk*{;j z6!`iK8D4_AKTWlF9@`L-#|HL!os~Vx*zWQy9gx@DEg17zCYFWB?WjMZ`~c+5YhWuK z(jj?+x*@Y}KjPTM2S*#EjqLet8GJSL_ytMjoc8~kfeB)YR6u`49 zToU{39omd_9h5)BJ_!@W@{Qa49ye?QHelfoGNghI{WGy+Z*NlO@kv7({v?EbCIp7V zqE)@}MpQsSLup+wF8z;LNzvbP!M*$s97C`)WL)sQ+J&dad$sSue;=Mr26A15(w9L2 zg)sUv>AyoVr!SIlLURk_OE+tS$ zzTga@Z=4H-o^*WmOa{$Y)@G7U8Nh( z(B>Z6Co7$A@!watsGKZUZv??T9*0OTn8`BMf82R#`AA9c&YN%8(NDWiHAw`kf$_WD zYVdkLg?;PL`FApm`vZTHdR?!9Z0VAiC*3c?#RQYi9%a3c)8gxXls~QABK07QGGIaz zhO}|&I2v?bXN)Ub!$|Z!K4=`tA(W&mOFVmnc)8a$lgZK3Hw+d{zqm@8P@&LOrSXqU zZo5I=u*jym2mIFhyEwGv?YTA%35vt&G&v;wpqv&50*3V~-?XB$VBLfUc4`agJ6;nG z*S)Lrwyxd#xm4NedNrB zek88gc~Wma!}}&2X!Mt>{byT^5U`<*%kM=qUOERn?BP+(N!Ulbwxe*ew?HKQ1*nfo z=W1{B z(Zi4)l|#7nq)3fpKfBk&{=sbYHwiu2o07!_-6Cnb>Bf7Br*(yJI1>+C5sz%_BR`RInR~s z8X5o!&!G=gjil}crFT9NB-XmEBMGxhv)sqTJ6yLl6}Q1Ki_HR5y0r=>NSB;9H?Nbw znZg2Q(QpyDrI+_z>7T9{;{N%jGcoZgw5%+kJ1R?~IZ}4~gW?x@ANn?W7(d~&$Ko1z ze0x>`H1DcIR8-gC>3w2+9_BfYZcEWsC`#QR7r;%hV7{A(Qy`by+I??o6#mUMQrSgy zf5eY$d<5W$jUKu-)Fl8pd4IN5yQjMpzwV@^K7<(d&}Z?QGQ%1I=1{A$TRqqEzFRLn z5j)S(<C*0Y*kj*?kM30Lh8hHZZYSjN;`#vV}clp(!Vqd=cU7D>(YrmtcqMtO4wAWFVr z+*Y0$Z~&R*VI7t6V57)*>J(UvEL?(QfaMv@-c5H_z;FE%-eLu}tI8}#(IfOkpgBS! zy^-_Rp9MX)9!RU$+;u=4x|ofq4{~wH32w7Z@2c*2rnAVgxi0THeC=q_w%PquqC$X1 zThqz*jY8Bz;PT(bgBdaxjqj&nl|DDP?5>|U+2QZ&t6g#Qb>mf97j(qAP$Q@AiTgXj zCX2u1m0lSuT6o_QP@D6YG+v4p&9}dIRcogOumieM!&Cv7a&(?e+NwOvlS}CqpII+vX%0_Gu0{hv@F;Q7^o}yG5`bubhD*n64M~p;=Bp zx6ufdEH7nT+A?w*9(wo}h=QmNQS#MxN3w;RXL=6F*Tc73C^Lmq;pZGN7)!6iNXAzI zYQ=ZNbR|jo>~%5=O$N~-;C^z%P!{?H^l+qg6+THuIfQZ(U2QIk2Cr8;9!{5rOCJ

    x7}adF-UtOAoJLqy{3woJ{*J%*fFjEmC~691X%N|5sFDVjVS?3WhMKX4NO_43 zg-2NlKVqL@fIsn-Be#G$aTFwTsC9QKXAdtxf`!qw7WeJzm@sSp4V%hAeET|bRx#w= z?(6v+BYXCNQTF_%XpXm-O~@#(2tf9Sq7%Mq=h$nU#f>VM8h zA1+XPTVKGowOy=*Px1OifK_i<7$PiY;W>mL^T$?TYl1%eS z7J+!x;~B(J?x_-VMRvF9X8m>9YlZ$rTV?D*SZLRy*+S@_ar@hyV)lLGt<5HnSRFyy zE!1Wbu{ZHjMaXdar*z}w^Cb9M)RCpz%D0E#0#%7W_P)5go;RYR#4-F`W~9w{gZ-(b z4)kFmGv*6WXO5^6N#}Y0OTe0~>Rn^NVMP2p(VFoFIfg#WgV@FVR5-QwoI^AiI@HX5 zv7@KPL-s&7ZUAj0j(3T>k18qPr8S z4vAaJma5K%eYbfeb~D5V)`jj8Es##uAG<-is}bdMt*&iOU!*3_+o~Q=pg-_}UUvTW zDs$oq9&ni!cY4&qu)rdh!P9TEOy!A5_oIN`8kO6t$^L$2^(Y8$FD7Qr{Tr=w0uUR1fN@!ARnzh#&|ywztRyfk>v5N zZ~NSHCE{gGk{Q=y8cB3_8>lp`TGlKFj-Xy+PaS zPF%rdmss#}?q!YVr8D%1cY*eFF$XC|#39UocxB%{a(VJ=9$|D8V40`3FT5O1NYsHO z!+pnQJL~Ct94os%Ni2D4PV7K-qtb`+$ffpNn>|8IMASI{InCJd%)olX#EU_oCJuci z8)>z#S+=IaQh+7=;%@l-LGXTV&p;8f?|q>81)th&zp4S)whj87LsU_*ESL(0_9~-|z8z&y~1gGycCmxo| zW#7*V3rlz)&#{;ScTBW@Esf%$FBMAVs8lAMaq|BbuJ3`3+0-uVd@n98`r!fmQ6?j9 z-smo%C3X+mB+Q(XOV3zwDm)+gBW$a(#am}V#cl7f$S&p0%bCN$kvG2BNMd-U*68~`4(_7>C3&cCe~he8QMQtK9ibq0aoKwX7?w7^S@0+g6C3n6YBw^FYL~&$D>Q3kOGt0(Pb`*%r78aDb|gQcTG|Bj3=g40(LGK z8K?byUv_5l#o__RanbuxL=+rO;qi!V;)+4dyJzcQ;L2>Cq0sH<{Kz#Yl8L-ONx^{- zWtZy;Ug4I;!D+=?ta(wkz#% z_zl;j;!DbiJXd9wu7=);R-vl-t|6Je;GlQ;Uvnr@d3R(cQ*$x>k(r_e>Ys&iHf~u@ zamo7@X0DjZ5CAa}Fyk@aAbObHc0+0!z`!Y1ucp&coh%}jmt(b_1%ze&uX}Sv>8mG; zLk(I#@F6(E%*~%=+pfFd=6oks8azM3u7Bh`ry+ke)BR>xo;deJKCq~nZ?u>4S?qRP z`{h;wH&P5E-zKd#ya^qc5xMzE8nfE?V`TkqO1qJPb??ukl@7sfrJzzyU=KZg#pe}w zp6y_3)+}rqjnamF@zctp!Lk(mCc(Oe?eIe`*=dN!TfhlzyVCe(XS*^EmZ%9t^gGHy~RdroRkv?}I8nhsFceAD7TRn=A;uL1amb}wrV@B`^o6$gXTVmYP;jeF-UI4ZO{_%Tl zMCiXwj=jj57Tmw?Uow5Rda*$yJ2P!#JQ}`VpGtY%`j+KFqGoDSsH6s<36b@Nh&xN^ z5DHjzeez_<7#GqB3~(^Ty1CxM<`8|lnYvHeh=<2A^kw;l4VLpp#-xh{b^cZbI;8Fg zNgihsdz`i9ep}nmR9QMPw1Np73nb56kf{fp1KqmFf>o88@slc888jJFx2lCCuz~RJ zJBLuM^N!nZ!++n!M^NmoEE zxVr@!k3Ms{Hkn})I^*nJpP`QZt8NUm#U)s3rGriHc<$}>BbLnsUWYh+&9Z(=t12+< z7$30KIP!t8+~zOMm|Pn|Wt`r}&q*JI#R1h;4?ECR2dGZRwLV`<4D(+7m{Pn9y7$|Y z5yGJSoK#KLHP?V}Z%OdfXDA{^phOA*2H48cwT%NSCkY8`qttJBkY@7=$>=LgE10z5 zWNui6=g*Uw0AgmWk=tfTrKK_)FCRb0Q04i3EyGF=LZ#I?|CfewkMt`&o)!g{06)xj z(!&MaXPciRI(GYrQm`MB!Slhn?fCd{Jj!rNw;WOiOwZght&H$tWk|sIbBnO-U2_E_d;n9I5BsSoQwB>Q{ zyhVSNL;(`v$}S2qc{KZW02gQ*W@>bP>YVKJNq$~=g7~qwU<_D0#>Y-Wd64UQYSO2Y zZ9x{h{yb1bgDD%NwRPkw)3F8p^dYBjAU6L0=@0cIKUmhj8R?l`?3Vg|L3oDJjxRxG zks6M0=DI+y#B;`%J#o2l62RDq_kS~9^DJUR@IaT189s7jBsH3&RW22G$?&FxvHzqS zX3y-f1xq{MHl_Ss^~0ivRfMMDCohE4F`p%C4SQvO??^>$kFbIKebOH7 z8B%@?6gwU}K2g@Uaq=?PBJheiY}Da8@|rMN{(w6*j%WO^#tn5Mksc0kRJn3S4FIIv zjl%V#$REF~zJa=weCjT_&u?^SWJrh0R)6>-uW+3S@yny~cZUA&jGgxQU)X=WDD8~H zPq3|b5?7I3soB<6(-q)R~002N^x!^@HL)674HrHDx1E zF}0BR6x<7B>KJet^sOy(}`Q3G=EK-g?0LH>EvxFV}nV z^EB8{UPrW$E{#ERuH2YRRSlH?#4r>@06OykOJZ@@EA8_?0L-5Qxcn6ygBMg| zcUy4vitp~y6I8I=7UFJ|uz&+49+2@*fpy&+)#KNP+yxQr%-&Vh6zv7yDOB~^#={pq z+%icGE05Yw1aj>93V1@fe&bs^-pewma}0`~@J=m84HCve_VWD?ExC0*Ui~tTBh~M> zyiQSmpSAXeQ@5M_v4X@s#xQLTD$&HLZ}jx##-0Nj$fU(42K!tNgD*LsCH`iWjduSk z$AZy7ezIQipXbLbk&+S*p|$IS{Cg46do zTcc`hip%q`wv7DE6xCxFU> zJJjumOzqTihhe&RQ!5VI&%1?#0q6ukY@Iy1PxtM5F!jy~W7|PcRc$Su+*#wW!CpEx zYu2*Y0C_%CL+OkCUQ$HjKKSMm&UV$wrcX#(SN_jYz}`h-kAnR6DC``COQRtQ))Ij= zx~};0sG=~YzXPQDQ7NiMAhqmfe-xeL`311&&*q5)zv-y_R`csWRZ4M@r5B?9Wk0(g z1D3wqx*O6AYE6ew7paRdB>q%lJVXMXD?rdJ6k?3Xu_rrObos6c|2zJ8b5Jjq*rq+^n%Q3)KPD=>q`UgQ!Fy4!-kOiyCBiIh07*GzLjqZ zo}1e)h&dAP_2|m9rnon7#zxPM3o?CgEtj_TA$rd`c(A^*&1@VK>rOD|S;G5-PQ9k> zd;YC&i(wh68AD6bZ0Nm`n*+9MW$0R>$?{M&E2E$4|Dx-w;-ZYYexDg)=#Z2~L6Ane zK}teGxpyQoV)okbHlUuv(~@X-nQ-6 zY3)w~Pnm*Ti6=V3;3hZuCSOIG9uCGH92lrceb*wGx@hkwXv5+H&vRG%kZZ^4JFAqv z$N8|v*_GUWw|N}ZeigOacKfHery{MVQ2gS@@%&gI|J~i#qrdk~cDSe8?hk`vq*mcH zq}1U@_^;X{Ug{|KrqB8Pkxv2=mebLX8-MsnwiBSmN_NhYgz{om!`P;3pD#nQ)$<^I zdYPVaXljo8_V~5JqficyKzl7E-U^W_Zx3=PxS@<-PALp7aX%@6+y2+DT|U{biR16# zB3V*$G7=-U8_p*~X#KhF2D0uHHtw&p9(}GdR<1MN;8PyRW!uf&{Cmh`fvaR)v&iEx zj>Chl!t*709i)+0sUnTZ>=CwX<$vvruhlO|Ol~>X3uba; zfgF^W)?a#HzE}_}nh8jCNqkp-C{TEl2j(!1|n32TGXmi*Yw>`IZdc{X&c5+?pYLbCJ81KCkR}3(e5&0(mdFq%tyF zDY?BKvHE1kM4lHZaLay0z%hWXO3RWO`uP0JI1~S|F^S_uqmL-|<*zY;M7P#U;{sOI zaZRCVCRfqMSk(^l?iydfaa9gJNC$;cxZOG!JeuqKP4q{>Ff66hUS|tJ(t)SI z@Ki$e!hTq)y6_ZNc-n4wx=*I2Lzz^tuG}K_5PPfH&*`A&IsF|~ql1_vqpG@RV_FB# zpbM_EpMg_JYH*CgymCOq#RT}bdGIE>W@i~-7`gF<3LT13?!U=u#0`Ckh6acNSCZZX zO2%J>bu&0WAjmNK7F^BiBuPfKZdM*|gU+rsfr2{(iWac$+;B@ASn{0u-ZAbNr+Wk{ zCMG5>QixA2+*6PFfPhFK?v9VS7IDL4pNsD6jlDYZ?h{cC3R;k*soz?CAq()-FZ&kz zAUj_QO%UJ=!th_kHrW}hdcx^D5v6Ng+C6Xd4*(4x=HlGsNMHm61Z<5VyX|m7mNF#E z7i1vh0uvitefc+1rzIqqhq1HKwA^>PSa5%lwS|!opmrDc*dw02aqP}K9z-D^MXyD{ zYYC4*;-tsKLlc(7^gqC&`01Cp<7*3X3Fu28AWr;-nXKHTJ+rgj_I5c^2G@dFF^MH+apMPZdazh}(&}qVQ9*sy_N7+Vx4vW+85c#kBfhIznZ@(ad#iP|_NPzxq^DcZ(&aC_ zSLJ*#w;rNiXX-E24K02gG8o~Xy8Oa4E%0`EJn$EJ4%$LZN9V25);UoPu(>_^z98bo zm=dz8A60SCyK|(0bWc#WFgARuSIGW!78b~g@1%4(H2<)=nPv3P^yGfZK3+?zi>%Af z-v=R3Xt}a(rV1M<>Vd8^#n!UBCX>5f6AQ_G)yH#HTv2ym_--8kKECncW`AVJ__FGg z@hiQCJi6fuZ+@22&&OQK0of2KiDbqc^d^ojFpdP zZfZ?#`Ko=+tRDW}cS2|_pf~_2lm>Vas0Q77I_CXpzS*nXXT;vPn@0IKG^hoDxJ=R<6oO3S!KUQ+b2ORq4b&$uRed7o>l`Wlp57m>Jd}by*ZTc+B3e!< zk|Yt$^7ZqZe~%52chGxVg7TU-zA7~g$RWQN2kJme(h}o^LmbV+9o>8X>e7hF%C!pm z2te`4*vKy2z^O588>53`7$2~Q;8B?#AKb1yw)r4Qj_va8@?X1Ip}@(sWeevahVx#j zGr=iZ1j{*SC+q=XSbl6Z_${7eL_Ux{8Kg?^`h-8cy7xp zb2RrIGehmcY2feOl}w)E^3k+4$!2yoynCUWe5?)<$>Pa`1at$4&>Y@Y;VF*Vg+$BX z2HdA4)Z<=(n_b2T)Brf^fwN+V^x*g1N_r})f5f|uHES~?*_;Dj_etZ-uZPLzypUkV|Q(W z>)4$UG^f2HmMilIXJ2sXB5Xu;{#?6^xnQWF`K+yObEnTe-F$FszTb-69a-L`AM9zL z02^5aCxSK2D5(MLl3RknHKxEWB+Ix9ro?qXnKHP}d^j)UnRDLgC)6p&^gixTdNHJ= zV0-5+9?Vj6*4%#Eyw%GYSh>PbII&XSvdNB4BR&@*z!l$8VrEYxE^+!?qRW6m+6rnE zj|o5)w}1y5H7NSxqA6#)iY>3xCYOi9JW4-`8ir&tZG{+~B*j{J(EWZ(tJ*$E(QBGT zs#WUn>i(+N&tX`SG?Ky&oTzU|KK33dJ8}th2Wo ze*IS&T#gV!<18VF2KPf!%08%icOU#}A+u8AIA`>s>2q^vpdx@gF7 zud_ipU8qE_4B9UY?v5KHEmJy@Q4L?60bunh*NPM&WqR22We9Zb;P+xU%!8dUV`Gx49T(qWf z@DOzonEa#@KXCk?EZ{N&p$lojUp7sn7PYTAB2%)4Zlxp%jk_psN?!J@Nj2!F zG%5p;iJav7`*0tAqIx}pp+-D>HX61Aqqg0Gw7D2Jp-Zxk7lHIpk$nbsQ^MmoVneCQ z$ESXE+s}|MJx2+- z=V-pKmuV8}Dp79BA&<+L()DvHzJ{~1xZYJVOnSDGkswn$ApgLGqV_wNctZO(NqE|@ zh12I^Z)0zn_#;S}4&RTi@)f;%PB(>%z%0>%Tr}Y-U2~Z((F<3)H-duY`hNH_y0P1?=Zz#9J2*@;N#<1ST;-&?qevuS)^+_>@Qp!t znNjnVXFC$2+7tG*Ki;;F(Qx#e?vps(qg;Vh$sGo|^kfBPs6fVwD|cH08Ob`)iZxE@TB3Z^I;9R^bfTRicgn^YR2s zo2KBZgX46|tfR4;7$>?%7WV*iZYoq{9G>$eBl(fesi98!HqO}Gg~MHc04h6`(_ zE7p~HPjcB~l+v68mEGTk*|wxU`VxBqWG(SzC*9rd25T_cyPFDU$a>V+1&3J-^zMs} zY}ux*B%E4ZMQ&Eg`bL&DOWghr5&BDz;n6K6f(3)i!AJt&r|Qjq`^Nh9Pg>dInO7nA zQ+3!aBjr_gg9?33q}X$)YOg^XSJ)P;vtQ|5JL|&zn>W$yAg0s(&h2^vDfjR87P5OP z@3h>jSKcmtJ%d$Aejmz}Cf+F5n%iXj!b4IWKAKDM;}FdjX9DbI7d#2U-imLnh%)@0t2IO(NOk}IJBPxC{0>cGBEv<^uE5|LU2 zZ(?b73W4@T9VjQEwTQ))hs$qFi8HHejsU~)TH{u#y|+R741M5i^KvgDEGgi!I*Tva zB(Twn^5+?*W@j*pM2-L!Qh^K_pivixg>{d)P#P73whhdF7b2@dNpe}ssp7w)fCfj9 zLr=g6R89^wRF{6iJr2W$ae|_d=Ys-mCo#j9wax_>;!by=I5qgrL?8o^%2L8bi8PSb zKk7R7U25_4y|=+?3tMz(5V>gGUl4iNb6oIDvS2uNrv34Zz567Lv)N#hu*i<6$c{gr z=k1bJ3%1_uUT9mqFnfI+fZF!QqulLx7a6f=pYwhXwbzmvLbxP*Iw<{{I4crtC25(@ zzt%@|Nt3iqmnSJZI%Oui0crCsH5S zE3s`jIlt-usg)X775CNy)$H-K_WE)bhlWuOuXcGXd2Q8yJ< ziLEB|y4Q51>m%ltbA(jtL4%VlIoH>xnUIYOTLlS$Ocohh@#F}qxY(~|K9QX9)wkEj zY)g zVp7TXMTZHLGsUR&Ro_*|rOjy^hU=+R6_ugAgXYr0ZL|#}Ib?wg;efSQCuqaY; z`dxaxQ8`b`kGnLjfuE)5M3hih5{H z@)rW{&Mv2EEj08Wd)m$!ER`L1n`c69e>%aTnk4D=(vR<{qtFTfj)8X?q&3S);xi-$ zH=?SniaG=9Siz5^_EzSzdJ9`#GgFF^51Lgy2MS^6JVW%1)G1N@M5RT`?~%tgM!wy7 zX?ejMpPZg)S)0^S!cx#Ds^2n@-hV{Mq11Q3{zScFgh=P;r5r_W;M>Fad9CZDU7o79 zU2wu&n_!>Hj?SaR;qOdXr!C%NdasUt=&`77|G+^rYh+K_{`e|2IWKosue{g8^)vM3 z!Eof@!B(x0fPFlJRM$z8#54OUJnuczDDA^4Z9!cO9|h)}2tGbVEBk06cF;I_M=;N4 zD=g%TYWaI-dq3Bn5^$LN^a)Cf_|SH3B_2vfBlGY@Q2aw~4Ok0_vNs*kin>y<_`6PC zHJmuvyose$dwTp3LN@0QXaU*I7$T!LV3>fgFnq){+A#nq-oh?Ar9?4>m=e-14PNc4 z1}zwROlye`e0?JigTIAgF|#>|Ln)b-cJBzDl{DxRafC|>aw{N0!qZT>)QQb5ulZu6 zmn)DhS$|bHQuKw$xUTGQtmsyHSER77&0o-F*5&-MNJAvA~%IfA_GcVrp3#2j3A z!Z^KiiPCVsMw=f_8#pI=+W*`?fZ5wLtx)XHcE?;v3Lh7h`zKOMz8llER`9^|_l-#euoP*$v7JCA(u`L=DhkZ$Hsrpmh^+ZfyKw9Nj zgC?^ZHqjzf82lG#7^BKUCKb2C($MK}HS#-GMO^Oaz>MV0XzGH?ayqq`B};eJ2tET_ z#+BPb^m+oSeb;F#*0`Tu@`fwPMsG{UD5AoZPFyPrOxdtBgkQE`H~ce;YqQNUwy)TV z!;XU_q@-kD;rQoXD9*dhXvoI`!S^rpP5-bT_x~3A^P=PYt_)J7hA)}8t4WeN{#Dh= z(@hAJk$}?pD}$&*2!C9#{aj++nT0lhrT?#bAz%X{lis1GaUF=@E0;_i{ zB^L{rZkU>8thh-7X=0L^IjI>=sHnOGNdvHgz? zAA2e}G#lE{gS8yNTF%?u*_MJ?SRLPJ{b6>_&hhwZ-Q9p17A)e^Hqv{EKD9EEjchGx zczX;}o@<4c z25R)VR}uqUHDzn%qP~~tUX#JQ5}I5-2L*aLX2_cX)JT*)B88KU1>Tj1Jn#g&Yqwn| zfsK-ROFh^81q=7*J%yUxzDHP(F&+UtEOtK6M1OAw`G7-qW0H@_;d~vYlgW- z5HOuJ($L^&P$?fSR{W zxgF#kpREqD|6)bNZohaXHkcAks;i03#su5@#}J1NR&KPd$NsiI-nRq{lkmPl0FHoR zlNN!%>iy-1NB%6akG1`?yLSxGr&m%mX5F7~4^Ss04dMTYZHWc|58HpvjQEQwQ1_la zAGFU7ICA<7DB(EO3}Mx;1d3$MhF!##g-aIh*J+Ew12=U7dzS+K{%&dIa4&(fK||(} zKJ%^Xw4Ek4Rd@esJ`xv?r>;2zX=Z=Hsl?EKTVQXw#`TlH0>JhOQ{7Sz^RoA2Fm65q8B`RtVB$M}NVn`>aTG;IGR$Q2Q` z_1}6-T?B~hBvgE7%=;(LoW?d^xespc!ap_U>T6GTFktM>yoybBYsH7?)CO=CXAoIl`)7C{cu z?GyOtnDra0*wjw>-Ut}0WcPTn(xLMZdwm5NSsPAS`-3m~jB`Fq2hTwv`dVxd!yPn@ z1L**jSGJW0UKEcMyiFs|3l+b5A{PWz4995Yl%51y0f*h}DBu8ri9U|)lybEusoU&X z+Ub$g@FP0`ss5^zkog$YN^bhcfZ!)6f^5`L3_-gLdV0c}%4VNObDnX+9}cgzd%dWC zPbr+hnk2*Xs%KLs)c`U!-bp3dK@F*pW`;}5T}{oSH`67JRtq>LFQ5%c_Wr?bJb-RS zgP_@{${;?PejoRO63LvhE*_es%@7~!l;#(Gy27);er$U#^x)nc|B;x2SEp1zrqS5~ zmciOU*+ySl4S|V6Hov1>@ye^`)8Ugc++^$(P|~7rZd=*q3q#-e9C?-|C7_8L#V z<+_ev2cKn9m0}NR_~ULM?u)GFQVz#Xv#1iu*KLA(t2fF|m+GouJfM`bg+t2FSEn}0~wqhcbd7=J{*VF&h-M##&>IE zJkU@_H}TX`BC5qj;Mui@3iNGFRUetbCD)G=SwxVY6lxoA%ot3LpV9uPL+d_nHbl83 zebSprLIKhOPJv&YiNq#?W*y1&b+T4Qt3Nye#3y!t`le`m1t}C>T4S9C6%vriGoTz` z=)`74%>_<_3nr2})#NuSEeT<;Wq!h6h$spZ77?#MIK>O2NFd^vAp6OaP0~KQGJNnn z8_CYQ`iGv^=P07^-{-oMk_2mpf#kc@izl7BZ16KLlGJ z&UaD-2BMh3r|4)f@S8+?!XXqjj}XxkK;I|@T!Gd|ju~MM{`yXz!C{!)SI>oCL;fg{ zRYV}`h-VsijK6kzHXq>J={-aB=OUQLel_162^50^@I^W_aO`gE3x`#}KeVS~=Vr`_ z*(UjI6y9mtFI)G(PDkqkRG9?%0jgm6 zq-6wz2~E({)EXNq+J78cwx|z+kADLDE}+NGbtVnt2OfvAk>b${hM-?|#y%^Ntz;*R z#mmjj6&0V;LXpIKA7-SC(G+-yS`-opWCK!-(Err$fm=YT0A z;q_-}xBpy99wb_I%s9c!3x-on}(}=DhN~)fufu0XhWNs>xkF1A@?Bw zb(W{+O{pyXpj#Cq#ss81dMbSL1`M7y1+6aMuOWu~x%JcO-q@A?=DV{v<`mrde zl{{MQ1)9qN2g| zS3Ca@`x78{Oobn+aAz)-z_=3mjC`m5jG^OcCbQe*4=Wfjl#m@C9!Nt@jlo{iOrX5SHKu z9=`2PS0R!A3ula1)+m}Fx`k#hPTG>#aN0}-3~%PU*5MmiF5V6w!J%9>H4JM$6zeBd%L<<*wU}n2TJ%VnvtD@Fox&)BzDW}3MW`S6^g{9kyG zS%;r2CR!4O_lE9ubz^qC7#e`JPnn^o7e#$$d=q4pgiS>GM(C7pVOeL@F>vmWfDY(% z)hs{j<>?!ecE%}5btLA~SARO_nDSQWZk#Pip(6C5dD!*eoX^ zKiAb;yELt7%uuUk=$sfEt{sgOo_~V-XgE@dZf%?fYiiF7r`ES2n^dm>MH=iQ?9eRf z0Gd0<#DG*t78&ak^^|(8^Cx4tGGi=b+T4vr|6KWLLy9Mvd<`H1Yw`~(Z5dLDjo&0_ zs}Q2WM%)i^H>Gu<9+Xgyk{?~a*-Hm)WFVaMB?2y6oE@}tyf})XrxOzs!rO#X&nw~Jpb&hhI*85}QFsS->Oc4+ojB`#3`(>PE0KMNl+OEk)0M|=)* zq#f_l`aUPWVAo-6a!@-B18^l7JnE;KxSU9ey2t=SNswS??YsI4vpBxJ^W+dV7#2RQ z(OSEt?C9=?Ehy!$X_y3r?2riM>z{%j4l&w!4u>>xcF@65S^0Srw(KGhP3Zm_#3 zfuCB8m@YqGcp)kjSBw%%=G)A8@NP1h@?$LOhHY-6EMtcEYXDvukk@Pkow2J?+z87l z*B=jh5${_szRAWdEW`|@dw;VFb$2+SZ1^VG?t^1_6DZ{3@+-Y&5v6###&e06#P+X@ z$hX%YiUmEO!5p0BRPQ*>`O;-;x6rL}cj*q6pmz$D8tO%uvj#V7C*>(?yUp|6b{1M$ zPxZu1Kiy7;_7YJbWyUC*;LsKJ?{48|yW4$fI|FAjitl__RAtluGPNBl>1M9kORF5Q zETCU0v+~Lze{KKWgP7qH*P6mXKu!k_R^elJ6a)mB04;?uku0(D z?PLf16Q&Z5{|QsmgBJy*fR?01Win}|yyWC+P9zH0WXs^fPiM3|y zzR{8S(Th1Vq!xv93UfSv`X?sqs)s2Rse~B5p#*8!xiyrmrNjRvE)M=jhf)TWl|R%; zdylUY_(*g(9q0Wz9#9Q*{n@&um_{NGV;N$pEHOe>ei-GpO`6HI1DMr$ur%GUYXfON zH|2EDX*op*bw<;oN+t@B;WJAzX1tWmD*vfyVO@u6n}A?01@VPHX^{ojEbM**=kQ*WQRUpgoj)eK~$<+ zSY;NuUs88#>HkrdD#FRE13=@H)YMwjLO<)op;{xN@YH#;7qGz(I8bV+tUsdQ`hVml z1tSW-*wy(@P?sKUmDacF5vzm+5UL!U4$|{f$Ip_}4(w#trop@Gu6WZM^!u-6Szj9K zfIe3SC+qQxR3waMBl*M{JkNNyNr)y$8GxV2Zz?m)M{e1(Woqmsp3`F9#8bC;yujLd zE|ruuEQR*Yn7n9$|4q8IEF^y@09Ub%`J{KZN@!pag=yp|xO9$3QCRL~j`0;|N9hyNc!yAp0$~Foo@KVFS`Xu z;#cY$9|%}c25TuDLOwc?FBVB}lOj99Hh=V!9JCy?p8tAjun>4alAKg|IVyRm^e8VP zNn}a+7|A&^r6|}xFlH*jupkqw!we2b-6J1Yh29=}gNx9e9mSz6R5M<)MqVeEf;)uh zr6w3K#l@eU0SyJ7F9@ET1N0y{JLvXQb=JKDQV8V!RG9dwzV*=2pB%Qe81r0hx~%t^ z7@Hb(`S+-rUi|QUH&|k9N$%JDC);20WyY*dVaNqo9@$W@ka=wxUH9tGSXyO(5RYvA z^~nt$knTQp`5ItpSIVYNF$S^P$9*)uQtEccn@%LTgn@OZV^;4rctf@OIHJ=kUq1CZ z#4}&v_;Knn#%1;UF~|2D`#w>Z+*D_fRXWrcgubf`uU_HqU9Tr9rUI8cEVWUL@X!v1 zLwtu{oK{fi@z7zr<|9*h9nW+Tt3gNHlSIF`#tZ~Zq=85p>`X+gBn^?TF$Id+aD3*r za@NE|w5#*BpPkiW^{&;(PJD`4%|TArappm!4>LQ?p_7SSOx^mK*NcD;+9$vD6i(UR zZj<+3iC+#0nwY#uwni8%&4jrdMoZ9?vr41XjV4K{T<^@PPw<&t^*vPDyGKOIV9Q|F zSR*Un2#OjSC&kh+BI|cvcL>U8g(JQ-2{OffZ?Fe{07>lNof4ex6D zg-{(L_ikK>8?I(2Hg<>EOm>h7lD+*WaUt%9Rd2?N-4vr?>s&XzZ}RBtc33-mYK|A) zh0@}?@kRdI#}6d)Ek4yl^=ZgW*Gy`#dVc;+sIA`NCuSZzTK$tY|6S%TdyHTl34U0Y zb0!Em--q^67aYWdw}}Dk3U4Xg86F;f@VU1H&w)Pjfc3yr7{{*{9d{g3%odg*@$hjb zc6JcaQ>a#-tv#K1-FjY~kz^Eozn@*=fLZYhg2bV;!b{N#x8w^s)mh&wW|P&P_Oz~D zk%lD|PVU4fY8)@UP}a^VcGypoItam~&i1BAr!2}cIK1uGd$@Z+*6St!Zsqn+HB2AvCkDF5fsaO{ZjS=O*JRoog=DN-v?Z}?r znfrv9ngAB;Lam@xnUvsXPt-bz`&E-mV%!gwxQ9Z0zZP$P=Emo0`b{Gr2j7}}F(dbH zX`TM}(w?o;eE=vLVkA+@_IezlfG@z-x=wvG&Jqi9MjS9fxdpLztpm5L-(4Vcb>*G( zdkr(^6fvj}+~c>6|L)nR`!jj)y`yrY|Pq+OWUBZYNNf9}5ksDV&R?QZJ#Ig@Ps z(d;gMi4#;;Qka0L-WEbD#SSx>q9Nx^7Wn=(r)6v%Hj!4B0c!f-)1?ij@^f2RqsKde zhjF~+cal3=a^@%{tbQ|*5E6jJn~QCli=Xc;j0B{OYG_nrti7Y;WLl40d6O~URI(XU zihKf=v2J+TlD_3$^vldU_(0a9)PgdDs;J7ZUK@_eIvwjFKSeZf33`7weC7OtjT)HV zS5W3a!S;VN@y#QaCyC1~#ukjA@Q+WVr$!@5PBgHV*=4-Kp6%SoTls^#S6N07%) zX`X$F^ZzJCnzwTGQ{dH#A)qymPe*KAF|O*6k1BcjIN|8uutyx;vhLYdYd?ERDhsG$ zu_6B*B&ro4Uu)s=cI|wQHyg1A_!y30nG&uC2L>Iyr&aRlbSdO{KV3Zea1=`(1v)LuVU(f@V2vaO!rMWmx!jDhco$jlrvApm zFGVz!XZ=7dk*DToJl>9C%q+gt$T|wEvh$$I z9s-JEiEKQo+}VRQ$LK}$q;*l~wjtI9urAA&Unu?Nh+~6d@KhywOYBxGtXwds)rYYi zIge^N4e}lK>w;g4_nDFa#o68(FbQ66F>GvJ6ql-&FuTOm#>eWFf>uv3ao7rTN}JGf zkhNIuQfOy&25$`-Olj9Zm2>)HvuoCHG*;)XWp~9@0Ul zzv=^-5{JIK3J22>`^cWuo~UZoUu2g0u-FlxCbBjVTW3 zj2<1re~{EacuYIXSR%88RUMHKxPIkKY5lU@v6Kzcpd%IcX86aSJ3xj~b4?zsD?1PZ ztC3Vb!=wv{Xb^I|$J+Ups-=P#5CwIhB3|H>0=(k*qTYaar#%)3fde%DQ}A#IkPa*K zl^`({9WJ;I5WnA5-R_>2iYxW1`-5qk_~60 zWZim6bhzGNaPp-ep;2atc#R^CU6*7&k4I8hAsIVZricD;Zgj^_Y&Dw00rReP<+im+ zdb4wuxuXtv0Ngt%l@33rQF|RNkJK}FNpoOVI51SJ`ylOSJuAy(ol&iMKP(!}X@!8z z7ioyF^juRt+0FbfqJHWZPKQpMBny0It%Wv9T))?tq~04nF#0T-8SC^b_Eb3&&jk-w z9ZXhBf#6s^TvvBPOhyA2snWfL-`_V5DSvN~E@aiJ)5EGTN2qKk^jy^6EBHK2)hn-V z2zWClgHxw0WIn0Cv(+C)<6n=-!DE~KxVgVO?g41qhnIRq5RnoM^@0z<3Ndv_ddQ3Res0O>AfE{mulMGAf*Iu=lA~F0Lp5AXo1EBP@E9a#d4cQ#t$u;>% z6vk1sw3!xbrxdFkjPcqUfwq!E*-wilAE_M3UPlo!noIleYK4o@k># zQIKb3RRXE&B{5#yyKIU}l&byOr(50sZOG^hxBJ9lvJ8;0dA2y$3K=#{Xev__Su}T0 zS(Ia04sMvCb--Us5a%7TXFh9jrVQ%Yhzsc5DCl{fG9Qs8_53No`!ZXv@z)ji&P#mm zSBgb>-vppoHWz=BP%HEoKlnzv-L4~*ZWVfL&DW2wO>Kpsif4RIWN|b+`1jL~>peqv zHAKsDML0tVKGFIh#dE*6yCeh(gPT4HOu_S_jq&7z3dD0aAzA#zneL1-V^VZ)hC`Gh z$fnRV7=b}GpJ^W%bsES=Ch7`Dze}@PBC#--6iu%p=kK>e)s0P;$6^zBt$U07SsJFj zjL7G=_DR%JP~UX<9}V^4aU`ZsQZ>}zv3XoOD)3U)x+%C94sa1uXTu^Vi{uQoH&FYmn}#_rzK4& zK3D%rviOF^A!};u5`KEO4jE~C{2RrKpAf-0$%`86?zxCLbhbF#nrUpeKViFbx}Keg=F~PM;I2vCr`7{AI>BI()y+^bS;0 zXQBHkFU|Hl<@{S}=d`297dcsmhPyL|XJN*NId|f%j;b5{+x0A!fiTqokPo$rUqe1) zZrG+K?O4$-Jwl|nU=ysu{?DpoC%;CDdL2l5xfdd(i%L>JlYJO)Tk!U~=#L6K#9#9n zX&~9%7{j$yXz~LH-Ua`IQUp)6{MqDUpy0!-y_d&T@9xJt4UG_-Vmm za1>!x2jk8vit>cLEw`N2p9RroulD&z{6`t^VaqJ$=v%<_i>u?8?fO7^pEG{8uTxF_J&_ctP)gLYpJOo$RC@T;SO=HOYZOveAzw zXGl9-l^KQ17u_bw3#(QUA5Fn@(Z8qLpS`YI*zd5U!~eYKmsA{b{;Ni^@E>h2B#pj9 zX0=U`48fz5jx8Rmq4UEH-EV{!6krjKQUovOF&^*N4C!}7!ky6*z11d2+oj}T4p9`d zHuC+b)L{^)U5GePYynEz;lz63TbPUswqU%%n9u{uAig^Eb6!6jg4J-N;bQrS>T z0$Pq`Qx($kDx;70zewM1_XpZa!+pL775Vl!usf|%Yvb1{ zmh8E*3%|`e4^9pyGOZ8!XHq$`7yIAuiKCZj*LxrPl6Gu_D%r4Nn+~pNw3@g0vpeqv zAEouR-I0`smV%T9mgw>97@!vT<&&l=AE_A?ZB}w2+d`nolML1a~C~6Vu zFaE=E%$90H?E06aTGovmG#-|jrNh+HCLXnXSy*~G&US`&7=GF+`jF^i!u0J8pOVLS zpC?C9p=WP~iGDSkVQ#RkoMLERpZ$x>=Aa2zBIiehD~&f|NOztfv;J@;bY!>ymTV5y z(1;uA`&NlFF5qfM%sIHkZ~TMNIkPHkRTM?Dbwf7sNNF$8snUFDfeE1*17cYs<&bj! z_P}7dV4$Z)5W`A9k*#_|wx#to>HQb(inNwO&spWid{$(n4tJDUkn$xbBqtg=(RJt)PgwWo#CuK;I5Z94j7i=avFWQj=aIqk=4~ z-khM>G)>AFRBG5Zre)vUDEb?t2wdcOzr{LSaHx}pn>;=v&nW{P;E_`v9R&Ba-y6B@ ztUOA4Yn&xSKCuWb%=JUqPzLkpUoiBm=pdnYQ!_*e^_^Y8 z8v$W59b5ykl(4Di!T~DGTP>RN?U^Bl=4Zz3C3(a;TVw!p2S;R`YPm1c;Aqv{E4g^y zcvzErSlS^7)?#%Yf1jL-wl(liY+~w`t3xnTghvrrp&GysmTjN_@pfMB zve(#n$Wchk1^JBmfFi{LFRzJ>rVZUp3Xnqr1T7`x?>BrE1qlbpQi!A|+)(?r{624P z{^Mj5&NDoFTE5Rn|J)c z<_o&55AfEH;wD9@uO)mWE>?LQ6~A$);YeahSvBX+VmfZuCLCGVhs8K*?i|ur*pY}y zuX;M?ha=rA4#fIobyp_aOsQ06HjUQj|QrAxP2?*P|zp zC};RwnyF$LVTinj{_!2C2z?+5PI-{y%Pu4OAEc)H@U>@o<~aM_hz66dx{x6fQrtIE zH%M)DVd`3!DF0RX1LkI9r_ombYWVP%=lH1_Of+uY5C9A78e1@9mHhbN6urC8m8zbh zR$8El#Yz4wG315QK zd=|$sRuMXQPX}@EJH|!^=`HRn?pDU1XV1}Ad+M&6d^hVIGSdwsIA+L=Wet#b1Qum~ zB8E;}e$~yAwhiCaCHa6`BNl0JU3C^SrgM%a{C$scUzHDeO zo@iZ6E|i&U6(*|(oEM!!`2W9^rOuAP^VPlJ?*(fR3sM{OE5`Od*~ZZZ8y^owrTrTh ziuLSVOTBrXse!6O%`o<|>APWQOWZ7qa)dm-dQRHXs;{s~Y(Xaso6%U6D_+*v62)Co z*hj_8&t&Z9H(8V8mKmzUTN4YFlW)%2&}>Ao1>Rzi!9`3 zFH+6LQ=+=~)>kz8{-!>M9Px$IK7P>1r9?4;ed2OhaMB%J-^ZGCfB9C|jPM({$-=w> zwJamMHFz~<&8&7GU1Kjhf>^pn5<=>IcUk^jW2HH3TR=1$L5()X99vqb*#;dLBASbG z%)J3%`b-t2U+0}b%sCoVw3`v4N+qWOJ~Y(ct9n{Hs%?}XC-)L30^!DK6P~;)FtO6I z$;m?eo5h+|ock&91#PS4d3MTvH}fAR@Yp#a$0LG%rK_(&GkN!$X>pQ?qc!C6Naf7k z?q6TD>+GjxA4mJwF3E7Z*ffi%iUpx?Uz$ZhHm*<1r zL8%#G#56Ow)75wfGaT1dKMRYu5Z@Kt_ROm`@!ZXs(x7^d!Le~{HFqb^!1`Z6{R@q4 zV-9+J0`;3Q84`Ax-Usa?t9^gCH4=FBD!39E>FyIRQEhU}B_ydO%6Fd*YBhbeZ~wCG z*>V{m<_np@Fs(iFofK%8sr;{r(jt|N>?nGbi9?@4L2;y3RPfpdJ&$XpWqVBQGsCy2 zAIl&WO_;&N6XA@B&o7Vf67%kAH@~U-EM)SsLZcG4doWF0Y~u0tx3^_buex4l^sCmA z_1nJL&eId}@K+pvE%J+gXdJp6k$dC0Q=9enr;<$gpnEVZup`<3#S+I zgInFyS=XoLV-EU5nWA1`bDi#{2FsWB|Fs;Ey}1grbvr)D`(DQ2>3lXs%Eu8PGFjM|1a~#@n=U z`(K>BWmKF|*DTn0@Zba|Sa1l^I1MBrxO;GS4ek;GBtQr*jRkAm9U6D1(ctdxlH0uB zojWsk-EV%(PZq0tt$v-+Uw z`#V!#?gqr$E38dS(2TO6u6gyWwy^v=lb8zcZUIJ}3t#aQ3i(+?Ux9jLvbW#VdJ*`p zW}bi7-iO(1rfpnx@FN(KhKfIxzB*0~Fr!HF@Ds_EwfqS0nZsdA?F($FHQJ0J-bH+Y zEtsg;5f}+{Zp(yz0%EARB$&hF4>tE#Uk0B@yo;D5by)$)EcToe;W(cS>3t!-5R3en znPEb|*IFFA#m%J9y(khN7t8aD^GNDR2CsjK{A<63wyQ_DoIdK!)U;WeCA?{}5Dt(% zI2e;pMGu`MPLvY)2%V-q&k+*)q{X7UDRcA(lm04QcE8kkKBp=R-$zYQp;)}e^x+G?CDUS5+X97(`54}GOT z7`6rM8zqZSFKaghu??>i-Rgo+0Z&_lwt|JS25gey zAa69p%-%!nlzk28Zs6>sr!~3rs=SgfaA6Ce;WSp-rFo~76X57XN7GYujpTphDai>5 zA?$`2CGW75<&&AOO4=JTlWl6ykST_t-hI1P-u~pPK6cMnsCC^PsEX*q4UHU#?OMdM|r72z>hZDiYr5 z_}=RH1v`oMvH@QyAKw5LWj~C0hA(UaQ7;k~u619BU{99RbCzhc{BiH>VE0o^K?VlsXyDXai8Q2CE3qU>Xn;fRY2!S+}5p;hp`=Nm@nPD85!oG(ylY}WvIc{#r z;lmgwvFfGa_)a)uAB(U?iRH%^Z+0Y2Th44j(ysF=z!D;@Q9M8mOBN55hb#M@+B_%J z3uxShHm2Axz++iznSkQ{IdItYmllwlRyx1-XM$pN@|d#HhB6o@X6s_hS%bi9Q$>Tm zB66%0@y)@n@um@ z*WSD@Hf4Ev;yf=;oaf==@yl(~3ZV{kw@S-X>)4)h-_d2^{SU#CsO8@|c`5r^%gkh& z1B>I(h3!mo8g2c_UlCbw zg%*U&taM&RLG%?MVTEQO6sSBez)?c>)@UDt=Q5tv%E$1pKT2+VG2cb^JhSWNBjIBI z&v1nXk=Z8WTx6KhvmhdU_p$AR9J1;asokC4u+#N)?)GW!ruo(GQoe5OqFJ_kqAE|k z+{t$pg75Z5AXaYVgd7w$WoAVs-|f|F(dVyvWt;3l%n{^sJzonXS_w=J{Jh7o zA}AARV}Z6$pB06VtS(r&;FTYP;&N^au0#1xY1*Ah@y&!ou7YEMe{mM3P$}^kTFy1-g!d>|7l=Pw>h!>MGldC# zr1AJ5jMZs$wX~V8E8mP(^gxs0%;{USt7YI@xwE~mh%zYuVB(0H`qL3?M`q*b@M*-m zncZQ=OvMGOKLzX_uz9f5HG-=*5$gSXbENrLgy;vkf_e)WSmD0-PtLc4?^p!$hJj*~ zb%)PEa^L!L3lK$J2VuX(7WD0LD@WnO)qCNOK05)NVV3IbJH9W4-{OBS{BU(TH}N}a zZ%Jqo)RtukFo4McV{r;0G0IFHj9RQq6$7ZlN!Y&?9pxGIm(#hM+_g!dBEJ}?Lm>VA z8EbkcNVwTp8dcduQ!JMSv)okv6l=cxCsRMU(mKjjg9N+F^~clhe7*5vudewJ01;XkNe_NU$OOaI;N zKNO5nOFtR=YxW9xcICXZyI1in;%A{L`3)|+6)E{OsD9-*8x;m$xc(5HWRpee)hAEx z;!OE$5xG52bFhQ!J?|svEL=|L4!QXxoJ;NMRT_!S*Ny=6N2I05zO9w-$8YwUT-x6P za^ezRAz%8HGQ&?^UkA7)#U>jIWvmlr0#)Yy*F?j1 z=T~}9-q@pgx)|9aq7I@Z$NVItRBKm|sWf3mg1H;3*s%P|7~2S(Dc7Lcgj2Ulh5)2VmWUQC4&tyOyW=RHvt_Y_c;yxBSYs`a{5BKdtkKeZ>b znNUUg`4&#jEP^u|&Yxewm;q(VuPY#0t(@dFbU$^w)Ovq4hUUFGZ}XQ32&2u?>Uf8< z3lpoO1-2E5)G}R2^)5xwHg;x$NlK_RLa#Le+-q8G2?WwvvX(D%g#Ry01m7By@Ljz3 zNi0y6IC=fHe?stpz(D%~2`RtE5||0pSP-;{OyeI-c~n-uyOlwl#krVQokGK-&bOT! zxae)wAqa2tQbW9FKp?{JbV-s9UfHeQV{1-G>vx3{>l!ylZR&N``n5xscDm(e+&FAp z8bzsH@KN!V-Ebjc8iy}ztwZ(7hJVr?Ir8lN$w}6rmsvj5gEKZ}1a|0u#^!&=oY#~Q zd~hG%1E>BRRW2+b6QO37WmB#m43j-NsqZ@%ZPcBe0uCF&@|S?AZP~A&5Pb`BE$dM`tm~hKEd|lwkx9Mm$z_s$D!Xe9M0~Hys$gKsZSjf zh;Y5IMbN@@Jjx#&Cg}8pX^ryhn74ib3g-Zq-7tURtGP+7Cc78}t}tBxAn<{*7~Iq` zNCl98>w5Z%{qL@_{r>kBt#D9$OQIc}o?AL}T^J8oT)^u+gI`s!|&Dm(J~8b8P#w zE*x70ycSZ>Z? zuLUSpF3VHJE6DtG6tjiCehXy2cgV#xN$1G}v)LGo`ebO15wp8^-B6fe z{lRyIv+2lL7+Qz;iN)|ng~+3Bd8N4=vWtW{g%M0g7MM@qjL0i^_94clZ-<3!pmM9M zDX2wAFgi$2$|vj@L5-A(SFnka3mqZDu{~Zio-S+lS*;S$OLpL}u6=cIc;hZN^3VL? zv!H(__|78B6^IVUx|C(7rv zrxG^YatRQGFNj>8p7M7hhZJz3Mf$nDxdIPy#Aj z%i-XUC^L#$&AycLM6M!|Pi)`oN{{&#n+~Cuf6y}W6sexu1SNqeR6dVwLK2Vh^r+5P zJV^y4$yk>r#zRQPJ)SPV3x4gtAG`>QLn(3K4YB2P_U;bV4y-@bQHHqu3M|?WwUi#q zlBe3_KKa^Ewf}^0c5vtQ>w3$P2Do{#xOQz(SQ@7Ie|Z69Y5B*FfX2WYmHdvhc%8J-1jZ%$bFtyNIeo#4AkP3W4jSi3AtvgF>jp3gCbS&naTb)xzH z1Gk>pm1@wcQW&aNJEcQ8Tmor+fLAM3{y12VcrlSHizW&mexE?hc)25I=yILE5EX3S zQG8!x7!f+mt0_agqt7o*4D+O{@l;P*FOoU!SGJ)=>v@ZfM~$~gN=4@qn4fhVi&&Q4 z_hW9VBOwwpoJ@R{`P}|3d`rfl5a9zJ+CSusQ=t7=-S1PiNFoV&bo^Q2Ccd-ug(l`6 zJf0DDr(kFi9b8_3ryUkcrNkM7kt|H}s_KjQxEc*7gbK+KvITdP)`ZfM}TI$T+fq$Ktr9|vBkgPr4tT*W>P z&O&*L`ejw=dDB64XBhw+3xa#;km+N?mqQLJ=J)BcnUI~c>+ozof6Wl&JW-1{cY2LX zEwL1jIywr5r#RI#>23_Q;PpY|B^IA;`Of}}@G7y4QX>9gOUU)Zz?Ej(Z?lWGmcTMa zDwu6`oJ*&j0zT0k*)#K5Bvh3%VfXE$Y$iqn9-KUq`A zNkHv|iKm}{lVT1U3|9WRkbdK`Fr)m}1>LW1Tt`h@u`SHjrb;hHi~WP#4Lcu^tm4 zrxKY~|0GXOUOWQ`Q(9JQUF0tgB(1j!LKmWkPb3vZt$$3YE2s1T`a6)OyGc|3z{QbY zX$!@X_n_S8az1->b|nmi(cL5uIG?Kq>5Du_i1>v5p?XLAc`yN?vf|)z2k{}i=yRJg z17FIPLsqE2*(~l7_g*F3fJx^++h#EdBqdmN$^>B{;?O2VH-Mpsx){t6C< zu**v*fU7rqi`HX%v!F6t;UbdScaDp{-W3-3cbK}LUs^M42zaeaoG_=Rwp;PW?(A0w zkuZ|vNdmE z^AF+XdG7WHlUM0s(>+y_|6;Hzg(E|t&BY;z1SOY+Y3~z+pnx=4vPph#zwu(gmU}t; z>ykuZyq;D?qYABrK^kQ?u^vstU@3)Hc^O*HA0al}pm+E~*sv+*K#R z-X3UhFFlSc8O*&qlkgab^Ka_W95UK08;0<` zqNwd%y3>lLz8@Ka>B*8z?-S^i-k1lw_=7Ji;=Tt3aZpPCv~PsFxv(!> z^Zzgy3WV*C_&jPRI;4W$p~)(|5@6WI2*jz2O6INx9~M|_lU~MWy*sn3>{`7jUh7^K z3j#vrd8NSQRgXuLQJup?@`Q$2(`ZNP`Tf=VyduRV{ssZ1AX}2k7$r*-mXx2hnGqs+ z1kHQmQkqo#x)X*y`vMcI@c>P19PP6Yu{Ka{Wbb)9%qI<5ytICTudR0yp+e7Ds`oWQ zRH7P%X!=s#i%KbhStN}n0guh-4-D)jfBw&x5;z;>My|{U0>Lhyk@SsHQZ%6Rs(Gb) z@~2&r7eTJ26HBH&I%I812HfJQzUwMd@Da0AZZ`+7 zU&ulj6LD5m>=l?GW`#8YO}3l6eo8n?I`Pi#?p`jS-;N%)xK^*+jZKbLrC1S<>+5ik z8f;)Ar|zI!Ztj@3KR5a46S{3XNSR-}x0urVpTy*K$)=l65ZGT>;Z8kyOL`hd^q1B^ zvuC78ah45YgOR^#vW$U#>uIA2{^}-(3iHyGF8295oXgi`7MJQkR-_K#0x3tz)#fQu1chl@s-j$GN@|v!|*0&WY=CNiu)$a^jbvkM+U-b3v)a z0WGE@T4B*zDOIcRtJsCFMMwn|x8Ji}F^!H~4?E)p-N6pI^qi1Qnb@;!VozvGi@j#= zulI=~hSFDr7ZyVhFwx0Ja|IYzXUD;5mC!MDi{f?3O)S3ftaxi_;sMe}Zfrs%eO{+^ zXJgm~LOk(pIpr#!UO5-J$BNO+NkhJ|IB|83X3A@$$d)|F+#paU5W{13MES@lE5Ee< znm9&+*4Vu+CT;opVQi=?`opX0T7@y+^ASw;)H9~Br17Y4njWLK*6?CQ@Hfi<*?cNW zGEwsOO-YXH8(Siw>gWT4M&>7^W&ywb1-j=S?jXi>SR0v~m#No6;C@~uw^!3yVm;#e z3ib=o*8k}h_b3?|6>%| zB=8BX(lDMkBP`6d(&l^PaSl?h1<&;P{ZF9Iy1Qcq;G3^?nWSO8J;NXaS1Y2*Ypp)V zJptL{#{K&Cfq>57aIQg?q!HYq$AoRv5mJ+U?CT4!=`>8 zKm>lB$~BHWTtYtccoV@>wKR7#{HKlJ442P;!*D?*bzfddcdo361X-p8%)2$aYnT%7 z(MUZAS|}2vg0JR(#iEv%7H323X0kefmi2xT6|HqDz%|>@CR@UB{aAEK5!tK!Q@|6A zm;b-7oXhHleYhCto#l?h27(uA%Y(me&MHJp6_Yk*kC#P}<@M`+x8_G4%-XnegH17i zz)MUzfW_`&W3_jP@ep8Qa6b4QEv`3;N&Wq?YWd)ne1J?#;mo9aJE?^wLc0FfWGIC0 z;e;PnWng7ATfj@v0`0B1rLCqIqYVr+Yq=cgs>rF~m~;8A1Vh^jIjF-o`Wo_vcAUj9 z`JZba1y|21p_hV!p;K#|*sE29R>7>5Nk6%QD>6NwI9k;i>;BnvF)#TKV70En@}c6O zJFiLI?lQDGuKo}MB8$kZHazkEWTid6x)I)uA*%ve@iO_1UcIJ@53pa_4~|>2wd8d> z6Z7uxw_pR6zATDY9z8;3WO6rm)E{hUq|r)95HznsU1!lN;_Sh1Q)p@!*IaBYqWZTpCH{NInvHmw(DacZMN?!b0pgn#& zvc@SNH`7!-E4dEADK(Hu%33O1bR*T>pFEGZ?{VMSa0j5gmX~N{Yktp=VleJpoVCoR z%`jF#=78EFu#7^dQjS<2eygCjzu6;%O_=@3pzG}I0UCfXe)dLBi|CxmH-f^PkkK&a zOVMZOwBmUxoD2m(Cb#jJ1R1yc5Y=kTcW&>j5sUBv$m|22^T^nAF~19fi|ftTd_hle ztxGV82Ev#U7Ns5le*c+AgYI*vYK~UMHSJ6TAgP9cHL|(vU1VKMPQhHpn21q z>7qUS&b0|)Vcpj0bbP(Qp-Njx)8atRvB660U!IRXWmB%lz@S z1HW#P zb(u0zCEHix3StUXx752ZUC8xtt{Wh%^($ngt27mlSuK|E7Hq{nWoj6cS*bj9+IayU zO{(oR8_me8nHMZ_6SDuMQcn9DsuzpHCU-7-_R8(^6x7Q`X%P0zvnip3713y!Rd7v{ znPx7QR__fWFLR955_3={+7Z|bCtPg7u$zdU%MtQ>7WugpI@fVEc3?SmT`1uOE!x1p zI%i8+F`S?bV9zw24ed?Dzt^#eu+0bQot-%n{7cSrVe`U(ntTHpd@lEjt(6+vsyixvP|BIWg1!Z*d8csFO z9T#k5QUU9ST?ZL38JXkmHXvThP*)5CbwH6xasa0M&rH*ohfZK>=}9@f@rJi_jM+ro zEYSxkEoY343B%EZo{H^VQevd&lf`D$!JC?W!|DOYHV*wfq_Mjn%z(9SLe#=Q&3ooSqMypJWrW=U^ zY^u5WgQxskFRAPMiP1|2r;eIgW`FT-70AN0h^#-AOD=gfA}Y)YRHhNm`7Zhf%@M`_ zgf~mb4(DL-X2}Zx+n$H2_|`xrUru+HtHQ~fzFtevfbCILaRJck3=pg3F^u4~q;US8 zQ^W`ZIie%@t8`~le|DIJBd3=vLOi|^20+7D-?pAq_TlWrR~vx#Cle~DPT+=sg>!w6{pl|JSAY8Z=c+`m@;{`yyO|svT_#` zLHU>G4njF0VmhLJO{w<^C<9Ff0Ia?86?XRe^?3t@eHkVDaMN*HVG6XXM1$tMBPRFK zlkiDdifJawDl-W`E9p!FLWj&4K?|$!g)lAHrJ&F>l|6(idW0eP+P<;a!AN|%J|`d} z9R#K<_kO@M1wXTQX+pom1fOWqe0)Dzh9Hb<(Z6^dXZ-4t_G5!ynNR$VSA0zp1b5Hg zfT^i2mq);>ExVuv_jUzss8I~8VoqI4`tgOUw|f~2vFm(Cqib}=K5h@vxGa?2Mm8|o z!WLluO`;`UK7`pq_CSkJRUsOTz>Fqu&)xIuO3YcFvkC>SMaQL5XX?#28~J?SuoYjT z^`#NAVB=R5YZ_=1>Tnfh?98s59Wvwm4W{<|8u=XT zh)O{Z#n{nuaYEh`iELa$y-HlD9lN}=)bypty3harb-5UbvOiruNO5hPmcz|6oea2S zqx^e50enqKV|WQ*_EaDOI?D6(e$mod-JIj~Qc*}@77NEXNWC0H1OisZKU*g@ZwFw)m2u^~9si93lCK?!&ns0u7x_DdrRjIM%uG2S}L&8ea z;E*}hAF<#b^^Eo;KF2;|lTcPPe@+;h38FXe`ewIG)cgT-kdzyFZUEFXm<#!NyXl2@ z^g*6KD_FCU%H2%Nz7E@a5nMBsZb+@Si{_2)zw*RuV=tyMeQq_4*vit&hP|tiJ_}CQ z`x@=gp5fHBc3G6m)QG*XW@5QglR-W-g{p4&Gc86dL!?HIM#J9;N>!)m@{!ga+8g1^ zT;cTrq1BBidu;gOi2+X$D=*Yw#Qfqz)g{BNybmy{{gJ405-+mfk9b{Ye*pd!@|6cDQjOf`?FZ3FW_U zSBW79M}vj!@l1h`*%HdEG#=Ak8%zpOCtQ2Xmc?{o_bf#vDn+t@ZjQOTz>}~hmuBAU zdW?bYxQLFe_(LWT#4#%g0RnzjwOJcp0sbW=%K@o?Ti#XD1*r@ZVS3;}lY+Di-DEMDyO3@6fzOK-6@Z&Ri)^48hB%TOCa3M>>w z>4Y+j)B|E)+Y|e}+0mSk4oMDrXW#C7=a8O3L;spLF@4C#P4kPaVV+{!EAoMC7g+du z#lO|Dt4W3YP5p$EgRdslm&$^Y(^;YkTnBgYyNjyA3(FWk;PMJYG*Nd!T_f;+bO7(| z2+7$iVqb2;EN6vPmOSH1(M2RGNrt0W?~y9Z%Rxr!R7Qk7$5K%Bpt`N@3SM?V;QnQg zwX1(Hj%sqZ_aIyd`2?EY!rtg}BESzyWaAu>@l$J8M&+bfEn zy~b`=1aRgXk5Z`Ul~qHp=2%a%^{Cz?BZ6Q`t|5W)8RF<%S?O=U)YI=pZqAWaiM+eJ zFjh5$Ku8#nR{$i{lg$_bDF8rME}m4 zN6~V4TbDOCe)>fH3mncyZ5Y4>z)(DuRVs#9lbpO3^IyF2En!nl=0~6i2}lr?Xl@UF zua%6>>U8!AkI~oj%7=_)?Zl>4g;29b*;;?W(wa3sn391SpwJsV9X^SYjCM*Ba zCEzrQU5uOU2TBump=u1vk!U-K&A0Wu9CP0godji++`&_Pp^TUvfuNrs4{I5T;ja zEtD-7mWRd9{ShlgyHw|6P+WAi@QDz)Rz@}YXrQ^5^^~K!2Wk?kNlV&sw5-r;V-wZq zJ1g=8#uUlmVCzt8^VZB65=z{p^Ij>dR>Dw#0-3a;!Y9yLEDTE|aTQHCue zWAzK?a+%_1q(0h|i#|Yh8*Aaj4ANU#JEMv*Fkha5n*TqET_rZQP*L2(lCbKrGHf00 zmYh*Yz4@J_41o2#W^n6~I_AD|Y82q)_7DxwoEf0AXwrYpC0uV8g^M?uxvMT+UMf|t#sI(JI z30gtpeX25cTkkSWJ<#zs_KW^vC`0@3KUW@=@8^MaAzE!o99UV@-(8RoA?fj87Wu`g z7IIFlEOhd*lJeL5S(txHyY1j){(51b7@W+HL1`i@ygv;Ww-bXWo~0(WY%)Y4dc(`c zlMG1^q-NwLOpUw0(c{E`M^JDe;ptLt)jUbx!r&}YE7?-?K*#!<&h~%pft$B-jyd-^ z5wpTqr?u{0=^7g^RQYMN*(T`F4`_^f^GdQh) zT0tb`TP!)^muF;!vGFf$u>eh!^K(}ihjBP70$T$V5i7zQ-rg;b`A#HiSy=BbaS#p0 z|BKT%|0q;Iw#b(~9^Wk?{u@W9Doczz*1W)5GrlUv>A`oHTS|C=qhIxCZo39tmEbH? zA6bVunDjg0pc`0WnDM30h}?>vDb{iarTF(GPi&I0C0{PD)t0W;U64d0Wh@{7`z?6) z-LLPMa6qi?Kq-2Gaz)!ZVvDp8J!+NWD1*t${G!WBd9f9I(PfRpK(KJJOWKPFCEv~# z__OA7^uI_GKC)eWgd1WnnqdvPrAZUDq;MszPF%L#w3a_9jszpw`~N3i&Vv7*5GMh3;4&nHV00PwUL+au;%YYyG2;jeq${d$YYBrVoSi?|1Gp|k3W5PH+igI zn#w%+5tFwTKuiwb6Bw4t3i5h^7zgk4&y?S5YchE0P1Jx%KrT2$Ac!Z9#?+d&Si+`+ zMv8#(;HAWu3=w-sLRAWwg2(*c$VU^OY?$VSY3<=C)OYp{D&^sCjaAg0^47`;)uhVz zuS|jh&MR2rcYmHxqO1Ukkc;pP1;n^?1`nQKh!f3gwSho#a zK-O>hGxZY4E`6zf{((wPhD;T4_J>@<^SyU&;*~rhQ4l@a36j^NGRlb+ZbcQc%pb6C ziPNNkBu$aJ0r|JKA}%$tk8BpPILJi&#Ybkd9L&$VDln_prd}^%ujZHOb%LmmS&#^4 zGWD;y(i$l^_d~D&Yi%SU%w-!x1LW54jFbnIELfX& zPgR$Y=5B=6bG6F4^2=exEBwXnF8FMZFZO=g#BU=Mhc7ph-f0Ej$(8T#+jx(Y78D*d z#-i|tP6)F@-P7NY^^+J|KNIiSCO{~v#AJ3f1>ZQK{(MLml&lo0SGM<<^hmc@n$o(W$_G;U|k^4|fBQLPq__PIg_r z%la$0X67Yw?SD${2rxhW*IW3QC5r{`mcNABq<3VW|HlL+kzG&V9~22U`NiaQG`Riw zpxwdX3Zm8cXonA6B8dXEro(uG~(vETH)aF;I%5xkd z0Aa@qfoSI7y&SQ!J7vOqK!Y<547GWLQ{xTK&>$k<&n*x7Nzw0)U_(odkT5PU{RAe? zsw9nC5e4^-VTse7%*`pi+mbH<*`=(WeVN~lk>LVb>yK?!dx+vo20ulLcUQj(xwV4A z%X1Zj_id{c14{F~?UOb>T}lYjA<}mdHHTu%piX(k^4UwzmxyEuy7w*1Ds8hTPYc!!xU;x2);My4ssmuLe7Q0XW7%Z^<9 z;Q6_!+(;A)%bXU0MGLQeF8o4HSLJr9=|QELx9Sq9Ggk1yP(^An=}S(`ww43DDW4#G zUAY5~D6kJ=z*L7@H?Qy*KA$JetG(o#@xSEM-E9Ngt&dx83|zN|-&C9S;am(`icN`Z zycx5yf&Uqu(tOgk2u0c+&z9PbWG&-T@)}edX0QKi0(TMY?d=_|Z-26PxPfOo@^p1| zS-81Pi=23k@%UUH7TJxFC4!DD{!h#TPlG~ zwBPj}7Uo7{#Q1K~bRlwN*xPFUmyUQ?nWF(pA=U{t)6<2XaKw-Evs=iyi5O{ zZ*YMvYuK$ea8t9jC`0(jXV1K4CMAyG=4&eH-M+Gty1hTY6)|3NNt2)85q9>T@VBCe z=XcvhP37cBH2Lz9PWQFinTT`~sf!R!xmTlErhxt6x|penV|2ul z(>f^kU(+yTVY{)vJkXx=mgUnh#>VHz$DXU_2+TuNzAWLy?N+)GBKouKCOZ-D0ErLy zb`)A0^?!-9yN_vf6i&}ow@Hi&R#ih1Jd9pUT#1|Y8G8k5P;P*sb!x!K)f($#1&k7;2WHv zZt!FN22*{LOL6o4zYp(AfzPmMgX6*~9hGzZApD@PPewh68t|mpf0PCnsk5O>@Qm2C zGLKeUPk6~E2E1SWP86-Bvww3f2#{9_xSz^c;qd%+h|ZJ_^)N*swe~)sj{emOKhMoq zk>95Q9dQ~1J!p;lZ~}{p%bFsoKdC&wShG{bI&hnyHqWt}4Va(??wWJ@=*%gU zgN{91oy0Y0ARzcVRDMK0u{x$k3eCx1G)<(_8a`hDL4>~aR&4Iv?9&9)wY zU0c3s1H!#Ui{Rke%QuN=mtC*!)N^!PALsKNO4yRp?nTxm+aEq$`g3)rO2uy<7XrWAS3g2 zIZ_>d^<5j+DVJ&FR?5ByCl&9;aEQaV(!Wik;9@CD+@th`kJ9(=c7V6e9$YH)XD+-t zPK%v&lZrffRdx*iXr6@#m^-7x4yYv-mb-IV#W%r)a+@_dklDjn(nE&G&?Q1CcHuui z96n+49j%MsbN6~^D>%?72fFKNsJ$J-F4LYT+a>dPI}UaH^t+*c{pJ~W+}8K2JDbBy zuUAN0jiLSR&jO`(JBl9~fA=z!IxX8BoS!H3ksmdo#~eZ!yHCT9jy0Scj-V_+P7ca- zju_)xY`+9T>zmBR+|1hh``ey<8TK|UQ*ZiM!#{6PS!U9n=W<*FAIW)$_d>AM11E?C;kC88* zqAt&)h?STpE^2PZ&z@b>P^CZvQo0|s_`Spz7voa6=HCBnP4+|w z27M8PnqMVy)-CzpJ8|FFEmc46xtU4O2js?2HD&eBs@N~yEOO!TJEmehIQB=Ue^AS- z34Y53oSo2DbD355*d{v@)2GoQt`bwLNqUnp$Spl{3<^R)4jmRNTCl55aFYwpe%VGf~Zifa!tT(oA)BfWDoj>x|;Ijdc~%Rb?wD zw!euHP|%Ud@d*g%1z>w(`Y6;4R7z}Di&ti<=GHJz3-lfXPn(5o>Z4tk0RC!UObe=i zgOhge-iY;4eu4?;1dOyyIm}=rvNG-Q0vSk};A=f4{mxd9Z_!ugs*%bS>uJNRQF((L z*q?WBu-5}f^=v1YoA!syA_&+riVrK?gs_+hT=@5{747S{UZE6LrD*)G3W%if3YtrG z^=>&O9t}yj3@|DJj}=|7FU~sxgggDk0U$ z-&^2 ztB*RsSN}r!D@q|5%a<^((6>fVm?}UIP*9e=q_$YF_spzc-fbRLB7aJL!m6zsY-AkA zL7P4k7Sq2N*9H6bG^6xw#BI17pialzxVyNx-4x==t= zTTNk+FviF+&ldOP>W@przu5GHaYg8o8{2C~j6cGq3;lOkSJv!20uYC+H8k!HhuqAP zKL-AGzQN1HpM^_ytyTrv*~f|EOjw$eNv89DM85+0`KYVghm*OBOwE2<5gH~#>u(M~ zy2Wo^Cq65t9LQ;zSSVTgyp6|4>V#UP>t8iXr_>U1d&UpdX=;W$?mvAb5})GmXMeLnLvV#KH9dh(O%;TqkjO zZe0cw3dG=UP^${8K05efeAYQ+`0TR$Gl8nM`W_x5G1KBYcsuo%_dq3AFX2HTL2;e_d>{`+hRIb(L_JJp15gj{)3#%Un3mlYG-xe~0#D7?) zE&w!E`#jg4*$$mL_02IAlJwnm;8_jejzH54jz9-e)4&u=1(ZTvE99t0+3z6ALi4YQ z8=qJBntTS2GbLAib%GGtttyT`t9`0-sHaqaNT5`=7J#>>ZbKtWBW*6P2@*=UB*+wN#%uFP*=ZKYs*y!0H~Ua z!+RqwY?mX8-!71Ug|sb$G{`j-FvGuP?ScHmd1SkS(^1-MFNdwr>f!+Cnpcb@O z-`gH0B32*-cHu|E){cw(voJl6qH`$<;SPvxJvSIzpxC{73VtI@>GdomW)#SayV=Fo zPH*P6mVuXf101sSBzYmFSD7{Eoo8syL{l^e9J|*ypH)^}7Q!RPE+XDU7q?!OI&N*) zjd{;htGXt89XI42!ac~X^BUQe&4o{$uy9Rp zplD(h#DLOwjx_#H2Zm^X46QE`m{baLd13lG?m!|)B@dQ|w=r;5QWXJ0jNkgUnd~i> z-|a8sG48%IrtwZB%y4JjP$P-Jyh+k0ey4Rh>VaU|GWq1OTk{UugV*|v6%Fh@0Qt4= zh6si9C9Fq|B9r03D?E_7^nF}d36_9nnR-=F49ZazyHQ4VRcswf37fqAo2b8=>Z06( zh>cH@DbL}Zfg0h<#B*yvl+HYef$QH#F5L{vXKhr$tah2^&^(*5hddiqAJfa2kjFaE zf;FEQv-I(l`Y;YS{#8E2a%5 z)#=|^$X}{=W7KaZw`aJZa&C?sZUr}?^Y)8-3Cx3BXBqkjtdsJ02P43U{k{e&%cxK`#Vva>+Z2fd-IB^xxIBXaB*!; zA4fgI_k6%NMtyLx{6|!+GoC;kT;TUJte$Xv@~SD6Qm0`NLwcg3cqlr3&4DqH&mQ0I z@z7G-RTBxaO#nYjIu#lIZXmygFs~iC&-ElAX++`i07M(4ARNX(lJ$g}H!b!-EC64D zGHVdY^H*#~mF^4!0fz`mWqW+z#y-*Gjy|4_m?a&6d?h9hhzRb`7il`g8}${1pnj((lKuC?4F5njPnKZpP^Tsbn9U z8&oqjXfSBf^Z~9Q*f#!rsgi+YHlxV5t(f5_EW5olbeE9-W5eO`gNm$aO5$&Rt-s@= z-ek8U&f9M!{k8qk6MZ|sC$Rm!y zhn(WP<_Bh*GdB>v0-iu5Q)nRc)d7t_t_eqNC zJoYp$sinKW_c2~gag8pZH!$i7&Q|!44G6l=8#5&^bYlxYZm0dvD^LPy(0oW;sAwM* zN&encc2wH0iqj%JG9%h-Ry>EXJ2-&AuF-xE#Q@CY>o0aa3zy-bQ8|CEF#Xo6bw2Sk zuqE$A*4u{)ej9Qn;xsZhwh@yCN!h$*#~euwW9IIipMffgu$^EUr)4NSs-74~jJ~SV z%IgVhIK8K%cDebnccop+d@8Sd6uIHln>P4cP8)+RTJXI0a zWPTnp4dt>Tyx+y2W01Hh9pR5~e555|=eC{CocR#dB~|o82fldaK>SYr-Ou zI{T;LM9e~2(@45xf$Q(M(Io!xMfM*aMlBKi9;7TB9qHVqN8`+?oyyU6yFU12)-Z&T zwd<>f0NEyQd|Mv}ul~ceud;HM)TAj1X2};24BhDu5^Ee2+;uCAGUD@pTwY(1WKi>G zTndN5!qV+!FmGKw%sZAQp%)n1=nF-%3#$W#*4pxj4}`u_ux?)H^C4Y+ncY#f%ZmrzhmJ z9vEUDKGJ6R?kvU9$^YQ$tD@TAx~7A>6?Y0P?(R}bad(OqcXtR-N>ePjYm2)VmtraI z?(P)V0DpMi_1*j{7u<1?oU`|ynSEv=8sWVT^cm@A{#iLJvl2Jnq0B(JCGy@dr%??? z$1LShndzoOPccOKZdeZSdBQs)%>KouX2Gfprr|-H+uzR-mpE>-A*n;q$oeaR$+8mI zEMQspYx_O?dw7iKu5`pw_D-mq_+VIMqbugPm&DE=D6Hk;o(;f)F8i=xHY40{4rKHN zl7wB<6pH1FFobO9bCpLuB8%+mF+Ta483qfJZ43Ta)g7qalOG1q-e&;!t=x9pV!cLK zk&i59JY7)2YIU7EJ&QLF2wAWqZT%8f91NWrY;rYQ^7d)ne#(+O6u!&JeOl({#YV$$72ka60LU${_Vf> zb+-?#ZyA*q#&db+AYNue4;#Rr;@aEDWY_vVcfA(NmNGjLWaO%5I*?4s_3v8(fw5)z za2|G$&B;%zJ)DxA_m;w%{)WUmj<3AN&pXYKK0#*^hBw^zR6=(602!<3bI*Me8UPFI zDHe(K9$jcRgP+W#sB|T;r$!;7{_)Q;!WCbC-*GH;KIe;gGxaGBDSi)ORVGIbkBW$c zD=)4yc5l0V{I3_K&~M_3_CMG~N*%@(jb9u4IBL0kF1l2Ydig7J^)J0;$mnzuACgr+ zaxaDBhkLm#Nto&iJ?X~au&913F>5&}e)k6l*{}(mrJJmgi@uKJMKc3u>7)2ovL2?8 z{S07g95C^ikioQBpL7YPl%;U}#^;N@Rx@>EhU1?~P5N=`LvSh2m}r8x{2%ty(nXlX z`BGi?YrNH26GRL=KvDc*=Yu)FNiO>Bhm8+UDn(P?#N-c1>u2ksIKSC_p9?qwnc84s zXgjS%oK{bhIj}QxmI@K=*LP_o1gm^uUpG5Q>4d%y)wRwE{C(NQA3Swm2(L9F;3ngw zMaStszY$RH44VQ$%}fU6hr*IP-b=OwK2n>?hBhmeUye8uDYXEl$=rmv_RkYZMw(a2 z9S0QwnN=d~BgBKEst;^}E9GODB?ombI>;&8A8K7H*j;$q`CXNTlkjC`fBA-rmVyp+ z2UXox(hfL9lmQ5EI_~a9<;$PpNGrA$icB`WzQnYA>H2iscC*yVfh0ooqY>G_EwEg+ z=L1=D_Tjs+{p6?X>JsszPB_XNX^Q|D$MAM^W?C|%TilgEEDc%>Jtnaw(_!B!0(jpl zU4Djh-4JH*9zsu6O8dEesUPZbBX-C+}$e#;SxGdZGo|%gfM>c_I{$BpctMG{O@T>;z<*! z{9$=d975b%RdmwVlnV8mYc-Y;@ZvWE;RnaOa+-v}2&R~)y$|OxLBlPsT4R$Rf|-NG zno_B5IaY3dH(Cat!t^2DnGF~XieXakMEniLU0_5n1cWdP`gWr+e7hVKiCLTVfiau4 zYk(`4G_fuL!%1-DW{miQO*V10CEBft*r9q1x^xrGv|)NfB9 zv*P{=KFR$cGBfoR9%H0_1+l=7m6cd>hJF@M<3LPwHwRT=CCeY>h0}!L2e{mpbT8$; zRyT^D>+6T#&LpjQ$58C94x1zi5s?^u~$WH0ngL!(h0c3>&e3Nk%SC86~)f@Qy z1fraUP$>KTGWk^u6#o=7P4S>Qc8sa_c8=Ix@5o>fMmZ#ZYQ1XsXlnc4iTZX8yR^1< zufS2VPua;0A2}buzRvAv=mj?7^cgayR73JbXm!ECTRlYSV5w}Pg~GrDM$-~14GB1e z(gPPZs(eImBtv=s0US=FC&APSqVFNd6eU{CT zVllf07wV<=VuGON06^$t#VQQ83QHm{z&cSZr0+DQ$UkvZXpaJn^AKeuS^Wr$E_u$X_NU#Ut&E0i%+I(}ukH{H+k zLXqr;qMbE%S)wRaK7(oMS$M!sah$3VY*(2lA|Prb{>va?f@Ix7{2j~mAE@}oG6^B~ z)2BQ?5}@Y7z6pj%&lSscf@8+Bkno$P$QUHA10U0W#6x$}W{=&eFNG;KuCn(`Jd4Xp zwnSSINff#adeJzVnh)n>RPh)Gw6WrR{%v`pD6` z_3+K@sdw+8sYG5?C+Es!8CQ%yXc+ytX)&U+-^{NehbAdTReqdD6hRkJFM8^7mqLg< zrh8Fcp2$=xEhnzcmy{uYj!Ngn+0+1{-2xH#=+bzbIim+kZc(@*nWFmGlg5{wreFI_#M8ts#Wv zg$RnzA!>zCJ3IGSE&z%ExNkRtGz9ICbKz@kxpN04i7Ed1zdWu{yEOB^VP8R>zg$O= zXxcN*)4~Y=QGnyJycTWY)(PKunXSNLam{G#a{_PVWr#4fq)3CwDQuyzh?vn_ibJr_ zZfdXq!R9GFg=}w@lBY;%S7iNoYIySD8qoO(fnoC+Cg7%-2cx`s7aYKl<)P8F1dRps zzJlvxla?d2-1lHa`1#%pf+hN4lr}g#Nn$VaKeF$lCOj+MDXFY`F-2O4($Uo##!-px zccLV{w+cDS)(Iq;MRyj>JMVv*XwsFe=)!l8VUYO=TlHI@Bwd`}QsC?)d8rF@SbNXA zoGzI4-0yuWVPSVCXKAjUge!NlZahYV_L%&i7eI11m}yaHCM)SB=i%!FimY{nDkwW` zD^sI*1M+LIuPxV&bmX#JqO&;CO(`K$S;AhRuEAqa74x^t_gMqrp`;A;_RL74iHOYd zq>~3as)yBP-;r(mSwD~~tCy}}YKuWTR}76;Q>8VS`|IvD()-8WICzKP8Nm=;Ox$ z+CsY(7V$niWnL`ZoBF#rqFa>kEce+t=m_fNt2tjR`}D5i>AKj+f{1f!r1`*A=D8ia z4sm$gx>6c2!HVV$1B=3gdupc|%?JfoRzqx{F!@C$QO_$^voAbG92>Ay0%deTG(nlM zZ(<8g&5VVJc$Wjd5&_YQeRQ|_p!<$XSULW3?rAz=HPjt%|P)ef? z4$G>ns?kM!T__w=5pj`a|H1OO_=972i?S5FC*FzCV z9P5#`j#Sh@r(*x-pvB7o-*hFOo}mPwX7}Was5XIOI%6Q0hiQ7wB`!YLnB;Y1m{jqI zl)H}By~T|2iM)=&$CV5L++Ze-x2dE_D9-cE$?%NXpFQUSr#@v~VMot%ayG{JJJ8eG z+6P1kM!uL(xSN`F$^pvzScs-oSc$So01&p&I{$L*Zskt205jQ5=dyGV4Hg1^oX#!X zdc|{k#vcV}A|qh;kukFsSWYulxK-?#4LXCX!;zn?#2W-yC6?YkCAX>&kR2BSXV1na z>Qt;z;B>BP-W?{~)p`a;Y63D* zeQF;#Va@_@OuI;oNM!Bt1d1PfBrL85+&8ez;#IVio;r`hJO%E8%vLf1yOVax{r_VZ4!+LWHkf;i3D8F8 zkbuh#zd~#^7De7H?d=K&9QaxL>2`faaJ^!HmpGKD$umI+A-U6*ClzB9*Y{WLJV}AG zo5?vJU|OuM&0eGU;l^iqW4|pEBhPpC*`0aJv)|d5!W$n?Ai-CPuwsv}#Aw*pMttFp zY-DQ?tP$Nmv($w9$Z)MdM+X$bmb=ZphK2^8t5-f8Jxt9$Q+TnCD2;QO0aVa=&)FG* z<>3X<#ysH%>0gOk)%X0Wr18s!qg0OIykA?3nbW8a(N2)1!lRE7 zj=v1wexCd7hi>w}i)0rCThvYV)q+hK!*C{ayRhQ+3E3~q13x!0SW^~sDxUGz-miWS zj`dQQQH1&7ogHrkk1gLPTv<7TNRtVws@ex1hiiOTX_Yx^%H$My(z+ffr@c zw|bsejv>nDiJWCrgHg$C3J?yTP$TcM=B#UaSGf={BfI4I-L~+mEv%z#%~xPI{OZ!< zbN&s%3>U*A>B{L-2fokva(`}=qMDiIzz86}e}AeAs+8Q{to1ZhH3O#QtTGVP zo1B5b!=5z>;Q+=LT-+VYN?q7f%wl(6X08*nH>TnGiOS1=kE9eM&m*XC$`>be?n=V% zqjLQyqzKp5;f#wsAB2q7#8qC#GV?{8u$t2IMQj+bSHBP`yn;X&477SZ)0R|+@LFu{ zU2{L0;k7E_LZ~*Jys*WhVy@0dOP;W+EkXXrG1m{vIih1MLB3eVq-M}U#MS`mePZY}<-9qD$Q#ZcI(iEKtplfXi|F@m^3nWcF| zKeO<+wB+Lw%1S6@5#aRRQj@3TK~~2M?zPMcsiB0R+8f|y@{Ykp21be4L2ScaKsCC$ z>iJLjNLOQO37svIheTUo9NTVi6`ninFCBu|mz86x0J+oxj4vXx z6MMNM+eRJc3PcJWUueNihOwjX#_kO#rq~_W_2$Go?1>RHj}E?G4X|(sgvWE3A!?l2 zZ7$ZE3i~7&eiyGZN^xB1P9+ZJj;a+MUUdAaB!-i9-C{9Vop4&`xS_fSTIdAmyq_?)4h|TUh!VqYx`|Xy4NBL1WDU{2J6nQZ z!LoC%rrVJ3Pna3H%VdzrSghAyG~1H!V@| zLo)2nEMV7L<#sgkJ8(L>%JZ8{Z?=4fSP?m7NRVtBl%#n7zRQXxO8G<qYfVGxy=lcnt!Ov0Z|rZ_pbz#{ljSv|JNMWgWetbFppDZ z?i!^j6I+rWs7W_EEedT3_RrN0@;;}*i-Tla>+7Q zc?|v-RIDmZs%M1S!nK5nrz`4Oesc)n{gkq|b$!fr9cAk9fhh;qwXZaQzDkJOh(u?u zq`&A(Gu6EOE}>2}VQu(#5-u{+ja_`;MBal2FgaAe>#ddeqGMtmyPA_^g!T?EM3sOE zgSDU}#0x~WXe2YM;@bP9?ZxW?_8O7X==kj?AJaR7Y3VAzI3f1&SGvLCmTO9g+{wcG zW3Qr_aaW6Wm$E+`-u%BWIhzeLar&8i<{7Y;qsy~4Y2DOK!sz`8TSC?X)_p7C&GG9I z99Q73-r^z#PftssE1^;LJ9wwd-;OoDoZgxpsRmIM9=!h~$4PgNANs)_;juz?yUSYs z(fnOu9}Nw9TRAxrCQ3#^Q|@5=d=*%C)OnL0;l-#?_p}dw1xHA#i%_yGb;^e;_5JnC z+FtvL7(_wVaupu)@1j^` zZ11@%=0giX)%c*EW1}U5*rt2y1lOlDzZTp^{Mm_iO+Zm0dj}_X^5o=4Q#vCh&N1!3%z+o>?o0BsQc?|BYkfjyGD4W2v1w@nXB5q&-E$p6mGmc?HW}*F7LrdHVN7i%`Dd8ng`IG z4?$9keBKCu34we08@y&e*ps+z{`b14b4Ta5Ph#8uDj3>pJ9&?4r>;+1z5F^Ixyc4x zFCICqe&`}NNfkam8yAEA;FNvgj)WPtV2lK9QJc`){IRukB}4M7Rn5Lk>sgAHC`+C9 z<3rFoLd{K|2S&RkIn>Z`{-!?3Rx`DW3NEP$Eab*t=$d9rtZ{Sa=P0K7xdmo1n8%Cl zi=^Ex-iuMO5#j#LgY!)E+$^Rv4F{d1c*1Q&WDMV|J@aa0k}UiU%3(J6w|v2A@u1at z-4jfgcaNdx*_Dxx`>6S|9pU;U>tMy>{(&86pBpf6bngR{gFHe~;29+oYqTE^@Y!CZ z!jY!~FM0^H{m7m!T_r^*%Qm+{kPYyR z`FZyFssHqV84>awKm=Wk!Yz%BlUMIkzB@{YymxpR`L~R8H_`*)Tk!F3ELaWW6%D5W zv8W&rM_q?MOZja-GRE;6pW}Zo`Q~efW&aLBj)4%OzlCjsmfCRXFF{g*N&!o8jY^d0 zOM6AQH?VJB`%#Z@^i4?IYf<{-W%FsZrdj!slM_j;RMDC2@XZL?*!2apA}|(x4X+P_ zZ&9ib9{ca!rz4W%D|fWCHiMPW;~LL*NRl%Z=T=&GYifL zwqe1DK5GH1n(u8fgV%T0Uwcyy|mO=}2ObDNllP!zvFrU|UaV|i|_`7j2-?Q0qToAIU zBo={oFTTNH1LevubOgQS0DK8stNUJKnVg2!w)qfQIV)L4AALtz<@W`y#63y7RKSE= zu*F09N`u8oiP-MIBEIjcWq~a0Ex<85i?%2XH$1jI#$DCfLh<;~MR77ct4687NMO~9 zJxX0c?7o3kXQUxds(0u6X~bG)TUbm^48VahUPk0xf*)>@5&JdaS1N+8_61KX&t+@h zPC6ev=iS-ibjSb}Vq3w!ab93}kn7I*)PtQrN9X?7p?vZVC!B_uIOmKj7u9^l{N?us zU06X`B)^>8dJ|F*@d^i+Yh|3nySP8Sj!h)Tgf@0g7?gWkl$x>{l~wh#DF3#7GyRFE z#|rW)76U^#k14fTN#H}&6Ntx0OE4_=w3>+l#R~{mkRf;&Uh8Mx9!Q zBEZOA*4xIko?mN+W5mx18h@C;!eKxMTlc?CW^wEj0^n}uKOYbWmxg{F20w6+|GVjJa3iwMv16*B7Wp>Q28C}1yu5m z7H`$#ne)VfTZKIjD%QoZTY;Ha7eU3i38w{fZWvarp+4Hm(z)CoN@;)sVv)EnZe6qjdIFhXm zCgPc{^m-Qw{bXO)BC{n$=m2&nrS{Ia(!GoRp7!?6k%U7ro>H}CLo-%WzEb~|=IJ5j!Z!^=%?2-z7OHA{YBHJKkAM8BHL+JBqPeFx zZ&GrDyzfhNzEQ3;m@?y z`LADZ{P#vi4m`c=*NWl0DQc$!P(WH_OM=&Quh&z^soUE6?enjmD06mHr~>Cg

    =M zLy$k%%fQC$4>{IgC$8+`Ea*yZEa0t@ptL5O%uLIBVEBK3)1C#A8)vEbReT8vlpA??2-AwIXAno8Ym-$edJF#N-Dl zEAfY-lOKPAu}5TY0ZAw6HJTApB_o(B8z%uip7jOK!Rq+A7LyOqY*8}^1i0a9fT2=` zUZhSVrq^hY-n7Xryyy)Fr?m$PFRQ9OjK{$Xsd?i6?lLYO!XZ&4N+Gv1a7WL*1ouXp z9wB(pLo$`gUO=*!Ab4#TVGrR>Sv<+!9I~@qO~~t99cgzt1hoi92F_RoYx`ML)2cjA zPv*}8IPFtJFLYsJB-uMw?92EhBDX^x?ybhsOdSN%>Fuy*-ue0SWN0Oj3i^hoR<@S? z6luk*fycuYuC-Oh_2TZ2&o;4cA{budB&Z_GP21u@X%*HBmTax2n%c!0q=kiBA>G5H z&EpF~R8~y?Mx8Lpu{(9s)pmS+_B}rZcKi z2|J!1-0LAnC&}OZ@=A{m{*dfMsRugl8=)tTI4%y4O3+67Nl4j43Nym3de;vwkrm2qbFxO=$QQ*a#H1OWdjJCm1Uy$f1b(WSD z4Nx8H-MX7X_R&oXoGA&yY9z=Q2cT8ITcz3VmBqtlwSz*lr&T67{^cGtVDHtJU4M1s z9haUjYtckXW*y~nCXt9D_C>6_=$Bl!Y!GQ4V!q@FH#rGVfaDNbU-)L`R>gA*H=s}- zNEBzSDCcCo9X_TBwwohKVY%%~AUi9t{jw#FsE23c`7T5UPz4rdcVyoo!b=r@f$!)+ zZ!P~oY)%M?+#1;$Kro38%6SOLL_WfkWpT@wSe1HjT*2ozUZ)bdVWgD|BXjHoBWvG; zSiVkw$$ZOwdjFAVl2HJviq;kOmG`Sybyo*!zFxn3VwRuhE0FT`_A7kkw1tJ-AQ+`w zi%B#A{rkL%vcB*A&#Y~w2=oUh9qUl6#elW3&s5X%jMQV0j&QecYz8%obsaDySEgmTSLo@0avlBqjo5gYOIr$}#WI<6F<3=7! zC0=soO2@76+0Yh5U{utXOW+1yXvKuWh$N({&RH@So{P^!r7azZn(%na5ljfDn*kOQ zFPFHI)73?PqT_TQcn_=Tj~qcVFN@MI)#jZzTAQxt=aN$Kb39C2_KvuFH%c*3;IH>{ z2yms4+qtCjlMisEvp07st0}0gR){dBGIfHr<$nZ1E$Vs=k*QY7^Gu2q(?~OztmbS} z*4#*N(2qqNH;+$wnJOazVzogwUpctzg&+HVY|hLneYLCL`>-+kkCBr<DNFeh3?zdWYEdnBS{3z@|KYABm<4b! zGc!{bRVt$oeZhnt8_}VN7FZ}(y&c-yf;#e_B^E^{<8wSGa^8V8W;9k8+5nb?d@P~) zzZHTtjeqcs<4&E!6KkCK#67d0RBtNIGv(w7gtdqz5AKG>6jfi>arl)!kDR9Ct3`lM z;bOb-I+}&N66dGDwXQlbi`n0vVWmWO5#QY~XIvA7;$3TnP0>uDc@+eq@=yg~(No!=H*kYzxzRR8-!uGO{<+9E%ium@h%ohiSq&up-{ zrZ$e%_qFnTpo1aRuus*0Q&1COA2q~k^1-fRcCm7F!S|l1YR^qa_2M=3V`CI!vnRtw zzU*^k1I&KKgSLU+R6-caNou-OscYJe?&qf3<(jPRB8>Su!Qyq++4?mpRAv+nD6X2~@=a`l= zYOD8{xH8&1$M0d6L1rK+kHNkZoX?Bdz=USzlN1s!6(-(ZKH)|1T9byq;aqMfxU(uKEn8Sb3nYNN zX+z@%?#l(fJGp7cpF{l7ouz@Pa*~R{Q#xq~Y89KxDosDy@veurag~t!3N;ndJO$27 zvy8QjpzydLjoWS2%xzHW(HmdbAqszPIM4o%sT zKr03-qt>T=%D#!y?q!Wb_GR|Wg4M|6{Iv^2PN_j9=z9M@97A zE%E{Vwg|WqzwPZGhpCL&1O{dR4rsVYk`b$IpwG5+zj<#7wv!k~mbClst%$~n zl+M;wZ2;f(?&4kQGzRq(U%Q%3c(3|O!mc)sB>9tow6?@7b%4*joGhXMo=rnsSK0YB zx!-Vd1g_Uq2E6yn!F2WG^wfvj^piJlC~-1ks2GMBVj8C}eCW4KNKGnL@09Sa#u4Mz z1Sn;Tc67}f8uwme8pn?-U>Me)<)Y6iysP`aO9H93d6mEPU`7AJVzi6i?{BXYqo~Cq z#7i~=l4G85jZlSQZ=<0uPpWV9(gi~I{w-c=F91Z154_6|{(*9izEYZXs#pTh#P4}v->*Xv?llDh8Wnc#EZm}%}cgg-4wyDNhnO7E3CFx*p(SWZOK={aV%0IdPX4H zY*S0}{d2(!q_xfymK5KayMGJR+8L2IX)?u4BNq!bNmevxejpoUXr<;}im+$6Xg_8f(@j4h_Y3GI3WWC&u?0iq%+twJbA^l@WnznamsG}4?letdD4 zPQ*}~!A;dLqOFF1W!VTh<@){`Yd2_3Y4EdU)GHBkXk*y0lIgv>>G0F(Bi=qfN zU=uqCeA4PEJo)QGvHK?{YE9B#*!kCI<(t}vS+`lXc!AFE2PqL4oTi8u!#SBMP#&88 z{5~vw(+`Sa-!rt#Fov?dYU!YSZpYfv{-Kno#7p>rp%3q!NtL{fuzrO0^@(uf0FO9P zT!I7Mcv}fPW-B_XN|3|wf--fp`IcqorqfkjGQIySn>}^TGDDQJD65i#s3;(}WfzLk z!)N`(bliOLhLj#(Oa#0i1w1FmlIl2wlOa``}}^#Ks9Z@4&F`Kf#E009E4JY z8#`Pg-+HPB0`de=lJbvRub9b(d49&`O0pNvX@{aOSjq&?4EydueD(t_&?D$}->Xto zC4P<4rQoEN*x6%^)3^6{c-ef1>0hB2T-r|b@TKXa>7UmU_ElPs;I)15$^ar|6b&PS zHd`c*GBq*a*JC}fPTHn_(D~%vV zwp7Mn>cf6xHExqqk4!4G4h_H))iuG~Y6iy=vPiIg)YS0!<~>E46V^x@Oz}uZX}X>1 zQjm3xf#YnLA?b^QY4>mM7CL*!_-_mzQ|>1WR376lGID17hR4trJ;TnoS}UtBOZ)C_ zqP*=mrZ}wXp6`6rj{q-rJ7!fdilZc`$8a-eu%_L{I$#A3QvoiO3}VeJ;lzY(?0$NH zsb}PVQ)2dzUe???8|dP4%cpuIW3UJ+tAdLcH2%VLI{!y9gRsHeLI>x~q)?ENSXnMI zoB?A_I{Fb>y@6^j;T~*N(DU!c@bBaorJO*O`6pRnGPzvsz0xvKf;W4D04i?+8w#O3 z+PRFxS@Py&_s5{);$9fG%j1627xN}$=T)$f19X;qy0>iw{bE7a=_}8>2s~qP`MztzG)pMqa?)7pK zNL(v!%jGcTw@}O<{2Y+j6X+qL8?6X}y#SizC>dDH=*Mxu@;cLzI&S+A--xLpw4?fv zq(rdmoWH`xfw?R2f;?ZwuSj98=U~V-=d`yKeU~7+I?|T4AC3hY-{V~49PiQhTye*4F(Ke=dzT;`dO(k(XC9XCm9?nSxawu@D5SsE)qzI+LKnrvD<&+(MoE=PiK)T^J+;7d`Z}*T(Ab97@$>=WMQfWBFbOEhSNY-F{{DbnyaRv zN7hf7ZS+R#`tXho)ZZ)yZ;_VSM;cJlhc4EI4dn$6Bo&JP$olS8tGA(>&P_y8kAU&~ z!T1fD6gYwSVag6f?6oUL?i+yjeM11E;eVKBf%RPIHE)cNb2NElc9I%k7juL>uXt|{ z-D<>q-fol_b3ULh zp4cEQE_ zwFbb<@TJT#gFan~)H}1tY{5v^KuKdY-JD)%TTg2IFgWoE$lwqBWq=x6Sog0eZWUnJ}f@=Y2}lrMHAxp5$9 z)n5ZwLkfr+Zs$#Yhu8lP|k5Jyp7xH zJ5MRKgO+wuA26oDWBK#@&8ElLk0b;&id~Hl{?CFU zyVfk;wsZ%!t3i%M!k+Pspfh#Rj3K(*&tZ(V_UX<(ei2#kNV7kvG|XSs(3O}ZwF4!` zh!IJZ;ba2b*8g}V+sxYP?$h{xj{0OOphAAsAy zQ5ZC_ClRqC{_+m8RY4VzK0juV4&`;9T}?rj;96%3l{+Xn`NF?gHePJihjr4e6jXO( zwv~F3(9YFzm+7tKD5w=&;)&8y&~7yE`b_G3uAh2RSc~Ix3Bne8eWqEe$M3w|=EaUSPCqX;6TI zeRx;Ik1iW{?Q<}*ztV5hO0UI-@Z}Wm7B@-y0jj6>w^=%apcRezw|qh>w~7;7;s9+H zA-Er#D{3CpsG;g@JPL#Jq+vs6_X85hjNzJ#?pV2?7Ne{FR8%R6 zj)2Ysa?`OtEbZhNR}^r1^w|W{3COJo$9e*OS0k+^7HXY;<7GOdX00fx;50n^cw97X zi?HV=Ii;~G;A9UOkKRf{lhhk2_Aezr1~oHBhcddTFj+vwC7mSiGwzg(x}CjXLQ%Ab zNMZIiXdR}=b^KHK*Wq^E49wdoeAsJ3#^`f>LrGfU8ncmj!v+6~meZ3FL3;u;!FJMe zXSnEiol+foTEFN!(G0zo-%IkZ?Afd*+|@P-;vGZoXvrJIlrO_FDZe(`-f++y6D91l zr8Sl0)AmX{msEV*en$Du?Iv~TFA ze@xuaCsOP|VcV?*?9BX6eTbO)`QOF`5fMz*XJZA*w0tyuN6Tp^sl5Yc7F}EHw!_*P za2FekyG!NJ{Jz9Q1<0k}$BuP<;1n#lms2X&QCS~}tR)}xmN`FVJpN8g6A`oTxi2LK zpF$R*)G8zAo+F^+e2id&IJ-+4X@OyDFrb|t?Nu|+9)QJr7al@PlbNxA{5%aF&`)6; z3n4&ezs6>*-f&`F3rRYoBWnO&e3hR~Ib|5qzAuSLSgH!oIVZ7ZI|1j$7Q$V@B#SiQ zL&EQAY!p`8qaqZCp0m$$n*L8$bLTkbG0?hmK5c$#+L1c>f$fv8T6B`L583x1Qhj;b zAm(Sw0A>OH=J1e`0cF`Rw1+6=a_9Xr&|{0DMsG_*YonFG1xzEvxUs7D1s+Dc- z%=8}+>JJ%HqC=gYC*3+?BZ@**5izBl=RHpM*@YRJa;Z{)w!O=^VhXHD{MWL7brChZ zhaVyhQAa2(_14;upUZZb`vSIhH6V+^!<7*NFpY10j5(FrLl@^-|42iyhbSzh+=bs& z(u^v((DI4M!d1+ig)#%_6OW0d@H-aT=L^hS-;EUDkil6-JO6`Ym=%~KP3&5vfu~Eg zwU=_mrW1iB5(kHbz=d=2tBz0TIFrObQZ16AN&cxXlZ<0bF+9uxDP+n zWh_w;Y9TNC)1d&M>Mxg#Ni)ykSaLWw=nJ zYWtMM6LRdIJy#}bHHj~@$XjD9=ZN44Iy~nyr?FAe4U!yByW{T!j_BreEMh)6($m^m642qCpnDNaeHA<(EBn@P{|E+N#94c411h zn^xgn=s#fGtxgvWA+aJNvJ7lkVqR63k!_n*=nlOnfwff9Fp%pgR^n#RDOI%G*(gKs z>-zE8JJW>533f)-3x8degFOCpo)+tZq=wM7Ssn^-xmX-Azaxl5`-kcqS$hFbZDBYn zt;+1N<&q8S=JG5h>6kvGRj!Js+Eaazx{I9e!1S*ju1XdolGM!xfFX(ldlaQ`Hu~^N zM0WeJ`)HLXizUaM)Mi*Vmi@>lX|~6dy8%&zYd;8Z3i7X zbh}ldfiO=MH+~10@?k>lKaa-q$=OBb%UOit1L!!qYE7xN&;>#exc}yArrMtQ+jI zu11=!`*bUbJ}&+Ka`iLMOXg4QK#5#sD9KuVIBe$*??bTORn6A7gwMa5Fj#(ay59(y zrGwE_UUoRlZoXpZejUQNsev_MY%}%O{m5Jx$kR@P387^){~MM{p~Z89*t|p`ZR8Q? z_mzy#DVvsuQ~+{>_;OYu0HdQhr@|mC>=}zjfrw%Tshll!>%&J~G94-5vXT&$dq>Nj zuUODZt=G4mgJ$(RI?DA68>05Ax*jFersUsEM$SJ>9Tz;5i#39pNMAT_4DM5Iv>`lk zJawC7eB*c@#D(PuI}l(`PM@}0v;>%=ej6es_`bdQ;?I^fPm2EIZ3Apd@_*wLq4)-M zNxooJv+A9bNm2YR`@`%%u04i-wu@r*Gi@(A0Mmqp;o)kaR0n9jnsiB3*b%A=4n z*Woca{jHGbx3p-poYto-A$_-KNpC;zdCv)7v$?Q6IpBnl$KJAsa{%Kq$tP8D>P?S` z6RpjE8JMC73M#G06De492Kvm6)?XZt@Y}U>v9KmM@-}b(7`#_K8bOk~o$ldKw|9u2 zQn5g(a3LlNE+0WmofOmaiR&V1x3EZ@Iu0Y|GUfB%2#ZH(`&HBX(pu4a4rW0cQpkh7 z{~YA0zSE(tu6^Y`lK71KmfnOcqDGOaX*cH$irz5jRm_+1irGzRzC8tXOPgMYqHMQ; zZH^%D?jB22N?3Xqnc1`LQDLYOU7rBxju-ob3TF)TPLUSdb;7?L5RYyc%qvG0k94rt z5y&Of8@H`jVlz-WC7Kh;VY{4s5R`yQ8WEBu8+LmJnMxujQe``t%AZ+2GAc`&zy@90 zvHKZp%W_n6G@#-xXhI%TfKK@aVGv%%)-HF(_zf=MudS@5N>`*T``_=MV`IxMzYaCy z64z6bKFWrfK@GnGXJD7d5~xGcKy6&aTMM(L0?q>qpwf%@H~SJ({8b}?MWBq%m9l*q z6x~f}5jG|qzL#fC&y%g5maUkr?7S#d`8Of#?IdP%NYR6yPC zKI4JHs|`yDoi3CekEH!o!M^Ix_tB!|^g#TCRb0BNZn;v!Fw|FY9vflqojHZ?&++%; ziEn%Jcn46gc(8_ zu26|FmWeFF#YxkB4|o>#Elohey72S04WX=IpnPYg8mpxFsg9<>-SpwC21UMgNZ+Wi zky-);w!k_N>PQ0g1|jN?vXtlgTCF|uG&dX5&8LJnYnn3d}BsY{JrA^t?U=Ab>Fq`IX)l3S2KUZ`)uZH zoA!`ra4ly?`-B%E3xZ!d3kpMSzykHR^BNsGZn&_eG)lxM5kVQi%qW?K0>#N=W3cY^ z#=)o($Y?L;y+|dyD93Tf4=+Qw#J`}VUat21Y=(4}?U$wV+kwOPvhB(o)`jqm@xblu z0Aoz`s_v4R(x3^Pdofkk?hdpTe68^Zs?He`_bC~*pG*_R;W?sM#TIWE!pYGR*6%tV zKLH}USdptq{?eM-2Q6eFWw$2@rx+>(&xFCO2@Dt5S(nnR&4%4C`Kko`nipZ1B#!<6 z*Gi%!Uw_K<^z`ZCzjSo?=6ZUYap7+yYOHYn8gc|BM&6S$)}SY#kQZG25%2{jeR^V% z#1n&DAlRpeN`=rR78`l++G>P3@&u~fB!$BCQ#-rd_C<`)`}^?eJ2n9jY*j{g8~Mzi z2dy?!S5NA4IJ@Gb-EnyOUz49^-|lXa`N|QunD9$`GgjxljIZ|+Ki>O>75i#@mMLcs;ZfF!u08PU zrl0^0@Ukwt-S<%zh-D7hlKS$_x>LeMeYzJoJGotyR(I3!IuN!(d=>8x5Mf^Qp4XEr zY63@9bG%vYDx)DfwW+&6 z1hB1S^$DG98i1#pkKGo0JqO)jQ=TO&fY%o)xH)Jti zWV-TcbNGdT zx@Pcj*n4`6U_u1ZxiqX+)TTxGu9;Je{cINa%KfiW0cJns>Cs^gNLIi8p+0IR$u?O_ zV3r3b%{)*^E&L?B9$;{YGbU?W1uz;&{7QA%G0>UqH!mQ?#S+wzJ>u7X&j53h%w#&i znX!Cs4)tvhx4tHP^hx;l9m`Bf!q(TJ=Rtwor(fV}im_Jg83<{$A}mN0U^4^f)8P48 zgGjPW+LK7-m{UM9Hi$TD*3~WjZol*IT4g&xo8R`oR~E3R_ORdPCm!p?dw4qB*Abc- zHbTRV<-``Z?e1@*rR*snII4C~Ev4_iI=Wp|J5cIuGniOmXN2x$kc51zzXnRsF zp@kn#Mo#FvA^@z#(oXA1HO-V|a*DSN zcMlFh6C756KyY_=2=4CgPH+kC?(RW?ySux~`PqA)d(Rv2um+=7cURS{>Tja|K_3vv zlGec;mvLR?&UEn06}>4T%kezc773<2 zCErc71#`_lnRash!tj26N{iCFt}dp9uE5X@2WNz6z(9-eW%>huFtYT#L<#GOgYB!P zEXv<#PqY3zsC9bp&*2;U&eLIOZ4QvEA^WOP&DOekFYV-Kq^nX9Y4rR`NEs7of-Xw) zJ_$1n?Hc-z)_6pubP2vd9564PDUI&Ab#L?elwpirU|>0(MWCv1;vc#yx)O&^2(QWU z7s{(zZ8!4d6>Mw}YPWS}m3x`^liuo$lO4*KsESWAC`wJ9zj9~`(m#>i=k6hO63k1Z z*vG2lt$Kyj{YcEbFfsi|E6B_BzFt;9pvE=fZ>eBwc?nPD1$G_yrOeYTRG(@JrOI>u z+=In3W~bZELg}8@&4oQQlDst~L5a>6KgcazTZrF_m_n}>S4pMH5Pw>L0lGr>fhr60 z#C#4^-G3m=$)lfR6LYb%@WOb1e#ndf^@seXwHhjCl7Uxdin{+f>c0o!{7kgSjIW#- zs{;Cx-ZE2e^tD733z=wRx901gYDq$M65TGpczKV->|HRI>e~r=Zv9b@mdLiIT^cks z!D)|M5D=A=RvtWz3~8EBu)n~U(RNx|5%oEs;Hmz6E}9mC_AQ&XaMhc~`^F$1KlEit z##_Jg*|#af{j6Cp?aY&RD}602zJMeGN8)MmrxO0%^#N(CYz~aunqB_f%g@yk zUWq)iT10nX`H6c3;FFK?e$HXZb=GUBmexTahidX=Axk0)z=NFYGoBFmuwh+#>%QQ3 z*0a&Shk8k7O#K1#OH7#hv4~U`=idWL8jcuWws-5eQ-9)WG~qgJz~~BNwkpg}jZ=S0 zU8)8*h6W&QUbnjwH+4z1zhc@R`(6Jqhc;H3@$?l5V+VW*n`3G&E*~Fl=4-JyvV$lD zlRees>Fl&1YJ;$;f6l$`CH7$A7x-)09!7(*7yFZqURL^A6^!CM7c|L3g2M_Y@v2F%nO2Zw`m6s+~mc9V^b8P8vhxs-ymxI9{%v?tXNo^IuPT)m%2E7<%tCZoX69-@La%SDS2$!KjL&1HBxFPKVH zid?S^qS}jO(b4eDh%gxwPK2@ZqVEDKyeMR(`8L;}TDI>xMd|7I9`r8Dl3gkF(n*Te ze5mk%HG4_$CRYZlkNPw)v*3;EUj8C!bBB3%APv_<=)p5b~2)d3=XS!VoK)4BK z+OP}8UQFTS3*A#HeKN#X@uBn(G9sVWA*5CG#PWKatIEh<^C&K->42-lquEuT=tR_( z!v7+$lDph{&v#fnUwY4R*EQzUv@xJ6IqPMK`HmE#z+6O;xL&CwT}hpNgx~Uf{Jj3| z^#Fh|2&KR7CRD{o{rGcOZtZE&bgXrrrfiGn!R$IL*(2k16`$Eqw`KjdXWavU*^I%X zr-OpN_>`FNU#D&YfLN!8588KEecddy10H`z9&YUi26poUzV$HZ{W55?daUjIAk7#L z0;a=gC;NYfcFBu=v|~nyl;&)Caj7RlFGH2_lr4A!1U1lN^74RZrBBu}U78tJe~gAq z95i^0Tl5P>bt=|PQ|f74ru$v@qAv+1gkSQwL`5Cjo#>9?Y7Dx#tUsi<#LIA^I=#fU{WbK=YXDdXGc!nZtek@T8nLKL8gL5-1l zB`{_FmpD@0oR6#=FS$hTtnF)+P4rpOvp6GXC#ViGUc8vEc%$=DralYnjr#q-FcMrL z-CB!J>`7lUsUrbWwJM}#Hr?1PIq{^0d_%%nXOo!x(Q7iG*JD^ zhyX36o!(IjSobt?wx!!VIK@T6SHRxmuf4q@1<+fTBTC&;3GG5d2XeR)H?c&=zD$OB z3@gv?6*5=YFkWaCX7_ZvG-)K^-OPa_{>|Wo6-g(bHK4SMdiu*(Z#e%MR}^dQmg|(Q zBe|2vhP=icMK}$9^z4l-ecG1E-t=Aqmh>K0i7*VmR#y4#rFNdJ$Jk-hsO$&2@z8eO zm2Oej-xmx|IOxrBzYl%8Q|TgL#k>uB1Fu_Rg>Ik#&wy~*b=Kb8ayseD)hmy|{=Y1M z_db-xJip6UPYW(@yQOEP+tIzsL)$buU7APzZVrhJpc;GTCXkuS9G*DsiRC{@%Uv~U zvNq?+QKDk}0VNNH2qRc&3}*3kC5cy;Hc&wiUFq^PjFZqQLwsPEW?oxo@A;pAma<v)h893;uyJ`+U84p0ey+@|mI2JgM7y3CepV*%fe`@eb}2XEYh508&c z0NR~;>~bJNg0Fp(i}Q805|ACd{^6}Q08}AwO8_SKzJN6hysruEI)G53z|7rs?#q(B z4aH`sVZJE@S&RH?QEKaqLSEgeGMxHrbAqp_+0^nPV>jysT4Lggfj2wIKf3_UWgD}^V5OR zZ+fgod;d$^y10`ySLno|{n8-Ravk;*s!~6gaA-zkJ*|89*?L!p31`2uJ|yixMLM|L z0sWgGEg)o&R_H2Vx3nh}k|z18B%N~JIP;fB3kYC68_RYkiMnOZo4olMdTM6NZ^>YpvW-I>*ip#qT8Ea; zbw)Td#+1Sr^~4ISusLoMtOG7Hnn7;>@^vn_8omeuGD?}qrVD)Y10H#u=hIqx=KcQ6 zvk|zexS%vkeG6Gq(eZS2(T(cGLg+XnxA_4$*Kv94C3$0cxk~Qb$>LL#G|jl69inpkgNog*~YmkUe@1VNxYewcj9cy zEwt!YcBr}FQQao}g;$p$)&aWzHIeoQAG!DK`JBY-X*#Rsm4Fs9irK^{(7e3-e#q!AJhmzJ{Q9C0*l=FfkO`Z0Ls*B zHKYLO_KEFvsR$1Jw?TooSmx$I+YT`RQN#-?19; zQM*d0UZ}l+rGvvoj5z+(o^$iTQEGa-t(@?1+%~HTj|K83)?8JG1h|u3xCm-lEESa( z(&RojZ>a-)@C5s$ipsA@ZOFM*nvW0qwL zM25e%ReE+aqKM1~t$jkjLOn{DXDfJJ+p9Knz6{iAzDk^`rCtYd%l>xATH-)SS8E@K zL{*V4ybd$O_ifW8`5R02TSe;0s>9}CMj!)t!vG&=_C?)Z#qxH5$A{VSxQ~ zuWucDCWe3HTkl=u-$Shjk}k`zwCW&UB>tlo%Q|!=Ys}$|jEDM}{xFpPj!k zoh;Rdm%i=lyixH2jI)Nl4p)KfBftW{gpaFrajXZR1l?Wi&%vkw$a)4CT1YFNyYxDnl3N0o@U995<|I5*na?ZxK>!nb zv$!bP){HO8EUkR(Hy7Ij^dzh7huZp{)=vfcyNCl)gkr* zNPg9D9=*K6d>CE5-p`HR8dHs`06|Yg>kUvCPW~sh((wx{+3(7J-W5w zKX{awKUcj_XDuD?s}Kn=lLFAa5sl``_WpAf$97C`egI?f|5vWiF#G;Hm^{?UeZ64h zr6Xov3}F(!ZyQ1!A|N`_3OF17Po=BPTH0=*c31PX_{v2It+EYm1Was7y&fI?PM&J5 z{1T|dM>lvmlhpAtz*eNwdPwfD#_@d+mlm~keq7^;0c1fYBgAlnb0e`H8aTRCXf}xD zq%)>z>zY!4YS-4zCUwW=$1Bx-t4YCd<5>zO_0kGDz4266B#kJm)_I)xZsl3W+&Q|( zeDoulJ-nkX&!SG#r)1A}5GCpTW#avY>&|MiCUBiRq)o~kQc+I~3oHHr6$--3~t4+9JpQokfw4RWLa}h$ob^jBa z@!aQG-^}1C#_+*k@PuSR8pN}9=_R;|6&nKMeFnh$V=cDK7!GP*CZW4vov`@;@G>fp zYn=9?ixGC~E&~^fEsTEGd**#xFgQm1cND?1f6-p-uRs5?3f@-*^D%5_vw-n0nB4?% zwUO!G&j5Fm^jd*o4UFPxc?$SK?^&b$1RoawZo7w{0NC0Okue8@#f6#pAMP3~KDQr? zKIVU1ov|8!-|np6lbm_T)*73~tXx(mz8#lcjHq;cc{!BvMrf)cF$ji=foFyj>?wEw z(+20)Z~RRKi6gW<7T0t_a*C^=xfSiO=DKhDlU4b{Jpiw7Cy44n;s1Fw{J+en^5!$c zFk~j5PsI^$2K*D~WK(uYEzK+{joE`DhCCOUy_f(+{NKNBKT_8V&aS@IKbI0>u~{?2 z=uR?(MvW2c%f;AZqTxPqp@g*;S$i(x*FH{}DsmeA+61rE)?1epqIK|KlpusK?b{f?#g|x`7!O6uZO3> zml8~;w7RpaPROD2%a=B4JW5>xzg0Mq_&ZlsZw$`N-FQfxr2pCS`zYoRET^}Bnp1>2 z@?n6|rSek)+5my6^b|H6?z>n}x?0#kiVD*~)5bDZ*ya_zbuShyu-QBRSE2N21Qj;) z3McVxZdS$HX*CLKBP(&*##&r7ygJ|2NAN+)UA_6k zwM(S(cqs@**d&9fOCXP;xVeDm#Gr>W0ql#f{5^vaPq3u$P9orn5D&f?!bwOD-4(?j zJ{DLk!!Brp%$|pm9viIMSi8xT3kAXz)op*>+y{j z@4^Qb0#>}p{;Q2IKIKcGc6e*x`qDp2+9$0XDWP?4>KfzhL_!9tnxDoFYnjv6^^H4k zW&-j&oLz();IBWQ3tq5n`+S*9&d(OdctBu=@C36exEc$ohjgC{HfA_>89g!nUNu@l zDMQD6UvGBUpJnJ`P(R77Xf@yo?CDTVz_fN0OB9vp^y0I%(8%)8!nAl|Gvmlz1uvgr ze$tA0B1R1;9gfz%Q_=xW&Jh|xh{Roy4l|A1C4W+R;N>SnRV2;nxp;oF$4#mx@-PIK{8>hrf@~n@5vJ zP&|!H$*}2xZ{va21qhLjr4rte+<-X}1k?V6bDY{=8%0c>>LZM^v>w~>52qVGA9-Mh ziZP;F>?}Oia{=V`JJFf&F$~}DQC&sgN;P>v-@ATjRg3IsE54c+#)O@CXt!CDB>0k) zVPb4RCr806iJ)r&b?#5}2DWDmF!{M31EoMRiX{joFq|VW7BCLymgx-KqHgI_c7Vv~ zBnAFSt<%eMX=nH51M}ZAo@GD&wGdX;R*w!$-0kf;i^N9rG}785j|=bM3P6Ffyz~mZ z_|NY{YeGe9ndtx~Fb{Fgb=&+5D^h`yUDp}P#k@Y)E0EAtV^LKF0RCa{1h5x_YZ52n z$*|$ArriSqL~EB#9V%%aRrumZX8j>k^_S3pJyYnt{N-79p>nZo&rqt?DOi!qxrUMiHHMK+!RRaLWI*kS_N&+11aY&4R zOYGptiHpO`6jE`s+;tsD8_ktA;;hd!JM#+>4|dpP zBk&}h#GO*RmcEyEKGE~vnb!F-y*gq0;_4yV>>2+d2l9vT? zHT`x{)!PGzRmV0H?rZV;!d{@68)ju~06r3C_^&n_&I9nl+z!9metX`Cn>nhBMQB3@c{0i4gHL%~E&KFKQ^flZ@$UJ>pK-#& zR=nLmq( zwi1~W56BeZ1?iM?ffLT9b2BNOk>C;j(ZL2gufUm61geo!m43}HSu@pti5M1GD*ujo zT|-{{PCXn9HZ?po1atc7dn$;QMedDCgsdLFX9{?U45H8~%#BBhPe07?>*>EHu~hr= zCqzpPvHE4K$M$#MsF?)IX_OW4G4Epd{(;NSRw62bZcZrtF(E%U@vj~NtO87RQ=6e} zwN@mH{al{!{c6L#yi?c9VZuvg<_C2sva3v*iD#YpT%Ivo*8cw>6Jn>0=R-211Un2~ zh{HJB<=$1O8(?D144!wjS;&B4PFrlGD?#?r5JmJ(p0=Yznh%|3%PW9M{&Od;TLJ5g zwYhZ*obd|c6WrdwgQlTX3@~jN*W#X$g;hv*Aew)eo%LJ8)IISI{$e;8kyuX%;ey)I zE)_xLV_(^T;j)Qcp~jaD4&MQ9AjOld=h8Q39h9a65aP7A1diBjC#DeMro;L{6zO0* z$5X<-bkm`u)3!g}XbaPOc@3?K1s{DP zX&kw=3Ry$xlETm=I(dBSh23D8z9DG~F}%@~bW?}vZq<2RJ@7#Vp$!IG;NUPxr)?NQ zpvc9OVQr{-lD$Q6R@lA4Z};_wQkH{|{gtry(qbD+N>-L>U~AN# z3Pmq733*Z=C}=D*1A0V2W>eG?gl;O+x`I*njheIjXf3-z)7rKLl!a#j^Bk;gQ@`}C zoGK@s6k-MfUDI|fb~I@ar0hoe5E~S;p}ncP0Qe67f@%d-XLDT)cS=^7g^yMi&ab9# zk;No`r0u|rF`>k*sC9u(TG1SdX^*Ep!-D0%hV9n%^HB|aNhoD~DEUeA8J}`EZTOUa zLF{&x90=1*#_THrT!c=KZRp7>lA5v(=LFTTh1ldzFI?7&`qf-MC0eacm;LJx!G|9@ z17A*6Yi^m|WGvUV1|1MiA;8)7PN4~4l2WurFQZQve)uOqD#^G_#Xp2l%<(oh^)vp= zSNfGb`r*OgU)_?IEPUyk#P+E!BIpFizr$Svv7L2A9bh)KohPG)6Wk?T{5V2%DXG?wUMFBP_F_FO-K`Enag9z4;{nJ ziIZcvmyou>b+2FrH*0*BGYjPVjj{Td^4 zzV3$7qGNr`XY9p9LSJedL{Ew3ql1D2XRM|#q>|l?&lUiIYd-U7IZKEaJAD~QlNc$M~g)4yWW;NEZBjQdBbk|6T^rl z3++ym>7vhlzw*AmmOQW|pKyA&WRf-ZRr3K9fICS_V-6P<8pll|ZJNs}8i`L8XM+jL z-pvg{HkY*(j=Y8=<3a%-{M@e>gS!|8FTS~Qp>iU;u$7Qx+5!GUE(El%@C zuBY0oGKY(^O1ILtis$`jChbbE-hAE4*!~@hs0OTZx7E>}3?ibR#>4%}slWfgv9#*N zZmjWRAdXROT=#MZHo@!PtV5{u%aey}SU&MMo)HHHPpuHTg_E#Fz$!CC%lq|q@uSiJ z-0<90>Hbc6^;^z@5@GV7$ZASr$hZ~BME0L~s zec6TthVuUQk~wf&qCL0P>sE3v95My$EQFNw;3>IeCUlI%SUL3S0b+qm}UC%rs&n&TE;7wL%b#N`fuV(5J|1A*tB@AxL@w>XGqi z&4Nwk)?1&@t!=lHU|T)fJ>ywm4nk;2PRyw;7iGx>r~h`eK!-m^iPLvd;Ma1vyR9w9 zEcKC)62RYZVzE^FmX55X%Ih4^IcoqltLwPU9n|2gs9wDs#X5VibmhRd z3fMkB*Ig$18;fUqCt(5X12@~byS&)shiS56=kZaQbuCrD@$Rkj=mY+%R|K7Ym(;dP zn(6o!O&yW@KJAb^6zV-HHHC%o#&hn)sd<$-#cr$cAY(0|+q=?=UwXcDARjme5mM^9 zsBbpr#V!nm!o^-h^Z1~|7-i>gS0m}CwWmYn&*$UAd4mwyZlep_m4~1s0R=G=ItD8MDZ7e&SR5~|=xMgn zi%R3*BHey75XTtE(XKsG9_(JHB$*l8l$fbYSePx}A@Kr#Qp9L&swpjKT?veBu5qn8 zDBPt^cu@EH9;qid2oZoV#?zOUmZtO;$NU=CHW!Zp6QKL33@#T$Qn+MHX>Or4YFul+ zzNieqJJ5bH)g&|Z!$U3;bS$Ch*pIZYnBlzUiq|mRzD;zFwlyfTq)FEx@}LK+fj%);>kh_su$3jMLAq#>dWqY-5MrtLu)f^U2&@sAuV_7MIRQL2L)-W< zJK2q(J9!t}V1EO**!d35;f#Vz;@55`weDtF!2YZtUwLa8aRW@Ps&_NkFty^&H&D!+ z+QA3BsynzW=}RtxK?o-7+efN4Mhy5~ls3)0Pqa0|Smf+$wgW!K=MEt+3n6rbe=6+h ze|ktqUida&BpW@@(13+5@q`5PK9Bd{441y4vrcPq>uA_C8qkr}l=xnsM`Kd%faX^Z4A zE5yhL&wwhF=F5mzY}$Cs<>J9~HW}Scw&F2;t&R)hG$DuTU?Sz4uAX&G@(9;qvV1DW04@SS#Wljvv#aD`max&;*h$d>y?aHpI|tB_Y1LG~y6X zHG-zZ5>Kr`%Kg$#7E1Tfi_PxwHQLYKffa`^J&J44m$E1M=wXX!!i`l9nkZc@z;)ea zJMyY6P-Ob@1y&elFlVC~Oihj3f{sC=CEfe&(e4g?;NtIXOfWBHFV6b~s+OVtCT~ei zF6<1&FWj)MnwM!UI7E}$r84xV6;i3jfK39Q4-IWC?<`mhmLJI$3?KKs z#&6~a%a)4>kwj5Ar>b35hY@riB7eS3UMC=*#<%xO4l?8I1^8Ki>M|aD>mKQNe?7-Z zBK+y4S<$?Q|7ZhxqChy=NQPRM-dINRaM{$osset9F@7qCxnmZAwcZfvhNa^Fq|m2f zO5Zl%bsbaG@^n-xIZ@;nHGp%pjc<9wmi744yX)JXQ6ayF!D`LjLc`l){A}ll>n2%N6u1Oww zEwe02eOF=?ehj($`*z&)U(w;-274_H6#tQYWxAYK>`?N!JeR?hxm^0~j3fWpybJn$ zIiAjwrM7)aM!U5{ZKvqV@E}+KELD*j5!B3MfF$MYwAL`ih5S#an>b zZxsZBVQi8Sq}DsLg=e+6o)cJj9^mRAqfF60UP-SkxnRA1dP^Jj58ouKQKUVY3&4BuUrn5V8rI8B*ar2GVWP3 zsyh1U8&F2FuvbMC^(?b~_-s5@0Rcr3RMkZ4TZKb-@?O5j(f{GxgIIY6O8dMv1Z#&3 z!qyf;Ao4)-5$|Qjw<&s-3L01rD3Z@;8t6XJovha#8(Blj-B!B&Z=Q$G`=()(rD-*x zxpXElh2YPha&Agb9Fq*|CZ4Sz=@Qvdq%|MSh4VyPjk7$@xgy~a>rJHcY};zC3u2Qi5N+8&7Mv9OruG%nZHC)7*v&Xh&k9TV)Zr1e~8zD9GMZxBj5 zv#LH%+oJ6h#YE{n%i#XB(;pj;)1G!^o`2~EeW~<>sNZdrb^Rs0DYT6CtMy2Xf(Gg& zo>WK2{Uq{Rqy}Xrb>~VtDLO6{gu!T$xr8EZ(I^~xVzI`yq@AIfFC4ecMpsnt?D3LX z0in}2sVg{-@K*1}@c?)Y%0vQb@dZ*+je=;4E)QYm`^P*`kE^nyhyMn|zd#5KSdB$x zxu-6qlx&XSGdj?eAoA^#}Kjjc*VK4C{GLqrV0MEgwY2gq=Zfg*P0!OfeHIK^IRw*`I@ioTuz@azExX;C?* zdn~f7)JEqXh++9DXOK(=Td|HX%J)ED-Y}?6)V7L^OwFjqa`%2p##*esl89d8;0w2eWOrm>JIToSo%_- zReQquAh49eJ;x)STklV3n<)BIe8=a^9gm1~CRrlB`t7l2M4TVFk-xYq{aQEPs$i~e z8#hxLh`%XQUI2qU~d_x83tqn$Q|E(=ptW7osM$nF>jZ8Gi zJ~q$Q7)_$7ex|I1f_Wo_0O<-s{Sj8A1$km9o5wq%`+mtS`P@CHiB2lV(UWKmthh^$ zo~?^P?}u~dRH`rfcXbj~9W(|p63@CJ-#XWzVF%$fk~Kk}az`U*cb{q%>_z1T6GCjN z5*t_kf07r$yVeq~up(g?oUQ&lp*{lQiozBbG_e!i^~(|YL?M##`lk;| z@DJY+y0zvrVMSl|XTXx=b2T|yU)U$L6UcM<0ZB#2)Y-J-J(+_?%%-2TLWB>8Kr?ZV zIUNKn%X2`dX2o9_AsJ{4ua_!36>^~`{2{TovQ&Vg7ep}q&$2Wx-Z~fO37wCJPnP`i zLuiw{70uq@cSSGNS0XEp6gGZoO0r56;r5lHW{Jb%#js0Nfe1uQu~u0OD+jJvmEYRT zCzBR4N9S*r1{2B+dLhM9WPhUAK(nklq?Pn&q^?TfXu+Xi=%$ffGa+=)egTQ(|Ga_g z%KK-bek^DfPNjxXF0eMQ%A|>5nKpe7uul&{de*aj_`2rfa zkkOO0tS1*V`%yofn8~=SbMI76@ZD>E)g%hQL0O!J*g~*I1EUS(`eypil9sR}*vhTg zPoyuOBJgnC) zw7eC(3Vd*n-|lryL!J{q+5R_tRGZHS7J^oA=#dIE^o~8&3IgW#05kUW@V4eLg_XyX zjWyVxDY-oFd1yli7xkRpz{2E@0%hfsjS14B=dRwYElzT0XL=i&Hh$NXYj-ZKz6+Vg zgXO@dhU?UM7s-}Htj&otI5=0wix}LN{h-bV#(-7EX$W*u2zz1O63}eQyv^zlb_^wh zj#eiwP7I~iaPQ*#2GDFcF!FSA?)~0M7?tFPNK8oQ>t9B1sFSlH<@8~!S!2R?thOk| ze}#TX|D3aYFIcnjQh3oT7fNT@*~{5h<5%v^osC*))31S7mk$U4J$gZolBPJz&lhui zmL?#fvIUDsz|D2ck92n_;SUIFe80z4Z&S#Dbo!!2<^=XEFCwytE?tfaHO)Awww(2{ zigJkzogDQF9=Ks6^UTRBpK=5aOD}Ln8gC0blAn&fwV|~sN#!lMqe57Jm23K?u=WJn z4*f3`6WxB~@0a z!TA*Q5;}|UJWqPz-`c!@Ml3n(oscLZip(GZgUvYBm%%y)cmJG`gjuPO59(_4pTi_GRgm(+4c^WxI3d!a5P%(>*rrBL7@QhYS0I zH5QsEOt2+d#UGoy7s>Z;dUoVgqqDzZT=D@1y~=i*Ce4f29491MP)2blxIW(UKgBO* zfcP)+oanQL%g{_W@r8Lu)Yq9QdnXkZW&uxUIWO-|=ZI8GS7wYPIwyivmgfDKyaUi=n2=(#yj!lLXZOC(0sK%mXOI$XS$xBYxWa~CelPUcO1+xrg(rZ z8AKRZDBX8`kfTQKQQP(Ss9?lKmqXhrv(k-~%ZEAOE=OKW>)n#YE>_AA=Z6(tjC^9_ z=MCU`gzMpKtwIt~drZ%nzqFHxL-D13qA{zZ?cNg1~OMwfOn(Re0maN9}4n`2vp;cjSiUsyV| z_75lLscR@UWl2zfqxG=?Mfp=E$!R$k@CVT*FJRMI#zNA+ zjyrd-xdSbn^mM%OTw!Cm6jx|!f>e1xEX+;MOK>~gQBu)L)UxS@#+zbiZaK*HizW-9 zGbGP&oKw3pS0DtfsdPW8bJJKXcAwMgIEI#7PY4LK?xk7u{k0t=q5)~li%cu9Mn)FZ z;3+-gDHS&ru4Z9E_J~1&e0FJ&a`c((_yt3g?ELa$@TlCdt_HGh5#6af`vVM?^#qi= z28v(&8VWQ%UAZpYO4Q8?o((Zt3$I0Dzx>dV;6Flrt&5x<^a&sGT0wbbjGV?p-gS>= zj+iZ{X-Ow3*2GOwDY5DwYib_q9osF}&b4}BBy!&TToE4G9+XnE{6J|j(pDU8v;?g|TwfUFIP&v>D z4oJkSfu7O(gIEItK&EJA=>3mGcC}6N&h0)GpPBH{@?P3K25!w~yBOEmR84KNrXmr= zLpALZ<+~&h(QzK2+9+}7NzfFbPT5=dgMUr{XhWOXSY6zbcV#;dFVPER7f=iFameYne zwE1(v*~^HS+TE|Yh?fkFoTI`ubgy2f(ELM@aak5HNIH8VCcP#wa|c)iX@b zjziV9Z#>;>qeNpS3(ajQ>bxzt9$r2WEJ?Q=z`IJ~wd{NbrfEslq&|i?j7AA92aP`G zB6w9vp)TK|%^MJ3;|}AuKJNYAMfT%%KFW`m9_hGBtQ^uLi!P7Y&vdUa3=x907V6V@ zdwZJiG@jRT&Onp;FavfvEJ!v6`jEVeanOsh-hf+k{Pt!SFpW!ZEi!Y`U}L$+F$Z}( z)ewo)*G-hiFU39RFMk3bpt>g854n ztNq)rW6&}t-Pg++Mdlj=C`Y%<5PL5LtKD#im5|o0y&Ng58%$pVwuAnc@A>CXa-kj) z(nR04Q)B@(7Yi&T@nLzvy^btDh85aw1Wm!%f&>x$023TT)id{p2H?B{7gMB;JYISu zTw|VSI;|1{Y9cJnwI~)pv*iT z31Qfl`TV^okO%^u9fMa{?YVm4j-Ts;e&Gon$6~W{(QD3I%rx5hW-r)5^;R#7Zyp|I z1XrTjZ*vkRTr;)c&7V)3oKCrG>H5~qipt8tRb_=;Q^nacdr0&}y--7FzZxKDJid+I z%syL-p@B04plUR@VS4UF$Q4v#^;GX~oeQxa3hZgp9Ah7-oYS42g*IXDd#PBbijvx8` z(W+1aS`~rmjYGTT8Aa_@OF{8XI;*s?dA1-cs`S2&a8%m^_SdHA`34+WA>7Y^*)8&1FTfVMcCmUE6ZMl={8>t2UZ1 zI)%?k6a_5mBiuRXX*Hkt^M;EM6tz#+f>-AgZ(bNk@}3|8*J;p38e3d(%&h+F{4hBS zXYSEw5ye#+(5xX@Wu~fipGZgG)Hg?vf3#pItO6GqcS4A-E9EGzUkPwIW`ySEHpa+S zPfxn00*R6#li5Gpj9=AS!ZUc^O>uT}8_;D18lna=ItGgG62KKZ#0NR%3^kCUu4}&G zPGV@5`m4K5qB<0$HsVm%IvFsB(8hDr--8FG;EOesji+&-t3pGNg?@*yzzUfjBt%R3 zB8OE$0-uZ)X*}Oofv0VsL@md$KfAv|qorH53=|(8e=m{ z?l=m;T)II&6_BnKI_`fH2f10;i{^SE)lU++mrbX;N|nNEk4n7~ z>=J*stTkTDcv7lP=~i$KmO>%jxb9B4Kr>z<5^DMg*84!FsvGi=%16O%kn!>|q?zbB zLM0r>##4@W_!0LjqQ@gIM0+Hk7(5yD z7X&;7%7RZGb0FPYxR^e5zP%f6ekgIp+eT`8QoB8t!MC%JM>TRej!usK2%3;Cm(UV; zKP_hovTnI}m#RNRIh(G?-kZEMO9xD7bnstEItkWu3L&tb%0pAQrFV_&ys;~I`DL2$ zlt?O?v>XegcO4P?GT6 zC$<8Ho|hj`bKu~ThD296YxW1sc6<%6?j)qlA%cid15N^!`o}tmDc?$ehHj)zX?|m7 zK>mbADyQV*k4#>b2^SGxG%`^{#~Vx#vj1-!9+qdl=rr_Ge;(5%1{xiVq^i<$n8m^z z&$o4R<89gYg1&IvFLCCo5o(_GrB5B@NYOagIMS5=L>r&32W;d-I?A<)1n6o@T=Bf) zXzLFfE*^i5?I;Yr8Xq zey*NxA@KZ2rtE~TNn>kt-s8i z1d2_oPlRIK?)Bkg(2l<}RGYY9oLA_FXBhLs3*<*hk$#gB`1Qn6X4Tm!4Q+v`rcc?J zH>S9k7?q5s`pxhd>dk7K{?cS3VJVsM0;YrSdF75TPQKq!Hyk)VOmGK!=VBf z*37(H<^o-ak1Aavb0` z%hF_&+yPy3BJjd}sJ}0%uOucD&?wBO=HNT^(xC$b+D5u`fPAN&L`hhjyux0h?f?dA-h>HVxW3 zNjtu^UYT`n3Gm`sBEL*w<@l3DhI`PLT_E$L8w_j*>6WAY@1l)W^wa%y+L9_3CNusS zFJJhIstqPYuC;s9=Ac#H$O=ZR z|6Zv3WBPu7HfLYHH|v}aA|>}V`~EG8iLjgh8ztYRh6xUAfFLna%5Nj$W#q$-rVl;` zIp`4g#BDjTFOxmTAjN*w6HfHnla1GSZt(qJHOcH@={1IBcHFENzzf~*!c zx_*Bqn+lMX+v~q(dh6-`Z5sRr`a-sEaysCAP%IeeCH^vVi8DgaG@ckpbFX6h`xkJt zy8eGR>zjT%axE1zO@3Hk!bkZ3&+?UVL69v5rY4|kAE5qVj^%NI!;*xBl2>(RS^VLc z5nAH1Wk7C(E7|tV64keBYt8+9EDI&*Lhv`R@<>r#ospHgU%&Q# zBSTqw{tjYKs2ZrBYSnbCi7S?$FR|K@Z=mC9h$?MH(8&m<*d$)0C}}0Tu-ZXu9v#tE zaO~bzm`QvNyuvV1@IF#K{>XH(9)&~`V&sAx5a5fEV`PEz2%>HJ?+F0u>cg>9`8xT- zwcdJry0Xk%(g;o4O?i746iWzsMf6FMb;S+f>Jy6~v9cRP&_>0ck^>2Sm`l}ns5uN@ zKo{$0E8*SN{XcD8dpOhkAD5$poRY3YZbgO4<(S*i5t>VewK1Bxj3Tz-FcntEIWD=& z5Ft@+TbuiqVRL?mJoRIL?fZP6z2EQW^?JQupZDkU{XWmi z_m6vk@z;zB#iiB9*bUZ$wD80$T#4j@sS~6qP}4J$x7Y}<`xCARBzX$?fpN(ep?)ZN zlmO27a4g0nR)PHf2}EIf>4IrEC*e5ec~uiprAXt%cC@wX=+6KC@fE7Ih8;0;$2@Go zHCG{Tz^*p+4qG+1-iQYd2M5K?-G$d=pPE2g3dj^BNL*8GUw(YCqS3^uAjI;`EvKKU z$gz5Hy}^smrC;bbKwRL9Q7lvEL09Qx8MpcZIQ9(4^F1(A^ZnBmXGMVB^}2v|M_f_T zJW%PC9{A`5qI*EQ$cco`UDA&w)eddTSv|Vu1pD)#y5cFacFMUnB76*z35;qoi@#aL#*R4)q4_ zr+rpZv542!3i9Q-K#i0wJ$y_wI8CY#Cbe@OY9GMn>YMEt1~*S2`% z$`2>|vn3FTJ^vsHR0gQA*X0oY0M_R4%4M%uDyuM|Ar!gbw>HmI9RZp5W3mKP5Kx2dB8YeqS`n0{_hXcLgZ})<;O0-_@kLLu6n#Su3vh@)=a?=e?2T*pp=U?jom-|a0g<_9V8z;F4L|7d~;gn^MlPR*4=dft` z>GH2Sq-&DjLBDY^xidn^D(MX7YE9QURy?lWgwPj2lT~Ky%&F&~FWSgPhBejVX~9KY1!J`+9vyFX65e9C%r2y`YOhX7-&R z$5f-n{iy`NL>RLN4+4S4p5p1!aAmHGdAux+-i!%7V&)o4~{@S-1*&fuqXP8HrB{x6M!1XkawGwg} z@TV~Y?@bbG6q9m72)o~UoZW{}c0~+ZC2;IE(lC-2_$3s3dT!$kiXb_x@^B^U~Oi0}0Dn5Q`;UDLd_L zu_=b4@Q)D=L~+6=KXfq_bGVl2H8;-P88&6~h}R_5*3%&0hC{8wQh~=Mh25hr-}d;| zQ1|sjq7@Ywy%-Ww#Z7mY;!^5ATt`$`ip2TcPm!|_YE1RO(IosGRDTE;+b^KMBeyKB z&*K|v`V!J)ckju{`{W^z0FR$)acG4n^7se~s&$dC3n3q;Oa@d6r;`A2q`xl({QPd4 z^>6auM_6ChI(I}UwMJ2C*^@oDDXIS$QYAXOZPS^8u27%r^RQyvq4S5cgHoM=1M*B6 z;9MfGBYl(UX)1|?5cf?^)g|6Q<*L=@Kbb$k8!om+5PXcQ>jkASy~M(#XSFRUC3oAc zgYIonL-`L8O5#y8poVUs2Ir46*P!I_mkwuM+tp;VZ&&KjKQ~k8gKY_yc9hP=3i3tjXb8-a0d{SDbIk6S3 zRwB{Ld-{5@1u#TNR{w5KAqHhYZNP9OrK?h7S9&ZDWLS~-*f{c8?~}B?cqFbiO2z?p z5!$gatZs}&+mtoW0tJ-=1r;&yV`QKpNv&vPfZjBl{<%^b?Tn>&K?mSKptLgl`(x0W zcj{Xbe1ESnfhY#y>)tL?ud_L&n=vK&*z*uM?if=hqglQkRD&wYoANtk(bn;5=^*fY zo0SRGop%^t-mEykgvLzy|JF6VFsD;7>HU>6AWy);c!hHpR@#H-99@gZ+86b1Q$~<{ z5G9-4_3HD!Q7bsaW50purY>H4$HXLW^ehYs8RfN{B3dOD3by(9YIF~QixVjU6?guj z-$sIBI$gOu#tf~7^)56%+n<>wTHed*pq#BC9L>|2`0$B?5)9tou zrB~G0hs-n8=&CXvj?17+5JpFyOkCKXL1v!#i_~g&v`*ySUV=0VEhu_-S z+=Rm55VC^A-C0UJN_P-WO|q-uR8wXBV0EyR)m4SgKXcW*FOCTTAFFe==2TPnKmG^u CJVrMF literal 0 HcmV?d00001 diff --git a/utils/img/canva-circle.svg b/utils/img/canva-circle.svg new file mode 100644 index 0000000..b626216 --- /dev/null +++ b/utils/img/canva-circle.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/utils/img/canva-dev.svg b/utils/img/canva-dev.svg new file mode 100644 index 0000000..7c51663 --- /dev/null +++ b/utils/img/canva-dev.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/utils/img/canva-flourish.svg b/utils/img/canva-flourish.svg new file mode 100644 index 0000000..23a574c --- /dev/null +++ b/utils/img/canva-flourish.svg @@ -0,0 +1,324 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/utils/img/canva-icon.svg b/utils/img/canva-icon.svg new file mode 100644 index 0000000..fc31e33 --- /dev/null +++ b/utils/img/canva-icon.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/utils/img/canva-logo.svg b/utils/img/canva-logo.svg new file mode 100644 index 0000000..1117e25 --- /dev/null +++ b/utils/img/canva-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/utils/img/flourish-dev.svg b/utils/img/flourish-dev.svg new file mode 100644 index 0000000..eeb0f10 --- /dev/null +++ b/utils/img/flourish-dev.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/utils/img/rbc.png b/utils/img/rbc.png new file mode 100644 index 0000000000000000000000000000000000000000..4b13a13147e6380052809b6f12872784bffcf108 GIT binary patch literal 154803 zcmb@tbyQrzvM-Fg3=k~12N*oKOMpQGBrv$UyF0;yYp~!!f)m``gS$g;4KnzfoOABI zXXUK#zW2ws*V=T??(XXDs_yFQ`V|rHm1Ho{UZcUlz+i%8rBq>H5SyVdE(#L#%LJ=T zDhv#Un5CrTdyu3g<$EW4GfNv&7#P`zWDR7n+7Lmuc0!z(1uQ~A$Ql9;BWyv)Pl+?d z4-&YPNks7CeKD*|jc(Nen7a5XRa3w>M&>HVzSUp9mPaABT+$=DtZKCLuJgJ-KTM>* zWb(V8W(mT4%i0K+YWgMsP2sD z6(+o{&5CXI-u%U%<+YHX2q6qD+Lnu+2ru@QB+N##PJAN_OkNUih8AUl5jZe~2npqa znsGd7TaHmFb=#LSqmhW9*B0hYi38u30?Y?C$!xvBv5?oLPXIwQPdF+VE0^%L-Z$^i3+@(2>LIKeX--gZAh4e z4UFSgc3x_Qu3~c(xJ5t@evlI0tEz3vxlbNAqN0@QhPCg6_@y_|zfS;a)6kwtWq`k# zudl@t@FqU&cZ_e<;@_uPsi^Bv_r3}rLq|l#0hCD`$K~LWlvWXIB=toS)!@h*6~T@uA}KlMTzs zdByXVkbGTKOvJrBj4e9$}YYDB_7FdMRA0OBJonXG{#a-uj7z~zejs!PyQnQ{Y$V-Uf|pwb{z zns(SLyWM>ZGLj3uhPgIkQ;+4en5j%6oQZR<5eXflZmIs<6ISOLaxgIqM9qCO9 zOtzTxIrbSTxQTsD2VD5{l1*XM!KE-5!bmg}C)2zXN5>JcuZ%&Dglp^IyFzl?+p{rC zsLqfX*n&N_-6Finn45SW?vVBKU86AQJ@A=v*x@JQH9UTk>_kw zG98MA?eU-3c(;Msx|AcTy)0vBPYfp=V;f<`xm7fR2`ZN;HEfIbd-0_|N?CiDrgUD? zC_Kv#dhX0HZy%3yt|f0gt1zDyakWFpddH0zs(&x2l*9h4CMd_T9*6;5oF95oYwJp` z8JS${h>>-PK4J=MTGIa}vnKT>>ll1MgG?8!TXcQ_eqkjrF~k3v?jW-gnC{ofjU6w|H4W1i9!x3-<-;&{l)z@);(h_Fe1HeFL!!VAT3u*zrcm zjSYZ6T=_0eb`BmA=Dy)-rg8%7(1|;yxlh-I6pqwNJqL}#I$d2JLgRhK8?_g75F{T$ zz1W6Ljf*f3(dW-%bVPt-6mkR}s)#sHn%oA=I zP6d|7kLq<)N`1`5n7U^GKw=$gOt~`6g<= zROVEy7>gNi-`FQ5Co3keCg&$34m&5$GoGo56hFSd%a1II{EjA1_wij`%?H!sVbtVh zCi`z6O6g`(zeuorWi3=!Q&ypPFZylj1KEegQlVM?QvA~EQjHJ#rSY@CnKUcB*~ppU zS*%iB)gv{AGVRjZ8UDlCS>~CH8T(Rfi=S`%Eu^e=EP;~?-yQYxWfBW4ONhS?P3wGZ zQv99t%lNf4SAMmH&XUiP+mfYL1A)qjT-5jE?;nfmHOeH*^tIKNH3h}Jzqoz6;W%L> zQy5SU`<_@=tarJe*Yc6bdZJu`(J(#?PyK=fx z-{;<6ogcWiz0SWbKD3__{l3ntYF)4=dpbB3k1V~$A%= zaRslC>4JHI@s4$pZQas-qe>;m*upZ{pmnLS55ljTF+w1_yls$c$iQHcer1fhohjJ0I^i4hpmG~aUO|pXjx6+iS$8{nv2wD=HEu=f zzjEUk+osUQr>EW4+2)aa4FT)i1`+sH4a4 zOq0A^vmEa^%|Fh+#9t=BOw6Y~xiGFSs)-Grp3>DbE6 zKU{mTJnqN)_84*m0#Ky_UnzepDnvBPo`~)*|ML@-&E~45JNCd zqvz7;x%S3<_@el&k8Dib?vLmA&728F53)(#y3Y#@w`O{F5DF4h0{sL<9sPd8^&mPE z3O&>9r+&em#dRDS`;?8&%hpYZO5h44Z}E8AvM+3%LN|>u-8I!uaY)sHxQhBWT;%VlHXvn`(Y+ z|J?Z9VR`xlb$Q~sAM)KR>^Y`}Oy3>N-R&fDaaR3AUAJx7;I`&zf!`#74@(KI{?L+pN^0NQ7*nZ$#aCC5e7!d0tc@Y`wcbUWD`CDESZWnHPUN@dk zZ|ixyc_>7-98C6967%r~>S9?0mH68?AO`X(Bb}&|5$%cT3=|DYR&Cx)2Q&3Q_J71o z=N3<7p$a)40)N|#@K-v^On7J7H+MGvbeOz0@@9WvVs~M8y)xeRbf~nMHQ~OuMzg})R_WLA z7}ynDDr)om?a1jw;O6Ix;Y0p{j5~!hMTbYi%Z~hQQ1MLh?nHFX$6LN@(i6<%wnv}G z-=~CmggFm#&ohwP%fjmsN&ma&*|nUR^(VPUtMlswUN3vMc2~b;0RZ>;hVEL+#F@P4 zzVE_y{Kds_aj)`(i1L%fea&gv*!(a1-1Sq;Uzk{td`2O9N1^NNiK~~cl z28Mv{&kGAur9FqzU$FcDb^$9Y2pHSjvKpG$8=10t*gE{710&=i0L|K(x)@S=*xJ}R z3wQ`q|D%QgH2>!_8#U!Ws<>DSQ-c-XQ%c%9nNsqwva_;Ni=a_bQVKblmvyfYX+}8t=cz^<$HW5JF z?HhIAAf8lT5OpLX;xQ&VwGnKWT=mx=#3Um^Ml|sI_wPGdQNRG4_bTGOdR1%w?OnAm zwTmY7wHa;pw`0m_>lsSbpcIEa&%3mC z0@wckGO0iFmTE};UncTjlMF18?hHRI85fan{lBs*GyrE+9qGSX{x8IfUc=Hf7YjT9 zFa93{0A(og|KAK9CC>9UGwauN?884T(|;;`*u?hV_q%ObZ|ZnDvA0`wop&X%Z*_z$ z8%43Kj0>I}r)XI*j(Gk<{73+HVNRF`-T&_~8889TWb+UUVtsk4apo-NbcJ#}knsSmA(fpUf2|4%pmmrLz+ z6oLMa+Z3l79rwu(C-(kFelHK}VW?Y(=md?)>RKhD8zC=7K@amC&-E>LzcN;{&V0-p z*1V2Bb?m0<`*o{{@Fw0u3ujlIMp&pspPz3#!de#$f-zT0%PO=^f}zA-LfzxelGeHB zb+}s1vs~vKM}V~o^|!K8SMnvyNgVXjh0&|KtnTrYZg2ly{DE}gor6-hbg4R9de4`s zx4zvy6weN~>&)XIcl?NblG@y3ki9{BCN`2ciA%Ve#((ZW{-LS&92@+i!*4Hv*BH zm+d=*Jw;vPyCxh5$o5YCUml9>mbsz4PBTYIBTvsDR$A_2qF{ltb8q#vb$KqE;?o^( z$DN{kFOCdCf|kfHj#$rV@9Q#s7E$DwI2S@)m-vTn!uAc;mg5=|lHtfVC}*o~%VQ@^ zd)e@gy@Z`NgEXy8RP`@?kShljyLl_#p*B{p4Z(DS}>STGJHl3E&jyokaB$anO z-`kzF-MY=RK*_P-_dabPi#kkr^m8TLHtQkuu=(GO=u*_4|FvB@Gi3}+@E~@mXKggtSaxR1$L@-(&~;zs zCN!b0FfR1Dp4AXs`L3Aw@hMqD?_j^j@Ir?P+h+rQRUDaYhiB0wF;B+t`FBnjYNmBX zQ_<z|M;?d%xOcpWkCqIq?C-nNE>{cRPt>W#n=p5lK%s%M-%4O%r5qdH|~rXC3~a zx8Dul5bECzYiRXo!u+M+4ce*L9i@2HHRkpGpTtBmU8X>%#pUVF~TaxH8jiV-M*P<3n+=L=OWh@5ao z-#wg)*qP9IVE?S}00miESc#*@-xKb}?&U#N<3xA$INZk84Vw13_YmHkAD7*-)c z0V}^{E_|d3FJ&^{XcfAb(eZp;8Fm>{e+k`B=I%F(=3!6otlG_W9K}(%4&XrRA03q4 z?+=Pwcy1|@Jn5O7QXUk~J`tJWA{n(wrNI=I>w9c|qU%ELX6NXY!eDigiry!nJ+}Dk zyotsRjG$?D4DMF_z#`Aq<^oP3eK_ z;kR6c-p-4l=dfBfXVq&KEUt_WN8#U#6MjF=lBXqH{IBvUFi$t`an~=9Pnde0l-h6V zE1Oc=uL>n`4saQKL5J@%-iewB6D%t5MN=Ph^dP`6s{m-4WyGhmx&P9R!+tIKPKne6tm+_6Z&+b`)N z2xU#Oq9PDu*jlJUZj*cnkJ%=Gze$=$DsPKo^9&hlf%JSvsR%Kee9~wSK09L~@~`reL}!I` zPWJwX!F7)VGMiT28w`W{MBjl*jn*xE_>7AxD*RwKJV^tcKU`%s zNmXbql1afhwYBHYYoW*`o&4Mq#vptE@-Tf)jtM~*45D`+uqMEsI$b+HRm)YfRUtfJ zIg+`8@BFoo)wTfbt~y54>B32tR6sRi*|QOKcEqbkpEIa(#jQIFpX|#GBR>Rl=OS9$ z-Gmrkni3hp1!8jBU$JJ^RV~r+UKI8$HvMIyv9JGGfe+aJ5XmYJ!>=LsJsI}x{1DsT zAdIfp(mo#gPD6BE$|d7(kq{I!URM)O`kp#dJjtFtuD?9HFEnBtv8|z3cfz2hGTH>( zKn3Sw^UPV9*-O7kp@z!nGw&BD18aFV`qnO}{ zR9&l@j>1o~dKC9=^~`S%YD%@T!_cf^Xw5^Hi^0b}nDU_-y)9WX`{sk9sxBh+Pdo7P zHy{#^fS#?ssIVp3q(J5r6);l}$DARC#JraEcYvrVhBb?(8PL*rnhS*h=dsV4A{X-P z13dxQ8WLrOcR5FZiLC>DIZwytUDVMvPs{7iJiW@zopBu}KbFT?bQ;+oT35be^x2_S zg-n+bojZF$Pd7ws-p5WO#0G<|p!aN)(amV^=YNje7@z#{0L*ruA+9NO>Mlt%Ea-plqLp6EAL6rKv@cRk2-9(S}ULUBY{i}f5eMw0FR5JY8N z^(uM<=o;AZuy)&SNb>=RzFfePWm7Ka`%8Dme3;oQ)=S)1sV#U&mWQ&}DWy3wnbtI- zMo#yTNkD%g`V3tkBBB2(iSAHBsp>H4M-V#)>_EK-m)sgE57_@wIDan8(3RiPI^osi z=RRP2DWi56sgvybHpk>xe`0ycRCm9pdA6rnenqH-;6?y^&@$o^Pyo|N8GVOpu7-NX z|GVJsJ-f^ltO_=kmIYo_yJCEn0IB*0ICwyUxa%`W$%E~lcr{wt;rSdVW-aWoprgyI zH%ajPm|9^}?H7O^&my&6Xq$M#VujB&Ro4yGw!%+3C(-TliDVrjZSlJ^#_j!*8a)&F z;|6krQSr7ymgMOl>j=wJk^+6?xJXexA~+%})@O&tcd`)0qH5jytnH!uB7f!@qr%0Z z1P?ut0{m_u$h!c1_H`bNTD=)c(%<#qr^Y(SwdBCEGhNkw#MZo@7uc-W5yw+lqMW;K zzxTJ1`M)k8?y#0kUU>CSJP=jvN0Fq@6J~S77SZotFi8Qc^q;bVI z;y2|$y@Lbw^rzUuWwUurM!jZmQtc&|BIgs=Q}u^r;UbLz4CA!u8ZQ+oAf3qF(t#zA zo!7fK>ku~2A^C(duI#%}^Jb_XR}BiwFK9Y5x`My_n5YNnU>up=uRgCWBDd@&ksdM2u>Cd8w~gV;SjPd_(@Hb=Ds=Rj z{My%7X+8WSc!`Ys)^ZPG#uCyemkAPOnGswn!8Lpb&rDMHHFZ+3(f)v`AaO{B1)0Lf zAr1U<{&?j-&aG21gEhQWz-Zh)omBp-*C_JYhGK%{Vp!sb24hR_DC?>0>*$oN;MvQW z7Acv2DE-m}6Z|pi&b(Pt0=*nkXqu_C@7&52I6t8K# zlSba{@}Z=nZpFo^lb(c&yNu9gEy$4FxijITvuCnN7voUlQ^rD_Nrwg2>pt#VM62q zqfWcdRN*ld&GcOO%u`w4L7liy8t-ag>myo{y{zltHE!XMH{ zJ9r0{+Fd_)g$d^V5_6h7%BXc7$vly=_tJC?L4+dlSSP796OZ^I6Ih(y$W@ScADG;)-Pv&vzf3)%QvuSKL%D)_AKJAyl7@n9ZI}i=0z3B;AVJ`DM&F z`2!JkOR5TlWQy?StNh$cc#|kjLQPq5SHUTg)IV^#E>wL{wu(q$QDieSH>0}ZAP5+zSLtIoK*;Re|OCXr|aAwtZa(Pq!l6iN(WcS zBIkjI)SNMF&%V$L1@h4oL;xYrjV`#bBpboBJ1!X&C6Pv~jP^aa&!$oXJ!)+a>Yl7O&s_34RBzx#u(*#sT=J2)B9t?`1Wulifb z7}XVQ5p4ArrE4oSv{>lIe_d5Zc@c_Y_WRxQASwN9mdBxipX;m4#!-WvfED08G(%Es zkBcY_90fjLqJwLfH>H44&McTmV#COA`W^Tb+wtqC!tY?~?O5$cF^OLPo7x=AIl(V! zp&KTQYy@M}25^SoP&v0us_6Xcsa7d(w(XU0wis0rg3wioosi|tQ=%l_Zs)%e{Q@`v z8~2eY#P_clTtM%E*mLHWWKJgU2VqioFMzjwaDeqGU{vUvxdb`Uxgh9?au(2Gl^y(n zYW2~OSb1ebL1Z9^TR=V7>)`F2zW^p!z5XuL4AcOguU(WRn%NYi44+QZMpcF5-Vj6}s*GCX05^YGOBk21i z)vUbkPK_X9S+;Ajr9AA5bOr%d>#tDOle;quPa8jo4T!A;z@A0x3X5HGz=|(^#ZnP< zU8MGNFamYV@TSae_XmnzvJ-TxDu-*!Gi9~L7T&~3@4p*H+Ku6irw*$2>LX+`g-4ee zl(|gw3Q@MbGR$0$JB0+Y#;g2BH2RoWSYl7FPZ)jYj3GKW;2<+f=ct>xiiVXnX+RII->COLgyWlY1ZI=mhuK zGT9Plz#QIu-uwAEX^}Ok&#pBA&55Xip1RQ?64ld%1W)*i%|iP^e!_w|o2H-oOC zh=y5UAr&Flw`H=DeOlrv@B0|4-H)FQvK7ib!t@#M{NLMG7fJhX*bDW$e8N{pNsKQC z5EmB=Zam$tci8X3EcB-=*EK+9&Y0?agX)DwB1!IbsKIH$p9ysAav54=OS7aV_CISa zZ{_C@Jj5{A@0ayn=d-Z3{O!vfW%#pT=hB1O-j^fR8+gK(EYaJ%8O$LVv@MSyQYb)h zVsM-P=?X}yd1d?)j)M-t{m~A%Q5|22vWuvF%jGpfmgU zU|V~xY?JdEU=BRJs+RHnim_=-roUKSkm4FlXHu+$O$*zLF7=Jz@jQskqc7+kxt}$+ z9$3Jr30*S;h?=Ke?EFetLWprRon4Z*&r}94Ujck^0wMb)^sXWh$CN)tW-5pJLnGls z=`Ss&tQ|H44A-o;)}Unc(?oh6Ng7?w2>J=}xr14HojtN7I$cpZpJ~S#AF9(C-u#Yl zYTycq?EVBR64h(N%w{1awdFJ1ybKW6l{C=yIgF}eF?H)^**=y6(@wb#oo$#Cp%kU! zwS~r{aG`|9O1#BtqV~rg6NSX1(iuUu6TTC`E^Hvg)JXEd(u_I;M4DbcbCEZ3CqiHS z4LdHqX;%Ke2|`N98JDJ&28caMYpIr&9>!D#5{< zsA~XBQP-7SWHaf~kJFOJDEJJt&uu@$*wP^(Y5iQZ30i&!ZVNb_oT|?eTiTzuFzgms zb5UP!aQ@4q)d@H!4WXFXb$?LDlt9Ul;KB$*b!?#VFT@ zPA*4ZfNqy?yjHW$7PD{)V70f;p@Id?H3E&JSU~=O z)VF1?1U%gc|1+qDWkE1hO|8NHVS}5QxZo>oRl~-87Z;_huYACv9t0wjnBa^r|AcB7 zZg(iJ^errkkj+iu5tAk#uv#L5X-O%X7HyAPUQ}%s%fRk@>h)!dsV%kUTn0I?`c%7s z$8F}+L2g~9F^Sc{NyXkF($!tzp7)@6@dx#BpGjIX2?imiz89UAc! zeEl~<)k%gjDxXKFtFfL!(H zySx_5ZH_~ZL=i9CK)Ndk+guPLHLJZGttlqCHg(akbVkOf1$;zH%i0?$HV(^gh*SEq zzP@b-J~~qFLp!v0gh!^j6lRjCyoPw|@&`inl?zGl<;Oq1G6Yu#U$fs69@*>gqfSb% zP1;#n+h#{ZoO*1F4O(Px3z#&|o$Nc7#|`ayw3BI&D8z(gDcOdCh?e>)61pkp;>+Je zf_#0#wCM9Weg5xt>9Fh+h}}eNVB&jK`fyUT1%AwnSDNhOBH?Nlg_9#sKaTOZY2**TuE$u`~cNgEV7*28Mb-md<`P*?z1osl# z*-G227A%kwVwE%hg01pG%t{IMfYDOJ@A80HTn9LLf9xpq1*4;s1M1nu@Z>dp$(+i^ z!svp(*NzL6O;GC$#8Wp{e~97*PfhGQmy1_NP9q?lnS2dnAN)i)8>|a_I?vIf1~*!x zzeO6vNWuaBu0zMI*gQqZs|=l?Zg$nG5*ZlaA1S(+9mS!@TG|c6iY;V4r8EM?r|U%d z`u0y00*|jkt-wQ)aQlzls+o_yVfSx1p_|-AAwmRaMODf*5)yxYfkVxoJs6=OQ!p%z zM>Qd+ibvU)*Oh9kL>XcVFM&F}tG$!%h_lLl*kg0x)RlJvmUF?w-r+T|Ck%8jfrE$B zk+<<2vqDs7v6xJZyKl}cE_Z7Rd$GDv5mO~t-52vIwI*bsav15Dk)yVq9NXrPraVo5 z)1}PI{0h<|(?)-;t(Vg#j5e8dIBkK;`!MygDtp)ctHq&2UCmTN!K%%rJcZ<~{hRG_Qc|~iu`!{##=judK#+`q9_}jRrCCz6 zQ9w!!LgcoBrs;rT^J7c|(38OF6(RElu1?bgjzl^;KL}?PxEK3m`YU@+Kz+Vi5Mxji zB{J!wo0^X8?bTNy)6c|soVFL-tCjCujPZvr9oP*^YO`Nic!}ON16G&5%d_gyvzz3J zbz6*{f3EPoz(qQm@KF2c`D4Tp4AlUl3g5yptT*|Ya=%c=wLs?Ro@Q81a3ieu(c4R; zSlc062D)WETN(sqcJUtsmVw_H@h)}<1Ol#p(bf}o(*BG8m!$m{*Q`>!tRM?`%`7$Q zt!?6tSuath&AXv}+hdTN*A{6-reWpG}DqUUX{Qr=_h6vWt9&Rp+k!u*iib|hI-t|+(USnOC zzv$UiHyTIz54H9|>-&AB?@Gj}v35Mj=7<3)s!+Nh`6YoB>i-NB5EF#^ov^Qj>9LeM z9MO}Jh!0p?y>CrTp(@2YlBPMX!!+SJ?z{rUWY-8E zxpM9l76w_l0mtYI7h!IS-3DJ2FY2m5dqo*`rEHkKdcphsxH#0*H^td6_K=@bOC81_iPU!tHoE8KRo+)-P#bugK4UQT>ZPxG=5o87*D~3C{|1vY6JPAYgwhmKLqM0d-jWN! z^>`d(M2qLS<#L!gDqqHY6PZkYv*?B!fAfu$d#Unt{aDoZi)!kAQ-wrwC107t*96-N z6$7URlucA_f1v6aV^&j3CGGICl#1?NKcV!XkvF;(jAzwR4HYCYi4}j4!Oj!;2xemX zFm^z=<5U?*vtPp}-oN0MUnGBoVs?(k@m?Oh7WK|CqoCYuIoq!?QeuNa#uA~siZn8y3VGUO?qT{k*Hjb+!iEB@pTZsf>(+*QDw z4Q{AlT+#*_!X=K=Yi4nJmGh(WCl`0B=8N6W%4hVJG|eFAO#LQIj*PX$<^dDTkWhk0 z8eZFGS15Fe?B8^sZb{!SNLtTX;`!tEWXNQH{p7m?I&YDli}_ zT#!$2Q`=ctgF>)+ft0(#phIX_LvZ_E%Ytj`Y+EEz8H!dbEkKB~@^yI+_O^fP_&D-C zdB4ibcw%&U5Np+45~2qU3ryVw`kioU&+o^&(AVG3QV!5u;Rm zT=saR<)Chd6~6(&wcPxnY~%ReP9^OP!_Ck_)`1ySOJIfOefGV2#gHrir4#?2Af*LB z2k(y~U{mK={IdS8B&7-v4Nlu#k&c#gDdyQU(c~g92Rj$aTFNS*FvgRja$ux`GHs>Y znK~$U7^f4E6MoF#z+v9L1{TKl7%yU_7tpyyd_8l_X4;-sa8cvA&@V%rf@ki;&1I!< zol)@>zg@Cs8<_HmHyoCh)A*q|DPhz1fC|8t(jp|DEyOr`{VT(>;=9Ob3M&H(U4opl z71wY=qpIPc^5sYQ>7oL_RHNXM-^0l@&7$+o2LpRVmWyBBC7AbHAJOmcX850bs&!%t zZH+#kgX{ByONzlrTz3QZZMc$KeTQj$YA3ZJ5wTF)z~&|j+nnXfvg!jH4v%5XEgJDG zH@-j)X1g(5_7(f$SUcd0$#@~x+D4MY(vs+HW_$J&9pvL)GXcGw9u)aLlsDwYXP%Vf z+59DbFH{~B?mOFX5+=r@7!^jLlf~Z2{R@?GfxCKEs|C`X-!#!${s0MPGIW zw`_V~U;hqFKGX(Nef@ckf+ay{i7qjvz^^VOHpMu3l-j z6Z~Y|<^nX%WjhTR&Vo>!zORH+qpO2hNRQszzzjYdFO;=oJ8I z!MRiR(&I${JeEV_4xni(l6j>z=gH=7QBWd5(j!%NIQ2U3T@i)#4D4U} z_JIh+7!!JJW36B5RYj3k4@Z8C?(e4jeAOGm6YO0cVyp^pln(1Rd?IJHG5R3)JxZ0J z0fW-DSrcn?Ls_1X`K_!vJxkTwnUn*J3S<2(oASO8xRhhXAZ16NsHhE!4EKGAnn>p| zie$tY6vDfK;Sa&*ozvsLgT^nN5hYot+eX=~Wer#EL7lc;v6V{NhopG{_A+nWcWMDC zP>?P)=w%MV4@^L1z>`z367y?^#&u!O-ITxX)Myxdi?_-cB}tE1<@A|BYsY&xTqF<@ z`_z^{QTK8J)#hq`nk2EjQn!t+o(H#}M%6qLLOO;l7gfq8&zqe@WxM)j zCBv>-Xn=`aTH_X};kHiR!Jxl!@<{-8fz_nO_DREvfFJc4PdjOk22kS(HdXk+wg%?NAm z*$g5035IzP;$if);Q5=y@yuT?ZgvErKl+@0PmP3bYnnjbKD;rrij;8b6j>A^ey%?Z zgN9zH%74*|*CX~mEG#7S*p9~Vdg^3BD-q&w+Xy}TCC|QQ zxMmUk%IE^VJMDjX9j%snlC-*vIBK>7F5iDNr`VNpZ`XM95NSo^(6q`}(TZ&F*jix;a9> zgbNo+3~z-s9I-qFF-kGg2tOf7i8vbqQLkafMi{>-X0HLlmPPd~L)nl%lA`|0{d~^` zd4e{Aeq!9r7KK*DUJSq)BhOeOD)5b+VwFxLvMmN_wbq=vbOELle#aupvxH-97pE?c z!>6kFE>Qw!14eic)UaKxOnvCtLbql!h{)I(5Hp5ix)Di7D1`=ZhO`0oIKGz5KJIvV zjxinAlI8UbPi6`hW`R`pCXgI4wWZS-E@rAp0WWtNNQoVcKV##38^R2y4zKZui?k+W zhsNXBF(N~%@l#0+6kk^vgdH1#1Pm!vh%&7MJ@&l8MdgUNiCuhYTLP48v{7etwvDgi zgvc4HW&Bj69lgJPstJF$@h7bGyp~mhzlWNb7ioq9=P|zaSSPW8F+rw#K*k}@r~mX- z)sLvu=YfeLzt}vPaC`9Rc3l8|fiVyaZ#1Nkj(_APYe27(wve~hm+-}dm_AEBVgFag z8?|Z@*eixzOkq${^J()@H!VelkI{Ntj}O-w3sv(#;fSZd1|wB-1fH<6b}r(o!d*~j zFvM&ZVeU%7rtpzjZC!IWf%-K2`KmaKM`B=t|3om+P(iD@ITXaa#64V@4Nlto0yMDn zhQ>5zid5p;7r+sWDi?Jn9#8$jUA zyr}Ku4+;xg&-ouLkSz!50=N-4@I?0I+atWNH-{e?laf)fbLmtg+I#G+gyA)hlu1ROy>{-E?hXsG`TSm1cHu^4z z`cl?WWrxVIc)}NG~%uY6{l2E7gHv+SQkYMvl^-WxYGi zB0;gI8cvl*kuYRAS${`m|0WKs2CVABeu8v+p{KLtWw`GGW1EoqQ9Z{xbHoWqto!84 zPzN>=yUc{Zzx0%l%W}`b3s8+T@sft!l83GO8&-&NHARsWS6@ z4kf%XaghzsGLM9LafTepKwR^ypGDhfB%TlRM1L_ z4nW2$R&)h#4UtjtrwgTkX81_&38R)5%sogePTUU#WqD8NGw6$@mdx*wu5hZ#V^$T< zNq1vGyxpm2XGNz|Dg6>n^h&ZHSI6_L)4?gAo*5>1GD63%f}S$0v1u6nS{+ez90y8@ zjR)?j*|qU+3GS=e;}P$&<=sg|t}`CL>YqacZuwkW+&{Z-9Ab8y=c9!1sqZR+i`0L_ z%M^+X%7Ai&t^d|+?+|`*PmUQNp`ZV`q3*XTLJd$Uqx%%OR3= z^O-1mtTMhJWP3@0WW*#&xFkvs3J#tw9R6T@x+izVq-JO4^5Venw`VgRou zX@n{5A5p!uIs>YyF8iSQe&iX&DXfTyWM{dbg1uQZEou|{);{ofZ^6%Q$w}5_KlofI zLY@)qMACi|N%LGYJ5@OiK)yzeB26lKRcY;cx9r2;VbQ4+Rqb+~!ngH7QPawRcJRV#jc zK|TyjSu6|z&c!w=cJ4|kBp3#wbM*8EDvZWyG?H~jQXGNkN$Wn6G6SyqiwYu!68;1_ zX1XPSsGC82QY6ne)h4WT=#%I(!3$$CNJeQj)ddlDQ?cljH-w$Z${Fv?FLJRB!!Ul2 z3C(}nr}x3sRTAovBZO+Zs(VCtaG^l_u>< zTl^%hEGd;Tho_$TwP7jT#X+2H!;jYOdNwtDAGv`3;;edrd@}1YXJ4GBNTCTf!q~7o z!|lzQdr+O4yZn+x1l}$8KH$;WJ$Vs2T*5NVPCirU7QH3Vw!yiAvo+PAVyhZv%~~0_ z&-Rk=jaY7mtoleE&u2G>a=Ry5C-ad%*#3v0Ut*#El=9L8CqInN*2<3YFz8mv8TJ@TM81iv&BbjWnU`to0G<14Vl{>S& zYc%IDx_ZQzT`8DB;dTf$q*0E8OMGK-O@LoMbaCWlvVqYlnt{Sm&tVaY5~du}26U z6!p%H0S{+fF9ySd{4mE_e!aD67=cT2@L5C#tDhnYm zqfRnS;(5DR#En?W)9@p*0IX942tVGiJ>9$ocU6e1l$9aIu#kCj%-bP2FayQKV;mnR zrA%L1iD}}1=00(VbMSh_ggddl93}TD zC>)6I(6vhFg=W3g_&w3%n>Q4*!t!EmxX2G-;ooYGY`%pChq`y3aUFy;(&>NUft5CY zuMZi~Y?mxTyQ%4r0^M)1*MeL|S`L`s|JZ*i@G;IOTo_FS`7RBrAUyTx;VD!VJ^JDC zo{(IJ{3uB(FoT9U#VfTNNg4j<&hMdO=bRK?v1WK+L>d9halJR0=G9?h_vqWg$eG#3 z4aWt7ciURSZnqeO_9TpTETQ+o-L^Plh^^Uq7~=n7?=8ckYTLeVX^;l#t^uS$y1QEm z=@J1!x>H)3p&J}PP8yL82|++oN@_?MKxP<18s9bNb#2dfZ}+pkAKvfpcV<|#)^Y5| z9{=Be(LS`YY;f|Ab0I6~p)H zR!+Fn5MH{LEzPvG^xhCY==amJ<;)V9n4;fG_IxhiwV+J7=De!|>JM5w`8-=Qc=J>s zDK3ZfaGj4jnL3&LZ--(}ReP17r|My4zv`Yvw)*INc}JzRQWLKuk)q7(c}=-O@y!I}5M*k+ny!V@QC2vHu|fnA z)DT}LSk0;0_{82Yi`eY`M%M=pN59tV*VGSQ(4xEk(tV};k+bLRyqtdhxw*{$rNmSR zSh8ztbYZBCmaj8o`$U`q4|>P1FBP(s8uWJ`m4cN`6m}gxC)#+_k+aa+(<~N9r;djI z?^Nu6eya{A0Nm+2_oc`#sQIQb*oQ=^KZ0KI$}_2YBD{Y$kEW8v{$JxO__5ab`S;Il;Q%Ojxi(>Z%liNRegFN`|Npf> zr{w?JO%QZWgew!v&fotM@Am>u5O4_Gr&RjV+XF9rc3h`iH0;t31vKqTJpB{& zOMyN+9Hmza)4It40UL93jeT*!Wil5i zzBYQd2;bt4$-~N`*8nO&yuP$$cuuzT))!FBH*^C%jx|8W24}pPiRW*YX`%vlxdILP zi$pkzz=RjLHF%)_lq&~Ye7jG!1L*Al+Stw4wmj(Gu@&dUO(!&O9df)Ej!d%Yh?o6s z2iJWY{3D_H=MHVu4?XG0V$VUmtvRP$t6w=b;Xz@mQ`ICWFo0iZ4=62E~Te%p=e=-H9&0xb{ZaAn$9yF371 zu~-3wWb$gn-}`kVZ9Y-2gCcFbr`+wOK*_ug=-x+8ex9Sr0W65lGt4e}zL%}v)`5q~ zt%U&YzS}6f;Awii%&>dQ7)W(m*MZsh3FJg@ko^!SxWvDIaEQR(Nl=&BCf$;448N#d z-vMy5=6)Z|UR$z@Yia1U-X#E)E!Q^b+Cb|hd2MpVq3a)|p6F@cU}m}9gt*l;$Emy> z#m0o#^e(=1>l~H&B}B+_oWo*373HdO`NGs{4@HD_qp+nE?ogoCfaR$&1nfAg1UQH# z`~FCPXKWUJi)Tr231xOmZ|}RP_dsrc-3l#u&^-#sB8k(MVgdyLxwqfpuX0XlNeuL*FDLcAXuzJGU^{=za=VMHJe zEiCU_fby*GMuZ`bHh>@D%v6|#TquOzy&7dVO;mVfhy3<9u`<`XYnK!stZ18gYweZk zM>BBh_m#plIhuDC3LHp8e_JmOuC{5V&Vj+Mx2JZp$YvAlZ$sbB;Rg&UV*B)PQ64Gz z^K#UDkgNmqx>Scw*@=}52LELiGm-kX6<4CKUm|gjTs62bd1|}_rc2c- zZh@Ai=O|M|&knB8BRwz|5YNLK04S2l)8=+%X$=4ek5eUoGuVpeJv4fRcf;&ZqTv@8t&kMPqPw-!swuPliypNJAqJmUnVDvuRx@ zjs`xaAMV}srxpqK`pUxKomk58k2-^2*4=l;ee&6VbzI`y1z5Wg;?z&;aPp*eq{=DXD|4cOuR#|vOoa`FBWxQ(ud26Y`@{l=a(1j9>K{YuiqKa;NeowS;b zlTzoy9*}7f^miVo<0)b*-?mO|C-~awHPE!j(_~IH;zfxk##lJuKu{x$sr9p?P4u`c z?t`fcJSHjf9_J=MlK!3me_7co!uC?XiHNF1Er_smnSGyxu!_O{~$AdK10 z-I%+)(k@n(`r25|Gkcv>0<7-34}}2A4_VrZe8HVKHm(2~qDHWoH6-2s^B~Y_!-1>g z4du~`aG^;oEvyID(KO{87+IqEqZ}MH{<~V~2FP`$<^G)Ar?8Q)f1fV}LOj}N8UTrF zW?Cq`DvSQx3j{7GoMt*O&XRFrHUZxJg_c#cA|!PAmpxp{_WM_dB~J1v7iI!Zza~E* z)ODed7#0T`^4n?H6#U?%Dz$wkbeM+^&KkNx0K@Wr+Q-e<#w-q z4Li`bp>2AE`1|rUTiMp=*1G20pPQ{_e>7||0q(^nV~*4>AS&kdeI+0|*C0NCLVTLy{m z;zD0;7aGI&mhT?DS*#QhwV<#VR7rx=;d?+v6 zrrwtwM{DTT$jypvyPWh7QxC|z+@-ompPXe5UOn9E80QNHXh0RzxklI(+GfeE8DFH! zB^j~DV?)#81{`f(I*?sQvx;uD!eZ?onSDgosKKrB`f$ou;D}x-fY{xJN^RRsoCyNh zMpl@QjB#nXMeS$JtaSwyO|+LI2fITP?T&JByY@didhdwpWrsJqKgk+r3q2&^tTDUI1KyT zCq!`>+94)9d;gBA=S$d;1@tl24uG=Ti+(pCFpEHG_x(uhSkqrW$wMJmQN!s+$Y%W6 zl)Zt2>QXqsC+lB`m1kaYoxGVFyRh*8W7Cisqd@sspPK%TFx1rI?Z}MU_L;KGd zs*5(Y_Q^}HR1DrwS$Zn+n{}iz9R>94Fl-f#73bAGpi%%7lj&KyS8#=_kl9qf0*F)C zY7@oR%WbOuWmGbVfe1xy%tK0XGc3g+HOaYRu^?D9)158U^*x}pW!dcd`Kl1>Z%6vy zt1(ojN+b0w>$7{?Pta9NwL|nbk@W6#a@|wF_(3o$8|8Xn7@@+|KCB&N(cxKc$ta=J z_NkR(T~WC#Hj#x^_0ZB1$G2lGXfbPkB zJ?b+wx*k+Bit{daFryKYaT@Y4lvMx&gX*{n_pFt6XcJ226FFWgT6g*yw#M5&5j zP_Ie0>82`u6C4=0+zzkROt|H-xqgrG{%9%uNANXs3CcAg)w|s3Y*L(9O8yT*eD$LE znIZ82LGpGAWY#T@Qoy1#>X7C7t|Gf^MTC_dwdkj_fv8 zAk?mrsSGi8-LX=>a$`AX5lpX|_Ekmv{s~A3U?y2Ff0RD7F3FV>zy9%>xbVg=^OxZ* z51IaZekfS# z0j=3DP~MMc&Gb8ckDn1&4{)P-A)updRh;$b6C_!K$!dfXQXCu(V78rrL&GaraOz*j z8QNq9ZvwPo+P!<=Tdyj&Vv0ez@On$5jhD7no_JrXCU24eMHw z%IYJy4<1o|BUJ)6998t{WMQJ-7m2GT_#nOIi*l5>kf^jPVY&ZQE)B7e*1{e+0GAEMKQqyJ`#tueNWHSaDmmkmz9kD7oV?*<~YbT5<3W?@e;_0_xxJiOv zs=ekh=@*Mp9t?wJhJy!e2ZNW8D+oB`Ii*z)HLo!#vu6fyUcod#2?Q} z#bR&7g*#9>YM4BI|I} z2frS@hrj@X`V6a%rV9);$T|bi7M)I zC1#DE90K;IM=tsy1tDYF)?_6a5pxO?h$;umOUEx<44Rf$2UAR5hHA`*+~5Qm<*;|> z-|;T)J9bj>3Hj`r3d+LmRaqe7UZ=X-KGvgOBQG|iiHYbI#{GE3xlCzu<7IYP258&e z-)U~AJFEtrxD$+!g7&ZOX3L(YaHJf_ypt2X=BtXs(t_M+=$N6@u9B}qJw7Q$IhM=!7#8ZUMq0jUE3cGy z4gL1v}tXe@fg!R$x zb!Nd{d8#lhUBvWZMC-d?3}i?Z`}`13_5au=$5h2TKjUz&_!_aigu{wmK2=Wstna*c zW}v2p&xPr8KPz%Kb%(ucRH$z}OnvNvjLdlS!|k}2d`w%~AG&+x9`2~&aviqTa-DZo zF^MlhWwS!*JM*d;w83_BM~Cd6OF5iWZeYp!ucv1#h2xxx)R|hfWvl;=o8hyO^Lg3i zG_$))#t~{57v{QxA;j}eZzNM&z*-i$e=-x94)JfD69gG|Z>dKUXD&G#n>-f&yI~)A zLP=`_zkoPIM}YkrB@mUK5__ZE|AgjO{?9pvxkg4H_I>`#dsVr;WnCxIfnEA7P`*Hl1HpYnU4(uYeu{fS}PMTY%H@Y*DNC*>%)pGQtvvH#Ays z2j`1O$xJblGPGCFQdtHmw1anXvX4{Wdt0J$V3m6d;iQDtz+`tclTP$BKQvm3l=$ZV z1e`~d^S&lgU51sWYF9Jq+%Y?h@EoPf+1NSXeF+}n`9mXrRf=So-;lodre@GZN(O3l zB6FNY!o?y+ELbPgU+I6F3OqWbkvD+HBDI-uw*Nr3lbQ131vd(OM#vLH!nc`$T}H59 zvIhUUHI_po?;}e>Ocj`OPEw^SGdr8~1N;eN;C{0`pfvD)cQCo#Iv)vfC60LOC9cc} z=IqHmrK(Qp;6U7KMUqTeoLw}G$)<)!uICcz$HkoVIf(DzrFp`o!6GFmxIwo-9TgIX zm|>kxpO&0;%DOA3H%=pg{wzY0bBJV`^i50)607Vb4yH4XS8@^r=NWhmd;w2w^>H#d z_hcV`Idi94=^L`xjJ?ui+MAkQnWFdnf+hkJo)v{e3+s2Xu5E-M82SV*JWh=csqJPZ z!#x@Ml0r5P!$tzyg1yRd9)MoPxvFYl$zGawG1+)h3=(7bdHRN^C%CEP{Mc%VGqf?3 ziMj{yB`QWTbQs{sqKWNTaZd)i!AXeyN(6@wqywZ1HiG!VR+5@FhxI#Ro|Wf*d5PJp zVg>5WY8OL-(OK$Bf4kvJ?Qqg5nT<#A&ZEtqwPJ*S9VEDUq`359^|iVN)p2E(IDGn5 z7$>5#_<~$Qq`KIDJ@I0O!vR_$h)WEj&b5HMKkfbN_&Z}ceIYlaAKlv) zF~rw>!KqyV@OsV=7c`OnG%ZAl982+9wa0CuS(qEl=kSqJX`qYt%1w;uP3Y%wkub)& z^_YAcmt}lq2JF?NhVF(XIZysD_M6m=3eH5QV^mDh2X$@Q6UxTPT~Z>^oco`8j5HcN zz5$05?Qfiv=i;nQYXW&azei_kc&6}9qIsvK?>TsM%UoVUFOE~615UeByQ?i_xqHhl zJJ%p83n$D`3Otv(uuLj7Ai9Ko_!Sd!Dwis0wav$)EOA(z^D@{j^XL%r-%zvL7*lQK zT&F2t<0f0pB(N9rkjvSlY+lY+A&|y+!V|4beRD&W6RxJ^n#$*vTTFXgSsMA6dIl~+ zH1GZ-ECT++-|+4I?%X4lAM@3<^~#m*muhqvK)$&sp^;m-lO`{>n=77Ih#dB(E}YG+ z5~!&>68TgEBnAveuZtft&kS#;Pl>i@X0RZH4apDBq@ty;ZFWqf&V9cMjncEF5z$xb z2!@~6+B&0}29xRX!#ItA2M!a*j?TtGN(}aP2L9(h!|g(ZdL6YorLGKkAiPSD#EhG) z>DY-R=m|QuMyDdZ7j96zupX&0hf2Fm%R0~SvlvMvC04IzxFlRbP{Z9tf_pdpGk286 zBc{QsZ>$=MiSb&qpmZ*>zMAN;AwqG?cLh!9RLurk?2K>MOLY6&lk+lCJ7bvQU~#|g zn3d@_=6uUAcn_5El;4pPS;l_Jy$$cw=umekW_`{co zMeNd7m^GbiTWzoQLgyqW2or+Q{syozXeQFV>(<@Pr=KOv&~W7M7b_`R==cGdlrBLs8(8C=0z) zsc=nYjNm-x(nl3>=#lfXa_~&~MrEp=9-_$8NPL&hxGM?A_29?GgoU0)VZb$cADR(6 zW&f_^n(}@ye$JIY^zA_;Al3fRj>Rb(I3w^u&VZ8IVApZ&qPUIb_f@on7M@)UL3Jtw z0$FP#e4nt?c!%rmU@Xl`j)}4nG1jc{*Ol7ss%M_Qds=55RH2(v83SvWeFYW}KFFFo zY6S};N7%9VgiIT1Ce|)_Xt$?nZp25>jBxI-OX`vHu(O4y(;O<|e)M;m0pnMZ#IG_9 z1T{#pVrqU8r6`wzM+}{w%jOi??u2}mi2n0zVZUM4hWq-#i)_88|JT(&yCDUGxZIjQ zJ=nU0ax%i(+vDgGC@~(@u+4XyQNQ(MVk5bM6gh;Zlf5;hf-9G})l^b}dK>hNZq1F< zAZh&95dc4b^ya8IcitxuoyHU}OdcmAt*EW6&$#@R055QuC~%5Lq`#$(WwWEl!#?4X z9C*#GKB8+;+E7JAVI-pNyF`ogbuTVhHSBe!T}eLQI?Mf`VFH}?-uc9VS3oKfv4pKo zYm+PwDOI%iWoiUl?e*a%A5KJako$8Fa2ekGg5_n+-;4k!?8Qrpib6fmCk7+WU5x=- zPu%OFO=i$jhneP>3}=1Gy)4v|>VMX@lz6I5bqhy+NP(%@X+&vfuuCZoYK5BVje4OkQLMgsEN;H(YDM9*UsA@Ia?Ot_g{H>1Fx2{!K~(Ng zzk|?U2_CZLKg39f9=$kK=LrK&9qJyxCR=CHr0Is;4*fAL z*bulJ(FGpAjb^aAq$?R%Qw$*tK@i&~FDUBNB{ozYYg{xlm#damfh1TyCt}F5?o60* zp7CuCEyp&sUN_Ir;DfDAIcx6co!FQ3w3&)!R-tr4qKOToHNg$0IMw4BsfAe zYnsiEo1G?GjB9%xV}+p8uHPejn2dY94eaz0&!`>pZ3wIEo{NWJD~wly4R~ zn`0hQ*MjOFL}VEEn5@!8G%}x+i9m`66T~@;KnWsCQ1JdPogl4l;u=%-lJ-|wo5mL` zU05=8#)d`q&6-t5@;OA6-&li6D$mH|oP;>GcDWWqYdEl!boRd~%etWlt%6#fP;Xn~ zGrZRHu|QjzuABmD%I^w^tErZIKM;|)nZB;=c;CGzBI{iIO}7VIbZIrWkFRUjS)TGzd z8iH)F2{g+`o$;qFuH@M#OT9jk%6%Xb(#zEx376TYPn1bg*1N5kC;=3t=r#Oaenj)> zgDl-eFP~6)jy-qw4+oCDHb;Z`97<5SW^|U~aaGmv&xXrN_tIA385*V{xN3 z?!!I1{)hkAm2+ui{!P5=(ODaUr&s|z20fUB7%EPzJjdEcYNdBAD=8IyTQw2514VqUE5<%80c@Vwinh^>t)b z=*(qRy*{T)W4Ur=PbClrcbKg_jIaq$b#ElTivXBR(7$ocE)o9n-g&&i)45~uDQSPT z=|=(2!ekzY3}MA$SGvM4Y$U0Fo~G6=ijN!=BKm8|*3m&2jI<=!H(ig?JMXqcL>C^t zr+8#C+Wa|dxIS%LUd$W1u@3LUU}zc>nP1c zVMK7KTz>pFvJHCYxqW~M)ln6ySXxASxeE82L{xGUt`+iCSj-9izS1gT+5_ml^Rfr9 zrU>`t@5Xu1JmKJ{#w1E08FOG|REiAewsTm2C-A&sR82#w@2aQP`r}XMqWZ2b$O^FT zjCMj#m2P0W7E^u&yXF?MRCA9lwPU>a5qkovzDtZ2i@egGSF}N-SQrG@HOky>*YqVr zWa~iNc?2r-o`^z^M-={1l4x$PY8Zn{m>k!^YVypCt&Ils*U!gBVg;Cfnq{`)0uvmZ^&LI$_ z39Xeqpz!~6+--Kk_BpAx@%a?7Opy)aX6TSK34S+Uh6!NV5aHZ_M^okYSm-`o0?8Wq%hYWne^{$PQC2pg_?o9}^>JV1A&%1k4`n-` zF_3=iQURCP54)B0PjGJcM_4o=tnZW&>+vf&(-Kd$-)!e(D~3MfvDB~h+C+;`EHSr>r5J=y zN+mOWzZg&Mv-W0O@`Gx6hgW|6BE1|H2B=GY!=v@~`2t#`$=Z8A9Y_b7Aar#5ZYi)+ z3~vUC&Q#LR$Vu(0y&0ATx_wIoy=xn~{yEzP_bnW(30(V?WD!mqw2N&7?nLc#=NjdN z#*e%AUMynR?Y=AR@yU`M*5{RgKANcaWY-V9Iu%8pclb=;^Slupka-v{ z3l&+d|6G^N$@H$hVA+d11(T2S9c)hP5B@oRo@%W`%mSN0*#uKfYAiVg1j-xk_jG4P zb=*O+&fqPBeuoqn_{c>iyLP`R*&6zD>U~yVk8Ue78K#o-C;HFi7X9cyEo73G-`dvL z2NVFN` z?yz09{8|mOVv8a_x3d%Z#fJm^Hl>E04a^JW6 zhGqx19f_`ArmebCxpS!&=|MXj9<%Z1igl)k(_{bAyx{SN*^Ww`1loA6sFHkvCkWo)n-aV{q zUL59T<@<3LO{&zpuJRYE?wqIA>o=W>4^k^(XoshV`~AbKMO%i56uJ zWI}HJc;#n{{8QZ%xD0f-ITuSdHXhR08XNoWh=2pU_ty}x-XZ>mny>Mf-mi*K5f1qr z>tGig7Tr;TS)_qRcX}W47NGfqn;1ra02Vemn>`e!xFeW=e>Oeolre<_1(g~8hE>0L zwe-T6Mz4UM?)YOc+OtItrD{4SqVo4Gv%>rpg^BpzW4~Kj~U-Z78@_xPa+F&d` z-3NEpu1b28OY)S3>a&p_zMo z(ZKv!r(3h!WNcES2=}8`xEPy&A+#hBS$N0w_IlFWSm+R$iq)aC3MqIpot(AR4Fy*1y-Q^H<}MW^Dg2*Az6UGOfpt*e zJ_{1V7Oi_oN!~<~q~yt~Sy31>o0icE7)UjzD%#P_*01*UrSV>sufD+}iqc|qy&s2w zAWwr5?9c|8^>8g@6R}z1iS%?g$E3AVNqTh5ZeK{I-euzLWIC%xH+M37b#g96A&NJ1p9q)1d4(wA|zwbI}OVpUOZw>A=Ik5}4W0!H1Hn{v% zsTaMUU*^hmrZ8*Rx#7|Eq&W0s-H$>Z$uU@2N&?;&vkk0~c_?O_EoS zE~@NQpQG&WKMwe(cbBHWOZwc{Wg7O$)s9|6UY+38d9TaSkAqh6;#`;kizqU!?fdD->w zD){t~TS-UWi`j{|JLX!%ddVBy2^X{NFR#FFlE0O{{XWPvp|zLBF$8!AxLrBqtMa-x zXv;MJwCLK&wm^h+28`X>GkNw6z`qWW)fz&Qj>vLyC+664KI2-uAEe#CIt-kW|9e-l zd&Du$yZW2en)GsR62u1R{u!>r$F*t_-g?Pj(FUSE_f~P~Hm*a4q!}T24*$enr#o`c z6|+}T$vS~&JZ&%v>1n>M&JwRFH4@n4x`>rpX?3A;Im0yZL?~DdruFyWEOEYhwDba4 z`yD+TMhFI8=vy#oiDM&^e|WE+Yqi3q2SL|iUEr;a>u2SZXbj#=Gxa<#UXCj3JEMi? zE;8kq0dAJYynrl#{_SBq!qNFMD*ahiYR7BavzaVhMqWa9@^c(y^&Kz;t<(!t3dA??BpHPs zT{WgQ2W}%q+5+>xMHU-s!HeNJSs86|T~nh~!BfjoEkjHQKGHy(pbMv8ax*Ic9^rT1?U%~voF^z6w;kPPIf zhcLy@h?c;a8LFnuc!J+O3r51v#)0&fARm|Ir3 zY7H-1^f8{h3IFUiJ>R7%1@c)wc48+q?+CLRUEiZgXCRxurA_~3WdHoAFi&Nt(Cy#{ z+1sr0D$QafVG z9eJ~MgVVsUMW+{cTGewy)=zd>A~q%XGfwBK_8p-_bIK(^q0mK?GWTjCU?(>(KqQFu zo`a?F=Mzo*hfX}6+x*va31@by#E?`+Se~5ayXTFok)>ZkSyeWFj z#}dBh91UxzpN=1ko)_7fchJS8cF9k9cpv)d_k@D9(NpS51I}v)a3}5Dv%Y^w`#rh~ z5H>w%XpZQFUi}}Vrf&=bswab#-HconpWR;qBBvbPniN~_FNX|S`H}$UoByN=&~+O^4?}^I{m8s{EwXC2GMwhQ zz$7<1SL)F1`-ztn{(vcrS#uy(qhXyQGeOLAi19KAVneI2v7QYB^_YnY`&hDaFVaCW)j zR3yUUK4y7mA3hsRtnLe1(napk&@_>nHpsZ$&nzZpp6Y~hS6C1$(U`U2Ng4gOo6+X$ z3GF7rbFpJiR@E;o`{cNz#T#$T>erRB=D5js<4p~~M4y@|F+~D@VLN9sinZ}%vm^7 zdqN#oxpE1trcr@oIz*aj{o;RDl!l6U3?YUrVy7x_>>p6vof>=CmGVY{eP#0-a;f&b zn`%f3>{a^H7@p{>HbvS7^d_z$VKaONk$zHuhc5o7WAm`7NSQi{ilNQyT!$57RxBzD zP2j1!hi2cfqID3HoJhpg5Yw&^f=e6860}-pbV0z3(0g%XJ)BQ&*g$gO8&?>kM>I^9 zle40lvQbQ#`^f#B61YXRsQEQ(4LPw)_rzywhEk52sXRSCRz7g z#{9eXg<6N%q1Og!z5Hah-l}jnfqH(CxkV^ zW8+NlAf^PMge0^Mk=RY}SgCCLqjLD^k|IB}bd5ko@L}5YlT175y0D!BqsYfeJSl~7Wxf8zf7@?s0e-!5 zda`khRLMX>RsWzhCcfjZJeMg9N!TeXW%j@gR* zmLyM~n~XKT6r(hc8qbUDYp)xYLiC(%mz6`!YKseZyQEx>oi%A(jy@cHe^a|(ke7P9 zAjLT4Qax-C6`af3<(9_hmIF-OI3(79m%oSz1x@<#6{IDM9{iZAri&+XXBBlzjqb{! zJ8k%PrUtCZ>pr0I=Hjrqz0x6a_#Q?8YBipF4%$A^RS~yy3v;;JxV{TvuPDS;e5Gc# zL3X>A8dW(!X5-I$l&op=O$fQ9Ht;^XHkJ5DjXRV(>5T?1t#Cg}dUzeeQvBPByrm8E z-)N3Fvt}}zafVcgu6Tq&oFsXKdJgEYkUhqCar_4q%z4&S4DQg^8p|~BRNtIe)Gd2 zN9+sh;kSn*Cag0s!$zaQM+f=Sp|7s2$K6d`Zc`hIqd)*>r};ti;TdVX@1WBrg}$Sr zn)ZVcr7?Or+n$8eG5d7F0(cm>?}^%n!czGh#@vdWM^TtwRS6y?^?<_VAl(h+;Y3{B zHbxl~_n`q=qp8N-7-};$EeMV@qQnJ0IS?0;e$wgxDAPapuet9iyqkS;rvV}Cl~HR$ zlHa0}gNSm})70#Ar+YHit~5+0#!=A9DvPuxKP8yHCG?1%cI;fd;9~HWD&iO{!GdW1 z-2>#%?ro5Xx8YAVw7XL-m5t-qf<{JaD>ty4UiS-nQ*UYf)YYLp@8Wu~=uD{3;Z^;f!qoGYkwSRSbb5E1(G*U+^ejj)lc)Zy#0i9o>x}kj; zV?G4N+9t9`=aXO0Dz82o`tQg9d^UshG6;ui+U-Wf#QJp%^dSr`JU_3f8v^kYlX5UR#U@CXqwp9)acxId&qn@jDEN`f2Eu< zojH-S*-~aC84^v{?JvXhMyg8%<=7#1|5p;c%xqK zCO{;K+zsbS3+36m8;){_ck{=()Dp~+p4-F;n+hmVen9d%5hS-7{NmQez21`6z4`N{ zlL^*=!iXV-KqTld_!7j^<2fOKB!E6P*~pv-nh@U4_WFo_TF1Fo)GkK|W!+PT@1=4~ zlW=a4^c9|}NLKUSE}*C0XqzL!oGi(lBg&n4@^|uw6*dc`;it*%-|)IMjTh5V#uZuk zCkjS;qHC|Omi{noD)uVM0hCDW%^Zo77@} zM_*u3xpG0nnQ2ZgqO%O-W-`86Y@AZ=b5ag{u*4m#!8Ws;cND3h1T*lJtz)>iL*vc&+=_hmbN)b(zCE@*_9 zat*NWAw9&9B0__zCQ)iW>D}o#>PBqF{YjvzIO=t3vT&>aJa{|nRWgi!d95a&P9R}W zeND9TC?nH*wTie`wB(Gun?>uqy&av->p9vLM*D)PjcgW8 z|5F~@#BfC}<#1t^EQ%mKCb!f^SD2dTtDacFst;@8cjCflaJRoG?nZIbH8`>ubLr)A++H;S}b0q^-ZuN3s(m(H-06e!8|kMWrs&hrOC710j! zVPq*g-nDjN$`?Z+ejQDV{F&)5oHsARw=%_v;5+W@YabmjN8p}3-vG14Rk|b1yR%~n z;aNgkg0{QgHfe$$=oxwUu95>$8Tow{N zVJC8orF@LJMcwhb94(TXie)|B^2whpLBVY~_EO3Oe{4cl-#0ADEb>N!k%JZ?mmbJ< zf)V&9}7OF2f_luoVpT%o@~clG;jB47#VV4RcIVU32J;o z)@vW4;o{}91Ht>7gzy4KjqGgHJYe(bu7d!&AG)26IkP)%kRDC+w@q4?4?VM_mnJ70@j&|2ejj#t5fSx@*2oF?jFu8beNrhy<$XVu#Bp=as7lK zXu^j;hM7(^FU!Fb;q0F`|^LrTR-4i0qvxxIWd>Lx+FNBkTA)GnDP4DE#<0q+S8CyPw&r5t|>wrAb+ z1dt*Q9X;<9A}TY*4HAA(7hZHjQO=>E@!}zRYeF9M{j>xaPvhvPr^}98^>V9>=cJJ z8jpZ<9H;oXV>4#~OHucG-*4K99@|u8<{Jw@0q^=Li0T;an(bZqm~M`+9g&<-qs#Px zzApu+&-w1yqNn*DPjL64ym^(1&eMf4U0bHC7QWp5Sn zOV<>>QA2+mC0{a+W-+6+ zq-uNOd;r1kU$xI!y3mNxhXthZQ`jLjjPpLF=!4(6F?CXRIf`&o=p4~w@@(XobB9QI z&>u63WPHEdk0IjBc~;TU9LbT=Z19m8ZV+d`&Sz)vK(hP9v2LL-Mh(La2fM(m%cVSn zWAa%Ol372Vjfi)@NB-Ehng247aSl!C(VzwXv|wa~XA*=Ikhv_qm(@v=#h0%#&9WD~FvgM-%`AaCv<$0q#;q1Vo0FYrx9H{rQC z1m6h`J-w$~(fZH12wv_L5IE+uM9Y*%%de`4yOdiC;SDNS;O98|o<7t2x5~(MW|sb_ zy;}(9C8a86r4_9^_MwzF>or>JDNNW>J9kq(44dE>hhXJ7=%;jC6y`9 zMAQ|Oy?M-1!rB!SHz4bd2Z=Ys(6EGgoZ|7go?C#EyZe-1JM@0VEX8#ctF3N2sj63d z9nHekT!HJ( z>Bxj^)*9}n09$-jKS&2$cL9$I&!%8}7uK%Me=BYfrnzW*nMm`i3A|(G>jVV_MJ?ZK z;4MH9J3!h}f0_&*K4r*Mj}cZgCs)i(A5C9n)#(w;vvne<{Xt?PI4i*7uH#{U!81Gy zfHE&{=#w~2hRdf{#}Yi<8@59F2JCmye`Ho}pG)f` zqJQW7iOF`WQ#oM$&%T42zMSSJJ~wXqoipaKJ@5^03XMUpFdQ%urXpRJv2b`J+0Y{5 z8Zzbx3gchFpIn;3aV*lOQ?p@Jg#!Y>)SkL><;3c&d3rz8u1jyTE2*iJ4vYY6^mlRV zgaQHw@~T&V^A{96{XONI1>p{rjbc@aLnqy>IwWl|FwhzoRO9E6f#%JP?lCu_;K(Qi zwx}Qk`%tcu!PUk>=@|3WaNf2fA+s<#bmlU9_J%~0 z%e!td&@?q~ZhB;YSkaP;bh~VeOIO4z!&>U~riK*rs1Kw(T%1q_G15Zf=6Lds7seVY z9fV_!lh3voVzmvU%?aHO(QMyj?8bCSBLDuSC<=Qp68$$#q(4OhzsA#XVTj&AB;+V0 z4o|;NFffK>@H9iF%BO`rMiD2^fluSwkpu%SocC6nyx90q9E0H;Q-#%WnQ4p|$AYh|N z2Sr7C3lIoR5u}%dNN)=Zhz$ji-b)BQlte%fD*~Z}9zZNW0s)0k5(3|hYp=84wZFB0 zoImHsx!ylq5<~JlbBF~_*?dt~*^9d3RF(R}-DxMai3GMkKe$jDH8BzauQL(z6n z*_(Of5uvc-3cOHaUTmn5qK->FpSSjLZJ6)Hlrg;6y8z*m8YuU(@Zp}utGslM@m`;k zhY!*fm3Fz0oXNDjx6kfQX2Nxg3Zh4?^mlvDg8a+begnTgqX=uR`|fV-OpYwwk_&l{ zFA-W%v_!@=5_(tM192Irv4wZEQbq0vO1?4C=tL#iKl&K<@?kyz`%RmW^0!UJjayS9 zchI9=Y?V9=1Kjkwxywvae%6r3%w^+?)D1D@^G2__>}QJiB&K6$vy^kUlT0p0of91y zs0E8|B2yQp&R4uuzg?w9d zc^#B^P89aOsUtpM5G0JlU6Sfj-<_FPnO@it$G0c4L(_Xsea4~@h~x$BKEx3Hw_3;x zevXc$U7~~KdS}mY?1}jzD5#xMe%d>bq3kffI^ccO85dB$H@juc#lIs#VRgR?vGC(| zHA-s9#41Gm{dQmCkt4=tY$AJkgN3Vy-cE4N56g*~L8_ zm-b%TYi=ee5)#slmsbC1j6a!d^h-TkVEo2eTG-Pjm7a_X+%Xos{u8oDzA9$P?%CLE zT()I&CDo263~dxnkm>a1uK zQlc2Yn^=RdN97IJ9u~SL`?{&RVDrgvBP`o9;|S8dNa5f)QjOI8I9KVT^5BfvM||I% zdR2#{dTS3m@_^96{=7?g%f7CCh}373bapnAk38WDSe$Ha6+d6SCpZ!Q!8|(X`a^%~`WIY^>8D*{DOa`t z*Y#BT)-80onCkd8kN?CpCR%5K^YVlJE-DkZ^TkaKTpDmWWvhAw_`>3jhf=>+HRc{~ z31=BsI1oDN-_>-~F?Bw2j^n)Z_0~w{c&lS`=yTsI!+~w!7DXS_xZ0c#UGY#^|MuOb z(vJNvEr3)fDvTXE9~0>OWG?_Qq?Nf|>AW-r;QsYNJ(@!Z$;uyWGI2y*g2ceo8P>9b zwY_Ab6IbbvMt&3)du6mLU7;v%vFZXqt^6-X?`T z+;{Qj7~|JW;ZX!fCPd^P^RzT+o52kEDz#zkOCzwPNif82YqLl@N{ z`+%hXU*7=%-?27z;9vLg_X}W|Ob5p<+)=2@yuyEd$1Ct1uef{u^SfF0{rj~eCv*tS zb?rqanVuK#>1)4Nd$v~e{^Shxn~62 zNiP~|0BK+2P)O`=3;w@<3_zoE!b*pM?ve8q$&i9tJeVoxlPF(bg2`|G`A%Fpl zPOL9!6o;5|%~V4M>iUnS9i>kLF0gx##`1$P21^K;i~k_dN1Ke=Ze9R~GvCo1-8gTc zP?HpvDg9p-U&n`Y7cMnH>txK}{ERklXa1*DGfS*iys2yb_4D`H_C|AV%Cq(=g>!^@X4x!(cqP z4=A@KhGDM1e^?~?ZDACfn6C24w1v59k6)VzgD29!VD!&Whk&<@Zw}8s{5rM!pEpfd z2dvpi*W5TNCKsfm`wxM4b~8KjCuZLW#4gCOVkOX*)AM9H|4_RfBe&S5t-WrjA$p=e*_6} zs$o2^!k(Y`x%iZA)oU%r{J9~%JGhOj^P?GY9O6?Lw&yLqJQA{ zSC;P3mTU`{npj$V1GHwxw{bphBPU%Ey}O;`ozz^@Qc5~#23(ZXNe?g^0FTomGa zP(t&RXpuSS7}TZY0~CVl09&u&m^{uYbnZB6J7U#bFpllnID#LI9XIqy5MTj<1# zSHwlsPz9W2l(j#)(%+|8?urEb@G(#ybk^QlzwV8b^jPYABcMGVx<*}y{nZFb)#_~- zD3TMw8Ubr&UPp(3xBI+~W}|KZy?`&PimTIo+#DobKFNQ@gumZ@w9a7;o_z?py5`xu zL?ijih+BOH_n8|r*{fiRJ;NY)`o1&_I8xW1IDv|$A7U!^a$~8W!ulGs_)$6=Q7bcE zVOeZ4juRe!D5*ILfGR=`#`8dMClQ`Fcjo%Lj-t7kK`=-l6-aav`BkTOsQ>zKlyr=b zzv->0{d#KcR>)jo>gdr&8q+^ahpsd@<o*olb@Q!{Crhhy(-{ zQo!8Cvy+w%1dRwfLK9gS$)x-Ge{g1cgK~|+AyaQs1X$!owzJHdv`GGgssw(u*_>hT z%GNC$pwZo;HVtBdr+Dw!zcZGq%AfUrIlkZPqQl1Viyya$U(~{b!5yTEa-eZjQMd#K zmn_0=%2`2|$^&=7ubm6-ShM7$pvL{Ou?olo}6hU7JpjaGYfN?Ci)0?24 z8Q8f9Y$BN2G&5+MdSd;M-6No~6{1cXu=I)JQ}!RrQu0cP0M@NAYmGVqEGWy1hzWVK z3l~M7lU84Py%X-`#X0Y}kOdZlg&qw9?!-ZE#aMZyV?g2o&cWP}+7iLQy#@1)H7Ovl zf;rR#R<#~7L3u$W+hc}_ID1TM_U-B2Dy?L<22yb1SX~Mq*K~m5*4q6P%T6EU&U{}R zAmx=g?9D+s!z1}$R^=*t2sdf5b-P6(Vx?E%lBBZt3tnfTH72HEq9)l?Ys6SuI-{>`RDVZhxFu<;9ou=ZKg(u_;ArG>E zj7fG%kJ^1WN9m;mobq>IuMN6!Tuu6jpHrY4l4zfiqy8}Nzj$)NSe*&ohSh-0^`Ax1 zcjO~S?aZfMfkIarPRRUpS@ij8j*CF(1U>|M85JFNu02HA@L57GwF$>-{zBpuS)9%i zT}mD({4L}cet}v|$3dfrE$Yd79Hap8t3QvyRTLth|_VMbX@^$?#3<_@2i_v$0ywFYf(^|NGak`oc1{1ZJmV>kIlc zG#Gg9eR84|PjYe&46jLORrRUhkc=s0p(4w@~RS3fC&|6^qqw+N%43AB<#R)+w ze`*XbBEW?oIPW{&_%1kBD3VFD8PaaxqFBjj-Tb`Yi&$pupVA0~Y#vH@fpj4;Op_>N zXPTkfON@_oM_!mtggr%TAr2oJ%Tb@rZ&MJ^Trq3KiD~b~c|AT2P6_{Wf&WUi5>A;t z&appS&hCcv`;r(tQ31z~z7zMG=elEsI>6&_j+4aWBJ!+QZZ6iB?^h$3@QQ!Spiv-{ z>0>1N`Td1BLG#^mvxD^m(@Y>A-FH!abLq{(GfR_zN6e@eeN=NOZCsy2Ta#ouBJ*Gi zKzy&)mWr&B(Ura+AhrN`zsL&wKAKOKF+pNJ)t*`Igd|!k(Z4_R@t6ZnHizrcKU>G4 zJu$E1sCOkpKMWMFK0R(&4#x)zU^lm!YbfOJQSaE(YoKP$gNtJZqFaM#otdT97j#ioTpsRTAS^C6aSv)iHNAXEa=dh zp1Q$*Zgwzop=l;dIp~KGWxT02Nm5hI*Tzd6fv#LE&W;>qxorGgQMyASy-{Rq?c?j1 zoeLm@bPwl^aZh`iS41`q+50u$KqsbOCP=(*6Z%I}5ZtAEs4^$)-Gc-5AjxYYS=|mL z=yD$?eV+(%d-uUHAjmjw zSQ_h_=JDDunEJ zr+4)qdLmm&@2W5^NiU`B!~UR-HB_E_1$_|)@+x~UOww~cJ$9UJC)e9@1v6^k0vQ2%aUhNrIGi z>Quc)?-7;LMSgp=1HXNEzzpQJd3*o4xwZZ^F7dtQpw5fr6UKp<2^&_L zKXm)Qor`X>?g}dj9Xd|Fjx$I;QGw>gl7T0x7SH$v&Ldbug{F=ov$sa4=L7)ZI8kpr>=UBU>jLeG!P*EbhY1+P^=zC>?_0Jek4d1Y23f1o3t4b-E%hNpe2IsQf*fHE zn!m$tXB>Ih+Ug1`(+-0(V}NU&QE&#sG8jHU87+wzznE&@`N3>wVv!u5*!k1U<>QtF z%tmyG4FnPHp>zwjz&$jZsHomb2KdGUYjmo*c%DQWSO0ZB~+g-+bs z#sYOw;0p2SMa;(a=|s5G1nbn94!xH%hLK6!9(Zc+vXbVWm3F=ZlXPEs4MbU7n-(j5 zYoNKM*u4Y6S)xCPlP*j4yc|)AKHfsUvh1Oq6-qt{Nmyh#(C1C*7ZSJWD|260CwpER z6EObjs!K&=T{x!159uTs@@=o>EVZ-5Jbyg8cJOj1dK>Cc!qor>0{ez z`j{XfLT9Z0pJiWH5ed;sW5CkBwKpT$7oYc*aL04VB-`) zG!1mA$DK4Up>jVD|M?b@*(IGFKCPhfVE>tRT=0UY3kQjO_U4DjhgaKq6+2eVzu>vf z)7(Ia4F+n;qjiO-owEutqbowxp*GWh_HHHoF|iz^tZObcKp_@=D}KC9L4H$%UMl*I z6-vRcLkT}^V;WWsnSV6+j18&<&)YuedPYg`1cDiogGtvpaN( zEtXnUFv9=O2XRneF$eXP#P(0u{@YG+wC_7K%WwE{;h%GHa23M((K&dT@^ayS&Itr{ z{`VsOvZ4Q7iT_=R|2(1m|H~$D*Xqx?ZB?#*ey}(n*Q7o6N_*?`?SU@xP%RB=I}wWY zyN*^II{$U^vmiWXPD;LJ=yG?h=_I`?G83=*HRe1#w*oox>WL51|D3&B=A8pG?sv#S z>(lSG=kJ?Bh70Uk$6o12xp8<5Rz36~)W2`Ak@@u|)43sh)vfzV)cDIx z@3DIMAjd4uPMfKPGp)lrAaH5U|nVxLPd^$o-aGsl(#wW^ZwDzy?& zuZ-ni&v8=)BRylumX#kjmV%uytv&?LnT%9--MVK#8MV;@*#M-X}-Q(LY))BrVQ-<0I745`urh(BGRSp=Mg_`CMJ~YgrpgixQ(H zHkOpITj*CqZ+P+)Pls>ztdeb7zegOhM|s>RUbEF&q*;C9d1utruC?jnFmbomx6{XG zk;wg{Icv1sxjW;+D!^@x03x6VC?MC;X>%`&lp{YU{_R?=V!@@pgoT4#VF3_IlDeuv zWqDY8d!uJKNOIG3s_~~#EjgJHWq2&AKnw3TSMBl(Vrc{iCwEZQL@E1CXn2j(6oOj* zCs4vpccqfkH%HvFN21wwW^@5E;6ZxkZiu(GCR(fM9Pt5tzQto+Hti;QbO@9zQR*Pm zT>wguRW5Jt*v)i5AG7)O0=cUoL&91#Hd!}8x5qFonT0`D`ShXc%9p9^y&}hUwJfKXC%PN zy~MS`8(9TqWq;?!!x2RhUy*;emY8{tva_>}H8<|FaInfqvQ@gW&r6^nA5{y);`8qO zuFSK}sNSKA6U}hv{po^VxLNfvP#(Lo3XX20pX4gNS^9pCSNdm&s9!Lx#-&+|3ZIto zhOG-B|B;p_OE=yaNj3yU4r9o1evKs^dlU)D{8q*c0Sh_?3Q#i-x3j{i)z~3Nb*n@+ zaTB@W)rySaGZZ8f2$a{b5W8KI)z`0tO~r86I4UQcBQJ-8N+KRU#EA>n?*Hyx)zjJ{ zH%!$W#TyS&)F|b(-s6n{zFRC||87ulFHh~dd6}eN2l(T|Amhcj_hbckDK)J<&+J;= zH`8>Z-S>WSV5HXV+Tt3=U{KN>MB6AbfM)IZ+3ofB+TP&c_o?xf!sS1;`ddNsfK_<# z21k_|0qspf#Kc&=PkMkvBv-`EIxSLjp&BR@Ka9Gc{U2HS-n}KCau}e-bI)rI$!eW| zTTZL{lohdR$I4dABN(f}K)MsJ*k<7VV7LS1{%P&L&q={!UD(LZ8Nv2FILIkmXP{9V z(+r+!-_%sQn+H(nP_SL&@rj^{*lTQK7SO(1dKi$BU0xQ$5@BkNK!?6Uzd1=d?61`XfexTxDvnbtO%0|W*8JN%;rA|Mx9&VpxKr9 zm|>zfEAZ4BP&d)~KDjfJ`JZW|j48++3u#XkW)*roJEJP|#1QE3^>pJX#zF%ea*%b@ zUT9%Z10aWl5l$dOUtRzDNL>b=V>WAWGD+uTEESYkhXK^njoi)>Dn~4GV*UAp^{vGC z>S4QLEI3GN*(Hg4uyunw-jerS{i=KnFJ2<}-ZlaGOm=oK-ViAf2u4-CRJdA7ISIdH z>)Z6b@9Zo)?Q_~WIAwtdz3zRt&i2*c%V$<)J%;RXKFF ztyV-m_EdyaR{k9*?`bwU-?b8RB$%HBGK^$ zik=$>=U2agFT&c@-fT*30K)WRz?H$}=0Mx{4XZHPs7QfT;xx?H4wWX<=lgQkJ%By$ z%GREQ!jaZ2tgrWC^IC<=<3=aYSFFMSlx&5_6quFjl^y=;K5Hz(V4)#I{oCV<(|S{T zk6wPkwGawUIV97CWE^tXySB>}KlA9g^5H~o7wjywxiov_U6S}1YyQQP-cwJ_f=6H#iZR2N0$UYvO@opt-jis*uV0cO-1biM{T z>p@p&74-^>khWS?lsnGc6!t zOkJ}r9N76j=5J2^(BpI+-B@4F9`KhLU76}CbB>6GQ6eDBD|>+h&^RSKYOBfKyUC))1McG8 z9GC^ND>VI>%l`hSv4Tuso}^B2LwUT#+;t1%D;>aoFPm{$aP%~=6 zS!=(R4V|2IC>Z))lxR3QsLL(!t=sTEWwnR+{6SRD>~dwI6{`}m0O}DH3e51W8DOka z3S4BpmlHO)$AxP>b%kGfXOBz=kNM2t3VSyrw~<;V8h&)zt#r@KQ&Mm%d(bm5p7Fp& zn-YtwyG^%Li;dEzVV@{R9J93|EP|ip@g|ZlI?aSEpcNv?5oJ_W#Ho#ERdK$g<9XEw zSL_H)&{o55g+Xyy#f%37gSzm5+40A>U5H`d1GknsZ_@1&au{HAMPNiGC8%(%((gj$ za-{S7-s@q!Q0Gmz&{V_`!bF5dmg;|gW!J74s}xP(d=?r&>v)L3Sq+$vW(4W70mVy zGy0E?Nl7NF$pf>L2>N{H2SeWk8xpZsLJi?DZwN2)AFsT^_Ml~+%g=?Mi$r%Vt-9i5 zVJX7rT^NlAg=AQ$oQ}nCTDgoc4pgSTw(O!L*1#Td$3=3U;8`T>#_7t) zhPUj^aY|GPe*g3q>lgKVQIaA3l zK*N-;U2-*_s?fP2FF~9(&wce{NJ20&1lga zF7l%-TUxif*px-T6-3O;R6lO|q_e50^DU_X%)<#3%mi{$*rCi&QgiU_eop7MJgxM* zdk#!1Xq}W<&34m%L>F0&tDrNZK+sOUGr09|S8MrdufVr5f(e8jA#G4KyI-lKSi6B! zv+hB6j~X{;Vyw@`+*({hJ0f!ip^}iGurCV?&oD?D-*aG#SABM{$sQsnl0{b7D-xA! znJtCAY61-mAcW~G+DCMY1ali!%siS>>(f-wCt#LqyZc!qDoBgc&8FYVd+xn^PY9E? zT?zSk-pp+Ym9;iNau|KsDsDs>ShV6?pf^uxyOa5kkLdRTzc)hTtYFKqj?I?P9Gcvp z>JVr!9tNB7W@eea#^k9JRzmu#OTFpd~WW_B3NfZHDlxM?$;0;mm6-wyNT{G$Ze+mln4yb8@lf~H@Rw$GM8M{vgDsm_Fj z;!>r8tvOyaZ1|+dFSdu|NZbj{)U6e%nf_0~?lW>mgXM;V@`mwWvHJ&3%&aZb2 z$=W!1Blm3aRydj-++zw=6BQYm<858N_&!Gzp9=a4r#NhQy|8sqgK zz@OMW;g>9J8k}385b6=ZvmD;5M$CgP-)`7%=-6|7r4!Odf^(qcLFbpJGChh@x5 z1+q*z=|-}#L!ut1B1FN5R+-YW)l6+D%?53(<~3TRd1EOr)U&IEK7_l0NqO(NyL8R4 z!tM2){y=!$yFeS0dE4u-X%0>pPBm8{ZY9LZyc5Nl?1{uwJPn7RP@rTIk65)~sr7`+ z<2>Fpt==#_`6^mk?_1IMAo5O!8DS)M!Pj9_4z;>Y<-6b{LGx|qg8WS`Er`p8?idVU2^1hGABum3LfvCOs^HKfe@IygIj*0 z4tYy=5f2gy^+7dg_5t`Y0%-@6v4%R_l42f>CO8~!gyqZa;un>2l=asjm*kI!7|cjS za0yS5&lRbgTVT}$D&$7K0#B@66w~fYY)*)5fP;LM+EgSh*QC1ctbAs+duH>A_vBM! z)>;bu^NFyGGGysBSI|$mPp{d3isy)ka+ypCPlX{Pe`y>Nv3D?a ztmEl^nPOg?$oZs$7y5iUE3dd~EDF z$FOT|Z~dZ}H|9?1<>pg)mU1&HAvCWFGo@+||MQ%OdCm`^`VJCh>Sn0WXdwX}tse)o?yfAD%BGXzjEZ>Nf*x z=f^R3Aj!q*!+o}pq43F1Z9P#-jjw7IK72gBp4Jy;0LdF5-Azy!pL4xfHA~&W`H9?e z$)#Q~RB>*+q^AP+#9%NYp>=lOo>}ZGfvFYM{RML&u0I*s`w?=2HiXLSgpjL;!(4mA zbaHdMN7UTQX4`YxFJ+D)tIyhQo|&6z4EX8|W+)&Py~Nde<}}bteNn!fHNW~bKH^4x zF5jRZxJkhD)J|B^!)H-hQKla*12}b4Wbww=HAWUXPT;0c95uXKDl+>la}O{)hE?O*zQ@E;JXJg1& z1phDn87XWLzhl*}%8l$6ViPPGjjdJGineSlTE6V+KR?rN+PV!EXYuB7lKYiK-AwU* znu^4D3NFyh&>H*Bn&OM>`IgunrnWuDeqZ64Fz$~72ssa8h;6-^DR&~QpTeJL1u+Z? zSZedeEnE0Yt*G{I91YmA>UqPDi!j6V+|hG&LfHJ#?T+(0^)vj(Os{EcxH9O>tM-$4 zN)xs-jz?Zbm=N`44@gH=#8Ub=vpW*w+lGXs7_H`rCr%K?KROP^X;Zv;IyAfO`+!?4 zeTT^@dMw)hj|lTl3#O&P9vqSp?%LWx=F*XuwjQ8cvprFK3l2wpmhy+=^yNc|q-aGR zPb8xzVR7H<)|9zo*lgMNmn;XfWGvqvr++x4O5}hpDjfW-r<;&K_qImKj0jKm;1?ZF zSj)`XXQP$8mtu{ll?Px}m_}>umh6oio$EW!*?IZ3noPP^#a_Vvu~G=`Q42Nt2=oi_ z_(LlWq}?UzISz&_Ou}O`!wA05rPRl<`k0qWaON-a?S1xco{ozdWcGN02gt)mZmT3t zKGe$RncQbzLLVIE`4R!S6nS9VQa+O?e>tx~VCpO<6830vyFI5@lX*8|P6=28eq(|K5H&6vb*lPZDE;FE&hj9jf)d=6`{2{Kw9@ zsT!X9#JlCbL(tuk2F75=(raP@^_f%(!460Q;3>=@&27qR?WDqM+HF<**wjsb7n$sFO!iSH)m6p%MobL+vS51&^OfCiatcQ%XdznC5-D-hRuFA~ zERhX26hSZu3IS11HEmi+IKot-z|=nb`;4JDZRQrZX!5m7m>WWq;%#o0no#X`UsHmO z^VaTCEtZ%^<<|SXV1B>^367|$5^)KU%+7(-1}%J9en-nMOCNRO3ix`YL2lwb@~VML zIr)UG@Ct>WO(MIyrzQP}wy6StS}fH8_}o7?aWL$1wltgoO`PvIVoHinE*H41?dJoq zTkC!C6;^Mfy7xt;G7=Ba!!DuX2kK`l4o5{2hq>uvmlq+Vw!)yjx+ow0v_Fybe{JYh z`NuW{%%L|8{ubNsaBo%9r|~(2R|{heDEaMusl4@#M6b3A4&g=)Zqo4WvU4UHQ#Oyc%6Bs zoSC_~jR5(R9?985l2cag9YPo78a)SHncNQCjZ?BM(=rU2=|(n?DDBC(ZbH0VtCKl+ zoshxq(bU;Lq))gCQ57~hK^bydF62pIs)43I<=jJc?? zN_U#+JlLlJDTF^RN^|`jaZ9ei5^}VZeRE1J_7PHYka3Yz=CQ*Ru0aU9w3w8o8HS5l zLvZW35*CJX*@S88dJr>VF-D%&Jn@?H&^{;ulfuNQ=4^Gup$s_I>=)JH2d~kx2(PdK zS49vrL0h}1ez^C*iHj9jDUdDXhA}CV+I)2MT2cbF&ul8w)>8<9R`f?+e_poUV+R(J zKE%*L?bw(cDII*G3WwK~+V3M~Dm0=^qiD;RY_a{YI1wR)blJ~?e{Iz7*476&!2OIx zu?_qX>64i^yA3%-&nw>HKzc5tV`*;ag>8iP`gF3uWJ!v+mP&h-{=RKtf7x>Lk1Df+ zsU{dhd9;-UcIA_>45Q*m-NO#W_b*dGc~olFbh)&olM`wG*mfY))G0ya?8ehut>>MJ zL`h<*UVQ}yzRySMglS_Yv~v&IWJF3zk##U@t)Cr2N?bRL>it-yBDQA=M@saIqzcUC zOCz$Ya7hk3EpA#0d-!09&;tR8f~i&`)LzRGr=%h zBiB-6LS|{tvQ_rEOiP5X`I<*)w!8i2TPxZaCct1H_o3D6hge9YPk%=u>D**_N}52K zBD$pnS;lTZdDc#TeLx!H>tpj1?mZg}pR~aiv2bLZry~zZBe6M(RrJ!lu{Na_=>lJV z@!_!D0RK1wknS`B=SQACkyw*-WqDDZn>^2!cjH82<-&h4azuZ61{9^#X=zv=D$udQ z=qTBy3dEmXNPTz`U~25!BWz>>Z46zA>Fm2gipgOxiV3uR7Y+;8uDVgfrkcDk1O`yK zf@51nz+t_^mF!&cO{MhfgY+Ai)9+eUlrVtWunIu8LpWqPOdL&{0g{=w$k&ckuY(p9 zj`-3d7d_$RX`E$?ID83mDNhhVVgCc>Kz7LYjj=#3=3O7SV8FDdET;^&pR+cb_X*^~ zfjNwB;;R16CKx?SPXEa4SZ&LNR{9C3%8{}~=hVw>ZZuoc@T>y22zJL1!-|xA4FB~K zWDgQ_TShoYzJ-R{%ehfyOMN}5RQLVB`LOl9mCA%5xgTyblN+6I;(8JF6pdV5Uz0}q z(@%%32@5>}O&QuXBT`*L;3=+%2X%Qh)J!}V*2G$vi=qI~lMevwg|QYxc0#!wql`H* zDtY(goXJs9j5|B%5dokzF{pZpPZhle+Gc!WC;pDrxWGE_c%jACsX(XV-a@n<8)>j& zhmA{)Vv@K@uuGXQn~lMIKFsAM-N)Kcn{=Ww+FbujZF`}!R|&unYpn-}+tIV@D^uD> z{iL8be(x$49&vwYfy(nN{1&n7x%jXp7kzr((EoI|5u?!UEGJ3JV~H}9ii+P2CarKr zN48jLgN+a=nPcWm*`c^(3XH80DlxFWIn9DLZJ`-!UTy3i8{1-D9<7{R6{aM)5?Zsu zAL~m4im9GDdh(Tn?P9l$Ac)P-h;72hSY-1e@~3_T{SF9uTK>r5c)iq)Y3(s{kZ0Xp z0UbVz;CNvT9RPZRqv@r@((X-X%uzoI7}8-(4|N(c79v zl`;E5%yp|GPw>~E-B@-m(aeo-af(uzU5j+>b+>t6pe~6}AjZ3Lu0PVEm*A_45{2)- zT~r4U=RJRiILC~00)hbc7T<{w&|)bV=f(bEVYujQi%AoaBnQu1>35b!8PbZyPsM}P zQK@FXf1|;K!Nzfp^V0^%rixhbWX|-qD)rmtq2&aFFJ+2ptA@*NJUH6haMm16c~xd8 z)0ESyEPeDDaD>EE@)h}fk=Lb#8R23|p2A}!&~E#<(8{hP62HguZMyBi^Egq` zO{fZA3$X|`F1K!3RhoE?rz3(;9ElV0J{fKeUfS00{+zcTx|bDyk{ z_3N*R^@Y5WUsLX2Wk0T}Snfc7Ux}>fa(?DHSMe2Ueki}KH{ASQDb;8IW>Y_^GP#hL zEj^a)vgdMXDB*3qH*7arX^oBh;1n6=5_Ni|>sy8wL0%3NC=^b~aPY1YF@wFKij?t` zVKNSEHPxBGFeN>nt=P-AH8a^Ws?zMYk_DysU@uv#9F$dar#R%QUkkUe)uN;+S~3CIo9=kj;sn(dx`dPxr7-8;>+Na*qbPuc zm*Lt4ONc8O?U-#z3|jKr7jYAzYmLg}RLq(i*A8FzU%OzlCcPC~Tu> zq`B1Fwj)k7^~x!eh=vLvS50-}yaOvH8#WZmS*_@I0zu%2UIfN6CKvb2OttcmzDr50 z4e~(l)aczm(%5Z%^6SAPF81L{+bbNpS9!?xIv=aQ$71OPgQhiZ?Vgsj*ljbHY~MGP zK26SyxmC*eTP(c%-KMcki5Db^>9l{*-AoVc1CDBEfvFzP1DX6zS|L- zmI1;Y@{FNNA=&nSj5xP9^97rTjHoQwav*RiU>19 zGJgVKJASYpr1+1#lxAlPRxLX{>^T4M8LbOA>{qjqaK?BHI*d`Qq}PaT9)UktD6}t* zHH|0HEfnt>u^Hl!Zj6`g@OU%NnDPp~*jym5-Wd7ID(oxc!bo>kU`rOprY?C1CjXtX z#Tj46lQXc-PS>Z(tp&zY_BKQv1XGFO4?|htMo^Yx(hJ_V)^K-0?wufU%$99|UP=b0l0S}*cu z$`Q}nf5}XMeLyp0eXc+xgz06xQcf!`6<+KSJ74ndbxLHGcO<{mc5O4AxV@^K?)J2+ z7J2t_aOk7$MH9JooYtejp&1>}Iz|~Hk4}v~@ z{cNLkbn3p;OvKex@5Xvei$gyQb47j}nXC7uiq0{}ndpEUF_S4w!SHm6*vdTXtoOKp z9q+GCrWqb|c!bk8%kJXYA(9~XLO`^+Lh$S`_R>8jco5^vua$!f+#=%GRn6+{;d~7gG znFtpceF!V3ZIwH^6_i&1?^S;} zahoKcObM;At1#n#s}c2ilNKcY^UJM~gC?UPbW9i)>os~|LBl-K9P*u}er3jkSwUzz z12>1Ll8+c3M%7Hp(GQX}baej$qx~5-KA1-5sB42MM7tiO)8a_KMp9!=V#99#iH1|+ zu0)eyFYpIBCnT2>HT`?HVa-FqQUb4X3XzlPhf3;wpKELzT0%x?em$KVf~M4o&%w5s zfbLEka%}QVZ9h|!<`Xk-#v-s=^}6Ux7PRg^5yu~_!PnbdNHLVnNg?%oUhmd=!3csz z1fxx<|H2MhQc}hZP|^3@a34F(s)lsASxc_9j|lYp6E0}rA>VZLgD3dk)$%jSwBq}Av=NL}lZ{tPF47N=(r@_o&=p?O z^S73Pj?!*HgpH+7Q2F0p{x_CEhm!}q!MQN->VJE~|Eo{vRW3dGmlnXkzvSQl`v3ZR z{{7AW{@4Fr!=Ir1|6PawU5Ed9+WyNPWftV&}&9T8n9JRl7xbk%gLQHFExN_whO8?Sqd34m}C z6DVT)>UK55-uKtHkG_z}P>Ov2gxc^U;&hZ4*>UOfBsF)iP;C7bLuWF zo^kV}AlERzb$T7pLyc@|#m{>UUy;MaJUkXWbI;=S=U`0%G?lt6=r9o!k^OgKMQ|Z7y9zeWUZ2zuSwGTLQud zsQ$VZuqT61rwHU)#`f=MeeI|Y0WP+7)td%(v>uGU?S853uP`9t5nd^+L(}FgNMFCB89$H`W1v-5-w!iU4C^iy@YVz9R5f{qdUd z!}NUxqUz-CW3~fN8Gwl!xGV{9ODx2#J)qQ*PJxauMT$kb?`6S;$ADr7#3AE7YZXRz z8D**wSuFAf?H1&9Tuyo`Z)XvCcrTFpiGOXX&Ab6%%9XrLw1`!y?e#13e%hGJ^36RL zW)6a_pB#sO_RP(+HPNJ5vFMGYHPRN7F$Q#Sg(>eWlaAGGvRGVV+8QjDHM*w*x%9j8 zeCQy+srqLeZ4iN{4N7s)<5`9YTceVaCF5ZFWyt)<5nz58gBh12;9)XTU?+Rt0D=@n zf}ud5!3bv$KD1_Tl?kAE+P;#UUs#As%DYmh)<~-8&<#0)4-*DuA|D+%_l{|#EY;7l zZHwI{$a-8h1HftLv$r>k@k_-K1|qB-FZE1VIKt97@_e0hXBVKnr+IZ0zT0zOAHop6 z2dJ28KaYz8sv={|JZeZ2;35aX;2yE%S@mUr2mV5(T3)>O^`UyjI}M}X2l-uBKt^*YgFd?X6bT3|e2|b+2NYrA@toHuMj!_&a}vXjUVcyon6U4= zHP;-pM+WXy~V+ z9DoP)=pT#iRbKZN4ztuawlTxC{?K75x- z1K<|V<9Q*twhu}k-)DRCNyE_6A8u-_lY`Dr78TB2d``&^3{onRo8$>r2HNm-@24*w z<{J+NPkwP`DgNId;=^H zufi)rO@Tf4h5V-a{~@0fl+o=Z=BE?!i5y=1^!IgFc_sY0)|(_b&yN^Ddd|9pshtd& zk?4Q@lqDI2It}QODTCG5-;1SNwT=O*ddaON116s>uqd%*4(VAFchb*{VJ6&P@=sY6 zVH@D`8(W?@;42*bfOs_MgJ!2mdB_vnSk;AKfVXXQJKuMn)iS+T7VU>+(F)SJM)>%z z7PLTUg&u&>UagRBAyMqRtqoczB*;-d$4ji!!Y5sw87vFyKj;({ff~Bc^~2f#!ZQ2| z0|yx(6KL8si!W`bvHf^MBD z^2SN~&x*jWW}LtEG!r20f&pj1{blCR@54dDA>iXU21+U|n4idx*q#Gsv({X+c-!@G zP_HqPm!jQ`*?OGA3cu#UjUZORov=8Jbp%2>a%2SfOK(6vFVam4o(P$#yQ}KdImIt5Nw3{HsMJ8NnFLJLqmhj?B^ZEvOB zocT@Uh&cit2nd@J8U2mdc);s1^U98x(Oo6jJbEv*b)2UF02WneVSJ#vJHfs17Rd?67F=#8NRb3u~Z|yR}Vo7FYE-YWBuKeG4_U%%N3u7 zT{r|km`?$*2?YE}I3PXv>eK`A4|^a7^t7T21rG#rF{2=7NJdC%KdCT$#Q|8qIR`lq z?-LYe!DH&F9Qf_3ilCc+Yab_R6Tbi1G!P}bWbhgV&x;t`@m0)2!|rEHJq~G+n$fae zVF<%|y0LVxvNL{3!&3_izHox7<)QPyg%e8hvAL}0{(N9vMW|m@8`mvVR+~)!uO+Zi z&q||P21>-AvH<4iuYx(7aI5_1rv5`T&N(nAu0hB|we6uAxn#;vNs`ef1LVDYM)_Ih zE%Q7Y=RhXm8yI*NhPpaQWuoz21pq%Oor{7D9=gsBu2p9WgwWtPGfx{O{!Y*$d4Z^u zHqDyXTLKwdQ=2R?Df1H;Ci9y=gW=BC08=K6Q0x}Jqi{QrFXNxo*k`XnZTvb9bO~5# z0f}F0eX5R8Ztu(z!Vy319L+fLJou&~i>7<+RF1tBF)(apwzo*}EE)Y1V0(}|g$l>8 zfQ&#~@dKhe!OROq={7D;Tg-s)a&U!+8!jY-k98|W(Nc!`V@q+SCwxue>Bm~OI)qFc z?U_oMt-KNf+rV3QaD*p%FVt^QfvQ7L-%)}@B=WF1vBp>Q0Bg6W8 zKp5^Bgn3~KI=%A5?k_Zceds%Z7`xWQ?)W?M$lL>sB;EaTe#hzhENxCaRGY`!;yEj2 z1Fl%RA5sA1l!gJTD8mz4#L6<=4o~f*d{43O9++JHk?xm8jEn$~TLnQUkXbCSl!xN> zAGbHtr2{_AEr8=c3tKrRyMK;Yym*);7eWl07+IBaK0bJe_`=wSS$x$wJ3-h z*Ve@yG52w69nVD(cUUD7_TWn62jOkAHoFZbqY*^A`Uw`x>nzOva4Sf2I}02{KLyalgCKlN z&eu~KJbg+jhDEJ=<2sl2gMHS?QDx^Ky$!(J!vfEh8T^}XqDW4~!#37m-)xKJ4F3My zhNYiF_5EpK_BXai6%fmlD48EL6IC46(uShK#76@1pyN# zqLBtyd+^85Fh0F{Vmy+RooIWas~#!H>j3WCEje91bpd3WCWksHow~ z4qUF%f^e|M7tE0q;Yqktek0P^7+5F9MmPrs3#+!)!LD9EWE%W@bHO`g6tJ_2hO@IG zmq@BYzdt=`mvoW!hm~XpSVvm%Bw0QtW~WpZ&(TC$k2^$8OR^=>+PL^Gtx2_PlYahn z8<9`rzGqCI0*U27@QccO+o^n443bS66B1MIjy{v+Or0OKSCVj(nIqG~W0!}46nk69 zWgL@I-P7EwFd&qqHJDCwBXOvw8)k^AJb_+@i-20s(l%lz`?0Q!HP)z(vO z>9I4F%BUqxA^vZ@cWiCj#pS2ujVA_+g|*IJvpcbeXXI0|qjrr}*tXrCW*P`-DDx3<$GIU zBp2l8m$NsjIxVJk_b{}#6Un%P!13`^vz@n<%fQq)ubBisP50QL~uKDHt9q#aK1bGtYHe+N? z+q-bx+8@*Z2=S-V$-WP>faIkdN|tDlNY1#{eM^xLnsG-NT{|{g7yUK`D%+c#m~ce? zNAY}|Lz6C;d|ApBx0UgGcDTt&cL1{G7@V>+60Vqa@Y13udmWpzlI^&n`iI^J5Y{4H zGf4LK$)|2}eNzOP6NgRA+e&t9j>~S>{(U|;V!QgO%q0EdE%^C4QAf;M@XL<*M@N1P z?C<_5BnF!zV@I65|7>{9)7qzy4_Ez+l?g?V==ZPxsGVena@bqi^sCkKUmmwWNhm9a ztqel{?(_fKroyQ(*}E>un0~t{%fa+yaS9Z5}q;mV7(k=U#ezs!Y^Qec8T+Snhpl>SGZK zE=jJvby!yN(I2mFAawJ4CNFze(^5XZ>#T&%@CYsLS&se6kBwL4ucc5{EuiQ0CB{8> zyAqT8yyt8l*!=|Rd42Mz1Sr!2RMV+1Otg6phiSo(O{Rp38@K}N_**TTg_ycKv!QeV zM!gPeuUGXIy261cX!I|oBD$lf>xku!&djraQ>Wh$QfNr0PFgvk*FO)djX%yYzkxRn z#Tk56RK2sYaJk&EV-lIB@&2LLwiD4q?aW8ZZ+Fjs&{vtZeVYA8j#Y7^k3?KDz$t|Y zMJu+t!DCh-fKBub`}=VD3TUbtcC}B#WX-dVPX}$?F5*uL?yU>{XpvsZ@)aOZVe1jtSWM<|-~^qZ^RYtpdj@PsMl+Kmi31-M4nYK%_z^n=0wFtR>D6t% z#K|sZITN|HdLq>^k78hRN3r(ATLEik_6)nKxAT*#bNoZEY~L<|DJOEuF2gi$Vi??r z8GDEs+hHKF0Kw>gDYdH=TB7b=Yv5fgwB^VD9T#Y$pZuCoW->7856pf0z>+_EKd03D zkF2lagf2VO`z%IdSEaeGwgFa)iwh}bckM_E#~SNmhW(wNZiF&VXf(fz2U6efK^G;~ z98D0xZ)^$g*K;5Z?r%r3uz_}BmdqVxU(JFxmtsW^u1#ME;+4mX&WT*3V#0Xv`eq~- zh~M@lWiF;~Qg>$^Y}^d>bT7Jb_?tcU?>%c#$u=*!U}4SrWJliTNqPJY3J zTAb~}R{wb=$RTKXDaKhtO!M5*8;R&{PTg-)`b74aLnQ_@4MErE}>+0+1_L>zII9=@_ns{Ty@;WR!VB!DluA0-Q9}8 zXRH*LbJiQsNCv8Sm>3#~Is`DhUrKd2MQGX#pNbN+*mVR)&*;gSf={2dUTs^h?*2LP$~>&Q0KRllvxX_~BEh_KORqj9w&>=B zgT;Zw@~&>!V=krc{-{o}7}VX3FRQ!1Led>bz?XANO=|G#0|V5Ci z@JRp}qqi{nJGQcbCxY=)tx>N4%;}&)p}5uP=AHzt5K(?S*x$GDp)0iJd!rdB68&c+Ww`K71gqeY)w9e1_M*uUkQn*yB}0G z=Eu2pJ1AoL$Qui+%0aB$FO;}Z319R@+)i}H{7A$~Z&z6CPuIQO$O36~2kqR^XURRw zK)Qzs`GpcApW}<+cI!_paBFHjsoIl+T$PV%Y??7jaa6j$B;6d+ir9bGjWo)kK8V!Z z14H)NgwQP1JrdbT=tAY0dKad4{)MYWZ-fQSBl=U2!Nq{wYDW zLADpmwb6ELN`oHWiNHIbB#kk%zY`YGUnp@8Au1;otrook331db4VkW@g?RBeGhjl` z;!BQWl3=K-M56JzrTeqc<`GlbKBKD`a1fIz5~9&kYVLME193;%Ww$sAEu!=VEz?i5=88YnZp1CY>Z^hq*WgYSDNQ)u4%0Nx~fbLWxJw#mGo*7yS_Y zh5(th8rv!b**5V*@!Cl2h3RYu-O>CK5YaD`c>NZ>u<();P{(g91}5v=@5JQZn6&4| zh6)L2E`B--8Dbuxv%d&GUT{I~(uAb+2!g0`+}@pN`wMYFZ@qC3^)EAE%RR?H`g!u) zz|Vr|Q~KRrPM?>cgMAA>G_v~BX*E2aVEyw%cOyjYFtapb%yTJGuN#eNS}y2Qe}+## zd1(09VM0^4aX@c#1_75d2JgT)hlpvOTl&rb-L+4=ASiJS9lB~I;hG7tVUjMuM`C%1 zHnn44+kwsE@#Qb2`|xXsNpM=h1h}$G!stjTH`&nmyvs8dk&mFH)2pzV%Mv&Q>tvVr zEU=uGdB$AB4-)Zm3ODWXkiPFw6p@ervOm01x;xN<{((jTaYCp6g%DHxw}TP<_k7{( zz)u}pPF>rLnYzxIy6TLYDAB~BWaqu$uD_HT3~b;c8#+-9d#`enyNrj~R1XlYyso>i z%*_g(kECixD$*^pOvPyB27wb01b_CA7ZylNjFRa(q#E|yL$Jfcrq4zg)uIF8=yH^7 zK1|AuNS5c&*N}#TOZwJ&-q!X-Tfd%JD5zLNq^nUvMwzFr>($-s4!lQJ5FUct)Wb^d zVOHueRAapjt03I3pfYCtH35g1sLxpwv|{@F>BOB1$n|kPsrOTzsZ%C#v0d*3yYeb^ z_j@~xg^44q55Dg-6zk*qm+90V{QZt_t4{ZvQ+{V2W9IKDo8g6YB~KNv5EoX!%4KZb ziU6$Ui(ISvkhUn4$W%=v7p%J-z{+w1(LWz2+rH1bH{CUcBUdYGYh#%UJYd}9*xEg_ zE2SvcbJz3W+_VeQAad{d;IuT~^S^zy-P0-2XR~d0^H#94~;io)eUo%PMR6>61 zqe$u$1xJKMN-h;fk+(1lxDp;Gtvee<4Hgy)xLigW_LFH{Th(5$qZ|G1lGF-#ZC^W5 zy4UnJWhPQ#aT4tp4(FwI+XmJX=ks@<=akDHpVwl&+|Y^4;X{r%9}s7kcX1ja?cbT- ziPFjs2v6o`!p6{ulUv`*1;QCv>c)q=ubY)RNae!2ZG@cU{Q$+DtY)Qbx@0iWdzGC+ zB#N-XH0$m!W4iZT;XeIofZB^G_zf+P-<~)=03e{^oZI<}io$Hd;8-}{g_tb3V^o!yneVg3wIT(S!kTZtPHh!izMZlk2_0UTNIh~2Hb znnKG8fiFEFw!QG4Na%#f74@3 zR=m^(>sue;s{Q)NL^;3jX=xvzk8XY=ps;YV@p(GoaIR39dY_ly;#`^&W6GEwsInf= z$uwEVmImdq@7?oUVTfx+MkU%B*<+P2mh4Yldl{)ws?Fch*D%d$@{y5pYs}Gd2_>-x zc51@UF}bYD<$Num>5qhp!idDcgpXdD4QXxU+>koy_M|9MN$~1c`XZTWp;T`)00hds zo2xb)Yi?Swa6CR}{_@{MsEX4Re^s5+!^&Oz;C=dd_=jJNM+!pWLv86x=(=o}pC#+} zLX8e2tOvB7WXjo~ZI#4b1E$D6lH|~wMI`}tm zJQcI{W9`Q@JT~3O6~GSUp7~$vyv`Eygs{ zmd8|k(SBwslD8$=v8H@9WBiWXOT8xN?f83aXvktpzDIfW1wM2Y$4C`gUH`JC0WkUp z4yC^J^^3i5H3fmQ$hl&|9zS(cw%%-$o?pdA?`vZ@7w-c`s)hz z8y0r6{ZN~(|44VTM|%_Es>)B zVS)JI$N}|i10qMWDH3$|VbR8NIj6eE^v%=WiWwo6_IQc3z%j};&$3u6m1jP#?^CVJ z&BKmO^(3rLV>0zb2wTq&AVJ(ZP)GH-br7}_gs`A*aC?xlUcEpTwS z+k1TVqa1F8t3=B@k(0dO$PY)zYG}dQ^jA1f$JrACJjF7E151qateE>j+s(}HlxafB z9vMV(V>ha+VSU+&HAkW!ZCH9_O?;2H@&MBFI~}unts(4PQxqyZK&jC!_`s&Czxm32 zO8>4}Vb?Vtu9^3mmoACuomUCr|1b#Ix{5Oo8?=2$eLfV(ziVUTnA~r7VprJV(wa3i%uKX-*Q8AT_|Y8eUH(VS zv|_eio+ct1ZQ-|W%dcXruCC5K@v)O7vOYcjekPgR4AytMYwvb$k=mCA5I>qR%3bP+HXiq_S7BG6yuJ+g?Lr!7AzXS}cUG;<>y zDmmt`<)<0fjExbAs^`alsTNrjdh>OTH&5Cdt4rr@$1x^d zGd}h3ve7eJPmDEgO0V-!9mu&ca3}X@TTi{^Opjsh zybS@&)YnQwsG;LN>?>(0~nJQ-X6rs4bK#Z@7@(q?wrr*bil z$E7xKD{X7Sg)pnVzn&G|TY9!jz2o<|+1CL6N0O^{>mO65J@1Szrnc`ZM%KtlTbV)i z;$l{c&ep*+9(Qf+QYZ~b%364-fBR8nh#F0g){^lV3^Js?{k~4;^q$NG6YaT! zhLTS!7SL(*v+b)$Oo4pxAGIA~UMy0np;k#tmGMmR^jUkB#t& zxRO97(h}}_MDc8WqdvCC=j+*?kWM9Px3=c!#gOkJAz$4Rle6~7oG#Jaf9~zf=xd?h z3Ey{YL#a}hs`0dLsd|^p>@+}M+R>9Wu~n;t1}}bl#g~6#@ZR|`z`(lnwl3Kybfq!3 zSE;qw=cAK%uW2>Bs|6<N+Nr_=TYRZh)e<15tqG&c9f zOaYsiNUsWszEEgEO)D55GPGYX{6oe0h1csn zqM?AjLasIYx?Q5D%rXmHBe)kS3yg}C6i%jkbxI^UeJfm)Vdmx4Fx3#NL_ZL6VseL! z$G%M8@%G^k$6*%gs&k=Ah1pQ{drml6#*7EM;l=_!;39*|^%|;^ zA9zfI-pncvu77hX*)%(aEzp|(TCD|Kvb)?1rl^V4z{h5v7x8FtP2+QI(QoyPL1EV>KW7ctmNyc+T!rNSH-kcWFu<`JOEZ3pp?cyE7<7L1;+|pN{MY_bOkgY>+ zZI!M#WHml+YFa&etWaC2|3L6m)vf%^1ng;@4~fSvH1A!2HVw+Nh1yWPfu|z z)k6SEl)XFn+v2d90Uthi65X(xj-gk2Bbkbm~>df)XwtZU}Hj&1n zr$39W8|4T+p}cLPK^q3R%nxlW;Qs^Q{~N{XBqlZfY5w1VWUfyK=jLU02vFhxC z8mrxA&ci!gRQFtXs-c+I_l6G=R>lTNQ{vuz^vE%bIB`9^<)O!gkJqkyf7tC8?@u3p z9GDw+t6*hI@JG2>=99#I)rDt8HBRr?BIxcMI^2_;>ef=`1*do{!4lo|1+ycsPCzel zAGuP*avvW?ga+7JIG2dl-a9qknT(fu%6nL-9VsZV76CGh^l2`q9(E`S8@4TD{0Ui2|DQPbsRS2B_&@Ye9aRh|%HX{qn-96^1hw2qbp zPI5(X)9*|yhgajPxMerDoq5rM0lPeq<6Qrxx68!I3==#Y!0*?zqK(F zON}_r4`KB%(H+K9dB%pDJI<&j<9n0S3sr0w;p%>=RsRfYH^`e|2QAKRq|}y`^L8-S zRW4-b3bhz>ygRqBWIL=v8p273eDKqRG2e#kF}WAz#QhokHee2{{S_jCsz85sWbET& zV!4bxLx}r*w=rfV-7&PVRs2B9nJVgT=)lDC+hR`gqHBW+j3iOKqDfC_0taA* zgjRP9%Yi4F8)WUGc4BRVEf%DLl%90&S)(SxO7Z6A6sg>S@$%)S93`Q>`~`bZ)vX$> z%*!kB`Hm6=c65-L&54DRb_FBcUS=T9Ncy#mt_B&xvDx^NCaTcf;+1w6Lzi7q%*wfT zAIRvCVeRi{Uf80d+H(S8YB9f~!As`-j#~b7`e=S)7&|4mX@a$vm#o9mwUNYRg4J_$ zosxvY#)`?{ewA~X!OsBWGNq~nS+2qMIlsNM9lsQ2pUPrpquBHw$ClBw0$*uFCtYLk zYs84>7CLXnDjm}<7Y7lVYs+-)zZBys{eH~~HIYr|%h82t0wks{7;qGO`fe7^w|lWT z#@i)r#PQVuFKNen82NcEJLeJ*&q$fp88tnOVmovG;&oKD?hNoq6h1Xa(}f-m18P4Ifgvq644DuTXH7znoG!SMa z&7iuO1717NsCDDjDy1Y964N9)JrzHmL@-O1TRBAx!azs7{zESlRnX!2Q&zGWB*vf< zLnk*a4*h!&Y$)d!g5fF6F4Q%e@Tb38o)Dprh7uPm983dErCk_+N=q02zE*@b`{2C$D##5DHD@+PQX#q$WEby`;i+SIq-%N* za@rW4nWmCCz$MlF1BVCw>DpP|L-(1f*PC-dNTUSnG%HDnsaZLL6h6D9tX7N3Lz|aVGM#t3UnD_2pL>{CLr(Y2|9o)oNB>@b26~0b?}2F^rp?3mbUV z+tXnyXi>K^PJ`%nW5xC4lg=~vokmx?L>+`kOwM4&u9}5*cOY4nlVf_DLH&-V#mg;H zV{$*uzYPxAiCGVR5`Kfh?*is&q5O+)Oe~v0$&Tl!4`m6G@t3vFLNDx1uXnv-qMjZt z#O4@hh;gT;eqiN%tA|!?ERzBm{5cBh|^SG!$Heq5kY4?|7 z3D5!Ml-t8DIGS~}2-+or;>-hVUs|(K*d0?4e6SSjC$y`Bfe}}!!Y%smWoqnbLCXHF zsE#P;HZawb5Avhlg@;?@%C(qgcSc5%`4Vi6X}z{r>k8Ld-lgJnuu2oxt${z{1&5iQ8#@pCYB^Z6luLZ ziOn1h-fF0&*R7_}9S3qva$<55Bcq=S;THg%k(E7Yu{Q9;i7@N*1)@A1|h**DIQK~Fk`UG2PB6Vrx_HMb;b zj{DnMKr)z1$33m^8gIs4Gq=nY%hszad$b(YMdV)pg!|I|6kh1EQW`6W7sHw><*Y*R zw!)!sadyl;ufws5l}yzB?yxYBkrK$LPcr!TGisjb*4)CH=a`iVA)}XGnC9UT#~FKn zdR?|IBNNMBEKw9gnJCl@%oKH!R~&+r6%}yDgg$0`R4h>i894N<4atE6lb*z3Txhyft{jjq;Cp))Oz-BX# z-%$`$*<`lkC=%();G8H;#1SG5JTte5n$>t%v@}Mje%X{b^%EC73oFZ3lK~|>v7!jx6BJ2a94?0^`(?+#0d_MHjypM91 z6*}pZ5cKpQd@t>0UdF_715#c3(RG)E?Ul-6$Er~c=u|1u&FD8qk_-5{g0*QgG*mEh zd4eEZ>I{Bq;0EiH3dRtEM6bc~xecze++d_pGdsD&wscNiFdZA)z(I=Np_ zAyyHanZFzs$`}Jqw+#RyYrPoc*RMn2T&jt&@ZLhI=KKZFmG5KJLFR^=7)i)IM=DPI zGZ({NM|pH8T#o zx39l|pYs+tp)Iyd&h%EDea2Dk^t;5Ol(E^5QwORpEab1kO~H5NEON6N3vWk4b<1x1 zQq--U+qb@mM_W`k3Y~i%RcG>{x?p-FL;nUYS?2 zCj4`Tq#eS zQ8PU$T@K6Rka2`V5}=XPgq3PmI3jsI3w;1m#vU`bYy!kN+#eiPrh{oz?Ol0vF`4hf z&K;QT$M|UP`dFNf&!O9M&PdAqXhAOd$(8xwnuYDzCvDZ;`E!qgSN2MPXbmbyuvrj` zT$Eyrm8eD=u{>n&Ka}@ykcd*OV}_NKKb?1T31X0M=b)`G59dS4W5)W=EsXesqDoA_ z1+Jb$#D&lWQARj*jzB}{m6wC6GXWwQ?!Cl=?WO>o^|9Vm1Km2MxHhgIM4g>z8JucR zNj=3biFuxnrC%5m4lT0?y${ZQ0a)8HC@fS4$~qh3D8l+c-2|s!$J6t=^1Rf?o)?yB zoKfRIzXT{&3&A|5m?@`|!(2c}VITq0Mz2@n$K5q%dN_UMW`xw4!4ZGd>NWJDM|hz$ z%V-HBNfv#zn=iK&1dZ89w-4G83~?aDShB7VzXUlA+OsbqSJYJ>!^}Y^qlTy$i!zeZ zp|;O0?A!w;*ux!7#(GinqIC4rVm!rF_@IdI$C_yJ+caVke&}Zvg{TU4D{57dvD;$u z)S91a+DjvJHtku&UIeJ(Y1{Jn-yjVCV13xPeyYbDH&@W;R@Gt8x51d<|7O8!OxkO* z0FNLnS{tAvK#l!?VE>6XUgR$9_|H54f8Q>?SXI$-bl&N9z^n<(#q%94)C&FBm&Y;Ug2HQo#d2D?91$ zJoCZ|J+k80z@dat&gYa35n3`;I59jF^r=!__01m zT0P-Pe5g-4@>mH3pw#gjN1(Rpp{>0N3vs?9PWf{Sy3aWP@kDv2 ziIbRmKsxokc4QLM5R~MuM!v+AYB3h5JTHG|Du~BCI{9id*2PgL^{G+(k0S&V_A`vQ zVp$6r`x%b)<@Xozs-Jlgfv&mCm!}fS?4}2sb%XG?l%oYV00=POXv2_$ujHwW!=OS! zRgo`2UPM>bCA=k{oQp#a(t$$45RfQxo|W&NBE7LC|%M9M}O<0~7%Z>RSZg z+z^B6lp1Ruzw3t$%;h$=gxlI{is|qJJ|s>mdOFIo)bS#Di>C=XzLVA6!A@S*inwO1 zYB*}_xoC0E_%>Kt5;j0unL}E61|)?t_$i_x*SO^{sI@?*=D5F|oR3XoLCN@YO;Ruu zbx^nr`3jCva2=jRuXU)hoFKVU-P~C?vF@Py*ruq#%ilU>d=(t>C%$yUcc@7?$nE-0 z>hO|7|2tQQTlxhve>&mA>n>KE9o(fg-cYP^lkmBTb~!dYS>fHI7rke|vu&!1@F0K7 z%FdIbc1pV&JBP@?=6!56EyPNW)YRJBI+pM5@tVK2a%y9^rH;zPXEHEK4{@2y*8aS) z*5G72qso~wC!bAu@FHsAKkw@8LPJ-Y>etdzA{&^n%RmN~KUsGZHi>?0%uSbwv)BbZ z{T6;`_bS%U1Wa+FLI*+3FJH(K7v*&?P#sryo$e6+eu{_ueKfm3%O>jd(Mk9MZ_M@< z%u37vHD>W_7S}s^HUZMfn?HKt#d^P;{`6Y~)1B+GT2A59X!uqaJ<7DJe_Y`+ntmL9 z>*ZN>Il@!n1ry<90OKBwJ?~QP4sn0p(b6@bwMCLfkKB}M$xI!-Cbx)@q<|H2>A8>z z6%Mp}=QXMSla%$EW!0O}+&D)4ms%w|qVgIYSg^|sJO+aT=%@ZDf z@vTtCCynhn=Dn87IL?guJQ2|G=xt{00x6CcY_%FZQad&Na@%`% zfGZ7MEO7Tut=AZ(J}-eH*L3UwPyKIGQ1JH_Z-99bI@GNuV^=tPp+5e5S>sTz?e@x< z@V4p49!D+vUJEKIw|sjnFW9hDeN1inf(tC~m1!Y)9>~U1^X)!g-rAW$%jq2yWC}^F z+%kJ)vHG_%N4NC+Qty#O%gB{)>E`tV4{eltjk|qkyL_uuXFF6Mvp9REjt74OVP{NQ zFB&wqzq)w1uxl{z$_(-iXyR`3BblL<+l419dxq70gG6SKYAAsNmtReER{$AP4S-{~ z#bBV}f#x(^V8|Uc`zu|yuC6!QBj>UeyHA1QL7HwUhH#?G=+8R13 zuRa#HzZ_?SKMcO?jHCz9-ZjFUgeTI;>S^x!;7g*#NW#5^ zi^+>RPo6mQ0_opb&MZ=-#Vqkt?<>i}O{ND*6@hQA{ysbK{c)GdSWfqb(9?U{9%*xv z$9z^%XGgPBNdtMKO^J6qx>UcP4piO9V*e_tdk&X|y#bE(Qra2STXCRfcfO=I!xt%L?m+DNnPW2_RC?o26#iZ>&jHU}0 z-?poq8NkT(Uo7{eKL@(Q*hp{s zK(c?oRSG2W@_>?e&rCI#pGgFCy(mz1g&Z7wg;W54N;=AfxaiUPBm6o_?-G! z?@#yJ%mEqn1TyI37x7>QKR?Kze=p;;Fo96R{k~Uc=>xOU1faW{5PS(#PIBs=&*xM~ zE(mfM zik0abdcLxE6&CDT1XNNFeULBz>-k!pXS^J(UyoMBcn&TtZ7Uv?244guD3y1ljPA1} zP)iXw!tX{OuTkO=u(A_;9V*_r6&w!T|5iE1O2OPM5pGS#*JV+?-)tEi>vzblw7 zEjZwLptwQ4V4|$robG(9C*+Hf-qyI26LvU+5$KCk4V^Pyjy`5*4$7+QLCJy9U(bm>Y_K?W<5rC4645S6zT2ji-iQP+Ty(ev z=#l-?nbWR75{Y2C^{nC-7mR8eMz0wS_5m0oL%LkSm-p;L z>`A?E)l73MZf8@I<9s0Q)o)4$GVt{?uCvQG~nDN(Vwzkl<&(z3*b*H!Ei2UJn^g zm(pI$TeR2E(tBi=y8FOntDa>?3K1NTHgTs)k*M?$&>jVf;`mRrR^RrS#`uY${ z>wzexmQNh)V$Z+N4Co-6kyj?Qm{5$)S9m&ksICZ1z18;Nhn8EIUjwC4&@)zMdU^Am zt$hao>|d<3vJ{ipp7<# z%Cm!^safk)x*uLouy;IAW^r>I%2{4hpnFYkM7@Jw(^=xCLm3FK&^?1M3M+hPhmQwI zWi1t-h5iz!I6&;a9ysjeo^b3-6#Ue8SJo~eK)*<+KCgZZpssIyHmXW9U*rqoXH5iv z6&A9d9luozQl(^!$7(=*>E&_{9b@!< zrLdpx08fW9q4N`a*vP(fRVT$J+UtKPIxoWpJnD0+A_u&>3Ih_93!tMI8koL*-giXC zbj#?=MLtg^SFOPMZr8VbHe!(`d}?W7FQMp;#FV$DA*s^jtpbagv&Ru+V9|d77@0r4 zM&cls4LFHeTPcJw_#I+u|NfyP+Sjf=C3z^|5S!kvL6X9JDscN`XwoYBN8Gr~LWdXs za2`de^{czvhjKL^7C7}fYh{{4v27~OfthSRPHySp`inx$1S&_f7GK(MDDmoeubAq@ zZbgLeB+g`ZgwP0%mH<2AipVNLzp?FkHaw~APSK-$xocNdkKLGzTtx<-rovmlJ?2^A z+)^g!?ploF!RQ|3Al3PCZNFaJUn>2ouZes$Jo^2>Jek~LbFnIn@edyLX93H(&a`Htgx#OTi zJE$M>ywb2|6{)t?qF|=qsTwyaAMoBJ)AnW6tLBEpDR#^8Z9U2j&IkZZrC$rl&BLBq zKe~|8p;|>~R~m_$gcjP#LN9VS9*nVDw6t7jR@VGI4e9I zGpU%Re(9@<#aRTkyCEyo0Xl*c$2v-F^9X2VX2t30k1Jk%UmvpkP}^|BcdtxrW&bTg zYo}HYGnF`g?`LWV+LWXod1|scIx2rCEcG|V=bwk)@&+h>cPc5#r$rD1D0n|D)|IJl zusWvIyy8JQx1TH10Mcg~2UfZd3U-_=B3!r$>$hwhXL)GY>~o}Y%i!s0&0)knCD9)u zb}cVa%A7Y^xcEUnq8Ypfi)&re=;N1+%(AD)uU)_8&Gpj5{?p=-R>HL5w)qhf7~0Zw z>Ub?-7)ko13?C#6*zS+2dw{z66)AMf(8f{S{q!qw+p}sCXX$b;Zc=vsllS1?JPM_N z>O{J@Cpi#4+|#@HHo~8BWv4g{Gk-W%?=bjn1HYc%ydQ>{KYfeKaL^zyh?@zh&gJ|_ zZgxs@qkQ5TH7iBv-(;VZHEJ=DsL*Y+ECIH77@CzMqZ7k{+K{(#`tlQ#b)QFqi=2I5 zi+A^#7e8@UvI0O-LRXnv*zyPTabFQCyc~YLql$^D;8u7S2p@Qd%(I^i!ps9*07$YV z0MIDdi(J|H3#4&AH-B2>0FPF#7WJJ~GVC08tytkxf=Ni(-I;r_$Q3^r^3Sd@0t&(f zTX02W%ehU^Q7c%g)+fVqolWr`wtODrIs4@(oMk_eLQhDrpcA(6f}CY=Ef63LuSH2# z8!_s`jw#~skD42(+NA=_{11>3IK}=1#_c2=L2o`ke1#sLmp@h4$x5-2vW24D1l`PW z`>mv_41NR{a&BQ7fpLotte{}(=_bXoNrsimqA{iD3>;v&VGilXV0XtZtiwukhTWY2 zx*TbioSYB$uhTrzI=~_M{#-@G9}w>LhgaVL9UzGz7@28f;W#mKD}wv1mI3Z4XI>(K z)tA`i_3NqpA5`PTKhXXuf0*)u@NLlg=WyL@!s3-@nA}683WhE7>g!Dgzj8Qnl&X8$ z*?7o&_4}E%2+ssVa_KENqguQ(xoN-*=jP@aD)>ob7XH1+$+HuF9{0*g8#qp)&L0XW z0$ap2A^_hCu(v$5Pw-_6qM12mTBYcWl-=#lIt)7Hd}fO}GqrQn;0W|%EcT+Tlh~P@ z2}S1L%T_yKGFoTSC==*wSBKeqNhF#viRXkH4}==(*9lKpAmPTV-g6#CstYhw{w5iF z^bdSOHGw8wF`lI@L36b0N(yK2JB~h7({eEQEND;7O$xo>ndO-J%^oQZ2#}yY%+GN_ zeO*_ z(ZML@xT?NQq9Y@X%X5^mE~DSXgTmM->Br6zzUV)&zBt4YK0nDOD`0cq6M#OO6V+ve zX=c-&d6`D&M*A1pG_txoch48F$8oe!Ex2Blk)(y03fGkv!xNS*oPK8FCm^zmat&>Y zy1H;=Vk*zrvyqsd5-_g%#q4mK6Fy%Bk#Jyx`|ws{<{ST=7*{AuXU2W3$&PII(L%6? zlkM;Dv4K~++Ez(G2#(^b#_;7}lxe&*G4_^i3T;m1j%S$S7snCL9$RLr9`|x^-A^>w zW=+huE#|xC+Oz~tF3-Mv&&LuOk}xa1xA=(2FIN*^#5Q$Bx@i*^ zrS^%fN4O3F&}@GvQH?{}-K=J}T;hCn_}MnimFtbH(lhNA2$RpLEx_g_cx*^glgPeY zg@m(JG)>iboJS{2qG8Ukd*W;k-@&msV`y0NN`F%1lF@IO0_P zu8f0F<|;oM-$bg+M~~Bh0|~7;{j0U zZ_55_ZUNrfUu^_sh=`H6scj5ZBb`u!el7gdLUs5e)H0Tk?a+5&bCb@>WJ5&p-;~A7 z!&o^spS~%Ic$@g+poS)>ijJDGNpKnyP_kbO8A%dQJ0!HcHbN~^W-49*We}Tn2>L|wlY{>$UI3_TI@@8Cp?2Rahu zko*cZ+`lQK0YaKPPb=!kC1H=w(CVg4{#clOoNvBf9t4s%W=|?`_MU`=`ikSz5v`{d zv4sdDx4KD!dC--DqpRciKz=g*DacG0Xu=dD-OvzA8s0Unhu=%Jr;c zCVQ7s+tF(JlBE5A#KQHqKT7qe)TzQ%7&qivPjyJ&Ohv?%qWIU`wi#(6Tfp(_TGJKU z8U@TZv|_H4V0a%$6do${9V_(xewqkqXD6L>**-lic|9MVA-V& z|MC`43b1-u@L$7wj`y-JCTHiLXS@9XjfXUd?iHm;-wU$ELYm?8XNSsRC_+VZLsNXH zAa2U}V9RUh;X}vrd%OU%UC~lMqvnPm`b-X~LlO`{LkkY;0d^gUqjBy{vJVo;l>4$X z{248!2XLb_*6F_x+bk6CMgNMgi*hdm5`4x0s6f}v&j zr(kHocuUSLxlfjzQc6$lIZD7_lWhhcumakdMgrQAKtTRO$olK+(#N}r3<`jHUPb>_ zHaGR$NBEFqbYaDhv(wis9Uz8*q(rs5@#^)s9ALS#K%vd8>b;1)T8uhZ+or@LR>?dz zB~25=cB}5g-Cizo{crZCa8`nZvuWfFf~Y@=2`qbY0eiD1o^CpHe?wD|js@+-#F2@$ zZls!-YW|%=SJlrE9nNiZ*XO2D(9zyD#vZXsEqo(C73ES(1iDx|x-d$hNkWH&d zDLl)>&LEXEUsO%R1y5fVK7~ob7MxfA%C>SHu~Hv%GF&jm@=Py^KUQiY=PrYv8?jP< zZvsmGtk3=Fm5@`Cca^_PUF% z$agpz;0dyJPFdYcbnB&D2&WNYe~@nPy@$W=ZRJ=jqDw^HRThaOTIScXtY?zy?m^); z-9K$W&#ByOlxC`GBG%*&vks=5U>>)ziXIrVh$HZw@WdW0P`!=a=b!kcjJiO?Jq|5L z?9^Vc@*TONr?5}yV=X08U&1~GY;fdpYsKeiDj+=dTN>W6zV13j`iD5@{|bGcsFR|V zXUiMhgxLpB?8A90kvXnEZ3~tJ29A0rJ0p+=q=^kx2--x<8mySslM9hJpDS;OWLF{r z3#_VR*BK)!_V2;4CfMZ=@C*CIJ9FIN+R~a}|MOJMt9(Bumo_RM!r;e<(KD`Bfoi^KM4@2ENtjjzruNGjlayNKzXCpX@`s%T4&S7=;>yuyb>N>otH}nOzpWS$xQzrN` zYS-m|XZvib<6T2@bm*0QPVAxcXbw^PE2&@T#!8H&>mU`eFc(C#IAA8Sb3E&`&%Ahu zKJV@{Gej6luC#H-P0WOJTB0nX*HXCZD}jcB*eK7E^%?V!xLLDaCxpA&v&!IimPiA$*42dFBe1s=L1| z(?|5|JbX0oxB$d6aMp9njsYJ|<$QkJ^rt=Wu4zV0u7c+#fQTb7KmYJFhD~kEeQ=#0 z5x?ytuELKw{D*i&=oUX?7#%e=xyjiXCvQ@rVC8a+j%th39GwP|z!)Xy-amz$CJ`~q zp^5uSA;E4n);A?ACfDz@vx3e|&~}S}CTRO-sKtE5bX#M1MP=PISb~WNTQP8g&YL=F z5F+;b^WL$NA#tgl^u$Qq_%yeu%Q!bisUqJBBIr_auppbSO1TGK zg%%p=U?&MZcR4E}1hq;*vSAXnq>v)v#`DuK?*3sL z#1jIP=9W!Cg2SzSS&e{e`|?F|U|0PIcfU0hR7@xzwbg(Z+Yt=IlofskKt#wyjN9R+ zk6O!xcU(P8)ZJs7Q%{j1(F^yi5jL?(!n*hGMUA}DKbYs{J+(xC`Xb-)*WCnCD%7Lq zLDeu)%v{>iq1r$od>(4aQ#TVqXr$o{Jk0+X^AF7&mR#xk!8>^NnN)fsS5<6~O#ZV; zJEVouCcKO$xo!^ol=b$ykRp*IQ2qllYRrCXtniVW8824VCJ-Q^LI=l$Jo~O9$L5P~ z55<&s)0AJ0-HY*LS{)1LBSGcQZi-)I@Z-XAtP)W`1ado`3NtfCm^(Si#Pu)TfEg_- zA-r2U1Q05}y`>GvCw)10K>PGpxDT9z%Vw+c_{&AwKkx!s$n=T)Iil;Ystu}-Ay?gX z3-|yDXlf?g(}7dPN(QP@1PZO1a6W!Zw46!s2SjnE3Qs-c>hM-F>t|eibcgWNkpaGw z74)Fp(+nwV53-zY=OX|-YJqJH8UiQZNM1;CMc761^ZD5E5uo7yI5-Vw6I-lK{X4r8 z;1N98G~MQqkqC%U+L#fm+<$y~?pNUD)?m>lflHjDux9`ZlXb! zsz5eYvs--iU*b0my`E0SMcqDwpT5;)=gUT(YQNMy031?P+jLo*q=HKl+2gGe=zxv37RCJ1+tqH8dOa0;Hxl&Yz&SeMZIZOx9j zMsHDy<7#uSvOjUSIc#YJ&hWA7#C6r(g!|3)9W$TV6^rp#e2)nf3<1j8L*zjrj^MnO zbY;J*%z=w2(L*<4AEtWu+v&gc272Rx%zI=bjm(FuGZsiTM~M)CGp_wm@u1K-LcHdF zu+c~0G4Nk}jZXOO!yS=7DE5cb z*=_$tZn%+~$PEVr^p#|$``cz60wpVgUaTf@FQBG+QhO674oO@YKVH^u$V4L0l?i7i z_}j*J2Buoe^s(Gs1pH-TY|1HLTyFJvQ~8!vg*R8E`BwD9*Z%GMY}(ytJnZ0QIg(+B}%b!4|J z4sV!JqF08f26BxQXRSNA;B?X_%%LR!n!&u~p{hk(U2lY|#|ezw65rofjj~xz2j;#- zTG60F;YZ^SL=H}lr1~mHy4D#J@ZJP_;cqbu9s!Z;S(1|{bAJ}O;S>s~y@MjA>pK~nSG{vmzfyVe_3JqIL!~k|+8(z3%!^%E`>VGj08u`Or&r5O)D#?8D63uv zC2KjlCYnB4C~0OTfIksBs)369fcbYrGvT2s$VvQ#`~;X65dqIyW&Cq$}RN%HtN7# zNCPSFK5JpqElWJvc2K!2iY4j<>_UBa7fEdEgGFfsK-lI|i_xb%p1e{5)8E^?01PvJ z%H?~GcF-I6+ygehHwYc{8h3m?SX5glKDa2PFqI`MdN`u%VKe}xwZ-zejb#aTa`p|n z-ZSUKwyscy%iVJEE17(s34oQIxh%1n{}1-wJg(-o?f<4NbCRKu3Q3|tNHk|^QwnLG zC`q%lSj|aDQXvXyu&HR2<~f=~Dy2ahC~014uGRE>&c)vMb=lXx@8|yGc|FhX_4sGM z+RIws@f?oxJU++!!;H~^BRzUQ(=30iECRen5t$R}O-6a^`KsD0q2ps^(7;$^zM^pt zKl2cpQN;3)2*snMdMA5bUDMxMS|yyZ7z=#G(hGUChIkf{d7Gz06PY%#%wVae8lGqd zM{?op{;YC|sV6TCrdkcc$;;@N$!aGzbfy3>+lTX=a&XKr4P?;OW=s(-*nAC+I2sWT zB=MJR2(&oLT*0=mNUxNwe1GU_s;xrmY6D*=;<7(lyN-XX1X@#X^5m1I;q_iM?;Lq% zo}E=iG!u~_`wOP(U57MWt0Z-$Yq##6uq)83?&BOI+S=gVoS$9mC%I}|2LhXv;_M1G zM;ftJ6j^^G-(lNPl#IuDsW#*ZHNffIOBPoz+3I&03nnltDPk08i4<+|wUMH~^Npnq z`+Vc0&2@ciuJ0$DGts|XCvkA<#8UHXlI3~ZW5+PS-SLs3x0^LRdLsIDRV(DDV8=jy zid3v{%%e`oPf@KqvhiRk*6-W#DonX7U8NyEwef3*dg0TiM-r{KRoRCd7md|Y$NPL; zovw9%BP!&`z}+6_)<2JWwXEf9xrfx3wRy_tuFDy?foJFPC=1#Rr9O>I#n$$3bkrX# zVRf4D${F?A6zv@&+3fShj!>A?cUp;y~IB=yf*20QjK5m;N#9K?`rMWSlt?0wDx#nfaN+IFnVzZ=h;O1;q_K_LOuxyQP|SG~IT;6$?zB_^ z``VUS4WgQ}mf4t4>sNA9^+xnEdC%NPY_Q7xnXlQ9;^H9;$DD zYs*MBJ7r}3#K8-40f-{>I+L}r?|?YWafu5SJc<~*gwJJgC4GfF%ll6JP%r4j>c&@0_IZC_5xNTJuXrY}o>%ZUI2l8o|D z8ulspP0RqYC1H!aigBlkP|4);o*w(r)TY{As>B$^JtUf^tcOts3iHxsN7BmF9Bqs8 zc#Q&Y%Eyg%XmxvYf6VL#HLl7uUay2m*$LiOx)!j>{AlT|4&L5INdTR1DPCrYFZXWrx~*uy=Ns*rStcD6ykJPUi@;biW7!x}fL z&8T=anqMN=J~cIxlXH@_tE!rf^~&`*dkZ%YKl9;_EEK0)s&&`5#+(%yN`>lpER_iP z=!pA*4Rvmh255D=IRghQyvy=I=s36rhvIAO>W^@ZFGk;wFFHT5ck}Ry``g=n_^S)` zK0nG<2EsA1H+x(?qG)(MR92%c>-w$@)g$J4LJRkGes3hwX9G2_P2vN9kG@yPKV9?} z!ax@{jQxjzisG}Kub={M`#|Qs4zPSxNFj?x=t#2g2dj*pqnDbavMltT-@nlkH4isO zv)sZ%JuBk!$*A|lH7{51k$9E^6Z!o5Bp{1C)S>awLMB%#-?G*+iizg0E1+Gq?D z)9k~gXDfFu4v}u#RrZuyBJE5wi*@s7zjzgDeK9v{a(9+t*&s(&`@Sp@jY+lgtW7tU zVh+aoUGKQ+9WbmS(R$T9AD}qM4Sz8O*7e_ln3D|ZYU0;v5W7_+^P&7nYppX;U}cD3 zAK&siRdM1W=H_dCPIAY^oCDV`oH1khwF7(QkGb8$>Y}^|)X-3ei)Quj>U%kz$_-0BPzBgN-`5wT3Xo#Ha@%whF^!; z#4>XTqgB8ajf(Wp6JB^GFOY-+ReLt_LjWFir=Q@pURql@k`37KZ^jy2| z;Vsh69o~ZcNEo&Y6nmo6v4M_(`(Hn^aO`?5)-FRL0q6&d%}g%Uu6@|Fxj%UvKrrp&a72>{5$)8)69dS`a}r)0MFt2!Mzu14-uw35jD2N7^EFrucwup6A~Z=7cn zVPg^3mpeyhOM&%m`M3zFR)G$pIM+nQ3|C3KS`kF++fLVZ4m9rJoJNQkBauVx--v%y zUu&cPo`7imMrkExudx^&7;qIu2>*jzdApFWu*<5-r0sf7A9dWVq3(-19qTe0hhmqpMqiiAag6&mQ7JoFX(oB6 z(Im^jae8qY)+`zgLQUgNwQ>Il&iMqmV08<(D>;<^SsRh<5)yU!<_ zjlxD%Ywsg(u(&8(hKT;7W~Swv<~aun8(T?a!T!}poI{UtM9eyKno*yK`Y^kUlM|y7 zK3VjtxLBqxGG%lS(X3PEw`(y5h70bJ<=4}TW14$u2hy3dcdRecB0B) zQcZ1ytP%%bDaf4tT>A{JPX7QY`qyWT`j1iRCH4j?2SF+R&CQHV-M|pK=Jvp|}rAN$-6#sD2&y3TzRlbKl)D;!dI58L@8#DDP4<%hX z%taUjR3iCP_y4{+hfR6s=Sw%;X_~4Q=a$G1lWAH=lzS(U$*0f1-XgAgsU0r%&O?;i zxi>guuWl8-no-swe&$lEO@zIa+&1p+6(L1DWmn6khBJM>Nx$rUGDa31b%tI-6);c; zZuaSUh9aQGV|uo))_Oc9lJ(E>4@4Cv-gyJNEA?ty^5HSmpWb7vRcn{DE~2LHd2lq# zLFe(_t6Vao8t<346|Op8Z&Ngg<+}Cf2qO(xN+fl-rWT3yvEKgJKs(<-A}Zrm(sk%l z6=b>UM$H)cN}B`%?7%3b*uscjGTvJzVV@CW$G^rl=OxYF3bp$PZaJG%dt^;=Cs*t8 zdsR0TxV0{SuyOff(C3u-DyKQl&N63mm`sEz;?%Iu)_(JqR#ST61fga}|1?K7m2NcO zD`oturG(*T-?^92@(o0yg)UaxeL8t5ZBm~tw{Vz~ZSly(4n1l^(tIBy){ar$MJN=j z*OaH0Eaj{#(yKwWlEpOJbn`V0i#toquf<3=D-X_nF`m_Y;zqp6Vcn081wobZ#s_+1 z2SO54Xp%GD}%K+=Tp58l}HM(3@?rO-hf^%%8Bl>*``~RSguFZu@^M`S} zD%7e1+~+pKjS0~&^A5EGD1yMQhW?#b(3&nIyUx#^3W*4$gi7wF&CM{XaZ9~v`(C4a zYO%P<{^XiB6U}vuZKZa3*2v`FXvP+gd^)6<-Y{=ilx`GwtM(KxO_zK4+G24U#V4f1 zBBLicPg(D*;Bb#mj6A)kChJSSXihDhJkBZDPIx$8dg=bMr!}uIr@J{qsV`7;c!E1I zb|-h+zE=&_+on?AI2?Yqy5@?86lH6&yjCXj!JMH7j9UT*a%|K;6qk!+rHnAGs z_SluR-;ff(=6LCIA$IIWk&WH^ZY+SQ`r|Lbj};v_m1KiUfiJ$py)?Qj0zAGcu22`I z2JBc<6M7>zl%KJBtq0R(-PsCo0X9_lL4l2w%|F zWWn-*z!OV2PojwNJ@$TMFIR>Bpvs!I;n4+|k5QQMhzD%NW-|5QOeqQ0>W41mQt+#e z30-WKN#aTLbn6sHu~P!-^^)F#;UR7Q?q$)^pDK#b7D-T^`QkOUt>f?jM7&rzaX|5_ z)}7Vp`Z_hwPjLX0SKZVNJRV_{6gEWTFJwvn{WEu*(A{$N+Gn6zX6feF?7{!QLxMobq2k8i>&;53;t77L>&exJVZ} z>;t>&qmd0>3G!62^QxbrX&`l3nl8=>*nO*)-DvV?@5|DJ= zfNrU>sSQqwbwIva*^Wem-FpBx;rBW%_J`D7h@?;qHO!+A{9`5s+ff$y(TC*l1jv+0 zZXtxw{%2|jh_F$pY2#-6<$AbTs$<+)COsr7{`I2}bBMlmC5`lU;qBXYA1pLq@=uwe zc%X94NPc#|`KKRr-DtwF{lCjSjeQSXFIggV5`n@)?QeH~Vzy&#^a98GcaA$l>}^+> zOj0$klf_a_%TsNKPhkYxgxMx{^wVec z{{F~>nzjgLu;IYG-916a${QLRwE#x;L!;+Uv4upX2QMrog{qEB=oefmvWi*&D`jwN zJo3i~1}<5W8m!a2t8>w|3B)&bmp?M0miTJjX%@7?@5L6C@4_(b)!7-V5J2A5m<*12 z{}~kZU+k!|g!2rod88CxwEZyON40s7rF%mVb@&l3V88Aj^wsYKB~2{G#PBlB^Th`D z;>@14y6=zRmJ~Q;O+PTQx9DzxIE*DNI0?f7dbs1!T{YNgAPR`U42`dK%nioFYHCC1 zC|x!}=a2n&61X3-I5VQ4pPO+&ha|mCTkdNohh_-a51`)?Eyn?8+ofyDZ{x3j`)q`S zM5=u&-KKDvQ^GP_->YZ;N~h^VM)fz}iWosmN3WB$D0}duE1y0}#Qeme`mfaczmx_f zFT%ZXMHUJY@qn3$d8A^w-qPq3$V+}_vI!y||D6E33RMKrcsg1s5q$hstUt5=AYowGW?YYRZc@`wiagL zN=!zWkB7dG;9`bpxbm}(I*P{sJfowFVcx^k&!vk~xgXN#&&Q8EJJRhRhGqmhYlykU z;_3ZEIME+vP#$EU61~v?cblD6d=@7X{AhRtvlII5KLswb$>=K`iSW@hI%h1xLj$a(>u*8&VRHH*zv*6Pk6}_e0R}&>;!0p!MSfM zN<*tV_KVkLx-%UtJ#@VC?T&*)Mp^G~Ed4{}VvJlxfhiyyrU82A4+L6ux;`7|xqSyClA;^Vw@we16{aMs z4UkEzpvMjbXn!`I)I@NY!piX zt#IV*BJ9AS4=Hv%alj7TUtSDrZXhg&HsfRlpxVG3Z^0Cf__XG#ISSgIV>UDSxM~4n z*Zt@Q-loq$_gj|C5PBBT(}c(ies2kzM(1KL2hVsaD))1NMP%@2I@zuni5KK%de zYnX7IF=NK`w7!p?`=5l??uG@KmPT2!Q*$_5OUrBmbo&Roc5k{pe;?&2*S@`LJ8$bq zr2kGi$Z__IKV{!j-iD52>FxT;?=D;2p3ir{^U~s^$#I{YG=1}!tgrg!*RzTql-U(J z4p!VZzix89PpY@KHcqvF<0PQRUm*_+~XoM~$vqH1fxE_KvrK;v&#Jn|ax-&j9;4RFVlvFGV_J zBl^ytI+WvvZsTovZ8(EXt}xiOWjHi(^iB)TnmefY>1KvtQ{2oZS*Tz{-dI5?_Pt2* z#-mk*fz-)!+J>Hdkj$(7$8-<+S$f5PqnDgu1a5hT^0*-%l$Nt;i8-hznJcTWR`$`vUX z!t0lxabapf^bweT(n%u(f-SjF2*NVb^h8FMQAVD3&ps47f+4EWfN93uK@xesdCs}r z4H_Y#_F)A#+~jv`v6)eKLa5{QQDrP1!2)YAdPIduLLm`!@n)+oU4e$KQ!f2gvAlyk zOd=M$8j~YAFMV9ck(a+5C4tnCDC_Q7bSwvH);->k)994Q?-%PPgGp>$*V%}_oJ`WL z=GI^Eh%Z{X&PS!jcju9)9fdLr(u=P4!UX<0)aTMW9AM>s{5lRqZpuv*N5J{BX9Wf0 zoq3Z;q?VomzZAyBI%6#`l14974$Z+2rm7oX;Sn=8Of6fChsls)t6N@o28xcY=_#HH z3^N=p29=fIXMxLR+>{ZHfb%=elRy>utX23qXZ#SA|HsAB5lPT&hrEO2T=9d+n5>(4 z#0%0V1<)VA)4HSUR*VaNZ!2rIK!`U|+a82{7*ULOjGHRN5pe#oB@_p|v+W4<#0|T8 zm4969AQ9xXb#h9&P2mTOHbuTZt}2Iz$v}2%CW#J1qe|L}+;I!sWc)ix@M?@O12Ast zI*uUJ&ON}_4(o@-r?DEb%CBw;`f;)CWSlOm5E@T&v->HyeC ziT^bN{F(uNo&nA|MnFC&QZOfg&tG$$P}2LONwcvTUJ!<%_cEgO1p<#xAa6{l7G8=* zO#2wK&OW{J*~kl6V~)D)Pltp2fjL~1!(gUN-Bt#abnu3U)Jem~IpD8VK#QOnGycs( zRw~{_SOj3}BNZrmslYG8)ZW_x^Y4Y3O88*i;*F}IUqU5iHaCF|+kuKnB~FWH@(!PV zr6{3m!Up8RIz@0{SL{Cj^Q(iELd^yaiN;+I65SR-Ov9^dD}ZHYGM+ z+gw^J9C1fO*JfXx>-1!lFc+kbrpQnQwg-ngUVOO#v($HIh7I0-3J~R4Jmgs19$ci^ z@enif(x)RtK~wR1bDWgXNBG4GXAve9QRk{&YKRvEOU@MHj{_<${eG2eJyzfP`Zh2C z(C&UM64@!^@%4&S&YZLQ2L3(dF|4<@#H4pdE-mmfm5C*SP-J)2y9~#H)JpCY$@AR5 zGW)KqtBXWWVr8Ucx-Xc4g9I14G;0|}<*=PR4oP6BZTXMc@NV$eg3V7p!zK6zOxvL@ z6eHO;(|gALPi5jnELJdJUGq0bKa=x=W3E(I^YXagK~>aQZe{(vc!Mc|aRLN8m;U(* zXXG%EZ&wm}slUF1DU~9!<}@>j>mbO^&QW#`9lx|x`FBZN*6q%HrwI&pCj*&^$D)Kd zwtP7YMR_b}B@5a4LAS4)1VrQqY%85X( zOc{Kq5CPhf479ukQB!<&&tep1QS=n)pAD>wI~I~2o7z!l_XuH+uXg>|+%LR%P+U}9 z*@1gyN;XA9AegFhGGseMOjL)4Q$Yj?D`ks{j%{GO8W&%4i3PpLrH%TQSZ{Z}Tz-z)fQ>8E zv-kR}XdUC&j`JD~!obkL7#O0kbDZim{>4v4nb1`uZ#Y1HtsVN>{rE20>nXwz)CVP2 z?V+92r)GIphr}J&1r!9$4JB`3+erbUsG*16A?>!0 z?UexZV#Zu{pWLe2S|A$|>VWjtdZ?#kv}BTzB7eXY62n7uxm&&v&)+H*6B~ZQPp$NG zBDz+f#zrEoHLO!VU+FmF>u}8B<kR&-21N&{XD9;CbNe`gHbpUUgzec%ZVt z@k_5r!%$Tc?+11_cK(xy?WxlN^3O6~Z;E>C3&FB!Qk8n(Q!O&?RQ$&M?Lw!4e}wqe zoWzzKc*XK(O|*)HWZSzn&FL{RyAA!h(d(SUtaM(S@+~>#d$Oh5T!Ezk0}{2YV$0m^ zi*ch3Pl~kjj2PgG{LTwht z*Kl56sjUTVQw(+0Qm4jD`>Mpp?_APa{iB9`1Iv+XV$LGlJ}DSsMrzEFCysW4fACo% zhO2<)&cAtR(0H++LLi}<(ZBARba^chacsawwpBpoKwn(d0-a`qhYZdiT68!W^%l(P za-V`HX!vPPjCiMzDK4{mjKPnQaEyA&#&$PKPFa40Xz3{sA05;4eY&@0+ZnLN{YS$G z2`g@yW%HGUxk)uzCP8L86HP>0GuWZxDnY1vaZI$k`?qJaWnsU9F<2F(#Iv!{v?UyERO?tSwvKAF-1T#eRh;m$Sv>*@ZGVvZB-Ynw$H zp`6K}cUBSAM`xFIB`0}-!NM(6@&d8as~M=kvVAKatMU7H8|Q8(Ep@7tnyq@MFRibT zQ=`d8|I|I>@Pz_0aS%?@I<9b9J+a#9#aTA{&6;)}=jJpu6HJ6m;#Uh2o;Pz=i7r3r zROln{J9EQt@{Hafg!SU&(5hJtY{Ck!q%1ryjFajXy6bfBwA!?`)YxYZ_v2$kxrs`S z56|`->uNFZ$pL@um_Y`e)cEwR@gAx%kcBkloEi_P$$cC)6PwSYW3X0V&ADo#J$sUk zQuf%0xLJKA3FeGD{?MRe)E18L-@iLFmb^nJMP* zObmA))b1E#P$M_Z@=eQb8JIxHm5FMA((Hb+@%ke`!X>|x$}Sy5qj)|)%1F59#a2O0 zZVTTKcmDlFdBQ~C7lAOxs{gB*!)?2{t1b(oCjQLtDqY2gxo zuNaCUX;oYg?6 z{!zO!jI6q2QW_op$j`gj>N$JbiH$Yo>f|~>*MiOZqV}po^zMW*Wx}aEwJ?1ev7p+_ zA$(n1nvIU}@jcVHioR&HERvrG^|9-89HNzx?)}=hPKGzs{Z(vkY4d@QZ$eM2a^HXw zjkpM+aWkz=xyPH2P}Z+fIHUWP53bPjL?bBk9S2k#jt+Tu*SaE>3MB7f%|>5=gJnBg z7UJO-_Aws*U+twv*Y;2y5R#F*l3HHe6dihXd?mXeYjRQ9sN%@Q1;W42;kG+YJPS5h zN9q?f)S+P%qa3*8jq|q`b0SbJFsI5Te%j*Av#Es_X$+%!@Qd&DY*9_lc;qOt7q=9&6hu=+b41Xpy?A4(XJYL@xj#@2O%+PFufQ!#cXGA~hB>H)HllZ}3 zgJe*ufj@{+ar+?a0)KvS;Gbn~6Z(3mXBkn9MojQ=s@}|Z7cul4OKIx!p(=ILF&$($ z>>hkMbvF34)3n!#Nl*J+bmy971HJ_YUn@hjr6+g#k&{+`!%&os+ZjJ<+5)};42c|{ zU#Xcz=ewa;&eiE|pRA#8-wOPDmVhPHP)iF^v4V*zD;E_RIk-9In6!d9hN645+#<~b zy@X%?hozI`IN`O+EGSBzTU>^~uT!U{FKwp`)%w|s*%xWK@njRtoy3=3JLaZ~qv|OU z^MkU0vDAfr(DRkV8z`#h_^AjNq7zEBkGpiAc+vmGy#aoBRXJOV26=5_M^{y0U=9(^ z8myp|?&_1E3Cn^lyTOI0 zI%JftF~Q8^`dJoc31k%18WQ;=8v6l=28-RvzzmQ*%KXSxzOMMCKfqyKN2Gay_#v+4+ zm;+zm>V$SYJ8tighZ*?!{g+=Nqhcd>2*u|wF-7ra9QQ3Y>NNw(yM0wT8;O$yS$Qdr z_vX0P*%Wa_@SJjMijY0waAI-{y6OO*U0?4md*LWZXusDEJ16femkzwqgAtrjvK?6n zNjljP{BX&F|1cTLsT&pKCW%kNB&o`vlNHI#oWfP+kA;$J*A=vlome{(YU8wLykuLM z5{H44&AFvo(Y_h^M$>kSTU$_w5NTRZ+0f4YWQ?rStnfUGG~-6!Y@;pny&*XzW=~(D z;-G)x^78OFeT$r;z{_^&l={zH*7Hx@kFuZ_1K+oALivIm4`xf}C(lLU8AW)KdilMx z=)7<=m)4pB&exWXdMX3wrH%k*2WOfp$AJb^I*4M)*mN(+Z~;%wvJD~_msXK+DU^Y# zt1|D-T2ArJnk9i0$O;_XNREp6p%C*Kx8pnt*|i6#`{RBfGljZG$sQ=Fwg|SoslZO* z&{B5?LXRCUO;B#fpHzzHtClgAjBnpbM=aRKi@D|`HnvNn*Q8Mu;E8g15S}PIa3aem z55VFTJW?#2`wIj&HNh`j#WApwwAxekmm3StEaylz;Hi!p0lef1 zNMqOBF?k<1$v5MGfbHOj2{S%Ghr)nqyfHh>uxMnbly&TWcNLS)J-oJUn}4S@uuf!HVes8BSN%qP1|*1C zyXnx?aN-y{j&c2IheOUxUN$==g?et+R{VrKy%ZCjFE^PR_K^cFzDsho3vR%9a2b&h zJ&&Hf@3=A}@A5!+8Fo?D+<{3-l27Td@${#=mWMtOL8FM4bV9>u-o>qlrm z8tj_#D>w#=S`pAPR5Sv{naRs$Zs^g|^HIW2$kXfjz-|vV#Z7X+S*Ng6EMqzezr=k= zNHAJ9G1El%{nb@|bron0esz^!UFFxT@@rQ4KYCUPacN63#WtELybX%8qA=^va4Xnw zrYpu(8TKj@gRWC$(^?iq6u5$7em+AsHi7-8C6cYdF#r1jj?^Km7G!_h#MBg1>#WyosZ;c>O6)!b z?x;VLcXqb%dW1-K_kDtK^FfpbIci&H4OMJ?Be+e`90BE;!(<}AF0l$baFdA0MiOY= z3J67&OccNnBoc))eH6&fi8Q&8avlP~Jp8qYL!}0_*QhSZ7zvP*o*_?_7KuT0iXcjF zKbJRv(hm5RgT6N6;$O%AKmPe#;F;=|G(|>58Qa9Cvbd5+JnX@YeR|o)uvZW#+eKX5 zmt)DYA~;vbHJh(ttVS|w#JO)OuIo)Ft8Px$o^n^Hw1|Rx=5wG9ior6u;S z{&w0~+9Zy@pxwWg`EN(#!{sW*#>Qi5NXU3fg+u`Kg{WwA_G=9tE)P=MMM2V+4L7YY zt7kh_p$s_wPp6%mi1%SNGwI8o`F}gwK_u}4boGn?ZDkmNULPWBGlmVZ_w&w&p^{N& z+ZO_pi7WS=TW5-YgZ%Apr(Jv+aLWcJvto~Be>>W33@*ZH>4gB#Zoy;Sva$=K(G3_J zOHQvcuG%9{Rc|d{i8e#9b!>^1__sUwx1UeDru-rXA?EkDSOxxew2ja&>77024f{3% zwmGr28V&Tjzp~itNDmYoy?(e2(lAoBv+i`nTDdhq(*NzWux!Vt3!d=t9R1tT4ioF{ zFP*E9$;iXo%sUxPlyIb8VZ!{j8Y^>y)}1{jXa;|^OgVM@+s~)HAh!UYvL9BIdHlDd zg`UL8e`>-%!22~Dqqt!p@Keili^hfgeA-_f;#Y@2_xjZ#e$5cSW{7{8Z~ouy5Q*j7 zr6I@7S;@N`!%93;4u9I(aDAXX(+TtbWFF(RCMs{O$I$jtXmrd_9g|%AL zlp`E2gPKQVu#e7=jxSz;Ioa`8Md=TR=y&S8nFO9U2trAwL?05bTeqiXcRznqL3l~%Yw4@4?J_Obw=sN=)wPW8 zB*HaLS>WJA*i!4ShUq>a0P*kpnCkd2&MPz{?vA(>LIv!Qa)%|`vaPv6Hp~<6*iDZ& zg*0CYdC?D<54A9KyxB`6HoJHw)h6!Q%lW1t+QiY?8H|qi7EiQnYYy-bpTsEXY0wh!H2pnha76fvieE_SjqNaItDlUOl_dmrXsP=nK{3 zQAZ-}u(1&mY4w=bZ8UPn5S)78iYT2VKj|JxMK;;~u^GTDN(~BaFLE>mE@U_QBGM}gKs)As7ArvU=*jLt1^^GAR zp;l;uJTfqTkq~o?}|+Xyi2{P7LVE_^U(yH=yj`h za4$=HF`M(4ZF_-ev-#z|J1;d;kdD-_?O-Y0R#_Gmmz|#es0G$?`V7?oVeWc@X77JEc6U$z?o@r0CMS)`su$ zC-HYql>DGmI>L=+VhCzCk+x3O0y?__}ofgss2~;37saDE-JfTB^n^NCP$EJ zA_yC^HYUg;w?;}OSRP-7C-DP@h(+le`fTQXe;c51QY**7;5b0itT0vAX;0p>WFyK8 z^(gi%sF8iiEWt@>LU*pxtFbW|nj`bgty8$|NfnedcNq@d-aG1^(6yVs&ckG1QiR#n&jfe+Ab}I#GvhvhZoy_dD0e zbrwY5DP)?gQqlg z-z^j6dst(bhU|8lWUlpDBSZV@GsmW|x6+-quVdtkjFKxdIKs`)>Cmw}qV2ik4X3LP zbmWe8ULzx^rW<4eCkO|vpM{VxL{dLp?9|$y7kn8=2qnEdOhF6N z<4}4v2woLm!7*;p$yWjq54MJB+i>ieRV>OW8=nT3GxcE{aL#YzAs+RrLK)lEf7+a3w~W4$$h##LMVIvS7#M z{6I$SU}l=PfQF$I!%S3N$8!0hC_b8m?{R6`gwH_HF}})xVydGGYx*Ngv;o<&FHNW? z7RyBPM+A47eXMRL$jVrp1xLq^8iY_A?W;^KANp>&+5JOj;}1LNFVgr+Li$ z{Sdxyr}9v$k#jg-V|}4&jnTDR_b$@z4X=#W(af1+d5SL39(@dWI0$hU%Dwa#v z;O!UvcW+<6XyAPF75`BwHrbY(V)EuwXSVb5jQyTuuGBS(%(^fsbFJcP>|?1SY9VPp><}xO6({zRq|85U01tvRZsP?`~bs)Ga?My>pa+gAGf&y+pEif`2L- z#WXT1LCP5o4oN?M7CKH;8Rv=$KWX~867^FYeX;Eso-?^Kmj)WrdfN@8j&I%FeL_*m z{wy$5tXYpT4&-52V_yoBdbHnnr-7EaiT zIDU9jp=}t&R?o#C`2u$iP`-!s&$bo@f}@$ipa5-QjgRVk)mFs zic|B_%BK;*5;hO)`ktydN8a~e-`HK`&fD^~4cZa?$?Id^n%{nT3H7bJ6M)=7XG>m) zV4_O>ZGyPEGO6BQILtY5-SklNifs+=8WNk_jmid9%ccFULHYF^82Pdg5rq;u{=H-D zmU^?^i5eF}^LM9lAb8|4C}{5%tUhxD#;>)+HCOu86p0Awh2q)qxhzr(9+V>(_)`Xj z*)M2G`^j>ymwmJQG;-)_V*83oIKy1-3$4kf_n>=E^(I1*r^Xtji#{A>y892COP~7g zWKWN~PFp9@z~C8|3>QgiD&t$&Z`1WzT4mJ(4U6R z`0m_%-etaL#xP=z?hSllKMY&i&KChoIcctJl~?iy*Lq2|`$(4YM*A*y?f-3CM94Is zi2VVvD;+2eIG7U=V$|RJL%LGVfej&pO_mS962KmvO0}j`TnlF)iM}`-p55If>R*Iy z(xoRxF?-TGb)JgyQG!=ToC;qPwQw~c$*pBdIqswwIPg)^~?3NbQ1@62QZi)PmVO@be0Z= zIv$}*+dEYnpy-5X%iUzK!}=qRhLMV6`m56}2DR_``aZoz$|KsL+*#_IOL!|G&N&cv zusS4aoh$cjONvJz@)$ zlEPPpM9!~y;u%|zDAX7F8Y1ghZE

    #|!yuxvj
    zw(@W^!UH?J$3DItaO63Kg+|$htryi6EJ&ZT_I!Q!(h#v=SaBHEdrgXssmA%
    z)^W2uHcErQ4{rbU+3*okVV2;c5KQQyz9y_1LP#|b^T8GJ-^h>5oG&$s-YFh5M!>B|
    zNO?&TkfU`R+92XC?uk8n^P!W2{7_h$;w*98{Y$LZx3HY5U(W5il0h8h`T|dA%X3!|
    z=CsTpsUwFM3-oU^(=d%n)Asx3N;A>#x=X$s0^4|NkPE$ILFP?8+$8t(U=4|uTtEw9
    z#e0xB_F)A&9}x))Z@u5d0mE$8<_!;0pYr*ST6{z2*eL`Np8z*yWz&4`R#F~Nb*gr7
    zgBmYc>s-eHR%%7B$F?f}EZk~QL%og02zaPE4KdP_-t}aNA`twfP5JRf+<_#>6ghm`
    zPgz2sK$jZ7_w>{g1!*(49ndctUwbMSi@FLk9jTqCh+dAC+IYf)EApwTVfMGVB}T&E
    z>_UwNy;f0*L|p*a58qZMl`y~BI(zJ^rdp6B)5soH>BRdjz4=R3bRob#e`uU*e38zN
    zJ>S3W(k5oOB!^0Js}p|Uu7bqtIgs@C?+q9IlLZh#*
    zbSQg!U^Cgw-+05gJc#$$puokicbWKhV+OrgG>ml~Zw!{Meb4Xk(aNuOD4x0>=Xio&
    z_rWAPMMS9%d5(jq#SPHbYJoJ3?0H}A_!8ekYP-bi&+JLZlClDeDxJ4)f)vUIFMfCG
    zhzSbDwzyn*&#EU#68vKw+N}8)CpeD&o`>8`0FJEhpEVZB-0-%i8|p8HkrF!NW~okOImg`Ky)4k+GTvjFHB_zmMleC?Y2J2WT!<3lKb6nlNO_V30!7-f
    zw8ADW`H@lc&^gdh02U|hU~7V$#{}ZMz8X1J$Q}rNc<^iK@7ND1z)$pbZ%Oa+`MG>*
    zhFdVM*YW7-Jp7n&^BHwkYs!h0VZ>{(snYrBMFzh~qn2zCM}8M5$qQf;3ITj`W;-Aa
    z){c+0q)m>}@DwROu32bE(_59^L5iq6*fzod`C#o(~5p=5VoFEnM
    z$|Rqr7TZTvFPENL)ef}MBXZ=%`jyDoK#JlxAy)ny5=&6laA&1$LzT{P8~lVL;G~KV
    zFBskrSs>*Xz-0-nc3CSI%8$Q-m(^{-YKN3Ly!^~TULf&~dwSM8C*kkUC3h58-xBA>
    zjjWpkF24P35HZR2LW9jpUGI2ywLDd2z9p3W|Ml>t@ft=RmtTQ*G4Z`wwkU_ZHdUNi
    z`HuNS5XxD8elCUN>Rnj|alh}N8&a^QT_-PJ7e6WB`{38|_lN%bCSo
    z|NXgaaly6x+!QY4HbWjHB3vB2TH$XGUrq(D;pexsxSdcyRa;lNny`+AG)3_F>#h@$
    zw(jVo?nirq{>qKW%^F6^riBs)xAICnf-H!%IM?Z-rpgJ|5*0;}EDC{z6*fKG*ZxAE
    z)j&qtYI2U?OSW#LI1F$`=ckD_a3=j;+m*aCoWr#k#!wdjsge0O+HGY8_`scv~FL4#S5x^
    zXj(5g&H=Z%Z+RlvVn0w|bbz7$K-mL_TKN>(1Q=Zn1(6*@usP+5+KkN){c+>$0fm2&
    z&#qu`j~ZU8kgzv|8)&_HzprI+pW&vDgE(ppe|3j7Yf1t(9UHLXqo$m9Kz$Ukj^~YXogySyG7dppa0q_?uLT-(Q+rIhf3^f@r
    zN$Z2oyqpJar`o88?8FHP*s4|#c+y~riA=(fKBV~k=K(I=3iXAF<}y8`SBNo4SN>A|
    zRNyu$Y=Z|LP$2ix=vvn<1N*@Z$*lSl5YZ?S+sX>a)Nc7}8hR#z%oPrW%0`C2F)&*^
    zQKyLaX(gO({h^~sdST^)*pU>u{HCai(Efj_?N-ouSd&FN*Fkhk+Mu}{t&f)$Z1*wc
    zY|)8fb*#;c+~QcJrV-Ts1=Z^VW}EUz(L+^=%m|c6o|gKEcTrk9QXi8@vL9Ax81oH3EP!kXGUp|-Q;KeHAku>h;;z=o@)0b8
    zfaXK>cvb#ZSQ;imgY_5)sxt)=HZ3JV~qu{xkiq68ETC0-JB
    z0&&^na!?qtXc&Fx>vEgewyB43ArF)J;r>UsLoCG0WMly^$SKUyUXVTwk4Sz9D69|m
    z<-YDoX_8^&wi(H2iN;+1##$Ec^sSoWqhqkp-9l1r?gmkZcU=55H-O~UDR8`txXj!@
    zay&!(dr{~W>BBZqTQKF`N_cM)^!7({a+D`BNnIF_P3o6B$k0It$YF#6D&4WQ14v)0
    zPH-rexKgXNOw^3-*N#nb;9d4c#x0s^=E!+c9i7^IO|6_u-d2#vHYym%B{=Inqf1Zq
    zVn{Hj6B)zcTWgmDZI1E$G(%@W9qX)fVvWnyH6P+T)}K}n*cNGU^NWb8G?C$IlZEfl
    zXZ9AJLD{K?Yr)J&fS1H+(?880H<_-+`UDHzns;W^J7id$AP7_@3YW-?blxxew?oIt
    z_(z7Ks5x4T9Pb(@1lM`Vxng-Y`84S!x@fRmmpt`Sf~Y~gvSiO~!{F3ZMF~g}aVwga
    zljZ4fO?;Bxb$n|t@yn&aq*#r*od-_fRSivj>-$n4(ILc(qkVNLcjrDfDWj^%ZP4YF
    zv9ejYAM!fB9xMy1+_lj%e3nrq_U4XbKzeAlbnV0!ZQO}PW$26L{RH~GVs>O4@_JnCnQg!6+ug|W!&bT_m2}a#2#B!B?c=Au#
    zNjMJuS?v=StG{O}x~ZkZ8=c0Z%+*BK6`4^tN0MbhI`3*%2v+YPh3IcK!Pcp;g$FvQ
    z+N!WdkY!JwR`Ko&a?Th@owqrXTsntawL5J^`=>>hJKTM8#V^)%*p}~u
    z6o8_nwnSy2@6&_fB7VKY!2<0vm^4%~?H`!xtlm7;e{Idqmz^nDJ(e92i_@}jKWr1uOW2_WX>NW
    z*!<(3zur{!b}z7zjY=7s$Vab6BeRvOxP(db-uy&vO40k(eaq8{Mq=hgqSomk;6`Zv
    z%!kTv%e&t#lFT;a05}g+%@xtX{oB3<`*iFxbnxkb0_dfv-oeaW(-1OAvaMIyl`HGI
    z3vxcy`n6nCnapluk-%Chn4Nm0=I7~#i$K0$IrMcq?Y)n!lKwh5-;8H1-kp!Qhn^G%
    zZqP3pBVM`U#I!g%e7z?N+s>jyzP@ct?P-FL6mTR@Lw0z}urZrhU{*CWFEE$15ByH}
    znL9{kk${7o*hu&;bYbu9BA(lNXI?OOn5sBxiv@lD)P4?P@pt
    zw!S$=^B4n58C
    zeWGGU_0C-4Q~6~taEPh8nrwd;h%Cdg`IK`1mMHg89`TR)15Sn#`2=@=MiaobC*ZBb
    zx`hc~Luc#K)6#fv!iAhM_xxXEQV8%*)ydfUS^mU3n*fT`e>AFt1Bb+-g9|ixAD}hKGEs(vtHOx&y)M-
    zUbxhHv57Y5b8H)mj%@^(vE-e!=IpifFCic~)%(nF>|a7Pbb?S;1thNn>HV)atIiUP
    zw?Nd<@m^Ks5H#5Rdj~KxhCoddX?mb}&+E>pxZvi}p`H6Du0!1{+>a>t(_
    zhT7=Og8es0U-c&nyseKG>eY*8ow!t282|;$oFa*DxxcA8*$zF+Tck*gp=U=;B4G7F
    z3);2YlxY4IGCyCK-a@0<&G_n}1MC;Iw9jC)RQq2t(AbQzjaIGV0sKO}A8
    znGw|DbB#!%9qitOHel>!yC6$kTWPSXbfWJOoYQu&WnQZZ0@3d|{^)IN|7D7X(`Ba4PPtkHZeN=1OdT
    z6l_hMd5W$zyQzD%g)6L2MF$HXc8nMH_Q}!jN}Np&bU9U510C$qA(QRl>-CJh#Uia;
    zx2+}6c-q{PD=Dr-;Z?NSwuFh*<+ya$@bbTR4^4Hk&6q%~yW&pNCRwn1azu4F0&OI2~nR7Y?1{NBu
    zk<%E+gBU7CGKnq-+9VooHNo&$MOE=2B*Ld^pQ2jx_|*%N=^nY7hj4$3$o;W$Z&<17
    znXlUbA$c9s?Z05gLzNN2o_ESzh7+R1J&AW~+)yl&QZ%(dmw8I3QFi0ezAfU)Zt85jky$%H&qEoo~=`
    z`H4-I(>CD|n>hQ37HWNl0>Xjl|qvW!9?VjW3w&X!{0=elKgN%@HP^xg0$k+^9d
    zi+D8m>6NU(s~J)$sRo-AdnL&w)FXT4r0t2+I+8yo4#8pvd0|ih^j7V~I-%MHGpOg0D~4-skSM*M6_H
    z^M2iX+xbJQ2Gks5j?r`fdhgNY(30_~CXI6MWqPjWgu2z2KZj|sh&hGSfE1j^KXB|Z
    z+x=7(LbECVi6&74Y4?T!m$LGx><5^iGRpj7@9D3D(HYCZTlHsQTzK#A?rJu>jTz|7
    zCYc3-Sr`&r`2y*aShFr}8@zaz0hvr@{8p`e->$Lr%^__dV^wgAU10
    z10MH7>Oo%mz#jVMp{H@pyE8`ZJ%@;If`PnXRnXxl^RF4-kT!_{fJr1_i@S8Ocdp?7
    z4Ig@HUI^mxTqr9gt0%<<&R=@4Uinqw*B9um_y`2D
    zBSkvdlLB!4N^jOXz73ZOvw#d1%Y`!1*sb1eerPXQz^m8vhBwEUYH9{jjC^A+Lhhr(AV=AY3*j(vu-DvwsDYJSd
    zYWaL(;Qc^A)mM$_%kS#ck>D;=fQ6=rlxhqKd4_^YNASLyXqZT|Krq2TjjZ*;c&-;X7J%btZZ
    zGwu?AiSK7J$3QWjUTn@;yBOanx6Yo}QRS%D1=#ekvCA*bsJL>&pB-Vl5;dGs&X(oB
    z=tlAB47r1QDp@<9{-BsEBh?ox=yONaVFuf@T8$
    zC1C&AIxK5PAL+)1f|x)Ol2v}b3f)Bh5%&1&vSiJW^7M{snYnxHZ%;$Sb%v!S7t~ZB
    zs_1b7lu1y(hKfY!h$psEfb=iJ!-Og>*kfYkq$d3B&n9qxUG^Ul50Cbv41arCD$K|c
    zX=_!3W&;0elK$@G<~*jL6zD=S$O?&E*drTxQwmV`pKa6rx-2^u^3NR%W4=^^e|s7~
    zz!|N*y%O&K6V;gG45qjlkfW&#)BZ~wlmVj%Im
    zyHX2_&rC7F)Ug*}gT3(b1g-mz#(Jq1zmNuODuHlu(1A3B`>h^$W`B0E`|Gl|6@}o|
    zP0jn|9{ufUg;ub5dy9k^^uqvg8a+LMB*AB3v34{5rbBY*?iaHT-XSem4jP$xk^k)b
    z_Sa<5h^LcnU0j?aN5T
    z>#~GIH9%~Z_QHFGe|uVlFKqYUN%$X~0gK-5^ZgG){AREJVTgb7;r}qi|Hc~P<1fcA
    zvLA&7`Z}#&%;o0h`rU~jjG{3X2S~6V1{@RWyA*+K!T#{UJGF
    zYiB(mvgFrd(Mws?{c7lj~_|l*26A+G*v!goJIeJ$w;{)DuWF8?Tb5bTKlA(Jm
    z4qv*cM(`ijCx|d6V@H+WX?dK+i8?vnwta$#`jI|CQHMNpt0Do>OP<^RVSUAC{_v``
    zA+OK>pvJKJkuAV~W>G8R-w|I(fR7Jo6#v8eitG&Vr3yP?Z}fjSCdC`D_rI@CeLasr
    zxow5b_pSVYIHuc<@bZ6OpIRdd&PUKZ-csN{9Mk_?)BhdU^rc|k+;OVKk>z)*u?W>0`=->-0u+}JQfl5V>j!_QOZm`R++4T=w`pS7}tf)Fs;C?
    z{XasZ)k|J|pyuZT_VV4&v$+gZ&kj_7LcwJ$o<}>KSowXu{R=UVlzZ$1gk*ENcJqB{
    zYIojeo_E}ojN0XZ-#Mv$gdCCNbgS2e7tvIFuQ@I(ixVUN3cTk-g_S1;HvI;a`ngGH
    zK8Xy6M#<#eQ(OXi&p4zfARyM#1a?dHE+3}mmxDbF6%Y}C0FdPcsnM{tDau+TL$%yY
    z{+H)HJPQ9P`)HUKWQi1f?37ddfk=%{Aa)+SuT53wL}d)Ep_qu!AbYI$jR**+`FY^~
    z3^93nmkYOHFWTY92ndL%H!^{}df)ZGK>dg3DYC&oZWZd~fNc7JeB32igVUjo0r?;!
    z-(koWi?!Bj8+Id0%?Ey4(kCQPEKEh7y%Zo#5itaN5jhYbARtqG<_Mh6CUcHznC3q`
    zF9?wwccs0Q35bH=JMX5CG*cmWiO9Qet6D+a%7Fqny>gB#!SEEc0to>@gdr_F8$G=w
    zPOOEv&lXcopkd)bG6p_1s#CC!rSX9jq;2?;Qg_B&=ENDfj
    zo0|(X(S6&c2ZswrzwCZ9914F0^JLf_9@CbB(KO>k
    z^*Uwj*^}XdLT&?-M93l!SIUz_o;U%z%`4i`&0PsEl2En852_O`r-O*phl4r^C`rYR
    za_s?j?coJc5+dr?_u)4#kKD+JsBhm!)XrEEV~29&y2Fo*4@v|?EwIz^h38kv#6i<_
    z&}ezD-^H$#+14K;qSipPBqp?i6~3vM4RkqNYWWO9gE@{j#sGUZBW$OuvPuwvfxoR3
    z-?()|xou12xgwAr39KWah}I$lZFU;8**kz$X2Wjd_?C_mvr{ALh5qX5@d$VLzfsxH
    ztIGJ@H=I2fVC+GbjOG7%eNl=ObMT(`+hk*
    zSieHQ@cSjP(<5Sf+m;0TAJN?Y&ZZ*lYj1$Q7B!AXvrZu60<
    zGOMF3w);%9G+dr|TFgmf=0%>g-e47N>-^^$%QhzR3OD-LS=!DQ3bFT6_ldb*dw=Mh
    z^qg$up>~}w7uQ1D2JfyeMY&Fs9nI^NF5fBNk{RIawp`sV-)qDr8(_&XmkW@+ygtWT@O<{cwgvt}tCuA^
    zsi5IRRPhMY!H+$u%h8m=I^s8sYvV4C8Ii_43arq0#43C9I(u-3lbN68cIrL(+1lLU
    zqA;!T3)eqB`}mV`e10bmn|Crue_9p4J8~nF0>lAOcpllAqZzrdpQn7tk0&pDe~arg
    zQQqV;%u?Rs9%I$#4g9{gs`jZDSq|3rXPlFw#aN$>i%jF^w;z2uLggl!qFA*xED_NW
    zWSf@l_-*44CE{CKUO^)9Ip1PS`c?1j#n5p1COlNf2Yf$q11lNneKhZmCb01`u&R-|
    z&JhwsJJ$KpU=DUz(?KVFCI7~a(jGD0CqmC*cifp?@)cR$d0HIxlDkIsz2s@3z_!f-
    zs#BuR_@_EzRNWlK@gFhIaJgNEz8dudGEXt`<3gs@qB)XY?%u`2{aV8peCJ+Ued9pM
    zgtJxC(?syyA!#-s{2)A#7~XF}hJyt6RjyJfelzFxO=OdkZo_-ap^L13xKTKu
    z*XVQ)FL}>Ae!CUOg(_d0yfd1JwHA#YVg;(?fR!oi9r(ybxIv-Q#h(!+
    zCx0x65(>6_-pVP%1HC?BD?1@PN)ld!3c3q%`1D7W8Vv`$ImJ3#FOBb!?Ppa~+
    z_&qeCc?xmgHy!-nu7>vLSJSiz<}obYX}*iKrdA)KfH$TE9jx(q;xv&79DLRF
    zn=NqcX&s`BMAY>v&v=St=-YU%FQ(;;I~T$F#NG!s3}_8{7ID{yZ8!rPRBUsr-^)b`
    z6#*CVSl21%@mgz_ub*D33E0LNrzYN-sJG8Tkt6QOOE==8j*Cx9`QU~>!$Qp0UglG~
    zg1G9qL=&D4m;99>9o}@8Y)%-Z{V|y$C~i7U+?oNyvU!9Y+
    zVw?MtY>bm+WZ$RyVe|{+|0r%5Z}Aw%l_zK;cJd0R0Du69~wZk3V@_YOn)0xp0a)S%f5e@*-td-qJcpRR%5DYKMc
    z(}s*oY=>i4KYvLLScFk?XA=}K0c-BO`uU!^g~HQ?y7O7+Z64{mVSX~4+ZEyKd1N?}
    z01<1%?FPoIjlV}h?TTDzPE0P2uxQ$1-0l?E$(%sS?vF*tamN|Yk_~kkTblnwpB<7@
    zK|kug7qqpIW!({=DmT)904nE<3P&I)zPJM|%jWBUJb%6@UUyV`al6@V_`Yy{+8XS6
    z=wsNQZ_`5wG)oAtaS~gB61V_tnpM>Lfm*rEztk91#!W>a;wjBqGMux{*DFip$Yok*
    z<@!!GI;+vVaTfU8n}{fh)*)-%i&Yvo$9eNxhT6%}N_TK~u&mwWtL`V1rLGaeA*#WX
    zowuc7nhq#&#y6`gO89sAmxO^UzJva(-Br5kVC*kcb8c<+{QTV2fA#`+I{P;3LNC7M
    zturv2%f`pgcHcc})O79jLk<@_w#aljBQI{w
    zR3$K9^~6rbH753!x>z|G|79lz5<~^PtUFQE@lC!g8s1zRwk4cZPfC;kC-0q_8uEh!
    z)v-u-76@(#aXkhmNQy!RvL#%0mPbeLp_@@az?p1v!I?H)!Kde)C`nAZv`R<9l)kk&
    z_EI*1vD)Of_|7&1m^v+LV-IAEl{ybuzJ??GybT5~J6+E`hcT4L1GF+cm&>g^x+mGhT%q~tG9Jxxdk_=ps(4I0KFR%T7!G0*)1h0Mu6kuz)+p7
    z!UdPNnc_LFE$bj_1@InKGCVW<9Hs}U&u~rG-cPi=ImZ-(y>|65RxnuGygxQ64%
    zH9V{*BBB6d@IIC1C&P)7S)@Gy*C2-YvJ{tmib8N0e;4pwN7XE>lChEwJ!C@PGk8k1
    zSd4qTvz5ytyTy6GdK|CfM5kFw4-A#-pFxx$yYIA%Ovvsk`Oo5Jp#*x00G)inVt+`32!)ad7%AXT)VZ-nY~ofz6{dbB`h*o&mGNdaXblT_Z!?
    z^220K49^Kc|9fl2Kl_Hu^{IS?r)xWG!j_|X4RlKQz3y+?jrVossfASfy^LeXp*C@
    zOwYW!x|pG|2kJyZcWmP4spz7xbl>njr(Mi&#e3wU@k2c3aDgO
    zMLlL{Fdjh<{QVKPQS}8Wm{!l=43Do`VbY~x(<3zHW3W$m*NRg_)Ymg_Qz^F*d+AQ`
    zMRa`c@dHOh5=`3$wTtJ9EQ4x!9!-k4E!xyN*YR!+6GX0wc}+Fzs5s0sk1sxVNiwf`
    zw7-t)n68#IwazXyT+A_aowHBew28mL<>t-(N@yUS^zo)(>(Swn#IK)wEwiXi{W(za
    zL}+_BFNzWeb=a9Ava>lIO!6hz+1n&b59*?6CM`i=YFW;YjaXrW4v>Z2wp}rE#bh`z
    zUd7IJZ6}XjP=8B*Dcia7sK4UiOt!Jn9=&8g1hC$I?7r(|I$12Dy3rRfokHE`J*od)
    zh%k?9Yw^90U$Rc@OjqzuA43lB_DD~uWc&ajf24O#zJQW78II?=m~|upG>r$@5)sKj
    z?FvDoz!#5lr@^tklwk*C_mGeb>e<#fK@pbEFJB91>Fvg=v3
    zr0sc2k_M9#a(~_wZmcaXIsv4e5~6NL8c;%Xa8_A%dT5%+b>n(N0U-a25wcO`3=NkW
    zv0EV1WSi%Yn3f*zymM))cdb9aN~p3*TloQV=Nbm^Tl}Pyr^R|suu6;farp14{hR@fg+m0@Ydrk={@VDI@+L|fT
    ztsQM~?0vv4p>Z*yB2&QkDR`LgGBIGN-1Ci-a<5-t#uCIN+`)R?b%MXcDC#QETV9MVY5+#N}#Y4p@<-p99i^4^9WI*swESg*_c7lH$9t_|I
    zOKQeWw={xoU>3EzefpBGld%!gRQS>m+6B&rVr?3)C+T-yYN{;p$5MzZSohtxpUu5V
    zxvM0av2Xulrar5QwP+fB;pGuaYK+`amt~1qW4Noh{}`kt<)NMuansSLXy(zf
    zb*SRcwlUbD|3yA=OHAo5yEfWMf5&%Xsd*iof5l7VSxc%5&ONdXAy87kj1BTkGEqzGLC7UEq+FuNMO=q_3
    zgEB5UtFB6ho8P$51roCo&f09tj-1E)vB`dxiVPw{oSs8*DY{MYNr1
    zylAj=O~QlJcg7n>+x%NgAjWM-v_vJr92jMQ&nslN#eyu68AnyHxW^e-nP@YO||>An)7E^DnM)H?753
    z``=t1sfhSES^gN?Sqg6frtR<9h3db@~G7cc#?
    zIIP#G+<(hsxJXqblR$sQ4gKy>+30@qker5!UWp1rvSpJ!gj8H$RB6o`ty_*^oJP#J
    zhovgfZ*O(vlvYu)ive{C?^ojoenWZ9x>uiM$pqF;c7+5^%Sb(rUMr^=IjbCacVlv`
    z4(Q+#9o&H!_$(qN<4aA#@cOM9F1BE&?!I-S0f|@uOxQvN2jahW07HpQnUk+;4tDen
    z=UuaSe7(rv@T+(nZ?JK#H}gFBr{Xe!>&*rxSE7faHDY|K@J&F^VqkbYX$@$>SPSTp
    zQnH--DKJltmW&W5br;8qhJM?aqIhK$k7cE^vY@(*7pYoYk|OSdd{M{DVfo%0vd3pp
    zD=tPS*AP=SIJIT4m^?AH!%%7fqj(Mpnpa+1ItdaTFi+3rcYn8-M>Ue>jwQwM>QA#j
    zm6_GqNVKMhq!mAwAaMBcGf&JpZfUG0$K)}Z7Nf8cL3N5p_bH6geG71Z2L>k#LD+PB
    z`4S%(ct{vMne+<>b;4~39e}I#7J!+jW<0g3#}dlf%vdk^mR{PM@f(ObX=C1Y7wOOX
    z7TPlUK+WN$63rxI)CF;`DeLu>AhlIm8&`MXpnOBQC5bd%IIGM+eT2
    z$-+jt&Cs0RtZAUQ+btFslqw$iqwm&4pHgiqPuxt4#d7RM-^(XAzdDq>QMVQX)0g~R
    znqHoCyUW$GUDuC}hd;kpeA7_kWiqa}1}3Hxz6pYuBv2FwF%fqpCK4N!M(rANTS&Q$
    zvkmDh{qf#1Ot8HGPH6?Xj}3hV(m*^LK_GXRV5DY4{ixBb0UHrV*+ij5`!AQ^y>&07
    z?d?&bpvSt!-vN*4g$!uQbWD^R3th3CJth_OD-OHXb$ki3t<-lB1=idd=`9!0;yd5x
    z?s)brI!UldxG7aonB|m@$L!;2o>N*Eb*{F8*tZhmsVU#Qi9WIfk)`>{k8dujKGxRo
    zZ^26&9O0tv>NlTb{>~p7H^_SzjOm;=DSXq_jTIu1>%8=xZjrDMI7UaoWkXn@I4Jed
    zN%I*)k!6@^UsA|=dv7Ro@)qwKo$RyO-
    z%RxVo7ckP8f5j+&y_6?`@ZOEjud?LB_QkWxLaHF_>mtA8ltM`J0iUhs(6%N!M5FWC
    z*$gd^^g8cVP?g7Zii-mNnoKXVu?K)rKbI+II(WXXWE&bmW0bo=ZRIb
    z<%dumCS!i}8aq6?){VCgg0}#5oCBsEiS6THag{R@NDY+9nJMhsC-tmXW&rqb_z3%C;hu+*{iT{IL|&rRMoej(y1GRQB-2hop$|
    zs0<>3i8
    zbbNZ%-&G2I!rTUIC=^|FQpJ?s$sNwc4`Z;x4Q79=A=B=U5SrNP^wDiYg_EQm
    z{V^QU)%Fg*7x^4t?sa7X1M+t~YAf36pEjViF`FzKQa8yT^Jy&OVe%&-sbbD5hNYiN
    z`r#P+-5XKsP_v8+h1!r4zQ@9rjS9q&!Q$+qLYlvzF!Yx=`6#rYwG^c>aDAwEAKLex
    zy%}l3WscN}&~B>_P6QLH6SWpMy;T0rl9NaorM#!fmq%a!4T_lD^%M@a3n}LBjznsF
    zsyM^erA1J8w&2Ii;#AFYZLfv!Cd5VHK*)O+(lD-K{=-g%-O*C>=|mPh>dSCLR%?a|6(`
    z%MK~_W*o5cA2m_qY~#IX_^!8}|Ckj~tM4U5@_TYPt-LsBNDO-`3u0mcWS0;7dUWry
    z1U+Ww5GF^u(VVaSoF=Ji`x9xuex%##M`h&wxe}ySPFPLQzk1cW(JA&jkOpJv{qHMD
    zHNVuM!vK{f9H#?fla<*nnMe{_LGh!WzW#@$Y*T?vq%Qp9)fE_P;Cf@tLem|bPbKc;
    z{MupNYR+dnf=QN3+HuApZ02ZN;Plc+eZFR=1dkt$!e7hORh}jS89FTJmpWS`g>d{(oik9;C5HbBH88i#p`y|
    zSCUBuvy;+Zs@2KYK!ubbd0>#Q#`YH^jXRM6Rk4b`{2;eO#UxpA?}{aqSV$bPO^V6OH&SG7lm
    zvq&m~)Z#N9#P?r;Tw%;(6g~W?kQkUd@(jXm5S1WRO-J
    zPg&BEX4IK~s(SLaM68Qnh@RZe2z%mQNuvBzYT~2z8m25+D3rc4O1mNCQ>|Qt)NPAH
    zJ>0LUpIAGKPM(LhFh8LCbL$^^*`q8Ovl~`OFQ;9>n~M0TO1GJ!wxDv5DibL{>2`XsPitVn#uNK^AZmVW
    zd8qXwSbM!Zic*H+T09&!s!}@F@`GHc8xB9-rD_fSc4;x!(X`g;bg6ws=mFxcX5sdQ#w+CS)Y(X{gyJ7y4ijEK-{3_6Z$RMQ_6
    z%JWQDJu*T2gyH_FLrs>Eu!zImwds>To!yK)ye8xDW4CY7aMoEmrlE336;p$XY9bz%
    zu9fqBM8U|qzF7KQ
    zO<;iXbfYEP
    zEc^FwA0Ev93LBQM=~BXbCs0lUITRxz4O})eMnprrRF(?J&QX;jIJS(HFf38kAH<=C
    zb(QkHtqT~6Agzw>M~|U5llVGqt%f3SoqAa
    z%l#6IC$_3~a`(&ZtgHXnE;D#rgLA1*7)awD`_lEye_Zw6_
    zIV#q+Ag#Ks;W-vlP~4ez^Qn!2?T%xm_}OJ6bFhW_e$@P&g(ewP?s|o%TWNL}iev=O
    z?*hOl4#|O%*_2WR(QIhq8M)AG26LIUF9a7A+~N!J6^)Gpxs)iqM(6tiBE8LIBUpjH
    z(tmSM2Ro{tlQW^}U?@~`YgRx`WvIB&D7H6r+cGNlEHunwFH|K5+;`Oyr?YCa!(AprZtBR-U-S)@0Kvfz~Y^RoA7
    z5Wo=+JFmTGtHM3xmj#$ekN-jvubP_B^li>k|0kL%4=lI8TQ|ArzNiTO+*``8VwmyHCkq3w|;(m%hmqk$xFzxE!dn!dtNApHt}C15zqBurHT~eKs*~y
    z7YxP{i^Y!}RdF*FXSx9m3dVH$i)pyzYAcz!c+gb+Fq?#DtIGDE4;+XuqEJ_7@ffo#
    z5&G67#p2eQhi%nVx(eRZ=>W>>PUl)Noqe=zG7+P<4IN5`U5j-SG9?TF;Zf8h5BEF>
    za^&Pd$u^%ha%?cDXzwi;AJnop%zW}s#X_r=uz-htThL4-{4TSa^Kt9teLw3(~(2@pmDfMTq
    zG2$^g;}pro&vVpGXQ3;=!g1Sg%GZgk!Vh+Y*+MipQ6A}5=yOS#H31S8F3z>y^YaE;
    zr*yL`G*iSmoViF44CE?6q3I#u8#pMd72e4GF%DZ3|8wh|%()nsL0LhqM6=W9n}c`U
    zx7y!_y~DpzmNR)oKK3Gh`$`X+xa$>m2am?Sdj4;hE51L0$pS~eQzA3^*uiPUEdo6j
    zbVaYh#UZ5*qjOfYn4KJ(GkxmkMnYn~b%
    zzV3zQcdL02JT1Q0_vvN)-P{j5yPAzQk}x*t56w!AHFLMJA?_U~2UF*d&mvp^5vIF!
    z+GW&xE5PA6Za}C}0Oe8o2h7-$1aI^H;G+?8zFcY*-uKxO{jx9?ZUHiURKzn767FFE
    znH{0=1IoWU+BJpKLE@DhPiwEw`SM7ems>Vkl_)yWL2k2>I#f625(
    zgxeKmI>DtIjA2E~{o0&eY_ldJeQJO+Dk+_yg0KVvpW+NkdE%stge4A4Z$}Qr&8yc~ORQqsY_=MPf5KOc}GJr#W>J`b`6B0A2jrheVYg
    z4cziFW%~%|2L$b!oi0q+f*Jd!O}kO*hToqlH#~hHL}(iPaDX$ZK}
    z%Rd^=`G*3Z?!aq=s4+C$Y7;&xubgRxr474^HPQt+-6?=#8`3h%E
    z#XJaO^mseXbzMBA5j32n+&D2F5ev8(Wr^oclT-SDn*^t^3QQe
    zy2Zzvw&XwTsqbH&Hfya
    zQZ|zfWdM|Y#tI*i4AM`okCoW9GjCRf0df4Vkfewz<+kdP8K=JPYCGkV@x<0>nUqsk
    zEx5V0ue4gIB``V9Rh6oCC%LH;Pd7?v*`{GsvM4N9J%YuG>a?;W0Q~cCrNWVfJQ60Bm(Yb7K?NQ8-LgYGs^Taqi
    z%8wRegw6;gQ>||Jnk5{+SJK-jY?14$S;L%Q@hTun=*(jgRR2}$D(wv;X|a=9(Uh!r
    zG`!IrH70Nps1^%I^0@FsMGj$VAfr^~X5uekoy)uZ4nQNgt@jE(a=3({dj7?m>8ftI
    zX_YD!X-$I5C5CCnWq-V>T;m5UntIVoNGs(Y0jVqi(MqK5V+!Psw>G=qBhn(7qj+(o
    zb_4-aPLary;fh{rkr!LNjYADo@!zpb*%Cmjb|tGl!Gm3FuE~|8cDSKMX;iK^;P0IR
    zs5laRLgT5_?XI7B&XHRPERc_=@vVMcyJu=;>EL(IWHDV|S>-_5U>@1@m~~p|JQ2X+
    zDy7DVa9{1PBcX%%R1T;iFA@1_zz=t8PXMxN0)f!zjsQM4T}V-tW_X{X-*CfJ>!>d2
    zC0A^r`)!GIM&YYYsQgL6ICceS^;BbAZY)ZBcbGqp%yio?pC@6PrM1F2E9VTlu8gpwlq?#?>NR&6PFHUUyyyI-0J#=Z-78nAbg`MHNdw1E
    ziiiVXU#lv%GT8r?P$Gu(dgxg)oP4mbdJYZ7FH(OP=*An?_q(kBf&{Q)Yjt%0l95L;
    z!$Nnk){|VSh8~=Nu-_kUEOvhJ^t$alXZr1$r;vjnp_7B^1c{rY+$lHw7$8hA-MR7n
    zxcvoF8y*e8@WvW3fKnQ(j6#m{=#e9>tM`o(NtyD47P2lzkI9uG#?_o3j+NFE`@P++
    zo2VpKyoq1BH_gwg?g?Y0x2;@83XTkSDWcp0^2KIweeIvhZ@mAVy;S_S>}4D;%51N8
    zKAG4@wfPl8qve=+7jMGIX{~b{4Wp(Fd6#9IwZFHgx$t}uLy#rkr@hoiqC>^`#ljDN
    zvVRGEEHYq*wli?gYJPVh?p0UK{5z>N4XlmhAL5z6+Ip#|(6EZ-Mh}hVK&A98h>*EJG{$7b^DIlyT#}y3
    zaUuWv#b~dzTL=3jOY)whd^eD^n(51L!L3W01n92VXkPvub}K!`^GXNni}@?y(@y`+s@;cV#hV)_&j9QQiW-S_Z_NUO!~7YaEa^$?!UF
    z?mwm1P%QnKURO;(Y0~sGz|v34hdxeQ9;>!+G_AAoLe~bTxn5VP(6Ty(dUVY(d4~+A
    ziBH=wkNl@7>n3K$oDy7qNg#6X9~DG7-awB_o9FyB0;`PV
    zUc^1_`%H3-MI8o)t0&=T7gT`C`w%L>Z&Uuh6+E+P&a5yw(DxV0Re}4$k++qHg%@Z7
    z-4@^FEkNe`e#p&%&lo`10yf*q&vGaYsSS!8FWoU_`|`ZK+5QD-6TtAbnrNS%k@C(3
    z=!kxCFw7I?X#(z0@gI>fUySuU+duq<47c-+cx?Q4ZNqUPc*8q@V-jMalyYns652s9M7xjlmG{PKERRH3
    z*4ZyX!i2q6P~nCRPXgX`XC69wU0Alg%0ppr(JN=#;XHybSyDpT3;?Qv`_j{)xP>wH
    zM3wbMhRF5CAX)ox8VnuL+;w#E{DtrEb9@bXb=Y<5Wsgp(F)+n
    z){Xj(s$SQ=Qfs32fW?jU#HlMDM!YLS)MCRrmbA)~Pyi%)$>Fi*XOs47hS+>{%@PGb
    zxl4e0Pr&5?YV36EmsY;Q)$zIl(Ed7}9ij4oFue9<-cCk2kP_=g3qS}czYbg%c}9TL
    zR{mH4RMKA%BM_qZ533FB&lWduu=n73|7cyDSHakJSkIDnvze6;2OP~#Yh7oN5q11z
    zcAslF^BNyRDnJdq5Dt8iS|%+{CU)afk0DyfZTV-F4>d-}ZR5#*RbVL=-i8xL%Jot~
    z^Z>%u(ub^QTG~($xI-3!HLr1xN3KJbgm`eeuPGG#Mt4U`i$1POO9RYr1Xi1m&&$S}
    zIgMI`$@i#boL*C30FUn`YhsY`)u4KHut2v@#~Psy-Px7)vL*Wg-mjA(V(n?VWMYk|
    zW}$FLC|BJhWJE+ToH=6LGDiO{c!DyKzsMkP?i?D1Qh?UcQ_n~<=tqSKMf)|sr=PR+
    z-nMk_aP`$yU3D=KuirqBs9sv%tNC=Zo#=ydRg(&3!w*Bb0OATsW6aV-gJZS3gn5Z9
    zUQ&CA%rB>P&g7(Wpv|0|*U6%3qh5PSuqk8UMmR%RtbBn$4)Y2Ar3eX(h{<^Ylo01t
    zsKr@ll?gCrW^~jf`ugqb=L<9)X{OGA*gaqE`Qsru9WMgFZ|N#Q%h9LR{v4BxCuJ+s
    z$#RfJ;q98Hvi;vsZAPypi|Yq71*FMkTgt29Tf@pucFISt-;v2&2kfo{ki&S-b1gD)
    z1XjqQqqiQ3T`RQ|ManLJ+f*L`hdD1|x_lys=XirCOI9Z3s-hpK(&ZTzW)uZjXk2+qYGkz@q_(nwE9ncm(5fdu9
    zpneFUV()!4P1Rq5U1lNT`e6A^JP4);DQ~7j;B|3=tp-Tsd(INU-z6-&k8v27d~#<~
    zHCWcNPgZlAeG>LD{_x-j^ZXaRtKy2BNz(zCG_8(gHU0AL3yI`rLRpVD*@~ta^lv&G
    zRc_;Z@LUI^2SC`pt1eblI{^b7_(LM#zl!wWOadST|Bn)hO3A)Y$;4lv{G<0l@|aUX
    zw(*sxS(s}YP4`bH8h>B@j2nY$pb$gM{wehh0ICH(Tt;wMZdnt?K0~rg
    zZn@))n)*WDOh0|Yw8(R!+SH=GgyA~c6rUf1vr{_msH*fbh2jkal9wyFr;WL5cuix(Y@~U=
    z>gi?5OQotUT9-JUK(P)L@w#})Jt1a&>96+A);DI$)3nOk
    ztZ>nK_MGkZ8F>nYFfP~Bd@0IuE&e0lr
    z{*4JkbdUPm^whb8wNHf#u`_P-iatHw%tSul4PZT3M&~d>Uzo3yuX-)tOcy<
    z5FMMI^@AV(tdWIR3=J@Na9X`q28Nh1G<4*b6BTabc
    zxz|Z9&u$ay1sd&XXxSIDEUSuWnG|oI&(0lDGw}AF|NphXW92si2nAGOyEcTLAQf-ZEde9_18mMh5Wx%U
    z>hgDnKzV*%zbI5!)I*$Wny81g5@Om_!Kx@B_2$~)ctiS^HLl)gvDaTP}8
    z#`_Ui>jXe~WFOT&jVS+97YE>xdSECAJf}GIhX4pzeb&9o$-fbCDMgXx+S=?>h0H=<
    zuuToJ16^!mD;;|uNMvu+^E(5O$puP))V_~|34sYF0U%^aEz4w6a3gr*pU
    zwG+7u(9wbqq^Qgvr1v*c!R#o15Hjld7X$3;r0S)ibZm_z6`QQ9Y0XvVu{zr`orw=5XXFbNLwi`tJ5=PsJ6H*jkyadRt+fQTh4(eAqk3s
    z?W{AP5oH`diXVl3L5SH)E@c;44m2<4KU3wx_1De;B7I4cQS0^Au~ne6#W#!kRSjOy
    zK8~k$-)|Z&?LLca?Km&H(DJU}jZ@;V7ijIgL%)9eZU0jms?>h-;q@%N}N
    zALPVqQtOI7cDW7nay3XLavFqy?HTd9MpJPMN>WEhXb=c`>Um(V`w_z|V2Tg}weZc{
    zrpX7#4eIFYvJ?K*iH2S({OT?osOVjdxpZ5edci3fuR%+qN?$qc8B>Kcw!4P9c3=f`
    z6GW174l#B~Ji~Sb`V3c@o#P{A2Al6a$$#tWKz%*%VNjpqEPUjE7AOA&og7Ygj_=&c
    zWnUSQz8=b-W<7C;~w8
    z(kiv_M}G2P*GH+oD}@jAZdN1YtDCzE$79j1li>;g4Zj8k~I4aex#N{u!1nWkZ^I{AtIxj|)Tl
    zi8cBANc#!6k_Y4uUa)TZ`8xSTWi0FiuT3jQ1Kc$Y}eQTe2916tY9lS`m
    z(ozxDeEI->|GzwfKUEN@RwVlQfo-EYEYkZu%e{6WJ_e9hrlN+Ln()9MD>wg-U+iF!
    z@o*BgJTiHLN%r-H{_`i1W-FmY9^=&#b)AjxPnq8d|G)Rl;P3(Vm!VWHCSHEk2
    z$&>w~OU|$p@c*Qv2*K>d=Dq&fec;mz0fykF=On89{hPtV{iikshi>|1
    z0D=$CS_C8ltN;r1iStsDB|gRM7*`$;<@wuk^-Xi#>@cK%9MO8rVCnyf4r?_Cg*T
    z?_m9sx;Bi=gbUAm5isL`ScEY#g0dFtc=W>mvo94^hv^RqWol|h*N>y-{O9*qc!k?Q
    z4X5KXd|3hzIM3dH8|k`NbO1;k;sA1$v;q{h+Sz_!#m&xp{P*OW8Yoai1U<9d2MjCT
    z=O8~bN(12s=f!xvWGoOl{^&FHzqx<`{w}cMt=B*&6^jb#5r9y9+|HbG~_?{)IT}SQ>d4RR?^=8qA7B
    zZrS^wA&r&SUjLgf-TUH^b({dP6U3T&c|SL>Km#i}>zU2B;!ldr0G9IH_W4EOV1NSf
    zqu@Rc`9n3Y#=fjP5aZ(C)&t;#_`7Iq-Ta*H$vnVKrGbwZLoE3kHWe!^dT2Kq1h}rohM9#e-uP{{+r=9tAo=|hyeN>f|hA62|sEb&E^=Py@H(|z{DzXIQ@9{
    z{F`pG&!!HZ0-DbFwEKLdhmczJ8WwN26sN7BR(*vFM9$~j_t7mJ4ItbG#4rIA2(I-6
    zR_p|9u#&(ple#XUXsuPsT!E}}+7&yQ{h6@er}Ve|wC}$9`4i4#taV-FnIR{j#fbMg
    zb}}so-k$h34eW*eIv8qE*cDDEKWmUlcQtUwbj?
    zI2r^9*oj6O3bDkg6rdei#2GewX?Y2VL
    zpuvpaX&d;PPn?{ATjblmEkH;=w+jRbByK?cPG1B3b;;v`+E2IvzFmz
    zOvAG55>>`QQ0`0O0;ubKc4zrK$aFPc8Hxe+llEAcU+}}t|M4N1
    zfd$MGAbtz>+8>ic6x}A?KWy;=TiFr-zmXO$(VTmCaHs?p1b--llE7Zm?8D5&jT(?C
    z(Yf|V*RB@}RxMLEK7UD5V8IWVezTrv;`^gvk=H)d)YB|D=O#3`*u;D5>(a`n3{p^#
    z07{;NCjjOc4keNPck#PufNN
    zo3sJ`_P-B|mq8Z-|3TMuNK#k_)ypgy5D`2!Gl!sRZa4&|rO9|y90F)BCExbH>>H<>
    z{T>Fo!uu$QE1cNw8
    z#8nQD0lBN)esN6*3SA2kx>k#v2SxKUFKiTT+0|C|ZYDutF3p+3M>UTN;
    zjg^0H(EuI-mJrK3Nn$Lsq!&4Y)`6ed&1&lFjzD!}IBvx05YvQ_bq0K-vB`FzOL76{
    zGt~qL@%~WQuvwhyQIHmP28(NQf10$4R8-pEIv!}{w*1k`4futfN9e7?a6UL^{EP|(
    zyppoEElLhRZu3BGY>u@QyMhRDls*4Sw9_enCiu7>coG#cfVeTo45$YFWqt7{#wBkw
    z+Qbo4U;#@!0b+F$fOwx_g-06`BLN+WczSg~ONGgzr1{JfeTqfaVEMPb0OHGIP?ew6
    z2FecRd72qBgH6AHeCt0iAXqtaWQiBSG0ULDMa!V|KSXA>-N=-giF8{+#Gehs$XD6*x*YDnEST=?7ERxl-Cai{Buhvu~7
    zrc%H+8ZpMshl`02HznCDX@1a)vjD+=U-;EX{y%!Lj&h>bG23Ia
    z!YuZ;C3iFFLLh8lrft813M}^tY}B`FZKuQv<*fLi+z&(VtpmPJ$17y=~PYpLB
    z2i<3c9fiHZ10-}F*iB@XBmgifr;7}#3%b*R3eE=rQquizk(0txLYAP!(Vg8X7wiU$
    z)%09Wb4%BG!F)6r9C2@5hOL%cTEu2Tz!?N8dL=()u_M-!;MZg|_XmDcfW-)S2o@4i
    zKx;0*0y2cfo)i3aOkZRMWBPdZrVS5efGe1@@~Fqb!2PX2k+=ox?9~Sd$QzVSHh}NO
    z@<{0!NTDwQlBIUpI`C#{9J;^+3L5_u=y5V%44Pb!3pRCnJ8~gFnNWfQijFx1xOMF*Y$Ev?C65JoF_m4qE?Zcx8rN2(+b%QY9`64+8i-
    z@)Un(MVROIYvvP{4+282rHrzh!23-MOT-o)lLdsV7oe<^2ZYG;fZ}TZ#G4zg1Pw=3
    zZ+|rT)JrbByZZn%#@Z8gUJZ(a9+NZ53AW$e198tOChFZvwYV63?3w8>D1e9xLE@za>VEgz>G&tpI|BAP{vE1}WO2iPkAratUyT!-75r
    zX?%mjXNMAeCa_Dj`(`Hgut5IhyHj+>ILl-4ey&27bpbrB?bL4HTcVN1ZHC|s{=5n
    zz4q|rs;K%!PhWEVs+TcZSMve)xf@%&Cd)1tq6`4ub$wX<;#5HQi-|I`lqZk@_{bM6
    zfp|;UPzrE6GntjmEZT5)N2b%Ah=ny}v{+(U%Dz%~;O;jr{K=t?M@=CF1fgyufN_FnHDvzW&
    z19|LyWU%cXz*q1p`U0TA{*<5X)9672?G1653Pp$!EnG=l-DG-Kxd{N0mV4yG$B1u3
    ziKoY#_ChVI^L${}04&)V^-s53y3e+HsG^?NYw^m0oqGn(celnpv%w)*%X
    zB^(P!H9npkryN>)Z^kp}1h_)@6bS4b|7!5Ln+AsxzC4g&A0>b0&I&hj3{#S3hay1)
    zj}@7`2ZbyoTk7<^F&lrgUZXF%p$R!ov<1MUEm>pzEJ#T`@FVNN~e{I2HC~wyQwf*uT
    z4@VY77@eKE`2vXPRV=j=@2$`Wy4e~KAgb%At!!Ht-W%e4I$#9^(QBFtF6TkoAj~@JD`x
    zk2X<0S}ha!cnq9%_o}by{^BcmXK)+p24WUIZswzn*O4w4KLKu-^vyC-9f*4tq^NoG
    z4L`2DGO1&!RX4C8G{xp3%9g|uby=bH3s;V7f+XSbaNMjZITN~9_fW1a#4A6@mrw~^
    zk%MX1mu0L0PCwT7$QFnU4@hj#Vs-r$;A_E(;;~wJJ(8u9ZHx$YqsOj*NyL1>S;gh@
    z4V&G8%xovT<;aHCW$;anbxE3gF$dXA-9r?XQY*sBOaM7)33x+04P5$dIYgspXi9Cg
    za`z4v^1Wqy4>%I^CjvC9&(;$eX$ttf
    z>x6mZKn}|&`hnnBup%bzwstSToP`bD_SE_V30Ii|ok6@jOv|JQg!XbCaf>i4f_gs5
    z=lev9V|o2SikNpd?)HNDGhUT0en?ezb3q+t3=X-H^AW;VHH?N;H*9~5t3vkn9b4Xd
    z)>u>nN(uMyVYRkYmh`8FHT+8Y$dT+m5P)oh
    zHP8lKIO7drgRCf{=COrxfbg!a;7IXiCqL4w*7a0}+;n8Dw<+(dw1xPnKGvi?d-$BW
    z^A-pBk;JOKLp_L%m>$e{pNYQgSiq*LT6!m}ARz92;CyztEWDi}_Hy-KWE)t70zMLF
    z@$C)VgtSt9RZ3Bua(@Fbx6`|3Q$g%l<*sJm>BNw*K|EgL!}u#pazSeXSillOayVbuTojr+(0Z$d+0c
    zWk>oPgbGXG3_x^?O&?@qffexC^SBKQpl5^)9$FS~u|?3=m&wGiP%*4paJSceYzXwv
    zr-A5?89>*(GaQLEt`+FQ&r
    z?gHfdqSuOp&cF;v#-81X!3T8a>mCt&5Q!AVq-o(B*cR32sE
    zU*_B=>1+cphChGgBQ}33ZG{6I%hn&jO%XuctnmRADwh^+&%bs1rB?3~D^q`@H40+Y8@X
    z`l?pFk5)cin$r;n@xX3wCb6p07c9F|N30B(6nIxZ{~GqCGwY=b$N`D@+z1jy-+luQ
    zIJXX-kI~ic$7`~C1Lt2sonzRd*`e`g-&Zs~SyzD0U<24~3#*e{CH(s;rr
    z4K_=d2(sOY1gFMlIs^%ALRE6#P|9#jB
    z>eqd=n?%F<7^YG#`^a|Gt+b>QYLwTyEOCuv>g?pLF1BGHmlFHJeVbjfOOdaxywHA6
    zp*k=3c?fNnu^wzhE;8?FfDs_V9m;5`9Hm1Li<9kZ38)o&nId3f&2+kHbB*y$v29+N
    zn==I<(rkfyV%m;KxL*pWsYCR<-zPF1ouIs+fHKn3_<3E^#jo&q0t*yoi<0=b8mC3{
    z91pF=GMZUl#p5&ZN`4L5z*#GtTBwPsTm7`UfrZ$Elu%*2-3sS$4K;b5j}EM#;`A+g
    z<|(E_iT`Nkdt?3y>(1>Fpi8_}&~h
    znX`lWi*AAm5+!E4hteR~@Y+ac1Iw20ZcCowIP9$kOo*STzCTr+0Q%e^mC!8sOF58g
    zEBrN{cm`m)28NGTf)$uo!LY4fZEyU2c6{kZWp$|7XhPEmV<7Z&nN8gEHNY7*V9|@=
    zQf+Gu${d;exIS9kl&Z{U05mCh;7F#@^d!4I3h?9kYoF=z9Xh1o)^KEa3x!-5m!wQk
    z_GVm%9CAs6!F)X^PMwo*hI?2ggU-l*h1kU8S9Q=jpt}nnXeAslMk!d|dm^taWe0RL
    z9_p&1h85oO4OYoD5R62o+tmWpHD%HF=nwr2gyye=Wq|p|HZZC$vGULP{CuXJHIrC?
    za2WpV5pI)rQPR
    zh@3Te^1k@~yqmr+9K81HXOws$`KX=G8_uDr9BI(UWl;l;{x|mgth{}%?Ku|ruS^yCh(+ZAx=HJDX{DU#Aa8j}!CbwydX~>FH!S)PS!;8`e7*RAKo~h5-1{__YATxgI
    zF-$p@QkBl$xomnjUt4v7{Jd3b$d@gE#NGbbi
    z?+u_JgWmM?35oAeSOg+FW}63|&RGz&OKanrt-ZCBRdur*>gdKeAqGeu=@tT~L1#k2
    zKDNfTwYfq*#TkIQg+b#rZoF>$p%SiK2SeXt_>UifV-PrO6hA1Ef+W%B`Enbw2q&=CXH93qo8cz
    zZq{xK_mI`m@+jByFl@xYUw&Wc?Yk_2UK=>7A|OI1;}_C_Ne>5w$@Us;fq9?UNOMVO{~m@HT+^+{MCsBg=}jH8oADkZ%2OT
    zZXMc=bXH4!O7T%@)(OL}-ZwKc!?i(jC}BrZZBvF#=%+rPqC2fiif-=wJX+cmdGWU5
    z&2$OT)f(eJ=bo8QgbR?DRipDaVfq-gxji3u@8NOv`q(j=y#txa63k%?s^FLr7&xQk
    z)P_c@o5c6h3Mffg(LVH9#mKowJma1;E6=aGCk!%$%~$_=cTnhBt@*y|w7F*W?6)V}
    zzr-?!I2EuJ?{HLQ;CsHha)DFzen2f&1Pwl}k@j`*yn=0yIiCpN!<=me+(`
    z_ZVbjy_)pBi|i|3fWt_|VYC;gd%AN!FnDqhB`P7_uI!g8v}%`%igppspN~t~B$6t^H5Zii2z9am3c
    zqTBN0Jav0uaMS!fuSXm7V=8RV+B*9nHY4_w!_Z5vAkUNdQ?O?#wZfpkt@8x`(}oeG
    zx$Q_}T=Juc@6kGGc**y@(*#?eI)$mVk2M@g$W0C^HY7R6Y>?MnX>PkV=DI=O19bLQ^$=J
    zpy4X^UQ1>k@_?M)O1wEtI~!)AC}l4>>V8>zyYNd{dzN+2voBLqUWXW@V2p8wnZw|+
    zr)=G}Jlyx-7gL-tJo=Gm+XioDjP@x5f`>Ci1Cj(8co@7R{qcfe>r{Op9t-~+DxARH
    zSyp<2rn4h-SdGV`2Z~W~EZI_`=OtATF>^vS9D{mMZ5~iF+8%>zJKJbmuYzvzQ0}Pl
    zz5QAo69S~V@2*EvaPk`wIXq3weJ*M-y5u-$zfvw6Vo07@og4OM@`u^2OH`3())jM(
    z&zw+=t;fluW2~`$8;gUTeaIbx5BV?|I718%?a@|>_qQL4(Rc37QsfUn$o0Kh+PDSW
    zC&pmakCZ~Lku~tQspj^$FyU~UPmjHLVn-nI_Ch&*^i&21{k$3ry6+UR>e%}@
    zM`$Uf{FLcPIbnEx7-ko6m$QvjcBC1^tftz?1!%C!hzf3ffiKAPKjdpWX1n{=%z9UH
    z8?oxVEkSex9!>5!zkvx^XH_RRJYx{hS9T9&t*})Rcsi1~56I4RA0uccRc<}Ruc7J+
    zrg?$p;kp!x*QllpA7k5#Y}+p>(2MobglhNe%UwC^NARMP?{w{_O7*~0H-&|2cvYKJ
    zD}we2HrXqWKXSn1%>(lMR{dN=uH+_-CmPWatW-EWp4ETAP|lWHBw7LyNNj
    z!(>TqMG!9-E+-WK&K*dbPY<*;UDIcQY^Q2>3YcnXJQdPNndl*&60WHDz;^#P4~Q_3og{sX=tddYwrcQp@PNQTh=|UZ$L)w;=#MZ70M(ulTLHxS37RJ0mPs#qm+5?=4>sM5}S5Df}VKQf-!Lq(Xo+`+Nm(|NLWR=W*CtGhm
    zO*<8QbzE_VbdE**Wcuhu{aO5~X7*jX(HJ~i(Wkm3lvh)n!+82hW(la_L%01t(dQdf
    zx8s&K6~V`~r@YC$V|vqxfryNuVxEl$U2!>BeVwmD>ixH%Gc!ovV&y3#`{PB&
    zL@SJPIr@s~(TVq%`Pk3uXa)BNVvjeJEgoE65(sS1Bc57ZonA9wixK3XGlnU?O|%=m
    zmecz+qQ7HP%g0?5zi_AiW{gTg?r(>MxjPYqHitRe6Eo72fj8PNUs*Hm3?PuHp{QEh
    zVpy}cD9g0o+vpqGH8q#E|GoX(?z>!Dqi+XFfpmAkwSSw@{t@!p%2p;!-9+UZ$}Gy?
    zbO9m7g};Plo-cX%L=~;?75v^joCs$$8os~EbZYA$pi1uz3k+x*BYRD2eXDhfR;n|N
    zF^!H>{u049wW+}!Ujo+|GlI=znN^<>Yl{3kmgp0~n=#SFa^|ma#Om1EZR%r|UbarY
    zFZZsddK)2I_(_5gbK_Au!L4cEp0rekl&-PXUiN-3WP6KZ_XShysxPazqnuHbYTu;8
    zW#$#ECo0lH;ti!8MZySC`DtC;bBs9DHpI(k^jGU*@QCaDnw}Ih=?87`RH&AkS@N*B
    zqlES2V0TB~vaV%c?^qc_w?r|{UqE|lmOYs?9A_z0?9hp2tCLK8*D0>4#r$UF*n2S+
    zZGe0IwwdSvV}q`*S6y*(u!llYa17U)cUbR>LGx5Q`H6Jj296l(^iouFrO;BUzs$V<
    z;I;hH!}x(Dw7RSn6meyRdw0(D*TLglk0tTtbj&P$vycBv*D}y$u$o=
    zM-uET5Qz6b;@@8UKH<*S4E
    z*pq2Gq{A$^LrS4LRu+a1Q;1a&H6W4*jDQj0dF|;1PgOYoro(~V!tgTOwTTQ1JNzpG-2Lk+6=Cjc=wk2lswj5Q4>b5V~WTyo?jt0ygp1A
    zIpxpm5cJD|@Jznb&Ps@o7~gm>_g9*CKRZZMRW?>m^&-jv*g-hqmGoG5L(TmI^h*39
    zwOS-pjDLMg&81@}Ay{-c{zj5xU0^mN`ck}4I)UvpK1bhhwgVfVt~6(>#$%33BFj5
    zSk-o7g>ADi#XF8p-)p%aN9SPA^I4*9Ci()|MW614$?ieLh?r2Fx|=GzOXTA+5>sl~
    z3xy`zI3>?)o;500Bn0-cwH|zNAB7BX8-b}kpp
    zJ*@m*ij^$Adx$l6gZA@YeeQwcY27aUCfI`Rj`*Ry2h3)adtmIwCIN$docf>okswFfgi(cl5d?fas?1hjLpliG2t^omaib+=OvMrZg2#
    zbvI0UPaSi2vs~+!fqqY*w(TkQx{i#xuybc+N*&+
    zFs&qLaO^rtbIBT6=b_v5nlB7m^ZGX}e`dxP#!`aP8ru;;;e)SZY)x{%tVnI5b(MV4
    z&gO$s7VoJ#d3~aG#u|kPhpr5{QHzj3gt*EK%DqPvvhHm5y6$u1JTx;87;(5g_!E7y
    zc7eZCYUY9=Bkl<3*M-L{lw!t3Q7T8?>%sN*k``U*QaFX`|JHNUM7|
    z;U{@f`R_ktbu$koM0Q^2%HkMMHZPKS9TgB^`MAbF(cD&`g)I{g)3EWd!<Tza`Le`7D7m=fH-8~>AU@*uKX60gTt^gYj!j=I>3hTw>>6W&6BF^p1$J?0CV>nBn4AbkIUb
    zQn=&?{S5n+HruA-=I6(KvR228dP}3rYa647X!(XU1`dOU!e0rRt#^lFN9N=+LLK2k
    zvIpZPem+Bq5WAe=aSA}9O`u}nQ>qJ@@a%YaJm)f!{7IQMFNm-iJGP4s>%Q|xAwr*4&63Psh0|&}T(T5~H8a}&qGmo?m
    z`wZp1Z{2ZH#*jQOWu&vR7(@_v#cr<(qu5kqSn!D=C!XKGyMCGXaC^3z6DGmk${1jr
    zmip#vdpVuRdU4wl=I8RE91d+KzJKE;!VTH@?gu{cYvMYFGK!oy9-;L}QZ^yo^p>uV
    zccfnp93u+vrw`ot0vTs-pkov^-4>XL<@NZWzpJ*~zhVZN3Zrjn7f(XB(FW26@P?N3
    zMl;Jd*|1G=nJ^&zexHsN%A_dxcgnOn@e9a}mC)-#!};H;3c*4uKkV3ZKdL%4o25h^
    z6g{kB7so@&WJT;B>iT-Pk_K>_d$Yp;bF#5_*-NzMem2PqFUM_f#(?p6<&zeq*As_+
    zd;qHfN&J$jbJ2Tk<3!+6aUOGIh!6yr+0qE~=cR+A<>sa(68)#lT&Z{}g>Oyn3vx{vVz
    zKb(f4P`ZM4XcdJZ+U3hxGoG~xqW?YIrYV04jioCK|9ItyA=(;O{L=$vpSOX$?;%nr
    zxSg^-8h$l=itf(6)@o44J;{Dk_YxZ91(KmFqx>@TBUeb)C~m=gg%m*uMf)A%xU;^-
    zqF{F#)TCG6gxF$Wx!F$vW^S|%TOt5)SNk0Lp+G`Hn8lI55+N_z;%pCot
    zD1zCfEzX@ECuXaWpb4=nyd$tUAQLfdtVZ5o1Z|2)?%PFn9h`piR@O{j+1MZpJ$`k9
    z612^enYZh4n^yN?pNCjs$Yo-cjV-_L?divBX4s$lxSZ+q&$#4~^}OzsLrB&$VaR2F
    zr}h&eYnquBm3@E87cjj+$-P&dxg5YkjvJ^zPJnZVg#h=Tf0@2F`-&B9a~A!;Ew4z}
    z%JWW9SN1^V?_&y!U5lj+7J=|D!2_L43#j)`M=0h0`qlrsjy+=lOj)C(Xy8Xfe@@Cn
    z;cF(sQn7iqzL-4woymH?dkkI{%O2$PcUbOW2-HKV{`HgK25>0PzIwlteln1k_R!76
    zyU)5NqDE~dwx-W=<81W=)7`hjA`qq!vaXdw$$#FX+<8V7z^ytc?2)cEf4MIwB~&`a
    zEkGL5(YV5OI<#lg7`5GZ%u|UZ_kuPGZDd#M$PqB!Apdwwkkvqj^Y_;M-%aFxXO`&WPP&Zc
    z_x|=~*7XPJqYKyL^SY(s>7NI*(mj}Qby+s&K;Aw=1w+IhtMV`U>Cct;?#;@QM-;BQ
    z-^$?r9HGopIXp$`ElwrIHoyKtf^!3IIjBB;UZ=|t;^@UBVHTv5
    zT}6yTokY%58)787nIiREWKx#Wp|(FxPm_)?9t#^RWt0JA;4rBo1J`3sZaAl<_(=oa
    zdH$wdQGd|CB${j|l5QeN>86u9v~94f(rq_Ce)&9^-h`pNdKWNTVcWg+EDrbq)?BwsN9+p3&Mk=?{8v92)#5UT=aIy)!4}f`(GxQs$K`0&WIqxYR
    z_65RnZR2xWQWcw(@=x*=tp+b-bez^hbbe8oc&ue^(zp8I2*c8Dx13+?ggE2`Lusz(
    zOgqq>oBX)CREd>`MihSR1KARK&GvYXPjtUBMRJ@ynC|x5^|YADc2R9uR+??IZ$71s
    zUSE#)^Y!@GLt|5e!u{c6M~feo9+B-P6w92^g-E?h87@n)^n+{<-5KF=?w$0{DnI3z
    z!N|zaTsr)E-bk$t{i0ssBvv}QrLrv@=8Qfqc2j7=oT^?g7KrYaz6N{f29?(i&TiP2
    eBZy$#lz+Sur6{KUmG}bqr>3NFuSD@#;Qs>i8g+&M
    
    literal 0
    HcmV?d00001
    
    diff --git a/utils/img/scatter.png b/utils/img/scatter.png
    new file mode 100644
    index 0000000000000000000000000000000000000000..d1968ee57a1ee3282ed20f7f38e9d39abfd5cb2d
    GIT binary patch
    literal 98034
    zcmeFYcRZY1*FHX4v;>JDh>(U5B#}`@^dN{ndW#;TGmJKBNDxvG(OdN1JJF&=H##GF
    z9ip2td~fGG&vVXu-skV%Kfl-KGjs2`?|Zkk)?RyE*V;li0l$@N6hxyXAtPJgtfG^s=Tx`o2s*erM0aE2=pQ(TANfyql-RC|MN!)DRQ>N
    zfp|8y`+iY0dZ0C#;;WxQsckpNxZL1s%@tuJwyU}COi9}!#&wCkjIXPyjtUZTxj(;O0(AEpe&UUK#{1Wuq?xWT9-6yG+3aCx3
    zt{QU^N+c4L7#q#r6Kk`knUZ3D-1Y=%iKT|b`VPNj9a?nee_L$IyPJ0H-cN=V=PZ2k
    z+A;b*pEhK*l}W4Op}bClZQmn@Di?N{&SIvvhP3_c*Y7IW&e#@vwrbp%9wZ8D
    z>#=H0ATWHFcru+r_AZ=_>gtlL4A;s2WfL+|(`u=KoEAc5!ZuGDzUzym9o%*TitOzV
    zkg2YW*8~*1jOP>vfXHS4^``6OPF;
    zdb86Wx{aiSKWE|yLtmR0^5=Z2n)-px@`coV)M19lN#I_)fEBs0nu2!<8~5#(pIGx_
    zJEA+NR{|=?pXawpvPhnN?QE{uA(3njtudP+R5PttUkR*cd!+oBKI@%}S=3>54VxhJ
    zN4)gr7vmd6H^VsSzLVq(bnv&4JSGnn`kiKL@BaSIEpNtm#I`iVHzX)*AYX|~{fjHA
    z8X0CEcuIj7UP!RhfaLD;3*FJ3y&Ev*u1b9N<^^c??GKV}FOn3RUE{Yp?Wn8fonDkn
    zcb&g$yxWr??hHCoKj9qwSaolQ_(_Ye`$|i9;P2%Yu8s4fQ#M?pi6pyv*9%h7CnKah
    zA2$`M`CKo_q+W^_9oZ}MJ*1vkX%(2aQnbD8MkDee@dvMI
    zN3rMk@5-iEbST{ng5PS5(Vna`?bCC7;2>QmJOAad)7AYXcH3ZKdf`-NP@C;5mzNyT
    z;l1BaLmu(x`85X^6B7j9ofp1hRSl`DC1ArfavB*sm@c8OJg-_35!|K*d8<%ezI+qk
    z7nDr=s)=LzOs>(T^5yZGD#={S)g-8T_MGEH5D0y3-7#y8i1rnM?JsWwf6^TS0=64(
    z0$+awsedQFfuuKBx%P@cgdurvdLHmXlQ>gpa0X4fd>FDJMeuADV$Q+ToA+e_k~+wSCB>*#6`Zxd0`1dv^&}KE2JG{u8EA
    z{{vH2r#s3WjMaAynoZpA^tEy8
    z^p+pI$D88^mC}=&RD#IYDy-i@s;X%|)^yS&SCiMgnsYrbDsNL=IMrEmDYo0H^wLD=
    zrcwm^Ue|D^V%Jn>_#*cr@2*uSdwcM_qI`BsR
    zbSxL6(U5|DagZMOC9Z)<-!35zY8Ns|RiObxjLfR$Ky6?kaI~I;p;SR;QmWWDpOiss
    z<)>8PD)CBrDX781A*0+#RKbYuI_*fE#b%>pQw*+VDtpTHG~)I2(CXMX
    zo7&g1Hp|w$qth84YGwLi-z*B~^4rJaiYhcW-fMBNr0Wk%z;7XMA(`4<}^=}p)}0V6B#AJt>e$L@Ws>RgYDk@(G}A&b|kjHkWr6>sSn$4_aBn
    zgeRSYEy9-!xl8GWxq4vXD383OQGwB}QOf*{f;zi>TOk1%0kFW4T~6g$Wu#r6ZPC=#
    zt*>svZp@pLn`&MN+(R4%j+-hw@NM9LNuV^&vBk0ISK2SlRtMo+;nJIwEH*b;h1Vc5
    z5IPZ*NW)DN;XAHvyH{7_yj|Q7eXg_1-u*H?_op+)GX|F`@*24ND_Rb)FV;Ihekzj_
    zc<;TmJjd=hwdyvNh!LAa`g=vxZ>px!3jCYtp<5yCDWZ|<($vfx*E1e?lMHg+*C+@?oUi3c0Up)H%JeEEF~eWTA8
    zKw%)C?}vU?4@I;DYy>wfQe0B*?KsYPRSJ5s!{klzyW%C2Dxn`YZ)L>|Ghi6S`0ItGcT;9kg^FT94sk5{A9
    zx8-zYLekdLC7*J5TI>hji2vI4Sk5e@9J
    zQ9CwK7>Wwi0B40}R=zAtu6#XNmi93Xow+dVF&uCCwfC#Y!r;r%pFCwBb=S(`EcJgT
    ziPzaEuO=kAJaBPYJ~P@hs82iIs$cX7-wR*qk42v-uJVEJmtT|bDj*S~6yRxNpkS!v
    zWvY2Slje|dI;3dPXR%~qOut8Oj72StRWwmO?9v&k9Wh(`VbNxhW+51Z<3ra-xyTHL
    z_C=>_j~1Bba~U4E9kihsdS3sUnx6|U(p*HoG$F4bCWH0Jl~`KI3~Hg(8QTT1Ib
    zVm@Xrw7)#AQ`hCLF_Ebf9~AH4Kt7|cZDFX{7+qcAxG`)eKh<~s!j&}#wrvxXD^h)l!u=56-GJ>NGlmAfTQzO<
    zP~V9KXTvbBo?qx0U-9YnK|MtKo`Q6|w!RrI`;b-}UzF5H58s-0?K|iZOtUXXzpVGb
    zjaKWkRGn1SZ7Q3kFTe;@ZWC}r=$@5rz`|K14(K~
    z%gX~-4Krs83wxK>4sgPBL=bR;-0_933kXDi|KdX+uYPX_Xn))qssqReu;Vo`
    zcQCc!b+>c8Xb1Gn9Rd{XEZ`<=?sm5JE)aLoJAb?Z0m>J*`R=g&@e15V^p1{_Dx0)}
    zvjv*~?<3wvcf=^z*w~&qn_EKEpUeKMI`B*M4&V+QA$)uY1cDdA&+Fi9#rIfPSeWn8
    z6TT-;cz`!}Ts-XIChk1;E_eTIbv}hf<@b^ccMvCz}MSN+?ge^%9Wv2d1lumd`Ui~Xgre^vhb!+%wL#&A9L(Ny?p2oixrHpLA%{)XZ#Y
    zWUgE*X}d;S7f@mn67Y^KV4r=6_n@JFbpnBzPHZSEtBbMN-u4!AL|9o_S~c?5iR}Fp
    zw&Jqm;+2&I5fIZz{NsyFjxd@m#ra;3?bUxi0^WQ^K*;Gv{J(2~{1Yf>B$lFLV(IdS=s{eWOzl_5V6pH-E(Ej+zmPJUcD!gQ|{LfAHdnh3VM*x*zcI%l(%Y+5Ajd|I18iI&(k-P-Tx;;r}%qpeKUsxc@y(Ha`hv5U%YRV?prXV7
    zBGCU&RrHA{yAg@gOBO@gju|3)*9ad2BYnZMvz}Kp*%m@;x4YOSVAXe1zsxcmm9IM-
    zC+J|mHCa&>!6Kp;!)vJC|3>?t66BQg?<9y)e$Bw6XD;e>xF3+s1cpT|nC@zku|0x~
    za5D2-zUMKlEr0p`(iNt0Mymvq2G0X77X#UU>XvPc(3(_LFXcx#v)Anrrw*2wjU}@)
    zGN`-%1C7k_fmG?OjiM&yDJd|0Q5^;{Wf5aIl=OxCpNi}JB9Ra3Zm5aF4m|9)-eK_H
    zr1aitCKY(~9aI!+I9-$HFAQMKfRb@ZZIefl9tWx=^nJ`a1BecSHVu(w-@TP~J?DM~DHid@x2}R0Hzqlns
    z_@IoD_*45EzE>sK_z6(n>oau-*{{00PyYV#7-Jvnz2)A$9~v~@Xma(d?2U$Zq5dBU^F%P!t&PX?
    zVQu@-T$-hpy>Sz>UfXusMjjTgZyZd!^iPbJnAxq5mLWO-=ff-g>=~h`40}
    zl?o>PYY_%L{1^>Vka*g|y*Ts6b?PReRidj_z9qt>CwJN17dM4&F|rgQ^x#ezSW86A
    zmXOo3k9%!5tf21g@@=kVCEMe1M@Q5O&qm>6MqUL4hIImuA0A8G9_kfDZ{j0JjB$rk
    z4h>hm?Qr!%f&hDHUPf~r0F0}9RBxz24@<=nSfvIMkpPj;F9wvPuBWkIXH|QlA&d+d0
    z?&T(}!ENQ5d0G`)Rp{9~(Ix5(2m-Si^djV{FET~%T{7}e*R(iuYalf+$0I*aDT9Gp
    zc#)=VuTP}m_r8zdv}0hy;iOH-+P(w>Y_!POL66m!T;Jzh=$Y(antr9o(CGJktEgP(yPU@}$fKDV4gDJD3>Kf`U(1B~3m?R1
    z?dyNbZo4*AEgxa(wmti8#tOF@VhDNZP}!bmCo2sd90`sAV?T?4X=lc%86yv(4c#Uz
    z4)^-Sy^6N07a|Uin$Bmue)|5Uc(Uuc5`Bc6{(}#TR1wUh+%bgfXjzUQHC)ocmrHmJ
    zYZqaMKNTVhKQ
    z&?ko5YlrP>op0~sL!H^yRHhhn;a>u
    zS!U8mRy%XXZB=<8rLDgj;re~g%nmljjy|-Q{mp$+D6nM_L`ABXJ#$qrqyJLWsweqwI%+sG-{>!KP2hecFfV$-eANI=w
    zuE)_IFo+`oBzAx2>J#q_*NxGTI0nYP(5|cFwuBZWs+0`8<%NcI>|eG=G*k{?ckW+0
    z#eQd%SW|YVRiMyk1WLKybdE0yzw!9a;B9QpN|FtOvA2`s
    zp?q?lTNL)okl_JzvcksdgZP>IkQ3v(zjiH&RI(@=(EX?29t}IrgN&(f%I@>?+%w5tDEec3+_Y%^IoWp5KZdr*)MQV2^uOQL_M
    zGsp7@E3UDp{WA`tP-4p4V~KQ
    zGJ-jnQ%*>>BM^Wa&^^M;M27c0`n!r{Q>KYHIS}6oNZm;fAXmx12)iuPh>@td8<`M8
    ziMYlrHpfe9d?=ScNM!p-WiR)}ziqs=6vRmog*EcTAB@qKO_{u9d8wp&;kV+j2+#dN
    zxrT@zw0EzI4-|_Yj<rz+T@n@g-lr+Al7^
    zQaz1WRs3`(5b%~BsfZ}3orLRa48}Zbi4oWVx9a!$X47&6Fm_clU#jC1FXguG0KPkx
    zH|n^@$ZKoqfHcE{of}q~C9=w6R4?><7nqNwFLpS275CtF%U^@>m!jt!1Ffe7QtbwC
    z%ye;Tre1<_u^4f~3F7AHu=JMr?z~G;-F&>=(2+234*Li&!36hS
    zH1YN)xmzWqx7^u&$6?*qM+@S|q70fe7Jh{DyRu_KF`ijegLsSKOr^t^rqlL3-HZ+{
    zPY1A!_)3C{!VF8lIM0W_g#euQ{GG{D;LI?TyZZ23&LFXrG|tD$sT8aC+zvM8E6hmk
    zZ;?Ru3qoP)lx~>4_NQW9ZQ?Yt%S=zR+Y08=Uq}9_mz3RzwKjmvTRla(2->~I@vfn8MZV(%t!|9m_hVy>0lio
    zlyU}pEr&_ekUb|)8Cl%IAEA#RSH*FgWp-%f5l@M2vhP{Vm|PU|c%C+29pLC1vM7>9
    zYHc7LKJWYUW3&u>S$HI#^bajA))O^Wk}cAafdj2%L75`vpatUsj6zk
    zrMDz9rlt$iB+8P=zTI_P{3I9bmXOfr9k8&jwGX(erocdti0||qH23|~!!v*_-+d!9
    z)8VdM#M7~plXC0fd
    zmJ%OYc^&4?r0U(ePF#79Am{}Us~U#L93r?1cRCNIzI`fBPIm5oaJU$$@@0MdC4>BR
    zG7_Bb#za|`A>iom&q^buudqPM+a4XzX84Q%>&&81!%46O2n#UasbLpaowHwWS!-kJ
    zk6u0_e>RYKz^YV4{ic%)BG8qrJsZcW!sgM@`R1if<3IgClEl|&DML|r#Hky5`D01
    zZqrU38JqF)+v4`qLKjgPtkE&*rTE!#`k3~0M44jzhrfmFT*VTT7gFZhnQh5+peI1R
    zQ5S#e6t|Ewk%;X}T^_cafY(3x&rtpl&-Wri0K?eN)an8lrd|Y;`W8gE#FrA$)$yK@
    zb`9fRJCztmGWg5=#DQb>>R&taMJc6RViBZ(f4!VA5u1zX$nT2em`V_K
    zsbBVhS&r3vxBwwmqU+}PU@d&D)PvzO;-BF3I|q%h->y=t^xy2|FXwZIl14%%)Aad&
    zdFU?$0AZ(*ub2Mkxc-PP*-8OaYtHp|RPmpv^W9wu5S?7O^23lYqz5y*sWP(;4_QG^lSYY;#H=t?^`+4mSQ-~h1k{a%&
    z3JV!Z+nFC=tpaDIJmd5daMAD&J%^cQH}vvAXm_ipmD;PBfGWGz&nkAU{lm5zgWgl+
    zshwP!IVRDtrzKnmZlzpTM06^Cyfy#L5=-~5%>W7qLhsNAd)i^|pq2J}EkDCu7z{=TfDEV)eS>S2XKJ5KLlOSyb~D*0N%mHvN+%Kqg50qJdi
    zf%vcoVbqnm+DBKGOt}0RxwR%*(LUQKcLlIf=@|5GE+YQRXs-R1IUoPS=W`toZ0x2#
    zwi|_KeN>Yotr{-~PJH6XjO*pyTu6PP|DAF;%myO5Gw2*&X>ORGF_U8g-YDDF8m+Ci
    z99iZ9;AyG#aHei=9N4aItFmmef_wSsdwn!|qK6+-A>0m58sg~$73+t5|B5Y4-En&neGDSKc%2QE_-HVtLS8_PFu2o|iYWU@#Mbvh5%(LzHT
    z21EEK9=-BTO#Pm+4FGHwt@kY2*2I-ctum>8U$mDAi?$ihv2!RMJ(%i9lnILGO>P|S
    zq4dQM$yYAt>DODjIiWRr_h1;e22Hz<6OCHX>1V!Yrze#FS2*Q1WmlktZsry__H6Hedh
    z>eakGk|H|Qo=biJkd0G2zgin~FQ~>J5iA>)@fA&zg5@8wgMa8dG+0D)Yxhmo566Cj
    ziOm3+g!e5RM?Ms(ydL?w-{MpO-k{tEkFAl{IGgcUN!$W>Och}&z8?&#y;&PZ#-E*z
    z7r#i{9vQgH^dpy?Zlx?sFY^MU^XQhg=~da=y}jj`-J2vjh4VJ_#UHo<_@GvXdv9CY
    z7-?aZjI0z)5=*~e31f#BhsknJo?8^?=S4)^mgvarO6#Ns=Ao(q)pMp@$ZE#fa_9z(;w#$
    zJ}-91b@~8@KA&|%BN0bhbcYTyQ{vp4!ItfS@%dA5sSXfC6&5z(52pZX1&%wzZ5JrU
    z@VWue@XO@L1p;^7o)vw3T0X2?MnH7wUXnu>H9(kB4u?#>XXLN9E;U0@@yflcnQO+VJ}a&ea{u^&j3`R2gJs-{bj%B061C(D0c$D3-$n9^%k&Xw7G>i
    zN?^{LFdUE15jJY#=*GNNB!HqDkqw#Zb(lC$=8D&YE%w#Ff{Uxn-Gd3W8!GR)mDLqj
    zX}Q#kM8IwwIWLv3kZz=rLuTUMn;s)-0clB;PlPW+52Wf}h
    zdECk~*PMP{_e=|DLQ}(~e$S2d>O~WCBwwYegxm7e=pm8>^&k1rYfCaU>%(Ukv*JmP
    zTR>rUdV-RRolaX(({2MPl84Lj4xWMBnz`n^@q$%A`0w6fN%2i{pJgCRg>@Ja_9G`d
    zBW)|0&Q+vr7T^jcWav0oL9m%x*U=KQj<(8%-#?h8iQWK~fHLw}qQmt%_?X2Qd0IE`
    z%Q<6eR^p^MqyJ6Ay^)(HU3WZPV=P-xz6F`FE~r$@GuvhLJskv453vmZ5?$9vy5P=v
    zeoETZlm*$Xzhky_;|@@e<SR&mc|E{?yB(mky((CoOP}a}e~J2a%v>gGft06q806lH=%Txv-PIp!m1Iq^gSx(M
    ze2$Gl0YG}Ar{i*uu>?y5L+_2m1Hr<<_01P7ksDGewL-@L=5IIy^EI7112{@Q#Oxu7
    zDu8?UeOfD0AeS`AWd4f(?B~dRp$vg-qHPpabxhWY2&OFnVl2Vi@HJYEd`>xKJl#I
    zE8O_Ti9KSCHx(cw*1ySq;t0b{Fhk(kq5vy!*dcy4ctK@$Zfn23OLe}#{{m5`h-h#{
    z)Ss~=y?+*q9mLLT`&a?^@Hg*wPBv(GHk85UPJhDHJ*ijiZ<2ssV=yi27&`;A4{pn<
    zK(E4CWeaeIN157655P-~GT@+7rSOrg-g=L{`WO)e#+LM^qn~!(D!`po^^2cR*O}&@
    z1DjumJ#%oi
    zWED?~jPM$JlaayUTifqb!}F12kkny|YZ5j19e`QfgXP}$imcmioHEb$$vjOaKw4$T
    zeu3RzFUz&di!`(Qz~VOETz-B@MHS#emPkHoWWM~3WgJ?OUU-dGy;5j?zZ!{B`Gm!)
    z_evr=tc`~dKa;#Lx~3ozK%JS
    z{6GRpxrT`MeDyn0Q?R^(r`gb0h-}0co&$w8hCfPN#WvRNrB%SBj;7!xe82<-pN>23>HBNa<2zyIASq7Upw%vpo&Bn{1*CzQQ!HnTJ
    z{gmynqgk*1I__@~#`}gD=z9$@hYi&h7vXL1qKOj+pG$4r)}@PB_S?;VJnzO0nTq6Y
    zE=b=A;G63w*D0hT>A+3+xj^drIM3Yh8Xvr;&2)81Rrm+t<*(N|q|VmBNsYectm`+_
    z`&|vb6*879wT2$*B1x_Fwl>zw6q*z{65;A0W-{mdXUIWU($uZ|wS$_0?a!l{2qUU5
    zrHB31INcqj`=1N@`!dZ7ZoeUddaC^cvxNNB6eEuJ5Y@dHhbH`Jyz(#2(lpxhrqd<9
    z3}rUB#4?o*eE0ANvxB>4nPKFU^ZJnyWkk_%S7QLfOi6zJZs*+(?i|sOfqho*><`yi
    z+N#qm4I!^pYXCppFtA#?QMgCQD;ROMPJw1YOn(yUJZQ>{WScpW=Md-$4ajQ_B#o)Y
    z89COJ*HfTJP8^D}#YqeeMEetiAj^T1_fAF^b(h
    zJ-=---d2mOBNU&JTv>`SK2*L`jz2%FYVrW5!PTSlIln_$Wgv{|YW%b;KVj9O%Ifw_
    zc(?60?aZpDXdp-CAc*#M86uh|p`>?5{22Dn2@OzZv4tgZt($v{7yncSB{iCSLZ0?d
    zKW!L#f*CF-Omy3;^!!?GezEc#r>mW2{e4OWRaLVhc@M_4vii)+OJb6Lqg+2zoR(J7_BlEs-%@3tUXx58wKIuh%Dt{sjal8N|q
    zoLNLv*xXM*!laqWRjQ|h?8ZNgAzUcB>S!_qI6mLbjGIZ><4*DA@mfV|eS1i$XHoOdMZj8%CSdOG%NC=z~5+=tM4F
    z93K-|TfO%JY#2F;+RXJmWrs)gvPi5cl!@_Sy*qVCw;&~hEW_}C%(VWXL#xEo^)`(n
    zYX~Y%eLVY220s6J^Uau@F-k~vivtB8T9E@MYvt?wLRqT6%VyGDf2I${OdrKd4>x|J
    zb+hwL%wNU5MC(Fys{snWeoiOZIPvwREZ4mk2S=sa^i%o3B6+SJ9@AyRv#wp?Rm)C&
    z^K>tKZ$hK@?n&N<+l;F&d1zW~^QA`I%%N%lznxWLCyUf{B0#V!~H>rBB}d!
    zS?29_cehq*v+o$A;DamBWI^OxST(F+H7!JpVLe_YSsovpr}bOEz2fo#K0e>LraGCU
    zN}O{l_m!j(SxWXB#=SLa^H@`_;QQawh0t=&opY)93E;}
    zp>a|SiY6tEUKLji><$M$`64CJv6B&8*k>^GZ-%k=+LDpH64_c+ha#wlF=KM9$i<*!
    zVBd3?zainD8PQy>l1pEP{i<#!fY-{a%;$ZyR;|1@9CStdsmj(AlM3$hAva$6HExwZ
    zjYfS+5vTFUzy+5EBZMW7Z3i5R2aVT0cppIxta8}d!p9R#waheM{ypz=b
    z1pxj=v)KcvE<@oGMS)P30q)JgM5XD1G1re-+>qS+DXd7a=%5f+ZFoZ={aSan(XeC@
    zl`7mcHBIj&Pn%af=*M{EN2ltPkfK1o`!?+xwZ;d{Uk}L
    zn^QP6uW%~m5izhNYc4Dv~f
    zoHr&o$2t(QKQdzmw@^aWCl)EsO&eN{z+Z6Cd-5UZbbh7esbzYsQKXBk4exPgjNy`X
    z27`?&wWEFyvt-Fe&o{oNnymZT1)oo`WPwdC6oseYm9!xhtS2HV2!42#;Hc(OAQhzZ
    z%HbKTNlhnv(){e2+oNnJ=v`UTD2NF;{Z>3Si^v$v8m?a`;+R=ri0=`*g}9ZInP-&u
    z`AQ;<5q}4Xs`DTLLT51Ai($3K$$%zK{t9QWqRAU&^Upz{Sf3&JATjA&i$%b*EvfR~
    zw7YA^Z5V>!nDU&lGZr0PQIxC}i$6<4DxmLUl?OMlR4y{TT=36nuU>92+EQfV6*zV&
    z7U+D|UB222+f5U4>m}DAC3-Z{VfVeTQN}RUOua?`!u4u!peTw1I6Tje_8h3se;98=k^kSVQ+BmK-OHVBJ3a=RXD0zKl2>1F&1D41|A{YsAc(!nbA#xMGoEh#6kO9Nv@cX`K=Bj)YF?a;
    z3j4rs_pQPN=1qNv2&?s=vtAO!9UZl&ZO2d$BPEph{KO`T^P4K$4Yv+)63JSrqNYhi
    zS`?HtFeei+C5x*+#8+EL;IjT{T
    z`=md+eo!*I4Gr(L8g;Ml{LTW)3pc$K^NMqV5JWYuK*PEcpR?;fLVRYpoU$*H3c92F
    zeQr5@+Z>2q4xdM*S?cDlWxq16NQF*;l^J)@W(zOBj6Nkg^3D1A+tswd2M(QjVG_!n
    zdyr-6PT_`c>cF_-U6UC}2y#!dEM?BpnB>+M*KOGS;u7O;q{^bDnr#Uy%rzJa!l^YH%I9O^Saa1L#K%(i<}db$YQ&C>okbv
    zd`;-l>ZTDjF3*hJ@Upswh~X(*1{Zb61GXM^@GebTU^jfd!^)7IS=#c9#pVHxlGb(h
    z+@_*Al3?=%*w@3WU_NNL0t+jS&+Wq0U^kJYpXrc&<^3e$R)8-q^*DYTv}JYXgALGj)=G)___5GLME2W
    zb)UmP3KdE4rCwtw&!le<9=lO=6lZCDGf~1i(Lk-5u0Aa%ZwEtB?#mJYobUPm+t>;9
    z%<${{a*+@8R2x&qBC#ZWg%fpWFk01hE{DnWEG>?jsgV6j?(G%oji*V4_FV6vFLH_W
    zNdlU;ekCX0%5r&>9SJ>POznSH*$|pLhxXhkm|YM$UsAlnnP^+9N7*$h-D`8oQOd-j
    z52&0HuKp>%+Q+9GvIhV4wonfj?_0B#XQ{m&C7fR^VaSn#cFtb^Y(-@^a-ZinD8S4_)bc(J0Q}A69(g
    z11fa*PoCA_Z$I33-roKqe&hYBpfuhjXPX-}(D&{636H8cVp5w9ww@Lp_b_)^H)RZKpVZq<@gN{%;kt6gI0
    zFec8|SGXx$T}gCVe%9(Sbp3GsWma72Kh@X;a|H0#nZ!t}b1^krP(MX#`gO3r7Ec3Q
    zQEZCiyIV^O+F-&&8hiT>&GQ<*=`8~mwQ0}%vIKGl2pN(yJYcp}8b
    zRq~UsUSj^ntNxjqZsRaX@xwE*uo1za7D8V&)+_cN-FN*cZWY6H;ik*mv_DuSPU6Q-
    zVx~k#{cFzW3`n2yKBv5-+MMYh_ZBj}Ih^$&J`thG8v{-eI5ONBd844cWRV%k(Ud4X
    z;GYZQx@S|m_Cw9p8}&tFJd68dEnz{LkNC*F7GIl1U{`>B&RBMx^sPA0iB#*A_C-<0
    zK%VwK_2b&Fo3j?-dPh}9nH0Ck^@@VKuu@isR$nktiUcJ!bT~-R#BGnuoHTw~C_)d4KGPBV`~6diCOCju!uWz;!G*D
    zMh0sr%Qf%nHOb|)lou}z?(`xVo`K)?YjG?Vo;cK248zr4plc`!M@XZ%G2_kW+8;Fe
    z^_t|lu!h>-bMZ1Vz4orDQfN{pIsc5&$C@CzQ~O=Z{S99y!t9s8D)!pD@yDqN|K9sF
    z4*;L_M4P1{KT`5Mw0eDvDRWsEBR4G`(WF-qjKeKIcmq-Zf1ai@Wtm=uSryj=qFc{}
    zSc$Ta7#>!B(#XUy@aKKto5`qP8F7yv@Ti^SO}%?;G(e{S&f(mkC{?b!&dJ#cboPXj>wHO+Enk#h{&&Au*KFTSbU(HUUlny7
    z%ErqPAbGp%_{YX~Ld2I$M?*Xgw{_5v?T_`b>9XBFtoRZ^To0#TJaqg`#2`ehvO6OF
    zo^Y;Mc@4j}Bd+x-A8%OU2<5&%K3E-hlq)O4PB3y#-(=CRRM&c5sf+ZUSJs}uOxT44{g|`_StJ=|^D1I{>#gb3S#uBT>dMC9UlAf1tIF0Xeua5d8VGxD_0GT1F
    z2)2hiDG3U$P1lq$NRf=)?%s2yoUH^$zLjAFj|zdOt`x(<6%jkzmYKy`xDQw|4bJSa
    zrxtXsprXlHh_X883S>pA_wHDmzS1=6-ZO>4_A88Bs-p;ZNG~&M%mCIT2@3Kobk;tsn&XCc+?Qt9WZ>OefR1C_o~y@KG?972m=MD
    zOtT=Ty@F>*6iE|u!3z#&nxoFvNfszSXVN_;L4`>AaBZy`$N78ujhGlFX^Zgqz72iN
    zJQ%f`Eh{91>Yl5Gp3*C5*~5IjI?I&24UAUD`oL2KC-ActSSN8+1I}QTO8889b;c{l
    z;rdLe$S_D@kJvvm4|JjEcZ#H9DW=J4}mzUXR#C`xPq
    zlAlDo+w~<&{(~iD*#njgCNdM`n`)}S3WpjI&2>@uus^`CK^D$}1A3UfXKhZUa5=Bd
    z938ci#){M?WD`d?;YJhK&1h}V62>hjPV9^+t(gvb{wP;1bsqamjla&Efnwh)jaF9|
    zZ~ig1$r@fi4wO8>}XSKq-WSbT7MemS}vO=UL=?fSqLTKnULWCEX9YT)&pSh
    zEp|P+pZYlqJ{{ODZlnxAlGPpz2l11z@&4>=ckqX4=IT~Q7+&wLXH`aYfcJU9Yv*xLMKJUn=c;?
    zIqX-Ved681UmzAJ&ciKEdp3>uia=ZpxL9B0zoIz_4>G_;M%L1(o*JsrnUg#yWdC5V
    zm>>Csgovv!=j*vv4^yGY&{}A@$RkzKgj$hzXSvxYv2ijrH0&2j*_^D%<1wgKrEc((
    zBZw)?MxNu3Lh^JiNJN1pL6HRq&+-IPExT^mprRZ}i`MT-Xpg}e#AiNbUoicH!Yx{8wxVW`HC)wEt7-p_gW`9YOgW!4mjQ3t|NZcpD;~*>dg~v4A
    z?6|?7DCxmYgCQT4*8`Bw)mwSiE!a;(D>}%qwK@fsZkzbpwEifuVUex!$gz8^$ikTo
    zY~J<@lGRD=?%Yo+$$jU?6J6X}zx#bpA`Ynge=P7H<=f0mp~w?81pvh1;X$HmAHNzA
    zy#BUGGVoHys1n0-XrLt6dj?T{csGcuOZnJvi>Q}#7zArcu-XjQO;_O2$Rwh280?|4
    zJv$dXcp)H;SkXBWNwmFrMWa_0fXjJXUz9nzfN9xJwVyn*V3M$IaLrFQyA|}6_vV8qf7b2bu-RLyxkV{LjG&n^}f@Y+Kjy_*}Sp>
    z>|s`vaL5a5eP~VG|jKCz|m(9j~#|mpU{Ho}<30)8w0FnxiY$pBpip!Sh#m
    z)oa$^S&(yt4!GyP&PIMWUXtzie8B>lV$IS6Yb6MX6cw)=KiD3uWWRZf{0TdL7Ki4gIVlp3a
    z`#EdZ&78VAXSiyCvLctWD*~tYG1~``jg@QSavSawN|Eah!1<}oFNbxROzm|dpQx@y
    zg2~C1S22azk2DAp4n3vHtABh5}ajP;d6O<-p$`TNv=2N;R|J7UL=6mrX};1
    z*C1smvjdS|80YL2r=A(nmC5{~(0OGeSS@`Ws@O;64XKZPz)OI3sA?1$dHWvg=aO2n
    zT(Fh4oKss`;0u^yuVQm0COGSr8q)bhIy*x##uFhn;+cIZk!qe!s&>AzD9OfGEt$KJ
    zn&yf|I75&!aBk$59xFrIhHH?1u66cDd5(uL+0AWAg$i3wI)p$Ty9umz1?CQ$g!gC`
    z@swCAj%JAHcK=4ebb2vDxhCCCaP^ojtNz|;e8lq_N~4{<<>g=J%=AL9eTUoz1hmKb
    z5a$9KN(=`p-zJrFHBM5%1vF{r*l@NV?KE-Ht
    z>&!Y1Wo@>yCDtOIJz}<%j-`4(`E0`OXjoaKcSF3lcK~VGQmMvH0A)|kD#kbSRN;Wk
    zpC+?za}DhOvGi{hDcuYxs34-Gbl1=zT>>hC
    zGz^_m(hULv-!<;NpGRQ7f4}vu_j`WGVlA1uultHKj`KK=t9sr(zjjiu>nM2~U!Qr?
    zaO5Qjk#&TS?{aHrLilK%Bw{(qvk0+|og;MPGrcuEhsODT#nyP{%GU5}R5h+i+vIPn
    zktyO>4Xvu_YWc(*3#%LiV&24ou_Coo3&gaxsF6BB`yA+kbCe?$`}Wm5n0C`Up(8ce
    zjM(M^u55xcwKF`S&yUet`C*!g8t&Rqgpio((?dddoyx<-fHAoy2OElAw#*Pq*OaBe
    zeSPT+vJJt5s4~Paz*0uDDroTU5hs3V74lK@W_u)siz!sN`$GDPCN3phj#lG#oZ^*3
    zT(>I%S3%wj>kO_Y_VxWdx}2Jm$OO#mYIdlFde6=aSp7_wL{wgHg$i)8)kPqe$VJsh
    zDEfi~sbPr!Y0GPh?4|S$CfzRo));J5rpn;C<-v9xR4#QTbKV_aMF{x{cK&O|m`=Xq
    zjd9V=ajqy|!MNBK?K1VgSHbX%*O#~(7F`C~c$bW&>XQ^_9oBNh?h*?x-Li3u`zRlM
    zyO~h*HkZD-=>CtCnzcq+%ksSkhX+$(B~IfN_EyUa-3NBPuI1}Uz}|`!>1*{WmU9$f
    z-pVITbZB_Hl=rM2|8V@G&{NHfJUD;Sgyv$t4hw<7_MjRO`DK<{t@Ma)d>{BhRtJgI
    zT~uGEKAw80#Npc~!*K6@_X;to5xc78Y{hgw+T8qf^|>A-DvJzzn<)KAZc8-%Be&L8
    zrQ&O~Vi*&bn>Q-8=T)%cEk~ZK8Ywpf^VK>sxb$uMYid6Q^qJLO_~8i$yv4i0PoCsn
    zRU`5ow)EWDIyXZBoVP=%M<5bUL4YNbXL`W
    z*kz;q?fa1-DD_Y9v1zsuh-w5?l$(sTtXgjMYXUUV;(PlIZvB!LzNIDo)q-?KStrW)
    zOOyS$aMBzd;mXG7Xo_%kJ#P_sdS>Tmzoix4PymR0Bj4R5pGh^`B{hj>zjm^!jZiNI_{&U>I>;({lC6tuX^)&_BmGv?A-LEG!eF+ZM{eIlt>eny2iq8
    ztJ>yM+5
    zJ8T0C6T0wGk?%$efm_i<=)5O|{10Th;>*!+2cmwT49OeRF7tF>!;2#1rot(p=GXMM
    z`_y&gURETNvFoEWcniyC(5%>>{o|(Ok}Mtzbrx5LQ|dKXs2aB^G&CM`9YvLkef^-c
    zkSZr7fryr5k?xepV1wUJ!cw7@Uzq4MREf)BmezWCJMbSZ0Og=7j`BIlSn6?MKT=c^VE2yA&;Y2WJNVO=bMuB9Ya<_NA}XC|BABz?RZCse-3h;%B~SdeaOYZ)r;1
    zU%0EtbaDSzoZCXyWn5TvKD>q*h6=Zdds&{GJppG;3dKQno~JzCQGc0s1vd0xL_`fs
    zLgG1mIh8@bxwi5#cVUc!nmf4eTqbOvZo}jw6rEVo%nk3
    z_FzwCq#1C7s+*Urlst(kq$`q5tA}U^9vn(h;gPe8tbZaKdxbRUIZ7GgtQ1TnGuD^x
    zbgl@1ukTrGyJGeHwAoh*U5d)O%R`VvE*3YmbIw9vy!u$AOnN`A%L}>6?)Tk<0_SMq
    zh4l5*y2~NQyeSW_Yw=`Z%*;~E{byVAwa3`h&My-lT^SoXvQw>l%=x6V{CACa{ce3m
    z0|$-)E2s+h&3pP%%~oH0{Hx4so?dqo#c|mWMv(9q^%AyIOR0CylNQO?4=95*h&E4g
    zxCrWXx7&j6o9v)Vv17*`Lm$iya_^6R?u(jt^t&fStS%Uv^Tea3ZUs{Dq$~LoGkk?*
    z@!^xSi(7}zyQ9uboZnd{RF)n2Xf+ek_uINew%wBmuT{QHA~i9T7eI7-Os$wjNBo^Z
    ziQ%PELo56=$oTay_WFQOR$tw0*KNR1A;p~H!)^0!`Ytst%U_nn{qAhfyVV77U_xJq
    z^`tbr$Yp;_s}bj2apjDBfGaJOsmW)Ll3ahG|8!iFFNx-8=Rm7%y>}@O5Pw-L#6Iii
    zG55@;%F+-_kzX+>63_IHipF^&)~qP49?IzQAeZ^ud&_I6=T`)bpXSWEz@401K3d&C
    zdC2aJMV(hwxHZ}=tyvp-*@VaD_yfVk4;&69S|xAQjAX`DAA#gsjgN#}2OF!oVDIM(
    z3w;XP*@eyAXxIgh4X{sjuZl!?-%i1vJnf7A{pE=dlpO8Ml{nk6-LiWxYV1|D#-@Nsu6J
    z%l#el(;){8k+=F_Ih)`|aiI-Pq$*!hK>8R}_MQ0XQPdN686Ca^-__Ol#qZJbj`AR7
    zdecn4l&VX9YtcUUmfSF7+&G0oMxxrPe&6UGxm}i1_Rd{D^?Iw6{%zfh+k%3l+w%Ng
    zBZusR)tCJLa<#4mpl_+g{<>@aFDh8mG*?GF)$jJ8QSMwkwzO-={W%&&LX4BD}WcCv1BW9nD#Kh
    z5--ze1JJ^Q9e)20BAqE5d@FxMpeuPiLWt2&_@F}Cxv6J#1!?2_IF-1GP$_^<@~@U2
    zA4||9WTN}Qw__DB_7xO1dnNW7zOz*<+>~uwxSojJ&offD~^kB1x<<9xq}&9rsjayZ=AwS&xj9sh@~|Cuj^
    zGH2xNllTl%r{7%tfCCr!c#gm0*mcKcA_4IuYcZdE$~voYj)PCLl+Li)oF_j0BKbNq
    z(HeF4jVuiGrn0vCs4aJ`h(|pLzY0^m{#c1)GwjchK-vE?+B7C$*1c`Bw>3{C=)2C~
    zf4KS#2P&-Z!_B1rZcKStj7I{sqI4P~$H3l@N+iL|^e8mG^GDYTp!MDYg#KHX{cj?m
    zek61VBuPwE_#Xlb5T7=7D5NAx0Adpi!Hm&_I^XJDu6Hy`F?N<1s+Mc2I;n2rcO9^<
    zFAcvdIju1P=6^#2Xq(sw5E1^hPkwKfe}0hr16und%Ljd!XPb(?>VgqgkKSg#bh050
    z{aM&0(AecyNUcqHw)=$61~C6OoO%i#{>2gbODE*7woK?FFfkNgoQye6OvYc>Ts2x7
    zWmuun_xgW(IRE+We=qpI75v{8J#i5KcLx7wWd3JG|MV^p%>TKG|NpuPXdhN4pGBV*
    z=>EGop95MiC^_|>fCjP>RKDRjt2&b0T&0~ZEb`SL&uMvHDS=;a#9
    zEgRE$%t1j9q-Pq$j(^#MHj^l#Yl59l1CL&iPW@;Gd{@g0B5Mdwpv7YFbNYU!YQ`IM
    zA6WaHxoZM1>&^x~5KJ68&_pk^-K$E5(fdYt<;m`dz0xa`H&EZP1hnc`kEn&6wj?t@
    zA->}lo3<4JhWIe(`}p;YEEvr+Jm^U{3Ui5Xeg^3NVujVpbM|{PkxWEw$%-8=|Msvn
    zoFYnS(6u|=pm!CJ%fMNY-sfNtgYqYe$e-?@_oBp
    zNl|$Dc7Cb4P|rBfuId9)S`Lhl^v(u&5FZ|F@bzu)xf_APnQHq4p-$*=n-}t1
    z4H*Lrxftl)#K8IY0{6XCn5SC+$NUkR(>>agbG(fUBd8+x3Riz4w7?8ntR88ntP7oR
    zkADZ8S1`4S5?kEHS4OLJm6hKK=u|l^S2MbrC`=h>^40*!Gi@OEW;JY8#x|S
    z=~dXT0i$4r^Ge%L=WcWlhCmBYReFLJ$U^INpy>NbEHu%wEOJ4hy08s2&jx@7NEF^T
    z-!>eSVfaeXT!8oG2zKqqX7R4+?#;wNX3PSG3=g`($I9J$43&tD5Z8^%KbUL#8yWl4
    zZ_&|WZ}1>=fB+wm&*(7ih>yFaV#R`TQ=tRObQ_;+MK1~3CIWei!cPUDQqU&-C|Z(F
    zlia_=W_--u?K6euKyQ|6O%pizA70RU4P3eXWJ2@;;FnXEJZd~A5R>W+x`N^8v)b>h
    z(S7mKA1YD*Bte$-m@}l%tnr)Sgk05~RdVq(*%d>eQ7hxctK?e`_g`8s0M&|mc9o>&kIMJ(o^%ssdPK{Jrqvo!Qr_d}msi@Z70
    zt*Y_Ec5=%|6J?L-k|nD@qb?0^pQc{_n)E
    zb+2W_yS2o-e8(5vYI)CXWVx7I=A_{w8ZBy1$mw_;Xv-aoXd{sLEEI)06S>}JS7uWHp^pbPN<$D;)yiWLb?i
    znqU8s^j5LgqMO=TeLO8vb>?3xEu?(zy%zoxK@D{5c8Nv*&c4nN*cfuH
    z*_oMNSIVb|7kjfpse#56gF#QIB@iLgly%Nl%>w?lKk6qiSk|DgwopKxui*acOOMcn
    z=Uu&Hz@jFq0{yxQd=i+x;w*s2mjUDJlAZsijMj5Y
    zc^EX{kzN}lNW9&MZe>LaFMg^9B9vB@MkDRQtCm*GDs~6GGRFnf@vtvzX2+X`J~QMa+FZe=-5FR
    z(;Eg$LQOY^S^@b$e$ZF{Dfyb`Ru{v{QKXB{ABvU#EZj#*P7pf)%LYrH4erzSqyxsT
    z6{r+S1k=S}^lr?2Lu(SO!^!qMDLh!@frrcWE?^+E`GukO>Yb`c1=yv_K%1(J=qkS!
    zT0@BVD_5W*0?$5i?i_c|Lb9A
    z1moEUZR6GH#$FIV7}}pv5uj<8?wMT7IKqLH92<2eSxpPm?rRhE26VID+@XL2o3BRr
    zje?K*7ifuHjUQ@_;;lhg0yjTa0Q~)czVqmepIkizX*FDGkjsIJmDMoLOn0fwrolN8
    zuKnJ0%=gfJM;b?;sSH1WZk1sWe~?iEk5$fRInY@IdUA+*FZ2Rk&}9(Fv8rE{EeTQE
    zl#vLnn~&2iD97jpdT{17?z^QX-y&R#k%o1({jXfsM0=0JBEC^L-p^BPeumL|{l&HK
    zIPxG$3;ylhmvfz#hX&Cd)<6(3BZlbg?uYpJlA#+6hqCu#_I*_Zd&{31u?3qNAqRA>s4Y
    zQ8Z^KV}KL@Zbj87@Z)^T(w~;=FM?wr6~NUt80ir$Jj}&+|3YN{`z<~k1^^%Y7V{ST
    zNNgqk?|=OLTd50x0oiRN!H;J=!e^qvf$zT`j_=r13w9;_tWKIN1zK13`<)ACMgs8(
    zU<5d2SE=A);6Kjyzpf;#7+{fio^3k)v+e);Cr~NSgpPco8@v4%XY<56v}hwB$k=+<
    zvtxrMCIjs)^$#5F`+vy7{bLqq0Klr=K2c45#zfG;y0GyQS%)aiJkQuTh>sm5Xoxqn
    z9XmT!B$-bDEJ|S&SX}!r?{EiT;NiT2Hh)#d|NC;_H?`Yfjsr?RYyX>bhy@eeayho_
    z%*tV4v!Yc=q=vue{HeqD_oHF$U@SA|+lT)JO{Gu(QL2FbwPORF
    z9);Iqi4xB~8PWXL)&2LkX+=5>$aV``{y-pC?GrTe1HRKuE(0M$5g{
    z9v``bkT_0Y=@XgKhp`%WU7!FJ(tdLVikVq%C;u;g?GqIUi1vYuH;{tjECxZ^Fgk*_
    z8u}npy$J*;mp~^}830(&Q7O=zuzuA)@(e9~kHEmH)=@$Wi~_Ni5g^IGQj=rqg4Etd
    z3yx%~J2o>!4sbVJn__HhF~rQwxy3_vCM3>zWI&VmoAU|Cx!P@(0Bkd9ZVOZBI-8Vo|1=O7ytB(?CfHt|7
    zr(A_A&M_$zN9u1mi4zWd+JG(>vH)_g60~3tI&Br+88DLL7zL}d9Ke=WfYu`+O#XGV
    zd`J}@Edb>2I~m;;R2P7JeTg3-l}?@4;S!KY+2~+QX~KqGUgzdM8o+>BBpqk2B3Z_eih^muljwJZpVLF
    z9VkozFy^hFc1v^Eu)_KGBxn8qOOCf1kP^EY+5DYQp{umqkDnjT3e?F|1BsZx8nMLL
    zjs!!bH*=6fkAlD;09>AcD-dpPABQ2)0^v?T2}UdBevoBvrgGMOg+)Hh%n#+4E}wnK
    z*8ns#3N$lKq1E1F1Z?8bDPP|QbJbN&mjsWESI%a_C~J6so_>}eNT}=38ERjdjo~8j
    z+gbgGSU`Q9m#bC9Y;LM4c(+b%p|C2(Ad4#GyjHD;>*FWS&JmFYyZ#gB{TYhA754dn
    zm6@D;BVVH%fITpH7Mj$yje!Cyt&*SB950z|kyr7BSnTJ7O8x{Pf|D8FXCA?`zNC`T9
    z9<3_t$5x7a%?3lNq{+VG1IlIn=uA?h1g;LI??^1!4u#z@o|E^ff!~!H@-(Kf``u!e|g^Jk*xC~J#8jJ>A@5X3w
    zFV1Pm{MBSLO}XM%@M^kOMco{VlphnNkZovL%Kuh?J2~&h^duGdW9Tyo^tOwEQvD!M
    zNNVa7P)|?*B6^w2KzSaG3o(3g-)LsCYJJb0p6P76&5jQXNP~tMlH;aXPa%wckuF#@*Zx8jE?7pRAppj9L#rYwk~aT
    zD2ey<_iNe<$5$v6&wx3^x!yNDomvU}>$7-RTj}c79n4Hc99Pk^vqfTuauKW+~*202LVcq6(&Za3otssNpNtuQI%RJpdXO!Bjv3zHr`8En~rAXBz+h&_V<9i454c-UgqfkySN{rrk
    z{SY5vJG{B4kXdo3JGoFHxQ-;?!=I2g{=R
    z%mn)y$=V|lJKYPJ&STC&Iy(#2xY#V1C$})d0*oXNg*PK3_3_#*_rW0h*bA~lHAGy2
    z!>bNBGI)+#A04?mDPTlrJ=MIpMrM5ed{V_>JmiHtXnAew_3Z2{~qAu+k$XB3gQIIInF8GW`7Z=tGF?Csj
    zg%{SDnK<5A_Op!=#&5$*?9SuZ0rbW{wrno|$xtx`=}^ql0*M3zrtAJ=FM{o3WXJ=X
    zaA{RcAtj|Yp*sD}x{TPRJY`pD{2Oz?c%ouSa8F(#C(8&7V-W$@@O+Dv?quQHPjs>q
    zDr#)H9R(UR2lwM)2M^+NZoV^sm0hsR)lHZVxbJwWq(35;y{IDv_sg@4zVShe;pdKj
    zj0+v&;e(6i7+yB#jZk!!CClKq4R?)jJauCr#1&F@gDiVE={90o8EigmoC|TgF@nV^
    z8x<VLjjTZFW61$G!Fz(wMWRq=n{2G(Y=E0;m``=6f)?Fm4K;4FBNlj291(
    z2el=2N>)D%bv#=eD17MMpnR1_Torw{bt;%F&DTUYcmFS~ky`$e)V{@G~Cp
    zUCn|;R2|sUrDy|%3U~XqFjK$mG7BATJNJY5I5~RkQE~qdtM2#TIN)x!%c(Z1gt#*1
    z{z^msB(ie1PF_Lq3qY*2YVwEbbEA{9Fp-nn1i6h#g8
    zN#R#o<{OW}Fe|+{49!|}BZMt|2QpMF*BJQ-Jhpb+XuRSK5~fEe-$xyEEK*HH
    z2VFIZ;A-Kyu13yKdUEMT06W#L%$iyIKIWuheKC&EBwd#JDwF;edqaX!wV4)e-lT}$
    zk^fc3t$RP6YUrJ+T-%<>Ectu>Cpq|QH%-%lJNB@IUN{(jJfCEFT_vpZLBh-nn&tk$
    zSFK!cXjD|qh_mvJ6k6ELvg4Ta-Ox8ER==GaqLVa3`%nlge@6%tndc3QSYHFjjoYLYOt{t5VxpKhb;enZ1fcNLE
    zHo(4k126O|i%oXnEi}4pLgoj9s^Cw87fMBKRJ4PMZ-Rc6vzNwNVuW3@=%BhEE|zW;
    z6Cq4&1yV(Z7nA(eB>Wdn8f_);Z6aCB0a3w-*B2OifQydCyjQc$(LNwYiWyaBOy!l!
    zf!MEyCG2+_t*XFhN1`_dX$Gw833sQ9My;O=YZg12zdlY4egH{hcz<%MdjapXr*0U=
    zf7gc^_eJl-4+n^&g?9ql-p&5Vb(8o^WN&%E>rUT1pfq>kNJ`=Ibp5g0#7)P=2DXMr
    z5hAq2)ms*=MhlKlXU)%{4S@QgDBBeI3#*ea0K5%Y??h5&Uw2F;B3ezQ3&FkQmS7J%
    ziY8emy{rC8`LlOvX#;Cs2KbbFB;^7&>zGodV5tFYBX)~k
    z$nBvBUP#2~0JUW;@Y#n&{+qTgj&K(hh1fcB%W*zuf1O_O;Vb84l$b@^7UEWjdVfTG
    z)Tk+F?QbrmVvo++KUb+1yV+^dWsk|sQGd$sL4nN$(MtusG~y=Kqi^)}55m?Mmm7wF
    z#UMx=VhOzb>wP}0u%mKNTr7cxjLVi!Tz`~OnO@(cfugH(YP($vQXA13PPI9T8ko0+
    z$yfYLh8e4^=Zc3LvW2|Z%f^~HT;xw#(j)W|YMS}67IM6tcQ~J%ifAQaZC;bXq@6z`
    zH<2A~n6+Wk93f#1f&{E5Sn@Rrod^&=UH}1s_(E1e+6NrET&DHEx(X5HkYfrJH?s1d2BY9
    z*H276yP&@CtHniqw)Q(`&jCx`rQwsC)*2lPs?$b=-Iw$^ys4zt=<|VVrH!tkFO*?~
    zkV#P~M*btI(AR<5W6Gs@+`FC&fx(t|5oYamwew>=1c~(WAu`suuX#To`c>0gf7Tr?
    z%i=75t!i3&svP#!5Cn$DLSL(~Ct)8c2^iFwhjX<`Kgzkyf2DtBwrESA#Zz8DTd}?J
    ztG*5|K!pt2rjP7xtsn}#B(PSv{FQ$;3|sf9oA~_U7b0ASr7%d*=&Q9X{W}IHp}lej
    zutzmKZ*v5>3Wq+wzbqewiJ{Bf+kVuT&+RTgKi6`FRT{z|5hlOSUu`Oy81myVwXJP<
    zZ7bJdwjAbGrLpORS!f$vrP0*c5m^%VW7F&(;pM+}3Aqdc(h@p!ewTh>`n$*omMk8B
    zzUwUteBB9@%%CcZ@qJ-FcZs$I{j43&!&3ie?-t)O&nL^+FpoB}XG3HY?)K6lbC&N4
    zbDwk}0nA{~GPy%;q$R@^EX}vr2ohXH8vJy)=c63J0d{0(#DCE@-la?Q3SOqT^KQAX
    z+Vp`m@<9Z)G7sG$w-I7vk#qM4;RTiP91)R|(?K^841y;nN0Y^pUi0@iB@ptnSyNJFJV+RF+4)`W;?~ygG5_>0npDhE_rjElH&Y#)8|A+>SXr
    zw%_0HHhMA`6mD?Wd8blOkLequzu{qP<`rRAWqmSsD|F^g(dc)dAuG3_#lluFo|
    z7F8(TVifIqJnD6Gr^Zm@*_wm1`8Izw84r1KlAebykGWZ3;uFqsk^qYK#od62&UesZ>L|gf9NqWk()r(OXGi
    z!+f)H%KhkarYipeq}bQ;Vs8iT^sYVK-ddC1CMnz5%_2IK%MR8)8O{IB?m|fE5VEq}
    zDTmJ+K}f-o9hvQeBf5Y6bgBsKAl*gq?)NSo4#}iI;E81qth7r;@mbL^FBnePcksa>^qM`$rO&^!ABSHuN0=fz%adDY
    zFEL|ilhiTBFGg9@NT5Fxd+k)zc@8|`GTnj8OVO(PsCa#|94YTP&;Cr4{FPF%xdYkZ
    zpIX?k+J5-aOh(3|BS$E($^RWBogtW4k3%xi{k4JXsPST+cb;C~MH`8BZ%&3jhe^fJ
    zvkUULX*7G>Jyx++W`|3e*&1~FPnRklW`{nHx}0c__vbs3LHr6Bzt+
    zTzbQ0GP#RY97l?rb;;VROf@|>c740&zFzZD#A(19`gU}ww^mi%;6yqk2F}r*mPHaz
    z%w(vStefPhSb@6uYraUxLRK7CHsKs6PX1!Fz};;<(QH#%Y#86QLfV(>U06Lv78Df%
    z+LrHqYe2T~kfLS&&n1TrgITibsn~2t#maoJDw-GXxv$rT&$*D0Ryo_AlXuXWa)_Eq
    z=KLWs5IH)K8!;-#RQNRCQna;YLc7^kz*qM;}IEs9p9V>YyZLKrMdbuhmdF$jiD-GtEh71YLIV
    z%G4qLfT`*E^7vwXhH`#rte{
    zt@{dMsL3!f@yoQxF0NS_ZTjcYg5Fs?#Jyn)d9N|}3aqUe$dO^I
    z?FKc0pJw-6W{E=y+*>`rXh&>D+C{0Vh}JbsYK+an<8OXD@i1WZQ$eF%xIg^0r@wpS
    zKm#6r_>QL6jAHsC>$AY7LqFl--B3=QYy((P95#dY);$7Tp32v*Zvu@8KZjH+DDHS~
    zeRQ!!nm>0NdV9v^a-yvhjL@{>%Dg#Qd_(=WcC#{+B`Jdlk6|KKW-*n4h8dGmc3zY{
    zYuV&z`k39}L0g-hZmFN>@(zE`h@
    zU-Gp3`B)#n71H8#5Nq{1qcZNfhR8--uv!x$THHM;dfYL5sCu@(Q)5r`w!1`$J6p0j
    zn_0K@%kTuu2dB})#P{g$?aRJg^rP`8BjJ5U?SakQR%2!7J?lEc;|6_U47GBq@N2iM
    zm5}i3s(Nn?9*{ym$63~78q=D-r*clPJaJ-v&v!GJ3Wljm=3J9BLK`;@18v-JOV^~v
    zB{Ry*nFNb)U~T7a^fzso#2Z5x4u&@Ux+Z!<%fmaU?zWur%Lu3r7@K*s&W^<*2E{f%
    zcLjw~`cb?(k#|kI-PZ-=TCT_PR&q$(JVw`c{&EQ~vs(!apX)hRZD#4@kNwx__!NOtZKAhniWlx!a6PGOZJ>VQ_0&;Fd^Pj6$L5tzjqHc}^mEJOad#bRG49J@W>W#KvPUL&2Cb)hnr!Aup@%w=
    zv!%Lwc!_$*>n(rWwulZtenUP?C8Y;zcNmUa=T~CfQ30RzXOU`=G2o)!H={WQ+Z)2j
    zCPQyC8^^(M3GH79{gPzIO!P+~%MTb`s
    zI6Jd43{$?;?kAucR>W#pe=<}708e4N(1y^CEnXgY?w-E)L0ehq@MfmNz-^8aO~+^{#5V7fO1t
    z;a$bumUkS*#0k^ygWM!!AdYR-izcDbuL?uqf~TQL1k@ZnS|r;IfHN(2OH856zvNst
    z2wghH4;1Y~7wkY4V^7X;s|aaVd@5u@Ad11BY1ar6$058hlq(m1U(ncJXF)@GVePu!Tfdl{Z>QW5bDCflfWGvxkh6`1E-TR6KEafG#n3r)ud`xijcZZ{!-jSMIZd_xK7^{E
    zBs6vC;YONC@M+`vR~XrwE3-(+Y}kYVC*9(Jf2NNNnb$y2+R&${cY%da11FaFRMhYS
    zEZ9ZJ>gcZCs0JE5{f3-zTpZTEju9y@u+_f%cqs#oJ=zh*-zm8YZT2$uc7r>M?{7=R
    z$>BK~Z&}*9orfCq>daQ3m>Qq&;FL>c>gqz&XLS=BlHQS&x)Y9}Z88d4b$}eccqW>H
    ze#8fR0T1=IkHh66@$wR*-PN(eZ#9X18t1OtnEhfJ&h@ZsKyNK!oYPdmL=N!DmzMkd
    zcPc1kt$nU&b&{=zTlPtR>Ry*^)OG9LWbB>>GQevEpc~<{9vl)nSIRQ{dM9(-JxWxwX+eW~f#+w(n`d|7
    zwhoo-`?kCJRWe*c+>z@sJHaA@1?;5vxbsx+(!~D}5B`n}6Ui~t&L7*kl^M`1%uFsC8kLS%
    zLF(SECGBFNyr=z`NpF;xzYr(;E4f9+^owLtMV*8Vzz&BtW6J^s7{kz*YL`Nt8X0U@
    z5$`+@)CtanPqGnq3om^AF}T3WayLSC1QK8X)9xc~I$iDm$l=p~3ls7n-MJ0alj5|`
    zDVG)|6^YcwZUWo_bzUfs`bygjr3ik~zbvf>rXNva!xWPYD*ZBaKE2pvdqb`11rHXV
    zr@Uw+3Hq$;KSFMnV~{_4m!U(wbP8I6U}WGBTn0Fjc@bV>YH81vtH>_bD2|*shmc)PcnZc?e3{fBW=drX!(b)`OtfQ=3^4q|;84nUjTg6}&m}1}o+Rf`$oMt2;6=
    zBEr-qGc(DIpi<$F&(MDZm|&S8KpBqHHbHxik<9C1&+h=>AMcA=Yn;dJ-3o>3yhjyKGp2;f?h;QA^m(P?&m6d)n0^F_mX89o{j_mm
    zc9y!q$)hhia6ao4J}K2HESCe-fS8bp`I+^1@TZ!3hf@m*`Q_Q^57fXFUMQpDd&RhcZLSEDtd`Fe$f1&0d7cTyBM$9gOuXti5W6ck$Xu`QPDmtE|0K{vQ#{A}TtMRc20lKzP2Qufx^kobo2=%XKdY7ZI+
    zP9I8H7T8M&YfG-VN)?detJLhCB%|uxsY!7pvYK%`PD$SlwJb0m+pc$-q`B8^A=B<`
    z>)ZJKeZZC2$GC|?)SqW6OiudLN!;9C?thi6H`p4rExF
    zIv}!d@|!fklhP>yE5lx6pq`v(81#q8lAqoFAI&iGv6$_DB{PS=b%vz5OANNa36t;=
    zELCz&ZwUy-ICeF0qR!zBy>gxn;>1)DFuroj4J}D#(Prq_Z2tKC_F4b`_ou#(crj5-
    zNkU4%@fxU8o6}86u0C@h5D1nDD+tBzj_@6GD$GpNvdJil#*=lt-@yos9K!}HvmE40
    zeibCpzw5|UX@|BnXTK6E2Rui_y=I$E%WIj_!Cz=jg$2OYgDNoKLa#9)S}@}7p5f6$
    ztue>W!JgvMQ9Yuvt`D^%fxf~#v!C(8q(GYWB6>D*%?>*E_RKKe#(*$}cnk1Y6YZr>
    z?^2SlfUVAo>t~Z*dQxJfx4*;2v<OAiu0E+E925pUTMsgx!wLoYV!30R=q3JAGYmfNCt-D4I)1s4dVWe
    z^TA`o9*$S7R%p%2oP$lqE0y|I+Z~NmqJ$73GcJ;j<3L+DxABzR3te16J^?m-B6)t8~9{zT?p2=XJZln9w%4T_$(14VtN)}g@G_yI^ubU12uzu@U
    z-P-YdJOGA|ap*m|so<`$L0gX}kAKZwH*}Y;unqCv@Lt%)@mQuj673dEePVco(jOsR
    zB=mOGS02jepWs!ID;MauYAY)c3rHnSHRe1HIE}Cg4IOKxCPd
    zcYI}85g|tRFFzmo#UR2f-(5D;>@}@Xb=7T7*So93Bgiu5lQCi951jDl><7@q5`;y4
    zC?_{YScJ59JC0f|H=g-&>Z=PH&5nZe5M+PQho=UqQoQoRqH3Lt>2>+}bWE7_V
    z5w#|>;Kx-kU#iGCqOm4avspP2V
    zX2XI|h3M+nA6s0H815W}zTUkp;sm44ZtYNv*Wilv;ukdSZ@mMYezhEc{Bm{9QGz+w
    z#-Oc*Zhqz)6cX5-y?Yol6q8}5o@y_#@i*#8`p_E_p2@+
    zFBQ4_eGv7!!zFC<2Cz8Su?Z-k%~=9hFR->jT8tC;w)yzn;lVmQW^Z)Hz1>Mx2Hc=l
    zdfZCQ;=F=AWs4w+bFNVSX*^7OJxsyR5$_Y(TdoeC<_?L2+fS3i^sJsv#>b{Dy(*2$
    zF$=4?h
    zbV|TARYxY2bleZ8D~aN@%8OFu>CpGwMo9!`8t?q3i}|!;g9qZjcn+)QY76Syk^FiC
    zu~1nqx9v!)31)cX`7`QyqBKxp*&bN9jTjQxcn+ee)N4XJsf|SgT+=vsVX#DIA1tcf
    zI6i};RZlZ7WkUtwAXW-*Ve>{(>|1GUP!ikEWz62<`LXYYC{
    z+92&~bFC6~pZ;Es7K9Hfc*o?;A
    zz5(hEtu(yoA
    z9x8xN$VrqE*D%6tf9L{(CZvyw61C89tO)hH@AD2@;!rf3^;qNnP)(R}I;d{EE4BHc
    zOo~BXHp$m*;yH*Na7`%6QM)hjdJo+S&s4-G3OO(LAuF@==NNH&j{6HmC5A(~861p*
    z{gJtc4B1U%AnzpeQNe~?`7tamm>z#;y~u5Hq#P_1oLpqyXoe32EOPNvloC*DqPN~s
    z%k#aNZ+_kwl1}#$Eer0AnXd3J9gY{nfV*4E)FIiIBX=SkzR8$+zm|!3ebXImMi+x{77BdX~_VVXvibz?TnmK){QwX
    zA5V?k%)==X$r76;wu{h2QJ?N}FwjGbyx3FrvAN}DO3$bFc)(XecZ;R=
    zuchbCj7EQ_O(0>dy_^pmBYy2+4n=2qj3C3&l*P6pA#763Xzj@_SM
    z7|^Sj4BPrBMG)JdE)AielsV=uV^6b*?Y)SXv=oAk=|t7vM|mAPF}I=*nH-scx6HLa
    zSj2#dHw~)M;gKFKO;#CHVZoCLgWmwzu)hHAl^3K2*~(JNf)^b(#H9o59_mz4A?Mb9hM$i+(g7+l-uf>ov=yVig16
    zdCj{!REP3|pb)u%Cf})we>Q5OCPdbmrB!-9v
    zv|^FwMqXuwrfIuLhkR_}9oG?vDu6Ok_bOzs$*e|86qY=9-(>gAUUpZ?Ze(K2X7b)`
    ztAT(1p0{8`IYc%QXya~Os<|$;89=bS5Fqs~!ed?`B&_0f5R;KO_a4WDolA>Z+PD>)
    z?7Y6Uw{lAdKbZD(FzvY8qzppSh@9bc!}wco~ROCk;c%7T#g_evctGyHAAjvRfZk=`H5j}djo2xA2}idDiqd)
    zBv40~_#`ByD-SR6O7nEt7$r@*vJz-%Kyg!PH4lpmP!L*eyOWmG5EoAYs57
    zOT}zcePvd?c;!^xf9ft(L_d~eXdUYTu)@VKa$
    z$JjyxrI_&*t)Nt15~bLC+_KvtwZ|S(z@j+Oi!51y!YwUxQ0eVrtCBI>HCA_YD`?2&
    z$AY`hMWN$!dSHHp)NbEBKb-g7U&-!U-^$INXBzohy{HWhjzNR;wR|KX|EM$?;i`Lg
    zAY1CfOOp#%iV)bZun5zSx!9PG@YYNOD=Jy-A?oQ)#sfc|0zvJRB9+JtxtNW*0SN+(m7J
    zs4mOVvrL_~7y-SA?NRgAwyU-kL+v6LatlW-gKB$&CNxXBjAwq=@ZxZ_9wb4?Q8po&
    zYO{KwzNwDZ^&CXZP0AJPeL{Fqjn}oAlAuzSg}L;BPC}$|ZZTjmd4I`M560s+1bSu6l
    z!*S3XU;HFLSI=`J#J-sqvet&w9yJ@?3D~HJGCQ!)NI(;A(3G(mJ+p-4!^kjf7*CL4
    zb?Td7{aDVftE^bo2E<90piG$2yA>F=pPzlCKuvw{;IKd_gGw#j*UuM^e4g;>n7T?I
    z1c_IZuz{?)QGFcXBrzlB-k#kyBxaV@{~jADHX;`8>>fVmC?+_#aA&czS>v4c+`*h_
    zm*m0y?N0zdm(~O@g#LKC`*^X1+VY@dx@pXm85eS0W|R=ga}M<06urShF(Y&wmv6#%
    za_XZ!Td*)Q0o}rdbK-#NPUKJhO1jpT&$~NQvT=JWT498&hSqiVX`}w)W*+#O8`k-?
    zf-;Adq(Xkf(IPwB_Pnb*X2r&U$@&wJEW%ae1{;|4!+NGvC2TVN>`jroUY4%_1)i;J
    zYTl}0N_>9%_)vifU|AILXtGpwKogz|$HXF)AXS%s4YPbtOaIOkTz_vN$~iwIb*TKp
    zQC_LOKCajnojus4_08L*j8^S0c5}RJez+=&ac%Db{;iJ(I5sK{kv<
    zksPEX^VqU0A$vO-RdJ`@SE)@Bf_l`~4cv
    zd0p32iso+1E0YJE5#XhF7yFHTd7Ddw9G0DM9_aMImB{n1ni3WxZ-DT71;GXThSh`@
    zTgI9}D{-%W#-Mt~bvN++x<99)5EzI7(jIO`U7$o$$;HX3XJYA-h$j%DEH^fn2a9=+
    z*55dKdg@yS5K)e8;fxhK=aw0TVCf~U%|PxNbmmy^WlS1ZIkAMjxapqKSCQc;a}xR_
    zWSI_iG%)oGE5>GfbAuzwj!De;2J*w@&R5Fn3>Gaj8--kf2SZcu%G_MK7R}Y2$uq+)
    z^7=>Dszb*5fv0nH5*;Y@x@&RnhDo@>SgM7GL+$&9s5MOpwguvmZ?4XU4jqqZn
    z<4q+Kh@{Rj_Ul$)+~H5c;&H*xtr&RIb>>PiAoJOzTBBIismwmWvG4~#zlCH{4#co{
    z1yCAlv9FfT3Fn52SqDdjS|>=Z>*3o`$6nJVea#`icUGYI&0`E4t-XJ7t$uAq-@Jbl
    zDv=SpQLDM6ni9zTE%3O}FrlX1pKqp0xr7D}H1Mh^tM*F8O9N@eiU+f7#XvC3WY7{J
    z6$Dh_OhR_xA^D2yVQdB3UuBFkhFOn~NXN*v`sMV@v0)&k<>~{(uZm2X<~Z7h*Rj3iLV*2g|R`@~v8vY-^$fjGK10r$I!@TDhO08spUU*wacy$~bE&&?>e
    z-;aAQDDRE91~$6aq9p_CGUGh=1N9a?ziyMOIv0Hj`ZNNhGzDx%8BwFjOj}~dZp2oy
    zeOfR`0@Qx_0;oL2511{dmTf1;=g(CR|M4DIP?gV6)g2ujMJ+&xCWgU~_h5zz^Xa|bV-wHFBEc-Pj8Y0
    z8}%xQv+?obwedlZVZteWGa^qs_LQPkgxiG--q|wX88>!^%&p%qIW1^b2HN%H1o+8>
    zs45O#-0KZ|GV(@pM}O%W=3Osj({A6L*gkc`yvjCNi8TnV>r)R&h{`x^T5}&V*fPF<
    zd(F$#?1%W*sj0C+4a;DFPWV_xWfCG}4~f%9rIg>ihkE4v5K4Z9W)PsJ@`c7#WKnt4
    zPy2*%IypPTlE)j8V)c*z)VO@b0<}7qs+v&%Hg;|ihJ!G!N2Xv0+6WuD()im~`m(AY
    zAHb3Vn80mlh!6bcvJx}jQ;7SX=9j?xNjx00=JXcmvyv1DVlv#KxnRUL!T&eD0|K`W
    zxL;2({Tpy^X%l;3=!i~@G%*d2y>Y{Q?B%?8k3L&8qu&Wy2KjSKSd`zh5@R^HWIiNMv0`Jz%1
    zq!8KAaKQO#X}gAi%nVVz)$fc;nQ`DO5o$X+=ezt>8GT|5TQ+Eg>Q6
    zu+d&||1$r6r;*E3>#v{kZLEtN43G|DD3q}lT!3*f%>}Yx4Can+BPm~Pw{Owh>Ya8TXA0q!^tALLqs1G!=<0(1Wq1c9Y$mqoNl6YT
    zRNKV)B5T|D2NS8qybZcfbi$k+3--ZF_Tkyb{nH206reL!3goNWW-0=iyLla;=)Hb7
    zW8S@=YKFUz)!=#A;0HlFjnhUz5dd{Y7ilfI=@vvVr?Tr$OW=>drJf2b%3gd#n?Ss%
    zU{1r~(-?EII||&cIOQqYgutsw>aJoj^7WL+${Vx^gn1-*3Q+B#V(dtS4Zv9+#
    z_V}5t%BT!ZBu?;9aR>Ty#6@IHfkcuk?J*xkI4rhrG6QT4m?kU`5*qRk5_0R$*R2;6
    z^z=TIT&1*Mg-C4;VpsM
    z4fV$uXA0O6$U$7XbCuH=a>itb%O!-ewekptDQ)rl_k2xC;VMcO$RK
    zG`-+wH}XuDgPx*+MRg*L<7_+j>b1UYLc6DaMy+SMXR~c;oRn7YKAqck_l@??ze|Y`>M#Jm|YUSU~l9r;LNvyfRpWyLFVx=nGF?
    z2SUR?I-@v6to0-=Y7^Eyjfnz*69uuox=hb!DXNJHziXqcAW9~Iw-XSx+7iL8yP)-C
    zn@=KF1`1-aX;wQ!nvyH3%S!+;VZ_3y0w5Ch^unC;>OVr`)Q=?h03+QP9+jpzPxZ{R
    zv(J2hCPwiXdd&xc(jZ(^*qd9_pbSz)%28l|}XF*Un*TVKW@L~7T^RB(m!DtUHeVR%Cy-DahOX+|e6Pjl<&owM>2gsp$0>
    zy_P(XI3svtTPm?FgrZe;Ft$kfs88|sSe#pa52Kw*G&XHncuq58P9spHcWkxq=SnUW
    ztd|BkcaX1Q&?CImZO}E6r3wYJGppa^x0K-ZU-mW>OpP
    zvymG3`)DLz5mTPr1}2t`NFEMJitKrc;@p6+YD26J1e6UJ{|A#@8W1x95_p|%!2d2}
    z`M#$j7Wt7!XJgU$Xi=JasxI0xD_fjV=$YXS9;~NW{aV~A)Ul`r$4OjduO8+ytgtT}
    zQWZ7i+PAs(B88^tJk$yhm60cb=V(4YBr&yU$x2J-DjxldE&l3S#3mGT;A4
    zD|CpR8Z{xQfralua>!mXKFa#wxqHPm8+kMZQ-o;~@aopk
    z^`A`wrSa>kD#9toH@;YM2U;MMpo+V?mU;rAo+!wL+G>MC|O}C#~C^jq_=OjBmL}%EiDZB564L6)N+rcJZ1MTyxu`TG;gJ`_CFr=XJmsQ5x${VjyeSF4{6cSP
    zK5gW5nJTr+3)DY7nORbRQetlNR<2}WvK2x^4*!Ak_DE}MD1zu@efgAvqWwT>Uamig
    z%SV6>&T9s~U$kBt1_L69`tS*lH;B!z(;lo(F>J#{j`CfUNQbep;sLgo>EU3*oo=0{h*W)Gf7xz0~2pP?LqJR4D
    zd4}0GW|DHO;`~Y_eM<*0o$C$EHA8lbCeDkSFhOg?ty)J(2L%{_W{d7WqzO}?=5r0@
    z>{rmcb5Zw6`9O8Mc{Xzn5rDHm7y_a08_XyqdK;T5l;F~sGnzs>(!3duUzz=s*O+v3
    zNqnqH>W^LL+`tKmDHG0PYQYsVUrNN~j2it2J2_n=ba^7k%MG<-NM;m~cr1A{C5{=V
    ze?zeGQELFLiDX?APk0?(;&cNuB%auO%d)9XcCa%acipn_vA9N~Z$OzrYp~l*ZE-(;vh~Qs+ij#(XVG>{e;Uo>Cw&V
    zAd-X6?)Mkkx3(mgF(nJs$4Sm$RkKbAfXh8T$dZ{CFk>glOMKgG@uGfvTt6Z6yYyIA
    zh_PCLNs_%-GJS#6F;Nu8x}bILu^Q<0hY@}cLn7?^Xf%xZg91`N9D@hE)E43SQ&;z&
    zEJ5ZaI;3UaOH7vaNF9PTVmEnDv#A$iLP5`J(x}3?Ep567EcaK1DfT{n6r
    zwnkA>ls59Y+#-io@b`Evf7?S{yw1-^I#hJC)MLm%Gf#)frc4FY_E^B1Y!rH%0I8yh
    zyb;&ZhD%>wfm0ywN!*O25uNxVAF!%<2|I4O;b_o`q3OvVR2`1D1&E6WnF%1jq?ML$
    z)C|J^+8K%LogF?UosE2Cr#)a`53|f&>ibfdWGSubVl`&aVEw-8bez=^9}-E`dZ4Zx
    zA3h6m*bbmjW7Pp(CWJ?td*0s`%`%tc(~xdnYi76`l;vuN!HsH~Y0j4{U<%N~Fnvbd
    z>7%w=Ac#xGe5=^RI}7;91BRNmWrJbqSjug?0@K70DfPeAFLdDKyJ&zYa9=&CMo$Yo$AGz-WQ4}0yZ+oc>R#hGDA%W
    zywVQ^A!}D@5Ajg;2h@*m_fDnUjz6=lk2*^VM7eMR7g-nz77*P
    z$T=`;Xxc&kW!$d1iZJ)X{;yEY{;$%S;;UaKt6d(S^?5)#7(qNFUiMc3;EYPM*8rD+
    z-wrFqbeZ0msM>$n(UJ2nD)cnlkMqnI9)cQR#(QtFX5cuzFogcRIV)M@p$GByk1?4w
    zto;edK@HrlVyymBxT8mg;(4DGfae7C^GLSL6N4WL0S}&WE*>ITbUV=sW-sc+tsGgL
    zr8k(r?n|j)&~w;&jR;)-ra{VoK)KmwK_|?TRr%SuWdNe+YDQoACbq+d;r+E4Z09#$
    zaY|>j6C@sMxn#SBQKqr2dG#X6@(!8!9Mj2qoE7p&XqXa(f+_G%!s*Qt=UL?xE+9&vY!TKDKt}88
    zPx(XTJ)Y@n8~zA!9HG~!i2~SZr?@lU+G}UJZ-FAEu3d^YZYSON4NS`{wo7@z_@eQ(
    zUxuwH)(4hPrX|XK>az#-uJIa);)oVUN(Xtb+-O6i+R`O6Zb<|`+JA1}Y){?u#lc5d
    z8+)JL;&aN%g(@d>Yu438&FKo>6>27)#jAAC6xB*?8x;S`;F387iL%P=0|5r7={bus$aO)0^~>@vG6eg
    zeDF2yJDt(|ujB(g^}8kKy7?nw-KYqbsl++GacR2F3-152baSGPB8QCN6+140S46z@
    z<9i{dOLr-klxs^M@11R>rUhEg(FjfU@oyUbF>(zzBYh6Zghc=|u
    zNBe(kp5&})-!;V;|2fA-IC1j_#`o`+cw$gn!vdp)ORQ&};_H9iV`l?^W7J^;xDe?E
    zvd(qj^ZfVM77N=F-ALWA8^EXH!9}72LiTR^g
    z5_l?eLBXOqGqFZ811dF$@EljY@%|_!)hB4*Q(^3ZzqJxmP+>^VJ7rUbljoID_(Oh<
    zFAr%1pm|mbN_xYJ&b70@S&Lp%>ms`6+@+aCD4j9IYZPt0AL(b1Of(IyTNBHyl4H1*
    zz@wjcLXHCa)36g{E12h;>al`OsV8*0f{^j9T66I7rB1cht6>1P4-jzg{Ml&}R=ZXi
    zZ3&0`xStOt3mlk^K)gOohqPk8co>ySuwD&1Ba01kYqS!Y-P}OOSddJwPC1;=Q)GZ)
    z`J(tFCYt?I%R<>Q-l!g@e{^G=`OBQ3nR%AhFkuR&UkYG$m1V*uEomw;0&
    z{)sq2#-Rh*WU+*lEx+{x%+VSsxT&1DD{f*T{nE>>_sVx4~IEUw1zKk~|FZqF}rcAG2P)QpBoJ+{uC2Qs`r7S<%BNQt$q!
    zDcC#Xd-on>Zh;>1H$gsV`Xfm#(aCxB^k#4Wubkgp7M~UKiT1eob=bTKhwki@l-zA!
    z>sU@W7#;@cvuL<*Dc~9$gNDdP@of_#>M^H^au5>vCafWKsY#eNAvInSg3b&1l+2Rx
    z-l8#jus?a{S;~=&G*UbrAW8UvH$SDl30ae{YRJhGJ#HVSM#LpOO1D2aUQ_`EejeVy
    z$3SK$#%I6P81Uw|0ZSGn?Kqd)akIriezj%z0lUHT&3fZ|?qqiH)yJI8Pa7QF
    znmK#cLsEk3|4I>5lcFvtckk_*vFUGL(|!e0E$aWfJU6^wb}A$}YwU_SKzOjzO)=?G
    zHM0O+=$dJD10zXkAf0V{SU6CMO={EgZ0?wN3eJW5a*-(w%58xK6|$g?j(RFVWx&?Z
    zXvp|IouB(c^#54Wx{b~k+m4sM*V*(sf{B~Cjw?LjYUsu+YX~RkHBP}ck|fP&1eO;%
    z0#tfTM}UYxfi&)*DG)K8IP0driJdbARniBcH2BIQo=p*r-5jy@Q{R>hPY78{*&}qd
    z4x9S^w?OfwxTx2Iz93p`No21pAx1g-SFAbj@IQ%pD;BU7KGr9iB{q&-wpZGFNA;tg
    z$O0Yr(sT=JlkYc&eY{M1mT~)~Z!`Rn)r>u1$|+zMB*vOSCH3-}pqPzvXNuimswtX#
    zaFkU8Wc99B6z`hu!S9zoxdYAIbwcj50nwF|VQjOuqvfO
    z>0$lZb!#e;vM6)dx@{Pp0p3K>vhu_JNXZv-a(JBi`k5nlyZ)zhh!A$sN%wve%WsR9OOxfZ9JF;1NttjM4?%Ud>T?8S`R95wL=GI-x
    z#?h}uvdaJ?+D$si!k;B0uIdF0bevm2$2s?m4~@@N09Ua*v`hr#nsL_-^V==fL7R+d
    z+r!j!ZL*+$*{4<*j3LA<+@Bp7rx^ep_-SQ8b=`gyJL4M>S2f?Rz^UY#ni8Zk
    zFE?(h;x(0pvr13d!IC;B?z#+N?oPR}&jTRmeL5iFS#;{m8TndOFo!2@bkulxw0HYt
    zA$s)wmDm5~yLy4@>wI~Uz?cV+HyoO_J|cN_t6WKubHUzG8_lUH{+4mR^fsiW*s*bO
    zTNBm`FAl2TO};cXc+N%U$R$=>xz#7^H9vzcTZxrWiv_x-#HWzP(MB+otNMyEXs&RX
    z)+i`_+%WG(4hW{)%b)zemtxQ*m-YD&Mlm4*bjbS?Yz%Q16de*B_zK#dn!V1!SdWmC
    zYPQ)?WxXWG*r1O7(Z5+w+|$Xk%F6ubXh+^_A6EVyPqZaeJ)uE~pI1OP`DA9%6n*=4
    z|BIB8e08*2+;(5A>{(@hc7H9c4
    znVBJa$2Tbnn0<5PX4Sv4pK{bw@Lfier@OTkBBO{
    zV5xm|?zyh6zyUMmP5M-u
    z7BkADi~Sz2F**9RKJomIcSr8r1!*!05BLh{kUXjRF3ZCh1oP0E<>~u#!88}`_xT7`
    z-3n&;79X0}?|!Nd$~VqS_>em{HGf;;c;fLRr)L1{t<1>Ip`1uyG!hNfKZQP@ZuP;!
    zjkV5aI7e&uj=GvXljN(RbQl7g22tdgIvgMzCRpCweBm&7aWi|qdTh9%zeB1Nr6+jD
    zKlkm8ziWM#ua-ft=q9a6L~J$pjZWwdkHY4m3;K0jN8?9dv<%X)HDWgga|az~8~!yQ
    zXibju-i%jP2bM+NdS=CNwxCowi%vM#Y-=pB@_F{Lct$Uv9W_BzPH(~DTv9S7zIhyk
    zYJF}{4Coh1Grpv_B3HH(uPAw?S}kEa*lc4psU5K2Y#v?;Q?6vNm^9U%zptOV_S$6C
    zKz9(KY4iBg7Cq|Ds6)kI67e7TpaeU0vFH5n!S_ed*nQ>34*{nukC?w3@OjW07T%jn
    zWX-H`=0-Ejna6v#is(x{*__I=5R(Nj!QYWUdQRsU*v|hQn7q>P0dA}IUg;Cx!|6(
    zF0I`K^>rX7qQ}ZF5vt$%{Hh_i&17u%9HTC`LCyQ4k~Nnk?aStUY5%ysGUW;k@2dwW
    zNZTV1b7Id+#nwOgwcc(1DBywr0~329+m)uBxpTA(cu=wV`{@Vw@0bs-tVf?K8GND5nVyC`=
    z_?JtrKebszck;X<m%ZF|}MYG03STn1WSUk?#5<0@rQI^oi%#M3Bm
    z4BpvNR$9g`gAhM4ydJ(4oHb^^!z&4{eQ0R$Gqo>ptrbR&%vq_Zb8o$9RPV*AUDw%!
    zS7=HnS_Wm4E@`NN7{WT?3cr-)7QbP=7bjCt8q9kyN7AIz>K_6p|V
    z7*--iw?b8~F$tv1CjPcq0
    zIn{kVac4O4ji3ihrp00UyBZ$>!sJOMv2JVw#W|WVEt^>M%UCqg<}N6`X@FypcRsn(P5Y#h?!N7=Si>QQLbNukS>}Zqn2ImFk|=iVf6-_bUk<+lK^0N+ySQ{
    zDRo(r$Zaqr@MgQm#))*BHbF7DXk6U`KB{B8=GU>Tj
    ziS_4sMCe@YfQ)vLNUu+$V~sd`Tpu1eJm@mS)Lbl9Hk%Xth*?m~?feZOYeA;c`#r4d
    zN?-`Yo4(HzJX&|Fb`>!Oq>Bdkdj6Rp?{Mt-XY@R$YE=GPN~E^hNF5
    z+4q}R^-qmS#>}w%cdFi-1U2%!{jTZd?V`zjvwoH6DM@eAViH~hLt%WsJ&+DFsNdP7
    z6G?;7zmsE2b>%48t{xz7e)|4x1n$6Io9v=O6Se?gjl=@Y7K6Xl5W_)An{%0P8tTcQ
    zFp&{c75wv+k!70p5ZWY4VQc8%mUtwOuFYfMU>q4Npt>*AYW&W7-@PExJnE_=0-39G
    zwsf5&2&`3_ikz49F0!35#2@;YSrD6up7m8Ffjzt)ne2=(tqmiyVa+aOAyBs>Vb;c=LL$lw~ftMJqz#`bg9B{27i59h$(nKK&3{%=G7e
    zd)TeZ@$Ki-73&IZeNMPoBZC!31pms64Be_-l|yyPam#g;?r5btd*R%~(;E*C^@!UI
    z+lL0k?Q$R$N`0*&twX25g52KP&-D%RKfXFCCz`(MrWTCKz&-l8Izcf`CjFG--raXq
    z{(ilqTHHj5SL34Hy)3>MO_I>qMEIz7s^YQ(i7|13HQFgaJK*rdVV@K)5D)<8wnyL6
    zK{prPXG7)lzh|jKgmRBXe1ATG;^EDY7&bFc5LI$+^t@}x(kPy5QIvKuc^k4rzg#Dm
    zUk@>~z!$^~27V!+*d>!d^1cgB4@aR`*|GtQq$~KuF|OVV8?+3@zB+s>X)9DlG}J$ys+55KSoB)c-~Ui_WN{eaXtN)`
    zu~+fzJ}0=@3Sj%L`EYGvVUe4OCyU=VabyGk3?lfon^jfj{`4PuX&o2MF9mmN;NpAR
    zH0tl|Mw%2kzmu!3)gZJ;eZop|Fm2u;C#i!&VHQi-`>l3@N;NG6`==;v?x&{Umek%j
    z&6qZ5o=&w{7EkGhb4a}uP}ah5B{QMU_t439$nRB>BmM8FtZ
    zb3B)#e+KWE(lq8(%alyR!QX}uX2bDt7qwDf^~4{TsOd=
    zTUxBQZaGAZrUZxJuT%Z-$BST1*`-UNsfbZFb&yNc|MD|YGx+VUzPu>mCvYpu&L1*yxtG3slR?QMOR^Z4>JUa5luk|P$RL1oy4tMfQB=>B&G-qINazx^c`6s3P{+VvEaa$pXBCo{$
    zOKw5&-F2+(Y&Ie6ahy(v7rGx(6P;P+^zV>!3!MUjg0t@TsaHb$!qlRUea5}~=qVlB
    ziO--YW&_sw$Cn&iE%q~cj{Y+Xm9ea}7tk3KdwK5U0E@`2+eKFmCzz63*orE&H4Y7J
    zTEQZRf?ZCL0YVrj-hvx-_DL&-9s)U2PJjJJ;3H`H(ETz8_T+C#ZSnRqc>4!qWm9Mk
    z3zAQK(iF_fJXcZS9af>?z*4vW;@Eyb&KDnhP^(dHrE()U``ZoHy|)=B(`=KTQ+ek%
    zjaxC?PILtoJ{+Bwk~@SYz4e)btO#w3Jc?vRckg=H$7U_}EDj~c1|85iC+TSpiALiF
    z%PF|Sh3V`>;vrO^YqB;zlu{~VK=ofQ;{^Q)!22rkk1V)1?>_YQ4Yr??~|K8F4-(X=RuJkox@AWZ$Mbud0a}kI9uVDw!
    z(q>CtKqKd;n#G5Qp0pe6a$3N1QDxP?0nuVcI&clhil4prXwXwKI{BaMI3)P?tV8lYO@pRQtg#Ye_@R9!?sZa`v@CAZ~Xj+6u3=R)Z64kvOMno
    zn%h{cy0yG4)+}O0lRF&q6$)d{QV^gfyPttmz>*bzN-TBmdNbD{MC0*ejY98wX${dX
    z_`?x{-AcU=EU+1^C%aF6{B}7
    zpaOkHlBK;jBUq^mRHSKYwQN43mzM@tH42F%xnw2AYwdm`W8JpJzV1!a7}!=
    zK>b_Prs}yt%egO5e|?X_RFQggCUb`8Q@{5#bOMYPleF+zaam6r)72gskm(aF-SWD6YGPv2?^=RfqrYi1
    z>f=rcZvryr-_qRtc#0oY{L2tXPaDy4Me!TAk_l~f?(aEi-{AVEF(mI~y7sy^uq}k=
    z{_USwVB8NF^m&ynkN%#waU@c!GLgNMoP7A!+`N1QoT=&7?b~!e^dOp$UCy>MxQYKWzXn9O!BNNf9JV{mAcsxkR=
    zclGF_lwTv6*?m+QSZY3=2pqdn)(z#9*P&s<#A^b#awlphzQ*P7
    zfbgG72@MSj8)4GLvO3PrOZN8oq?8wWq-r@j#&xG;G`rwzaqDkcz9pm?tgp%{YCPm~
    z0XNX0*rTTQb0~o+U&11EVv$CJfSRIJtEk~v1d9~n0vzO#6H#Zd>p7vzkLt2n=nBtd
    zHnDzO-VWXnMY#mVYrT9K2VcWEK60SRjetM%3>xU{HVUJqWeBI5%*5x-IjnUQ)Ab2U
    zW)tSjCanABCyI!bqy&>!=O{MPDz(z6CgB_+1k|Xb`dCQ{F&vxdmWO{hABAW#7&&IPuD)b9GZX1Na_t1kf-G$~w2U>eZ#C{afkV99)PujBdNYxx
    z=jA#p7>o&wK#`$Ddanc9yQ8Dv-)hib4z8{;mxr+OK)g$#wuplAtv88vwL~LgcDoy#
    zRcTP;fz5~b(y4i1k;atKA9~6-y?`U7>%It{n>!o-S{Eeqg^uYUnI9MrfTgrlkHKXS
    z%6pYJ0Vnh%uofqk*(p-8exeiKt9iHTrXIBCPQkFg7H2YtrjiQ39=OSlDdFm!2-sx>
    z_~d^h#P}`wd}v3K(*xQ@9G=lEk^>!6K8HA_kI^8ZFO|Fw^V^-2eSBnWb=sVE?B+q$
    z=d7?OxW5U4=gw;|!s;)7UP`|%!CURbUGMu8kB7e=OSi;}FO?b?#!A#KB3?yMGvxgb
    zY8Wej>e!!Fjxa+;-4KLB^xZ?9e_r&$XqtM6@=7&&+s}x1%uWRIz;0Izzb7t-;as&ME9Yu%kTYW*vrOIM0#k
    z6=Z-PQQ8qg3Ig?-|Gdq|A{xg-3R(XTz2o8QcUemH5!>Nk?gkmG3IC%jX!_Jdjm}m6
    zv!y!zZ#5=vIsKZ_>D17f4{Pj&KB`W)IJi2ebh^!bKH}t*D)RRha($Z#IF)!6knW^<9j*Y^TFU7)#Qpl<&?532b_L#`gI(JS=vcg}O?*PQdghs9f=~FH-VB}5)8K2|VcA|5Ubdt!a&vz?O4dmT>yOtW-qD`85iR~TH^?Gtbx4taE7-H_cjY7I??%9(1WTJl
    z&2$?)?hRR-cMruoGGBf}BPve(vp>O}hhWc+MF!MS#s^FmIKVo5Suw~A#U+fFA=B#Aex$!QIp8|{a@<6WSMBXH&z>fHiz3h_fTvCPc7pIrnNORp
    z@N}lUyu22)?9Yf>ctJ}E_eYbOQ{B77^DlPZxp?-U8;+`p_#Yn;vz<9d(N#_P4DLB2
    zuzimo`M2sT&wcMjFn|k|ZWv;M3qYb3;gh^w?Oer!PGcPxVFEqdtDbz2+z9)@>tJ<4
    zmHnxXq5dHhoqbGR!(VZG1WH8Dc^c)ve7~HJ&ZD~JwdbjM$@y*6D*BBby9%n>;`>Ntps_`Ojd(0}TYG
    z1dpS^po#W;IaGj2%f0tOQC;=i0k{PUJhC>uK31>BA^E}Y9CCYasSPMi1K&dp=Jg}$
    z(Vx99k}fE?`J(;m&r}J)HXfyPwJ&UnDSzlaZ@+R}6musHE#`
    zd`(9I;{BhOn}Ez0iQ}sET`g6bN`G~nO;GfpIPbIGrjCPqOx4$X*MNzNleBDB1$7E0
    z#b}*m(>iAxtHRXR$z5Pm^}z^^#YdP%Gqy;159SkO)A82R*?%d)^4Dv|afE9xKY@!DC2n3IB0sXc*oWL7w1fr?lS9z~j|NQ^qTG2Uo
    zpL{6zQRJv<{kG9ygGNsn;!1#$Kk=GtTVd@~WGps@Y$$SAIQB7Ndv#BB9BJwLhI|mS
    zg%78mLz=KTaK!F8H}5QKS1yeAFD0JPCHBv2o$cgaeJ{(C$EV9i3w`;PFoQ>VHbu0_
    z)nVnIVtjM18d@-w4LJKJcs?EqLrk#g%yXq)bh0+%{jUS_wG;10BE2b|?o4!b9wA~u
    z1a>-m*Q%r%IoF)JQ!BKFYombv#vyRsQrigZWSqTBFZSq}!=K-K>JJJWN~2ZS3MkS#
    zQ=GI)VL9BPdoI`K4;YkWXx9m&qIMi=;?$r~w4J4y-YRr`eC$@|4I~6{A`jpSjGY;pu_WIEzk|ooVJiMcT
    z-%e6|2JGwtYYu3qNXRw2ynHz7!Xtx9>(1yaKi;yd-}qVB?MCZ-mG0L0$HQ$VeMNao
    z#ZCcTCTzMW=q-NhR$p9U{v~2fI%N$FPe5mQ6Ie1QoaptCdU4H~+1~SLP$A3*fp`Jv
    z0OL7Bv+wqCtohr=ayPQ-bb_
    zA0~40oop#4#*H1xxcHFqZUZ~YQIY4s+IRlKZWC4c%0(ClZFv;8|lnB
    zrhF(`Lp8NGFWH2lhe)@ljao0SpecU)uRO-L0p&Uu#0>+?<(mX8qleAcP}qNqN|a9~
    zwlCbC6w90+Kat>fy_r>WCg-U>8Y@GTV2m#QE;w2|nfOFN5F}824Eo&4lk5AZH};Ki
    z8%0{AK#)g*XwKuLRr)DO>I$S;%i_QBIO+9rTVsu&j@8>F(^#HssOh5L@JxuI;gD-H
    z4E!+k(WEn*Ua67z@fkJL=_WQH{$Rp~p&cQ&_#5$JKM_a#j!ZMa3;f
    zg(09j
    zT>`f?;=VvOOEj;NRh~}Tmk-e_`Hte(;p^)4;ihpDQ2Y5cr
    zkV)4}jZ1}G!YhTrOk&vM9c`q~JuU;*6G2dX&uy*a@E*Qjv_p$PZ!w?13-A*69m|Vc
    znyl!FB~}}2O>P%L-b{|0jWWX+Un^f@WM*PF
    zEe(?q?ExEUnknkxn1|Ro<3StYOHdL2WBo?BWnZHdN^2;R=B?$GE1vh@Yw1IPCIHj1
    zN=#~i8rMnp(8NDQ;*HPr)^fr?Qbb*jnp(uY+#dZb;?at>{@@xFv!ZIt6!?P%|?tCRQ@%RPxm
    zSOccI^e=u21E1R;#e8{&KKm8~42FUD_tJp20aUUL5nt~^eFN)}F*sr=k4wADr!=Q7
    z_@YjfoT8U_p#B580=XLgMnWGPX$jMKz!wc(-=V~(hBNFEtGh18d{40_h5(k3*~qpN
    z^YR}8^@htuNBjNaex+cEwB$(Vy1MKanxZ8m(!u3*G$D|qBAi)H667+vs!()YnbB$nne}XLX!N*
    zCdoahHWd!)G3Hd~!7uG+2Hf%}idv$w2k?azQzc<2`hiWJt=c-+_iN{8o{CC2E>9Iq
    zQGc22#*T1D5|w#5!&%qSoD)UqUJX|i3t4Fmq2_NclPpOs9j?OVK#WH>nud1d4D|Gu
    zt**;8r=x$Ch(uQ+LmFir`?4YW(J8IeK4}UKlfHDePxDiVZy?Jz{Fs(S!7;@ph)mML
    zl}?o>34H$+bY2-#$@o2cRjzv2?{Q@ka}E%ba8#R=v=~hu>vfo1dY1C*4<7)0Bsz0@
    zEmyPT6B7BKU!yYy^|2DqA4NA!d;{+?M>UVv>F@k@tDl7Pzp5lSWLL|P@$-#?kD|L8
    zPc=u)TZWWC0h^E7?TVb>(G9}YL>;}{HIxX&)K^r&I5i#7kM9UNUA$^0D#@__t-rn8Pl
    z)4G`em5^YiOKmZYScOI$VJ|mQ&Pae0%xB#=I!7V9JJv4#PSC}-kt
    z$Do`35WzeD$934;-1#n@D>%ir_|C>{0~59QyJ@Z<3e`oa(r~w-#TZ&OOehrh{c;
    z@mAhVz@op9*yq=t=jtP82;Q-^Vz^Xy$)ASb?tW_=2$uzZUb;9>iIKc-NRI9y%OitX
    zCvV)xtpTDEOZJ3C$8MQXYJ?Ch1B@biOu9b(d!;m><_b7!pxo9pr32tHvd+Bc95|=>
    zhRrUc^#piXGBq}Co}(=WXVLhsjnR`U)T1Ekr0-FH>#4b6rTIIUIA+2gE(8Ohq5pmn
    z^MAhxMxYK8t9Rn3$OD(FnMQO4Bfns#7NSM>>M|Rv7Q6)k-UCny>t1
    za>i=8l=awejcHr$3BMa}^T>H4(KMx(+?2ex~7xof7
    zA&cz0G8tDsU(DoAiO*|{@n>3ASG);d@zN*w{N~ema|bp1JkP-i$DrG3rh@n(G)rV?ndZel;9qK}r8mp{
    z$4kcWl=}ft@@Z$;L7_W#$m2WDQvDU-I$zI9ah?pmI+GB}v;J3F{SpXp79teO>2-U|7?Yv`c>9peG81uEL>#QaOeyS!<^-UwJ3YERQssPX^oH|$3@W#g;8vHjS
    z+@fsp7(eARF*lUnxzonX=b%HC%SYC~V^%lpMz!IViTB3Vp<
    zZ*0S>Ydlz~M>AI0wYA8c+bC9~><}?qD6|&6W3~BzBb30sw535+x;<>(`S23}%9buP
    zS(rf?VIe?Q*yz7n7~ff@u=blp>!{k(!Auju^G$pH5BVHvTWSchI%CC8aN;tGc$e8j
    zYIg&C%Tq(XMA`&b%1!{+VmB&6@Kuk?sVc0Rq}2b%-d9FdwRYhGqM#@#Ez%MKn~qI)
    zhe}FINh94MARr~(-AG7F3xYIAcSv`4-gkS>z2En#_Z#EhamW32{&xi^DT-YOnRs6R<
    zbY%a=hJqRsWund_p;{`!;eCLlgkQrDJ(
    zB@TYM{v0^LC}V`#i-RX|?0L^>pz)kn3`fLw;ePo!z(ZBSPDB0mU}*9t?he@^@Dv>`
    z+We9=wJ*)MUp)SgoB#PNA6~*R(}DZ-`+`ZHM3pmOrIr%f>YrFX0Cye
    zP61q4!ph|zmI*yq<}YNJI<VeP_)K|3L~*F9;}SUi_g0HQ;m6CG6m$
    zHnMcV_Y&HO_urzG_s0GAH}=;H6fgkhm&?Lgh39JTPW_#Sqh9;0jz7uB|9oaz*i<2_
    z!DIy}uqlw(X6aww3|J#CDR2mApXuTM>Dm|A_b6)ZvVC&
    z5G?uM7tM)Mq4N(tzu^$L|Ay#B
    z&RluE$Iiex=&K%9qk=bTAoRi;W=9C?Q-cs2e}AuDRxmQ`@mf->LmT&lBvvyM%g0ov
    z=YEuf@U#%mm*1!H<)W*9zgKv~AOVwGxjQGUhA#YhKFRhRj67uIx8{ni}MRkkA5=7zx)y{CTwdw&35?O
    zwS|#22tHZGA4pVxInkbfZ;c7Ue50#W{J~+S!EkEc2(f!hWFHk%37Aj}zA_4!=&-T9)z=c
    z!kSa49!`T6UbGxDjv4pS&=Q==S6;Zd)D~z|Kfi;7)bkljp66LF*UBT~*RQEx%28td
    z?~Fq#)GHq$*UJl@>*n%cDJw=R{M$D%8(Pggxb?N1l<2dAm4r|0Loei`GD7)Y+E1Eu
    zl-+hFm;sH2s3sCjE{?aXXPj0#-n0>^OpjpG$-*hY{mD9!Ai%z4(xO(@{c?f0>n>Fy
    zNgw}B-Q^O*BkUD?WU`4v({0@L{iUv@Tg0cHuB*bt`_pwu#I6cBbgDWy;ytovTcSX{*=s
    zKQ7LBqeaVmoDWjo$_1?&q+v~uoIv9SvXrY$Bk7{@-kbws>vmG>R&15XM2>C|gj~j#
    z-Jovn*IORL$ffo??{#P(=RfZcUEKYO#?cf}BvlP33t&#}KxjzIrJh7R?FwTD^?mu6tf`95vkMbB)vu2@F4
    zgpeBuX;4jeTE>s#uuOjBvROi@a=q6^9Mc79)ByD05*7cMWQWsN84AyP8LfY??w&+m
    z3SgRMo*aat2=@`Bj_*Y^-1=r&Uo@NPNV`Fd<`eNpZ$vsOM)&)8Pc&G-A5-L5RC09C
    zn~_5GK)I)hpA5R9o1Zll-&7hTZ1yuZIlQb63ru+w9_2=ESV?Zg)_Ie_Ry0K>^9S%j
    zhPAr7>c3fE#{o(@Vf~h(V137|zrZ84+l^|jMCk&#mjW~;xkkkV8B5^k=%{0N*D7xw
    zL4I&xTMl__X~beP6l;oYKb^yJmM32>5uXCS$5JbGG<+tt@k=fF_Cb@a;au
    zAG|m&Vj`$?8mbLssF6@EP$kVtvX4)6KVQ?U>%6Uyaxt~C7$*KW49$Jl+q#n`CrFLY
    z!N&n(U(-jaT+IxV()BZ0*pE
    zf-?Q-8aq7(+ieby*f(G!V<((1c@1xrk`Db{6XWZI!eS}Elj^j&{)pIF4d++?0~}!Z
    z6L1^%O8b}Ong(@@XX>1mSsPx+^D6anF5I7eRX@1Hnp?9~Ihk2l*yGS3B^G@zm6i2n
    zjcXv6ubg}w085w%nNpEzpbguv&aEBSpU!ij%56O_XA!hFwG;4
    zNbb$?ia=#C>SfK@T)W*1^y%H79U3pD_xnTL6|IY@44x>SeN=_Zs!xF_q_YnJf3kX;
    zP0Salv41g?o&ua+?YF2k>#33*g|-_mEY22)Z>VQlyX-DO%QAYZB-`*uZ(1@K|iYYcs5i0*RLf&Z^f{BM<+^y+iKb1R=OBKX3@RQ
    z`Vgw{m+tV_I{_wJ^H%PTR~XN|MKe{gN0Fq5peaSK!X1JDn)``
    z7qnhqDSo?0fQr`vT0y{b&RKr*QVWjG5GL07PyFil)7vRL{OGP3!gRW
    z4kG|(9{tqjgUJ2&2WtX|zLRt5`0e~*Ewif3A8rWN^VC%V&-eE)A<+T+S7$OMcwCY>azOfeH&g$*
    z@UZvb0s!MN9nGHr;}@7P8p-$BpH>Fep?y>BIp&}474btL75;rK$3Xa1Y9uN7r#s;T55Pwq^rz+eL%E{olG)M^=UUwc7b*y
    zpSqN|xcD&_=t1=RQ8l4bcm{Xm$A2jZqaB?9TUu($ZahG-w!R+jP!EQQwUhekw_Wh|
    zFWH`nKXwuk6B8>f1K9;W>-`R@E?qyOXdKVpwzRYGP>_
    z6ZKT3b8apb-(fz0s*`Ia5vxW#YKL$+h{Ch8X^!SMw@rc`CXfraetogS@gpqRgu`K5
    zgKNK?T-1ecEtNOUI%n2-qj0&rZfeW%d@aY|`tr2cbJBD#&82tR-JEeqjVpo;?TdOFgG`EI8b5^2mCD?
    zC=&k-%I9MtV+*XQ*Y9^e-H#uw%U-Po&DQ@;xNMfRb=El@lpY)%9>&7uS5zp0^aS1c
    zD#z=coKV+A@=}XwXf;^wtlHX1%gXoPFa(rZz6t%|X_OGsZsl6<9QRnd4<^2M7?7mu
    z7&l5uO1c95&%?R5KMT+7M_08Qfkf)2VackZ3~s`D$ajHc7j?>6x6$HvVYHs2sbLjudgqh6|J$q@_~3nKuAW4$7v)rn($doQ
    zl#qtgS5C`uM%~6v&OqYyDOZ(>moUAmD@J5A7FjOyM_D4b3UBOU}2$%tY
    z_5KIBu*BzP>?||2$kp#&f+Q{jmt|}~0=qfpR!P>^#f}Jr%hNqw9HSX@1ocX@utN2!
    zc*?_3YYd=h(}~F}K2g64MbRkwq;j(uIe($to*J8I~5cpsDrsngoP|3#IEN
    z>V2SE6V}9PgBRE_8}t4#a}gQk*sF$BTB*tMN^_z^=jw?{d=v67?%L)WS5m`n=+n6U
    zf-Vb@o!FPrMjD)6&f6!x+wfVz3zM_gl~XP|_322rjgpjuvWqe34%E#PfY`Jh<0_yQ%4ABM$j1?%JzxQocfG5lekGw!0SrSl6N8goVP3Ry-2p+G~i6vWcIt2x4bC3mX`
    z2nu@EX&4X{8W!2`J3=I6Rozf1J@*arIwb5xOq$o#L9bJYbdT7Gjd-RZ;nM3SM1_8(
    z`|ygkBbz6pMzV0&No*Hx{c2bOqDF-~ihWlNF#Brn0OoFWg4tEnqZ&4{ud{NJouwG+
    z51*G!0X+nRIFViCX3a*?a)lPjB{2Lk>K4_ahi71F*V8s)57*Tb>I$G`p&_ar9K$Ht
    zP|IgU$bAmA&nY2)HCmx&}e
    zxLP0xx#+4&y`3QvQJ$nYRG#;|l$HuM{T1)xy?O(?gkx9;ZpU{xR0#vNI=KIJb%sEy
    zoeGWr(uyRhs^O^6dMQffy!WC7OTK;DVV2$lXgkUrru*?vW?U?})-od&{mDaiHH#*I
    zXk+-^9qnYIusP-7UP(BmLY>{Eag4hbN?VDrOYhVhlDWx#jIdtYfOnzd2W~{IY!)|(
    z?cZ;vqTvPa$%W8ug-W%<&|#2r6ycv@G3;jKO*3m0w{U_r0IG274UsT+vyld~l!tS-
    zY``YiNKl8uD;9}urHq12aIC&E!i^5Tg809D1Yo5aaY_Sf#{36ZcJf&Iz`
    z_ppsP#RPrfO)Uoa7^MI5F+k{BxG_{m2tGsUuLtoL`MKv{58@z_K0R>WNC+O#4oI~A
    zwGVsTwg2@^jSx^?>mIhs2#gCpzk8iiFXRHDhCIE=9~HL%|!}uSf81
    z0{PRd3ZY8lb2iV3PrAbP1E7CsS)bD@?bPH8x4e6)n<_+Hg`OHOR3o`NV=|;J?8L1z1lLC09DodFJ-u$T)s+wUQ4gdET1?$=W5C8_aJgTPH-I)18Hz>GzVQVK%|m8TsSsmq|anAl=T
    z+v5oSo3p-B<3XUfHIJ|R@xb!KXyf(K!1wPuJHgZ)$g3x900pYU{FY22=QEgbIN(k1
    z!{5B8V-7Pon}Lx7CEO28Ym>92^t3Z0L#B;YCy(fq2rk@UmPk*#rNOuaQ?pb~AC8TO
    zhYq;cXc!zw@3ZmC&VIu6!v||I@`YSjWo6}*Bu}w|fN(>CMU5nw=F%2vwcCW$1;D)S
    z+gv8*sNgR(%vDm+>uYOa5RbF2Qj_6)rog^r-pTR}E}P|`xNrWu2ml4`R}{O+J_fUh
    zm{8=Cpu?`(jSECO=vUWzB=RJq;3gh3m_$HPFUS(q#}#`l(6-sSp;79=ItC%wg@S&R1VZXR6nr}u3RLZa?-XNKO_sgwu?+%(5+3is(
    zS~SHj(;LkrcRAv%teI<$o+<9?W;FRfN2^vmNeh
    zKpyG8D{>*X87Q(6Z1H+@<9iZ_Ye4n?*O4lDFmmj``>8%8N^BSHLN
    zj^t9JP4ADPES@YK$S2fgeLV(V0|%gnd2;GFT028&lw=pp%E4h2IIB?qlRfOt>FgWp#p%DQMVn0r3`+Lto>&Tf}WCE
    z0S#gRXbSto7dPZ?N?q$A-17|~m*CaEeBp6Ps8fW~eQHlT0cw=8X&?
    z#(Gj{U(Vz9*nKXiicc=$uvzY&QghT2gWF&hz@aLGyuv7xd8QfzU&<5bhS8Nu`TlDS
    zV#t!@=84)J`e%28{q6K~>~eq-=GIWpyZC};J@3X+n3qC3(Jzz8fkb3|^3{i4eR
    zL{~tw)X{jo(bx%efMy6Ei`|bt9zvheMDt^8xQ4!Lc%_{gU2|rjm$dV&OJy@~=s8ED
    zS-}CX$<_O-hLh=2Rt@0&XRzOYl4hF5q0SoE#B5_itv
    zNZg<}CW}5oW>|OAtVDK>?3}stUMsFRY)otH67y)ty*iBvqi)*`7Q?te1f=ZtN305HJa
    zFTJ0654u^rXxzd0s33i3g?CyEyMz?BVg(r=RgXnKg~*ZAIK0wE+*n0SccFrT^%3w_
    z3aDjF;n6u|06udSEgKSLoR(}_CC#9B6J3s=;&LxrTD0s&cN{k!URk$qt2i@n2LcO>
    z`55T#(z$1(DW*5-<aTDi@o9Iz&kVwmU8V%VwR3uE1;+?T6f-y;I2J0yPqD
    zMaY~Ce_^Ww&Ar1;K=5J+T$~HTuC;Lrlg$Haz34Rr;`d}WZH#3a%eEZ~U0F_s;Hlk;
    zPu?DnpkPVd%pvhJZb5Cly;qglmvo;xT7)k>!j37nKDwOQN!@j7uwGWM
    z^-}z6y(a!zpn{CDpFsuqM`bTyM`{FTuaB#GyaJBJ+NX#_#cvZZJE$^uUCrY*BD3Mf(W
    zfFv*A<_9`f(^YP%~pLNHK+2b{N+6sw&GGT4ya(e5B5%Gj7M@;;_MF
    zakW!XwI4=d&McJgJlA!ZB_&K4jkkPiQ)ZUb>TD?{f%|S{MMVdU;hE0s{INQ{dsyVS
    zZmr1M>^$-@XW<>Q_dAjY)e;Hdw6Ez2>jXzvbe
    z$!VAN^{Z`*m@{wub#79d^J36D{{2Xl`we3x?w6XnutF|yo+#BC9u;&EjwgD%VI;(7
    zbv4(NhxX)co{SICY2sXvWx1Kj*$qSAfc7x)kCE56YJg&K@yji=hgS%e#>O-+Q=E}}
    zLftm?!X>{L{Al(qZF}tUFo{DJi@77uY@%Ee_%!XI;^N}IDM_oN_2Ff?x6WN{)(&Nz
    ziRly`r(cN|0RK_xfkMI7zY{5$Z%_2_T5~{SE|GxGsdwRhtHbj;rrRyD%Arzu48KLIhbE7
    z*rCBWTesI8$70Z%$d#TZZe(OM)2Y8bK^>!MA9s0F?7@}-zon)|$Jmp2#}Gm3N;s9Y
    z;Lfb^6VEX4Wv1ZM8K+1H_);iQJ
    z5H;{pj^o~y;WiX2XannoctOUNLG*%gL{GwmoourK`NAzq<@Np6^B}Ps1A_HMpnd&Zw`Fe0Qe3Z1AY{B-4p?GiGqcE(x)olS4twz^(HUUA
    zB>=VdQx8&-
    zJ9B5Tz-({r=oj)8{V&{N=+zCKU#_1>nwpy0J5MCPo{Ox;N;USb*_yDgs4A{h-#G%p
    zapUIxsZYeFU$NF>w#8q&3<`7*mTwt{vK$TR&bpnj@g9_KEu(G*E}BGogxEQeC)j*~
    zyn0b)tEL)rT*6f`;D&L0(L9Q9LH47ER+EfoBmgzF-1YCe!+9YRa^5X)4sXf>;j#95vy-~vfrcBVHc&bvwy1;_#$gZoiU25zS
    zVrR?N;Cg0#a5i#-_u6GhK@X^@v9~0F!@LyRu0PTGNxj}9f~nKjvSOAsIpn-eczI=9
    zcvro$D{nYJu#|oOisy1o-h+7o2(Ue{nxmo995sbSecVc>g{D`)8pX~iXmRG|h-@5P
    z9tvoCQ}J>pfiTMzjAxfWS{tZ|DBx|@1z0w`b);%j>o^gIQDh*c$hDY{3
    z{ooeH6A}*j#L%Hq+X|RVu2ga-t^8PBPLgyV55U`exrNi#);=UZ)aNL?Jo@yMelBG3a&Iwn4;an
    zUgn<11XMIi(|?kh@%0a4gz1VN
    zb-s?!*{f}bo;=9XwoJ|q_UEG!b=lOM#}imm@)ZY!<)d-Q8%3ajTie^@lqRdIan5xSbQF*Q*Zlt@7VGtW_!QKS|ngHR?XjBr$^IN^$Iq
    zTs8rkx|z7%P`jd+*9V~5stZ<;aLiCWfudRrpEHX_5N!gf=V;gqKJzuuDuFP+qu@r^
    zpcCy$`2=}xGrviwla!Tv7V&a3@YC#yw)tk@Y3$<
    z4-aZ~KB$_q4&4tlhdh1K>O7C{jl3AB5YL>+
    zo`gj9(u;cY)T1We$#I@8^th<9RU4YcPzA>
    z^K+A#3G}~v%kcUtepTXi9IAcI{6B%p;SltJ)Dgl0Ec`*h{y4fkIQa31HVzD{b%;o6Oc+p0eW7mo<1Gk|g$G+T|h-x@twESu;?fnI?SSHb3
    ziR`@L)v*S-27^$WC!YvAra1K$PZvUoJEm+&7=@S97svr-eY@9t$bed>5pUE2otQ9!
    zMF=ne4E}2h0C16_=VJx-g$}%!tSY`yi;vD!koxbA-vxI_vPXR;0JXoQK6|eGz4bXS
    z@kqZ?qgIt@F-`g?+JKfb$PjwXXcS{PfOJ!WmI5dPQkh#qz)t=i_bH_4RR!+g#q5o{
    z&6_t@4I?{SB;E`TAXa}5Dq!V*xJ*vY;OLhO^+j+wKCCbDKlXuM9S+`dSv^XHB@y31
    zEp?cf>RUgd!Yj8HYz8WN;aWc{5Pqw~#C<`gH0P@k=@#}uN2xoR6{H1d353IOhEayr
    z3$u>Sv12r>10I2p)r-BamO7pxCx>Cpi%-}XzCik7EHPekxhIK$O<{d|I~oO2$7r=T
    z(+av=zmU(+rKb0^GbWyVVcBqIXv5;KR%RHt%fHH&RJWnGY8QN{$n$O=0mk7hO_&z5
    zaS(pq`$kCFZoK|7-+@V^zN=_v&hzhW&;zyseaHTijwa0HYzB^n-&aNjoJFEpcNB#w
    z0yQB$8L7c4{W1)o#s?N^d0ZW(bN2||sYjUsSv`Zj`PO9yX~Ag83myQ+5e}gS&Rc{;
    zteyiTwC$-#iO!6ff5iLmvS$BI;^J_9SvZ3X
    zQHsnUP{!jwlPByFxO!U!mrj)gFzeLScFtYrFd$@@?6O_$hY}VuG{J?jk%aS%XD~1T
    zqFFOE)g<+my52>#x``WkKs~P!_%{X)?!Qfn&&*F3y=Rh`_L)UhBLhUCL3KF&E&LUC!d#G=Z0kkmVjfzh(Ru!MV
    zGlm-=_h1OaS3vWSoO{g*Br_>aO)mcc1X^lyvKNDY;l1F
    z@i&<#$H(#LQfLiEfRQxhvuwGs+>!Z`MP0j
    zTRk}I^f)$odwqSo>f%_@&8{~O@MqH>$c-k=tJv~ddMxZ-@wY-7)I$^4NEy1fqon*T
    z*~fHl4c5Cjl(pihk4?#5$Dwlv?~14iMTrIBg^hk(10f$1;O#1ptmp8xZF<POxKJ%uy+aCklGdSucmr;e;^euP4=ilJ9<%L0
    z9FZK%BgIAV-3
    z7UYx|H&T(a9p9QYULE64qUWvhV2TaqJ|h?Q`;ggeT2LY;#+5B+WO4zLVX^SH?!9YK!d-XtHUE*VX0Gf
    z`>K8fBWM9_S2BNBS6`Cdy=wQ4bkF_Q9$#H?{D<=JH|cifT5gB(?E4d`i4Q%w!ATD1
    z2Q{FV(_5v|(C%xFDJySS^`LTGW&!$!<4*Ym+1?(`#;NK@up*`vqAfK8h!g@!@m9Pe
    zp+=Z9gm{nT9sPhafG&d|r6QT6z;fzy2@wYWoae36cy=*w$mcnPkM3odZvsNl9+=nV
    zK6X2N#sUgd?F;O2gezig
    zoNn_-nqaUvo{(K0T#}LXqf@v>^0=t3^d@b=2`cE+fJN;FynsG>reoiM#>x6{m-A|O
    z3jeGeX45RP&ZAxht)K{3ANqVjNHPnYk=|V
    zxjLD(d|S4?@?1*~Cqe%xSyV!Po{+UA$-^@MgT^C-
    zM4F}hQj)?@&%uhl_I*-!*=z>bg0j0^UxkvJJ4ffCB_TUS^Q6|m&k_5KvA7l@HMj;zh?Ah5l!RiOK=1=A-9tCWO>KuPt;ry-l^sg
    z2fT;m(m#LGvUbbgjzF{(cL*nsbNuCs__f%*=P1-a6lw6q~NoSd8Uh<&l9Q*K2
    z2OB*H#6xUO+wDk+Fj~auu_Y}}I{S>{!g=)_25o1
    zfAi7XSC|N$5%PS-UqNemnzz^du`zhOh<&WrK3u2H3t#$uXCF%&)(?r9IMmCW%^mD^k^nmjPQdtx`gC&rp$J1fP@k
    zT+}@5{d`ZZhI!ciN7z^4wj-FSwC9e)@=L6-erUvxoz{(b#I|cT7+gvhU7#Qfw6W4c
    zIQOg-I+HL`tj+(GPBAEdFt69hCm!?3SL$0cD30W(kKNCXhuQUjEz0qH626p>Rop*&$RXJs<$ZS^I*q9`;sk?nh_e-2x(Bd%HssX>Do9-V0KRC$fvyJX7WNJ
    zbzJl%(+~BTcOSECx`(MD0FK3(Ng((t#Ch&;V8}|Af0}phwE{|k){}x(dkV3EXC-mB
    zgV5hni*Y_q!m}3I0{tr3;hiF{!nMQ-7F-aJLF%6Ohh#S+HX9cwkytoFglin?v!dPX
    z)1u7tPzvC!$a$3Um8dA_%)}}_l{L8~Sn&vLzaNJb6j2lkFMeh5yL^K@@$7yviwHGl
    z6WU`Q&OIlz491KgRdGtC6Kj*ep(NcQf)*%kUQNsk^~~-2fq8=FVXs~f7n=Rt_LB!M
    zqFg)xQUZnSAtf2*-K(uZQqO`gX3~WHCQu(}kvAb$JzJM}3Ap)_kQ7jAZU_j+Wl%h=
    zxwzQiGY14UZ|v=vj;TiD3K-!_7`k&cD2qTICIK%+;nqHuDBDW4R4-}xR@XhOFN3%i
    zi|@!?nev(5z@G#x&Ud?KSM&~nEz8&1($%KN)#gxkNwGU;swN&5D_9p8<`-T{nK=?_QWPSXo11aN~9
    zF!e-&&m+rF;DWn0OS>3uqiyquN)&la+l^w=6(c;o3%0*}^HjCX)~0Pdx5KccdcT%MUqe+gkYW`}
    z2RL%=V&GMZL9`pD7&GJnq_ci}3d;G}XhJb+d8PPrt7hFNGkJ2%lDhBbq1Q#d##lUc
    zTO=wyU;pU0FBbWj*STC5A;i3L{M+}qZVo~ClMoGxMGu(fWL!T&R%k_^o$QLj1Cg|N70hjt`-}
    zYJ@9&DV8^Pb`9GpW3z=K3Q{}K;K}HcdME%ubvVJ`K#!8p>9O%=vz(bSt6qw>zf%d;
    z$spoo#**YM&h7@+b2)
    z(6~1lZ9w>E5OjPEIB7-zZ_3CIsZv}^C6_|2YpMPMFp&Dg@M^Gy&2sOEXO;EvBa#Qn
    z!PM<-y(OO~4XGb`(v$P(?l+9|mlYKe@n#meEu-ujTpujTe$fch_wm3xzl4MX
    zCVI38Vn4!jgI7@sBBg0bLz5Qa(0=@6ap(jPhq605@PM96h7;w+%b-tFDOHQ&K~9Rh
    zvse)h)X#_R$B}?|#7d*f$#x~G*r=A%5_au%4*yjiw(f!NSc}8(kqrefl-y)kGmq{0_kUKDMV5Vxp+!t*i6T$YO
    z^6`AYKK2FHdME%5N%)JHtB@@e`2GjUdj4a`eR%A*bIRuo>6*c-D{wz1vEU+2EzP5?7~(eu&8h9*0WgG*^*^#
    zJ0;(~&k_F~OAs%T52VZK(?dD(#9vuU1og^e`lp5pbnp|99msrcLBjqzPHV0UB|d&L
    z06^>BL3^BNXVrPh74=uc+^ei0aTANj6}FdSQVo
    z`z9*WLrAX9YgQxgQDc+JXHO|WkDzY8QJ^0({uU5UaRCCqa)kE>wpnoV_k@reQ8p9w
    zU4Zn#9FHh1SVhYzYuxJVgEFgK7jZ|T9fz4){@(tI4NbVD2@XAAldV~n&KT8w4BtFM
    zL@()er27{%EMT!xJPe#5!){Gbs-7TIlc22>DhL#Q3ZKuZb@cpvMBTFD2cEBC_E*Bi
    zZ-kcR!LQ{W%2Nw%H3x-h?cZZ;?xKeNxJySh4c3$j4tEo9WTW5L8i1KRxF_Q1y=$El
    z;h*#HF*#5V_d?Zp5VT#k*fuDI+8)7^6da^f=mi&}Z=6~%dc)Vbbo6t)nQtk$G`Nlf
    z>V9rzytBhWd2?ho1S!T@{G~ngM9_i>TLE3kNqZrSoW*b`_t`S2Mqq^98W=flRY#1z
    zyZdO;z7}fTe4%xfsK^N%}(;eM$ipS`jJ8AQy6?Mt*;(+8xBynX^k71t4a&4*IJ=Q|pf>@b;)F&+R`
    zKz%2>(tHw!hc8)yf{5x-K>r~>NK@lG+1yk9FbDJGJq~437_?IDuODVaNFvkB(lSuvnouNeh{R@{-k(WVYJeGCL$
    z7Q(xHXNy?ET3mIE2EG6Q=!z}Tfl!0Xc)3`*-~d22^9lKF(lKZrES)>U-2!Hs?=(&5eGRk(&i!9x87jDb-vSkNo1lz^=%#>Oe~Lk|ik
    zfhdxR)_Rn|Hw%@WGFlV_p(foVVsg2tM9^4%P!RFVLE4rJxbfqND&Iu1#quWUP@3-<
    zc-3m}(1EthynfLO!Fk%Op@Sx>&nb^@5eQ
    zwxCkN;OxBOBmMkf?q;cK%$F+19x0a=SrTm8PxBxOugIv#)9(&L3&kA*(gZ_szZ;N}
    z220ujThiK;d)S(9KpoKJiu2UxH=;zGY(zEFJ9#ovre(grC^%<VYu-j2a66Rv#Xf<5Et
    zxVz`Fn(*(p8u-7S!Sa)Rg=llE;S3xchlHevpyFE*+7r!!K)t7ExtJog=VQJ!%R3h_!4ktA#3JeQZoEdVOJvaDoXu1h-f+v-PYFtn=46a8%?(m-B%TcAC8o
    zXN4`G^$a_fbS5ofn8o^X-vP!U%K(+VEbS22$5;DHk6=*>`?vbziLNL3eY6it=YblW
    z1)T5tEAF`+L7ZR#sSlN9HS=3tZlq0)q}U8HPJee^K9IpLX@^^v{=&|BSp+0rnQE%0WPK3g{XOdy68+za&jRGNTC^7OCrp-|Y0Fx~w}|-NM-Y
    zVsiG~43-D~=-qXYratF8n~eCp*^&bUq~qga_;qBi#JYWPs@#}%7Zmz>fVw|EDRDYj
    zPHPMW@o4ZHCYL}vrt)4)2|4=@^Cz@6fhKHZsaL
    z!XPIDc+w;#QK^Qrq
    zNomom#y~>|Mh=)*fYin0r{iM$JPyELV^7%#QH8`z6&~ZeqBF<`tcO^M3Ut%_}kEY*D-e{b(oGB+TSlY1bz%F#9A|G^|f_%y9M
    zD1TC+EGXHSbqNu2P?}qzsz!6v=O|kZPmAjYc6+~_x=mR&UUh>*VTzvN`a-=W=h-Fm
    zjv3S!IR{2phrxl3S3CYHkiK-L^_3=%wg=kG$Hj#V`WPwrSATQrCkg;to-RtM8&+x>
    zO02M`B=ijzRQi)YyQF%Hb!GlY;O#fFwnMc`cYjqR8efkXIP6}^$_mzSZO0$CU3j3x
    zz9PA|QE>2%n-
    zS57YxmGtCpAI54d?mTayGK88I}I6N{1e{y%+~C%Cro(0y&#&
    zIadYgN7Qo33R8(>Ps^~Bu96&6b{U$yhdC-lT?tz08$lL+?fbQmIiCqIN1P2sthe5R
    zQk#6i#AP?xMtvZDt)daI+D$FQJXFOs6^Gp9Am(1W($+*_SZbW&l`MI+ru!>gl4^ir
    zp?8mP@a6{qg0Li<_>94SzM65zlK7hO{A9;ceAukX=en(c&>sh{?0J8ajaXZ#+&%te
    zWGA0Dr%y)sf}6W|B6fYAK0p-`z=*_i6G1jW#I($T#n>O2H8k+C0r65fJyL0|ZUf}*
    z>S%n;lo%#EpyB5RjgW8>j{*z_=2HbcJ>_1pY?Mu4uY@0KaC3S3dXWGdYhyk+{CNx2
    z4KiqI7+MW#bv9idmn5vzs1$3B2phqwK?gD=kBM5Ygi_7NOS2kX=A%105X%4v9CN1K
    z;}K^Qn|0#&Uj1Vl)B;|_0yWrRO*cz8m)p6m@F~S4dNm-;OML_6Ly*WfKBZ^O05D$#
    zy`mX0ei(*>r;`@k1eqY&Sz{yEj+IF=>ONkO813*T
    zwPfQU2e_?=&<{VI_AaxQe4VthidlKT7>r$D^Vu6H%I0nJg!@(-iyyRS>yQmQMN?F_
    zs4k=T?hkqdkqNy)tPp*_u$d_0NX5ckaG1a5>{$n5m_4EtTJ#
    zmgZWUP<(pXa72C5%K(sYh`-oroNYMtrjqqbA|8P$R6f(Zne9M&Yb2;j4bO;2ME(Pk
    z&(5X#_Q{AKS#=}%A#j1FY0Xr@7#d2(K8)$;hL=P9CvlNzf1G!oO9Nxq`y}%2^48g+$P-TAwTtX(yqNWD3Xk9fpVDM
    zRj3|Uv_;7%>kbz|;L_?1awMn5CKr11w(e4LE(nDKLZY?aqOpL{y831yxF1qyWo1Lf
    zz@bvg*IaE?A@WeeWvfECB*2b3`cO)vxZ{m55&>z8rO#&}vsvCK5BQn0AYxSlI$KXX
    zqUGdWo(L-PwI7+fQ;vQgG*bF)TF|WZMKRKHr3=3L7ir*%x(caMcHf%m#kxBMQs9v;=utPMzNF>#fn^
    zlr%joRy-Djz8!KRscn=WqyBSE8r)58rdQm_B%pdhS#B?2W5sFd@vcQ1_psBZPYK2b
    zBkji#dX3NDVVy>gPf*b6Q}@gcx(B_`oEH(h^64=t!q29cbkYjFa@1m(9Hkx0S?WqL
    z#CECo{@T5nMLNeLpO6t6%Xc0KQDY^OH?gNrknxpFbsb`@K^|Lufma^-Ru<#n#6%W3
    zK~{ZML%+?7dB4PF^2~N8>?<1o)bZMtxrJH*Q9!r+U4=NFR~KS@WGx|c52v&I6-tt9
    zZ}EJ<5=C~=wa?Rd=NwG+5OS=cD_wm&d>)0k>WS{|_tB+@W>K=TFZ2nK%Ty&k_6!IM
    z??Wu1ex(D*BqnoBb3zvQcHNXhKXl)|9w;;F8$gXtt#{oLi*{qz5cz{BVi}xCW58MrK4E`cwlr$yZi~b>2=GHT4_iKvzBf?FAcTvMN
    zQHZfEUJBn+S0eiSM0OpwNhf|Z(LN1^%Y$=NS&V=9PL5(eqDzw1a)#%BwD*>AQEhM7
    zFbt!lIy6W)G=g-8Fb*A3f(X(`h%^jc%FrPxA~l#uhoFQYp&(s?h=AZAB`qK&@7m|6
    z&pDp|`}z6u@S6_<%eXOcDi>G|v
    z+WZ4H9YF##C8Cm%_KnY&9eq|i?~(qqca$%_+`Hk-;95SQ);hlxugH
    zRsA-t7E!X`oT0X>;}KZ4E3;W!6+vnxFYh59uM==bk@US-lCI)I1KN6pD>|-k|OnUR5CMp
    zG%^x_kC;gIT9LaLjmz?cAq4Af%|m@L1&t)f+|UN3=Jz?28;_fa
    z!@OG-iiO=#qMB%lHAj^Dqbh1iCXU+fc}E*R1#Hjd(*Ulw}n`)HdZ@pBg6m@d@
    zkm70^r2&b19?i)d>Z<`nO>utan+o>!0|luqFW?`PnUae7Li3*RkD_&82VVy6d=91*
    zkI}op{wVaxM6+`^h5Q#XMTZt4?z<3KpqSopK}~BimkL+-J(r#;pF{;ou6U~P;}xx@
    zWbZ-!QaRrhXE_CHiRtY^M1`&myrZ`UCzTdE6{lL&V6
    z?$+c+K3moJ5~uey{E7iDv2nR;uvBCs`>rx#twR9a%S|QyS%Yo_fgLk4Hn;Qo#+EHD
    zqIqtU`a4v0x@FX`g~;kyS0+9L7_=JJR!~uVTNrj+Cignl4?`VqSo*?R$ZWRa3jM%3b8@?bzbCn^-V+{DSW2R}ROE6>zc`
    zy@Q%TNo&2vOHXuOUoP8VCCm^F%UtjU1t+(zPL(Shbeh+C(6*c?JF%yQ61B>_Z9J@g
    zrzhie_E>rg>%xw^iwb(5Gp16xviZ4F`^?M09ajQlL-QvcVx6~HIO0gOts^r|voOhK
    zdCS_prp7g2Y?YI?ladxBBXQrvO
    z^hC$7-v-a-2Vd}$T_xR!#xhQFakfo>6y@tz7i+s`uC#<$1wYXj5ssP)${{=1(_^Tt
    zm7=o7%1IqT?LICR`}?p4Gf;{WCQ)J#Z#g>|@Z*zB<4b=vu_bYTs?0R+!7<*-ZSBd;x7Iv8m
    zclwq2$ymLEB-!;CccP4Em4s%RM!EON(@8fe)*}=EzjE12OmyI>!|`(_>u^WCBx6@l
    zy|0;09R3uii}zs5w;3K=k5vr6_VvOfTTAmio`y>M`bXw~`FzRd<%b%nnyz@x@UMkM
    zSOM$%exa}KG8U5bY&w*f8U?(g%6}=&y+Bj#GVb&4xWK#2u>BmvCy#o0#rR%%rTZLT
    zjWRpSXqKCdUd@V+rT%g3=50x)RU-KwM7pCKwQA2p7EYFS@+h4~F{-9iKGZTo?co|v
    zZZkF^#embYG~4RpK_V6VTO<+NaHSDE8(})y+=3%f*-x6%`w;6_w7!%4?ShECE#3rQ
    zMN@IxM}krm&*1Y^=tZhd5Y>`VAI2S2N|V&nLwtu^Jp%+K&2OpuyVBhvz7$G4QOc!|
    z9_5y1N>Y|jnbJirpvj^k)aodt7#aU%=E6*zuHaninZ!{L>&w|>77e9(=kAu~C6ckI
    zy`W0W=z>lyI6vt4e(hw23J)q#K$YIZ@`;i<$0?z=W-{)Gl0?}>-fiD0OM)En6okT4-k)l>FKz_L8)cr2*TK2r`OraR
    zUyfm5G%|G^OYCu~1nX&>ct6Eym!3AJi0+C0F5nllv^nQV61Xl9H&D1>YF6u
    zupk1z^jZds7~R>=R|~kY)GcoiYV*UXc$3Sg31y?>)d#JuN6O2wpLMV{dzhXN`llVX
    z*?qMdvAg1&q=&E0kIyomJ#>8gk^1&|w5N5>FdUy!
    z98>v;-NZ~LNQM33xgngBJfSB22o;k3M_!87E!h4b)#l)D=Tiw%A0W1)rD%x6_rF%@
    z79=g(J3cspzRJ0vdi9nsU+8M1uUZoMs>25+cl$7AO0u$dL0?j&QnivdD%0U+;smuP
    zuNSc~gB!xGMn7rqcTFqEbn9WQUg%_reCumZiw3_6+DcMIF4~ja>(^KMe9^~xKl1stdA)3Ju^aRfQ1m3bL#{j%51>NVIL
    z*QT3eqZk4D9r<9fa)a7kriUb}S&7rBF=Hc7V|lov>JUJHqkKXTc?dJchY&y8S=w#c
    z%pYS;%6f;h?M>Ztsu>l3ExZ8901UJs(LaoT9=dd@sRpF!+j*j
    zjmkmNe#$2gZdoO;DNL8tfgTJK6%7MEr65z@jvjp(
    z{J;#N{xA4cUCBr8_DLD#j*~pfg9z14mX}9+CF*N%$Zk;IX3M|lMf~21SKW0~>Dl1yqNsXgy>5y4@-#ERf;55uT)Zp(G
    zT75^0^HnsLH51;~W=yKZNuBj$^$lb2XMWTta9oRM_qGy`#${HRP}4!>@(T`&{YW*a
    zRFB`qE1hlK0M)^gD8AJb4H1;N!tx%7Jn^gPBCZ=8=mmu88Y+Puo!l3%r*AK5kIdNi
    z-dUMA;a`m?T^K6Q%@il~8vgdJh}BUlRV4RXxzFWTY4-KE16@Db#*^i*3bU&*uM!s1
    z^eVeU1;}m70$sMmu?DY_WPwI=zb2><*EszmB-Q&%%_-RbknEf<0NIe
    z9i2JSKGCA3Ppl7BZcw5S`T7EJw+Xr#ciHFY-gK1R7;f{Wdn--F!q$SG4B2$|y2QZ%c=w!5+fTo7sC62M_O_R^
    zFk`P{Iq>PNS7}$p_QXSC!-_kpYhb;8YwRJS;Sbzidvfc3SetHj;f!kI$-6dfN2(XW
    z_%4uC^~5j<$Yei7C<`8cT%OTyY%)@44p&C~d@RPj0;GJq)>qOYp!&xZ=_hr|M36@}
    z*LjHR0FVM}t|C%mY4hJxmMOGoKqYr3*#xPyHpD3($~gTt$_DqfH}(Ya-{|~6{Xz2D
    zUJ$l7q9UectSotMAJn?5{RdkXH@lqtX#u>f=!&Dp|M}d%zW|j6K_6p7ZYgm1@p|J1
    zDh0~u;(nDmYBjU>6Cen2QZFv~nEGf68
    zj2-!}2jZ1ne3B=3Jn22<0%Y>{rl=SWtYpeZbB*#YU&R(_>e3~w!WI7Hkc9>=RC=#Y
    zU~Cvk^gkacb`oXE{JRxt?hgS;PKr`{rm+Jj-SQ9t&W*`VvC7z0h0BN)t$$zt%=In(
    zW)-|Z6lF;J$9G`YTY_)I=y47!0zR&Dio@e4#unL~@+Y+JoD%_lNWz)i!bl?mU92}O1Zq?b{r=S#qDe$e{|uNdW74n
    zmI(5ma_d$KF;=Z0zEjSmdb867roSin=My9)Jc!Z>w0J}T^r|%ZyW#HD)j75lq=Ct#
    zjX5J|uJE-QRsZK!^iaJbn!6t-SedV3_E0{LFR%!B)t{ZS&iZqNg$?pXS^vI$VI;%y
    zgq{isrzJXrK;N7y&*sHA1WksdBGAoz-KH~_><9rW^ql3p|4f~P$}28rcJPOCdwsI=*HRO3U&UxaZc%BZBI;JR@Dir
    zeFBUi;fwdglfUD`($+7*3>mEp`6v;D|9TV{!65ktsLpFrZgsO|#c7LssZJSp3j$0d
    zN(<@!{c^-jQ}#6giDdi%I+0~}1hq!lVeAMZu*OADBW!=(`M)g<`4(J@Yj^(5&Un3)^gk?%4~0S-9>W!ORs!=gqKhw7{`Df9!e637
    z_KU+$7nJfsf9yWKFsVVd36NOt1Q{cOuzuLhK-*L3Gx94`2qw
    z!1-2Mp+ciAK+5x)AZXEKzbgT_BM7Mb81$02ErH~r=bd-Qe~z?32uAgAF|Hwz9N1jI
    z$=^nP`rOSI@B#=0M{!0$Ui1kB7{~_FBle&zAJ=f3?B~vdG6PfbTE(<|9k{!V>y9SB
    zzn0Hm9{Q0aw#X<9HUp$5ZB!FZ+pQ(0#Qg0BQ4&n#udDV@
    zL83j~w8m!EHScZ6hXB643Q~5!lx%UKT!3Dk{ijzq7re}CoHP9aQ>Pm+sJj6*JI_K9
    zv@*OvX#b??#;@JEFdZP@xfj6{yob
    zUOFKNS6Tz?7=AAx^Fkb#IacM6rFbxXYGDgN7=$4*)Lx+bG?*xfyr7L3b1+9Y0)v}H
    z^_w_?ntAeqL6`CiV8qwV0us#i5sSd(px0tGwZUU$pi{#*9(#z^5on?IKS`G3Re>pL
    z_{*uH{7Kbud_sMkqul@Y^dbm9K)>h)NBnhz&vQWpm7h8K-tJRV2XRCW<`j=AVEqu#
    zIp8P_Xt-WmY1q`+1R5@_NVIkI8SsvmJ#WSBI@207I`RS*&w2qs;*%nIkRTR6c?U6g
    za)Y-`_?;>!MXo`yNwgK9^=oDLlItJi?L31S*1tS#j{?;FQM%}z
    zRiJ$40F()@(+Qg0wdjM*0uG6ylDRdye@Iu+MMYv|V&-++&|Iv0HPqdN7+p{h_&}#o
    z`>t>^B#^eSH@
    zc_mD1?hg{{AO7A#-g2VUKLG8FEXq4{oHwuBlG3lT?-7;k$&%{J2KIVggvZu)u?y<{
    zeW-D{kqi1m-?;6YIkNj0Sv7uq#Q+3^2#F2gig~DrDp1Bl6xPh%965*LP*5QgO-cGp
    zh#63!w@dS|RKKj_?*OSeT_3m~ak$qbHFdYbw%xS3!{yXI{=4w{`7{Lpgb{P>$9a38
    z_dA3n{5SC5Wa)q`(w%2XQBMZAGR$lc{TqyRD|iC!4HbCSDk-fMv8aafCPv68lFBMEm%bE_?_w`>X-A&Rf$)a7}S?iOu*
    z@L4`+bH{5b9A-$f0wmI&=g9QG%h!c`U4br)%0Tmpkk6y4qOJ2>sCRoTBU`_G(Rs>O
    zV(l?(*)34b`{kW07M0gxWB{7h7{e{}C(f|-kmy9M+Kjsa0uK^IEN=Jc00@?<9`xZGM*yO_E
    zXR*7B`|#Y&4N`7;=w;di*l_V@6erhWDCwf<4S<*ax`QLIGk*MI94xA@iaZ<407L0R
    z{WW-%7pqWO58<%J0m{XO5yI-n24IKQPjLv1Lga#aZNEu?>bemjDoYDU6ZtYg?z9KE
    za);-iJ&yZM-Gb4KOZNel=-z-5k0TkWsn*y!(uqy4pk0j9U;cYBE)1SN^ES?8y*s5m
    z3Pf@r?aUwijO2!i2-|3t=_&MYHfS}nZAe!f({G~}`APE35>)WScTil2KH)bHC8IhS
    z);Hmwni2AfXQeGJMl&-xmtS}jlFEHilvCU{(%pN+#G$rK5}VL3>ky5O7VZ53fO?sL
    z=Qs34%5&*^8xd(AYy8q?>#=sAWh{$Xy!O2IsN=Tx8%Bp0W!ucs^b~}P0BL{G&2}2J
    zwtEmOA5|OfL&Dt*DUG&395Mp&GU#&<1bOPJ06^>?-29Pjrnz4P#YIlu10EwsOOjZ*HlkSyITcRD~eg^h1rZKY@Cmny%+$t8PS%pnhBq)UO>U_
    z@zNIk{q9^f|CKHPjd1H&!T?Y6Sn246B81F8zYY&gkR)YpXgG^{T
    z5_(AL&oxncCi>fDPju~)R#|*`Kj4{t^9YC0OkVQSk6;u#NY1jpqyx5b`q*q=q^hSUHqB@G!X=Z1Lb&Bv$LE?WyZ0UyC2NxR!EE=T64SR*C
    zYqZ%nfE3t(D;b#{2m?Ag&d#o$p*h+hb^8(Gnt5#ztF4nI*;Aq!TH`!6Nak%uO{WsZ
    z{&irsQqwri^gGa69E#~PnR=u}FQb50>3Ry;NLsxfJ0-^Mtd3
    zrjLC0reGFY%uM`v!fF7g$^u8r&W8rl{jj=I55k})Db*9Zg&n>bL4y_0rdW<
    z06h&ZU}wceNAb|RUf}zbSf6~VM@X%w%CQ}7C=$C~=T7
    zOP$a1Vxewm%Ev=c@ze?JUo!OpiABv3<5?
    z>q<)mzc=D)ov`c+P=UgFL{>fr;d4*Q%~gd0%SGkPf!W(b=)0>>>XX2&
    zpSgNpC64Y3!1(uEk`1JW(ZKGB!3*>ssMeM-<^eom%|)7(%PWAsDD(0WVgW?OPo6!e
    zKi6S7`#m-L0C2+JBHr|ZinaHKJDhilJi#`_{i80LHQT5^XB1GhM5R-RVzHZ|f7u!Q
    zCMOB=iNn)Od%MOnwIz>a!Ok=|F&#=TpyX2iZV1P-;1A>v#7;)hQ%~O}aplyW0;am$9pU##
    zhQmZ&V>&09Ck{W)OhitN>*(3qX*!x%wmJW?Wy9!LCgS*0leNM3&!E`h6x>Ol;JV}J
    zaDVS}R@R~8f$F4sC$>ix+I|*NaCM|+K;HBV;2Tx&XiOqoUPBR|Qi^NF)w83t;1Gzh
    zkKlapg&w~P$xYV*d8KNmo5`)g8d53$b}pdQij6SV6Z)J$SuWcZ^9RAw-}eT=zQc;64e>y`+sm7as=1F+{f9hxA}oPjQp{bINsa1
    zFFXc3#MGk+4C*#!oS&g*}A5!B;HyC#UnQ7
    zCtU%{tYO*&Ih-8$b?)x{*5>uM)ZEmN+i~LV*E^OH={0xmB7fwS9y-(
    zXZ$3A4ntId1HbvdIXPY_1&NiU2nHO0?$VLdg=ss9*FG(JEt)MV&CT!ldS684?)a5N
    zc2sRJ38}L8#`%KxZ+1VGC{=npaI&?Jcbc4K^JAX7MJ`xg)maN(=xuy^c*hF$(Nb$KUd<;l&X
    zYRcG=gif^N0zc!aFp{)nf?Np_K|rkMzrvrO-A3gpE(5eb=A7S8fMvR%-O48R34
    zG0J;pv%UYW(E$`STn?D^up>P=a#A_YAD8D8)-~&Z=;U&|k1I>w1wy`gT6{*&^LU)9
    z!Xp4zKW{0*L?z|(^?m%o6);d{g1!>4iluEwn#+k=S$>pODB5+>K$KT3ZFLnbl|r;H
    z-5j1``s6ezIhh_rdZb4Q!=|y>2y^Z$_H!J&zU9fGQ^7l9huIx%wIW2UyS0FyXJ-+z
    zYnR3R1023x!D_@A>dO{+fiM=)4m2*_i37#vW9|1Q7-W%`9kGE|a!Or;p`rl+yikK8WjUm9D|LC7yFE1ib`MvE$scC;6{-)&;=~&u(4MbA;c5
    z8NR0o8gMc=`lX7dgHVNB!=)<>DzmN$bX&%$c1~a7oUMbyv}#cNfVgi+xcf8v_=uJ
    z>ABdb1?T7nvq+8F8o11*F3G3XS-=bpRvSvM{w%8Ssay5qE<~2gIDn*E3`n4f1GSxJ
    zMIHR&4!z6}^QoRak{OM6=X;_7^wE3fF&f~A1WhjBcAajcs-uw}xoX+%eBas(hiYkL
    zM<2Rm5TrkoD_x@fd#XW6ISF?!NC$5cYr{$B;3JJK^t=Zz@EnY{pa=HZo1Hm%fz9ta
    z4U{jdOW)k1QR55#syS-e{ovBYIfHKh(SR}4r;+(7Nuzt_|H!Nm$mX4RMzL;4(jnD3
    zDhF2ebQzSXzCe0@)~e4unP9{3D{P0}rC_s7Mz5uFg%KO-g?Vap@CROl`VD$F;3-JX
    z;dY738+X%->+jChoAy4q>s7i{35q#~Cztkq6?1Y)lhU%2LZ-3MUVNPkz)(OJG
    zlx<*P4t~}mpHGXuddsI3mbw07wHK(}lqmPv%u3ILDjhC>#IRnPa&*^dLpr@!ZZXyH
    z#2jMFELBejW=OSCS*ri5r1iTEfIA0Yyfj>ZuV8YTh;Vh{Dl6)*s6L+xN|D;Ed%v>e
    z-|-4~!bM$hs`&v`yE89FwN^j<#U0*uqfBjBLgV4~)!DGlYxmv$`Rc!)Z)xM`RKj1B
    zKKHn#3@USASuX*Z6R@u>HKnY-!)StR=CP
    z&$F_(AC`j29+oRx`m-}aNXdH-^^sk*_O@~2UZ;K(0G4g-Vu&+7%U@o5uW>Z#2o3-u
    zYu4Jkgj@P;M!$-Z3?!WSo0bbV&Vdgsc*2Z%(O#O3sg?B#e&b(kHkZ`41M8Rds{Eu@+8GD)&&xa2`+8T`>
    zcA4KU>N`3&Dzk@ilF0&7@62ubYlHvC_Z5bD#3E*8FF)N9PdmJI+v@2YOEJ&aK(3{e
    zau!sh8ey6<=A#mSej?aDm2n1W74szlyCZ{bLer1?yHbV2w)+^oY3a3z+QiILg2h@CYWeu|;5w-lL;JG-PLVBciZx!3OAg_)RoN4;(GwyrfX0}F2a
    z-XcF3#